[chronojump] Force sensor analyze sliders and buttons: better gui
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Force sensor analyze sliders and buttons: better gui
- Date: Fri, 12 Feb 2021 17:05:28 +0000 (UTC)
commit 7221d0c7a252f48760520b2c53265778b70521dd
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Feb 12 18:04:40 2021 +0100
Force sensor analyze sliders and buttons: better gui
glade/app1.glade | 137 +++++++++++++++++++++++++------------
src/gui/app1/forceSensor.cs | 12 ++--
src/gui/app1/forceSensorAnalyze.cs | 25 ++-----
3 files changed, 103 insertions(+), 71 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index da33dbd2..deae3e04 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -21397,19 +21397,28 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkHBox" id="hbox182">
+ <widget class="GtkNotebook"
id="notebook_force_sensor_analyze_sliders_buttons_back">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <widget class="GtkHBox"
id="hbox_force_sensor_analyze_ai_sliders_and_buttons">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">4</property>
+ <property name="spacing">16</property>
<child>
<widget class="GtkTable" id="table19">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
- <property name="n_columns">4</property>
+ <property name="n_columns">3</property>
<property name="column_spacing">16</property>
<property name="row_spacing">2</property>
<child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkHBox"
id="hbox_force_sensor_ai_a">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -21486,7 +21495,7 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox277">
+ <widget class="GtkHBox"
id="hbox_force_sensor_ai_a_buttons">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">8</property>
@@ -21694,7 +21703,7 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkHBox"
id="hbox_buttons_scale_force_sensor_ai_b">
+ <widget class="GtkHBox"
id="hbox_force_sensor_ai_b_buttons">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">8</property>
@@ -21904,10 +21913,7 @@ Concentric</property>
</packing>
</child>
<child>
- <placeholder/>
- </child>
- <child>
- <widget class="GtkHBox"
id="hbox_force_sensor_ai_ab">
+ <widget class="GtkHBox"
id="hbox_force_sensor_ai_ab_zoom">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
@@ -22028,27 +22034,6 @@ Concentric</property>
<property name="x_options"/>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <widget class="GtkButton"
id="button_force_sensor_analyze_back_to_signal">
- <property name="label"
translatable="yes">Back</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked"
handler="on_button_force_sensor_analyze_back_to_signal_clicked" swapped="no"/>
- <accelerator key="Escape" signal="clicked"/>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"/>
- </packing>
- </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -22064,7 +22049,7 @@ Concentric</property>
<property name="receives_default">True</property>
<signal name="clicked"
handler="on_button_force_sensor_analyze_analyze_clicked" swapped="no"/>
<child>
- <widget class="GtkVBox" id="vbox248">
+ <widget class="GtkVBox" id="vbox251">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -22113,6 +22098,66 @@ Concentric</property>
</packing>
</child>
</widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label368">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">page
1</property>
+ </widget>
+ <packing>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox248">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkHBox"
id="hbox_force_sensor_analyze_back_to_signal">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkButton"
id="button_force_sensor_analyze_back_to_signal">
+ <property name="label"
translatable="yes">Back</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked"
handler="on_button_force_sensor_analyze_back_to_signal_clicked" swapped="no"/>
+ <accelerator key="Escape" signal="clicked"/>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label597">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">page
2</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@@ -24008,6 +24053,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -29160,6 +29208,18 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
+ <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Tests
will be filmed</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkHBox"
id="hbox_video_encoder_capturing">
<property name="can_focus">False</property>
<property name="spacing">4</property>
@@ -29196,18 +29256,6 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Tests
will be filmed</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkHBox"
id="hbox_video_encoder_no_capturing">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -37514,6 +37562,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index 9db9f539..ce9b7821 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Copyright (C) 2017-2020 Xavier de Blas <xaviblas gmail com>
+ * Copyright (C) 2017-2021 Xavier de Blas <xaviblas gmail com>
*/
using System;
@@ -444,6 +444,7 @@ public partial class ChronoJumpWindow
else if (o == (object) button_execute_test)
{
notebook_force_sensor_analyze.CurrentPage =
Convert.ToInt32(notebook_force_sensor_analyze_pages.MANUAL);
+ notebook_force_sensor_analyze_sliders_buttons_back.CurrentPage = 0;
forceSensorButtonsSensitive(false);
sensitiveLastTestButtons(false);
contactsShowCaptureDoingButtons(true);
@@ -1434,9 +1435,7 @@ LogB.Information(" fs C ");
forceSensorDoGraphAI(false);
}
- hbox_force_sensor_ai_a.Sensitive = true;
- hbox_force_sensor_ai_b.Sensitive = true;
- hbox_force_sensor_ai_ab.Sensitive = true;
+ hbox_force_sensor_analyze_ai_sliders_and_buttons.Sensitive = true;
button_contacts_exercise_close_and_recalculate.Sensitive = true;
button_delete_last_test.Sensitive = true;
@@ -1932,15 +1931,14 @@ LogB.Information(" fs R ");
}
//event_execute_label_message.Text = "Loaded: " +
Util.GetLastPartOfPath(filechooser.Filename);
- hbox_force_sensor_ai_a.Sensitive = true;
- hbox_force_sensor_ai_b.Sensitive = true;
- hbox_force_sensor_ai_ab.Sensitive = true;
+ hbox_force_sensor_analyze_ai_sliders_and_buttons.Sensitive = true;
button_contacts_exercise_close_and_recalculate.Sensitive = true;
force_capture_drawingarea.Sensitive = true;
notebook_force_sensor_analyze.Sensitive = true;
button_force_sensor_analyze_options_close_and_analyze.Sensitive = true;
notebook_force_sensor_analyze.CurrentPage =
Convert.ToInt32(notebook_force_sensor_analyze_pages.MANUAL);
+ notebook_force_sensor_analyze_sliders_buttons_back.CurrentPage = 0;
}
protected void on_force_sensor_load_signal_row_play (object o, EventArgs args)
diff --git a/src/gui/app1/forceSensorAnalyze.cs b/src/gui/app1/forceSensorAnalyze.cs
index 9fec322a..cc138d38 100644
--- a/src/gui/app1/forceSensorAnalyze.cs
+++ b/src/gui/app1/forceSensorAnalyze.cs
@@ -53,8 +53,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Button button_force_sensor_analyze_AB_save;
[Widget] Gtk.CheckButton check_force_sensor_ai_chained;
[Widget] Gtk.CheckButton check_force_sensor_ai_zoom;
-
- [Widget] Gtk.Button button_force_sensor_analyze_back_to_signal;
+ [Widget] Gtk.Notebook notebook_force_sensor_analyze_sliders_buttons_back;
[Widget] Gtk.RadioButton radio_force_rfd_search_optimized_ab;
[Widget] Gtk.RadioButton radio_force_rfd_use_ab_range;
@@ -186,7 +185,6 @@ public partial class ChronoJumpWindow
}
private int notebook_force_sensor_analyze_top_LastPage;
- private bool button_force_sensor_analyze_back_to_signal_LastSensitive;
private void on_button_force_sensor_analyze_options_clicked (object o, EventArgs args)
{
//store the notebook to return to same place
@@ -195,10 +193,6 @@ public partial class ChronoJumpWindow
hbox_force_sensor_analyze_top_modes.Sensitive = false;
- //do not allow to click Back while in options
- button_force_sensor_analyze_back_to_signal_LastSensitive =
button_force_sensor_analyze_back_to_signal.Sensitive;
- button_force_sensor_analyze_back_to_signal.Sensitive = false;
-
button_force_sensor_analyze_options_close_and_analyze.Visible =
radio_force_sensor_analyze_individual_current_set.Active;
forceSensorAnalyzeOptionsSensitivity(false);
@@ -210,8 +204,6 @@ public partial class ChronoJumpWindow
hbox_force_sensor_analyze_top_modes.Sensitive = true;
- button_force_sensor_analyze_back_to_signal.Sensitive =
button_force_sensor_analyze_back_to_signal_LastSensitive;
-
// 1 change stuff on Sqlite if needed
Sqlite.Open();
@@ -279,7 +271,6 @@ public partial class ChronoJumpWindow
private void on_button_force_sensor_analyze_analyze_clicked (object o, EventArgs args)
{
notebook_force_sensor_analyze.CurrentPage =
Convert.ToInt32(notebook_force_sensor_analyze_pages.AUTOMATIC);
- button_force_sensor_analyze_back_to_signal.Sensitive = true;
if(! Util.FileExists(lastForceSensorFullPath))
{
@@ -287,9 +278,7 @@ public partial class ChronoJumpWindow
return;
}
- hbox_force_sensor_ai_a.Sensitive = false;
- hbox_force_sensor_ai_b.Sensitive = false;
- hbox_force_sensor_ai_ab.Sensitive = false;
+ notebook_force_sensor_analyze_sliders_buttons_back.CurrentPage = 1;
if(lastForceSensorFullPath != null && lastForceSensorFullPath != "")
forceSensorCopyTempAndDoGraphs(forceSensorGraphsEnum.RFD);
@@ -297,12 +286,8 @@ public partial class ChronoJumpWindow
private void on_button_force_sensor_analyze_back_to_signal_clicked (object o, EventArgs args)
{
- hbox_force_sensor_ai_a.Sensitive = true;
- hbox_force_sensor_ai_b.Sensitive = true;
- hbox_force_sensor_ai_ab.Sensitive = true;
-
+ notebook_force_sensor_analyze_sliders_buttons_back.CurrentPage = 0;
notebook_force_sensor_analyze.CurrentPage =
Convert.ToInt32(notebook_force_sensor_analyze_pages.MANUAL);
- button_force_sensor_analyze_back_to_signal.Sensitive = false;
}
private void on_radio_force_rfd_search_optimized_ab_toggled (object o, EventArgs args)
@@ -648,9 +633,7 @@ public partial class ChronoJumpWindow
get { return impulse; }
}
- [Widget] Gtk.HBox hbox_force_sensor_ai_a;
- [Widget] Gtk.HBox hbox_force_sensor_ai_b;
- [Widget] Gtk.HBox hbox_force_sensor_ai_ab;
+ [Widget] Gtk.HBox hbox_force_sensor_analyze_ai_sliders_and_buttons;
[Widget] Gtk.DrawingArea force_sensor_ai_drawingarea;
[Widget] Gtk.HScale hscale_force_sensor_ai_a;
[Widget] Gtk.HScale hscale_force_sensor_ai_b;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]