[gnome-logs] Update app menu



commit a287d8a7b1d5f74eacbec4e16c7f718441de61c7
Author: Jonathan Kang <jonathankang gnome org>
Date:   Mon Nov 12 13:53:22 2018 +0800

    Update app menu
    
    According to this wiki page[1], rearrange the order of the app menu
    and remove "Quit" menu item.
    
    *[1] https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement

 data/gl-eventtoolbar.ui | 15 +++++----------
 src/gl-application.c    | 14 +-------------
 2 files changed, 6 insertions(+), 23 deletions(-)
---
diff --git a/data/gl-eventtoolbar.ui b/data/gl-eventtoolbar.ui
index b9c64c6..0c08623 100644
--- a/data/gl-eventtoolbar.ui
+++ b/data/gl-eventtoolbar.ui
@@ -8,23 +8,18 @@
             </item>
         </section>
         <section>
-            <item>
-                <attribute name="accel">F1</attribute>
-                <attribute name="label" translatable="yes">_Help</attribute>
-                <attribute name="action">app.help</attribute>
-            </item>
             <item>
                 <attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
                 <attribute name="action">win.show-help-overlay</attribute>
             </item>
             <item>
-                <attribute name="label" translatable="yes">_About</attribute>
-                <attribute name="action">app.about</attribute>
+                <attribute name="accel">F1</attribute>
+                <attribute name="label" translatable="yes">_Help</attribute>
+                <attribute name="action">app.help</attribute>
             </item>
             <item>
-                <attribute name="accel">&lt;Primary&gt;q</attribute>
-                <attribute name="label" translatable="yes">_Quit</attribute>
-                <attribute name="action">app.quit</attribute>
+                <attribute name="label" translatable="yes">_About Logs</attribute>
+                <attribute name="action">app.about</attribute>
             </item>
         </section>
     </menu>
diff --git a/src/gl-application.c b/src/gl-application.c
index 3455a1b..daaded4 100644
--- a/src/gl-application.c
+++ b/src/gl-application.c
@@ -115,17 +115,6 @@ on_about (GSimpleAction *action,
                            "website", PACKAGE_URL, NULL);
 }
 
-static void
-on_quit (GSimpleAction *action,
-         GVariant *parameter,
-         gpointer user_data)
-{
-    GApplication *application;
-
-    application = G_APPLICATION (user_data);
-    g_application_quit (application);
-}
-
 static void
 on_sort_order_changed (GSettings *settings,
                        const gchar *key,
@@ -192,8 +181,7 @@ on_monospace_font_name_changed (GSettings *settings,
 static GActionEntry actions[] = {
     { "new-window", on_new_window },
     { "help", on_help },
-    { "about", on_about },
-    { "quit", on_quit }
+    { "about", on_about }
 };
 
 static void


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