[latexila/wip/app-menu: 7/8] Add an app menu



commit a734bb618b024719f57c64bcad7731e38b50d318
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Nov 6 11:27:00 2015 +0100

    Add an app menu
    
    Better late than never. It's redundant with the menubar, but it's better
    to keep the items in the menubar too because the app menu is difficult
    to discover. The app menu is just to make GNOME people happy (but IIRC
    I've never received any complaints about the lack of app menu in
    LaTeXila).

 po/POTFILES.in             |    1 +
 src/latexila.gresource.xml |    4 ++++
 src/ui/Makefile.am         |    4 +++-
 src/ui/menus.ui            |   39 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8c9515e..b07d176 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -62,5 +62,6 @@ src/structure.vala
 src/symbols.vala
 src/symbols_view.vala
 src/tab_info_bar.vala
+[type: gettext/glade]src/ui/menus.ui
 [type: gettext/glade]src/ui/preferences_dialog.ui
 src/utils.vala
diff --git a/src/latexila.gresource.xml b/src/latexila.gresource.xml
index a2878c8..e08861f 100644
--- a/src/latexila.gresource.xml
+++ b/src/latexila.gresource.xml
@@ -5,6 +5,10 @@
     <file>ui/latexila.adwaita.css</file>
   </gresource>
 
+  <gresource prefix="/org/gnome/latexila/gtk">
+    <file alias="menus.ui" preprocess="xml-stripblanks">ui/menus.ui</file>
+  </gresource>
+
   <gresource prefix="/org/gnome/latexila/icons/16x16/actions">
     <file alias="compile_dvi.png" preprocess="to-pixdata">../data/icons/16x16/actions/compile_dvi.png</file>
     <file alias="compile_pdf.png" preprocess="to-pixdata">../data/icons/16x16/actions/compile_pdf.png</file>
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index c1251b9..90753da 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -4,6 +4,8 @@ dist_ui_DATA =                  \
        preferences_dialog.ui   \
        ui.xml
 
-EXTRA_DIST = latexila.adwaita.css
+EXTRA_DIST =                   \
+       latexila.adwaita.css    \
+       menus.ui
 
 -include $(top_srcdir)/git.mk
diff --git a/src/ui/menus.ui b/src/ui/menus.ui
new file mode 100644
index 0000000..e0616c1
--- /dev/null
+++ b/src/ui/menus.ui
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<interface>
+  <menu id="app-menu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_New Window</attribute>
+        <attribute name="action">app.new-window</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Preferences</attribute>
+        <attribute name="action">app.preferences</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Manage Build Tools</attribute>
+        <attribute name="action">app.manage-build-tools</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Help</attribute>
+        <attribute name="action">app.help</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">LaTeXila _Fundraiser</attribute>
+        <attribute name="action">app.fundraiser</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_About</attribute>
+        <attribute name="action">app.about</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Quit</attribute>
+        <attribute name="action">app.quit</attribute>
+      </item>
+    </section>
+  </menu>
+</interface>


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