[latexila/wip/app-menu: 3/6] Automatic resource
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila/wip/app-menu: 3/6] Automatic resource
- Date: Fri, 6 Nov 2015 15:13:33 +0000 (UTC)
commit c3c0cc4a1cd476a372ad936e0224a34b99ec91e1
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Nov 6 12:24:19 2015 +0100
Automatic resource
po/POTFILES.in | 2 +-
src/latexila.gresource.xml | 2 +-
src/latexila_app.vala | 11 -----------
src/ui/Makefile.am | 4 ++--
src/ui/app_menu.ui | 39 ---------------------------------------
src/ui/menus.ui | 17 +++++++++++++++++
6 files changed, 21 insertions(+), 54 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index addb6a1..60c4367 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -62,6 +62,6 @@ src/structure.vala
src/symbols.vala
src/symbols_view.vala
src/tab_info_bar.vala
-[type: gettext/glade]src/ui/app_menu.ui
+[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 1a7dc1e..c132351 100644
--- a/src/latexila.gresource.xml
+++ b/src/latexila.gresource.xml
@@ -2,7 +2,7 @@
<gresources>
<gresource prefix="/org/gnome/latexila">
- <file>ui/app_menu.ui</file>
+ <file alias="gtk/menus.ui" preprocess="xml-stripblanks">ui/menus.ui</file>
<file>ui/latexila.adwaita.css</file>
</gresource>
diff --git a/src/latexila_app.vala b/src/latexila_app.vala
index 5275597..273c670 100644
--- a/src/latexila_app.vala
+++ b/src/latexila_app.vala
@@ -124,7 +124,6 @@ public class LatexilaApp : Gtk.Application
Latexila.utils_register_icons ();
StockIcons.register_stock_icons ();
setup_theme_extensions ();
- setup_app_menu ();
AppSettings.get_default ();
create_window ();
@@ -196,16 +195,6 @@ public class LatexilaApp : Gtk.Application
}
}
- private void setup_app_menu ()
- {
- Gtk.Builder builder =
- new Gtk.Builder.from_resource ("/org/gnome/latexila/ui/app_menu.ui");
- builder.set_translation_domain (Config.GETTEXT_PACKAGE);
- unowned GLib.MenuModel app_menu = builder.get_object ("app_menu")
- as GLib.MenuModel;
- set_app_menu (app_menu);
- }
-
private void reopen_files ()
{
GLib.Settings editor_settings =
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index 5bfddc1..90753da 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -5,7 +5,7 @@ dist_ui_DATA = \
ui.xml
EXTRA_DIST = \
- app_menu.ui \
- latexila.adwaita.css
+ 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..b3b9d84
--- /dev/null
+++ b/src/ui/menus.ui
@@ -0,0 +1,17 @@
+<?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">_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]