From ef1dfd89f1454c73f7c5d47788d319e7f881bc52 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Tue, 29 Jul 2008 11:15:50 -0700 Subject: [PATCH] Forgotten tooltips. --- .../gui/qt4/components/interface_widgets.cpp | 39 +++++++++------ modules/gui/qt4/components/open_panels.cpp | 7 ++- modules/gui/qt4/dialogs/mediainfo.cpp | 2 +- .../gui/qt4/dialogs/podcast_configuration.cpp | 4 +- modules/gui/qt4/dialogs/preferences.cpp | 2 + modules/gui/qt4/ui/open.ui | 5 +- modules/gui/qt4/ui/open_disk.ui | 48 ++++++++----------- 7 files changed, 60 insertions(+), 47 deletions(-) diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp index fb724d3d41..8f9596e159 100644 --- a/modules/gui/qt4/components/interface_widgets.cpp +++ b/modules/gui/qt4/components/interface_widgets.cpp @@ -56,6 +56,8 @@ #include +#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 ) ); } } diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp index 27ee273304..7028c62aa7 100644 --- a/modules/gui/qt4/components/open_panels.cpp +++ b/modules/gui/qt4/components/open_panels.cpp @@ -46,6 +46,8 @@ #include #include +#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 ); } diff --git a/modules/gui/qt4/dialogs/mediainfo.cpp b/modules/gui/qt4/dialogs/mediainfo.cpp index cf7ebbba37..f10733eef7 100644 --- a/modules/gui/qt4/dialogs/mediainfo.cpp +++ b/modules/gui/qt4/dialogs/mediainfo.cpp @@ -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 ) ); diff --git a/modules/gui/qt4/dialogs/podcast_configuration.cpp b/modules/gui/qt4/dialogs/podcast_configuration.cpp index 2b7fb7486d..b49ef97997 100644 --- a/modules/gui/qt4/dialogs/podcast_configuration.cpp +++ b/modules/gui/qt4/dialogs/podcast_configuration.cpp @@ -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() ); diff --git a/modules/gui/qt4/dialogs/preferences.cpp b/modules/gui/qt4/dialogs/preferences.cpp index 142c358aa1..b22288cf89 100644 --- a/modules/gui/qt4/dialogs/preferences.cpp +++ b/modules/gui/qt4/dialogs/preferences.cpp @@ -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 ); diff --git a/modules/gui/qt4/ui/open.ui b/modules/gui/qt4/ui/open.ui index 28a691daa6..7c4f5baa8e 100644 --- a/modules/gui/qt4/ui/open.ui +++ b/modules/gui/qt4/ui/open.ui @@ -10,7 +10,7 @@ 0 0 520 - 665 + 668 @@ -230,6 +230,9 @@ Qt::NoContextMenu + + _("Select play mode") + diff --git a/modules/gui/qt4/ui/open_disk.ui b/modules/gui/qt4/ui/open_disk.ui index b5d160e264..ce978cbfb7 100644 --- a/modules/gui/qt4/ui/open_disk.ui +++ b/modules/gui/qt4/ui/open_disk.ui @@ -59,14 +59,7 @@ - - - - SVCD/VCD - - - - + Qt::Horizontal @@ -79,14 +72,7 @@ - - - - _("Audio CD") - - - - + Qt::Horizontal @@ -109,7 +95,7 @@ - + Qt::Horizontal @@ -126,14 +112,14 @@ - + true - + @@ -141,12 +127,9 @@ 0 - - E - - + @@ -154,14 +137,25 @@ 0 - - _("Select the device or the VIDEO_TS directory") - _("Browse...") + + + + _("Audio CD") + + + + + + + SVCD/VCD + + + @@ -325,8 +319,6 @@ dvdRadioButton - vcdRadioButton - audioCDRadioButton dvdsimple deviceCombo ejectButton -- 2.39.2