[vlc-commits] Qt: cache some config variables
Jean-Baptiste Kempf
git at videolan.org
Mon Sep 26 00:42:18 CEST 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Sep 26 00:41:05 2011 +0200| [1a5ed68bcdfccb6bfc51c3a7cfc4732e7a9fbad3] | committer: Jean-Baptiste Kempf
Qt: cache some config variables
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1a5ed68bcdfccb6bfc51c3a7cfc4732e7a9fbad3
---
modules/gui/qt4/main_interface.cpp | 7 ++++---
modules/gui/qt4/main_interface.hpp | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 193bf7f..c562306 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -121,6 +121,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/* Do we want anoying popups or not */
b_notificationEnabled = var_InheritBool( p_intf, "qt-notification" );
+ b_pauseOnMinimize = var_InheritBool( p_intf, "qt-pause-minimized" );
+
/* Set the other interface settings */
settings = getSettings();
settings->beginGroup( "MainWindow" );
@@ -1128,9 +1130,8 @@ void MainInterface::changeEvent(QEvent *event)
b_hasPausedWhenMinimized = false;
if( THEMIM->getIM()->playingStatus() == PLAYING_S &&
- THEMIM->getIM()->hasVideo() &&
- !THEMIM->getIM()->hasVisualisation() &&
- var_InheritBool( p_intf, "qt-pause-minimized" ) )
+ THEMIM->getIM()->hasVideo() && !THEMIM->getIM()->hasVisualisation() &&
+ b_pauseOnMinimize )
{
b_hasPausedWhenMinimized = true;
THEMIM->pause();
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index cfac21f..59389fa 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -161,6 +161,7 @@ private:
bool b_hideAfterCreation;
bool b_minimalView; ///< Minimal video
bool b_interfaceFullScreen;
+ bool b_pauseOnMinimize;
/* States */
bool playlistVisible; ///< Is the playlist visible ?
More information about the vlc-commits
mailing list