Revision: 6455
Author: deton.kih
Date: Fri Jun 18 21:33:37 2010
Log: * gtk/uim-cand-win-tbl-gtk.c
  - (button_clicked): Fix not to use relief to check whether button has cand
  - (is_empty_block): Ditto
* helper/candwin-tbl-gtk.c
  - (button_clicked): Ditto
  - (is_empty_block): Ditto

http://code.google.com/p/uim/source/detail?r=6455

Modified:
 /trunk/gtk/uim-cand-win-tbl-gtk.c
 /trunk/helper/candwin-tbl-gtk.c

=======================================
--- /trunk/gtk/uim-cand-win-tbl-gtk.c   Fri Jun 18 19:08:34 2010
+++ /trunk/gtk/uim-cand-win-tbl-gtk.c   Fri Jun 18 21:33:37 2010
@@ -273,11 +273,6 @@
     }
     p = idxbutton->button;
     if (p == button) {
-      GtkReliefStyle relief;
-      relief = gtk_button_get_relief(button);
-      if (relief != GTK_RELIEF_NORMAL) {
-        return;
-      }
       idx = idxbutton->cand_index_in_page;
       break;
     }
@@ -527,11 +522,9 @@
   gint row, col;
   for (row = rowstart; row < rowend; row++) {
     for (col = colstart; col < colend; col++) {
-      GtkButton *button = NULL;
-      GtkReliefStyle relief;
-      button = get_button(buttons, INDEX(row, col));
-      relief = gtk_button_get_relief(button);
-      if (relief == GTK_RELIEF_NORMAL) {
+      struct index_button *idxbutton;
+      idxbutton = g_ptr_array_index(buttons, INDEX(row, col));
+      if (idxbutton && idxbutton->cand_index_in_page != -1) {
         return FALSE;
       }
     }
=======================================
--- /trunk/helper/candwin-tbl-gtk.c     Fri Jun 18 19:08:34 2010
+++ /trunk/helper/candwin-tbl-gtk.c     Fri Jun 18 21:33:37 2010
@@ -277,11 +277,6 @@
     }
     p = idxbutton->button;
     if (p == button) {
-      GtkReliefStyle relief;
-      relief = gtk_button_get_relief(button);
-      if (relief != GTK_RELIEF_NORMAL) {
-        return;
-      }
       idx = idxbutton->cand_index_in_page;
       break;
     }
@@ -1091,11 +1086,9 @@
   gint row, col;
   for (row = rowstart; row < rowend; row++) {
     for (col = colstart; col < colend; col++) {
-      GtkButton *button = NULL;
-      GtkReliefStyle relief;
-      button = get_button(buttons, INDEX(row, col));
-      relief = gtk_button_get_relief(button);
-      if (relief == GTK_RELIEF_NORMAL) {
+      struct index_button *idxbutton;
+      idxbutton = g_ptr_array_index(buttons, INDEX(row, col));
+      if (idxbutton && idxbutton->cand_index_in_page != -1) {
         return FALSE;
       }
     }

Reply via email to