[chronojump] GUI for sensibility (debounce time) adjustement
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] GUI for sensibility (debounce time) adjustement
- Date: Sun, 18 Dec 2016 00:14:42 +0000 (UTC)
commit 01e6ad0f028d984bd02c1dfe550e33ba537d2d1c
Author: Xavier de Blas <xaviblas gmail com>
Date: Sun Dec 18 01:14:08 2016 +0100
GUI for sensibility (debounce time) adjustement
glade/app1.glade | 96 +++++++++++++++++++++++++++++++++++++++++++++++++
src/gui/chronojump.cs | 9 +++++
2 files changed, 105 insertions(+), 0 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 6810ade..885b27e 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -4206,6 +4206,7 @@ Carles</property>
<property name="visible">True</property>
<property name="app_paintable">True</property>
<property name="can_focus">True</property>
+ <property name="spacing">8</property>
<child>
<widget class="GtkLabel"
id="label_chronopics_multitest">
<property name="visible">True</property>
@@ -4269,6 +4270,89 @@ Carles</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <widget class="GtkHBox" id="hbox36">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkTable"
id="table_chronopic_sensibility">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">4</property>
+ <property name="row_spacing">2</property>
+ <child>
+ <widget class="GtkLabel" id="label254">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Sensibility</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkButton"
id="chronopic_sensibility_help">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <child>
+ <widget class="GtkImage" id="image10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-info</property>
+ <property name="icon-size">1</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHScale"
id="hscale_chronopic_debounce">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">5 1 10 1 1
0</property>
+ <property
name="restrict_to_fill_level">False</property>
+ <property name="fill_level">0</property>
+ <property name="digits">0</property>
+ <property name="draw_value">False</property>
+ <signal name="value_changed"
handler="on_hscale_chronopic_debounce_value_changed" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_chronopic_debounce">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">50</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
@@ -18535,6 +18619,18 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index fb5c644..8cadb75 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -264,6 +264,8 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Button button_execute_test;
[Widget] Gtk.Viewport viewport_chronopics;
[Widget] Gtk.Label label_chronopics_multitest;
+ [Widget] Gtk.Label label_chronopic_debounce;
+ [Widget] Gtk.HScale hscale_chronopic_debounce;
//[Widget] Gtk.Label label_chronopic_encoder;
//[Widget] Gtk.Image image_chronopic_encoder_no;
//[Widget] Gtk.Image image_chronopic_encoder_yes;
@@ -3822,6 +3824,13 @@ public partial class ChronoJumpWindow
}
}
+ //hscale does not manage correctly the +10 increments.
+ //we solve it with a label
+ private void on_hscale_chronopic_debounce_value_changed(object o, EventArgs arg)
+ {
+ label_chronopic_debounce.Text = (10 *
Convert.ToInt32(hscale_chronopic_debounce.Value)).ToString();
+ }
+
private void changeMultitestFirmwareIfNeeded()
{
//change multitest stuff
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]