Commit c7438b1e authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4: cache var_InheritBool on Win32

parent 2a93fde7
...@@ -122,6 +122,11 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -122,6 +122,11 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
settings = getSettings(); settings = getSettings();
settings->beginGroup( "MainWindow" ); 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(); b_plDocked = getSettings()->value( "pl-dock-status", true ).toBool();
......
...@@ -183,8 +183,7 @@ bool MainInterface::winEvent ( MSG * msg, long * result ) ...@@ -183,8 +183,7 @@ bool MainInterface::winEvent ( MSG * msg, long * result )
case WM_APPCOMMAND: case WM_APPCOMMAND:
cmd = GET_APPCOMMAND_LPARAM(msg->lParam); cmd = GET_APPCOMMAND_LPARAM(msg->lParam);
bool disable_volume_keys = var_InheritBool( p_intf, "qt-disable-volume-keys" ); if( p_intf->p_sys->disable_volume_keys &&
if( disable_volume_keys &&
( cmd == APPCOMMAND_VOLUME_DOWN || ( cmd == APPCOMMAND_VOLUME_DOWN ||
cmd == APPCOMMAND_VOLUME_UP || cmd == APPCOMMAND_VOLUME_UP ||
cmd == APPCOMMAND_VOLUME_MUTE ) ) cmd == APPCOMMAND_VOLUME_MUTE ) )
......
...@@ -74,6 +74,9 @@ struct intf_sys_t ...@@ -74,6 +74,9 @@ struct intf_sys_t
QString filepath; /* Last path used in dialogs */ QString filepath; /* Last path used in dialogs */
#ifdef WIN32
bool disable_volume_keys;
#endif
}; };
#define THEPL pl_Get(p_intf) #define THEPL pl_Get(p_intf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment