[gnome-builder] devhelp: setup menus for devhelp view
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] devhelp: setup menus for devhelp view
- Date: Wed, 19 Jul 2017 11:11:34 +0000 (UTC)
commit ce7669654935d2a938c5e2344097b45ac3748b71
Author: Christian Hergert <chergert redhat com>
Date: Wed Jul 5 23:30:56 2017 -0700
devhelp: setup menus for devhelp view
Just a few of these, we might need more, just making sure we
have a couple that we had on the editor view.
data/gtk/menus.ui | 8 +++---
.../devhelp/gbp-devhelp-resources.gresource.xml | 1 +
plugins/devhelp/gbp-devhelp-view.c | 1 +
plugins/devhelp/gtk/menus.ui | 22 ++++++++++++++++++++
4 files changed, 28 insertions(+), 4 deletions(-)
---
diff --git a/data/gtk/menus.ui b/data/gtk/menus.ui
index a4b8f06..d48c055 100644
--- a/data/gtk/menus.ui
+++ b/data/gtk/menus.ui
@@ -233,10 +233,6 @@
<attribute name="action">layoutstack.move-right</attribute>
</item>
<item>
- <attribute name="action">layoutstack.split-view</attribute>
- <attribute name="label" translatable="yes">Split</attribute>
- </item>
- <item>
<attribute name="action">layoutgrid.close-stack</attribute>
<attribute name="label" translatable="yes">Close</attribute>
</item>
@@ -251,6 +247,10 @@
<attribute name="action">layoutstack.open-in-new-frame</attribute>
</item>
<item>
+ <attribute name="label" translatable="yes">Split</attribute>
+ <attribute name="action">layoutstack.split-view</attribute>
+ </item>
+ <item>
<attribute name="label" translatable="yes">Print…</attribute>
<attribute name="action">editor-view.print</attribute>
</item>
diff --git a/plugins/devhelp/gbp-devhelp-resources.gresource.xml
b/plugins/devhelp/gbp-devhelp-resources.gresource.xml
index bbb69c5..ac2eba0 100644
--- a/plugins/devhelp/gbp-devhelp-resources.gresource.xml
+++ b/plugins/devhelp/gbp-devhelp-resources.gresource.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/builder/plugins/devhelp-plugin">
+ <file>gtk/menus.ui</file>
<file>themes/shared.css</file>
<file>gbp-devhelp-menu-button.ui</file>
<file>gbp-devhelp-view.ui</file>
diff --git a/plugins/devhelp/gbp-devhelp-view.c b/plugins/devhelp/gbp-devhelp-view.c
index c0d2c14..7086440 100644
--- a/plugins/devhelp/gbp-devhelp-view.c
+++ b/plugins/devhelp/gbp-devhelp-view.c
@@ -182,6 +182,7 @@ gbp_devhelp_view_init (GbpDevhelpView *self)
ide_layout_view_set_can_split (IDE_LAYOUT_VIEW (self), TRUE);
ide_layout_view_set_icon_name (IDE_LAYOUT_VIEW (self), "devhelp-symbolic");
+ ide_layout_view_set_menu_id (IDE_LAYOUT_VIEW (self), "devhelp-view-document-menu");
self->search = g_object_new (GBP_TYPE_DEVHELP_SEARCH, NULL);
self->search_revealer = gbp_devhelp_search_get_revealer (self->search);
diff --git a/plugins/devhelp/gtk/menus.ui b/plugins/devhelp/gtk/menus.ui
new file mode 100644
index 0000000..8d9065b
--- /dev/null
+++ b/plugins/devhelp/gtk/menus.ui
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <menu id="devhelp-view-document-menu">
+ <section id="devhelp-document-section">
+ <attribute name="label" translatable="yes">Documentation</attribute>
+ <item>
+ <attribute name="label" translatable="yes">Open in New Frame</attribute>
+ <attribute name="action">layoutstack.open-in-new-frame</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Split</attribute>
+ <attribute name="action">layoutstack.split-view</attribute>
+ </item>
+ </section>
+ <section id="devhelp-close-section">
+ <item>
+ <attribute name="label" translatable="yes">Close</attribute>
+ <attribute name="action">layoutstack.close-view</attribute>
+ </item>
+ </section>
+ </menu>
+</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]