[longomatch/newui: 47/157] Start with category properties with tables hidden



commit 17ad779b46147658da09e0b7ed232b681cf3da60
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Aug 21 13:16:06 2014 +0200

    Start with category properties with tables hidden

 LongoMatch.GUI/Gui/Component/CategoryProperties.cs |    9 ++++++---
 .../LongoMatch.Gui.Component.CategoryProperties.cs |    3 +++
 LongoMatch.GUI/gtk-gui/gui.stetic                  |    3 +++
 3 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs 
b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
index 7dccd60..40e7f41 100644
--- a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
@@ -82,6 +82,7 @@ namespace LongoMatch.Gui.Component
                                }
                        }
                        CanChangeHotkey = true;
+                       Tagger = null;
                }
 
                public bool Edited {
@@ -109,9 +110,6 @@ namespace LongoMatch.Gui.Component
                                cat = value as Category;
                                card = value as PenaltyCard;
                                score = value as Score;
-                               cattable.Visible = cat != null;
-                               scoretable.Visible = score != null;
-                               cardtable.Visible = card != null;
                                UpdateGui();
                        }
                        get {
@@ -150,6 +148,11 @@ namespace LongoMatch.Gui.Component
                
                private void  UpdateGui() {
                        ignore = true;
+                       
+                       cattable.Visible = cat != null;
+                       scoretable.Visible = score != null;
+                       cardtable.Visible = card != null;
+
                        if (tagger != null) {
                                nameentry.Text = tagger.Name;
                                colorbutton1.Color = Helpers.Misc.ToGdkColor(tagger.Color);
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
index ad626f2..b90467d 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
@@ -491,6 +491,9 @@ namespace LongoMatch.Gui.Component
                        if ((this.Child != null)) {
                                this.Child.ShowAll ();
                        }
+                       this.cattable.Hide ();
+                       this.cardtable.Hide ();
+                       this.scoretable.Hide ();
                        this.Show ();
                }
        }
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 3aa7909..2d00bf5 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -1173,6 +1173,7 @@ Manual</property>
         <child>
           <widget class="Gtk.Table" id="cattable">
             <property name="MemberName" />
+            <property name="Visible">False</property>
             <property name="NRows">7</property>
             <property name="NColumns">2</property>
             <property name="Homogeneous">True</property>
@@ -1531,6 +1532,7 @@ Sort by duration</property>
         <child>
           <widget class="Gtk.Table" id="cardtable">
             <property name="MemberName" />
+            <property name="Visible">False</property>
             <property name="NColumns">2</property>
             <property name="Homogeneous">True</property>
             <property name="RowSpacing">6</property>
@@ -1586,6 +1588,7 @@ Circle</property>
         <child>
           <widget class="Gtk.Table" id="scoretable">
             <property name="MemberName" />
+            <property name="Visible">False</property>
             <property name="NColumns">2</property>
             <property name="Homogeneous">True</property>
             <property name="RowSpacing">6</property>


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