[chronojump] redone persons bottom gui (main window)



commit b8744830049b35714608404c8aa399e347b68d64
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Feb 20 23:13:26 2017 +0100

    redone persons bottom gui (main window)

 glade/app1.glade                      |  295 ++++++++++++++-------------------
 images/md/ic_weekend_blue_24dp_1x.png |  Bin 0 -> 309 bytes
 src/Makefile.am                       |    1 +
 src/gui/chronojump.cs                 |   15 +-
 src/gui/chronojumpIcons.cs            |    6 +-
 5 files changed, 135 insertions(+), 182 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index d8aa254..ed5464b 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -1993,6 +1993,7 @@ Carles</property>
                                                             <property name="receives_default">True</property>
                                                             <property name="has_tooltip">True</property>
                                                             <property name="tooltip" 
translatable="yes">Manage persons</property>
+                                                            <property name="relief">half</property>
                                                             <property name="xalign">0</property>
                                                             <signal name="clicked" 
handler="on_button_manage_persons_clicked" swapped="no"/>
                                                             <child>
@@ -2063,6 +2064,7 @@ Carles</property>
                                                             <property name="receives_default">True</property>
                                                             <property name="has_tooltip">True</property>
                                                             <property name="tooltip" translatable="yes">New 
person</property>
+                                                            <property name="relief">half</property>
                                                             <signal name="clicked" 
handler="on_person_add_single_from_main_gui" swapped="no"/>
                                                             <child>
                                                             <widget class="GtkVBox" id="vbox91">
@@ -2109,6 +2111,7 @@ Carles</property>
                                                             <property name="receives_default">True</property>
                                                             <property name="has_tooltip">True</property>
                                                             <property name="tooltip" translatable="yes">New 
persons (multiple)</property>
+                                                            <property name="relief">half</property>
                                                             <signal name="clicked" 
handler="on_person_add_multiple_clicked" swapped="no"/>
                                                             <child>
                                                             <widget class="GtkVBox" id="vbox92">
@@ -2191,6 +2194,7 @@ Carles</property>
                                                             <property name="receives_default">True</property>
                                                             <property name="has_tooltip">True</property>
                                                             <property name="tooltip" translatable="yes">Load 
person</property>
+                                                            <property name="relief">half</property>
                                                             <signal name="clicked" 
handler="on_recuperate_person_clicked" swapped="no"/>
                                                             <child>
                                                             <widget class="GtkVBox" id="vbox98">
@@ -2237,6 +2241,7 @@ Carles</property>
                                                             <property name="receives_default">True</property>
                                                             <property name="has_tooltip">True</property>
                                                             <property name="tooltip" translatable="yes">Load 
persons from other session</property>
+                                                            <property name="relief">half</property>
                                                             <signal name="clicked" 
handler="on_recuperate_persons_from_session_clicked" swapped="no"/>
                                                             <child>
                                                             <widget class="GtkVBox" id="vbox99">
@@ -2352,23 +2357,14 @@ Carles</property>
                                                   <widget class="GtkVBox" id="vbox_persons_bottom">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">False</property>
-                                                    <property name="spacing">6</property>
+                                                    <property name="spacing">10</property>
                                                     <child>
-                                                      <widget class="GtkVBox" id="vbox53">
+                                                      <widget class="GtkHBox" id="hbox_persons_bottom">
                                                         <property name="visible">True</property>
                                                         <property name="can_focus">False</property>
+                                                        <property name="spacing">2</property>
                                                         <child>
-                                                          <widget class="GtkHBox" id="hbox35">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">8</property>
-                                                            <child>
-                                                            <widget class="GtkVBox" id="vbox80">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">2</property>
-                                                            <child>
-                                                            <widget class="GtkButton" id="button_persons_up">
+                                                          <widget class="GtkButton" id="button_persons_up">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="can_default">True</property>
@@ -2387,15 +2383,15 @@ Carles</property>
                                                             <property name="icon-size">2</property>
                                                             </widget>
                                                             </child>
-                                                            </widget>
-                                                            <packing>
+                                                          </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_persons_down">
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkButton" id="button_persons_down">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property name="can_default">True</property>
@@ -2414,36 +2410,125 @@ Carles</property>
                                                             <property name="icon-size">2</property>
                                                             </widget>
                                                             </child>
-                                                            </widget>
-                                                            <packing>
+                                                          </widget>
+                                                          <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
                                                             <property name="position">1</property>
-                                                            </packing>
-                                                            </child>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkButton" 
id="button_edit_current_person">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="has_tooltip">True</property>
+                                                            <property name="tooltip" translatable="yes">Edit 
selected person
+&lt;Control&gt;p</property>
+                                                            <property name="relief">half</property>
+                                                            <signal name="clicked" 
handler="on_edit_current_person_clicked_from_main_gui" swapped="no"/>
+                                                            <accelerator key="p" signal="clicked" 
modifiers="GDK_CONTROL_MASK"/>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_edit_current_person">
+                                                            <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>
-                                                            <packing>
+                                                            </child>
+                                                          </widget>
+                                                          <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
+                                                            <property name="position">2</property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkButton" 
id="button_show_all_person_events">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="has_tooltip">True</property>
+                                                            <property name="tooltip" translatable="yes">Show 
all tests of this person</property>
+                                                            <property name="relief">half</property>
+                                                            <signal name="clicked" 
handler="on_show_all_person_events_activate" swapped="no"/>
                                                             <child>
-                                                            <widget class="GtkFrame" id="frame_persons_rest">
+                                                            <widget class="GtkImage" 
id="image_all_persons_events">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="label_xalign">0</property>
-                                                            <property name="shadow_type">in</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="position">3</property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkButton" 
id="button_delete_current_person">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="can_default">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="has_tooltip">True</property>
+                                                            <property name="tooltip" 
translatable="yes">Delete person</property>
+                                                            <property name="relief">half</property>
+                                                            <signal name="clicked" 
handler="on_delete_current_person_from_session_clicked" swapped="no"/>
                                                             <child>
-                                                            <widget class="GtkAlignment" id="alignment9">
+                                                            <widget class="GtkImage" 
id="image_person_delete">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="top_padding">2</property>
-                                                            <property name="bottom_padding">2</property>
-                                                            <property name="left_padding">4</property>
-                                                            <property name="right_padding">4</property>
+                                                            <property name="icon-size">2</property>
+                                                            </widget>
+                                                            </child>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">4</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="hbox_rest_time">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">False</property>
+                                                        <property name="spacing">8</property>
+                                                        <child>
+                                                          <widget class="GtkCheckButton" 
id="checkbutton_rest">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property 
name="receives_default">False</property>
+                                                            <property name="tooltip" 
translatable="yes">Highlight longer resting times than this value</property>
+                                                            <property name="relief">none</property>
+                                                            <property name="active">True</property>
+                                                            <property name="draw_indicator">False</property>
+                                                            <signal name="clicked" 
handler="on_checkbutton_rest_clicked" swapped="no"/>
                                                             <child>
-                                                            <widget class="GtkHBox" id="hbox_rest_time">
+                                                            <widget class="GtkImage" id="image_rest">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property 
name="stock">gtk-missing-image</property>
+                                                            </widget>
+                                                            </child>
+                                                          </widget>
+                                                          <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                          </packing>
+                                                        </child>
+                                                        <child>
+                                                          <widget class="GtkHBox" id="hbox_rest_time_values">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="tooltip" 
translatable="yes">Highlight longer resting times than this value</property>
@@ -2460,6 +2545,7 @@ Carles</property>
                                                             <property name="max_length">2</property>
                                                             <property name="invisible_char">●</property>
                                                             <property name="width_chars">2</property>
+                                                            <property name="xalign">1</property>
                                                             <property 
name="invisible_char_set">True</property>
                                                             <property 
name="primary_icon_activatable">False</property>
                                                             <property 
name="secondary_icon_activatable">False</property>
@@ -2507,6 +2593,7 @@ Carles</property>
                                                             <property name="max_length">2</property>
                                                             <property name="invisible_char">●</property>
                                                             <property name="width_chars">2</property>
+                                                            <property name="xalign">1</property>
                                                             <property 
name="invisible_char_set">True</property>
                                                             <property 
name="primary_icon_activatable">False</property>
                                                             <property 
name="secondary_icon_activatable">False</property>
@@ -2542,153 +2629,17 @@ Carles</property>
                                                             <property name="position">1</property>
                                                             </packing>
                                                             </child>
-                                                            </widget>
-                                                            </child>
-                                                            </widget>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkCheckButton" 
id="checkbutton_rest">
-                                                            <property name="label" 
translatable="yes">Rest</property>
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property 
name="receives_default">False</property>
-                                                            <property name="tooltip" 
translatable="yes">Highlight longer resting times than this value</property>
-                                                            <property name="active">True</property>
-                                                            <property name="draw_indicator">True</property>
-                                                            <signal name="clicked" 
handler="on_checkbutton_rest_clicked" swapped="no"/>
-                                                            </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">1</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">False</property>
-                                                        <property name="fill">False</property>
-                                                        <property name="position">0</property>
-                                                      </packing>
-                                                    </child>
-                                                    <child>
-                                                      <widget class="GtkVBox" id="vbox79">
-                                                        <property name="visible">True</property>
-                                                        <property name="can_focus">False</property>
-                                                        <property name="spacing">2</property>
-                                                        <child>
-                                                          <widget class="GtkHBox" id="hbox_persons_bottom">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">2</property>
-                                                            <child>
-                                                            <widget class="GtkButton" 
id="button_edit_current_person">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <property name="has_tooltip">True</property>
-                                                            <property name="tooltip" translatable="yes">Edit 
selected person
-&lt;Control&gt;p</property>
-                                                            <signal name="clicked" 
handler="on_edit_current_person_clicked_from_main_gui" swapped="no"/>
-                                                            <accelerator key="p" signal="clicked" 
modifiers="GDK_CONTROL_MASK"/>
-                                                            <child>
-                                                            <widget class="GtkImage" 
id="image_edit_current_person">
-                                                            <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="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkButton" 
id="button_show_all_person_events">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <property name="has_tooltip">True</property>
-                                                            <property name="tooltip" translatable="yes">Show 
all tests of this person</property>
-                                                            <signal name="clicked" 
handler="on_show_all_person_events_activate" swapped="no"/>
-                                                            <child>
-                                                            <widget class="GtkImage" 
id="image_all_persons_events">
-                                                            <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="position">1</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkButton" 
id="button_delete_current_person">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="can_default">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <property name="has_tooltip">True</property>
-                                                            <property name="tooltip" 
translatable="yes">Delete person</property>
-                                                            <signal name="clicked" 
handler="on_delete_current_person_from_session_clicked" swapped="no"/>
-                                                            <child>
-                                                            <widget class="GtkImage" 
id="image_person_delete">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="icon-size">2</property>
-                                                            </widget>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">2</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="GtkLabel" id="label_current_person">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="xalign">0</property>
-                                                            <property name="use_markup">True</property>
-                                                            <property name="ellipsize">end</property>
-                                                          </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="pack_type">end</property>
                                                         <property name="position">1</property>
                                                       </packing>
                                                     </child>
diff --git a/images/md/ic_weekend_blue_24dp_1x.png b/images/md/ic_weekend_blue_24dp_1x.png
new file mode 100644
index 0000000..94084fc
Binary files /dev/null and b/images/md/ic_weekend_blue_24dp_1x.png differ
diff --git a/src/Makefile.am b/src/Makefile.am
index d65f8b6..da06e79 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -372,6 +372,7 @@ RESOURCES = \
        ../images/md/ic_group_add_blue_24dp_1x.png,image_group_add.png \
        ../images/md/ic_person_outline_blue_24dp_1x.png,image_person_outline.png \
        ../images/md/ic_people_outline_blue_24dp_1x.png,image_group_outline.png \
+       ../images/md/ic_weekend_blue_24dp_1x.png,image_rest.png \
        ../images/md/ic_looks_one_blue_24dp_1x.png,one.png \
        ../images/md/ic_all_inclusive_blue_24dp_1x.png,cont.png \
        ../images/md/ic_directions_run_blue_24dp_2x.png,run.png \
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 004013f..9c52165 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -204,12 +204,12 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Button button_persons_down;
        [Widget] Gtk.CheckButton checkbutton_rest;
        [Widget] Gtk.HBox hbox_rest_time;
+       [Widget] Gtk.HBox hbox_rest_time_values;
        [Widget] Gtk.SpinButton spinbutton_rest_minutes;
        [Widget] Gtk.SpinButton spinbutton_rest_seconds;
        [Widget] Gtk.Button button_edit_current_person;
        [Widget] Gtk.Button button_show_all_person_events;
        [Widget] Gtk.Button button_delete_current_person;
-       [Widget] Gtk.Label label_current_person;
        
        //tests
        //jumps
@@ -298,7 +298,6 @@ public partial class ChronoJumpWindow
        //widgets for enable or disable
        [Widget] Gtk.Frame frame_persons;
        [Widget] Gtk.Frame frame_persons_top;
-       [Widget] Gtk.Frame frame_persons_rest;
        [Widget] Gtk.HBox hbox_persons_bottom;
        [Widget] Gtk.Button button_recuperate_person;
        [Widget] Gtk.Button button_recuperate_persons_from_session;
@@ -917,8 +916,6 @@ public partial class ChronoJumpWindow
        }
 
        void label_person_change() {
-               label_current_person.Text = "<b>" + currentPerson.Name + "</b>"; 
-               label_current_person.UseMarkup = true; 
                label_encoder_person_name.Text = "<b>" + currentPerson.Name + "</b>"; 
                label_encoder_person_name.UseMarkup = true; 
        }
@@ -3841,10 +3838,10 @@ public partial class ChronoJumpWindow
        private void on_checkbutton_rest_clicked(object o, EventArgs args)
        {
                if(checkbutton_rest.Active) {
-                       hbox_rest_time.Sensitive = true;
+                       hbox_rest_time_values.Sensitive = true;
                        myTreeViewPersons.RestSecondsMark = get_rest_time_in_seconds();
                } else {
-                       hbox_rest_time.Sensitive = false;
+                       hbox_rest_time_values.Sensitive = false;
                        myTreeViewPersons.RestSecondsMark = 0;
                }
        }
@@ -6445,7 +6442,7 @@ LogB.Debug("X");
                {
                        frame_persons_top.Sensitive = false;
                        //treeview_persons is shown (person can be changed)
-                       frame_persons_rest.Sensitive = false;
+                       hbox_rest_time.Sensitive = false;
                        hbox_persons_bottom.Sensitive = false;
                } else
                        frame_persons.Sensitive = false;
@@ -6495,8 +6492,8 @@ LogB.Debug("X");
                //check this is sensitive (because on cont was unsensitive)
                if(! frame_persons_top.Sensitive)
                        frame_persons_top.Sensitive = true;
-               if(! frame_persons_rest.Sensitive)
-                       frame_persons_rest.Sensitive = true;
+               if(! hbox_rest_time.Sensitive)
+                       hbox_rest_time.Sensitive = true;
                if(! hbox_persons_bottom.Sensitive)
                        hbox_persons_bottom.Sensitive = true;
 
diff --git a/src/gui/chronojumpIcons.cs b/src/gui/chronojumpIcons.cs
index 5dbe0f2..eef06c5 100644
--- a/src/gui/chronojumpIcons.cs
+++ b/src/gui/chronojumpIcons.cs
@@ -38,6 +38,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Image image_edit_current_person;
        [Widget] Gtk.Image image_persons_up;
        [Widget] Gtk.Image image_persons_down;
+       [Widget] Gtk.Image image_rest;
        [Widget] Gtk.Image image_all_persons_events;
        [Widget] Gtk.Image image_encoder_1RM_info;
        [Widget] Gtk.Image image_chronopic_connect;
@@ -146,7 +147,10 @@ public partial class ChronoJumpWindow
                image_persons_open_1.Pixbuf = pixbuf;
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_group_outline.png");
                image_persons_open_plus.Pixbuf = pixbuf;
-               
+
+               pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_rest.png");
+               image_rest.Pixbuf = pixbuf;
+
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_visibility.png");
                image_all_persons_events.Pixbuf = pixbuf;
 



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