]> git.sesse.net Git - vlc/commitdiff
Add option to disable the Qt interface notification popup.
authorAntoine Cellerier <dionoea@videolan.org>
Sun, 2 Sep 2007 12:50:41 +0000 (12:50 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sun, 2 Sep 2007 12:50:41 +0000 (12:50 +0000)
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/qt4.cpp

index 36c0b033a9536addbca09dcc11562a54d6fcd67e..014c872be4d6cf53a0691bfaaef9f69a6ba7ca4f 100644 (file)
@@ -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 );
+        }
     }
 }
 
index 456cdcc12058418cc4b6ba0e5b8d0046fec4fa8f..c0bd121180f7f03c8ab4029257b295404612fac1 100644 (file)
@@ -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
index 581aa04a12e7bfafd59164a4f0731cd9553907eb..c8473464087e40cfeaea0c322f0f120082302309 100644 (file)
@@ -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",