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