[chronojump] Adding a person doesn't need date, sport, specially, level



commit 78e91901561baffdeb557e1e8549a19cd201d92f
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Oct 22 20:28:25 2014 -0300

    Adding a person doesn't need date, sport, specially, level

 glade/chronojump.glade |  121 +++++++++++++++++++++++++++--------------------
 src/gui/person.cs      |   49 +++++---------------
 2 files changed, 81 insertions(+), 89 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 9831d5f..a6dec9b 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -6248,6 +6248,9 @@ Second Chronopic to platforms.</property>
                                                         <child>
                                                           <placeholder/>
                                                         </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
                                                       </widget>
                                                       <packing>
                                                         <property name="expand">True</property>
@@ -6948,6 +6951,9 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             </child>
                                                             <child>
@@ -7782,6 +7788,9 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">2</property>
@@ -8375,6 +8384,9 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">4</property>
@@ -18094,6 +18106,9 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -18595,6 +18610,9 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -19588,6 +19606,9 @@ by you</property>
               <placeholder/>
             </child>
             <child>
+              <placeholder/>
+            </child>
+            <child>
               <widget class="GtkButton" id="button_video_url">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -19638,6 +19659,9 @@ by you</property>
             <child>
               <placeholder/>
             </child>
+            <child>
+              <placeholder/>
+            </child>
           </widget>
           <packing>
             <property name="expand">True</property>
@@ -28309,6 +28333,24 @@ options</property>
                             <child>
                               <placeholder/>
                             </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
                           </widget>
                         </child>
                       </widget>
@@ -29778,19 +29820,6 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkImage" id="image_date">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">False</property>
-                                    <property name="stock">gtk-no</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
-                                    <property name="x_options"/>
-                                    <property name="y_options">GTK_FILL</property>
-                                  </packing>
-                                </child>
-                                <child>
                                   <widget class="GtkHBox" id="hbox28">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
@@ -29893,6 +29922,9 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                                     <property name="y_options">GTK_FILL</property>
                                   </packing>
                                 </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
                               </widget>
                               <packing>
                                 <property name="expand">True</property>
@@ -30200,6 +30232,9 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                                 <child>
                                   <placeholder/>
                                 </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
                               </widget>
                             </child>
                           </widget>
@@ -30454,45 +30489,6 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkImage" id="image_speciallity">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="stock">gtk-no</property>
-                          </widget>
-                          <packing>
-                            <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>
-                        <child>
-                          <widget class="GtkImage" id="image_sport">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="stock">gtk-no</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">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkImage" id="image_level">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="stock">gtk-no</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">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
                           <widget class="GtkLabel" id="label4">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
@@ -30760,6 +30756,18 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -33293,6 +33301,9 @@ show elevation as:</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                       <packing>
                         <property name="left_attach">2</property>
@@ -33458,6 +33469,9 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -33638,6 +33652,9 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
diff --git a/src/gui/person.cs b/src/gui/person.cs
index 3ab46e9..0253d7e 100644
--- a/src/gui/person.cs
+++ b/src/gui/person.cs
@@ -852,11 +852,7 @@ public class PersonAddModifyWindow
        [Widget] Gtk.ComboBox combo_countries;
        
        [Widget] Gtk.Image image_name;
-       [Widget] Gtk.Image image_date;
        [Widget] Gtk.Image image_weight;
-       [Widget] Gtk.Image image_sport;
-       [Widget] Gtk.Image image_speciallity;
-       [Widget] Gtk.Image image_level;
        
        [Widget] Gtk.Button button_zoom;
        [Widget] Gtk.Image image_photo_mini;
@@ -930,7 +926,6 @@ public class PersonAddModifyWindow
                
                createComboSports();
                createComboSpeciallities(-1);
-               image_speciallity.Hide();
                label_speciallity.Hide();
                combo_speciallities.Hide();
                createComboLevels();
@@ -1087,36 +1082,16 @@ public class PersonAddModifyWindow
                        image_weight.Show();
                        allOk = false;
                }
-                               
+       
+               /*              
                if(dateTime != DateTime.MinValue)
                        image_date.Hide();
                else {
                        image_date.Show();
                        allOk = false;
                }
+               */
 
-               if(UtilGtk.ComboGetActive(combo_sports) != Catalog.GetString(Constants.SportUndefined))
-                       image_sport.Hide();
-               else {
-                       image_sport.Show();
-                       allOk = false;
-               }
-
-               if (! label_speciallity.Visible || 
-                               UtilGtk.ComboGetActive(combo_speciallities) != 
Catalog.GetString(Constants.SpeciallityUndefined))
-                       image_speciallity.Hide();
-               else {
-                       image_speciallity.Show();
-                       allOk = false;
-               }
-                               
-               if(Util.FetchID(UtilGtk.ComboGetActive(combo_levels)) != Constants.LevelUndefinedID)
-                       image_level.Hide();
-               else {
-                       image_level.Show();
-                       allOk = false;
-               }
-                               
                //countries is not required to create a person here, but will be required for server
                //&& 
                //UtilGtk.ComboGetActive(combo_continents) != Catalog.GetString(Constants.ContinentUndefined) 
&&
@@ -1591,18 +1566,18 @@ public class PersonAddModifyWindow
 
                if(personExists) 
                        errorMessage += string.Format(Catalog.GetString("Person: '{0}' exists. Please, use 
another name"), Util.RemoveTildeAndColonAndDot(entry1.Text) );
-               else if (sport.Name == Catalog.GetString(Constants.SportUndefined)) 
-                       errorMessage += Catalog.GetString("Please select an sport");
+               //else if (sport.Name == Catalog.GetString(Constants.SportUndefined)) 
+               //      errorMessage += Catalog.GetString("Please select an sport");
 
                //here sport shouldn't be undefined, then check 
                //if it has speciallities and if they are selected
-               else if (sport.HasSpeciallities && 
-                               UtilGtk.ComboGetActive(combo_speciallities) == 
Catalog.GetString(Constants.SpeciallityUndefined))
-                       errorMessage += Catalog.GetString("Please select an speciallity");
-               else if (UtilGtk.ComboGetActive(combo_levels) ==
-                               Constants.LevelUndefinedID.ToString() + ":" + 
-                               Catalog.GetString(Constants.LevelUndefined))
-                       errorMessage += Catalog.GetString("Please select a level");
+               //else if (sport.HasSpeciallities && 
+               //              UtilGtk.ComboGetActive(combo_speciallities) == 
Catalog.GetString(Constants.SpeciallityUndefined))
+               //      errorMessage += Catalog.GetString("Please select an speciallity");
+               //else if (UtilGtk.ComboGetActive(combo_levels) ==
+               //              Constants.LevelUndefinedID.ToString() + ":" + 
+               //              Catalog.GetString(Constants.LevelUndefined))
+               //      errorMessage += Catalog.GetString("Please select a level");
                else {
                        //if weight has changed
                        if(!adding && (double) spinbutton_weight.Value != weightIni) {


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