[gnome-software] Use the new autometic menu support in gtk
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Use the new autometic menu support in gtk
- Date: Sat, 26 Jul 2014 15:47:32 +0000 (UTC)
commit 779fde43223749178dac52ded9bddcafd64c7bcd
Author: Kalev Lember <kalevlember gmail com>
Date: Sat Jul 26 15:43:04 2014 +0200
Use the new autometic menu support in gtk
po/POTFILES.in | 2 +-
src/Makefile.am | 2 +-
src/gnome-software.gresource.xml | 2 +-
src/gs-application.c | 8 --------
src/{app-menu.ui => menus.ui} | 2 +-
5 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1719d7d..da8f25b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,5 @@
data/appdata/org.gnome.Software.appdata.xml.in
[type: gettext/glade]src/app-folder-dialog.ui
-[type: gettext/glade]src/app-menu.ui
[type: gettext/glade]src/app-tile.ui
src/org.gnome.Software.desktop.in
src/gnome-software-local-file.desktop.in
@@ -46,4 +45,5 @@ src/plugins/gs-plugin-moduleset.c
src/plugins/gs-plugin-packagekit.c
src/plugins/gs-plugin-packagekit-refine.c
src/plugins/menu-spec-common.c
+[type: gettext/glade]src/menus.ui
[type: gettext/glade]src/popular-tile.ui
diff --git a/src/Makefile.am b/src/Makefile.am
index 0e00a4e..e152af2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -27,7 +27,7 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
UI_FILES = \
app-folder-dialog.ui \
- app-menu.ui \
+ menus.ui \
app-tile.ui \
category-tile.ui \
feature-tile.ui \
diff --git a/src/gnome-software.gresource.xml b/src/gnome-software.gresource.xml
index ad13a51..80b1e73 100644
--- a/src/gnome-software.gresource.xml
+++ b/src/gnome-software.gresource.xml
@@ -2,7 +2,7 @@
<gresources>
<gresource prefix="/org/gnome/Software">
<file preprocess="xml-stripblanks">gnome-software.ui</file>
- <file preprocess="xml-stripblanks">app-menu.ui</file>
+ <file preprocess="xml-stripblanks" alias="gtk/menus.ui">menus.ui</file>
<file preprocess="xml-stripblanks">popular-tile.ui</file>
<file preprocess="xml-stripblanks">feature-tile.ui</file>
<file preprocess="xml-stripblanks">category-tile.ui</file>
diff --git a/src/gs-application.c b/src/gs-application.c
index 3f61846..de83058 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -183,8 +183,6 @@ static void
gs_application_initialize_ui (GsApplication *app)
{
static gboolean initialized = FALSE;
- GtkBuilder *builder;
- GMenuModel *app_menu;
GFile *file;
gchar *theme;
@@ -196,12 +194,6 @@ gs_application_initialize_ui (GsApplication *app)
gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
DATADIR "/gnome-software/icons/hicolor");
- /* set up the app menu */
- builder = gtk_builder_new_from_resource ("/org/gnome/Software/app-menu.ui");
- app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
- gtk_application_set_app_menu (GTK_APPLICATION (app), app_menu);
- g_object_unref (builder);
-
/* get CSS */
app->provider = gtk_css_provider_new ();
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
diff --git a/src/app-menu.ui b/src/menus.ui
similarity index 96%
rename from src/app-menu.ui
rename to src/menus.ui
index 4c829f0..b138ba5 100644
--- a/src/app-menu.ui
+++ b/src/menus.ui
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <menu id="appmenu">
+ <menu id="app-menu">
<section>
<item>
<attribute name="label" translatable="yes">_Software Sources</attribute>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]