Commit a34179cc authored by Antoine Cellerier's avatar Antoine Cellerier

Add option to disable the Qt interface notification popup.

parent 967ecaa2
......@@ -112,9 +112,10 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
alwaysVideoFlag = true;
/* Set the other interface settings */
playlistEmbeddedFlag = settings->value("playlist-embedded", true).toBool();
visualSelectorEnabled= settings->value( "visual-selector", false ).toBool();
playlistEmbeddedFlag = settings->value( "playlist-embedded", true).toBool();
visualSelectorEnabled = settings->value( "visual-selector", false ).toBool();
notificationEnabled = config_GetInt( p_intf, "qt-notification" )
? true : false;
/**************************
* UI and Widgets design
**************************/
......@@ -789,8 +790,11 @@ void MainInterface::updateSystrayTooltipName( QString name )
else
{
sysTray->setToolTip( name );
sysTray->showMessage( qtr( "VLC media player" ), name,
QSystemTrayIcon::NoIcon, 4000 );
if( notificationEnabled )
{
sysTray->showMessage( qtr( "VLC media player" ), name,
QSystemTrayIcon::NoIcon, 4000 );
}
}
}
......
......@@ -105,6 +105,7 @@ private:
bool videoEmbeddedFlag;
bool alwaysVideoFlag;
bool visualSelectorEnabled;
bool notificationEnabled;
InputManager *main_input_manager;
input_thread_t *p_input; ///< Main input associated to the playlist
......
......@@ -69,7 +69,12 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
"controler window title")
#define FILEDIALOG_PATH_TEXT N_("Path to use in file dialog")
#define FILEDIALOG_PATH_LONGTEXT N_("path to use in file dialog")
#define FILEDIALOG_PATH_LONGTEXT N_("Path to use in file dialog")
#define NOTIFICATION_TEXT N_("Show notification popup on track change")
#define NOTIFICATION_LONGTEXT N_( \
"Show a notification popup with the artist and track name when " \
"the current playlist item changes." )
#define ADVANCED_OPTIONS_TEXT N_("Advanced options")
#define ADVANCED_OPTIONS_LONGTEXT N_("Activate by default all the" \
......@@ -108,6 +113,8 @@ vlc_module_begin();
FILEDIALOG_PATH_LONGTEXT, VLC_TRUE);
change_autosave();
change_internal();
add_bool( "qt-notification", VLC_TRUE, NULL, NOTIFICATION_TEXT,
NOTIFICATION_LONGTEXT, VLC_FALSE );
add_bool( "qt-adv-options", VLC_FALSE, NULL, ADVANCED_OPTIONS_TEXT,
ADVANCED_OPTIONS_LONGTEXT, VLC_TRUE );
add_integer( "qt-pl-showflags",
......
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