[chronojump] encoder preferences win capture: better gui with last changes
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] encoder preferences win capture: better gui with last changes
- Date: Tue, 29 Oct 2019 14:33:18 +0000 (UTC)
commit 07acb3f033ab9018d24dfe3e5f303555b37b24f8
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Oct 29 15:31:40 2019 +0100
encoder preferences win capture: better gui with last changes
glade/preferences_win.glade | 224 ++++++++++++++++++--------------------------
src/gui/preferences.cs | 13 ---
2 files changed, 91 insertions(+), 146 deletions(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index 6f18bbbd..6286135d 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -1843,7 +1843,6 @@ It starts before and arrives there with some speed.</property>
<widget class="GtkNotebook" id="notebook_encoder_capture_gi">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <signal name="switch_page" handler="on_notebook_encoder_capture_gi_switch_page"
swapped="no"/>
<child>
<widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
@@ -1975,10 +1974,10 @@ It starts before and arrives there with some speed.</property>
<property name="border_width">8</property>
<property name="left_padding">12</property>
<child>
- <widget class="GtkVBox" id="vbox_encoder_inertial">
+ <widget class="GtkHBox" id="hbox10">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">10</property>
+ <property name="spacing">30</property>
<child>
<widget class="GtkHBox" id="hbox23">
<property name="visible">True</property>
@@ -2054,6 +2053,93 @@ It starts before and arrives there with some speed.</property>
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <widget class="GtkVSeparator" id="vseparator1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkCheckButton"
id="checkbutton_encoder_capture_inertial_discard_first_n">
+ <property name="label" translatable="yes">Discard first
repetitions</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled"
handler="on_checkbutton_encoder_capture_inertial_discard_first_n_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox"
id="hbox_encoder_capture_inertial_discard_first_n">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">8</property>
+ <child>
+ <widget class="GtkSpinButton"
id="spin_encoder_capture_inertial_discard_first_n">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">Minimal
height</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">1</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">3 1 9 1 10 0</property>
+ <property name="climb_rate">1</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label79">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Recommended:
3</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">1</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>
@@ -2348,134 +2434,6 @@ It starts before and arrives there with some speed.</property>
<property name="position">2</property>
</packing>
</child>
- <child>
- <widget class="GtkFrame" id="frame6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.69999998807907104</property>
- <property name="shadow_type">out</property>
- <child>
- <widget class="GtkAlignment" id="alignment6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkHBox" id="hbox10">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">20</property>
- <child>
- <widget class="GtkVBox" id="vbox21">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">8</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkCheckButton"
id="checkbutton_encoder_capture_inertial_discard_first_n">
- <property name="label" translatable="yes">On inertial discard
first repetitions</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled"
handler="on_checkbutton_encoder_capture_inertial_discard_first_n_toggled" swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox"
id="hbox_encoder_capture_inertial_discard_first_n">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">8</property>
- <child>
- <widget class="GtkLabel" id="label80">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Discard:</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSpinButton"
id="spin_encoder_capture_inertial_discard_first_n">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Minimal
height</property>
- <property name="invisible_char">●</property>
- <property name="width_chars">1</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
- <property name="adjustment">3 1 9 1 10 0</property>
- <property name="climb_rate">1</property>
- <property name="snap_to_ticks">True</property>
- <property name="numeric">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label79">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Recommended:
3</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</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="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label35">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Save repetitions
automatically</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
<child>
<widget class="GtkCheckButton" id="check_show_start_and_duration">
<property name="label" translatable="yes">Show start and duration of each
repetition</property>
@@ -2487,7 +2445,7 @@ It starts before and arrives there with some speed.</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
@@ -2735,7 +2693,7 @@ It starts before and arrives there with some speed.</property>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">5</property>
+ <property name="position">4</property>
</packing>
</child>
</widget>
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index fa1270c8..7a88154e 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -109,7 +109,6 @@ public class PreferencesWindow
[Widget] Gtk.Image image_encoder_inertial;
[Widget] Gtk.Image image_encoder_triggers;
[Widget] Gtk.Notebook notebook_encoder_capture_gi;
- [Widget] Gtk.VBox vbox_encoder_inertial; //change Visible param to not have a vertical big first page
with only one row of info
[Widget] Gtk.SpinButton spin_encoder_capture_min_height_gravitatory;
[Widget] Gtk.SpinButton spin_encoder_capture_min_height_inertial;
[Widget] Gtk.CheckButton checkbutton_encoder_capture_inertial_discard_first_n;
@@ -508,15 +507,9 @@ public class PreferencesWindow
PreferencesWindowBox.image_encoder_triggers.Pixbuf = pixbuf;
if(menu_mode == Constants.Menuitem_modes.POWERGRAVITATORY)
- {
- PreferencesWindowBox.vbox_encoder_inertial.Visible = false;
PreferencesWindowBox.notebook_encoder_capture_gi.CurrentPage = 0;
- }
else if(menu_mode == Constants.Menuitem_modes.POWERINERTIAL)
- {
- PreferencesWindowBox.vbox_encoder_inertial.Visible = true;
PreferencesWindowBox.notebook_encoder_capture_gi.CurrentPage = 1;
- }
PreferencesWindowBox.spin_encoder_capture_min_height_gravitatory.Value =
preferences.encoderCaptureMinHeightGravitatory;
PreferencesWindowBox.spin_encoder_capture_min_height_inertial.Value =
preferences.encoderCaptureMinHeightInertial;
@@ -625,12 +618,6 @@ public class PreferencesWindow
hbox_encoder_capture_inactivity_time.Sensitive =
check_encoder_capture_inactivity_end_time.Active;
}
- //private void on_notebook_encoder_capture_gi_change_current_page (object o,
Gtk.ChangeCurrentPageArgs args)
- private void on_notebook_encoder_capture_gi_switch_page (object o, Gtk.SwitchPageArgs args)
- {
- vbox_encoder_inertial.Visible = (PreferencesWindowBox.notebook_encoder_capture_gi.CurrentPage
== 1);
- }
-
/*
* triggers stuff
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]