[uim-commit] r3094 - trunk/xim
ekato at freedesktop.org
ekato at freedesktop.org
Fri Feb 3 20:18:51 PST 2006
Author: ekato
Date: 2006-02-03 20:18:47 -0800 (Fri, 03 Feb 2006)
New Revision: 3094
Modified:
trunk/xim/ximserver.cpp
Log:
* xim/ximserver.cpp (InputContext::update_prop_list) : Show caret
state indicator with this function instead of
InputContext::update_prop_label.
(InputContext::update_prop_label) : Ditto.
Modified: trunk/xim/ximserver.cpp
===================================================================
--- trunk/xim/ximserver.cpp 2006-02-03 10:02:56 UTC (rev 3093)
+++ trunk/xim/ximserver.cpp 2006-02-04 04:18:47 UTC (rev 3094)
@@ -849,25 +849,52 @@
return;
uim_helper_send_message(lib_uim_fd, buf);
free(buf);
+
+#if 1
+ // Show caret state indicator with this function instead of
+ // InputContext::update_prop_label() to workaround the label
+ // mismatch during IM switch caused from context-update-widgets.
+ uim_bool show_caret_state =
+ uim_scm_symbol_value_bool("bridge-show-input-state?");
+ if (show_caret_state == UIM_TRUE) {
+ char *p, *q;
+ char label[10];
+ int len, timeout;
+ Canddisp *disp = canddisp_singleton();
+
+ timeout = uim_scm_symbol_value_int("bridge-show-input-state-time-length");
+ if ((p = strstr(str, "branch\t"))) {
+ q = strchr(p + 7, '\t');
+ len = q - (p + 7);
+ if (q && len < 10) {
+ strncpy(label, p + 7, len);
+ label[len] = '\0';
+ disp->show_caret_state(label, timeout);
+ mCaretStateShown = true;
+ }
+ }
+ }
+#endif
}
void InputContext::update_prop_label(const char *str)
{
char *buf;
- uim_bool show_caret_state = uim_scm_symbol_value_bool("bridge-show-input-state?");
asprintf(&buf, "prop_label_update\ncharset=UTF-8\n%s", str);
if (!buf)
return;
uim_helper_send_message(lib_uim_fd, buf);
free(buf);
-
+#if 0
+ uim_bool show_caret_state = uim_scm_symbol_value_bool("bridge-show-input-state?");
if (show_caret_state == UIM_TRUE) {
int timeout = uim_scm_symbol_value_int("bridge-show-input-state-time-length");
Canddisp *disp = canddisp_singleton();
disp->show_caret_state(str, timeout);
mCaretStateShown = true;
}
+#endif
}
const char *InputContext::get_engine_name()
More information about the uim-commit
mailing list