Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
7b66b72d
Commit
7b66b72d
authored
Aug 02, 2015
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: Convert VLCVideoEffects to NSWindowController subclass
parent
f6c4ab14
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
41 deletions
+32
-41
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+1
-9
modules/gui/macosx/VLCVoutWindowController.m
modules/gui/macosx/VLCVoutWindowController.m
+1
-1
modules/gui/macosx/VideoEffects.h
modules/gui/macosx/VideoEffects.h
+1
-3
modules/gui/macosx/VideoEffects.m
modules/gui/macosx/VideoEffects.m
+17
-27
modules/gui/macosx/intf.h
modules/gui/macosx/intf.h
+2
-0
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+10
-1
No files found.
modules/gui/macosx/MainMenu.m
View file @
7b66b72d
...
...
@@ -53,13 +53,11 @@
@interface
VLCMainMenu
()
{
BOOL
b_nib_videoeffects_loaded
;
BOOL
b_nib_bookmarks_loaded
;
BOOL
b_nib_convertandsave_loaded
;
AboutWindowController
*
_aboutWindowController
;
HelpWindowController
*
_helpWindowController
;
VLCVideoEffects
*
_videoEffectsWindowController
;
VLCConvertAndSave
*
_convertAndSaveWindowController
;
AddonsWindowController
*
_addonsController
;
...
...
@@ -1279,13 +1277,7 @@
-
(
IBAction
)
showVideoEffects
:(
id
)
sender
{
if
(
_videoEffectsWindowController
==
nil
)
_videoEffectsWindowController
=
[[
VLCVideoEffects
alloc
]
init
];
if
(
!
b_nib_videoeffects_loaded
)
b_nib_videoeffects_loaded
=
[
NSBundle
loadNibNamed
:
@"VideoEffects"
owner
:
_videoEffectsWindowController
];
[
_videoEffectsWindowController
toggleWindow
:
sender
];
[[[
VLCMain
sharedInstance
]
videoEffectsPanel
]
toggleWindow
:
sender
];
}
-
(
IBAction
)
showTrackSynchronization
:(
id
)
sender
...
...
modules/gui/macosx/VLCVoutWindowController.m
View file @
7b66b72d
...
...
@@ -589,7 +589,7 @@ void WindowClose(vout_window_t *p_wnd)
VLCMain
*
main
=
[
VLCMain
sharedInstance
];
[[
VLCMainWindow
sharedInstance
]
setWindowLevel
:
i_level
];
[[
VLCVideoEffects
sharedInstance
]
updateCocoaWindowLevel
:
currentStatusWindowLevel
];
[[
main
videoEffectsPanel
]
updateCocoaWindowLevel
:
currentStatusWindowLevel
];
[[
main
audioEffectsPanel
]
updateCocoaWindowLevel
:
currentStatusWindowLevel
];
[[
VLCInfo
sharedInstance
]
updateCocoaWindowLevel
:
currentStatusWindowLevel
];
[[
main
bookmarks
]
updateCocoaWindowLevel
:
currentStatusWindowLevel
];
...
...
modules/gui/macosx/VideoEffects.h
View file @
7b66b72d
...
...
@@ -23,10 +23,9 @@
#import <Cocoa/Cocoa.h>
@interface
VLCVideoEffects
:
NS
Object
@interface
VLCVideoEffects
:
NS
WindowController
/* generic */
@property
(
readwrite
,
weak
)
IBOutlet
NSWindow
*
window
;
@property
(
readwrite
,
weak
)
IBOutlet
NSTabView
*
tabView
;
@property
(
readwrite
,
weak
)
IBOutlet
NSPopUpButton
*
profilePopup
;
...
...
@@ -162,7 +161,6 @@
@property
(
nonatomic
)
int
posterizeValue
;
/* generic */
+
(
VLCVideoEffects
*
)
sharedInstance
;
-
(
void
)
updateCocoaWindowLevel
:(
NSInteger
)
i_level
;
-
(
void
)
saveCurrentProfile
;
...
...
modules/gui/macosx/VideoEffects.m
View file @
7b66b72d
...
...
@@ -38,18 +38,6 @@
@implementation
VLCVideoEffects
+
(
VLCVideoEffects
*
)
sharedInstance
{
static
VLCVideoEffects
*
sharedInstance
=
nil
;
static
dispatch_once_t
pred
;
dispatch_once
(
&
pred
,
^
{
sharedInstance
=
[
VLCVideoEffects
new
];
});
return
sharedInstance
;
}
+
(
void
)
initialize
{
NSDictionary
*
appDefaults
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:[
NSArray
arrayWithObject
:
@";;;0;1.000000;1.000000;1.000000;1.000000;0.050000;16;2.000000;OTA=;4;4;16711680;20;15;120;Z3JhZGllbnQ=;1;0;16711680;6;80;VkxD;-1;;-1;255;2;3;3"
],
@"VideoEffectProfiles"
,
...
...
@@ -59,17 +47,19 @@
-
(
id
)
init
{
self
=
[
super
init
];
self
=
[
super
initWithWindowNibName
:
@"VideoEffects"
];
if
(
self
)
{
i_old_profile_index
=
-
1
;
}
return
self
;
}
-
(
void
)
awakeFromNib
-
(
void
)
windowDidLoad
{
[
_
window
setTitle
:
_NS
(
"Video Effects"
)];
[
_
window
setExcludedFromWindowsMenu
:
YES
];
[
_
window
setCollectionBehavior
:
NSWindowCollectionBehaviorFullScreenAuxiliary
];
[
self
.
window
setTitle
:
_NS
(
"Video Effects"
)];
[
self
.
window
setExcludedFromWindowsMenu
:
YES
];
[
self
.
window
setCollectionBehavior
:
NSWindowCollectionBehaviorFullScreenAuxiliary
];
[[
_tabView
tabViewItemAtIndex
:[
_tabView
indexOfTabViewItemWithIdentifier
:
@"basic"
]]
setLabel
:
_NS
(
"Basic"
)];
[[
_tabView
tabViewItemAtIndex
:[
_tabView
indexOfTabViewItemWithIdentifier
:
@"crop"
]]
setLabel
:
_NS
(
"Crop"
)];
...
...
@@ -217,8 +207,8 @@
-
(
void
)
updateCocoaWindowLevel
:(
NSInteger
)
i_level
{
if
(
_window
&&
[
_window
isVisible
]
&&
[
_
window
level
]
!=
i_level
)
[
_
window
setLevel
:
i_level
];
if
(
self
.
window
&&
[
self
.
window
isVisible
]
&&
[
self
.
window
level
]
!=
i_level
)
[
self
.
window
setLevel
:
i_level
];
}
#pragma mark -
...
...
@@ -562,11 +552,11 @@
-
(
IBAction
)
toggleWindow
:(
id
)
sender
{
if
([
_
window
isKeyWindow
])
[
_
window
orderOut
:
sender
];
if
([
self
.
window
isKeyWindow
])
[
self
.
window
orderOut
:
sender
];
else
{
[
_
window
setLevel
:
[[[
VLCMain
sharedInstance
]
voutController
]
currentStatusWindowLevel
]];
[
_
window
makeKeyAndOrderFront
:
sender
];
[
self
.
window
setLevel
:
[[[
VLCMain
sharedInstance
]
voutController
]
currentStatusWindowLevel
]];
[
self
.
window
makeKeyAndOrderFront
:
sender
];
}
}
...
...
@@ -683,7 +673,7 @@
[
panel
setOKButtonLabel
:
_NS
(
"Save"
)];
[
panel
setTarget
:
self
];
[
panel
runModalForWindow
:
_
window
];
[
panel
runModalForWindow
:
self
.
window
];
}
-
(
void
)
panel
:(
VLCEnterTextPanel
*
)
panel
returnValue
:(
NSUInteger
)
value
text
:(
NSString
*
)
text
...
...
@@ -706,7 +696,7 @@
[
alert
setMessageText
:
_NS
(
"Please enter a unique name for the new profile."
)];
[
alert
setInformativeText
:
_NS
(
"Multiple profiles with the same name are not allowed."
)];
[
alert
beginSheetModalForWindow
:
_
window
[
alert
beginSheetModalForWindow
:
self
.
window
modalDelegate:
nil
didEndSelector:
nil
contextInfo:
nil
];
...
...
@@ -745,7 +735,7 @@
[
panel
setPopupButtonContent
:[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"VideoEffectProfileNames"
]];
[
panel
setTarget
:
self
];
[
panel
runModalForWindow
:
_
window
];
[
panel
runModalForWindow
:
self
.
window
];
}
-
(
void
)
panel
:(
VLCSelectItemInPopupPanel
*
)
panel
returnValue
:(
NSUInteger
)
value
item
:(
NSUInteger
)
item
...
...
modules/gui/macosx/intf.h
View file @
7b66b72d
...
...
@@ -67,6 +67,7 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
@class
VLCDebugMessageVisualizer
;
@class
VLCTrackSynchronization
;
@class
VLCAudioEffects
;
@class
VLCVideoEffects
;
@interface
VLCMain
:
NSObject
<
NSWindowDelegate
,
NSApplicationDelegate
>
{
...
...
@@ -95,6 +96,7 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
-
(
VLCTrackSynchronization
*
)
trackSyncPanel
;
-
(
VLCAudioEffects
*
)
audioEffectsPanel
;
-
(
VLCVideoEffects
*
)
videoEffectsPanel
;
-
(
void
)
setActiveVideoPlayback
:(
BOOL
)
b_value
;
-
(
BOOL
)
activeVideoPlayback
;
...
...
modules/gui/macosx/intf.m
View file @
7b66b72d
...
...
@@ -157,6 +157,7 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
VLCDebugMessageVisualizer
*
_messagePanelController
;
VLCTrackSynchronization
*
_trackSyncPanel
;
VLCAudioEffects
*
_audioEffectsPanel
;
VLCVideoEffects
*
_videoEffectsPanel
;
bool
b_intf_terminating
;
/* Makes sure applicationWillTerminate will be called only once */
}
...
...
@@ -344,7 +345,7 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
playlist_t
*
p_playlist
=
pl_Get
(
p_intf
);
/* save current video and audio profiles */
[[
VLCVideoEffects
sharedInstance
]
saveCurrentProfile
];
[[
self
videoEffectsPanel
]
saveCurrentProfile
];
[[
self
audioEffectsPanel
]
saveCurrentProfile
];
/* Save some interface state in configuration, at module quit */
...
...
@@ -544,6 +545,14 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
return
_audioEffectsPanel
;
}
-
(
VLCVideoEffects
*
)
videoEffectsPanel
{
if
(
!
_videoEffectsPanel
)
_videoEffectsPanel
=
[[
VLCVideoEffects
alloc
]
init
];
return
_videoEffectsPanel
;
}
-
(
VLCBookmarks
*
)
bookmarks
{
if
(
!
_bookmarks
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment