[longomatch] Show a "no data" label when no subcats are available in stats



commit 934cabc14cb3aeceaf23f2b98a64a64881d22edc
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Aug 6 11:52:20 2013 +0200

    Show a "no data" label when no subcats are available in stats

 .../Gui/Component/Stats/CategoryViewer.cs          |    1 +
 ...ongoMatch.Gui.Component.Stats.CategoryViewer.cs |    9 +++++++++
 LongoMatch.GUI/gtk-gui/gui.stetic                  |   10 +++++++++-
 3 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/Stats/CategoryViewer.cs 
b/LongoMatch.GUI/Gui/Component/Stats/CategoryViewer.cs
index 13db5aa..7488bc3 100644
--- a/LongoMatch.GUI/Gui/Component/Stats/CategoryViewer.cs
+++ b/LongoMatch.GUI/Gui/Component/Stats/CategoryViewer.cs
@@ -63,6 +63,7 @@ namespace LongoMatch.Gui.Component.Stats
                                        vbox1.Remove (child);
                        }
                        subcatViewers = new List<SubCategoryViewer>();
+                       nodatalabel.Visible = stats.SubcategoriesStats.Count == 0;
                        foreach (SubCategoryStat st in stats.SubcategoriesStats) {
                                SubCategoryViewer subcatviewer = new SubCategoryViewer();
                                subcatviewer.LoadStats (st);
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.CategoryViewer.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.CategoryViewer.cs
index cd7bd35..06244ac 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.CategoryViewer.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.CategoryViewer.cs
@@ -19,6 +19,7 @@ namespace LongoMatch.Gui.Component.Stats
                private global::Gtk.Alignment GtkAlignment1;
                private global::LongoMatch.Gui.Component.PlaysCoordinatesTagger awaytagger;
                private global::Gtk.Label GtkLabel1;
+               private global::Gtk.Label nodatalabel;
                
                protected virtual void Build ()
                {
@@ -111,6 +112,14 @@ namespace LongoMatch.Gui.Component.Stats
                        this.vbox1.Add (this.hbox1);
                        global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1]));
                        w11.Position = 0;
+                       // Container child vbox1.Gtk.Box+BoxChild
+                       this.nodatalabel = new global::Gtk.Label ();
+                       this.nodatalabel.Name = "nodatalabel";
+                       this.nodatalabel.LabelProp = global::Mono.Unix.Catalog.GetString ("No data 
available");
+                       this.nodatalabel.Justify = ((global::Gtk.Justification)(2));
+                       this.vbox1.Add (this.nodatalabel);
+                       global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox1 
[this.nodatalabel]));
+                       w12.Position = 1;
                        w1.Add (this.vbox1);
                        this.scrolledwindow1.Add (w1);
                        this.Add (this.scrolledwindow1);
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index b83c334..e8f8207 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -8824,7 +8824,15 @@ Defining &lt;b&gt; Game Units &lt;/b&gt; will help you during the analysis to in
                   </packing>
                 </child>
                 <child>
-                  <placeholder />
+                  <widget class="Gtk.Label" id="nodatalabel">
+                    <property name="MemberName" />
+                    <property name="LabelProp" translatable="yes">No data available</property>
+                    <property name="Justify">Center</property>
+                  </widget>
+                  <packing>
+                    <property name="Position">1</property>
+                    <property name="AutoSize">False</property>
+                  </packing>
                 </child>
               </widget>
             </child>


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