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
548807de
Commit
548807de
authored
Aug 02, 2015
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: Convert VLCTrackSync to NSWindowController subclass, remove singleton
parent
c95d33f9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
31 deletions
+30
-31
modules/gui/macosx/InputManager.m
modules/gui/macosx/InputManager.m
+1
-1
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+1
-9
modules/gui/macosx/TrackSynchronization.h
modules/gui/macosx/TrackSynchronization.h
+1
-3
modules/gui/macosx/TrackSynchronization.m
modules/gui/macosx/TrackSynchronization.m
+14
-17
modules/gui/macosx/VLCVoutWindowController.m
modules/gui/macosx/VLCVoutWindowController.m
+1
-1
modules/gui/macosx/intf.h
modules/gui/macosx/intf.h
+3
-0
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+9
-0
No files found.
modules/gui/macosx/InputManager.m
View file @
548807de
...
...
@@ -419,7 +419,7 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
-
(
void
)
updateDelays
{
[[
VLCTrackSynchronization
sharedInstance
]
updateValues
];
[[
[
VLCMain
sharedInstance
]
trackSyncPanel
]
updateValues
];
}
-
(
void
)
updateMainMenu
...
...
modules/gui/macosx/MainMenu.m
View file @
548807de
...
...
@@ -55,7 +55,6 @@
{
BOOL
b_nib_videoeffects_loaded
;
BOOL
b_nib_audioeffects_loaded
;
BOOL
b_nib_tracksynchrloaded
;
BOOL
b_nib_bookmarks_loaded
;
BOOL
b_nib_convertandsave_loaded
;
...
...
@@ -63,7 +62,6 @@
HelpWindowController
*
_helpWindowController
;
VLCVideoEffects
*
_videoEffectsWindowController
;
VLCAudioEffects
*
_audioEffectsWindowController
;
VLCTrackSynchronization
*
_trackSynchronizationWindowController
;
VLCConvertAndSave
*
_convertAndSaveWindowController
;
AddonsWindowController
*
_addonsController
;
...
...
@@ -1294,13 +1292,7 @@
-
(
IBAction
)
showTrackSynchronization
:(
id
)
sender
{
if
(
!
_trackSynchronizationWindowController
)
_trackSynchronizationWindowController
=
[[
VLCTrackSynchronization
alloc
]
init
];
if
(
!
b_nib_tracksynchrloaded
)
b_nib_tracksynchrloaded
=
[
NSBundle
loadNibNamed
:
@"SyncTracks"
owner
:
_trackSynchronizationWindowController
];
[
_trackSynchronizationWindowController
toggleWindow
:
sender
];
[[[
VLCMain
sharedInstance
]
trackSyncPanel
]
toggleWindow
:
sender
];
}
-
(
IBAction
)
showAudioEffects
:(
id
)
sender
...
...
modules/gui/macosx/TrackSynchronization.h
View file @
548807de
...
...
@@ -24,10 +24,9 @@
#import <Cocoa/Cocoa.h>
@interface
VLCTrackSynchronization
:
NS
Object
@interface
VLCTrackSynchronization
:
NS
WindowController
/* generic */
@property
(
readwrite
,
weak
)
IBOutlet
NSWindow
*
window
;
@property
(
readwrite
,
weak
)
IBOutlet
NSButton
*
resetButton
;
/* Audio / Video */
...
...
@@ -48,7 +47,6 @@
@property
(
readwrite
,
weak
)
IBOutlet
NSTextField
*
sv_durTextField
;
@property
(
readwrite
,
weak
)
IBOutlet
NSStepper
*
sv_durStepper
;
+
(
VLCTrackSynchronization
*
)
sharedInstance
;
-
(
void
)
updateCocoaWindowLevel
:(
NSInteger
)
i_level
;
-
(
IBAction
)
toggleWindow
:(
id
)
sender
;
...
...
modules/gui/macosx/TrackSynchronization.m
View file @
548807de
...
...
@@ -36,21 +36,16 @@
@implementation
VLCTrackSynchronization
+
(
VLCTrackSynchronization
*
)
sharedInstance
-
(
id
)
init
{
static
VLCTrackSynchronization
*
sharedInstance
=
nil
;
static
dispatch_once_t
pred
;
self
=
[
super
initWithWindowNibName
:
@"SyncTracks"
];
dispatch_once
(
&
pred
,
^
{
sharedInstance
=
[
VLCTrackSynchronization
new
];
});
return
sharedInstance
;
return
self
;
}
-
(
void
)
awakeFromNib
-
(
void
)
windowDidLoad
{
[
_
window
setTitle
:
_NS
(
"Track Synchronization"
)];
[
self
.
window
setTitle
:
_NS
(
"Track Synchronization"
)];
[
_resetButton
setTitle
:
_NS
(
"Reset"
)];
[
_avLabel
setStringValue
:
_NS
(
"Audio/Video"
)];
[
_av_advanceLabel
setStringValue
:
_NS
(
"Audio track synchronization:"
)];
...
...
@@ -86,24 +81,26 @@
[[
_sv_durTextField
formatter
]
setFormat
:[
NSString
stringWithFormat
:
@"#,##0.000%@"
,
o_suffix
]];
[
_sv_durTextField
setToolTip
:
o_toolTip
];
[
_
window
setCollectionBehavior
:
NSWindowCollectionBehaviorFullScreenAuxiliary
];
[
self
.
window
setCollectionBehavior
:
NSWindowCollectionBehaviorFullScreenAuxiliary
];
[
self
resetValues
:
self
];
}
-
(
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
];
}
-
(
IBAction
)
toggleWindow
:(
id
)
sender
{
if
([
_
window
isVisible
])
[
_
window
orderOut
:
sender
];
if
([
self
.
window
isVisible
])
[
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
];
[
self
updateValues
];
}
}
...
...
modules/gui/macosx/VLCVoutWindowController.m
View file @
548807de
...
...
@@ -593,7 +593,7 @@ void WindowClose(vout_window_t *p_wnd)
[[
VLCAudioEffects
sharedInstance
]
updateCocoaWindowLevel
:
currentStatusWindowLevel
];
[[
VLCInfo
sharedInstance
]
updateCocoaWindowLevel
:
currentStatusWindowLevel
];
[[
main
bookmarks
]
updateCocoaWindowLevel
:
currentStatusWindowLevel
];
[[
VLCTrackSynchronization
sharedInstance
]
updateCocoaWindowLevel
:
currentStatusWindowLevel
];
[[
main
trackSyncPanel
]
updateCocoaWindowLevel
:
currentStatusWindowLevel
];
[[
main
resumeDialog
]
updateCocoaWindowLevel
:
currentStatusWindowLevel
];
}
...
...
modules/gui/macosx/intf.h
View file @
548807de
...
...
@@ -65,6 +65,7 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
@class
VLCBookmarks
;
@class
VLCOpen
;
@class
VLCDebugMessageVisualizer
;
@class
VLCTrackSynchronization
;
@interface
VLCMain
:
NSObject
<
NSWindowDelegate
,
NSApplicationDelegate
>
{
...
...
@@ -91,6 +92,8 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
-
(
VLCInputManager
*
)
inputManager
;
-
(
VLCDebugMessageVisualizer
*
)
debugMsgPanel
;
-
(
VLCTrackSynchronization
*
)
trackSyncPanel
;
-
(
void
)
setActiveVideoPlayback
:(
BOOL
)
b_value
;
-
(
BOOL
)
activeVideoPlayback
;
-
(
void
)
applicationWillTerminate
:(
NSNotification
*
)
notification
;
...
...
modules/gui/macosx/intf.m
View file @
548807de
...
...
@@ -155,6 +155,7 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
VLCInputManager
*
_input_manager
;
VLCPlaylist
*
_playlist
;
VLCDebugMessageVisualizer
*
_messagePanelController
;
VLCTrackSynchronization
*
_trackSyncPanel
;
bool
b_intf_terminating
;
/* Makes sure applicationWillTerminate will be called only once */
}
...
...
@@ -526,6 +527,14 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
return
_messagePanelController
;
}
-
(
VLCTrackSynchronization
*
)
trackSyncPanel
{
if
(
!
_trackSyncPanel
)
_trackSyncPanel
=
[[
VLCTrackSynchronization
alloc
]
init
];
return
_trackSyncPanel
;
}
-
(
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