[chronojump] showJumpRSI on preferences win and updating SQL
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] showJumpRSI on preferences win and updating SQL
- Date: Fri, 15 Oct 2021 11:10:12 +0000 (UTC)
commit 81bf1da6c92c3327178960d4a20c7d197a9b1f76
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Oct 15 13:09:35 2021 +0200
showJumpRSI on preferences win and updating SQL
glade/preferences_win.glade | 15 ++++++++++++++-
src/gui/preferences.cs | 11 +++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index a4f9ce354..9ca4c3fa5 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -971,7 +971,20 @@
</packing>
</child>
<child>
- <placeholder/>
+ <widget class="GtkCheckButton"
id="checkbutton_jump_rsi">
+ <property name="label">RSI</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</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>
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index a7dab61a8..edc1b2d9b 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -101,6 +101,7 @@ public class PreferencesWindow
[Widget] Gtk.Image image_jumps_power_help;
[Widget] Gtk.Image image_jumps_stiffness_help;
[Widget] Gtk.CheckButton checkbutton_initial_speed;
+ [Widget] Gtk.CheckButton checkbutton_jump_rsi;
// [Widget] Gtk.CheckButton checkbutton_angle;
[Widget] Gtk.CheckButton checkbutton_show_tv_tc_index;
[Widget] Gtk.Box hbox_indexes;
@@ -514,6 +515,11 @@ public class PreferencesWindow
else
PreferencesWindowBox.checkbutton_initial_speed.Active = false;
+ if(preferences.showJumpRSI)
+ PreferencesWindowBox.checkbutton_jump_rsi.Active = true;
+ else
+ PreferencesWindowBox.checkbutton_jump_rsi.Active = false;
+
/*
if(preferences.showAngle)
PreferencesWindowBox.checkbutton_angle.Active = true;
@@ -1897,6 +1903,11 @@ public class PreferencesWindow
preferences.showInitialSpeed = PreferencesWindowBox.checkbutton_initial_speed.Active;
}
+ if( preferences.showJumpRSI != PreferencesWindowBox.checkbutton_jump_rsi.Active ) {
+ SqlitePreferences.Update(SqlitePreferences.ShowJumpRSI,
PreferencesWindowBox.checkbutton_jump_rsi.Active.ToString(), true);
+ preferences.showJumpRSI = PreferencesWindowBox.checkbutton_jump_rsi.Active;
+ }
+
/*
if( preferences.showAngle != PreferencesWindowBox.checkbutton_angle.Active ) {
SqlitePreferences.Update("showAngle",
PreferencesWindowBox.checkbutton_angle.Active.ToString(), true);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]