[gnome-flashback] system-indicators: fix show keyboard layout menu item



commit e1e76bb0e3342b1915fe0790e67d8d3b17b1400c
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Jan 1 23:55:25 2020 +0200

    system-indicators: fix show keyboard layout menu item

 system-indicators/si-input-sources.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/system-indicators/si-input-sources.c b/system-indicators/si-input-sources.c
index b431b15..6cbc09c 100644
--- a/system-indicators/si-input-sources.c
+++ b/system-indicators/si-input-sources.c
@@ -855,12 +855,6 @@ append_show_layout_item (SiInputSources *self,
 
   g_signal_connect (item, "activate", G_CALLBACK (show_layout_cb), self);
 
-  item = si_desktop_menu_item_new (_("Region & Language Settings"),
-                                   "gnome-region-panel.desktop");
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (self->menu), item);
-  gtk_widget_show (item);
-
   if (layout != NULL && *layout != '\0')
     {
       char *description;
@@ -881,6 +875,18 @@ append_show_layout_item (SiInputSources *self,
     }
 }
 
+static void
+append_settings_item (SiInputSources *self)
+{
+  GtkWidget *item;
+
+  item = si_desktop_menu_item_new (_("Region & Language Settings"),
+                                   "gnome-region-panel.desktop");
+
+  gtk_menu_shell_append (GTK_MENU_SHELL (self->menu), item);
+  gtk_widget_show (item);
+}
+
 static void
 remove_item_cb (GtkWidget *widget,
                 gpointer   data)
@@ -906,6 +912,7 @@ update_indicator_menu (SiInputSources *self,
   gtk_widget_show (separator);
 
   append_show_layout_item (self, current_source);
+  append_settings_item (self);
 
   return count;
 }


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