[uim-commit] r1540 - in trunk: scm test

yamaken at freedesktop.org yamaken at freedesktop.org
Fri Sep 23 01:32:55 PDT 2005


Author: yamaken
Date: 2005-09-23 01:32:52 -0700 (Fri, 23 Sep 2005)
New Revision: 1540

Modified:
   trunk/scm/action.scm
   trunk/test/test-action.scm
Log:
* scm/action.scm
  - (context-propagate-prop-label-update): Fix incorrect assumption
    about indicator of a widget reported in [Anthy-dev 2409]. This fix
    made custom indicator workable. But no codes of uim are broken by
    this bug since no IM is using custom indicator. Thanks Masanari
    Yamamoto for the reporting
* test/test-action.scm
  - (test context-propagate-prop-label-update): Add new test for the
    fix


Modified: trunk/scm/action.scm
===================================================================
--- trunk/scm/action.scm	2005-09-23 07:16:07 UTC (rev 1539)
+++ trunk/scm/action.scm	2005-09-23 08:32:52 UTC (rev 1540)
@@ -339,8 +339,8 @@
   (lambda (context)
     (let* ((widgets (context-widgets context))
 	   (active-label (lambda (widget)
-			   (let* ((activity (widget-activity widget))
-				  (indication (action-indicate activity
+			   (let* ((indicator (widget-indicator widget))
+				  (indication (action-indicate indicator
 							       context)))
 			     (indication-compose-label indication))))
 	   (labels (map active-label widgets))

Modified: trunk/test/test-action.scm
===================================================================
--- trunk/test/test-action.scm	2005-09-23 07:16:07 UTC (rev 1539)
+++ trunk/test/test-action.scm	2005-09-23 08:32:52 UTC (rev 1540)
@@ -29,7 +29,7 @@
 ;;; SUCH DAMAGE.
 ;;;;
 
-;; This file is tested with revision 389 of new repository
+;; This file is tested with revision 1540 of new repository
 
 (use test.unit)
 
@@ -220,6 +220,13 @@
 			   fallback-indication))
 	  #f) ;; has no actions
 
+	 (register-widget
+	  'widget_test_kana_input_method_without_act_indicator
+	  (indicator-new (lambda (owner)
+			   fallback-indication))
+	  (actions-new '(action_test_roma
+			 action_test_kana)))
+
 	 (define tc (test-context-new))
 	 (begin (test-context-set-rkc! tc (rk-context-new ja-rk-rule #t #f))
 		#t)
@@ -1507,6 +1514,18 @@
    (assert-equal (string-append "ア\tカタカナ\n"
 				"R\tローマ字\n")
 		 (uim 'test-prop-label))
+   ;; 2 widgets (without latter activity-indicator)
+   (uim '(begin
+	   (context-init-widgets! tc '(widget_test_input_mode
+				       widget_test_kana_input_method_without_act_indicator))
+	   #t))
+   (assert-true (uim-bool '(widget-activate! (assq 'widget_test_input_mode
+						   (context-widgets tc))
+					     'action_test_katakana)))
+   (uim '(context-propagate-prop-label-update tc))
+   (assert-equal (string-append "ア\tカタカナ\n"
+				"?\tunknown\n")
+		 (uim 'test-prop-label))
    ;; 2 widgets with non-existent
    (uim '(begin
 	   (context-init-widgets! tc '(widget_test_kana_input_method



More information about the uim-commit mailing list