[chronojump] button_run_speed_start_help gives info on speed start



commit 98f310d3512852509a64f8ac300de19cfe1b6be6
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Feb 5 15:17:34 2018 +0100

    button_run_speed_start_help gives info on speed start

 glade/preferences_win.glade |   45 ++++++++++++++++++++++++++++++++++++++----
 src/gui/preferences.cs      |   13 +++++++++++-
 2 files changed, 52 insertions(+), 6 deletions(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index c184a13..f767760 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -1057,14 +1057,49 @@ show elevation as:</property>
                     <property name="can_focus">False</property>
                     <property name="spacing">6</property>
                     <child>
-                      <widget class="GtkLabel" id="label104">
+                      <widget class="GtkHBox" id="hbox45">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="has_tooltip">True</property>
-                        <property name="tooltip" translatable="yes">"Speed start" means when athlete does 
not start with "contact" on the first platform or photocell.
+                        <property name="spacing">8</property>
+                        <child>
+                          <widget class="GtkLabel" id="label104">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="has_tooltip">True</property>
+                            <property name="tooltip" translatable="yes">"Speed start" means when athlete 
does not start with "contact" on the first platform or photocell.
 It starts before and arrives there with some speed.</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">What to do on speed start?</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">What to do on speed start?</property>
+                          </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_run_speed_start_help">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="has_tooltip">True</property>
+                            <signal name="clicked" handler="on_button_run_speed_start_help_clicked" 
swapped="no"/>
+                            <child>
+                              <widget class="GtkImage" id="image_run_speed_start_help">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="stock">gtk-missing-image</property>
+                                <property name="icon-size">2</property>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">10</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
                       </widget>
                       <packing>
                         <property name="expand">False</property>
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index b92a2a3..779c42b 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -81,6 +81,7 @@ public class PreferencesWindow
        [Widget] Gtk.RadioButton radio_do_not_use_heights_on_jump_indexes;
                        
        //runs tab      
+       [Widget] Gtk.Image image_run_speed_start_help;
        [Widget] Gtk.RadioButton radio_speed_ms;
        [Widget] Gtk.RadioButton radio_speed_km;
        [Widget] Gtk.RadioButton radio_runs_speed_start_arrival; 
@@ -413,6 +414,7 @@ public class PreferencesWindow
                PreferencesWindowBox.image_races_intervallic.Pixbuf = pixbuf;
 
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_info.png");
+               PreferencesWindowBox.image_run_speed_start_help.Pixbuf = pixbuf;
                PreferencesWindowBox.image_encoder_inactivity_help.Pixbuf = pixbuf;
                PreferencesWindowBox.image_encoder_capture_cut_by_triggers_help.Pixbuf = pixbuf;
 
@@ -1028,7 +1030,16 @@ public class PreferencesWindow
                else
                        hbox_indexes.Hide();
        }
-       
+
+       private void on_button_run_speed_start_help_clicked (object o, EventArgs args)
+       {
+               new DialogMessage(Constants.MessageTypes.INFO,
+                               Catalog.GetString(
+                                       "\"Speed start\" means when athlete does not start with \"contact\" 
on the " +
+                                       "first platform or photocell.\n" +
+                                       "It starts before and arrives there with some speed."));
+       }
+
        private void on_checkbutton_runs_prevent_double_contact_toggled (object o, EventArgs args) {
                vbox_runs_prevent_double_contact.Visible = checkbutton_runs_prevent_double_contact.Active;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]