[uim-commit] r303 - trunk/gtk
ekato@freedesktop.org
ekato@freedesktop.org
Sat Jan 15 08:49:28 PST 2005
Author: ekato
Date: 2005-01-15 08:49:15 -0800 (Sat, 15 Jan 2005)
New Revision: 303
Modified:
trunk/gtk/gtk-im-uim.c
Log:
* gtk/gtk-im-uim.c (im_uim_send_im_list) : Cosmetic change.
(im_uim_parse_helper_str_im_change) : Properly update property
list of focused context after im switch.
Modified: trunk/gtk/gtk-im-uim.c
===================================================================
--- trunk/gtk/gtk-im-uim.c 2005-01-15 11:06:29 UTC (rev 302)
+++ trunk/gtk/gtk-im-uim.c 2005-01-15 16:49:15 UTC (rev 303)
@@ -699,13 +699,14 @@
{
int nr, i;
GString *msg;
- const char *current_im_name = uim_get_current_im_name(focused_context->uc);
- if(focused_context) {
- nr = uim_get_nr_im(focused_context->uc);
- } else {
+ const char *current_im_name;
+
+ if (!focused_context)
return;
- }
+ nr = uim_get_nr_im(focused_context->uc);
+ current_im_name = uim_get_current_im_name(focused_context->uc);
+
msg = g_string_new("im_list\ncharset=UTF-8\n");
for (i = 0; i < nr; i++) {
const char *name = uim_get_im_name(focused_context->uc, i);
@@ -895,11 +896,15 @@
} else if(g_str_has_prefix(str, "im_change_whole_desktop") == TRUE) {
for (cc = context_list.next; cc != &context_list; cc = cc->next) {
uim_switch_im(cc->uc, im_name);
+ if (focused_context && cc == focused_context)
+ uim_prop_list_update(cc->uc);
}
} else if(g_str_has_prefix(str, "im_change_this_application_only") == TRUE) {
if(focused_context) {
for (cc = context_list.next; cc != &context_list; cc = cc->next) {
uim_switch_im(cc->uc, im_name);
+ if (cc == focused_context)
+ uim_prop_list_update(cc->uc);
}
}
}
@@ -938,7 +943,7 @@
im_uim_send_im_list();
} else if (g_str_has_prefix(str, "commit_string")) {
lines = g_strsplit(str, "\n", 0);
- if (focused_context && lines && lines[0] && lines[1])
+ if (lines && lines[0] && lines[1])
g_signal_emit_by_name(focused_context, "commit", lines[1]);
} else if (g_str_has_prefix(str, "focus_in") == TRUE) {
disable_focused_context = TRUE;
More information about the Uim-commit
mailing list