gnome-subtitles r1055 - trunk/src/GnomeSubtitles/Dialog



Author: pcastro
Date: Fri Oct  3 23:00:58 2008
New Revision: 1055
URL: http://svn.gnome.org/viewvc/gnome-subtitles?rev=1055&view=rev

Log:
Separate setting the Timing Mode in a SpinButton from setting its Adjustment properties.

Modified:
   trunk/src/GnomeSubtitles/Dialog/TimingsAdjustDialog.cs
   trunk/src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs

Modified: trunk/src/GnomeSubtitles/Dialog/TimingsAdjustDialog.cs
==============================================================================
--- trunk/src/GnomeSubtitles/Dialog/TimingsAdjustDialog.cs	(original)
+++ trunk/src/GnomeSubtitles/Dialog/TimingsAdjustDialog.cs	Fri Oct  3 23:00:58 2008
@@ -69,8 +69,10 @@
 			firstSubtitleStartLabel.Text = startLabel;
 			lastSubtitleStartLabel.Text = startLabel;
 		}
-		Core.Util.SetSpinButtonTimingMode(firstSubtitleNewStartSpinButton, timingMode, false);
-		Core.Util.SetSpinButtonTimingMode(lastSubtitleNewStartSpinButton, timingMode, false);
+		Core.Util.SetSpinButtonTimingMode(firstSubtitleNewStartSpinButton, timingMode);
+		Core.Util.SetSpinButtonMaxAdjustment(firstSubtitleNewStartSpinButton, timingMode, false);
+		Core.Util.SetSpinButtonTimingMode(lastSubtitleNewStartSpinButton, timingMode);
+		Core.Util.SetSpinButtonMaxAdjustment(lastSubtitleNewStartSpinButton, timingMode, false);
 	}	
 
 	private void SetApplyToAll () {

Modified: trunk/src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs
==============================================================================
--- trunk/src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs	(original)
+++ trunk/src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs	Fri Oct  3 23:00:58 2008
@@ -70,7 +70,8 @@
 			return;
 			
 		timingMode = newTimingMode;	
-		Core.Util.SetSpinButtonTimingMode(spinButton, timingMode, true);
+		Core.Util.SetSpinButtonTimingMode(spinButton, timingMode);
+		Core.Util.SetSpinButtonMaxAdjustment(spinButton, timingMode, true);
 		
 		string label = (timingMode == TimingMode.Times ? Catalog.GetString("Time") : Catalog.GetString("Frames"));
 		string markup = "<b>" + label + "</b>";
@@ -136,7 +137,7 @@
 			SelectionIntended selectionIntended = GetSelectionIntended();
 			
 			if (timingMode == TimingMode.Times) {
-				TimeSpan time = TimeSpan.Parse(spinButton.Text);
+				TimeSpan time = TimeSpan.Parse(spinButton.Text); //TODO use value that holds milliseconds
 				Base.CommandManager.Execute(new ShiftTimingsCommand(time, selectionIntended));
 			}
 			else {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]