[vlc-commits] Qt, use more tooltips, to improve accessibility

Jean-Baptiste Kempf git at videolan.org
Wed Apr 27 13:39:30 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Apr 27 12:37:29 2011 +0200| [c7d3ef910c7a5d3747499ae2fa6dc6e3e6651f09] | committer: Jean-Baptiste Kempf

Qt, use more tooltips, to improve accessibility

Tried to re-use already existing strings, as far as possible

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c7d3ef910c7a5d3747499ae2fa6dc6e3e6651f09
---

 modules/codec/zvbi.c                              |    2 +-
 modules/gui/qt4/components/simple_preferences.cpp |    3 ++-
 modules/gui/qt4/dialogs/sout.cpp                  |    1 +
 modules/gui/qt4/dialogs/toolbar.cpp               |    7 ++++++-
 modules/gui/qt4/dialogs/vlm.cpp                   |    5 +++++
 5 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/modules/codec/zvbi.c b/modules/codec/zvbi.c
index 32f4c1f..3b02ae9 100644
--- a/modules/codec/zvbi.c
+++ b/modules/codec/zvbi.c
@@ -58,7 +58,7 @@ static void Close( vlc_object_t * );
 #define PAGE_LONGTEXT N_("Open the indicated Teletext page." \
         "Default page is index 100")
 
-#define OPAQUE_TEXT N_("Text is always opaque")
+#define OPAQUE_TEXT N_("Teletext transparency")
 #define OPAQUE_LONGTEXT N_("Setting vbi-opaque to false " \
         "makes the boxed text transparent." )
 
diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index fd8b630..b957b73 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -69,8 +69,9 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent, bool sma
 
 #define ADD_CATEGORY( button, label, icon, numb )                           \
     QToolButton * button = new QToolButton( this );                         \
-    button->setIcon( QIcon( ":/prefsmenu/" #icon ) );                   \
+    button->setIcon( QIcon( ":/prefsmenu/" #icon ) );                       \
     button->setText( label );                                               \
+    button->setToolTip( label + qtr("Preferences") );                       \
     button->setToolButtonStyle( Qt::ToolButtonTextUnderIcon );              \
     button->setIconSize( QSize( icon_height, icon_height ) );               \
     button->resize( icon_height + 6 , icon_height + 6 );                    \
diff --git a/modules/gui/qt4/dialogs/sout.cpp b/modules/gui/qt4/dialogs/sout.cpp
index 3ebb4b7..de13577 100644
--- a/modules/gui/qt4/dialogs/sout.cpp
+++ b/modules/gui/qt4/dialogs/sout.cpp
@@ -67,6 +67,7 @@ SoutDialog::SoutDialog( QWidget *parent, intf_thread_t *_p_intf, const QString&
     closeTabButton->hide();
     closeTabButton->setAutoRaise( true );
     closeTabButton->setIcon( QIcon( ":/toolbar/clear" ) );
+    closeTabButton->setToolTip( qtr("Clear") );
     BUTTONACT( closeTabButton, closeTab() );
 #endif
     CONNECT( ui.destTab, currentChanged( int ), this, tabChanged( int ) );
diff --git a/modules/gui/qt4/dialogs/toolbar.cpp b/modules/gui/qt4/dialogs/toolbar.cpp
index 3937395..f1c8302 100644
--- a/modules/gui/qt4/dialogs/toolbar.cpp
+++ b/modules/gui/qt4/dialogs/toolbar.cpp
@@ -152,6 +152,7 @@ ToolbarEditDialog::ToolbarEditDialog( QWidget *_w, intf_thread_t *_p_intf)
 
     QToolButton *newButton = new QToolButton;
     newButton->setIcon( QIcon( ":/new" ) );
+    newButton->setToolTip( qtr("New profile") );
     QToolButton *deleteButton = new QToolButton;
     deleteButton->setIcon( QIcon( ":/toolbar/clear" ) );
     deleteButton->setToolTip( qtr( "Delete the current profile" ) );
@@ -376,14 +377,17 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
 
                 QToolButton *prevSectionButton = new QToolButton( discFrame );
                 prevSectionButton->setIcon( QIcon( ":/toolbar/dvd_prev" ) );
+                prevSectionButton->setToolTip( qtr("Previous chapter") );
                 discLayout->addWidget( prevSectionButton );
 
                 QToolButton *menuButton = new QToolButton( discFrame );
                 menuButton->setIcon( QIcon( ":/toolbar/dvd_menu" ) );
+                menuButton->setToolTip( qtr("Go to the DVD menu") );
                 discLayout->addWidget( menuButton );
 
                 QToolButton *nextButton = new QToolButton( discFrame );
                 nextButton->setIcon( QIcon( ":/toolbar/dvd_next" ) );
+                nextButton->setToolTip( qtr("Next chapter") );
                 discLayout->addWidget( nextButton );
 
                 widget = discFrame;
@@ -401,7 +405,8 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
                 telexLayout->addWidget( telexOn );
 
                 QToolButton *telexTransparent = new QToolButton;
-                telexOn->setIcon( QIcon( ":/toolbar/tvtelx" ) );
+                telexTransparent->setIcon( QIcon( ":/toolbar/tvtelx" ) );
+                telexTransparent->setToolTip( qtr("Teletext transparency") );
                 telexLayout->addWidget( telexTransparent );
 
                 QSpinBox *telexPage = new QSpinBox;
diff --git a/modules/gui/qt4/dialogs/vlm.cpp b/modules/gui/qt4/dialogs/vlm.cpp
index b4fc237..44f3f77 100644
--- a/modules/gui/qt4/dialogs/vlm.cpp
+++ b/modules/gui/qt4/dialogs/vlm.cpp
@@ -499,10 +499,12 @@ VLMAWidget::VLMAWidget( const QString& _name, const QString& _input,
 
     QToolButton *modifyButton = new QToolButton;
     modifyButton->setIcon( QIcon( ":/menu/settings" ) );
+    modifyButton->setToolTip( qtr("Change") );
     objLayout->addWidget( modifyButton, 0, 5 );
 
     QToolButton *deleteButton = new QToolButton;
     deleteButton->setIcon( QIcon( ":/menu/quit" ) );
+    deleteButton->setToolTip("Delete");
     objLayout->addWidget( deleteButton, 0, 6 );
 
     BUTTONACT( modifyButton, modify() );
@@ -541,14 +543,17 @@ VLMBroadcast::VLMBroadcast( const QString& _name, const QString& _input,
 
     playButton = new QToolButton;
     playButton->setIcon( QIcon( ":/menu/play" ) );
+    playButton->setToolTip( qtr("Play") );
     objLayout->addWidget( playButton, 1, 0 );
     b_playing = true;
 
     QToolButton *stopButton = new QToolButton;
     stopButton->setIcon( QIcon( ":/toolbar/stop_b" ) );
+    stopButton->setToolTip( qtr("Stop") );
     objLayout->addWidget( stopButton, 1, 1 );
 
     loopButton = new QToolButton;
+    loopButton->setToolTip( qtr("Repeat") );
     objLayout->addWidget( loopButton, 1, 2 );
 
     BUTTONACT( playButton, togglePlayPause() );



More information about the vlc-commits mailing list