vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Thu May 31 19:12:32 2018 +0300| [4c1816844ebed75d6c46b840f17cb0d413cd6ad7] | committer: Rémi Denis-Courmont
playlist: move intf-show and make it void > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4c1816844ebed75d6c46b840f17cb0d413cd6ad7 --- modules/control/dbus/dbus_root.c | 2 +- modules/gui/macosx/VLCMain.m | 4 ++-- modules/gui/qt/main_interface.cpp | 4 ++-- src/libvlc.c | 3 --- src/playlist/engine.c | 4 ++++ 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/control/dbus/dbus_root.c b/modules/control/dbus/dbus_root.c index 9ff59ba4e1..8ac2f6132b 100644 --- a/modules/control/dbus/dbus_root.c +++ b/modules/control/dbus/dbus_root.c @@ -268,7 +268,7 @@ DBUS_METHOD( Quit ) DBUS_METHOD( Raise ) {/* shows vlc's main window */ REPLY_INIT; - var_ToggleBool( INTF->obj.libvlc, "intf-show" ); + var_TriggerCallback( pl_Get(INTF), "intf-show" ); REPLY_SEND; } diff --git a/modules/gui/macosx/VLCMain.m b/modules/gui/macosx/VLCMain.m index 7d8af27f60..3e85430bcc 100644 --- a/modules/gui/macosx/VLCMain.m +++ b/modules/gui/macosx/VLCMain.m @@ -237,7 +237,7 @@ static VLCMain *sharedInstance = nil; _mainWindowController = [[NSWindowController alloc] initWithWindowNibName:@"MainWindow"]; var_AddCallback(p_intf->obj.libvlc, "intf-toggle-fscontrol", ShowController, (__bridge void *)self); - var_AddCallback(p_intf->obj.libvlc, "intf-show", ShowController, (__bridge void *)self); + var_AddCallback(pl_Get(p_intf), "intf-show", ShowController, (__bridge void *)self); // Load them here already to apply stored profiles _videoEffectsPanel = [[VLCVideoEffectsWindowController alloc] init]; @@ -345,7 +345,7 @@ static VLCMain *sharedInstance = nil; config_PutInt("repeat", var_GetBool(p_playlist, "repeat")); var_DelCallback(p_intf->obj.libvlc, "intf-toggle-fscontrol", ShowController, (__bridge void *)self); - var_DelCallback(p_intf->obj.libvlc, "intf-show", ShowController, (__bridge void *)self); + var_DelCallback(pl_Get(p_intf), "intf-show", ShowController, (__bridge void *)self); [[NSNotificationCenter defaultCenter] removeObserver: self]; diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp index 6d141dac91..536549da5e 100644 --- a/modules/gui/qt/main_interface.cpp +++ b/modules/gui/qt/main_interface.cpp @@ -242,7 +242,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ************/ var_AddCallback( p_intf->obj.libvlc, "intf-toggle-fscontrol", IntfShowCB, p_intf ); var_AddCallback( p_intf->obj.libvlc, "intf-boss", IntfBossCB, p_intf ); - var_AddCallback( p_intf->obj.libvlc, "intf-show", IntfRaiseMainCB, p_intf ); + var_AddCallback( pl_Get(p_intf), "intf-show", IntfRaiseMainCB, p_intf ); /* Register callback for the intf-popupmenu variable */ var_AddCallback( p_intf->obj.libvlc, "intf-popupmenu", PopupMenuCB, p_intf ); @@ -302,7 +302,7 @@ MainInterface::~MainInterface() /* Unregister callbacks */ var_DelCallback( p_intf->obj.libvlc, "intf-boss", IntfBossCB, p_intf ); - var_DelCallback( p_intf->obj.libvlc, "intf-show", IntfRaiseMainCB, p_intf ); + var_DelCallback( pl_Get(p_intf), "intf-show", IntfRaiseMainCB, p_intf ); var_DelCallback( p_intf->obj.libvlc, "intf-toggle-fscontrol", IntfShowCB, p_intf ); var_DelCallback( p_intf->obj.libvlc, "intf-popupmenu", PopupMenuCB, p_intf ); diff --git a/src/libvlc.c b/src/libvlc.c index 8907df645e..3641280117 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -242,9 +242,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, /* Create a variable for the Boss Key */ var_Create( p_libvlc, "intf-boss", VLC_VAR_VOID ); - /* Create a variable for showing the main interface */ - var_Create( p_libvlc, "intf-show", VLC_VAR_BOOL ); - /* Create a variable for showing the right click menu */ var_Create( p_libvlc, "intf-popupmenu", VLC_VAR_BOOL ); diff --git a/src/playlist/engine.c b/src/playlist/engine.c index 7302a2ef1b..8ed3d55393 100644 --- a/src/playlist/engine.c +++ b/src/playlist/engine.c @@ -469,6 +469,10 @@ static void VariablesInit( playlist_t *p_playlist ) var_Create( p_playlist, "sub-text-scale", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND ); + + /* Callbacks between interfaces */ + /* Create a variable for showing the main interface */ + var_Create( p_playlist, "intf-show", VLC_VAR_VOID ); } playlist_item_t * playlist_CurrentPlayingItem( playlist_t * p_playlist ) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
