[chronojump] Better GUI on language change
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Better GUI on language change
- Date: Fri, 24 Jul 2015 11:56:57 +0000 (UTC)
commit 6509a070b709d3e5471a737f01c629e33389663f
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Jul 24 13:56:42 2015 +0200
Better GUI on language change
encoder/util.R | 7 --
glade/chronojump.glade | 182 ++++++++++++++++++++++++++++++++----------------
src/gui/preferences.cs | 29 +++++---
3 files changed, 142 insertions(+), 76 deletions(-)
---
diff --git a/encoder/util.R b/encoder/util.R
index 47a5ae4..d84f29b 100644
--- a/encoder/util.R
+++ b/encoder/util.R
@@ -405,7 +405,6 @@ kinematicsF <- function(displacement, massBody, massExtra, exercisePercentBodyWe
#speed comes in mm/ms when derivate to accel its mm/ms^2 to convert it to m/s^2 need to *1000 because
it's quadratic
accel$y <- accel$y * 1000
- errorSearching = FALSE
eccentric = 0
concentric = 0
@@ -530,12 +529,6 @@ findECPhases <- function(displacement,speed) {
crossMinRow=which(speed.ext$cross[,1] > searchMinSpeedEnd & speed.ext$cross[,1] < searchMaxSpeedIni)
#print(crossMinRow)
- #if (length(crossMinRow) > 0) {
- # print(crossMinRow)
- #} else {
- # propulsiveEnd = length(displacement)
- # errorSearching = TRUE
- #}
eccentric = 0
isometric = 0
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 9da6c19..68a2e8f 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -7577,6 +7577,9 @@ after time</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
<child>
@@ -8949,6 +8952,9 @@ after time</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">2</property>
@@ -9962,6 +9968,9 @@ after time</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">4</property>
@@ -21428,6 +21437,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -22340,6 +22352,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -23744,6 +23759,9 @@ by you</property>
<placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkButton" id="button_video_url">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -24205,6 +24223,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -35456,6 +35477,24 @@ options</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -37067,6 +37106,18 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -38455,9 +38506,6 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<placeholder/>
</child>
<child>
- <placeholder/>
- </child>
- <child>
<widget class="GtkLabel" id="label218">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -39369,6 +39417,9 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -41410,38 +41461,15 @@ It starts before and arrives there with some speed.</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
- <widget class="GtkHBox" id="hbox14">
+ <widget class="GtkLabel" id="label48">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <widget class="GtkLabel" id="label48">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Language</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="label49">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">This change needs restart</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Language</property>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
@@ -41595,39 +41623,15 @@ It starts before and arrives there with some speed.</property>
<property name="can_focus">False</property>
<property name="spacing">10</property>
<child>
- <widget class="GtkHBox" id="hbox1">
+ <widget class="GtkLabel" id="label20">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <widget class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Translate statistics graphs</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="label36">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">This change needs restart</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Translate statistics graphs</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -41639,6 +41643,7 @@ It starts before and arrives there with some speed.</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_radio_translate_toggled" swapped="no"/>
</widget>
<packing>
<property name="expand">True</property>
@@ -41654,6 +41659,7 @@ It starts before and arrives there with some speed.</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">radio_graphs_translate</property>
+ <signal name="toggled" handler="on_radio_translate_toggled" swapped="no"/>
</widget>
<packing>
<property name="expand">True</property>
@@ -41668,6 +41674,53 @@ It starts before and arrives there with some speed.</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <widget class="GtkHBox" id="hbox_need_restart">
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkHBox" id="hbox14">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">20</property>
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-info</property>
+ <property name="icon-size">6</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="label49">
+ <property name="visible">True</property>
+ <property name="can_focus">False</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">1</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="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="position">5</property>
@@ -43026,6 +43079,9 @@ It starts before and arrives there with some speed.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="left_attach">2</property>
@@ -43602,6 +43658,9 @@ It starts before and arrives there with some speed.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -44193,6 +44252,9 @@ It starts before and arrives there with some speed.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index 01b1771..aa7b1e6 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -101,20 +101,21 @@ public class PreferencesWindow {
//camera tab
[Widget] Gtk.Box hbox_combo_camera;
[Widget] Gtk.ComboBox combo_camera;
-
- //other tab
- [Widget] Gtk.ComboBox combo_decimals;
- [Widget] Gtk.CheckButton checkbutton_ask_deletion;
- [Widget] Gtk.RadioButton radio_export_latin;
- [Widget] Gtk.RadioButton radio_export_non_latin;
- [Widget] Gtk.RadioButton radio_graphs_translate;
- [Widget] Gtk.RadioButton radio_graphs_no_translate;
-
+ //language tab
[Widget] Gtk.Box hbox_combo_language;
[Widget] Gtk.ComboBox combo_language;
[Widget] Gtk.RadioButton radio_language_detected;
[Widget] Gtk.RadioButton radio_language_force;
+ [Widget] Gtk.RadioButton radio_graphs_translate;
+ [Widget] Gtk.RadioButton radio_graphs_no_translate;
+ [Widget] Gtk.Box hbox_need_restart;
+
+ //other tab
+ [Widget] Gtk.ComboBox combo_decimals;
+ [Widget] Gtk.CheckButton checkbutton_ask_deletion;
+ [Widget] Gtk.RadioButton radio_export_latin;
+ [Widget] Gtk.RadioButton radio_export_non_latin;
[Widget] Gtk.Button button_accept;
@@ -349,11 +350,21 @@ public class PreferencesWindow {
}
combo_language.Model = langsStore;
combo_language.Active = active;
+ combo_language.Changed += combo_language_changed;
}
private void on_radio_language_toggled (object obj, EventArgs args) {
hbox_combo_language.Sensitive = radio_language_force.Active;
+
+ hbox_need_restart.Visible = true;
+ }
+ private void on_radio_translate_toggled (object obj, EventArgs args) {
+ hbox_need_restart.Visible = true;
}
+ private void combo_language_changed (object obj, EventArgs args) {
+ hbox_need_restart.Visible = true;
+ }
+
string getSelectedLanguage()
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]