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

Qt: reload some preferences live

Close #3148
parent bc195211
......@@ -33,6 +33,7 @@
#include "components/complete_preferences.hpp"
#include "components/simple_preferences.hpp"
#include "util/searchlineedit.hpp"
#include "main_interface.hpp"
#include <QHBoxLayout>
#include <QGroupBox>
......@@ -318,6 +319,9 @@ void PrefsDialog::save()
ErrorsDialog::getInstance (p_intf)->addError( qtr( "Cannot save Configuration" ),
qtr("Preferences file could not be saved") );
}
if( p_intf->p_sys->p_mi )
p_intf->p_sys->p_mi->reloadPrefs();
accept();
}
......
......@@ -121,6 +121,7 @@ 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 */
......@@ -376,6 +377,20 @@ void MainInterface::recreateToolbars()
settings->endGroup();
}
void MainInterface::reloadPrefs()
{
b_notificationEnabled = var_InheritBool( p_intf, "qt-notification" );
b_pauseOnMinimize = var_InheritBool( p_intf, "qt-pause-minimized" );
#ifdef WIN32
p_intf->p_sys->disable_volume_keys = var_InheritBool( p_intf, "qt-disable-volume-keys" );
#endif
if( !var_InheritBool( p_intf, "qt-fs-controller" ) && fullscreenControls )
{
delete fullscreenControls;
fullscreenControls = NULL;
}
}
void MainInterface::createMainWidget( QSettings *settings )
{
/* Create the main Widget and the mainLayout */
......
......@@ -206,6 +206,8 @@ public slots:
void emitBoss();
void reloadPrefs();
private slots:
void debug();
void destroyPopupMenu();
......
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