[chronojump] appearence preferences on SQL. DB: 1.40
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] appearence preferences on SQL. DB: 1.40
- Date: Tue, 4 Apr 2017 11:47:04 +0000 (UTC)
commit 968d2c26c401e1197a5cfc49a2c8332abc594c16
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Apr 4 13:44:31 2017 +0200
appearence preferences on SQL. DB: 1.40
glade/app1.glade | 514 ++++++++++++++++++++++++++++++++-----------
glade/preferences_win.glade | 242 ++++++++++++++++++---
po/ca.po | 4 +-
src/config.cs | 5 +-
src/gui/chronojump.cs | 115 ++++++++---
src/gui/encoder.cs | 2 +-
src/gui/networks.cs | 43 +++-
src/gui/preferences.cs | 65 +++++-
src/preferences.cs | 5 +
src/sqlite/main.cs | 13 +-
src/sqlite/preferences.cs | 12 +-
11 files changed, 815 insertions(+), 205 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 2d1193d..b6a9581 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -2602,197 +2602,457 @@ Carles</property>
<property name="can_focus">False</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkHBox" id="hbox_other">
+ <widget class="GtkHBox" id="hbox78">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">20</property>
<child>
- <widget class="GtkRadioButton"
id="radio_mode_reaction_times_small">
+ <widget class="GtkHBox"
id="hbox_contacts_sup_capture_analyze_two_buttons">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="relief">none</property>
- <property name="draw_indicator">False</property>
- <signal name="toggled"
handler="on_radio_mode_reaction_times_small_toggled" swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="spacing">20</property>
<child>
- <widget class="GtkHBox" id="hbox119">
+ <widget class="GtkRadioButton"
id="radio_mode_contacts_capture">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">10</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="relief">none</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">False</property>
+ <signal name="toggled"
handler="on_radio_mode_contacts_capture_toggled" swapped="no"/>
<child>
- <widget class="GtkImage"
id="image_mode_reaction_times_small">
+ <widget class="GtkHBox" id="hbox193">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkImage" id="image_tests_capture">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_mode_contacts_capture">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Capture</property>
+ <property name="justify">center</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</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>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_mode_contacts_analyze">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="relief">none</property>
+ <property name="draw_indicator">False</property>
+ <property
name="group">radio_mode_contacts_capture</property>
+ <signal name="toggled"
handler="on_radio_mode_contacts_analyze_toggled" swapped="no"/>
<child>
- <widget class="GtkLabel"
id="label_mode_reaction_times_small">
+ <widget class="GtkHBox" id="hbox198">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Reaction
times</property>
- <property name="justify">center</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkImage"
id="image_stats_win_graph1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</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="label_mode_contacts_analyze">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Analyze</property>
+ <property name="justify">center</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</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="GtkRadioButton"
id="radio_mode_contacts_jumps_profile">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="relief">none</property>
+ <property name="draw_indicator">False</property>
+ <property
name="group">radio_mode_contacts_capture</property>
+ <signal name="toggled"
handler="on_radio_mode_contacts_jumps_profile_toggled" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox199">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkImage"
id="image_tab_jumps_profile">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</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="label_mode_contacts_jumps_profile">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Jumps
profile</property>
+ <property name="justify">center</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</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="GtkRadioButton"
id="radio_mode_contacts_sprint">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="relief">none</property>
+ <property name="draw_indicator">False</property>
+ <property
name="group">radio_mode_contacts_capture</property>
+ <signal name="toggled"
handler="on_radio_mode_contacts_sprint_toggled" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox206">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkImage" id="image_tests_sprint">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</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="label_mode_encoder_analyze3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Sprint</property>
+ <property name="justify">center</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">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</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="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkRadioButton" id="radio_mode_pulses_small">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="relief">none</property>
- <property name="draw_indicator">False</property>
- <property
name="group">radio_mode_reaction_times_small</property>
- <signal name="toggled"
handler="on_radio_mode_pulses_small_toggled" swapped="no"/>
+ <widget class="GtkHBox" id="hbox_other">
+ <property name="can_focus">False</property>
+ <property name="spacing">20</property>
<child>
- <widget class="GtkHBox" id="hbox120">
+ <widget class="GtkRadioButton"
id="radio_mode_reaction_times_small">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">10</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="relief">none</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">False</property>
+ <signal name="toggled"
handler="on_radio_mode_reaction_times_small_toggled" swapped="no"/>
<child>
- <widget class="GtkImage" id="image_mode_pulses_small">
+ <widget class="GtkHBox" id="hbox119">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkImage"
id="image_mode_reaction_times_small">
+ <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">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_mode_reaction_times_small">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Reaction times</property>
+ <property name="justify">center</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</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>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_mode_pulses_small">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="relief">none</property>
+ <property name="draw_indicator">False</property>
+ <property
name="group">radio_mode_reaction_times_small</property>
+ <signal name="toggled"
handler="on_radio_mode_pulses_small_toggled" swapped="no"/>
<child>
- <widget class="GtkLabel" id="label_mode_pulses_small">
+ <widget class="GtkHBox" id="hbox120">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label"
translatable="yes">Pulses</property>
- <property name="justify">center</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkImage"
id="image_mode_pulses_small">
+ <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">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_mode_pulses_small">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Pulses</property>
+ <property name="justify">center</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</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">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton"
id="radio_mode_multi_chronopic_small">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="relief">none</property>
- <property name="draw_indicator">False</property>
- <property
name="group">radio_mode_reaction_times_small</property>
- <signal name="toggled"
handler="on_radio_mode_multi_chronopic_small_toggled" swapped="no"/>
<child>
- <widget class="GtkHBox" id="hbox132">
+ <widget class="GtkRadioButton"
id="radio_mode_multi_chronopic_small">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">10</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="relief">none</property>
+ <property name="draw_indicator">False</property>
+ <property
name="group">radio_mode_reaction_times_small</property>
+ <signal name="toggled"
handler="on_radio_mode_multi_chronopic_small_toggled" swapped="no"/>
<child>
- <widget class="GtkImage"
id="image_mode_multi_chronopic_small">
+ <widget class="GtkHBox" id="hbox132">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkImage"
id="image_mode_multi_chronopic_small">
+ <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">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_mode_multi_chronopic_small">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">MultiChronopic</property>
+ <property name="justify">center</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</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>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_mode_force_sensor_small">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="relief">none</property>
+ <property name="draw_indicator">False</property>
+ <property
name="group">radio_mode_reaction_times_small</property>
+ <signal name="toggled"
handler="on_radio_mode_force_sensor_small_toggled" swapped="no"/>
<child>
- <widget class="GtkLabel"
id="label_mode_multi_chronopic_small">
+ <widget class="GtkHBox" id="hbox77">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label"
translatable="yes">MultiChronopic</property>
- <property name="justify">center</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkImage"
id="image_mode_force_sensor_small1">
+ <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">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_mode_force_sensor_small">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Force
sensor</property>
+ <property name="justify">center</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</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>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkRadioButton"
id="radio_mode_force_sensor_small">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="relief">none</property>
- <property name="draw_indicator">False</property>
- <property
name="group">radio_mode_reaction_times_small</property>
- <signal name="toggled"
handler="on_radio_mode_force_sensor_small_toggled" swapped="no"/>
+ <widget class="GtkHBox" id="hbox_top_person">
+ <property name="can_focus">False</property>
+ <property name="spacing">20</property>
<child>
- <widget class="GtkHBox" id="hbox77">
+ <widget class="GtkLabel" id="label_top_person_name">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkImage"
id="image_mode_force_sensor_small1">
- <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">0</property>
- </packing>
- </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_encoder_person_change1">
+ <property name="width_request">80</property>
+ <property name="height_request">40</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip"
translatable="yes">Person</property>
<child>
- <widget class="GtkLabel"
id="label_mode_force_sensor_small">
+ <widget class="GtkImage" id="image_person1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Force
sensor</property>
- <property name="justify">center</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>
+ <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="expand">True</property>
<property name="fill">False</property>
- <property name="position">3</property>
+ <property name="position">2</property>
</packing>
</child>
</widget>
@@ -2806,6 +3066,7 @@ Carles</property>
<widget class="GtkNotebook" id="notebook_capture_analyze">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="show_tabs">False</property>
<property name="show_border">False</property>
<property name="tab_hborder">10</property>
<property name="tab_vborder">4</property>
@@ -10718,7 +10979,7 @@ after time</property>
<property name="can_focus">False</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkImage" id="image_tests_capture">
+ <widget class="GtkImage" id="image_tests_capture_old">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-missing-image</property>
@@ -12356,7 +12617,7 @@ on current Chronojump version.</property>
<property name="can_focus">False</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkImage" id="image_stats_win_graph1">
+ <widget class="GtkImage" id="image_stats_win_graph1_old">
<property name="visible">True</property>
<property name="can_focus">False</property>
</widget>
@@ -13498,7 +13759,7 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkImage" id="image_tab_jumps_profile">
+ <widget class="GtkImage" id="image_tab_jumps_profile_old">
<property name="visible">True</property>
<property name="can_focus">False</property>
</widget>
@@ -13628,7 +13889,7 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkImage" id="image_tests_sprint">
+ <widget class="GtkImage" id="image_tests_sprint_old">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-missing-image</property>
@@ -13808,11 +14069,11 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox_encoder_person">
+ <widget class="GtkHBox" id="hbox_top_person_encoder">
<property name="can_focus">False</property>
<property name="spacing">20</property>
<child>
- <widget class="GtkLabel" id="label_encoder_person_name">
+ <widget class="GtkLabel"
id="label_top_encoder_person_name">
<property name="visible">True</property>
<property name="can_focus">False</property>
</widget>
@@ -19563,6 +19824,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index f86daeb..2eb334c 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -28,6 +28,197 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">16</property>
+ <property name="spacing">15</property>
+ <child>
+ <widget class="GtkFrame" id="frame11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <widget class="GtkVBox" id="vbox28">
+ <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="check_appearance_maximized">
+ <property name="label" translatable="yes">Maximized</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="check_appearance_person_win_hide">
+ <property name="label" translatable="yes">Persons on top</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment12">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="bottom_padding">10</property>
+ <property name="left_padding">30</property>
+ <child>
+ <widget class="GtkLabel" id="label72">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Hide left persons tab and show
a button at top</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="check_appearance_encoder_only_bars">
+ <property name="label" translatable="yes">On encoder capture show only
bars</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled"
handler="on_check_appearance_encoder_only_bars_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment_restart">
+ <property name="can_focus">False</property>
+ <property name="top_padding">20</property>
+ <child>
+ <widget class="GtkHBox" id="hbox25">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkLabel" id="label73">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">This change needs
restarting Chronojump</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-dialog-warning</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label70">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Recommended options for small
screens</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">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkButton" id="button_import_configuration">
+ <property name="label" translatable="yes">Import configuration</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_button_import_configuration_clicked"
swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label528">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Appearance</property>
+ </widget>
+ <packing>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox27">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">16</property>
<property name="spacing">25</property>
<child>
<widget class="GtkFrame" id="frame3">
@@ -198,21 +389,6 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <widget class="GtkButton" id="button_import_configuration">
- <property name="label" translatable="yes">Import configuration</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="on_button_import_configuration_clicked"
swapped="no"/>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
</widget>
</child>
</widget>
@@ -236,15 +412,19 @@
</packing>
</child>
</widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
<child>
- <widget class="GtkLabel" id="label528">
+ <widget class="GtkLabel" id="label69">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes">Main</property>
+ <property name="label" translatable="yes">Database</property>
</widget>
<packing>
+ <property name="position">1</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
@@ -827,7 +1007,7 @@ show elevation as:</property>
</child>
</widget>
<packing>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -838,7 +1018,7 @@ show elevation as:</property>
<property name="label" translatable="yes">Jumps</property>
</widget>
<packing>
- <property name="position">1</property>
+ <property name="position">2</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
@@ -1345,7 +1525,7 @@ It starts before and arrives there with some speed.</property>
</child>
</widget>
<packing>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
@@ -1357,7 +1537,7 @@ It starts before and arrives there with some speed.</property>
<property name="label" translatable="yes">Races</property>
</widget>
<packing>
- <property name="position">2</property>
+ <property name="position">3</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
@@ -2169,7 +2349,7 @@ It starts before and arrives there with some speed.</property>
</child>
</widget>
<packing>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
@@ -2180,7 +2360,7 @@ It starts before and arrives there with some speed.</property>
Capture</property>
</widget>
<packing>
- <property name="position">3</property>
+ <property name="position">4</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
@@ -2510,7 +2690,7 @@ Capture</property>
</child>
</widget>
<packing>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
<child>
@@ -2521,7 +2701,7 @@ Capture</property>
Other</property>
</widget>
<packing>
- <property name="position">4</property>
+ <property name="position">5</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
@@ -2590,7 +2770,7 @@ Other</property>
</child>
</widget>
<packing>
- <property name="position">5</property>
+ <property name="position">6</property>
</packing>
</child>
<child>
@@ -2601,7 +2781,7 @@ Other</property>
<property name="label" translatable="yes">Multimedia</property>
</widget>
<packing>
- <property name="position">5</property>
+ <property name="position">6</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
@@ -2983,7 +3163,7 @@ Other</property>
</child>
</widget>
<packing>
- <property name="position">6</property>
+ <property name="position">7</property>
</packing>
</child>
<child>
@@ -2994,7 +3174,7 @@ Other</property>
<property name="label" translatable="yes">Language</property>
</widget>
<packing>
- <property name="position">6</property>
+ <property name="position">7</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
@@ -3268,7 +3448,7 @@ Other</property>
</child>
</widget>
<packing>
- <property name="position">7</property>
+ <property name="position">8</property>
</packing>
</child>
<child>
@@ -3279,7 +3459,7 @@ Other</property>
<property name="label" translatable="yes">Advanced</property>
</widget>
<packing>
- <property name="position">7</property>
+ <property name="position">8</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
diff --git a/po/ca.po b/po/ca.po
index 515953b..23ac95a 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -3098,7 +3098,9 @@ msgstr "Mostrar l'inici i la duració de cada repetició"
msgid ""
"Encoder\n"
"Capture"
-msgstr "Captura d'encoder"
+msgstr ""
+"Encoder\n"
+"Captura"
#: ../glade/preferences_win.glade.h:68
msgid "Propulsive"
diff --git a/src/config.cs b/src/config.cs
index 3240a29..b4149e5 100644
--- a/src/config.cs
+++ b/src/config.cs
@@ -57,6 +57,7 @@ public class Config
RunScriptOnExit = "";
}
+ /*
public void Read()
{
string contents = Util.ReadFile(UtilAll.GetConfigFileName(), false);
@@ -105,7 +106,8 @@ public class Config
}
}
}
-
+ */
+ /*
public static void UpdateField(string field, string text)
{
//adapted from
@@ -166,6 +168,7 @@ public class Config
"RunScriptOnExit = " + RunScriptOnExit.ToString() + "\n"
);
}
+ */
~Config() {}
}
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index ac37e99..48460cd 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -69,7 +69,12 @@ public partial class ChronoJumpWindow
[Widget] Gtk.HBox hbox_other;
[Widget] Gtk.Notebook notebook_capture_analyze; //not encoder
-
+ [Widget] Gtk.HBox hbox_contacts_sup_capture_analyze_two_buttons;
+ [Widget] Gtk.RadioButton radio_mode_contacts_capture;
+ [Widget] Gtk.RadioButton radio_mode_contacts_analyze;
+ [Widget] Gtk.RadioButton radio_mode_contacts_jumps_profile;
+ [Widget] Gtk.RadioButton radio_mode_contacts_sprint;
+
[Widget] Gtk.Label label_version;
[Widget] Gtk.Image image_selector_start_jumps;
[Widget] Gtk.Image image_selector_start_runs;
@@ -711,6 +716,8 @@ public partial class ChronoJumpWindow
LogB.Information (string.Format(Catalog.GetString("Chronojump database version file: {0}"),
preferences.databaseVersion));
+ configInitFromPreferences();
+
checkbutton_allow_finish_rj_after_time.Active = preferences.allowFinishRjAfterTime;
//---- video ----
@@ -932,9 +939,13 @@ public partial class ChronoJumpWindow
}
}
- void label_person_change() {
- label_encoder_person_name.Text = "<b>" + currentPerson.Name + "</b>";
- label_encoder_person_name.UseMarkup = true;
+ void label_person_change()
+ {
+ label_top_person_name.Text = "<b>" + currentPerson.Name + "</b>";
+ label_top_person_name.UseMarkup = true;
+
+ label_top_encoder_person_name.Text = "<b>" + currentPerson.Name + "</b>";
+ label_top_encoder_person_name.UseMarkup = true;
}
private void treeview_persons_storeReset()
@@ -2685,11 +2696,14 @@ public partial class ChronoJumpWindow
preferencesWin.Button_accept.Clicked += new EventHandler(on_preferences_accepted);
}
- private void on_preferences_import_configuration (object o, EventArgs args) {
+ private void on_preferences_import_configuration (object o, EventArgs args)
+ {
+ /*
preferencesWin.FakeButtonImported.Clicked -= new
EventHandler(on_preferences_import_configuration);
configInit();
LogB.Information("Initialized configuration");
+ */
}
private void on_preferences_accepted (object o, EventArgs args)
@@ -2703,7 +2717,8 @@ public partial class ChronoJumpWindow
//change language works on windows. On Linux let's change the locale
//if(UtilAll.IsWindows())
// languageChange();
-
+
+ configInitFromPreferences();
if(repetitiveConditionsWin != null)
repetitiveConditionsWin.VolumeOn = preferences.volumeOn;
@@ -2788,28 +2803,35 @@ public partial class ChronoJumpWindow
if(m == Constants.Menuitem_modes.JUMPSSIMPLE || m == Constants.Menuitem_modes.JUMPSREACTIVE)
{
notebook_sup.CurrentPage = 0;
- notebook_capture_analyze.ShowTabs = true;
+ //notebook_capture_analyze.ShowTabs = true;
+ hbox_contacts_sup_capture_analyze_two_buttons.Visible = true;
if(m == Constants.Menuitem_modes.JUMPSSIMPLE)
{
menuitem_mode_selected_jumps_simple.Visible = true;
notebooks_change(0);
on_extra_window_jumps_test_changed(new object(), new EventArgs());
hbox_results_legend.Visible = true;
- notebook_capture_analyze.GetNthPage(2).Show(); //show jumpsProfile on jumps
simple
+ radio_mode_contacts_jumps_profile.Show();
} else
{
menuitem_mode_selected_jumps_reactive.Visible = true;
notebooks_change(1);
on_extra_window_jumps_rj_test_changed(new object(), new EventArgs());
hbox_results_legend.Visible = false;
- notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on jumps
reactive
+
+ radio_mode_contacts_jumps_profile.Hide();
+ if(radio_mode_contacts_jumps_profile.Active)
+ radio_mode_contacts_capture.Active = true;
}
- notebook_capture_analyze.GetNthPage(3).Hide(); //hide sprint page
+ radio_mode_contacts_sprint.Hide();
+ if(radio_mode_contacts_sprint.Active)
+ radio_mode_contacts_capture.Active = true;
}
else if(m == Constants.Menuitem_modes.RUNSSIMPLE || m ==
Constants.Menuitem_modes.RUNSINTERVALLIC)
{
notebook_sup.CurrentPage = 0;
- notebook_capture_analyze.ShowTabs = true;
+ //notebook_capture_analyze.ShowTabs = true;
+ hbox_contacts_sup_capture_analyze_two_buttons.Visible = true;
if(m == Constants.Menuitem_modes.RUNSSIMPLE)
{
@@ -2817,7 +2839,10 @@ public partial class ChronoJumpWindow
notebooks_change(2);
on_extra_window_runs_test_changed(new object(), new EventArgs());
hbox_results_legend.Visible = true;
- notebook_capture_analyze.GetNthPage(3).Hide(); //hide sprint page
+
+ radio_mode_contacts_sprint.Hide();
+ if(radio_mode_contacts_sprint.Active)
+ radio_mode_contacts_capture.Active = true;
}
else
{
@@ -2826,9 +2851,11 @@ public partial class ChronoJumpWindow
on_extra_window_runs_interval_test_changed(new object(), new EventArgs());
hbox_results_legend.Visible = false;
createTreeView_runs_interval_sprint (treeview_runs_interval_sprint);
- notebook_capture_analyze.GetNthPage(3).Show(); //show sprint page
+ radio_mode_contacts_sprint.Show();
}
- notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on runs
+ radio_mode_contacts_jumps_profile.Hide();
+ if(radio_mode_contacts_jumps_profile.Active)
+ radio_mode_contacts_capture.Active = true;
}
else if(m == Constants.Menuitem_modes.POWERGRAVITATORY || m ==
Constants.Menuitem_modes.POWERINERTIAL)
{
@@ -2957,7 +2984,8 @@ public partial class ChronoJumpWindow
radio_mode_reaction_times_small.Active = true;
notebook_capture_analyze.CurrentPage = 0;
- notebook_capture_analyze.ShowTabs = false; //only capture tab is shown (only valid
for "OTHER" tests)
+ //notebook_capture_analyze.ShowTabs = false; //only capture tab is shown (only valid
for "OTHER" tests)
+ hbox_contacts_sup_capture_analyze_two_buttons.Visible = false;
//notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on other tests
}
@@ -6328,7 +6356,29 @@ LogB.Debug("X");
jumpsProfileDo(false); //do not calculate data
//data is calculated on switch page (at notebook_capture_analyze) or on change person
}
-
+
+
+ private void on_radio_mode_contacts_capture_toggled (object o, EventArgs args)
+ {
+ if(radio_mode_contacts_capture.Active)
+ notebook_capture_analyze.CurrentPage = 0;
+ }
+ private void on_radio_mode_contacts_analyze_toggled (object o, EventArgs args)
+ {
+ if(radio_mode_contacts_analyze.Active)
+ notebook_capture_analyze.CurrentPage = 1;
+ }
+ private void on_radio_mode_contacts_jumps_profile_toggled (object o, EventArgs args)
+ {
+ if(radio_mode_contacts_jumps_profile.Active)
+ notebook_capture_analyze.CurrentPage = 2;
+ }
+ private void on_radio_mode_contacts_sprint_toggled (object o, EventArgs args)
+ {
+ if(radio_mode_contacts_sprint.Active)
+ notebook_capture_analyze.CurrentPage = 3;
+ }
+
private void on_notebook_capture_analyze_switch_page (object o, SwitchPageArgs args) {
if(notebook_capture_analyze.CurrentPage == 2)
jumpsProfileDo(true);
@@ -6444,7 +6494,8 @@ LogB.Debug("X");
menuPersonSelectedSensitive(false);
vbox_execute_test.Sensitive = false;
- label_encoder_person_name.Text = "";
+ label_top_person_name.Text = "";
+ label_top_encoder_person_name.Text = "";
}
private void sensitiveGuiYesPerson () {
@@ -6491,11 +6542,15 @@ LogB.Debug("X");
//jumpsProfile has Sqlite calls. Don't do them while jumping
//but don't unsensitive the notebook because user need to "finish" or cancel"
//notebook_capture_analyze.Sensitive = true;
- notebook_capture_analyze.GetNthPage(1).Hide();
+ radio_mode_contacts_analyze.Hide();
if(radio_menuitem_mode_jumps_simple.Active)
- notebook_capture_analyze.GetNthPage(2).Hide();
+ {
+ radio_mode_contacts_jumps_profile.Hide();
+ }
else if(radio_menuitem_mode_runs_intervallic.Active)
- notebook_capture_analyze.GetNthPage(3).Hide();
+ {
+ radio_mode_contacts_sprint.Hide();
+ }
help_menuitem.Sensitive = false;
@@ -6544,11 +6599,15 @@ LogB.Debug("X");
//jumpsProfile has Sqlite calls. Don't do them while jumping
//but don't unsensitive the notebook because user need to "finish" or cancel"
//notebook_capture_analyze.Sensitive = true;
- notebook_capture_analyze.GetNthPage(1).Show();
+ radio_mode_contacts_analyze.Visible = true;
if(radio_menuitem_mode_jumps_simple.Active)
- notebook_capture_analyze.GetNthPage(2).Show();
+ {
+ radio_mode_contacts_jumps_profile.Show();
+ }
else if(radio_menuitem_mode_runs_intervallic.Active)
- notebook_capture_analyze.GetNthPage(3).Show();
+ {
+ radio_mode_contacts_sprint.Show();
+ }
help_menuitem.Sensitive = true;
@@ -6667,12 +6726,12 @@ LogB.Debug("X");
button_auto_start.Visible = ! start;
hbox_jump_types_options.Visible = ! start;
hbox_jump_auto_controls.Visible = start;
-
- notebook_capture_analyze.GetNthPage(1).Visible = ! start;
- if(radio_menuitem_mode_jumps_simple.Active)
- notebook_capture_analyze.GetNthPage(2).Visible = ! start;
+
+ radio_mode_contacts_analyze.Visible = ! start;
+ if(radio_menuitem_mode_jumps_reactive.Active)
+ radio_mode_contacts_jumps_profile.Visible = ! start;
else if(radio_menuitem_mode_runs_intervallic.Active)
- notebook_capture_analyze.GetNthPage(3).Visible = ! start;
+ radio_mode_contacts_sprint.Visible = ! start;
//when start, put button delete_last_test as not sensitive
//(just for the test previous to the auto process)
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index f679298..9fdca69 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -444,7 +444,7 @@ public partial class ChronoJumpWindow
//done here because in Glade we cannot use the TextBuffer.Changed
textview_encoder_signal_comment.Buffer.Changed += new
EventHandler(on_textview_encoder_signal_comment_key_press_event);
- configInit();
+ //configInit();
array1RM = new ArrayList();
}
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index b65c83e..0187302 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -50,8 +50,10 @@ public partial class ChronoJumpWindow
[Widget] Gtk.HBox hbox_encoder_im_weights_n;
//config.EncoderNameAndCapture
- [Widget] Gtk.Box hbox_encoder_person;
- [Widget] Gtk.Label label_encoder_person_name;
+ [Widget] Gtk.Box hbox_top_person;
+ [Widget] Gtk.Box hbox_top_person_encoder;
+ [Widget] Gtk.Label label_top_person_name;
+ [Widget] Gtk.Label label_top_encoder_person_name;
[Widget] Gtk.Button button_encoder_person_change;
//config.EncoderCaptureShowOnlyBars
@@ -65,11 +67,28 @@ public partial class ChronoJumpWindow
private bool encoderUpdateTreeViewWhileCapturing = true;
Config configChronojump;
- private void configInit()
+ private void configInitRead()
{
//trying new Config class
configChronojump = new Config();
- configChronojump.Read();
+
+ //configChronojump.Read();
+
+ configDo();
+ }
+ private void configInitFromPreferences()
+ {
+ configChronojump = new Config();
+
+ configChronojump.Maximized = preferences.maximized;
+ configChronojump.PersonWinHide = preferences.personWinHide;
+ configChronojump.EncoderCaptureShowOnlyBars = preferences.encoderCaptureShowOnlyBars;
+
+ configDo();
+ }
+
+ private void configDo()
+ {
LogB.Information("Config:\n" + configChronojump.ToString());
/*
@@ -82,6 +101,9 @@ public partial class ChronoJumpWindow
if(configChronojump.Maximized)
app1.Maximize();
+ else
+ app1.Unmaximize();
+
if(configChronojump.CustomButtons)
{
//---- start window ----
@@ -140,14 +162,21 @@ public partial class ChronoJumpWindow
vbox_treeview_encoder_at_second_page.Remove(alignment_treeview_encoder_capture_curves);
vpaned_encoder_main.PackStart(alignment_treeview_encoder_capture_curves);
*/
+
+ //this change needs chronojump reload
}
encoderUpdateTreeViewWhileCapturing = configChronojump.EncoderUpdateTreeViewWhileCapturing;
- if(configChronojump.PersonWinHide) {
- //vbox_persons.Visible = false;
+ if(configChronojump.PersonWinHide)
+ {
notebook_session_person.Visible = false;
- hbox_encoder_person.Visible = true;
+ hbox_top_person.Visible = true;
+ hbox_top_person_encoder.Visible = true;
+ } else {
+ notebook_session_person.Visible = true;
+ hbox_top_person.Visible = false;
+ hbox_top_person_encoder.Visible = false;
}
if(configChronojump.EncoderAnalyzeHide) {
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index a5f4dc7..59c791a 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -40,12 +40,18 @@ using ICSharpCode.SharpZipLib.GZip;
using ICSharpCode.SharpZipLib;
*/
-public class PreferencesWindow {
-
+public class PreferencesWindow
+{
[Widget] Gtk.Window preferences_win;
[Widget] Gtk.Notebook notebook;
- //main tab
+ //appearance tab
+ [Widget] Gtk.CheckButton check_appearance_maximized;
+ [Widget] Gtk.CheckButton check_appearance_person_win_hide;
+ [Widget] Gtk.CheckButton check_appearance_encoder_only_bars;
+ [Widget] Gtk.Alignment alignment_restart;
+
+ //database tab
[Widget] Gtk.Button button_data_folder_open;
[Widget] Gtk.CheckButton check_backup_multimedia_and_encoder;
@@ -153,6 +159,11 @@ public class PreferencesWindow {
ListStore langsStore;
+ const int JUMPSPAGE = 2;
+ const int RUNSPAGE = 3;
+ const int ENCODERCAPTUREPAGE = 4;
+ const int ENCODEROTHERPAGE = 5;
+
PreferencesWindow () {
Glade.XML gladeXML;
@@ -177,18 +188,35 @@ public class PreferencesWindow {
}
if(menu_mode != Constants.Menuitem_modes.JUMPSSIMPLE && menu_mode !=
Constants.Menuitem_modes.JUMPSREACTIVE)
- PreferencesWindowBox.notebook.GetNthPage(1).Hide();
+ PreferencesWindowBox.notebook.GetNthPage(JUMPSPAGE).Hide();
if(menu_mode != Constants.Menuitem_modes.RUNSSIMPLE && menu_mode !=
Constants.Menuitem_modes.RUNSINTERVALLIC)
- PreferencesWindowBox.notebook.GetNthPage(2).Hide();
+ PreferencesWindowBox.notebook.GetNthPage(RUNSPAGE).Hide();
if(menu_mode != Constants.Menuitem_modes.POWERGRAVITATORY && menu_mode !=
Constants.Menuitem_modes.POWERINERTIAL) {
- PreferencesWindowBox.notebook.GetNthPage(3).Hide();
- PreferencesWindowBox.notebook.GetNthPage(4).Hide();
+ PreferencesWindowBox.notebook.GetNthPage(ENCODERCAPTUREPAGE).Hide();
+ PreferencesWindowBox.notebook.GetNthPage(ENCODEROTHERPAGE).Hide();
}
PreferencesWindowBox.preferences = preferences;
PreferencesWindowBox.createComboLanguage();
+ //appearence tab
+ if(preferences.maximized)
+ PreferencesWindowBox.check_appearance_maximized.Active = true;
+ else
+ PreferencesWindowBox.check_appearance_maximized.Active = false;
+
+ if(preferences.personWinHide)
+ PreferencesWindowBox.check_appearance_person_win_hide.Active = true;
+ else
+ PreferencesWindowBox.check_appearance_person_win_hide.Active = false;
+
+ if(preferences.encoderCaptureShowOnlyBars)
+ PreferencesWindowBox.check_appearance_encoder_only_bars.Active = true;
+ else
+ PreferencesWindowBox.check_appearance_encoder_only_bars.Active = false;
+
+
//multimedia tab
if(preferences.volumeOn)
PreferencesWindowBox.checkbutton_volume.Active = true;
@@ -400,7 +428,11 @@ public class PreferencesWindow {
combo_camera.Active = UtilGtk.ComboMakeActive(devices, devices[current]);
}
-
+ private void on_check_appearance_encoder_only_bars_toggled (object obj, EventArgs args)
+ {
+ alignment_restart.Visible = ! check_appearance_encoder_only_bars.Active;
+ }
+
private void on_checkbutton_encoder_capture_fully_extended_toggled(object obj, EventArgs args) {
hbox_encoder_capture_fully_extended.Visible =
checkbutton_encoder_capture_fully_extended.Active;
}
@@ -920,6 +952,21 @@ public class PreferencesWindow {
{
Sqlite.Open();
+
+ //appearance tab
+ if( preferences.maximized != PreferencesWindowBox.check_appearance_maximized.Active ) {
+ SqlitePreferences.Update("maximized",
PreferencesWindowBox.check_appearance_maximized.Active.ToString(), true);
+ preferences.maximized = PreferencesWindowBox.check_appearance_maximized.Active;
+ }
+ if( preferences.personWinHide != PreferencesWindowBox.check_appearance_person_win_hide.Active
) {
+ SqlitePreferences.Update("personWinHide",
PreferencesWindowBox.check_appearance_person_win_hide.Active.ToString(), true);
+ preferences.personWinHide =
PreferencesWindowBox.check_appearance_person_win_hide.Active;
+ }
+ if( preferences.encoderCaptureShowOnlyBars !=
PreferencesWindowBox.check_appearance_encoder_only_bars.Active ) {
+ SqlitePreferences.Update("encoderCaptureShowOnlyBars",
PreferencesWindowBox.check_appearance_encoder_only_bars.Active.ToString(), true);
+ preferences.encoderCaptureShowOnlyBars =
PreferencesWindowBox.check_appearance_encoder_only_bars.Active;
+ }
+
if( preferences.digitsNumber != Convert.ToInt32(UtilGtk.ComboGetActive(combo_decimals)) ) {
SqlitePreferences.Update("digitsNumber", UtilGtk.ComboGetActive(combo_decimals),
true);
preferences.digitsNumber = Convert.ToInt32(UtilGtk.ComboGetActive(combo_decimals));
@@ -929,7 +976,7 @@ public class PreferencesWindow {
SqlitePreferences.Update("showPower",
PreferencesWindowBox.checkbutton_power.Active.ToString(), true);
preferences.showPower = PreferencesWindowBox.checkbutton_power.Active;
}
-
+
if( preferences.showStiffness != PreferencesWindowBox.checkbutton_stiffness.Active ) {
SqlitePreferences.Update("showStiffness",
PreferencesWindowBox.checkbutton_stiffness.Active.ToString(), true);
preferences.showStiffness = PreferencesWindowBox.checkbutton_stiffness.Active;
diff --git a/src/preferences.cs b/src/preferences.cs
index 297e278..176e570 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -27,6 +27,11 @@ public class Preferences
* these are sent to preferences window
*/
+ //appearance tab
+ public bool maximized;
+ public bool personWinHide;
+ public bool encoderCaptureShowOnlyBars;
+
public int digitsNumber;
public bool showPower;
public bool showStiffness;
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 1ec7cba..f19bf16 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -125,7 +125,7 @@ class Sqlite
/*
* Important, change this if there's any update to database
*/
- static string lastChronojumpDatabaseVersion = "1.39";
+ static string lastChronojumpDatabaseVersion = "1.40";
public Sqlite() {
}
@@ -2149,6 +2149,16 @@ class Sqlite
SqliteTrigger.createTableTrigger();
currentVersion = updateVersion("1.39");
}
+ if(currentVersion == "1.39")
+ {
+ LogB.SQL("Added to preferences: maximized, personWinHide,
encoderCaptureShowOnlyBars");
+
+ SqlitePreferences.Insert ("maximized", "False");
+ SqlitePreferences.Insert ("personWinHide", "False");
+ SqlitePreferences.Insert ("encoderCaptureShowOnlyBars", "False");
+
+ currentVersion = updateVersion("1.40");
+ }
// --- add more updates here
@@ -2327,6 +2337,7 @@ class Sqlite
SqliteTrigger.createTableTrigger();
//changes [from - to - desc]
+ //1.39 - 1.40 Converted DB to 1.40 Added to preferences: maximized, personWinHide,
encoderCaptureShowOnlyBars
//1.38 - 1.39 Converted DB to 1.39 Created trigger table
//1.37 - 1.38 Converted DB to 1.38 encoderConfiguration always with 12 values. Empty
encoderConfiguration list_d as '' instead of '-1' or '0'
//1.36 - 1.37 Converted DB to 1.37 Deleted encoderConfiguration variable. Added
encoderConfiguration table (1.36)
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index 89de834..ddc9eb2 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -50,6 +50,10 @@ class SqlitePreferences : Sqlite
else
Insert ("chronopicPort", Constants.ChronopicDefaultPortLinux,
dbcmdTr);
+ //appearance
+ Insert ("maximized", "False", dbcmdTr);
+ Insert ("personWinHide", "False", dbcmdTr);
+ Insert ("encoderCaptureShowOnlyBars", "False", dbcmdTr);
Insert ("digitsNumber", "3", dbcmdTr);
Insert ("showPower", "True", dbcmdTr);
Insert ("showStiffness", "True", dbcmdTr);
@@ -200,7 +204,13 @@ class SqlitePreferences : Sqlite
//LogB.Information(reader[0].ToString() + ":" + reader[1].ToString());
//these are sent to preferences window
- if(reader[0].ToString() == "digitsNumber")
+ if(reader[0].ToString() == "maximized")
+ preferences.maximized = reader[1].ToString() == "True";
+ else if(reader[0].ToString() == "personWinHide")
+ preferences.personWinHide = reader[1].ToString() == "True";
+ else if(reader[0].ToString() == "encoderCaptureShowOnlyBars")
+ preferences.encoderCaptureShowOnlyBars = reader[1].ToString() == "True";
+ else if(reader[0].ToString() == "digitsNumber")
preferences.digitsNumber = Convert.ToInt32(reader[1].ToString());
else if(reader[0].ToString() == "showPower")
preferences.showPower = reader[1].ToString() == "True";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]