[chronojump] On maximized/undecorated show a quit button at notebook start 1st page



commit 4fb7f7a80b3aa36c442c3e4a671f2581f5bbf826
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Jun 9 12:41:27 2017 -0300

    On maximized/undecorated show a quit button at notebook start 1st page

 glade/app1.glade           |   41 ++++++++++++++++++++++++++++++++++++++---
 src/gui/chronojump.cs      |    1 +
 src/gui/chronojumpIcons.cs |    2 ++
 src/gui/networks.cs        |    2 ++
 4 files changed, 43 insertions(+), 3 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index b7d7f21..3a5020f 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -678,15 +678,50 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="label_version">
+                                  <widget class="GtkVBox" id="vbox84">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="xalign">0</property>
+                                    <property name="spacing">6</property>
+                                    <child>
+                                      <widget class="GtkButton" id="button_start_quit">
+                                        <property name="width_request">50</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="can_default">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="has_tooltip">True</property>
+                                        <property name="tooltip" translatable="yes">Quit</property>
+                                        <property name="relief">half</property>
+                                        <signal name="clicked" handler="on_quit1_activate" swapped="no"/>
+                                        <child>
+                                          <widget class="GtkImage" id="image_quit2">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="stock">gtk-missing-image</property>
+                                          </widget>
+                                        </child>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="label_version">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="xalign">0</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
                                   </widget>
                                   <packing>
                                     <property name="expand">False</property>
                                     <property name="fill">False</property>
-                                    <property name="pack_type">end</property>
                                     <property name="position">2</property>
                                   </packing>
                                 </child>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 8abf843..895fe9d 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -45,6 +45,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.SpinButton spin_gui_tests;
        [Widget] Gtk.ComboBox combo_gui_tests;
        [Widget] Gtk.Button button_carles;
+       [Widget] Gtk.Button button_start_quit;
        
        [Widget] Gtk.Viewport viewport_chronojump_logo;
        [Widget] Gtk.Image image_chronojump_logo;
diff --git a/src/gui/chronojumpIcons.cs b/src/gui/chronojumpIcons.cs
index 8e5d384..32eaf93 100644
--- a/src/gui/chronojumpIcons.cs
+++ b/src/gui/chronojumpIcons.cs
@@ -33,6 +33,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Image image_settings1;
        [Widget] Gtk.Image image_quit;
        [Widget] Gtk.Image image_quit1;
+       [Widget] Gtk.Image image_quit2;
        [Widget] Gtk.Image image_session_new;
        [Widget] Gtk.Image image_session_load;
        [Widget] Gtk.Image image_mode_encoder_capture;
@@ -123,6 +124,7 @@ public partial class ChronoJumpWindow
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_quit.png");
                image_quit.Pixbuf = pixbuf;
                image_quit1.Pixbuf = pixbuf;
+               image_quit2.Pixbuf = pixbuf;
 
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "muscle-concentric.png");
                image_top_muscle.Pixbuf = pixbuf;
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index 9e3493e..8d6f3e2 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -166,9 +166,11 @@ public partial class ChronoJumpWindow
                {
                        app1.Unmaximize();
                        app1.Decorated = true;
+                       button_start_quit.Visible = false;
                } else {
                        app1.Decorated = (configChronojump.Maximized != 
Preferences.MaximizedTypes.YESUNDECORATED);
                        app1.Maximize();
+                       button_start_quit.Visible = ! app1.Decorated;
                }
 
                if(configChronojump.CustomButtons)


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