Commit ef1dfd89 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Forgotten tooltips.

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