[longomatch] Move zoom buttons inside the timeline widget



commit de201cc89422d89eb19de70037d6cf3294832bf3
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue May 20 17:04:21 2014 +0200

    Move zoom buttons inside the timeline widget

 LongoMatch.GUI/Gui/Component/Timeline.cs           |    2 +
 .../LongoMatch.Gui.Component.CodingWidget.cs       |   29 ++----
 .../gtk-gui/LongoMatch.Gui.Component.Timeline.cs   |  101 +++++++++++---------
 .../gtk-gui/LongoMatch.Gui.MainWindow.cs           |    2 +-
 LongoMatch.GUI/gtk-gui/gui.stetic                  |   27 ++----
 5 files changed, 75 insertions(+), 86 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/Timeline.cs b/LongoMatch.GUI/Gui/Component/Timeline.cs
index 04f2574..db66d86 100644
--- a/LongoMatch.GUI/Gui/Component/Timeline.cs
+++ b/LongoMatch.GUI/Gui/Component/Timeline.cs
@@ -55,6 +55,8 @@ namespace LongoMatch.Gui.Component
                        this.timerule = new Timerule (new WidgetWrapper (timerulearea));
                        this.timeline = new PlaysTimeline (new WidgetWrapper(timelinearea));
                        this.labels = new CategoriesLabels (new WidgetWrapper (labelsarea));
+                       focusbutton.CanFocus = false;
+                       focusscale.CanFocus = false;
                        timerulearea.HeightRequest = TIMERULE_HEIGHT;
                        labelsarea.WidthRequest = LongoMatch.Drawing.Common.CATEGORY_WIDTH;
                        hbox1.HeightRequest = TIMERULE_HEIGHT;
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
index 7977cb6..dd0fb9a 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
@@ -11,7 +11,6 @@ namespace LongoMatch.Gui.Component
                private global::Gtk.VBox vbox2;
                private global::Gtk.HBox hbox1;
                private global::Gtk.Toolbar codingtoolbar;
-               private global::Gtk.Toolbar timelinetoolbar;
                private global::Gtk.HBox hbox2;
                private global::LongoMatch.Gui.Component.ButtonsWidget buttonswidget;
                private global::LongoMatch.Gui.Component.Timeline timeline;
@@ -53,21 +52,11 @@ namespace LongoMatch.Gui.Component
                        w4.Position = 0;
                        w4.Expand = false;
                        w4.Fill = false;
-                       // Container child hbox1.Gtk.Box+BoxChild
-                       this.UIManager.AddUiFromString ("<ui><toolbar name='timelinetoolbar'><toolitem 
name='zoomFitAction' action='zoomFitAction'/></toolbar></ui>");
-                       this.timelinetoolbar = ((global::Gtk.Toolbar)(this.UIManager.GetWidget 
("/timelinetoolbar")));
-                       this.timelinetoolbar.Name = "timelinetoolbar";
-                       this.timelinetoolbar.ShowArrow = false;
-                       this.hbox1.Add (this.timelinetoolbar);
-                       global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox1 
[this.timelinetoolbar]));
-                       w5.Position = 1;
+                       this.vbox2.Add (this.hbox1);
+                       global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
+                       w5.Position = 0;
                        w5.Expand = false;
                        w5.Fill = false;
-                       this.vbox2.Add (this.hbox1);
-                       global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
-                       w6.Position = 0;
-                       w6.Expand = false;
-                       w6.Fill = false;
                        // Container child vbox2.Gtk.Box+BoxChild
                        this.hbox2 = new global::Gtk.HBox ();
                        this.hbox2.Name = "hbox2";
@@ -77,18 +66,18 @@ namespace LongoMatch.Gui.Component
                        this.buttonswidget.Events = ((global::Gdk.EventMask)(256));
                        this.buttonswidget.Name = "buttonswidget";
                        this.hbox2.Add (this.buttonswidget);
-                       global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox2 
[this.buttonswidget]));
-                       w7.Position = 0;
+                       global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox2 
[this.buttonswidget]));
+                       w6.Position = 0;
                        // Container child hbox2.Gtk.Box+BoxChild
                        this.timeline = new global::LongoMatch.Gui.Component.Timeline ();
                        this.timeline.Events = ((global::Gdk.EventMask)(256));
                        this.timeline.Name = "timeline";
                        this.hbox2.Add (this.timeline);
-                       global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox2 
[this.timeline]));
-                       w8.Position = 1;
+                       global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox2 
[this.timeline]));
+                       w7.Position = 1;
                        this.vbox2.Add (this.hbox2);
-                       global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox2]));
-                       w9.Position = 1;
+                       global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox2]));
+                       w8.Position = 1;
                        this.Add (this.vbox2);
                        if ((this.Child != null)) {
                                this.Child.ShowAll ();
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Timeline.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Timeline.cs
index de7dfd4..d4bdeda 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Timeline.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Timeline.cs
@@ -7,8 +7,8 @@ namespace LongoMatch.Gui.Component
                private global::Gtk.HBox hbox1;
                private global::Gtk.VBox vbox4;
                private global::Gtk.HBox hbox2;
-               private global::Gtk.HScale hscale1;
-               private global::Gtk.Button button1;
+               private global::Gtk.HScale focusscale;
+               private global::Gtk.Button focusbutton;
                private global::Gtk.DrawingArea labelsarea;
                private global::Gtk.VBox vbox1;
                private global::Gtk.DrawingArea timerulearea;
@@ -35,45 +35,56 @@ namespace LongoMatch.Gui.Component
                        this.hbox2.Name = "hbox2";
                        this.hbox2.Spacing = 6;
                        // Container child hbox2.Gtk.Box+BoxChild
-                       this.hscale1 = new global::Gtk.HScale (null);
-                       this.hscale1.CanFocus = true;
-                       this.hscale1.Name = "hscale1";
-                       this.hscale1.Adjustment.Upper = 100;
-                       this.hscale1.Adjustment.PageIncrement = 10;
-                       this.hscale1.Adjustment.StepIncrement = 1;
-                       this.hscale1.DrawValue = true;
-                       this.hscale1.Digits = 0;
-                       this.hscale1.ValuePos = ((global::Gtk.PositionType)(2));
-                       this.hbox2.Add (this.hscale1);
-                       global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.hscale1]));
+                       this.focusscale = new global::Gtk.HScale (null);
+                       this.focusscale.Name = "focusscale";
+                       this.focusscale.Adjustment.Upper = 100;
+                       this.focusscale.Adjustment.PageIncrement = 10;
+                       this.focusscale.Adjustment.StepIncrement = 1;
+                       this.focusscale.DrawValue = false;
+                       this.focusscale.Digits = 0;
+                       this.focusscale.ValuePos = ((global::Gtk.PositionType)(2));
+                       this.hbox2.Add (this.focusscale);
+                       global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox2 
[this.focusscale]));
                        w1.Position = 0;
                        // Container child hbox2.Gtk.Box+BoxChild
-                       this.button1 = new global::Gtk.Button ();
-                       this.button1.CanFocus = true;
-                       this.button1.Name = "button1";
-                       this.button1.UseUnderline = true;
-                       this.button1.Label = global::Mono.Unix.Catalog.GetString ("GtkButton");
-                       this.hbox2.Add (this.button1);
-                       global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.button1]));
-                       w2.Position = 1;
-                       w2.Expand = false;
-                       w2.Fill = false;
+                       this.focusbutton = new global::Gtk.Button ();
+                       this.focusbutton.Name = "focusbutton";
+                       this.focusbutton.UseUnderline = true;
+                       // Container child focusbutton.Gtk.Container+ContainerChild
+                       global::Gtk.Alignment w2 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
+                       // Container child GtkAlignment.Gtk.Container+ContainerChild
+                       global::Gtk.HBox w3 = new global::Gtk.HBox ();
+                       w3.Spacing = 2;
+                       // Container child GtkHBox.Gtk.Container+ContainerChild
+                       global::Gtk.Image w4 = new global::Gtk.Image ();
+                       w4.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-zoom-fit", 
global::Gtk.IconSize.Menu);
+                       w3.Add (w4);
+                       // Container child GtkHBox.Gtk.Container+ContainerChild
+                       global::Gtk.Label w6 = new global::Gtk.Label ();
+                       w3.Add (w6);
+                       w2.Add (w3);
+                       this.focusbutton.Add (w2);
+                       this.hbox2.Add (this.focusbutton);
+                       global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox2 
[this.focusbutton]));
+                       w10.Position = 1;
+                       w10.Expand = false;
+                       w10.Fill = false;
                        this.vbox4.Add (this.hbox2);
-                       global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hbox2]));
-                       w3.Position = 0;
-                       w3.Expand = false;
-                       w3.Fill = false;
+                       global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hbox2]));
+                       w11.Position = 0;
+                       w11.Expand = false;
+                       w11.Fill = false;
                        // Container child vbox4.Gtk.Box+BoxChild
                        this.labelsarea = new global::Gtk.DrawingArea ();
                        this.labelsarea.Name = "labelsarea";
                        this.vbox4.Add (this.labelsarea);
-                       global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox4 
[this.labelsarea]));
-                       w4.Position = 1;
+                       global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox4 
[this.labelsarea]));
+                       w12.Position = 1;
                        this.hbox1.Add (this.vbox4);
-                       global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox4]));
-                       w5.Position = 0;
-                       w5.Expand = false;
-                       w5.Fill = false;
+                       global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox4]));
+                       w13.Position = 0;
+                       w13.Expand = false;
+                       w13.Fill = false;
                        // Container child hbox1.Gtk.Box+BoxChild
                        this.vbox1 = new global::Gtk.VBox ();
                        this.vbox1.Name = "vbox1";
@@ -82,29 +93,29 @@ namespace LongoMatch.Gui.Component
                        this.timerulearea = new global::Gtk.DrawingArea ();
                        this.timerulearea.Name = "timerulearea";
                        this.vbox1.Add (this.timerulearea);
-                       global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox1 
[this.timerulearea]));
-                       w6.Position = 0;
-                       w6.Expand = false;
-                       w6.Fill = false;
+                       global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox1 
[this.timerulearea]));
+                       w14.Position = 0;
+                       w14.Expand = false;
+                       w14.Fill = false;
                        // Container child vbox1.Gtk.Box+BoxChild
                        this.scrolledwindow1 = new global::Gtk.ScrolledWindow ();
                        this.scrolledwindow1.CanFocus = true;
                        this.scrolledwindow1.Name = "scrolledwindow1";
                        this.scrolledwindow1.ShadowType = ((global::Gtk.ShadowType)(1));
                        // Container child scrolledwindow1.Gtk.Container+ContainerChild
-                       global::Gtk.Viewport w7 = new global::Gtk.Viewport ();
-                       w7.ShadowType = ((global::Gtk.ShadowType)(0));
+                       global::Gtk.Viewport w15 = new global::Gtk.Viewport ();
+                       w15.ShadowType = ((global::Gtk.ShadowType)(0));
                        // Container child GtkViewport.Gtk.Container+ContainerChild
                        this.timelinearea = new global::Gtk.DrawingArea ();
                        this.timelinearea.Name = "timelinearea";
-                       w7.Add (this.timelinearea);
-                       this.scrolledwindow1.Add (w7);
+                       w15.Add (this.timelinearea);
+                       this.scrolledwindow1.Add (w15);
                        this.vbox1.Add (this.scrolledwindow1);
-                       global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox1 
[this.scrolledwindow1]));
-                       w10.Position = 1;
+                       global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox1 
[this.scrolledwindow1]));
+                       w18.Position = 1;
                        this.hbox1.Add (this.vbox1);
-                       global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox1]));
-                       w11.Position = 1;
+                       global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox1]));
+                       w19.Position = 1;
                        this.Add (this.hbox1);
                        if ((this.Child != null)) {
                                this.Child.ShowAll ();
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
index da25c3a..a5d4dbd 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -131,7 +131,7 @@ namespace LongoMatch.Gui
                        this.ManualTaggingViewAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Free 
Capture Mode");
                        w1.Add (this.ManualTaggingViewAction, "<Control>f");
                        this.GameUnitsViewAction = new global::Gtk.RadioAction ("GameUnitsViewAction", 
global::Mono.Unix.Catalog.GetString ("Game units view"), null, null, 0);
-                       this.GameUnitsViewAction.Group = this.TaggingViewAction.Group;
+                       this.GameUnitsViewAction.Group = this.ManualTaggingViewAction.Group;
                        this.GameUnitsViewAction.Sensitive = false;
                        this.GameUnitsViewAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Game 
units view");
                        w1.Add (this.GameUnitsViewAction, null);
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index d9effb6..8da7172 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -10084,13 +10084,12 @@ Defining &lt;b&gt; Game Units &lt;/b&gt; will help you during the analysis to in
                 <property name="HeightRequest">30</property>
                 <property name="Spacing">6</property>
                 <child>
-                  <widget class="Gtk.HScale" id="hscale1">
+                  <widget class="Gtk.HScale" id="focusscale">
                     <property name="MemberName" />
-                    <property name="CanFocus">True</property>
                     <property name="Upper">100</property>
                     <property name="PageIncrement">10</property>
                     <property name="StepIncrement">1</property>
-                    <property name="DrawValue">True</property>
+                    <property name="DrawValue">False</property>
                     <property name="Digits">0</property>
                     <property name="ValuePos">Top</property>
                   </widget>
@@ -10100,11 +10099,11 @@ Defining &lt;b&gt; Game Units &lt;/b&gt; will help you during the analysis to in
                   </packing>
                 </child>
                 <child>
-                  <widget class="Gtk.Button" id="button1">
+                  <widget class="Gtk.Button" id="focusbutton">
                     <property name="MemberName" />
-                    <property name="CanFocus">True</property>
-                    <property name="Type">TextOnly</property>
-                    <property name="Label" translatable="yes">GtkButton</property>
+                    <property name="Type">TextAndIcon</property>
+                    <property name="Icon">stock:gtk-zoom-fit Menu</property>
+                    <property name="Label" translatable="yes" />
                     <property name="UseUnderline">True</property>
                   </widget>
                   <packing>
@@ -10241,19 +10240,7 @@ Defining &lt;b&gt; Game Units &lt;/b&gt; will help you during the analysis to in
               </packing>
             </child>
             <child>
-              <widget class="Gtk.Toolbar" id="timelinetoolbar">
-                <property name="MemberName" />
-                <property name="ShowArrow">False</property>
-                <node name="timelinetoolbar" type="Toolbar">
-                  <node type="Toolitem" action="zoomFitAction" />
-                </node>
-              </widget>
-              <packing>
-                <property name="Position">1</property>
-                <property name="AutoSize">False</property>
-                <property name="Expand">False</property>
-                <property name="Fill">False</property>
-              </packing>
+              <placeholder />
             </child>
             <child>
               <placeholder />


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