From 1a5ed68bcdfccb6bfc51c3a7cfc4732e7a9fbad3 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Mon, 26 Sep 2011 00:41:05 +0200 Subject: [PATCH] Qt: cache some config variables --- 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 193bf7f514..c5623068b9 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 cfac21f77e..59389fa501 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 ? -- 2.39.2