[cheese] Use new GtkApplication appmenu resource handling
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] Use new GtkApplication appmenu resource handling
- Date: Thu, 10 Jul 2014 12:22:01 +0000 (UTC)
commit f657bad88ed87df0f5936506fbc1892843114084
Author: David King <amigadave amigadave com>
Date: Thu Jul 10 13:19:17 2014 +0100
Use new GtkApplication appmenu resource handling
Makefile.am | 2 +-
configure.ac | 2 +-
data/{cheese-appmenu.ui => menus.ui} | 3 +--
data/org.gnome.Cheese.gresource.xml | 4 +++-
po/POTFILES.in | 2 +-
src/cheese-application.vala | 5 -----
6 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index be23ccb..fbcd4de 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -198,10 +198,10 @@ endif
noinst_resource_files = \
data/cheese.css \
data/cheese-viewport.json \
- data/cheese-appmenu.ui \
data/cheese-main-window.ui \
data/cheese-prefs.ui \
data/headerbar.ui \
+ data/menus.ui \
data/pixmaps/cheese-1.svg \
data/pixmaps/cheese-2.svg \
data/pixmaps/cheese-3.svg \
diff --git a/configure.ac b/configure.ac
index f5ad190..5445de0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,7 +57,7 @@ IT_PROG_INTLTOOL([0.50.0])
GLIB_REQUIRED="glib-2.0 >= 2.39.90"
-GTK_REQUIRED="gtk+-3.0 >= 3.11.6"
+GTK_REQUIRED="gtk+-3.0 >= 3.13.4"
GDK_PIXBUF_REQUIRED="gdk-pixbuf-2.0"
LIBGNOMEDESKTOP_REQUIRED="gnome-desktop-3.0 >= 2.91.6"
GSTREAMER_VERSION=0.11.0
diff --git a/data/cheese-appmenu.ui b/data/menus.ui
similarity index 98%
rename from data/cheese-appmenu.ui
rename to data/menus.ui
index 2948e1b..8d32f11 100644
--- a/data/cheese-appmenu.ui
+++ b/data/menus.ui
@@ -1,5 +1,5 @@
<interface domain="cheese">
- <menu id="appmenu">
+ <menu id="app-menu">
<section>
<item>
<attribute name="accel">F11</attribute>
@@ -29,4 +29,3 @@
</section>
</menu>
</interface>
-
diff --git a/data/org.gnome.Cheese.gresource.xml b/data/org.gnome.Cheese.gresource.xml
index 4d02eea..00c2d29 100644
--- a/data/org.gnome.Cheese.gresource.xml
+++ b/data/org.gnome.Cheese.gresource.xml
@@ -3,7 +3,6 @@
<gresource prefix='/org/gnome/Cheese'>
<file>cheese.css</file>
<file>cheese-viewport.json</file>
- <file preprocess="xml-stripblanks">cheese-appmenu.ui</file>
<file preprocess="xml-stripblanks">cheese-main-window.ui</file>
<file preprocess="xml-stripblanks">cheese-prefs.ui</file>
<file preprocess="xml-stripblanks">headerbar.ui</file>
@@ -12,5 +11,8 @@
<file>pixmaps/cheese-3.svg</file>
<file preprocess="to-pixdata">pixmaps/thumbnail-frame.png</file>
</gresource>
+ <gresource prefix='/org/gnome/Cheese/gtk'>
+ <file preprocess="xml-stripblanks">menus.ui</file>
+ </gresource>
</gresources>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e88cdb5..bbd2b88 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,10 +1,10 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
[encoding: UTF-8]
-[type: gettext/glade]data/cheese-appmenu.ui
[type: gettext/glade]data/cheese-main-window.ui
[type: gettext/glade]data/cheese-prefs.ui
[type: gettext/glade]data/headerbar.ui
+[type: gettext/glade]data/menus.ui
data/org.gnome.Cheese.appdata.xml.in
data/org.gnome.Cheese.desktop.in.in
data/org.gnome.Cheese.gschema.xml
diff --git a/src/cheese-application.vala b/src/cheese-application.vala
index 7361c0d..d316124 100644
--- a/src/cheese-application.vala
+++ b/src/cheese-application.vala
@@ -113,11 +113,6 @@ public class Cheese.Application : Gtk.Application
Environment.set_application_name (_("Cheese"));
Window.set_default_icon_name ("cheese");
- // Create the menus.
- var builder = new Gtk.Builder.from_resource ("/org/gnome/Cheese/cheese-appmenu.ui");
- var appmenu = builder.get_object ("appmenu") as GLib.MenuModel;
- this.set_app_menu (appmenu);
-
this.add_accelerator ("space", "app.shoot", null);
// FIXME: Push these into the main window initialization.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]