[gnome-builder/wip/gtk4-port] plugins/sysprof: setup some menus for future sysprof actions



commit 463ef4956451875a65cb2e36daecc4d912ec8ddb
Author: Christian Hergert <chergert redhat com>
Date:   Tue May 17 16:57:29 2022 -0700

    plugins/sysprof: setup some menus for future sysprof actions

 src/plugins/sysprof/gbp-sysprof-page.c |  1 +
 src/plugins/sysprof/gtk/menus.ui       | 31 +++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)
---
diff --git a/src/plugins/sysprof/gbp-sysprof-page.c b/src/plugins/sysprof/gbp-sysprof-page.c
index c70e9b9bd..9d5fb2ec0 100644
--- a/src/plugins/sysprof/gbp-sysprof-page.c
+++ b/src/plugins/sysprof/gbp-sysprof-page.c
@@ -156,6 +156,7 @@ gbp_sysprof_page_init (GbpSysprofPage *self)
   gtk_widget_set_hexpand (GTK_WIDGET (self->display), TRUE);
   gtk_widget_set_vexpand (GTK_WIDGET (self->display), TRUE);
   ide_page_add_content_widget (IDE_PAGE (self), GTK_WIDGET (self->display));
+  ide_page_set_menu_id (IDE_PAGE (self), "gbp-sysprof-page-menu");
 
   panel_widget_set_icon_name (PANEL_WIDGET (self), "builder-profiler-symbolic");
 }
diff --git a/src/plugins/sysprof/gtk/menus.ui b/src/plugins/sysprof/gtk/menus.ui
index 8dd0a749c..f4b094b75 100644
--- a/src/plugins/sysprof/gtk/menus.ui
+++ b/src/plugins/sysprof/gtk/menus.ui
@@ -76,4 +76,35 @@
       </item>
     </section>
   </menu>
+  <menu id="gbp-sysprof-page-menu">
+    <section id="gbp-sysprof-page-section">
+      <attribute name="label" translatable="yes">Profiler</attribute>
+      <item>
+        <attribute name="label" translatable="yes">Open in New Frame</attribute>
+        <attribute name="action">sysprof.open-in-new-frame</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">Open in New Workspace…</attribute>
+        <attribute name="action">sysprof.open-in-new-workspace</attribute>
+      </item>
+    </section>
+    <section id="gbp-sysprof-page-file-section">
+      <item>
+        <attribute name="label" translatable="yes">Save As…</attribute>
+        <attribute name="action">sysprof.save-as</attribute>
+      </item>
+    </section>
+    <section id="gbp-sysprof-page-record-section">
+      <item>
+        <attribute name="label" translatable="yes">Record Again…</attribute>
+        <attribute name="action">sysprof.record-again</attribute>
+      </item>
+    </section>
+    <section id="gbp-sysprof-page-close-section">
+      <item>
+        <attribute name="label" translatable="yes">Close</attribute>
+        <attribute name="action">frame.close-page-or-frame</attribute>
+      </item>
+    </section>
+  </menu>
 </interface>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]