[gnome-builder/wip/gtk4-port: 666/736] libide/sourceview: add prepend menu helper
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 666/736] libide/sourceview: add prepend menu helper
- Date: Tue, 26 Apr 2022 01:46:34 +0000 (UTC)
commit fe04719999d01e29d10c2c02ebbe0fd0032c4b21
Author: Christian Hergert <chergert redhat com>
Date: Tue Apr 19 22:41:08 2022 -0700
libide/sourceview: add prepend menu helper
src/libide/sourceview/ide-source-view.c | 10 ++++++++++
src/libide/sourceview/ide-source-view.h | 3 +++
2 files changed, 13 insertions(+)
---
diff --git a/src/libide/sourceview/ide-source-view.c b/src/libide/sourceview/ide-source-view.c
index 4976a621c..34405278a 100644
--- a/src/libide/sourceview/ide-source-view.c
+++ b/src/libide/sourceview/ide-source-view.c
@@ -777,6 +777,16 @@ ide_source_view_get_zoom_level (IdeSourceView *self)
return (double)alt_size / (double)size;
}
+void
+ide_source_view_prepend_menu (IdeSourceView *self,
+ GMenuModel *menu_model)
+{
+ g_return_if_fail (IDE_IS_SOURCE_VIEW (self));
+ g_return_if_fail (G_IS_MENU_MODEL (menu_model));
+
+ ide_joined_menu_prepend_menu (self->joined_menu, menu_model);
+}
+
void
ide_source_view_append_menu (IdeSourceView *self,
GMenuModel *menu_model)
diff --git a/src/libide/sourceview/ide-source-view.h b/src/libide/sourceview/ide-source-view.h
index d9b3d2308..a540cb8c3 100644
--- a/src/libide/sourceview/ide-source-view.h
+++ b/src/libide/sourceview/ide-source-view.h
@@ -53,6 +53,9 @@ void ide_source_view_set_font_desc (IdeSourceView
IDE_AVAILABLE_IN_ALL
const PangoFontDescription *ide_source_view_get_font_desc (IdeSourceView *self);
IDE_AVAILABLE_IN_ALL
+void ide_source_view_prepend_menu (IdeSourceView *self,
+ GMenuModel *menu_model);
+IDE_AVAILABLE_IN_ALL
void ide_source_view_append_menu (IdeSourceView *self,
GMenuModel *menu_model);
IDE_AVAILABLE_IN_ALL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]