[longomatch] Redraw category objects when changed



commit a7e7ddd0d4f24551a8efdce88bafc35ce2519d6a
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Oct 14 17:45:41 2014 +0200

    Redraw category objects when changed

 LongoMatch.Drawing/Widgets/DashboardCanvas.cs      |    2 +-
 LongoMatch.GUI/Gui/Component/DashboardWidget.cs    |   14 +--------
 .../LongoMatch.Gui.Component.DashboardWidget.cs    |   30 ++++++++++----------
 LongoMatch.GUI/gtk-gui/gui.stetic                  |    2 +-
 4 files changed, 18 insertions(+), 30 deletions(-)
---
diff --git a/LongoMatch.Drawing/Widgets/DashboardCanvas.cs b/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
index d8de0a3..c80f725 100644
--- a/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
+++ b/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
@@ -127,7 +127,7 @@ namespace LongoMatch.Drawing.Widgets
                        if (b is AnalysisEventButton) {
                                CategoryObject co = Objects.OfType<CategoryObject> ().FirstOrDefault (o => 
o.Button == b);
                                if (co != null) {
-                                       co.ReDraw ();
+                                       co.ReDrawObject ();
                                }
                        }
                }
diff --git a/LongoMatch.GUI/Gui/Component/DashboardWidget.cs b/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
index f15d9ac..a15f600 100644
--- a/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
@@ -141,6 +141,7 @@ namespace LongoMatch.Gui.Component
                                tagger.Project = project;
                                Template = project.Dashboard;
                                positionsbox.Visible = false;
+                               periodsbox.Visible = false;
                        }
                }
 
@@ -356,19 +357,6 @@ namespace LongoMatch.Gui.Component
                        delbut = new MenuItem (Catalog.GetString ("Delete"));
                        delbut.Activated += (sender, e) => {RemoveButton (taggerbutton);};
                        menu.Add (delbut);
-                       
-                       if (tag != null) {
-                               deltag = new MenuItem (String.Format ("{0} \"{1}\"",
-                                                                     Catalog.GetString ("Delete tag:"),
-                                                                     tag.Value));
-                               deltag.Activated += (sender, e) => {
-                                       (taggerbutton as AnalysisEventButton).AnalysisEventType.Tags.Remove 
(tag);
-                                       Edited = true;
-                                       tagger.Refresh (taggerbutton);
-                               };
-                               menu.Add (deltag);
-                       }
-
                        menu.ShowAll ();
                        menu.Popup ();
                }
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DashboardWidget.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DashboardWidget.cs
index 6f4f55e..4b8bd6c 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DashboardWidget.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DashboardWidget.cs
@@ -51,7 +51,7 @@ namespace LongoMatch.Gui.Component
                private global::Gtk.Label goallabel1;
                private global::Gtk.Label goallabel2;
                private global::Gtk.Button resetgoalbutton;
-               private global::Gtk.HBox hbox1;
+               private global::Gtk.HBox periodsbox;
                private global::Gtk.Label periodslabel;
                private global::Gtk.Entry periodsentry;
                private global::Gtk.Button applybutton;
@@ -461,28 +461,28 @@ namespace LongoMatch.Gui.Component
                        w68.Expand = false;
                        w68.Fill = false;
                        // Container child vbox10.Gtk.Box+BoxChild
-                       this.hbox1 = new global::Gtk.HBox ();
-                       this.hbox1.Name = "hbox1";
-                       this.hbox1.Spacing = 6;
-                       // Container child hbox1.Gtk.Box+BoxChild
+                       this.periodsbox = new global::Gtk.HBox ();
+                       this.periodsbox.Name = "periodsbox";
+                       this.periodsbox.Spacing = 6;
+                       // Container child periodsbox.Gtk.Box+BoxChild
                        this.periodslabel = new global::Gtk.Label ();
                        this.periodslabel.Name = "periodslabel";
                        this.periodslabel.LabelProp = global::Mono.Unix.Catalog.GetString ("Periods");
-                       this.hbox1.Add (this.periodslabel);
-                       global::Gtk.Box.BoxChild w69 = ((global::Gtk.Box.BoxChild)(this.hbox1 
[this.periodslabel]));
+                       this.periodsbox.Add (this.periodslabel);
+                       global::Gtk.Box.BoxChild w69 = ((global::Gtk.Box.BoxChild)(this.periodsbox 
[this.periodslabel]));
                        w69.Position = 0;
                        w69.Expand = false;
                        w69.Fill = false;
-                       // Container child hbox1.Gtk.Box+BoxChild
+                       // Container child periodsbox.Gtk.Box+BoxChild
                        this.periodsentry = new global::Gtk.Entry ();
                        this.periodsentry.CanFocus = true;
                        this.periodsentry.Name = "periodsentry";
                        this.periodsentry.IsEditable = true;
                        this.periodsentry.InvisibleChar = '•';
-                       this.hbox1.Add (this.periodsentry);
-                       global::Gtk.Box.BoxChild w70 = ((global::Gtk.Box.BoxChild)(this.hbox1 
[this.periodsentry]));
+                       this.periodsbox.Add (this.periodsentry);
+                       global::Gtk.Box.BoxChild w70 = ((global::Gtk.Box.BoxChild)(this.periodsbox 
[this.periodsentry]));
                        w70.Position = 1;
-                       // Container child hbox1.Gtk.Box+BoxChild
+                       // Container child periodsbox.Gtk.Box+BoxChild
                        this.applybutton = new global::Gtk.Button ();
                        this.applybutton.CanFocus = true;
                        this.applybutton.Name = "applybutton";
@@ -491,13 +491,13 @@ namespace LongoMatch.Gui.Component
                        this.applyimage.Name = "applyimage";
                        this.applybutton.Add (this.applyimage);
                        this.applybutton.Label = null;
-                       this.hbox1.Add (this.applybutton);
-                       global::Gtk.Box.BoxChild w72 = ((global::Gtk.Box.BoxChild)(this.hbox1 
[this.applybutton]));
+                       this.periodsbox.Add (this.applybutton);
+                       global::Gtk.Box.BoxChild w72 = ((global::Gtk.Box.BoxChild)(this.periodsbox 
[this.applybutton]));
                        w72.Position = 2;
                        w72.Expand = false;
                        w72.Fill = false;
-                       this.vbox10.Add (this.hbox1);
-                       global::Gtk.Box.BoxChild w73 = ((global::Gtk.Box.BoxChild)(this.vbox10 [this.hbox1]));
+                       this.vbox10.Add (this.periodsbox);
+                       global::Gtk.Box.BoxChild w73 = ((global::Gtk.Box.BoxChild)(this.vbox10 
[this.periodsbox]));
                        w73.Position = 1;
                        w73.Expand = false;
                        w73.Fill = false;
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 3d0089a..be752c1 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -561,7 +561,7 @@
                           </packing>
                         </child>
                         <child>
-                          <widget class="Gtk.HBox" id="hbox1">
+                          <widget class="Gtk.HBox" id="periodsbox">
                             <property name="MemberName" />
                             <property name="Spacing">6</property>
                             <child>


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