[chronojump] Fixes on startup selector
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixes on startup selector
- Date: Tue, 17 Jun 2014 08:33:22 +0000 (UTC)
commit feb5950132781457e400cd2bdbe77954f78d109d
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jun 17 10:33:03 2014 +0200
Fixes on startup selector
glade/chronojump.glade | 292 +++++++++++++++++++++++++++++++++++++++++++++---
src/gui/chronojump.cs | 30 +++--
2 files changed, 293 insertions(+), 29 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index e8c47cd..9bcc073 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -257,10 +257,10 @@
</widget>
</child>
<child>
- <widget class="GtkRadioMenuItem" id="radio_menuitem_mode_encoder">
+ <widget class="GtkRadioMenuItem" id="radio_menuitem_mode_power">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Encoder</property>
+ <property name="label" translatable="yes">Power</property>
<property name="use_underline">True</property>
<property name="draw_as_radio">True</property>
<property name="group">radio_menuitem_mode_jumps</property>
@@ -313,10 +313,10 @@
</widget>
</child>
<child>
- <widget class="GtkMenuItem" id="menuitem_mode_selected_encoder">
+ <widget class="GtkMenuItem" id="menuitem_mode_selected_power">
<property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Encoder</property>
+ <property name="label" translatable="yes">Power</property>
</widget>
</child>
<child>
@@ -442,7 +442,7 @@
<widget class="GtkAlignment" id="alignment31">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="bottom_padding">16</property>
+ <property name="bottom_padding">12</property>
<child>
<widget class="GtkHBox" id="hbox121">
<property name="visible">True</property>
@@ -519,10 +519,11 @@
<widget class="GtkLabel" id="label_selector_start">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">Please, select mode:</property>
</widget>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
@@ -562,12 +563,83 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label59">
+ <widget class="GtkVBox" id="vbox87">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xpad">8</property>
- <property name="ypad">8</property>
- <property name="label" translatable="yes">Jumps</property>
+ <child>
+ <widget class="GtkLabel" id="label59">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">8</property>
+ <property name="ypad">8</property>
+ <property name="label" translatable="yes">Jumps</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox129">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkHBox" id="hbox130">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkLabel" id="label88">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">[</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="label89">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">8</property>
+ <property name="ypad">8</property>
+ <property name="label" translatable="yes">Contact
platform</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="label93">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">]</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">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">1</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -609,12 +681,83 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label52">
+ <widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xpad">8</property>
- <property name="ypad">8</property>
- <property name="label" translatable="yes">Runs</property>
+ <child>
+ <widget class="GtkLabel" id="label52">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">8</property>
+ <property name="ypad">8</property>
+ <property name="label" translatable="yes">Runs</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox125">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkHBox" id="hbox127">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkLabel" id="label78">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">[</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="label81">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">8</property>
+ <property name="ypad">8</property>
+ <property name="label"
translatable="yes">Photocells</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="label84">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">]</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">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">1</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -636,7 +779,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked"
handler="on_button_selector_start_encoder_clicked" swapped="no"/>
+ <signal name="clicked" handler="on_button_selector_start_power_clicked"
swapped="no"/>
<child>
<widget class="GtkVBox" id="vbox80">
<property name="visible">True</property>
@@ -647,7 +790,7 @@
<property name="can_focus">False</property>
<property name="xpad">8</property>
<property name="ypad">8</property>
- <property name="label" translatable="yes">Encoder</property>
+ <property name="label" translatable="yes">Power</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -669,6 +812,66 @@
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <widget class="GtkHBox" id="hbox123">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkHBox" id="hbox124">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkLabel" id="label66">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">[</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="label60">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xpad">8</property>
+ <property name="ypad">8</property>
+ <property name="label"
translatable="yes">Encoders</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="label71">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">]</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">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>
</child>
</widget>
@@ -5994,6 +6197,9 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -6616,6 +6822,9 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
<child>
@@ -7372,6 +7581,9 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">2</property>
@@ -7887,6 +8099,9 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">4</property>
@@ -17086,6 +17301,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -17506,6 +17724,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -18360,6 +18581,12 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -25925,6 +26152,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>
@@ -27734,6 +27979,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>
@@ -28213,6 +28461,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>
@@ -30207,6 +30458,9 @@ show elevation as:</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="left_attach">2</property>
@@ -30291,6 +30545,9 @@ show elevation as:</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -30390,6 +30647,9 @@ show elevation as:</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index cb1e5a9..5691874 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -41,12 +41,12 @@ public partial class ChronoJumpWindow
[Widget] Gtk.RadioMenuItem radio_menuitem_mode_jumps;
[Widget] Gtk.RadioMenuItem radio_menuitem_mode_runs;
- [Widget] Gtk.RadioMenuItem radio_menuitem_mode_encoder;
+ [Widget] Gtk.RadioMenuItem radio_menuitem_mode_power;
[Widget] Gtk.RadioMenuItem radio_menuitem_mode_other;
[Widget] Gtk.MenuItem menuitem_mode_selected_jumps;
[Widget] Gtk.MenuItem menuitem_mode_selected_runs;
- [Widget] Gtk.MenuItem menuitem_mode_selected_encoder;
+ [Widget] Gtk.MenuItem menuitem_mode_selected_power;
[Widget] Gtk.MenuItem menuitem_mode_selected_other;
[Widget] Gtk.Notebook notebook_start; //use to display the start images to select different modes
@@ -497,8 +497,6 @@ public partial class ChronoJumpWindow
//show chronojump logo on down-left area
changeTestImage("", "", "LOGO");
- //menuitem_mode = new MenuItem(Catalog.GetString("Mode") + ": " + Catalog.GetString("Contacts
(platform or photocell)"));
-
//white bg
eventbox_image_test.ModifyBg(StateType.Normal, UtilGtk.WHITE);
@@ -2991,16 +2989,16 @@ public partial class ChronoJumpWindow
menuitem_mode_selected_jumps.Visible = false;
menuitem_mode_selected_runs.Visible = false;
- menuitem_mode_selected_encoder.Visible = false;
+ menuitem_mode_selected_power.Visible = false;
menuitem_mode_selected_other.Visible = false;
}
- enum menuitem_modes { JUMPS, RUNS, ENCODER, OTHER }
+ enum menuitem_modes { JUMPS, RUNS, POWER, OTHER }
private void select_menuitem_mode_toggled(menuitem_modes m)
{
menuitem_mode_selected_jumps.Visible = false;
menuitem_mode_selected_runs.Visible = false;
- menuitem_mode_selected_encoder.Visible = false;
+ menuitem_mode_selected_power.Visible = false;
menuitem_mode_selected_other.Visible = false;
if(m == menuitem_modes.JUMPS) {
@@ -3013,9 +3011,9 @@ public partial class ChronoJumpWindow
notebook_sup_contacts.CurrentPage = 1;
menuitem_mode_selected_runs.Visible = true;
radio_mode_runs_small.Active = true;
- } else if(m == menuitem_modes.ENCODER) {
+ } else if(m == menuitem_modes.POWER) {
notebook_sup.CurrentPage = 1;
- menuitem_mode_selected_encoder.Visible = true;
+ menuitem_mode_selected_power.Visible = true;
} else { //m == menuitem_modes.OTHER (contacts / other)
notebook_sup.CurrentPage = 0;
notebook_sup_contacts.CurrentPage = 2;
@@ -3038,8 +3036,8 @@ public partial class ChronoJumpWindow
m = menuitem_modes.JUMPS;
else if(radio_menuitem_mode_runs.Active)
m = menuitem_modes.RUNS;
- else if(radio_menuitem_mode_encoder.Active)
- m = menuitem_modes.ENCODER;
+ else if(radio_menuitem_mode_power.Active)
+ m = menuitem_modes.POWER;
else // if(radio_menuitem_mode_other.Active)
m = menuitem_modes.OTHER;
@@ -3047,15 +3045,21 @@ public partial class ChronoJumpWindow
}
private void on_button_selector_start_jumps_clicked(object o, EventArgs args) {
radio_menuitem_mode_jumps.Active = true;
+
+ //needed if people select again the same option
+ on_radio_menuitem_mode_toggled(o, args);
}
private void on_button_selector_start_runs_clicked(object o, EventArgs args) {
radio_menuitem_mode_runs.Active = true;
+ on_radio_menuitem_mode_toggled(o, args);
}
- private void on_button_selector_start_encoder_clicked(object o, EventArgs args) {
- radio_menuitem_mode_encoder.Active = true;
+ private void on_button_selector_start_power_clicked(object o, EventArgs args) {
+ radio_menuitem_mode_power.Active = true;
+ on_radio_menuitem_mode_toggled(o, args);
}
private void on_button_selector_start_other_clicked(object o, EventArgs args) {
radio_menuitem_mode_other.Active = true;
+ on_radio_menuitem_mode_toggled(o, args);
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]