After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 605402 - seek Subtitle->Time; Time->Subtitle with kb shortcut; Follow subs.
seek Subtitle->Time; Time->Subtitle with kb shortcut; Follow subs.
Status: RESOLVED FIXED
Product: gnome-subtitles
Classification: Other
Component: general
0.9.1
Other Linux
: Normal enhancement
: ---
Assigned To: Maintainers of GNOME subtitles
Maintainers of GNOME subtitles
Depends on: 453220
Blocks: 572062
 
 
Reported: 2009-12-24 22:11 UTC by Carlos Troncoso
Modified: 2010-06-11 11:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to this bug (3.41 KB, patch)
2010-06-03 01:33 UTC, Valmir Sena
needs-work Details | Review
THe last patch was incomplete (63.10 KB, patch)
2010-06-03 01:49 UTC, Valmir Sena
needs-work Details | Review
Correct the bugs 453220 and 605442 (70.14 KB, patch)
2010-06-10 18:31 UTC, Valmir Sena
committed Details | Review

Description Carlos Troncoso 2009-12-24 22:11:22 UTC
i.e. 
Sub->Time : ctrl-T will seek movie time to selected subtitle time.
Time->Sub : ctrl-shft-T will select subtitle corresponding to movie time.
Follow subs (toggle on menu or checkbox) : will scroll and select sub while movie plays.
------------
Objective: Minimize mouse usage while enhancing keyboard only speedy subtitling.
Comment 1 Valmir Sena 2010-06-03 01:33:45 UTC
Created attachment 162598 [details] [review]
Patch to this bug

The Shortcuts were modified to ctrl-p and ctrl-shift-p.
Comment 2 Valmir Sena 2010-06-03 01:49:12 UTC
Created attachment 162600 [details] [review]
THe last patch was incomplete

THe last patch was incomplete because I forgot to add the others files.
Comment 3 Pedro Castro 2010-06-06 21:08:33 UTC
Review of attachment 162598 [details] [review]:

Inline comments added.

::: src/GnomeSubtitles/Ui/VideoPreview/SubtitleTracker.cs
@@ +15,3 @@
+using System;
+using SubLib.Core.Domain;
+using GnomeSubtitles.Core;

Variables should start with lower case letter

@@ +31,3 @@
+	}
+		
+	public int FindSubtitleNearPosition(TimeSpan position){

The "position" timespan isn't being used. Besides that, the use of this method or previousSubtitleIndex is unclear. If we jump from subtitle 1 to 10, previous will be 1, but the "subtitleNearPosition" should always be:
1) if the video position is within a subtitles' boundaries, that subtitle
2) otherwise, the nearest subtitle after the current video position

@@ +32,3 @@
+		
+	public int FindSubtitleNearPosition(TimeSpan position){
+		if( CurrentSubtitleIndex != -1 ) return CurrentSubtitleIndex;

if-then-else should have statements on separate lines (4 lines in this case). Also spaces should be outside parenthesis:
if (condition)
  statement1;
else
  statement2;

@@ +49,3 @@
+	
+		
+	private void setCurrentSubtitle (int index) {

Methods should start with capital letter
Comment 4 Pedro Castro 2010-06-06 21:51:07 UTC
Review of attachment 162600 [details] [review]:

::: src/Glade/MainWindow.glade
@@ -805,3 @@
                         <accelerator key="F5" signal="activate"/>
                         <signal name="activate" handler="OnVideoPlayPause"/>
-                        <accelerator key="p" signal="activate" modifiers="GDK_CONTROL_MASK"/>

The Ctrl+P key should be retained for Play. Suggestions: Ctrl+R and Ctrl+J are free.

@@ +889,3 @@
+                    </child>
+                      </widget>
+                        <accelerator key="p" signal="activate" modifiers="GDK_SHIFT_MASK | GDK_CONTROL_MASK"/>

"Selection to Position" might not be understandable by those unfamiliar with these terms. Suggestion: "Select Nearest Subtitle".

::: src/GnomeSubtitles/Ui/Menus.cs
@@ +284,1 @@
 	private void SetVideoSelectionDependentSensitivity (bool sensitivity) {

This methods sets sensitivity for items that depend on subtitles being selected. Selecting a subtitle from the video should depend on the video + subtitle file being open, so it should be updated in SetVideoSensitivity and SetDocumentSensitivity.
Comment 5 Valmir Sena 2010-06-10 18:31:28 UTC
Created attachment 163314 [details] [review]
Correct the bugs 453220 and 605442

Include the codes to bugs 453220 and 605442, because was commons changes to this features. It misses put the sensibility codes of menu controls in the correct place.
Comment 6 Pedro Castro 2010-06-11 11:48:32 UTC
Review of attachment 163314 [details] [review]:

OK
Comment 7 Pedro Castro 2010-06-11 11:54:17 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.