[gnome-builder/wip/gtk4-port: 861/1774] plugins/spellcheck: put spelling menu in separate section




commit b9e8fd8aba4d7d99ad0e271f63accfc47e8314d9
Author: Christian Hergert <chergert redhat com>
Date:   Tue May 3 14:43:27 2022 -0700

    plugins/spellcheck: put spelling menu in separate section

 src/plugins/spellcheck/gbp-spell-editor-page-addin.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/spellcheck/gbp-spell-editor-page-addin.c 
b/src/plugins/spellcheck/gbp-spell-editor-page-addin.c
index 94137edad..f3a1106f0 100644
--- a/src/plugins/spellcheck/gbp-spell-editor-page-addin.c
+++ b/src/plugins/spellcheck/gbp-spell-editor-page-addin.c
@@ -192,6 +192,7 @@ gbp_spell_editor_page_addin_load (IdeEditorPageAddin *addin,
                                   IdeEditorPage      *page)
 {
   GbpSpellEditorPageAddin *self = (GbpSpellEditorPageAddin *)addin;
+  g_autoptr(GMenu) spell_section = NULL;
   IdeBufferAddin *buffer_addin;
   IdeSourceView *view;
   IdeBuffer *buffer;
@@ -209,7 +210,9 @@ gbp_spell_editor_page_addin_load (IdeEditorPageAddin *addin,
   self->buffer_addin = GBP_SPELL_BUFFER_ADDIN (buffer_addin);
 
   self->menu = editor_spell_menu_new ();
-  ide_source_view_append_menu (view, self->menu);
+  spell_section = g_menu_new ();
+  g_menu_append_section (spell_section, NULL, self->menu);
+  ide_source_view_append_menu (view, G_MENU_MODEL (spell_section));
 
   self->actions = g_simple_action_group_new ();
   g_action_map_add_action_entries (G_ACTION_MAP (self->actions),


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