diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-03-29 00:24:58 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-03-29 00:24:58 +0000 |
commit | 1586ade9c57e3e497ea730a78f3adfc2c3da8fd4 (patch) | |
tree | 71aa2817af44446695d6a938aee0bc0a4d48f1b7 /gtk/gtkimmulticontext.c | |
parent | ed6076b2e0dab716b9ea4dfdb37c003d5f05798f (diff) | |
download | gtk+-1586ade9c57e3e497ea730a78f3adfc2c3da8fd4.tar.gz |
Add missing NULL on valist.
Wed Mar 28 19:20:43 2001 Owen Taylor <otaylor@redhat.com>
* gtk/testtext.c (create_buffer): Add missing NULL on
valist.
* gtk/gtkcheckmenuitem.c (gtk_check_menu_item_class_init): Fix
c-n-p problem with INCONSISTENT property.
[ Patch from Havoc Pennington <hp@redhat.com> ]
* gtk/gtkentry.h (struct _GtkEntryClass): add same populate_popup
hook.
* gtk/gtktextview.h (struct _GtkTextViewClass): add populate_popup
signal as a hook for extending the default popup menu
* gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
use radio menu items for the input method menuitems
* gtk/gtkimcontextsimple.c (check_hex): do better validation of
inserted unicode from Ctrl-Shift-hex input method
* gtk/gtktextbtree.c (_gtk_text_btree_insert): remove utf8
validatation here, already done at GtkTextBuffer level.
* gtk/gtkwidget.c (gtk_widget_class_init): add binding set, add
popup_menu run action signal and Shift+F10 and Menu keybindings.
* gtk/gtkentry.c: implement a default handler for popup_menu
* gtk/gtktextview.c: implement a default handler for popup_menu
* gtk/gtkmenu.c (gtk_menu_popup): select first item if popup is
from a key event
* gtk/gtklabel.c: remove "trailer" cruft
Diffstat (limited to 'gtk/gtkimmulticontext.c')
-rw-r--r-- | gtk/gtkimmulticontext.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gtk/gtkimmulticontext.c b/gtk/gtkimmulticontext.c index 80e75f0db5..341b56a02d 100644 --- a/gtk/gtkimmulticontext.c +++ b/gtk/gtkimmulticontext.c @@ -28,7 +28,7 @@ #include "gtksignal.h" #include "gtkimmulticontext.h" #include "gtkimmodule.h" -#include "gtkmenuitem.h" +#include "gtkradiomenuitem.h" static void gtk_im_multicontext_class_init (GtkIMMulticontextClass *class); static void gtk_im_multicontext_init (GtkIMMulticontext *im_multicontext); @@ -341,6 +341,7 @@ gtk_im_multicontext_append_menuitems (GtkIMMulticontext *context, { const GtkIMContextInfo **contexts; gint n_contexts, i; + GSList *group = NULL; _gtk_im_module_list (&contexts, &n_contexts); @@ -348,8 +349,17 @@ gtk_im_multicontext_append_menuitems (GtkIMMulticontext *context, { GtkWidget *menuitem; - menuitem = gtk_menu_item_new_with_label (contexts[i]->context_name); - + menuitem = gtk_radio_menu_item_new_with_label (group, + contexts[i]->context_name); + + if ((global_context_id == NULL && group == NULL) || + (global_context_id && + strcmp (contexts[i]->context_id, global_context_id) == 0)) + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem), + TRUE); + + group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem)); + gtk_object_set_data (GTK_OBJECT (menuitem), "gtk-context-id", (char *)contexts[i]->context_id); gtk_signal_connect (GTK_OBJECT (menuitem), "activate", |