[gnome-builder/wip/gtk4-port: 651/1774] 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: 651/1774] libide/sourceview: add prepend menu helper
- Date: Mon, 11 Jul 2022 22:31:19 +0000 (UTC)
commit df801a847fbca73e77d8f9112498b7857ea0d604
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]