mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
Bug 553086 – hard to see current immodule
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. svn path=/trunk/; revision=21548
This commit is contained in:
parent
82e001ea41
commit
1c8da0ca75
@ -1,3 +1,11 @@
|
||||
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
|
||||
|
@ -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"),
|
||||
|
Loading…
Reference in New Issue
Block a user