]> git.sesse.net Git - vlc/commitdiff
qt4: Make the name in the title an option
authorChristophe Mutricy <xtophe@videolan.org>
Thu, 10 May 2007 22:52:19 +0000 (22:52 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Thu, 10 May 2007 22:52:19 +0000 (22:52 +0000)
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/qt4.cpp

index b1a690973da55746fa004c8e519305c10c0f75ea..22679fe44d70c6b077db2bfd2bae0e3bd99c7212 100644 (file)
@@ -129,8 +129,11 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
              slider, setPosition( float,int, int ) );
     CONNECT( THEMIM->getIM(), positionUpdated( float, int, int ),
              this, setDisplay( float, int, int ) );
-    CONNECT( THEMIM->getIM(), nameChanged( QString ), this,
-                                                        setName( QString ) );
+    if( config_GetInt( p_intf, "qt-name-in-title" ) )
+    {
+        CONNECT( THEMIM->getIM(), nameChanged( QString ), this,
+                 setName( QString ) );
+    }
     CONNECT( THEMIM->getIM(), statusChanged( int ), this, setStatus( int ) );
     CONNECT( THEMIM->getIM(), statusChanged( int ), this,
              updateSystrayMenu( int ) );
index 02b1cd5d23c8b39759e4bea7c7d27188aadf1eca..3cef64411d8f0aae19062bdaf627089fee5c833b 100644 (file)
@@ -58,6 +58,10 @@ static void ShowDialog   ( intf_thread_t *, int, int, intf_dialog_args_t * );
                             "VLC will start just with an icon in" \
                             "your taskbar")
 
+#define TITLE_TEXT N_("Show playing item name in window title")
+#define TITLE_LONGTEXT N_("Show the name of the song or video in the " \
+                          "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")
 
@@ -83,6 +87,8 @@ vlc_module_begin();
                 SYSTRAY_LONGTEXT, VLC_FALSE);
         add_bool( "qt-start-mininimized", VLC_FALSE, NULL, MINIMIZED_TEXT,
                 MINIMIZED_LONGTEXT, VLC_TRUE);
+        add_bool( "qt-name-in-title", VLC_TRUE, NULL, TITLE_TEXT, 
+                  TITLE_LONGTEXT, VLC_FALSE );
         add_string( "qt-filedialog-path", NULL, NULL, FILEDIALOG_PATH_TEXT,
                 FILEDIALOG_PATH_LONGTEXT, VLC_TRUE);
             change_autosave();