summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--gtk/gtkimmulticontext.c23
2 files changed, 28 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 86caab9a75..e24712f0bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2008-09-29 Matthias Clasen <mclasen@redhat.com>
+ Bug 553086 – hard to see current immodule
+
+ * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
+ Display the actually selected context in the system menuitem.
+ Complaint by Akira Tagoh.
+
+2008-09-29 Matthias Clasen <mclasen@redhat.com>
+
Bug 530568 – Entries with visibility=FALSE should warn for caps-lock
on
diff --git a/gtk/gtkimmulticontext.c b/gtk/gtkimmulticontext.c
index 70820a942a..8ce3aa988d 100644
--- a/gtk/gtkimmulticontext.c
+++ b/gtk/gtkimmulticontext.c
@@ -538,9 +538,11 @@ gtk_im_multicontext_append_menuitems (GtkIMMulticontext *context,
const GtkIMContextInfo **contexts;
guint n_contexts, i;
GSList *group = NULL;
- GtkWidget *menuitem;
+ GtkWidget *menuitem, *system_menuitem;
+ const char *system_context_id;
- menuitem = gtk_radio_menu_item_new_with_label (group, Q_("input method menu|System"));
+ system_context_id = _gtk_im_module_get_default_context_id (context->priv->client_window);
+ system_menuitem = menuitem = gtk_radio_menu_item_new_with_label (group, Q_("input method menu|System"));
if (!user_context_id)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem), TRUE);
group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem));
@@ -550,6 +552,10 @@ gtk_im_multicontext_append_menuitems (GtkIMMulticontext *context,
gtk_widget_show (menuitem);
gtk_menu_shell_append (menushell, menuitem);
+ menuitem = gtk_separator_menu_item_new ();
+ gtk_widget_show (menuitem);
+ gtk_menu_shell_append (menushell, menuitem);
+
_gtk_im_module_list (&contexts, &n_contexts);
for (i = 0; i < n_contexts; i++)
@@ -613,7 +619,18 @@ gtk_im_multicontext_append_menuitems (GtkIMMulticontext *context,
if ((user_context_id &&
strcmp (contexts[i]->context_id, user_context_id) == 0))
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem), TRUE);
-
+
+ if (strcmp (contexts[i]->context_id, system_context_id) == 0)
+ {
+ GtkWidget *label;
+ char *text;
+
+ label = gtk_bin_get_child (GTK_BIN (system_menuitem));
+ text = g_strdup_printf (Q_("input method menu|System (%s)"), translated_name);
+ gtk_label_set_text (GTK_LABEL (label), text);
+ g_free (text);
+ }
+
group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem));
g_object_set_data (G_OBJECT (menuitem), I_("gtk-context-id"),