[gnome-builder] project-tree: add Rename action to context menu for files
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] project-tree: add Rename action to context menu for files
- Date: Thu, 16 Apr 2015 01:07:53 +0000 (UTC)
commit fc15f6ee5362757068a024e2e9f5345f5eb9621e
Author: Christian Hergert <christian hergert me>
Date: Wed Apr 15 18:02:42 2015 -0700
project-tree: add Rename action to context menu for files
data/gtk/menus.ui | 8 ++++++++
src/project-tree/gb-project-tree-builder.c | 3 +++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/data/gtk/menus.ui b/data/gtk/menus.ui
index 163821c..e7b02d7 100644
--- a/data/gtk/menus.ui
+++ b/data/gtk/menus.ui
@@ -182,6 +182,14 @@
</item>
</section>
</menu>
+ <menu id="gb-project-tree-rename">
+ <section id="gb-project-tree-rename-section">
+ <item>
+ <attribute name="label" translatable="yes">_Rename</attribute>
+ <attribute name="action">project-tree.rename-file</attribute>
+ </item>
+ </section>
+ </menu>
<menu id="gb-project-tree-build">
<section id="gb-project-tree-build-section">
<item>
diff --git a/src/project-tree/gb-project-tree-builder.c b/src/project-tree/gb-project-tree-builder.c
index 338624a..9420826 100644
--- a/src/project-tree/gb-project-tree-builder.c
+++ b/src/project-tree/gb-project-tree-builder.c
@@ -294,6 +294,9 @@ gb_project_tree_builder_node_popup (GbTreeBuilder *builder,
if (IDE_IS_PROJECT_FILE (item))
{
+ submenu = gtk_application_get_menu_by_id (app, "gb-project-tree-rename");
+ g_menu_prepend_section (menu, NULL, G_MENU_MODEL (submenu));
+
submenu = gtk_application_get_menu_by_id (app, "gb-project-tree-open-containing");
g_menu_prepend_section (menu, NULL, G_MENU_MODEL (submenu));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]