[gnome-builder] libide: add section ids and use merged menus for gear menu
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: add section ids and use merged menus for gear menu
- Date: Mon, 21 Dec 2015 07:59:05 +0000 (UTC)
commit 8835b448bb7a179ddcf72adc0d70944dbc2a6970
Author: Christian Hergert <chergert redhat com>
Date: Fri Dec 4 02:01:06 2015 -0800
libide: add section ids and use merged menus for gear menu
data/gtk/menus.ui | 17 ++++-------------
libide/ide-workbench-header-bar.c | 2 +-
2 files changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/data/gtk/menus.ui b/data/gtk/menus.ui
index a5924f6..9aa6a57 100644
--- a/data/gtk/menus.ui
+++ b/data/gtk/menus.ui
@@ -61,33 +61,24 @@
</item>
</section>
-->
- <section>
- <attribute name="id">file-section</attribute>
- </section>
- <section>
+ <section id="gear-menu-new-section">
<item>
<attribute name="label" translatable="yes">_New File</attribute>
- <attribute name="action">workbench.new-document</attribute>
+ <attribute name="action">win.new-document</attribute>
</item>
</section>
- <section>
+ <section id="gear-menu-open-section">
<item>
<attribute name="label" translatable="yes">_Open File</attribute>
<attribute name="action">win.open-with-dialog</attribute>
</item>
</section>
- <section>
+ <section id="gear-menu-save-section">
<item>
<attribute name="label" translatable="yes">Save _All</attribute>
<attribute name="action">win.save-all</attribute>
</item>
</section>
- <section>
- <attribute name="id">edit-section</attribute>
- </section>
- <section>
- <attribute name="id">edit-section-1</attribute>
- </section>
<!--
<section>
<attribute name="id">close-section</attribute>
diff --git a/libide/ide-workbench-header-bar.c b/libide/ide-workbench-header-bar.c
index a26a651..2a4aa61 100644
--- a/libide/ide-workbench-header-bar.c
+++ b/libide/ide-workbench-header-bar.c
@@ -52,7 +52,7 @@ ide_workbench_header_bar_init (IdeWorkbenchHeaderBar *self)
gtk_widget_init_template (GTK_WIDGET (self));
- model = gtk_application_get_menu_by_id (GTK_APPLICATION (IDE_APPLICATION_DEFAULT), "gear-menu");
+ model = ide_application_get_menu_by_id (IDE_APPLICATION_DEFAULT, "gear-menu");
popover = gtk_popover_new_from_model (NULL, G_MENU_MODEL (model));
gtk_menu_button_set_popover (priv->menu_button, popover);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]