]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/qt4.cpp
QT4: fix warning on already assigned hotkey
[vlc] / modules / gui / qt4 / qt4.cpp
index b784ffb633ccc2946e07a817e26c803f1e4fcbc8..5048f7483513857411c6660a87a03475d19b80c1 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,12 +69,23 @@ 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 if VLC is not visible")
+#define NOTIFICATION_LONGTEXT N_( \
+    "Show a notification popup with the artist and track name when " \
+    "the current playlist item changes, when VLC is minimized or hidden." )
 
 #define ADVANCED_OPTIONS_TEXT N_("Advanced options")
 #define ADVANCED_OPTIONS_LONGTEXT N_("Activate by default all the" \
                                      "advanced options for geeks")
 
+#define OPACITY_TEXT N_("Windows opacity between 0.1 and 1.")
+#define OPACITY_LONGTEXT N_("Sets the windows opacity between 0.1 and 1 " \
+                            "for main interface, playlist and extended panel." \
+                            "This options only works with Windows and " \
+                            "X11 with composite extensions.")
+
 #define SHOWFLAGS_TEXT N_("Define what columns to show in playlist window")
 #define SHOWFLAGS_LONGTEXT N_("Enter the sum of the options that you want: \n" \
             "Title: 1; Duration: 2; Artist: 4; Genre: 8; " \
@@ -113,6 +119,10 @@ 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_float_with_range( "qt-opacity", 1., 0.1, 1., NULL, OPACITY_TEXT,
+                  OPACITY_LONGTEXT, VLC_FALSE );
         add_bool( "qt-adv-options", VLC_FALSE, NULL, ADVANCED_OPTIONS_TEXT,
                   ADVANCED_OPTIONS_LONGTEXT, VLC_TRUE );
         add_integer( "qt-pl-showflags",
@@ -199,27 +209,16 @@ static void Init( intf_thread_t *p_intf )
     int argc = 1;
 
     Q_INIT_RESOURCE( vlc );
+#ifndef WIN32
+    /* KLUDGE:
+     * disables icon theme use because that makes cleanlook style bug
+     * see commits 21610 21622 21654 for reference */
+    QApplication::setDesktopSettingsAware(false);
+#endif
     QApplication *app = new QApplication( argc, argv , true );
     app->setWindowIcon( QIcon( QPixmap(vlc_xpm) ) );
     p_intf->p_sys->p_app = app;
 
-#ifndef WIN32
-/* Ugly klugde 
- * Remove SIGCHLD from the ignored signal the time to initialise 
- * Qt because it executes gconftool-2 to get the icon theme when using 
- * cleanlooks theme. */ 
-    sigset_t set;
-
-    sigemptyset( &set );
-    sigaddset( &set, SIGCHLD );
-    pthread_sigmask( SIG_UNBLOCK, &set, NULL );
-
-/* that forces the execution of QCleanlooksStylePrivate::lookupIconTheme() */
-    app->style()->standardIcon( QStyle::SP_TitleBarMenuButton );
-
-    pthread_sigmask( SIG_BLOCK, &set, NULL );
-#endif
-
     // Initialize timers
     DialogsProvider::getInstance( p_intf );