[chronojump] Feedback win buttons test sound on new tab
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Feedback win buttons test sound on new tab
- Date: Thu, 4 Jun 2020 11:52:00 +0000 (UTC)
commit 79d42406dfd573870761134060a842070e11ee8c
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Jun 4 13:51:25 2020 +0200
Feedback win buttons test sound on new tab
glade/repetitive_conditions.glade | 409 ++++++++++++++------------------------
src/gui/repetitiveConditions.cs | 48 ++---
2 files changed, 173 insertions(+), 284 deletions(-)
---
diff --git a/glade/repetitive_conditions.glade b/glade/repetitive_conditions.glade
index 064e6619..527f03b9 100644
--- a/glade/repetitive_conditions.glade
+++ b/glade/repetitive_conditions.glade
@@ -1629,141 +1629,13 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <widget class="GtkHBox" id="hbox_test_bells_contacts">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">8</property>
- <child>
- <widget class="GtkLabel" id="label58">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Test bells</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_test_good1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip" translatable="yes">Test "Good" bell</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_button_test_clicked" swapped="no"/>
- <child>
- <widget class="GtkHBox" id="hbox37">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-media-play</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkImage" id="image_repetitive_test_good1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_test_bad1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip" translatable="yes">Test "Bad" bell</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_button_test_clicked" swapped="no"/>
- <child>
- <widget class="GtkHBox" id="hbox50">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkImage" id="image4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-media-play</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkImage" id="image_repetitive_test_bad1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label_test_sound_result1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label42">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label">jumps/runs</property>
+ <property name="label" translatable="yes">Feedback</property>
</widget>
<packing>
<property name="tab_fill">False</property>
@@ -3909,134 +3781,6 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <widget class="GtkHBox" id="hbox_test_bells_encoder">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">8</property>
- <child>
- <widget class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Test bells</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_test_good">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip" translatable="yes">Test "Good" bell</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_button_test_clicked" swapped="no"/>
- <child>
- <widget class="GtkHBox" id="hbox14">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-media-play</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkImage" id="image_repetitive_test_good">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_test_bad">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip" translatable="yes">Test "Bad" bell</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_button_test_clicked" swapped="no"/>
- <child>
- <widget class="GtkHBox" id="hbox15">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-media-play</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkImage" id="image_repetitive_test_bad">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label_test_sound_result">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
</widget>
<packing>
<property name="position">1</property>
@@ -4957,7 +4701,7 @@
<widget class="GtkLabel" id="label59">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label">force sensor</property>
+ <property name="label" translatable="yes">Feedback</property>
</widget>
<packing>
<property name="position">3</property>
@@ -4965,6 +4709,155 @@
<property name="type">tab</property>
</packing>
</child>
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkVBox" id="vbox16">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">20</property>
+ <property name="spacing">30</property>
+ <child>
+ <widget class="GtkHButtonBox" id="hbuttonbox3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">spread</property>
+ <child>
+ <widget class="GtkButton" id="button_test_good">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip" translatable="yes">Test "Good" bell</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_button_test_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox14">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-media-play</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkImage" id="image_repetitive_test_good">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-missing-image</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_test_bad">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip" translatable="yes">Test "Bad" bell</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_button_test_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox15">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkImage" id="image3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-media-play</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkImage" id="image_repetitive_test_bad">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-missing-image</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_test_sound_result">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label60">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Test bells</property>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/repetitiveConditions.cs b/src/gui/repetitiveConditions.cs
index 84199ecd..010538a7 100644
--- a/src/gui/repetitiveConditions.cs
+++ b/src/gui/repetitiveConditions.cs
@@ -123,11 +123,8 @@ public class RepetitiveConditionsWindow
[Widget] Gtk.Button button_test_good;
- [Widget] Gtk.Button button_test_good1;
[Widget] Gtk.Button button_test_bad;
- [Widget] Gtk.Button button_test_bad1;
[Widget] Gtk.Label label_test_sound_result;
- [Widget] Gtk.Label label_test_sound_result1;
[Widget] Gtk.Button button_close;
//bells good (green)
@@ -199,6 +196,7 @@ public class RepetitiveConditionsWindow
const int ENCODERPAGE = 1;
const int ENCODERRHYTHMPAGE = 2;
const int FORCESENSORPAGE = 3;
+ const int TESTBELLSPAGE = 4;
public Gtk.Button FakeButtonClose;
@@ -307,26 +305,29 @@ public class RepetitiveConditionsWindow
notebook_main.GetNthPage(ENCODERPAGE).Hide();
notebook_main.GetNthPage(ENCODERRHYTHMPAGE).Hide();
notebook_main.GetNthPage(FORCESENSORPAGE).Hide();
+ notebook_main.GetNthPage(TESTBELLSPAGE).Hide();
notebook_main.ShowTabs = false;
- if(bellMode == Constants.BellModes.JUMPS)
+ if(bellMode == Constants.BellModes.JUMPS || bellMode == Constants.BellModes.RUNS)
{
- hbox_jump_best_worst.Show();
- hbox_jump_conditions.Show();
-
- notebook_main.GetNthPage(JUMPSRUNSPAGE).Show();
- }
- else if(bellMode == Constants.BellModes.RUNS)
- {
- hbox_run_best_worst.Show();
- hbox_run_conditions.Show();
+ if(bellMode == Constants.BellModes.JUMPS)
+ {
+ hbox_jump_best_worst.Show();
+ hbox_jump_conditions.Show();
+ }
+ else if(bellMode == Constants.BellModes.RUNS)
+ {
+ hbox_run_best_worst.Show();
+ hbox_run_conditions.Show();
+ }
notebook_main.GetNthPage(JUMPSRUNSPAGE).Show();
+ notebook_main.GetNthPage(TESTBELLSPAGE).Show();
+ notebook_main.CurrentPage = JUMPSRUNSPAGE;
+ notebook_main.ShowTabs = true;
}
else if (bellMode == Constants.BellModes.ENCODERGRAVITATORY || bellMode ==
Constants.BellModes.ENCODERINERTIAL)
{
- notebook_main.ShowTabs = true;
-
vbox_encoder_manual.Show();
if(checkbutton_encoder_show_manual_feedback.Active)
notebook_encoder_conditions.Show();
@@ -385,7 +386,9 @@ public class RepetitiveConditionsWindow
notebook_main.GetNthPage(ENCODERPAGE).Show();
notebook_main.GetNthPage(ENCODERRHYTHMPAGE).Show();
+ notebook_main.GetNthPage(TESTBELLSPAGE).Show();
notebook_main.CurrentPage = ENCODERPAGE;
+ notebook_main.ShowTabs = true;
encoder_rhythm_set_values(encoderRhythm);
}
@@ -407,7 +410,6 @@ public class RepetitiveConditionsWindow
}
label_test_sound_result.Text = "";
- label_test_sound_result1.Text = "";
}
private void createComboEncoderMainAndSecondaryVariables()
@@ -479,7 +481,6 @@ public class RepetitiveConditionsWindow
image_encoder_power_higher.Pixbuf = pixbuf;
image_encoder_peakpower_higher.Pixbuf = pixbuf;
image_repetitive_test_good.Pixbuf = pixbuf;
- image_repetitive_test_good1.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_bell_red.png");
image_repetitive_worst_tf_tc.Pixbuf = pixbuf;
@@ -498,7 +499,6 @@ public class RepetitiveConditionsWindow
image_encoder_power_lower.Pixbuf = pixbuf;
image_encoder_peakpower_lower.Pixbuf = pixbuf;
image_repetitive_test_bad.Pixbuf = pixbuf;
- image_repetitive_test_bad1.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_info.png");
image_clusters_info.Pixbuf = pixbuf;
@@ -511,21 +511,17 @@ public class RepetitiveConditionsWindow
Util.TestSound = true;
label_test_sound_result.Text = "";
- label_test_sound_result1.Text = "";
Util.SoundCodes sc;
- if (o == button_test_good || o == button_test_good1)
+ if (o == button_test_good)
sc = Util.PlaySound(Constants.SoundTypes.GOOD, true, gstreamer);
- else //if (o == button_test_bad || o == button_test_good1)
+ else //if (o == button_test_bad)
sc = Util.PlaySound(Constants.SoundTypes.BAD, true, gstreamer);
- if(sc == Util.SoundCodes.OK) {
+ if(sc == Util.SoundCodes.OK)
label_test_sound_result.Text = Catalog.GetString("Sound working");
- label_test_sound_result1.Text = Catalog.GetString("Sound working");
- } else {
+ else
label_test_sound_result.Text = Catalog.GetString("Sound not working");
- label_test_sound_result1.Text = Catalog.GetString("Sound working");
- }
Util.TestSound = false;
} else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]