[gitg] Remove close menu item since we have now also the close button



commit eb8cea8d5a6557ee7891e1ae3825a0a1eda40ce8
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Wed Jun 19 17:25:32 2013 +0200

    Remove close menu item since we have now also the close button

 gitg/gitg-window.vala           |   11 ++++++++---
 gitg/resources/ui/gitg-menus.ui |   24 ------------------------
 2 files changed, 8 insertions(+), 27 deletions(-)
---
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index cf6990b..373ce18 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -75,8 +75,7 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
                {"user-information-repo", on_repo_user_info_activated},
        };
 
-       [GtkCallback]
-       private void close_button_clicked(Gtk.Button button)
+       private void send_delete_event()
        {
                Gdk.Event event;
 
@@ -89,6 +88,12 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
        }
 
        [GtkCallback]
+       private void close_button_clicked(Gtk.Button button)
+       {
+               send_delete_event();
+       }
+
+       [GtkCallback]
        private void dash_button_clicked(Gtk.Button dash)
        {
                repository = null;
@@ -149,7 +154,7 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
 
        private void on_close_activated()
        {
-               destroy();
+               send_delete_event();
        }
 
        private void on_search_activated(SimpleAction action) {
diff --git a/gitg/resources/ui/gitg-menus.ui b/gitg/resources/ui/gitg-menus.ui
index 8c207eb..93fc49d 100644
--- a/gitg/resources/ui/gitg-menus.ui
+++ b/gitg/resources/ui/gitg-menus.ui
@@ -52,13 +52,6 @@
         <attribute name="action">win.user-information-global</attribute>
       </item>
     </section>
-    <section>
-      <item>
-        <attribute name="label" translatable="yes">_Close</attribute>
-        <attribute name="action">win.close</attribute>
-        <attribute name="accel">&lt;Primary&gt;w</attribute>
-      </item>
-    </section>
   </menu>
   <menu id="win-menu-views">
     <section>
@@ -74,13 +67,6 @@
         <attribute name="action">win.user-information-repo</attribute>
       </item>
     </section>
-    <section>
-      <item>
-        <attribute name="label" translatable="yes">_Close</attribute>
-        <attribute name="action">win.close</attribute>
-        <attribute name="accel">&lt;Primary&gt;w</attribute>
-      </item>
-    </section>
   </menu>
    <menu id="app-win-menu-dash">
     <section>
@@ -126,11 +112,6 @@
     </section>
     <section>
       <item>
-        <attribute name="label" translatable="yes">_Close</attribute>
-        <attribute name="action">win.close</attribute>
-        <attribute name="accel">&lt;Primary&gt;w</attribute>
-      </item>
-      <item>
         <attribute name="label" translatable="yes">_Quit</attribute>
         <attribute name="action">app.quit</attribute>
         <attribute name="accel">&lt;Primary&gt;q</attribute>
@@ -177,11 +158,6 @@
     </section>
     <section>
       <item>
-        <attribute name="label" translatable="yes">_Close</attribute>
-        <attribute name="action">win.close</attribute>
-        <attribute name="accel">&lt;Primary&gt;w</attribute>
-      </item>
-      <item>
         <attribute name="label" translatable="yes">_Quit</attribute>
         <attribute name="action">app.quit</attribute>
         <attribute name="accel">&lt;Primary&gt;q</attribute>


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