[longomatch] Fix changing rate
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix changing rate
- Date: Tue, 31 Mar 2015 17:31:28 +0000 (UTC)
commit f14d27b53a3b1397035c383d0e737dbfa85ad44f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Mon Mar 23 13:13:50 2015 +0100
Fix changing rate
LongoMatch.GUI.Multimedia/Gui/PlayerView.cs | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/LongoMatch.GUI.Multimedia/Gui/PlayerView.cs b/LongoMatch.GUI.Multimedia/Gui/PlayerView.cs
index aa9f82c..0136529 100644
--- a/LongoMatch.GUI.Multimedia/Gui/PlayerView.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/PlayerView.cs
@@ -241,8 +241,8 @@ namespace LongoMatch.Gui
timescale.ValueChanged += HandleTimescaleValueChanged;
timescale.ButtonPressEvent += HandleTimescaleButtonPress;
timescale.ButtonReleaseEvent += HandleTimescaleButtonRelease;
- ratescale.FormatValue += HandleVscale1FormatValue;
- ratescale.ValueChanged += OnVscale1ValueChanged;
+ ratescale.FormatValue += HandleRateFormatValue;
+ ratescale.ValueChanged += HandleRateValueChanged;
jumpspinbutton.ValueChanged += HandleJumpValueChanged;
}
@@ -325,7 +325,7 @@ namespace LongoMatch.Gui
} else {
ratescale.Value = rate * SCALE_FPS;
}
- ignoreRate = true;
+ ignoreRate = false;
}
void HandlePARChangedEvent (IntPtr windowHandle, float par)
@@ -467,9 +467,9 @@ namespace LongoMatch.Gui
Player.Next ();
}
- void HandleVscale1FormatValue (object o, Gtk.FormatValueArgs args)
+ void HandleRateFormatValue (object o, Gtk.FormatValueArgs args)
{
- double val = args.Value;
+ int val = (int)args.Value;
if (val >= SCALE_FPS) {
val = val + 1 - SCALE_FPS;
args.RetVal = val + "X";
@@ -478,7 +478,7 @@ namespace LongoMatch.Gui
}
}
- void OnVscale1ValueChanged (object sender, System.EventArgs e)
+ void HandleRateValueChanged (object sender, System.EventArgs e)
{
float val = GetRateFromScale ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]