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
876dc9a6
Commit
876dc9a6
authored
Jun 27, 2015
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: simplify more updaters
parent
91751dbd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
32 deletions
+22
-32
modules/gui/macosx/intf.h
modules/gui/macosx/intf.h
+0
-2
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+22
-30
No files found.
modules/gui/macosx/intf.h
View file @
876dc9a6
...
...
@@ -145,8 +145,6 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
-
(
void
)
plItemUpdated
;
-
(
void
)
playbackModeUpdated
;
-
(
void
)
updateVolume
;
-
(
void
)
showMainWindow
;
-
(
void
)
showFullscreenController
;
-
(
void
)
updateTogglePlaylistState
;
...
...
modules/gui/macosx/intf.m
View file @
876dc9a6
...
...
@@ -359,22 +359,21 @@ static int PlaybackModeUpdated(vlc_object_t *p_this, const char *psz_var,
static
int
VolumeUpdated
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
new_val
,
void
*
param
)
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
[[
VLCMain
sharedInstance
]
performSelectorOnMainThread
:
@selector
(
updateVolume
)
withObject
:
nil
waitUntilDone
:
NO
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[[[
VLCMain
sharedInstance
]
mainWindow
]
updateVolumeSlider
];
});
[
o_pool
release
];
return
VLC_SUCCESS
;
}
static
int
BossCallback
(
vlc_object_t
*
p_this
,
const
char
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
new_val
,
void
*
param
)
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
[[
VLCCoreInteraction
sharedInstance
]
performSelectorOnMainThread
:
@selector
(
pause
)
withObject
:
nil
waitUntilDone
:
NO
];
[[
VLCApplication
sharedApplication
]
hide
:
nil
]
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[[
VLCCoreInteraction
sharedInstance
]
pause
];
[[
VLCApplication
sharedApplication
]
hide
:
nil
];
})
;
[
o_pool
release
];
return
VLC_SUCCESS
;
}
...
...
@@ -386,15 +385,21 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
static
int
ShowController
(
vlc_object_t
*
p_this
,
const
char
*
psz_variable
,
vlc_value_t
old_val
,
vlc_value_t
new_val
,
void
*
param
)
{
intf_thread_t
*
p_intf
=
VLCIntf
;
if
(
p_intf
)
{
playlist_t
*
p_playlist
=
pl_Get
(
p_intf
);
BOOL
b_fullscreen
=
var_GetBool
(
p_playlist
,
"fullscreen"
);
if
(
b_fullscreen
)
[[
VLCMain
sharedInstance
]
performSelectorOnMainThread
:
@selector
(
showFullscreenController
)
withObject
:
nil
waitUntilDone
:
NO
];
else
if
(
!
strcmp
(
psz_variable
,
"intf-show"
))
[[
VLCMain
sharedInstance
]
performSelectorOnMainThread
:
@selector
(
showMainWindow
)
withObject
:
nil
waitUntilDone
:
NO
];
}
dispatch_async
(
dispatch_get_main_queue
(),
^
{
intf_thread_t
*
p_intf
=
VLCIntf
;
if
(
p_intf
)
{
playlist_t
*
p_playlist
=
pl_Get
(
p_intf
);
BOOL
b_fullscreen
=
var_GetBool
(
p_playlist
,
"fullscreen"
);
if
(
b_fullscreen
)
[[
VLCMain
sharedInstance
]
showFullscreenController
];
else
if
(
!
strcmp
(
psz_variable
,
"intf-show"
))
[[[
VLCMain
sharedInstance
]
mainWindow
]
makeKeyAndOrderFront
:
nil
];
}
});
return
VLC_SUCCESS
;
}
...
...
@@ -1225,11 +1230,6 @@ static VLCMain *_o_sharedMainInstance = nil;
[
o_info
updateMetadata
];
}
-
(
void
)
showMainWindow
{
[
o_mainwindow
performSelectorOnMainThread
:
@selector
(
makeKeyAndOrderFront
:)
withObject
:
nil
waitUntilDone
:
NO
];
}
-
(
void
)
showFullscreenController
{
// defer selector here (possibly another time) to ensure that keyWindow is set properly
...
...
@@ -1237,11 +1237,6 @@ static VLCMain *_o_sharedMainInstance = nil;
[
o_mainwindow
performSelectorOnMainThread
:
@selector
(
showFullscreenController
)
withObject
:
nil
waitUntilDone
:
NO
];
}
-
(
void
)
updateVolume
{
[
o_mainwindow
updateVolumeSlider
];
}
-
(
void
)
playbackModeUpdated
{
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
...
...
@@ -1263,9 +1258,6 @@ static VLCMain *_o_sharedMainInstance = nil;
[
o_mainmenu
setShuffle
];
}
#pragma mark -
#pragma mark Window updater
-
(
void
)
setActiveVideoPlayback
:(
BOOL
)
b_value
{
assert
([
NSThread
isMainThread
]);
...
...
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