[gnome-builder/wip/gtk4-port: 159/736] libide/gui: add merged menu getter




commit 2801321844ec9e69b47e92b3489ebf5c2b8c6db1
Author: Christian Hergert <chergert redhat com>
Date:   Tue Mar 29 02:02:38 2022 -0700

    libide/gui: add merged menu getter

 src/libide/gui/ide-application.c | 9 +++++++++
 src/libide/gui/ide-application.h | 7 +++++--
 2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/gui/ide-application.c b/src/libide/gui/ide-application.c
index 2301c2ca7..2a60e0bca 100644
--- a/src/libide/gui/ide-application.c
+++ b/src/libide/gui/ide-application.c
@@ -683,3 +683,12 @@ ide_application_find_addin_by_module_name (IdeApplication *self,
 
   return peas_extension_set_get_extension (self->addins, plugin_info);
 }
+
+GMenu *
+ide_application_get_menu_by_id (IdeApplication *self,
+                                const char     *menu_id)
+{
+  g_return_val_if_fail (IDE_IS_APPLICATION (self), NULL);
+
+  return ide_menu_manager_get_menu_by_id (self->menu_manager, menu_id);
+}
diff --git a/src/libide/gui/ide-application.h b/src/libide/gui/ide-application.h
index 448ed877a..3f4ac373a 100644
--- a/src/libide/gui/ide-application.h
+++ b/src/libide/gui/ide-application.h
@@ -80,11 +80,14 @@ void           ide_application_foreach_workbench        (IdeApplication
 IDE_AVAILABLE_IN_ALL
 IdeWorkbench  *ide_application_find_workbench_for_file  (IdeApplication           *self,
                                                          GFile                    *file);
-IDE_AVAILABLE_IN_3_34
+IDE_AVAILABLE_IN_ALL
 gpointer       ide_application_find_addin_by_module_name (IdeApplication           *self,
                                                           const gchar              *module_name);
-IDE_AVAILABLE_IN_41
+IDE_AVAILABLE_IN_ALL
 char          *ide_application_create_cancel_action      (IdeApplication           *self,
                                                           GCancellable             *cancellable);
+IDE_AVAILABLE_IN_ALL
+GMenu         *ide_application_get_menu_by_id            (IdeApplication           *self,
+                                                          const char               *menu_id);
 
 G_END_DECLS


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