[uim-commit] r1161 - in trunk: gtk xim

tkng at freedesktop.org tkng at freedesktop.org
Tue Aug 9 05:50:49 EST 2005


Author: tkng
Date: 2005-08-08 12:50:42 -0700 (Mon, 08 Aug 2005)
New Revision: 1161

Modified:
   trunk/gtk/gtk-im-uim.c
   trunk/xim/helper.cpp
Log:
* gtk/gtk-im-uim.c:
 -(im_uim_parse_helper_str): Corresponded to custom_reload_notify.

* xim/helper.cpp:
 -(helper_str_parse): Corresponded to custom_reload_notify.


Modified: trunk/gtk/gtk-im-uim.c
===================================================================
--- trunk/gtk/gtk-im-uim.c	2005-08-08 19:48:47 UTC (rev 1160)
+++ trunk/gtk/gtk-im-uim.c	2005-08-08 19:50:42 UTC (rev 1161)
@@ -986,15 +986,9 @@
   if (g_str_has_prefix(str, "im_change") == TRUE) {
     im_uim_parse_helper_str_im_change(str);
   } else if (g_str_has_prefix(str, "prop_update_custom") == TRUE) {
-    IMUIMContext *cc;
-    lines = g_strsplit(str, "\n", 0);
-    if (lines && lines[0] && lines[1] && lines[2]) {
-      for (cc = context_list.next; cc != &context_list; cc = cc->next) {
-	uim_prop_update_custom(cc->uc, lines[1], lines[2]);
-	break;  /* all custom variables are global */
-      }
-      g_strfreev(lines);
-    }
+    uim_prop_reload_configs();
+  } else if (g_str_has_prefix(str, "custom_reload_notify") == TRUE) {
+    uim_prop_reload_configs();
   } else if (focused_context && !disable_focused_context) {
     if (g_str_has_prefix(str, "prop_list_get") == TRUE) {
       uim_prop_list_update(focused_context->uc);

Modified: trunk/xim/helper.cpp
===================================================================
--- trunk/xim/helper.cpp	2005-08-08 19:48:47 UTC (rev 1160)
+++ trunk/xim/helper.cpp	2005-08-08 19:50:42 UTC (rev 1161)
@@ -204,26 +204,9 @@
 	parse_helper_str_im_change(line, engine);
 	return;
     } else if (strcmp("prop_update_custom", line) == 0) {
-	line = eol + 1;
-	eol = strchr(line, '\n');
-	if (eol != NULL)
-	    *eol = '\0';
-	else
-	    return;
-
-	char *custom = line;
-	char *val = eol + 1;
-	eol = strchr(val, '\n');
-	if (eol != NULL)
-	    *eol = '\0';
-	else
-	    return;
-
-	std::map<Window, XimServer *>::iterator it;
-	for (it = XimServer::gServerMap.begin(); it != XimServer::gServerMap.end(); it++) {
-	    (*it).second->customContext(custom, val);
-	}
-	return;
+	uim_prop_reload_configs();
+    } else if (strcmp("custom_reload_notify", line) == 0) {
+	uim_prop_reload_configs();
     }
 }
 



More information about the uim-commit mailing list