]> git.sesse.net Git - vlc/commitdiff
Forgotten tooltips.
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 29 Jul 2008 18:15:50 +0000 (11:15 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 29 Jul 2008 18:16:49 +0000 (11:16 -0700)
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/dialogs/mediainfo.cpp
modules/gui/qt4/dialogs/podcast_configuration.cpp
modules/gui/qt4/dialogs/preferences.cpp
modules/gui/qt4/ui/open.ui
modules/gui/qt4/ui/open_disk.ui

index fb724d3d41dc7ece3e4588c578f3d67e8eab08d5..8f9596e159adcf5a881a8f4794d1d1084c5b1a42 100644 (file)
@@ -56,6 +56,8 @@
 
 #include <math.h>
 
+#define I_PLAY_TOOLTIP "Play\nIf the playlist is empty, open a media"
+
 /**********************************************************************
  * Video Widget. A simple frame on which video is drawn
  * This class handles resize issues
@@ -303,11 +305,12 @@ AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i ) :
     advLayout->setAlignment( Qt::AlignBottom );
 
     /* A to B Button */
-    ABButton = new QPushButton( "AB" );
+    ABButton = new QPushButton;
     setupSmallButton( ABButton );
     advLayout->addWidget( ABButton );
     BUTTON_SET_ACT_I( ABButton, "", atob_nob,
-        qtr( "Loop from point A to point B continuously\nClick to set point A" ), fromAtoB() );
+      qtr( "Loop from point A to point B continuously.\nClick to set point A" ),
+      fromAtoB() );
     timeA = timeB = 0;
     CONNECT( THEMIM->getIM(), positionUpdated( float, int, int ),
              this, AtoBLoop( float, int, int ) );
@@ -319,14 +322,14 @@ AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i ) :
     BUTTON_SET_ACT( frameButton, "Fr", qtr( "Frame by frame" ), frame() );
 #endif
 
-    recordButton = new QPushButton( "R" );
+    recordButton = new QPushButton;
     setupSmallButton( recordButton );
     advLayout->addWidget( recordButton );
     BUTTON_SET_ACT_I( recordButton, "", record,
             qtr( "Record" ), record() );
 
     /* Snapshot Button */
-    snapshotButton = new QPushButton( "S" );
+    snapshotButton = new QPushButton;
     setupSmallButton( snapshotButton );
     advLayout->addWidget( snapshotButton );
     BUTTON_SET_ACT_I( snapshotButton, "", snapshot,
@@ -569,19 +572,20 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
 
     /* Add this block to the main layout */
 
-    BUTTON_SET_ACT_I( playButton, "", play_b, qtr( "Play" ), play() );
+    BUTTON_SET_ACT_I( playButton, "", play_b, qtr( I_PLAY_TOOLTIP ), play() );
     BUTTON_SET_ACT_I( prevButton, "" , previous_b,
-                      qtr( "Previous" ), prev() );
-    BUTTON_SET_ACT_I( nextButton, "", next_b, qtr( "Next" ), next() );
-    BUTTON_SET_ACT_I( stopButton, "", stop_b, qtr( "Stop" ), stop() );
+                      qtr( "Previous media in the playlist" ), prev() );
+    BUTTON_SET_ACT_I( nextButton, "", next_b,
+                      qtr( "Next media in the playlist" ), next() );
+    BUTTON_SET_ACT_I( stopButton, "", stop_b, qtr( "Stop playback" ), stop() );
 
     /*
      * Other first Line buttons
      */
     /** Fullscreen/Visualisation **/
     fullscreenButton = new QPushButton;
-    BUTTON_SET_ACT_I( fullscreenButton, "", fullscreen, qtr( "Fullscreen" ),
-            fullscreen() );
+    BUTTON_SET_ACT_I( fullscreenButton, "", fullscreen,
+            qtr( "Toggle the video in fullscreen" ), fullscreen() );
     setupSmallButton( fullscreenButton );
 
     if( !b_fsCreation )
@@ -595,7 +599,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
         /** extended Settings **/
         extSettingsButton = new QPushButton;
         BUTTON_SET_ACT_I( extSettingsButton, "", extended,
-                qtr( "Extended settings" ), extSettings() );
+                qtr( "Show extended settings" ), extSettings() );
         setupSmallButton( extSettingsButton );
     }
 
@@ -604,7 +608,6 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
 
     volMuteLabel = new QLabel;
     volMuteLabel->setPixmap( QPixmap( ":/volume-medium" ) );
-    volMuteLabel->setToolTip( qtr( "Mute" ) );
     volMuteLabel->installEventFilter( hVolLabel );
 
     if( b_shiny )
@@ -779,12 +782,18 @@ void ControlsWidget::updateVolume( int i_sliderVolume )
         aout_VolumeSet( p_intf, i_res );
     }
     if( i_sliderVolume == 0 )
+    {
         volMuteLabel->setPixmap( QPixmap(":/volume-muted" ) );
-    else if( i_sliderVolume < VOLUME_MAX / 3 )
+        volMuteLabel->setToolTip( qtr( "Unmute" ) );
+        return;
+    }
+
+    if( i_sliderVolume < VOLUME_MAX / 3 )
         volMuteLabel->setPixmap( QPixmap( ":/volume-low" ) );
     else if( i_sliderVolume > (VOLUME_MAX * 2 / 3 ) )
         volMuteLabel->setPixmap( QPixmap( ":/volume-high" ) );
     else volMuteLabel->setPixmap( QPixmap( ":/volume-medium" ) );
+    volMuteLabel->setToolTip( qtr( "Mute" ) );
 }
 
 void ControlsWidget::updateVolume()
@@ -815,12 +824,12 @@ void ControlsWidget::setStatus( int status )
     if( status == PLAYING_S ) /* Playing */
     {
         playButton->setIcon( QIcon( ":/pause_b" ) );
-        playButton->setToolTip( qtr( "Pause" ) );
+        playButton->setToolTip( qtr( "Pause the playback" ) );
     }
     else
     {
         playButton->setIcon( QIcon( ":/play_b" ) );
-        playButton->setToolTip( qtr( "Play" ) );
+        playButton->setToolTip( qtr( I_PLAY_TOOLTIP ) );
     }
 }
 
index 27ee2733045ababcd96737a6ddef2b551ed87aa9..7028c62aa77bfaf9596e7c6de295fb0c80ef5d23 100644 (file)
@@ -46,6 +46,8 @@
 #include <QUrl>
 #include <QSettings>
 
+#define I_DEVICE_TOOLTIP "Select the device or the VIDEO_TS directory"
+
 /**************************************************************************
  * Open Files and subtitles                                               *
  **************************************************************************/
@@ -227,6 +229,9 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     b_firstvcd = true;
     b_firstcdda = true;
 
+    ui.browseDiscButton->setToolTip( I_DEVICE_TOOLTIP );
+    ui.deviceCombo->setToolTip( I_DEVICE_TOOLTIP );
+
 #if WIN32 /* Disc drives probing for Windows */
     char szDrives[512];
     szDrives[0] = '\0';
@@ -398,7 +403,7 @@ void DiscOpenPanel::updateMRL()
 void DiscOpenPanel::browseDevice()
 {
     QString dir = QFileDialog::getExistingDirectory( 0,
-            qtr("Open a device or a VIDEO_TS directory") );
+            qtr( I_DEVICE_TOOLTIP ) );
     if (!dir.isEmpty()) {
         ui.deviceCombo->setEditText( dir );
     }
index cf7ebbba3772229931ba9556390ff7b9ae4ea0db..f10733eef737655826d4bc2fdf63373bad704db6 100644 (file)
@@ -89,7 +89,7 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
     BUTTONACT( closeButton, close() );
 
     /* The tabs buttons are shown in the main dialog for space and cosmetics */
-    CONNECT( saveMetaButton, clicked(), this, saveMeta() );
+    BUTTONACT( saveMetaButton, saveMeta() );
 
     /* Let the MetaData Panel update the URI */
     CONNECT( MP, uriSet( QString ), uriLine, setText( QString ) );
index 2b7fb7486deb58ddb0a317197c549346d2b958ef..b49ef97997d8347ac4e77f8f0c5630e9455fcde9 100644 (file)
@@ -34,10 +34,12 @@ PodcastConfigDialog::PodcastConfigDialog( QWidget *parent, intf_thread_t *_p_int
 {
     ui.setupUi( this );
 
-    QPushButton *okButton = new QPushButton( qtr( "OK" ), this );
+    ui.podcastDelete->setToolTip( qtr( "Delete the selected item" ) );
+    QPushButton *okButton = new QPushButton( qtr( "&Close" ), this );
     QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ), this );
     ui.okCancel->addButton( okButton, QDialogButtonBox::AcceptRole );
     ui.okCancel->addButton( cancelButton, QDialogButtonBox::RejectRole );
+
     CONNECT( ui.podcastAdd, clicked(), this, add() );
     CONNECT( ui.podcastDelete, clicked(), this, remove() );
 
index 142c358aa179ae6274a0341f12ba8726b57ca393..b22288cf89f8deca0947b28921d78d4762ebaf73 100644 (file)
@@ -68,8 +68,10 @@ PrefsDialog::PrefsDialog( QWidget *parent, intf_thread_t *_p_intf )
     QHBoxLayout *types_l = new QHBoxLayout;
     types_l->setSpacing( 3 ); types_l->setMargin( 3 );
     small = new QRadioButton( qtr( "Simple" ), types );
+    small->setToolTip( qtr( "Switch to simple preferences" ) );
     types_l->addWidget( small );
     all = new QRadioButton( qtr("All"), types ); types_l->addWidget( all );
+    all->setToolTip( qtr( "Switch to complete preferences" ) );
     types->setLayout( types_l );
     small->setChecked( true );
 
index 28a691daa60c9f5f09382ab8b3d44fe9c0c25b50..7c4f5baa8e0ac1d3b623dd05962598011de4a9d3 100644 (file)
@@ -10,7 +10,7 @@
     <x>0</x>
     <y>0</y>
     <width>520</width>
-    <height>665</height>
+    <height>668</height>
    </rect>
   </property>
   <property name="sizePolicy" >
        <property name="contextMenuPolicy" >
         <enum>Qt::NoContextMenu</enum>
        </property>
+       <property name="toolTip" >
+        <string>_("Select play mode")</string>
+       </property>
       </widget>
      </item>
      <item>
index b5d160e2641ea0501a5ee879b1110d26dcc22ce1..ce978cbfb7f1fba6e4c2e332d1963e671a42b728 100644 (file)
         </property>
        </spacer>
       </item>
-      <item row="0" column="4" >
-       <widget class="QRadioButton" name="vcdRadioButton" >
-        <property name="text" >
-         <string>SVCD/VCD</string>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="5" >
+      <item row="0" column="6" >
        <spacer>
         <property name="orientation" >
          <enum>Qt::Horizontal</enum>
         </property>
        </spacer>
       </item>
-      <item row="0" column="6" colspan="2" >
-       <widget class="QRadioButton" name="audioCDRadioButton" >
-        <property name="text" >
-         <string>_("Audio CD")</string>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="8" >
+      <item row="0" column="9" >
        <spacer>
         <property name="orientation" >
          <enum>Qt::Horizontal</enum>
         </property>
        </widget>
       </item>
-      <item row="2" column="2" colspan="7" >
+      <item row="2" column="2" colspan="8" >
        <widget class="Line" name="line" >
         <property name="orientation" >
          <enum>Qt::Horizontal</enum>
         </property>
        </widget>
       </item>
-      <item row="3" column="3" colspan="3" >
+      <item row="3" column="3" colspan="4" >
        <widget class="QComboBox" name="deviceCombo" >
         <property name="editable" >
          <bool>true</bool>
         </property>
        </widget>
       </item>
-      <item row="3" column="6" >
+      <item row="3" column="7" >
        <widget class="QToolButton" name="ejectButton" >
         <property name="sizePolicy" >
          <sizepolicy vsizetype="Minimum" hsizetype="Fixed" >
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
-        <property name="text" >
-         <string>E</string>
-        </property>
        </widget>
       </item>
-      <item row="3" column="7" colspan="2" >
+      <item row="3" column="8" colspan="2" >
        <widget class="QPushButton" name="browseDiscButton" >
         <property name="sizePolicy" >
          <sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
-        <property name="toolTip" >
-         <string>_("Select the device or the VIDEO_TS directory")</string>
-        </property>
         <property name="text" >
          <string>_("Browse...")</string>
         </property>
        </widget>
       </item>
+      <item row="0" column="4" >
+       <widget class="QRadioButton" name="audioCDRadioButton" >
+        <property name="text" >
+         <string>_("Audio CD")</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="8" >
+       <widget class="QRadioButton" name="vcdRadioButton" >
+        <property name="text" >
+         <string>SVCD/VCD</string>
+        </property>
+       </widget>
+      </item>
      </layout>
     </widget>
    </item>
  </widget>
  <tabstops>
   <tabstop>dvdRadioButton</tabstop>
-  <tabstop>vcdRadioButton</tabstop>
-  <tabstop>audioCDRadioButton</tabstop>
   <tabstop>dvdsimple</tabstop>
   <tabstop>deviceCombo</tabstop>
   <tabstop>ejectButton</tabstop>