[uim-commit] r971 - in trunk: doc gtk uim

yamaken at freedesktop.org yamaken at freedesktop.org
Thu Jul 14 21:43:36 EST 2005


Author: yamaken
Date: 2005-07-14 04:43:33 -0700 (Thu, 14 Jul 2005)
New Revision: 971

Modified:
   trunk/doc/COMPATIBILITY
   trunk/gtk/gtk-im-uim.c
   trunk/uim/uim.c
Log:
* This commit is including an API specification change which affects
  to bridge implementations. See doc/COMPATIBILITY for detail.

* uim/uim.c
  - (uim_switch_im): Remove implicit default-im-name switching at end
* gtk/gtk-im-uim.c
  - (im_uim_parse_helper_str_im_change): 
    * Add default IM switching to im_change_whole_desktop and
      im_change_this_application_only
    * Fix responding to a message that directed to other processes
      (related to disable_focused_context)
* doc/COMPATIBILITY
  - Add a new section 'default IM switching responsibility separation
    from uim_switch_im()'


Modified: trunk/doc/COMPATIBILITY
===================================================================
--- trunk/doc/COMPATIBILITY	2005-07-12 18:03:15 UTC (rev 970)
+++ trunk/doc/COMPATIBILITY	2005-07-14 11:43:33 UTC (rev 971)
@@ -58,6 +58,24 @@
 The changes are described below in most recently updated order.
 
 ------------------------------------------------------------------------------
+Summary: default IM switching responsibility separation from uim_switch_im()
+Affects: Bridge developers
+Updates: C API
+Version: 0.4.8
+Revision: 971
+Date: 2005-07-14
+Modifier: YamaKen
+Related: IM switcher
+URL:
+  http://lists.sourceforge.jp/mailman/archives/anthy-dev/2005-July/002130.html (Japanese)
+  http://lists.sourceforge.jp/mailman/archives/anthy-dev/2005-July/002135.html (Japanese)
+Changes:
+  uim_switch_im()
+Description:
+  The responsibility about switching default IM has been separated
+  from uim_switch_im() and moved into each bridges. This is required
+  to handle im_change_this_text_area_only message properly.
+------------------------------------------------------------------------------
 Summary: New helper-candwin protocol about showing input state
 Affects: Helper program developers
 Updates: Helper-candwin protocol

Modified: trunk/gtk/gtk-im-uim.c
===================================================================
--- trunk/gtk/gtk-im-uim.c	2005-07-12 18:03:15 UTC (rev 970)
+++ trunk/gtk/gtk-im-uim.c	2005-07-14 11:43:33 UTC (rev 971)
@@ -933,27 +933,34 @@
   IMUIMContext *cc;
   gchar **lines = g_strsplit(str, "\n", -1);
   gchar *im_name = lines[1];
+  GString *im_name_sym = g_string_new(im_name);
+  g_string_prepend_c(im_name_sym, '\'');
   if (g_str_has_prefix(str, "im_change_this_text_area_only") == TRUE) {
-    if (focused_context) {
+    if (focused_context && disable_focused_context == FALSE) {
       uim_switch_im(focused_context->uc, im_name);
       uim_prop_list_update(focused_context->uc);
     }
   } 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);
+      uim_prop_update_custom(cc->uc, "custom-preserved-default-im-name",
+			     im_name_sym->str);
       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) {    
+    if (focused_context && disable_focused_context == FALSE) {
       for (cc = context_list.next; cc != &context_list; cc = cc->next) {
 	uim_switch_im(cc->uc, im_name);
+	uim_prop_update_custom(cc->uc, "custom-preserved-default-im-name",
+			       im_name_sym->str);
 	if (cc == focused_context)
 	  uim_prop_list_update(cc->uc);
       }
     }
   }
   g_strfreev(lines);
+  g_string_free(im_name_sym, TRUE);
 }
 
 static void

Modified: trunk/uim/uim.c
===================================================================
--- trunk/uim/uim.c	2005-07-12 18:03:15 UTC (rev 970)
+++ trunk/uim/uim.c	2005-07-14 11:43:33 UTC (rev 971)
@@ -236,13 +236,6 @@
   uc->short_desc = uim_return_str;
   uim_return_str = NULL;  /* ownership has been transferred */
 #endif
-
-  /*
-     To remember the IM selected by uim-toolbar, we record the latest
-     IM to default-im-name. This makes subsequent contexts the
-     selected one. -- YamaKen 2004-11-15
-  */
-  UIM_EVAL_FSTRING1(uc, "(set! default-im-name '%s)", engine);
 }
 
 void



More information about the uim-commit mailing list