[chronojump] colorized run_type_add and other improvements
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] colorized run_type_add and other improvements
- Date: Fri, 4 Sep 2020 14:35:37 +0000 (UTC)
commit 51d3d132ccb528324bdd39000ab1bff4fa4413e0
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Sep 4 16:35:18 2020 +0200
colorized run_type_add and other improvements
glade/run_type_add.glade | 963 +++++++++++++++++++++++------------------------
src/gui/runType.cs | 35 +-
2 files changed, 505 insertions(+), 493 deletions(-)
---
diff --git a/glade/run_type_add.glade b/glade/run_type_add.glade
index 18547e6b..62c98854 100644
--- a/glade/run_type_add.glade
+++ b/glade/run_type_add.glade
@@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="run_type_add">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
<property name="title" translatable="yes">Create new race type</property>
@@ -17,7 +16,7 @@
<property name="can_focus">False</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkLabel" id="label132">
+ <widget class="GtkLabel" id="label_header">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Create a new race type in the database</property>
@@ -29,600 +28,596 @@
</packing>
</child>
<child>
- <widget class="GtkTable" id="table17">
+ <widget class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">6</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">4</property>
- <property name="row_spacing">4</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">1</property>
+ <property name="shadow_type">in</property>
<child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <widget class="GtkLabel" id="label133">
+ <widget class="GtkViewport" id="viewport1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Name</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label_description">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Description</property>
- </widget>
- <packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow18">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="border_width">4</property>
<child>
- <widget class="GtkTextView" id="textview_description">
+ <widget class="GtkTable" id="table17">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkEntry" id="entry_name">
- <property name="visible">True</property>
- <property name="can_focus">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>
- <signal name="changed" handler="on_entries_required_changed" swapped="no"/>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label_main_options">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Main
-options</property>
- </widget>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkTable" id="table_main_options">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">8</property>
- <property name="n_rows">3</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">6</property>
- <property name="row_spacing">4</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <widget class="GtkLabel" id="label138">
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Type</property>
- </widget>
- <packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label139">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Limited by
-(how it finishes)</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label140">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">value</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox_limited">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkRadioButton" id="radiobutton_limited_tracks">
- <property name="label" translatable="yes">laps</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="active">True</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_radiobutton_limited_tracks_or_time_toggled"
swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="border_width">10</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">10</property>
+ <property name="row_spacing">10</property>
<child>
- <widget class="GtkRadioButton" id="radiobutton_limited_time">
- <property name="label" translatable="yes">time (s)</property>
+ <widget class="GtkLabel" id="label133">
<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>
- <property name="group">radiobutton_limited_tracks</property>
- <signal name="toggled" handler="on_radiobutton_limited_tracks_or_time_toggled"
swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton" id="radiobutton_unlimited">
- <property name="label" translatable="yes">unlimited</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>
- <property name="group">radiobutton_limited_tracks</property>
- <signal name="toggled" handler="on_radiobutton_unlimited_toggled" swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Name</property>
+ <property name="use_markup">True</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
</packing>
</child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton" id="radiobutton_simple">
- <property name="label" translatable="yes">simple</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>
- <signal name="toggled" handler="on_radiobutton_simple_toggled" swapped="no"/>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox_fixed">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<child>
- <widget class="GtkCheckButton" id="checkbutton_limited_fixed">
- <property name="label" translatable="yes">fixed: </property>
+ <widget class="GtkLabel" id="label_description">
<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>
- <signal name="clicked" handler="on_checkbutton_limited_fixed_clicked" swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Description</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="spin_fixed_tracks_or_time">
+ <widget class="GtkEntry" id="entry_name">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">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">1 0 10000 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">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton" id="radiobutton_interval">
- <property name="label" translatable="yes">intervallic</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>
- <property name="group">radiobutton_simple</property>
- <signal name="toggled" handler="on_radiobutton_interval_toggled" swapped="no"/>
- </widget>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label_distance">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Distance</property>
- </widget>
- <packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox80">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">5</property>
- <child>
- <widget class="GtkVBox" id="vbox149">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkRadioButton" id="radiobutton_dist_variable">
- <property name="label" translatable="yes">Variable (user will select distance at
each test)</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>
- <signal name="toggled" handler="on_radiobutton_dist_variable_toggled" swapped="no"/>
- <signal name="toggled" handler="on_entries_required_changed" swapped="no"/>
+ <signal name="changed" handler="on_entries_required_changed" swapped="no"/>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkRadioButton" id="radiobutton_dist_fixed">
- <property name="label" translatable="yes">Fixed (distance will be always the
same)</property>
+ <widget class="GtkLabel" id="label_main_options">
<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>
- <property name="group">radiobutton_dist_variable</property>
- <signal name="toggled" handler="on_radiobutton_dist_fixed_toggled" swapped="no"/>
- <signal name="toggled" handler="on_entries_required_changed" swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Main
+options</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox_distance_fixed">
+ <widget class="GtkTable" id="table_main_options">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">7</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">10</property>
+ <property name="row_spacing">4</property>
<child>
- <widget class="GtkSpinButton" id="spin_distance_fixed">
+ <widget class="GtkLabel" id="label138">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Type</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label139">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Limited by (how it finishes)</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label140">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">value</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox_limited">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkRadioButton" id="radiobutton_limited_tracks">
+ <property name="label" translatable="yes">laps</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="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled"
handler="on_radiobutton_limited_tracks_or_time_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="GtkRadioButton" id="radiobutton_limited_time">
+ <property name="label" translatable="yes">time (s)</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>
+ <property name="group">radiobutton_limited_tracks</property>
+ <signal name="toggled"
handler="on_radiobutton_limited_tracks_or_time_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="radiobutton_unlimited">
+ <property name="label" translatable="yes">unlimited</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>
+ <property name="group">radiobutton_limited_tracks</property>
+ <signal name="toggled" handler="on_radiobutton_unlimited_toggled"
swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="radiobutton_simple">
+ <property name="label" translatable="yes">simple</property>
<property name="visible">True</property>
<property name="can_focus">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">100 0 99999 0.10000000000000001 1 0</property>
- <property name="climb_rate">1</property>
- <property name="digits">2</property>
- <property name="numeric">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_radiobutton_simple_toggled" swapped="no"/>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="padding">8</property>
- <property name="position">0</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="radiobutton_interval">
+ <property name="label" translatable="yes">intervallic</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>
+ <property name="group">radiobutton_simple</property>
+ <signal name="toggled" handler="on_radiobutton_interval_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label142">
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox_fixed">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">(m)</property>
+ <child>
+ <widget class="GtkCheckButton" id="checkbutton_limited_fixed">
+ <property name="label" translatable="yes">fixed: </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>
+ <signal name="clicked" handler="on_checkbutton_limited_fixed_clicked"
swapped="no"/>
+ </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_fixed_tracks_or_time">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">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">1 0 10000 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">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>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkRadioButton" id="radiobutton_dist_different">
- <property name="label" translatable="yes">Different (each lap have different distance
-suitable for agility tests and RSA)</property>
+ <widget class="GtkLabel" id="label_distance">
<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>
- <property name="group">radiobutton_dist_variable</property>
- <signal name="toggled" handler="on_radiobutton_dist_different_toggled" swapped="no"/>
- <signal name="toggled" handler="on_radiobutton_dist_different_toggled"
object="on_entries_required_changed" swapped="yes"/>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Distance</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
</packing>
</child>
<child>
- <widget class="GtkAlignment" id="alignment_vbox_distance_variable">
+ <widget class="GtkHBox" id="hbox80">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="left_padding">20</property>
+ <property name="spacing">5</property>
<child>
- <widget class="GtkVBox" id="vbox_distance_variable">
+ <widget class="GtkVBox" id="vbox149">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="spacing">4</property>
<child>
- <widget class="GtkHBox" id="hbox_distance_different_tracks:number">
+ <widget class="GtkRadioButton" id="radiobutton_dist_variable">
+ <property name="label" translatable="yes">Variable (user will select
distance at each test)</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">8</property>
- <child>
- <widget class="GtkLabel" id="label547">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Number of different
laps</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkComboBox" id="combo_distance_different_tracks">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="items">2
-3
-4
-5
-6
-7
-8
-9
-10</property>
- <signal name="changed"
handler="on_combo_distance_different_tracks_changed" swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_help_rsa">
- <property name="label" translatable="yes">Help RSA</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked" handler="on_button_help_rsa_clicked"
swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">2</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_radiobutton_dist_variable_toggled"
swapped="no"/>
+ <signal name="toggled" handler="on_entries_required_changed" swapped="no"/>
</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>
<child>
- <widget class="GtkHBox" id="hbox288">
+ <widget class="GtkRadioButton" id="radiobutton_dist_fixed">
+ <property name="label" translatable="yes">Fixed (distance will be always the
same)</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>
+ <property name="group">radiobutton_dist_variable</property>
+ <signal name="toggled" handler="on_radiobutton_dist_fixed_toggled"
swapped="no"/>
+ <signal name="toggled" handler="on_entries_required_changed" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment_hbox_distance_fixed">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">8</property>
+ <property name="left_padding">30</property>
<child>
- <widget class="GtkLabel" id="label545">
+ <widget class="GtkHBox" id="hbox_distance_fixed">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Distance of each lap</property>
+ <property name="spacing">7</property>
+ <child>
+ <widget class="GtkSpinButton" id="spin_distance_fixed">
+ <property name="visible">True</property>
+ <property name="can_focus">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">100 0 99999 0.10000000000000001 1
0</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">2</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="label142">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">(m)</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">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label546">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">(m)</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>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="radiobutton_dist_different">
+ <property name="label" translatable="yes">Different (each lap have different
distance
+suitable for agility tests and RSA)</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>
+ <property name="group">radiobutton_dist_variable</property>
+ <signal name="toggled" handler="on_radiobutton_dist_different_toggled"
swapped="no"/>
+ <signal name="toggled" handler="on_radiobutton_dist_different_toggled"
object="on_entries_required_changed" swapped="yes"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox_distance_variable">
+ <widget class="GtkAlignment" id="alignment_vbox_distance_variable">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="left_padding">30</property>
<child>
- <placeholder/>
+ <widget class="GtkVBox" id="vbox_distance_variable">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkHBox" id="hbox_distance_different_tracks">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">8</property>
+ <child>
+ <widget class="GtkLabel" id="label547">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Number of different
laps</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="combo_distance_different_tracks">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="items">2
+3
+4
+5
+6
+7
+8
+9
+10</property>
+ <signal name="changed"
handler="on_combo_distance_different_tracks_changed" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_help_rsa">
+ <property name="label" translatable="yes">Help RSA</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="on_button_help_rsa_clicked"
swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox288">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">8</property>
+ <child>
+ <widget class="GtkLabel" id="label545">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Distance of each
lap</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="label546">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">(m)</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>
+ <child>
+ <widget class="GtkHBox" id="hbox_distance_variable">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
</child>
</widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">4</property>
</packing>
</child>
</widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
</child>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">4</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow18">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <widget class="GtkTextView" id="textview_description">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
</widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
</child>
</widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHSeparator" id="hseparator7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
</child>
<child>
- <widget class="GtkHSeparator" id="hseparator8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
+ <placeholder/>
<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>
- <property name="x_options">GTK_FILL</property>
+ <property name="type">label_item</property>
</packing>
</child>
</widget>
diff --git a/src/gui/runType.cs b/src/gui/runType.cs
index 3f35e29f..008f4959 100644
--- a/src/gui/runType.cs
+++ b/src/gui/runType.cs
@@ -38,6 +38,7 @@ public class RunTypeAddWindow
public Gtk.Button fakeButtonAccept;
[Widget] Gtk.Entry entry_name;
+ [Widget] Gtk.Label label_header;
[Widget] Gtk.Label label_main_options;
[Widget] Gtk.Table table_main_options;
@@ -55,10 +56,10 @@ public class RunTypeAddWindow
[Widget] Gtk.RadioButton radiobutton_dist_fixed;
[Widget] Gtk.RadioButton radiobutton_dist_different;
- [Widget] Gtk.HBox hbox_distance_fixed;
+ [Widget] Gtk.Alignment alignment_hbox_distance_fixed;
[Widget] Gtk.SpinButton spin_distance_fixed;
- [Widget] Gtk.VBox vbox_distance_variable;
+ [Widget] Gtk.Alignment alignment_vbox_distance_variable;
[Widget] Gtk.ComboBox combo_distance_different_tracks;
[Widget] Gtk.HBox hbox_distance_variable;
@@ -93,6 +94,12 @@ public class RunTypeAddWindow
//put an icon to window
UtilGtk.IconWindow(run_type_add);
+
+ //manage window color
+ if(! Config.UseSystemColor) {
+ UtilGtk.WindowColor(run_type_add, Config.ColorBackground);
+ UtilGtk.ContrastLabelsLabel(Config.ColorBackgroundIsDark, label_header);
+ }
}
static public RunTypeAddWindow Show (Gtk.Window parent, bool simple)
@@ -101,8 +108,8 @@ public class RunTypeAddWindow
RunTypeAddWindowBox = new RunTypeAddWindow (parent, simple);
}
- RunTypeAddWindowBox.run_type_add.Show ();
RunTypeAddWindowBox.fillDialog (simple);
+ RunTypeAddWindowBox.run_type_add.Show ();
return RunTypeAddWindowBox;
}
@@ -130,8 +137,18 @@ public class RunTypeAddWindow
//System.Globalization.NumberFormatInfo localeInfo = new
System.Globalization.NumberFormatInfo();
radiobutton_dist_different.Visible = ! simple;
+ /*
+ instead of hidden, made unsensitive to have no problems on being inside a viewport
hbox_distance_fixed.Hide();
vbox_distance_variable.Hide();
+ */
+ alignment_hbox_distance_fixed.Sensitive = false;
+ alignment_vbox_distance_variable.Sensitive = false;
+ if(simple)
+ {
+ alignment_hbox_distance_fixed.Hide();
+ alignment_vbox_distance_variable.Hide();
+ }
dd0 = new Gtk.Entry(); dd0.Changed += new EventHandler(on_entries_required_changed);
dd1 = new Gtk.Entry(); dd1.Changed += new EventHandler(on_entries_required_changed);
@@ -295,20 +312,20 @@ public class RunTypeAddWindow
void on_radiobutton_dist_variable_toggled (object o, EventArgs args)
{
- hbox_distance_fixed.Hide();
- vbox_distance_variable.Hide();
+ alignment_hbox_distance_fixed.Sensitive = false;
+ alignment_vbox_distance_variable.Sensitive = false;
}
void on_radiobutton_dist_fixed_toggled (object o, EventArgs args)
{
- hbox_distance_fixed.Show();
- vbox_distance_variable.Hide();
+ alignment_hbox_distance_fixed.Sensitive = true;
+ alignment_vbox_distance_variable.Sensitive = false;
}
void on_radiobutton_dist_different_toggled (object o, EventArgs args)
{
- hbox_distance_fixed.Hide();
- vbox_distance_variable.Show();
+ alignment_hbox_distance_fixed.Sensitive = false;
+ alignment_vbox_distance_variable.Sensitive = true;
combo_distance_different_tracks.Sensitive = true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]