]> git.sesse.net Git - vlc/commitdiff
Qt4: cache var_InheritBool on Win32
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 20 Mar 2011 14:16:41 +0000 (15:16 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 20 Mar 2011 14:17:56 +0000 (15:17 +0100)
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface_win32.cpp
modules/gui/qt4/qt4.hpp

index 52015b3c2322f52024b1865bf17ee09e041d4023..fc3544d8e7cb1abc107bdc9e8ebe003df27a28d8 100644 (file)
@@ -122,6 +122,11 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     settings = getSettings();
     settings->beginGroup( "MainWindow" );
 
+#ifdef WIN32
+    /* Volume keys */
+    p_intf->p_sys->disable_volume_keys = var_InheritBool( p_intf, "qt-disable-volume-keys" );
+#endif
+
     /* */
     b_plDocked = getSettings()->value( "pl-dock-status", true ).toBool();
 
index 9fc67a9503fc786050958d2d9ef0e535e1916063..be670ce836ae0daf6e0dce7eb3ee72792397d9f2 100644 (file)
@@ -183,8 +183,7 @@ bool MainInterface::winEvent ( MSG * msg, long * result )
         case WM_APPCOMMAND:
             cmd = GET_APPCOMMAND_LPARAM(msg->lParam);
 
-            bool disable_volume_keys = var_InheritBool( p_intf, "qt-disable-volume-keys" );
-            if( disable_volume_keys &&
+            if( p_intf->p_sys->disable_volume_keys &&
                     (   cmd == APPCOMMAND_VOLUME_DOWN   ||
                         cmd == APPCOMMAND_VOLUME_UP     ||
                         cmd == APPCOMMAND_VOLUME_MUTE ) )
index 918986e987197a4833550f78ff3bee505ad9c544..366115da8e4902dc9c5bab58a5e0d20bd8e8d652 100644 (file)
@@ -74,6 +74,9 @@ struct intf_sys_t
 
     QString filepath;        /* Last path used in dialogs */
 
+#ifdef WIN32
+    bool disable_volume_keys;
+#endif
 };
 
 #define THEPL pl_Get(p_intf)