[vlc-devel] [PATCH] Rename "intf-show" variable

Jean-Baptiste Kempf jb at videolan.org
Sun Oct 2 22:48:55 CEST 2011


At some point in the past, this might have mean something else, but now,
it is implemented as a "Show Fullscreen Controller", in Qt4 and OSX.
This change reflects this fact.
---
 modules/control/hotkeys.c          |    4 ++--
 modules/gui/macosx/intf.m          |    2 +-
 modules/gui/qt4/main_interface.cpp |    6 +++---
 src/config/keys.c                  |    2 +-
 src/libvlc-module.c                |    2 +-
 src/libvlc.c                       |    4 ++--
 src/video_output/event.h           |    2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 9919bba..b182d30 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -219,11 +219,11 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
 
         /* Interface showing */
         case ACTIONID_INTF_SHOW:
-            var_SetBool( p_intf->p_libvlc, "intf-show", true );
+            var_SetBool( p_intf->p_libvlc, "intf-show-fscontrol", true );
             break;
 
         case ACTIONID_INTF_HIDE:
-            var_SetBool( p_intf->p_libvlc, "intf-show", false );
+            var_SetBool( p_intf->p_libvlc, "intf-show-fscontrol", false );
             break;
 
         case ACTIONID_INTF_BOSS:
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 76ef502..1c3a366 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -558,7 +558,7 @@ static VLCMain *_o_sharedMainInstance = nil;
     val.b_bool = false;
 
     var_AddCallback( p_playlist, "fullscreen", FullscreenChanged, self);
-    var_AddCallback( p_intf->p_libvlc, "intf-show", ShowController, self);
+    var_AddCallback( p_intf->p_libvlc, "intf-show-fscontrol", ShowController, self);
 //    var_AddCallback(p_playlist, "item-change", PLItemChanged, self);
     var_AddCallback(p_playlist, "item-current", PLItemChanged, self);
     var_AddCallback(p_playlist, "activity", PLItemChanged, self);
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 47be473..2a47ba9 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -228,7 +228,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     /************
      * Callbacks
      ************/
-    var_AddCallback( p_intf->p_libvlc, "intf-show", IntfShowCB, p_intf );
+    var_AddCallback( p_intf->p_libvlc, "intf-show-fscontrol", IntfShowCB, p_intf );
     var_AddCallback( p_intf->p_libvlc, "intf-boss", IntfBossCB, p_intf );
 
     /* Register callback for the intf-popupmenu variable */
@@ -315,7 +315,7 @@ MainInterface::~MainInterface()
 
     /* Unregister callbacks */
     var_DelCallback( p_intf->p_libvlc, "intf-boss", IntfBossCB, p_intf );
-    var_DelCallback( p_intf->p_libvlc, "intf-show", IntfShowCB, p_intf );
+    var_DelCallback( p_intf->p_libvlc, "intf-show-fscontrol", IntfShowCB, p_intf );
     var_DelCallback( p_intf->p_libvlc, "intf-popupmenu", PopupMenuCB, p_intf );
 
     p_intf->p_sys->p_mi = NULL;
@@ -1321,7 +1321,7 @@ static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
 }
 
 /*****************************************************************************
- * IntfShowCB: callback triggered by the intf-show libvlc variable.
+ * IntfShowCB: callback triggered by the intf-show-fscontrol libvlc variable.
  *****************************************************************************/
 static int IntfShowCB( vlc_object_t *p_this, const char *psz_variable,
                        vlc_value_t old_val, vlc_value_t new_val, void *param )
diff --git a/src/config/keys.c b/src/config/keys.c
index dd91d51..87bd5c4 100644
--- a/src/config/keys.c
+++ b/src/config/keys.c
@@ -256,7 +256,7 @@ static const struct action actions[] =
     { "incr-scalefactor", ACTIONID_SCALE_UP, },
     { "intf-boss", ACTIONID_INTF_BOSS, },
     { "intf-hide", ACTIONID_INTF_HIDE, },
-    { "intf-show", ACTIONID_INTF_SHOW, },
+    { "intf-show-fscontrol", ACTIONID_INTF_SHOW, },
     { "jump+extrashort", ACTIONID_JUMP_FORWARD_EXTRASHORT, },
     { "jump+long", ACTIONID_JUMP_FORWARD_LONG, },
     { "jump+medium", ACTIONID_JUMP_FORWARD_MEDIUM, },
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 3724bbc..9f4cebb 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -2600,7 +2600,7 @@ vlc_module_begin ()
              SCALE_DOWN_KEY_TEXT, SCALE_DOWN_KEY_LONGTEXT, false )
     add_key( "key-deinterlace", KEY_DEINTERLACE,
              DEINTERLACE_KEY_TEXT, DEINTERLACE_KEY_LONGTEXT, false )
-    add_key( "key-intf-show", KEY_INTF_SHOW,
+    add_key( "key-intf-show-fscontrol", KEY_INTF_SHOW,
              INTF_SHOW_KEY_TEXT, INTF_SHOW_KEY_LONGTEXT, true )
     add_key( "key-intf-hide", KEY_INTF_HIDE,
              INTF_HIDE_KEY_TEXT, INTF_HIDE_KEY_LONGTEXT, true )
diff --git a/src/libvlc.c b/src/libvlc.c
index fc0e65c..48303ab 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -530,8 +530,8 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     priv->actions = vlc_InitActions( p_libvlc );
 
     /* Create a variable for showing the fullscreen interface */
-    var_Create( p_libvlc, "intf-show", VLC_VAR_BOOL );
-    var_SetBool( p_libvlc, "intf-show", true );
+    var_Create( p_libvlc, "intf-show-fscontrol", VLC_VAR_BOOL );
+    var_SetBool( p_libvlc, "intf-show-fscontrol", true );
 
     /* Create a variable for the Boss Key */
     var_Create( p_libvlc, "intf-boss", VLC_VAR_VOID );
diff --git a/src/video_output/event.h b/src/video_output/event.h
index a6397a3..8f2ce15 100644
--- a/src/video_output/event.h
+++ b/src/video_output/event.h
@@ -71,7 +71,7 @@ static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button)
         return;
     }
     case MOUSE_BUTTON_CENTER:
-        var_ToggleBool(vout->p_libvlc, "intf-show");
+        var_ToggleBool(vout->p_libvlc, "intf-show-fscontrol");
         return;
     case MOUSE_BUTTON_RIGHT:
         var_SetBool(vout->p_libvlc, "intf-popupmenu", true);
-- 
1.7.7.rc1




More information about the vlc-devel mailing list