]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/qt4.cpp
Add option to disable the Qt interface notification popup.
[vlc] / modules / gui / qt4 / qt4.cpp
index a5b39cb0d14aa85f84ae826979b7c632a5060ae1..c8473464087e40cfeaea0c322f0f120082302309 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifndef WIN32
-#   include <signal.h>
-#   include <QStyle>
-#endif
-
 #include <QApplication>
 
 #include "qt4.hpp"
@@ -74,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" \
@@ -113,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",
@@ -204,8 +206,10 @@ static void Init( intf_thread_t *p_intf )
     p_intf->p_sys->p_app = app;
 
 #ifndef WIN32
-/* that forces the execution of QCleanlooksStylePrivate::lookupIconTheme() */
-    app->style()->standardIcon( QStyle::SP_TitleBarMenuButton );
+    /* kludge:
+     * forces plastique style as cleanlooks bugs on gnome */
+    QPlastiqueStyle *plastique = new QPlastiqueStyle;
+    app->setStyle( plastique );
 #endif
 
     // Initialize timers