[vlc-devel] [PATCH 2/2] Added tooltips that explain the subtitle sync hotkeys. (WARNING : I could not test it under OSX...)

Pascal Thomet pthomet at gmail.com
Thu May 29 19:43:05 CEST 2014


This is a proposal for a tooltip in the "Track Synchronization" window
on the "subtitle track sycnhronization" label and widget.
It explains better the use of a patch I did last year that enables to
set the subtitle delay easier via hotkeys.
---
 modules/gui/macosx/TrackSynchronization.m      | 14 +++++++++++++-
 modules/gui/qt4/components/extended_panels.cpp | 14 +++++++++++++-
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/TrackSynchronization.m b/modules/gui/macosx/TrackSynchronization.m
index c0b8f3c..62101a5 100644
--- a/modules/gui/macosx/TrackSynchronization.m
+++ b/modules/gui/macosx/TrackSynchronization.m
@@ -65,7 +65,19 @@ static VLCTrackSynchronization *_o_sharedInstance = nil;
     [o_sv_lbl setStringValue: _NS("Subtitles/Video")];
     [o_sv_advance_lbl setStringValue: _NS("Subtitle track synchronization:")];
     [[o_sv_advance_value_fld formatter] setFormat:[NSString stringWithFormat:@"#,##0.000 %@", _NS("s")]];
-    [o_sv_advance_value_fld setToolTip: _NS("A positive value means that the subtitles are ahead of the video")];
+    [o_sv_advance_value_fld setToolTip: 
+        _NS(
+            "A positive value means that the subtitles are ahead of the video\n"
+            "\n"\
+            "In order to set the subtitle track synchronization delay easily, \n"\
+            "you can use the hotkeys :\n"\
+            "\n"\
+            "* Shift-H (audio bookmark)\n"\
+            "* Shift-J (subtitle bookmark) \n"\
+            "* Shift-K (sync bookmarks)\n"\
+            "\n"\
+            "(Use these hotkeys directly on the video)\n"
+    ];
     [o_sv_speed_lbl setStringValue: _NS("Subtitle speed:")];
     [[o_sv_speed_value_fld formatter] setFormat:[NSString stringWithFormat:@"#,##0.000 %@", _NS("fps")]];
     [o_sv_dur_lbl setStringValue: _NS("Subtitle duration factor:")];
diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index 84d16ae..2d04c9d 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -1475,7 +1475,19 @@ SyncControls::SyncControls( intf_thread_t *_p_intf, QWidget *_parent ) :
 
     subsSpin = new SyncWidget( this );
     subsLayout->addWidget( subsSpin, 0, 2, 1, 1 );
-
+    QString subsSpin_Tooltip = qtr( 
+        "In order to set the subtitle track synchronization delay easily, \n"\
+        "you can use the hotkeys :\n"\
+        "\n"\
+        "* Shift-H (audio bookmark)\n"\
+        "* Shift-J (subtitle bookmark) \n"\
+        "* Shift-K (sync bookmarks)\n"\
+        "\n"\
+        "(Use these hotkeys directly on the video)\n"
+    );
+    subsSpin->setToolTip(subsSpin_Tooltip);
+    subsLabel->setToolTip(subsSpin_Tooltip);
+        
     QLabel *subSpeedLabel = new QLabel;
     subSpeedLabel->setText( qtr( "Subtitle speed:" ) );
     subsLayout->addWidget( subSpeedLabel, 1, 0, 1, 1 );
-- 
1.9.1




More information about the vlc-devel mailing list