[Anthy-dev 1485] Re: [uim] 候補ウインドウの無選択状態

Back to archive index

Takuro Ashie ashie****@homa*****
2004年 12月 21日 (火) 13:10:55 JST


足永です。

On Mon, 20 Dec 2004 23:09:31 +0900
Etsushi Kato <ekato****@ees*****> wrote:

> この変更で、anthy や skk を使う場合、初めて候補ウィンドウが出る場合の
> 挙動がおかしくなっているようです。修正お願いします。

すいません、セレクションのコールバックに変更漏れがありました。
以下のように修正しておきました。

もしまだ問題がありましたら教えて下さい m( )m


Index: helper/helper-candwin-gtk.c
===================================================================
--- helper/helper-candwin-gtk.c	(revision 48)
+++ helper/helper-candwin-gtk.c	(working copy)
@@ -219,15 +219,23 @@
   idx = *indicies + cwin->display_limit * cwin->page_index;
 
   if (!path_currently_selected && cwin->candidate_index != idx) {
-    cwin->candidate_index = idx;
-    g_signal_emit(G_OBJECT(cwin),
-		  cand_win_gtk_signals[INDEX_CHANGED_SIGNAL], 0);
+    if (cwin->candidate_index >= 0) {
+      cwin->candidate_index = idx;
+      g_signal_emit(G_OBJECT(cwin),
+		    cand_win_gtk_signals[INDEX_CHANGED_SIGNAL], 0);
+    }
 
-  }
+    update_label(cwin);
 
-  update_label(cwin);
+    if (cwin->candidate_index < 0)
+      return FALSE;
+    else
+      return TRUE;
+  } else {
+    update_label(cwin);
 
-  return TRUE;
+    return TRUE;
+  }
 }
 
 #if 0
Index: gtk/uim-cand-win-gtk.c
===================================================================
--- gtk/uim-cand-win-gtk.c	(revision 47)
+++ gtk/uim-cand-win-gtk.c	(working copy)
@@ -259,15 +259,23 @@
   idx = *indicies + cwin->display_limit * cwin->page_index;
 
   if (!path_currently_selected && cwin->candidate_index != idx) {
-    cwin->candidate_index = idx;
-    g_signal_emit(G_OBJECT(cwin),
-		  cand_win_gtk_signals[INDEX_CHANGED_SIGNAL], 0);
+    if (cwin->candidate_index >= 0) {
+      cwin->candidate_index = idx;
+      g_signal_emit(G_OBJECT(cwin),
+		    cand_win_gtk_signals[INDEX_CHANGED_SIGNAL], 0);
+    }
 
-  }
+    update_label(cwin);
 
-  update_label(cwin);
+    if (cwin->candidate_index < 0)
+      return FALSE;
+    else
+      return TRUE;
+  } else {
+    update_label(cwin);
 
-  return TRUE;
+    return TRUE;
+  }
 }
 
 static gboolean
@@ -388,6 +396,8 @@
   }
 
   uim_cand_win_gtk_set_page(cwin, 0);
+
+  update_label(cwin);
 }
 
 void



Anthy-dev メーリングリストの案内
Back to archive index