[longomatch/newui: 138/157] Add the common header to the preferences panel



commit f0c841103433b6fe58b41c8bf70b7969754bae49
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Aug 29 15:10:31 2014 +0200

    Add the common header to the preferences panel

 LongoMatch.GUI/Gui/Panel/PreferencesPanel.cs       |    4 +-
 LongoMatch.GUI/Gui/Panel/WelcomePanel.cs           |    6 ++
 .../LongoMatch.Gui.Panel.PreferencesPanel.cs       |   58 ++++++--------------
 LongoMatch.GUI/gtk-gui/gui.stetic                  |   41 +++++----------
 4 files changed, 38 insertions(+), 71 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Panel/PreferencesPanel.cs b/LongoMatch.GUI/Gui/Panel/PreferencesPanel.cs
index 67f8974..cfd7d08 100644
--- a/LongoMatch.GUI/Gui/Panel/PreferencesPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/PreferencesPanel.cs
@@ -45,7 +45,9 @@ namespace LongoMatch.Gui.Panel
                        treeview.EnableTreeLines = false;
                        AddPanels ();
                        treeview.SetCursor (new TreePath("0"), null, false);
-                       backbutton.Clicked += (e, s) => {
+                       panelheader1.ApplyVisible = false;
+                       panelheader1.Title = Catalog.GetString ("PREFERENCES");
+                       panelheader1.BackClicked += (sender, e) => {
                                if (BackEvent != null) {
                                        BackEvent ();
                                };
diff --git a/LongoMatch.GUI/Gui/Panel/WelcomePanel.cs b/LongoMatch.GUI/Gui/Panel/WelcomePanel.cs
index 7734014..e4a776b 100644
--- a/LongoMatch.GUI/Gui/Panel/WelcomePanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/WelcomePanel.cs
@@ -55,6 +55,7 @@ namespace LongoMatch.Gui.Panel
                        WidthRequest = MinWidth;
                        buttonWidgets = new List<Widget>();
                        hbox1.BorderWidth = StyleConf.WelcomeBorder;
+                       preferencesbutton.Clicked += HandlePreferencesClicked;
                        Create ();
                        Name = "WelcomePanel";
                }
@@ -93,6 +94,11 @@ namespace LongoMatch.Gui.Panel
                        }
                }
                
+               void HandlePreferencesClicked (object sender, EventArgs e)
+               {
+                       Config.EventsBroker.EmitEditPreferences ();
+               }
+
                void Create ()
                {
                        int padding;
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.PreferencesPanel.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.PreferencesPanel.cs
index 3cc3ab8..d5b2f36 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.PreferencesPanel.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.PreferencesPanel.cs
@@ -5,13 +5,12 @@ namespace LongoMatch.Gui.Panel
        public partial class PreferencesPanel
        {
                private global::Gtk.VBox vbox2;
+               private global::LongoMatch.Gui.Panel.PanelHeader panelheader1;
                private global::Gtk.HPaned hpaned1;
                private global::Gtk.ScrolledWindow scrolledwindow1;
                private global::Gtk.TreeView treeview;
                private global::Gtk.HBox hbox1;
                private global::Gtk.VBox propsvbox;
-               private global::Gtk.HButtonBox hbuttonbox2;
-               private global::Gtk.Button backbutton;
 
                protected virtual void Build ()
                {
@@ -24,6 +23,15 @@ namespace LongoMatch.Gui.Panel
                        this.vbox2.Name = "vbox2";
                        this.vbox2.Spacing = 6;
                        // Container child vbox2.Gtk.Box+BoxChild
+                       this.panelheader1 = new global::LongoMatch.Gui.Panel.PanelHeader ();
+                       this.panelheader1.Events = ((global::Gdk.EventMask)(256));
+                       this.panelheader1.Name = "panelheader1";
+                       this.vbox2.Add (this.panelheader1);
+                       global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox2 
[this.panelheader1]));
+                       w1.Position = 0;
+                       w1.Expand = false;
+                       w1.Fill = false;
+                       // Container child vbox2.Gtk.Box+BoxChild
                        this.hpaned1 = new global::Gtk.HPaned ();
                        this.hpaned1.CanFocus = true;
                        this.hpaned1.Name = "hpaned1";
@@ -39,8 +47,8 @@ namespace LongoMatch.Gui.Panel
                        this.treeview.Name = "treeview";
                        this.scrolledwindow1.Add (this.treeview);
                        this.hpaned1.Add (this.scrolledwindow1);
-                       global::Gtk.Paned.PanedChild w2 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 
[this.scrolledwindow1]));
-                       w2.Resize = false;
+                       global::Gtk.Paned.PanedChild w3 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 
[this.scrolledwindow1]));
+                       w3.Resize = false;
                        // Container child hpaned1.Gtk.Paned+PanedChild
                        this.hbox1 = new global::Gtk.HBox ();
                        this.hbox1.Name = "hbox1";
@@ -50,46 +58,12 @@ namespace LongoMatch.Gui.Panel
                        this.propsvbox.Name = "propsvbox";
                        this.propsvbox.Spacing = 6;
                        this.hbox1.Add (this.propsvbox);
-                       global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 
[this.propsvbox]));
-                       w3.Position = 0;
+                       global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox1 
[this.propsvbox]));
+                       w4.Position = 0;
                        this.hpaned1.Add (this.hbox1);
                        this.vbox2.Add (this.hpaned1);
-                       global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hpaned1]));
-                       w5.Position = 0;
-                       // Container child vbox2.Gtk.Box+BoxChild
-                       this.hbuttonbox2 = new global::Gtk.HButtonBox ();
-                       this.hbuttonbox2.Name = "hbuttonbox2";
-                       this.hbuttonbox2.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(3));
-                       // Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild
-                       this.backbutton = new global::Gtk.Button ();
-                       this.backbutton.CanFocus = true;
-                       this.backbutton.Name = "backbutton";
-                       this.backbutton.UseUnderline = true;
-                       // Container child backbutton.Gtk.Container+ContainerChild
-                       global::Gtk.Alignment w6 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
-                       // Container child GtkAlignment.Gtk.Container+ContainerChild
-                       global::Gtk.HBox w7 = new global::Gtk.HBox ();
-                       w7.Spacing = 2;
-                       // Container child GtkHBox.Gtk.Container+ContainerChild
-                       global::Gtk.Image w8 = new global::Gtk.Image ();
-                       w8.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-back", 
global::Gtk.IconSize.Dialog);
-                       w7.Add (w8);
-                       // Container child GtkHBox.Gtk.Container+ContainerChild
-                       global::Gtk.Label w10 = new global::Gtk.Label ();
-                       w10.LabelProp = global::Mono.Unix.Catalog.GetString ("Back");
-                       w10.UseUnderline = true;
-                       w7.Add (w10);
-                       w6.Add (w7);
-                       this.backbutton.Add (w6);
-                       this.hbuttonbox2.Add (this.backbutton);
-                       global::Gtk.ButtonBox.ButtonBoxChild w14 = 
((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.backbutton]));
-                       w14.Expand = false;
-                       w14.Fill = false;
-                       this.vbox2.Add (this.hbuttonbox2);
-                       global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox2 
[this.hbuttonbox2]));
-                       w15.Position = 1;
-                       w15.Expand = false;
-                       w15.Fill = false;
+                       global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hpaned1]));
+                       w6.Position = 1;
                        this.Add (this.vbox2);
                        if ((this.Child != null)) {
                                this.Child.ShowAll ();
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index de1fbda..23aef00 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -9801,6 +9801,18 @@ You can continue with the current capture, cancel it or save your project.
         <property name="MemberName" />
         <property name="Spacing">6</property>
         <child>
+          <widget class="LongoMatch.Gui.Panel.PanelHeader" id="panelheader1">
+            <property name="MemberName" />
+            <property name="Events">ButtonPressMask</property>
+          </widget>
+          <packing>
+            <property name="Position">0</property>
+            <property name="AutoSize">True</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+        <child>
           <widget class="Gtk.HPaned" id="hpaned1">
             <property name="MemberName" />
             <property name="CanFocus">True</property>
@@ -9842,35 +9854,8 @@ You can continue with the current capture, cancel it or save your project.
             </child>
           </widget>
           <packing>
-            <property name="Position">0</property>
-            <property name="AutoSize">True</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="Gtk.HButtonBox" id="hbuttonbox2">
-            <property name="MemberName" />
-            <property name="Size">1</property>
-            <property name="LayoutStyle">Start</property>
-            <child>
-              <widget class="Gtk.Button" id="backbutton">
-                <property name="MemberName" />
-                <property name="CanFocus">True</property>
-                <property name="Type">TextAndIcon</property>
-                <property name="Icon">stock:gtk-go-back Dialog</property>
-                <property name="Label" translatable="yes">Back</property>
-                <property name="UseUnderline">True</property>
-              </widget>
-              <packing>
-                <property name="Expand">False</property>
-                <property name="Fill">False</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
             <property name="Position">1</property>
-            <property name="AutoSize">False</property>
-            <property name="Expand">False</property>
-            <property name="Fill">False</property>
+            <property name="AutoSize">True</property>
           </packing>
         </child>
       </widget>


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