[longomatch] Standarize callback names and rename vscale1 to ratescale
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Standarize callback names and rename vscale1 to ratescale
- Date: Tue, 31 Mar 2015 17:31:23 +0000 (UTC)
commit 38e5ea6f01a20e7ec3f5e940127a826a5799d054
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Mon Mar 23 12:52:58 2015 +0100
Standarize callback names and rename vscale1 to ratescale
LongoMatch.GUI.Multimedia/Gui/PlayerView.cs | 62 ++++++++++----------
.../gtk-gui/LongoMatch.Gui.PlayerView.cs | 38 ++++++------
LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic | 2 +-
3 files changed, 51 insertions(+), 51 deletions(-)
---
diff --git a/LongoMatch.GUI.Multimedia/Gui/PlayerView.cs b/LongoMatch.GUI.Multimedia/Gui/PlayerView.cs
index f75333c..aa9f82c 100644
--- a/LongoMatch.GUI.Multimedia/Gui/PlayerView.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/PlayerView.cs
@@ -76,7 +76,7 @@ namespace LongoMatch.Gui
// Force tooltips to be translatable as there seems to be a bug in stetic
// code generation for translatable tooltips.
- vscale1.TooltipMarkup = Catalog.GetString ("Playback speed");
+ ratescale.TooltipMarkup = Catalog.GetString ("Playback speed");
closebutton.TooltipMarkup = Catalog.GetString ("Close loaded event");
drawbutton.TooltipMarkup = Catalog.GetString ("Draw frame");
playbutton.TooltipMarkup = Catalog.GetString ("Play");
@@ -96,7 +96,7 @@ namespace LongoMatch.Gui
LongoMatch.Gui.Helpers.Misc.SetFocus (vbox3, false);
videowindow.CanFocus = true;
detachbutton.Clicked += (sender, e) => Config.EventsBroker.EmitDetach ();
- vscale1.ModifyFont (FontDescription.FromString (Config.Style.Font + " 8"));
+ ratescale.ModifyFont (FontDescription.FromString (Config.Style.Font + " 8"));
controlsbox.HeightRequest = StyleConf.PlayerCapturerControlsHeight;
Player = new PlayerController ();
@@ -185,14 +185,14 @@ namespace LongoMatch.Gui
bool ControlsSensitive {
set {
controlsbox.Sensitive = value;
- vscale1.Sensitive = value;
+ ratescale.Sensitive = value;
}
}
bool ShowControls {
set {
controlsbox.Visible = value;
- vscale1.Visible = value;
+ ratescale.Visible = value;
}
}
@@ -200,7 +200,7 @@ namespace LongoMatch.Gui
set {
prevbutton.Visible = nextbutton.Visible = jumplabel.Visible =
jumpspinbutton.Visible = tlabel.Visible = timelabel.Visible =
- detachbutton.Visible = vscale1.Visible = !value;
+ detachbutton.Visible = ratescale.Visible = !value;
}
}
@@ -231,18 +231,18 @@ namespace LongoMatch.Gui
void ConnectSignals ()
{
vwin.VolumeChanged += new VolumeChangedHandler (OnVolumeChanged);
- closebutton.Clicked += OnClosebuttonClicked;
- prevbutton.Clicked += OnPrevbuttonClicked;
- nextbutton.Clicked += OnNextbuttonClicked;
- playbutton.Clicked += OnPlaybuttonClicked;
- pausebutton.Clicked += OnPausebuttonClicked;
- drawbutton.Clicked += OnDrawButtonClicked;
- volumebutton.Clicked += OnVolumebuttonClicked;
- timescale.ValueChanged += OnTimescaleValueChanged;
- timescale.ButtonPressEvent += OnTimescaleButtonPress;
- timescale.ButtonReleaseEvent += OnTimescaleButtonRelease;
- vscale1.FormatValue += OnVscale1FormatValue;
- vscale1.ValueChanged += OnVscale1ValueChanged;
+ closebutton.Clicked += HandleClosebuttonClicked;
+ prevbutton.Clicked += HandlePrevbuttonClicked;
+ nextbutton.Clicked += HandleNextbuttonClicked;
+ playbutton.Clicked += HandlePlaybuttonClicked;
+ pausebutton.Clicked += HandlePausebuttonClicked;
+ drawbutton.Clicked += HandleDrawButtonClicked;
+ volumebutton.Clicked += HandleVolumebuttonClicked;
+ timescale.ValueChanged += HandleTimescaleValueChanged;
+ timescale.ButtonPressEvent += HandleTimescaleButtonPress;
+ timescale.ButtonReleaseEvent += HandleTimescaleButtonRelease;
+ ratescale.FormatValue += HandleVscale1FormatValue;
+ ratescale.ValueChanged += OnVscale1ValueChanged;
jumpspinbutton.ValueChanged += HandleJumpValueChanged;
}
@@ -261,7 +261,7 @@ namespace LongoMatch.Gui
float GetRateFromScale ()
{
- VScale scale = vscale1;
+ VScale scale = ratescale;
double val = scale.Value;
if (val > SCALE_FPS) {
@@ -321,9 +321,9 @@ namespace LongoMatch.Gui
{
ignoreRate = true;
if (rate > 1) {
- vscale1.Value = rate - 1 + SCALE_FPS;
+ ratescale.Value = rate - 1 + SCALE_FPS;
} else {
- vscale1.Value = rate * SCALE_FPS;
+ ratescale.Value = rate * SCALE_FPS;
}
ignoreRate = true;
}
@@ -375,7 +375,7 @@ namespace LongoMatch.Gui
}
[GLib.ConnectBefore]
- void OnTimescaleButtonPress (object o, Gtk.ButtonPressEventArgs args)
+ void HandleTimescaleButtonPress (object o, Gtk.ButtonPressEventArgs args)
{
if (args.Event.Button == 1) {
GtkGlue.EventButtonSetButton (args.Event, 2);
@@ -392,7 +392,7 @@ namespace LongoMatch.Gui
}
[GLib.ConnectBefore]
- void OnTimescaleButtonRelease (object o, Gtk.ButtonReleaseEventArgs args)
+ void HandleTimescaleButtonRelease (object o, Gtk.ButtonReleaseEventArgs args)
{
if (args.Event.Button == 1) {
GtkGlue.EventButtonSetButton (args.Event, 2);
@@ -408,19 +408,19 @@ namespace LongoMatch.Gui
}
}
- void OnTimescaleValueChanged (object sender, System.EventArgs e)
+ void HandleTimescaleValueChanged (object sender, System.EventArgs e)
{
if (seeking) {
Player.SeekRelative (timescale.Value);
}
}
- void OnPlaybuttonClicked (object sender, System.EventArgs e)
+ void HandlePlaybuttonClicked (object sender, System.EventArgs e)
{
Player.Play ();
}
- void OnVolumebuttonClicked (object sender, System.EventArgs e)
+ void HandleVolumebuttonClicked (object sender, System.EventArgs e)
{
vwin.SetLevel (Player.Volume);
vwin.Show ();
@@ -447,27 +447,27 @@ namespace LongoMatch.Gui
muted = false;
}
- void OnPausebuttonClicked (object sender, System.EventArgs e)
+ void HandlePausebuttonClicked (object sender, System.EventArgs e)
{
Player.Pause ();
}
- void OnClosebuttonClicked (object sender, System.EventArgs e)
+ void HandleClosebuttonClicked (object sender, System.EventArgs e)
{
Player.UnloadCurrentEvent ();
}
- void OnPrevbuttonClicked (object sender, System.EventArgs e)
+ void HandlePrevbuttonClicked (object sender, System.EventArgs e)
{
Player.Previous ();
}
- void OnNextbuttonClicked (object sender, System.EventArgs e)
+ void HandleNextbuttonClicked (object sender, System.EventArgs e)
{
Player.Next ();
}
- void OnVscale1FormatValue (object o, Gtk.FormatValueArgs args)
+ void HandleVscale1FormatValue (object o, Gtk.FormatValueArgs args)
{
double val = args.Value;
if (val >= SCALE_FPS) {
@@ -524,7 +524,7 @@ namespace LongoMatch.Gui
}
}
- void OnDrawButtonClicked (object sender, System.EventArgs e)
+ void HandleDrawButtonClicked (object sender, System.EventArgs e)
{
Config.EventsBroker.EmitDrawFrame (null, -1, CamerasVisible [0], true);
}
diff --git a/LongoMatch.GUI.Multimedia/gtk-gui/LongoMatch.Gui.PlayerView.cs
b/LongoMatch.GUI.Multimedia/gtk-gui/LongoMatch.Gui.PlayerView.cs
index d131402..d19bbf4 100644
--- a/LongoMatch.GUI.Multimedia/gtk-gui/LongoMatch.Gui.PlayerView.cs
+++ b/LongoMatch.GUI.Multimedia/gtk-gui/LongoMatch.Gui.PlayerView.cs
@@ -20,7 +20,7 @@ namespace LongoMatch.Gui
private global::Gtk.VBox vbox5;
- private global::Gtk.VScale vscale1;
+ private global::Gtk.VScale ratescale;
private global::Gtk.EventBox lightbackgroundeventbox;
@@ -125,24 +125,24 @@ namespace LongoMatch.Gui
this.vbox5.Name = "vbox5";
this.vbox5.Spacing = 6;
// Container child vbox5.Gtk.Box+BoxChild
- this.vscale1 = new global::Gtk.VScale (null);
- this.vscale1.TooltipMarkup = "Playback speed";
- this.vscale1.WidthRequest = 36;
- this.vscale1.Sensitive = false;
- this.vscale1.Name = "vscale1";
- this.vscale1.UpdatePolicy = ((global::Gtk.UpdateType)(1));
- this.vscale1.Inverted = true;
- this.vscale1.Adjustment.Lower = 1;
- this.vscale1.Adjustment.Upper = 30;
- this.vscale1.Adjustment.PageIncrement = 3;
- this.vscale1.Adjustment.PageSize = 1;
- this.vscale1.Adjustment.StepIncrement = 1;
- this.vscale1.Adjustment.Value = 25;
- this.vscale1.DrawValue = true;
- this.vscale1.Digits = 0;
- this.vscale1.ValuePos = ((global::Gtk.PositionType)(3));
- this.vbox5.Add (this.vscale1);
- global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.vscale1]));
+ this.ratescale = new global::Gtk.VScale (null);
+ this.ratescale.TooltipMarkup = "Playback speed";
+ this.ratescale.WidthRequest = 36;
+ this.ratescale.Sensitive = false;
+ this.ratescale.Name = "ratescale";
+ this.ratescale.UpdatePolicy = ((global::Gtk.UpdateType)(1));
+ this.ratescale.Inverted = true;
+ this.ratescale.Adjustment.Lower = 1;
+ this.ratescale.Adjustment.Upper = 30;
+ this.ratescale.Adjustment.PageIncrement = 3;
+ this.ratescale.Adjustment.PageSize = 1;
+ this.ratescale.Adjustment.StepIncrement = 1;
+ this.ratescale.Adjustment.Value = 25;
+ this.ratescale.DrawValue = true;
+ this.ratescale.Digits = 0;
+ this.ratescale.ValuePos = ((global::Gtk.PositionType)(3));
+ this.vbox5.Add (this.ratescale);
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox5
[this.ratescale]));
w6.Position = 0;
this.mainbox.Add (this.vbox5);
global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.mainbox [this.vbox5]));
diff --git a/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic b/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic
index 13c7fa0..2becd73 100644
--- a/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic
@@ -140,7 +140,7 @@
<property name="MemberName" />
<property name="Spacing">6</property>
<child>
- <widget class="Gtk.VScale" id="vscale1">
+ <widget class="Gtk.VScale" id="ratescale">
<property name="MemberName" />
<property name="WidthRequest">36</property>
<property name="Sensitive">False</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]