[gnome-text-editor] sourceview: ensure spelling section too



commit a188a05933be4f794d8e4dd04167fc214595d08d
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jul 8 15:06:50 2021 -0700

    sourceview: ensure spelling section too

 src/editor-source-view.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/editor-source-view.c b/src/editor-source-view.c
index 4106582..1059587 100644
--- a/src/editor-source-view.c
+++ b/src/editor-source-view.c
@@ -202,6 +202,7 @@ editor_source_view_init (EditorSourceView *self)
 {
   g_autoptr(EditorJoinedMenu) joined = NULL;
   g_autoptr(GMenu) gsv_section = NULL;
+  g_autoptr(GMenu) spell_section = NULL;
   GtkEventController *controller;
   GMenuModel *extra_menu;
 
@@ -229,12 +230,15 @@ editor_source_view_init (EditorSourceView *self)
 
   joined = editor_joined_menu_new ();
   gsv_section = g_menu_new ();
+  spell_section = g_menu_new ();
+
   extra_menu = gtk_text_view_get_extra_menu (GTK_TEXT_VIEW (self));
   g_menu_append_section (gsv_section, NULL, extra_menu);
   editor_joined_menu_append_menu (joined, G_MENU_MODEL (gsv_section));
 
   self->spelling_menu = editor_spell_menu_new ();
-  editor_joined_menu_append_menu (joined, self->spelling_menu);
+  g_menu_append_section (spell_section, NULL, G_MENU_MODEL (self->spelling_menu));
+  editor_joined_menu_append_menu (joined, G_MENU_MODEL (spell_section));
 
   gtk_text_view_set_extra_menu (GTK_TEXT_VIEW (self), G_MENU_MODEL (joined));
 }


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