Revision: 6342
Author: ek.kato
Date: Mon Apr 26 18:53:41 2010
Log: * helper/candwin-gtk.c (tree_selection_changed)
  - Remove ad-hoc annotation code using eb.
* gtk/uim-cand-win-gtk.c
  - (tree_selection_changed) : Ditto.
  - (uim_cand_win_gtk_set_candidates) : Get annotation string
    here.
  - (uim_cand_win_gtk_set_page_candidates) : Ditto.
* gtk/Makefile.am : Follow the removal of eb.
* helper/Makefile.am : Ditto.

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

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

=======================================
--- /trunk/gtk/Makefile.am      Wed Mar 10 23:40:19 2010
+++ /trunk/gtk/Makefile.am      Mon Apr 26 18:53:41 2010
@@ -27,17 +27,6 @@
        caret-state-indicator.c caret-state-indicator.h \
        compose.c compose.h text-util.c text-util.h

-if EB
-im_uim_la_CPPFLAGS += @EBCONF_EBINCS@ @EBCONF_ZLIBINCS@ \
-                     @EBCONF_PTHREAD_CPPFLAGS@ \
-                     @EBCONF_INTLINCS@
-im_uim_la_CFLAGS += @EBCONF_PTHREAD_CFLAGS@
-im_uim_la_LDFLAGS += @EBCONF_PTHREAD_LDFLAGS@
-im_uim_la_LIBADD += ../uim/lib-eb-static.la \
-                    @EBCONF_EBLIBS@ @EBCONF_ZLIBLIBS@ \
-                   @EBCONF_INTLLIBS@
-endif
-
 noinst_PROGRAMS = gtk-rc-get-immodule-file
 gtk_rc_get_immodule_file_SOURCES = gtk-rc-get-immodule-file.c
 gtk_rc_get_immodule_file_CFLAGS = @GTK2_CFLAGS@
=======================================
--- /trunk/gtk/uim-cand-win-gtk.c       Sun Apr  4 20:35:54 2010
+++ /trunk/gtk/uim-cand-win-gtk.c       Mon Apr 26 18:53:41 2010
@@ -38,9 +38,6 @@
 #include <stdlib.h>
 #include <uim/uim.h>
 #include <uim/uim-scm.h>
-#if HAVE_EBLIB
-#include "uim-eb.h"
-#endif /* HAVE_EBLIB */

 #define NR_CANDIDATES 20 /* FIXME! not used yet */
 #define DEFAULT_MIN_WINDOW_WIDTH 80
@@ -375,35 +372,10 @@

   if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
     char *annotation = NULL;
-#if HAVE_EBLIB
-    /* FIXME! This is a ad-hoc solution to advance
-       annotation related discussion. */
-    if (uim_scm_symbol_value_bool("eb-enable-for-annotation?")) {
-      gchar *cand = NULL;
-
-      gtk_tree_model_get(model, &iter,
-                        COLUMN_CANDIDATE, &cand,
-                        -1);
-      if (cand && *cand) {
-       char *book;
-       uim_eb *ueb = NULL;
-
-       book = uim_scm_symbol_value_str("eb-dic-path");
-       if (book && *book)
-         ueb = uim_eb_new(book);
-       if (ueb) {
-         annotation = uim_eb_search_text(ueb, cand);
-         uim_eb_destroy(ueb);
-       }
-       free(book);
-      }
-      g_free(cand);
-    }
-#else /* HAVE_EB_LIB */
+
     gtk_tree_model_get(model, &iter,
                       COLUMN_ANNOTATION, &annotation,
                       -1);
-#endif /* HAVE_EB_LIB */

     if (annotation && *annotation) {
       if (!cwin->sub_window.window)
@@ -563,7 +535,7 @@
         gtk_list_store_set(store, &ti,
                           COLUMN_HEADING,    
uim_candidate_get_heading_label(cand),
                           COLUMN_CANDIDATE,  uim_candidate_get_cand_str(cand),
-                          COLUMN_ANNOTATION, NULL, 
/*uim_candidate_get_annotation(cand),*/
+                          COLUMN_ANNOTATION, 
uim_candidate_get_annotation_str(cand),
                           TERMINATOR);
       } else {
 #if 0
@@ -628,7 +600,7 @@
       gtk_list_store_set(store, &ti,
                         COLUMN_HEADING,    
uim_candidate_get_heading_label(cand),
                         COLUMN_CANDIDATE,  uim_candidate_get_cand_str(cand),
-                        COLUMN_ANNOTATION, NULL, 
/*uim_candidate_get_annotation(cand),*/
+                        COLUMN_ANNOTATION, 
uim_candidate_get_annotation_str(cand),
                         TERMINATOR);
     }
   }
=======================================
--- /trunk/helper/Makefile.am   Tue Apr 20 12:14:41 2010
+++ /trunk/helper/Makefile.am   Mon Apr 26 18:53:41 2010
@@ -62,16 +62,6 @@
                           $(top_builddir)/uim/libuim.la
 uim_candwin_gtk_CPPFLAGS = -I$(top_srcdir)
 uim_candwin_gtk_CFLAGS   = @GTK2_CFLAGS@
-if EB
-uim_candwin_gtk_CPPFLAGS += @EBCONF_EBINCS@ @EBCONF_ZLIBINCS@ \
-                           @EBCONF_PTHREAD_CPPFLAGS@ \
-                           @EBCONF_INTLINCS@
-uim_candwin_gtk_CFLAGS += @EBCONF_PTHREAD_CFLAGS@
-uim_candwin_gtk_LDFLAGS = @EBCONF_PTHREAD_LDFLAGS@
-uim_candwin_gtk_LDADD += ../uim/lib-eb-static.la \
-                        @EBCONF_EBLIBS@ @EBCONF_ZLIBLIBS@ \
-                        @EBCONF_INTLLIBS@
-endif

 uim_toolbar_gtk_SOURCES  = toolbar-standalone-gtk.c toolbar-common-gtk.c
 uim_toolbar_gtk_LDADD    = @GTK2_LIBS@ $(top_builddir)/uim/libuim-scm.la \
=======================================
--- /trunk/helper/candwin-gtk.c Sun Apr 25 19:21:52 2010
+++ /trunk/helper/candwin-gtk.c Mon Apr 26 18:53:41 2010
@@ -36,10 +36,6 @@
 #endif
 #include <uim/uim.h>
 #include <uim/uim-helper.h>
-#if HAVE_EBLIB
-#include <uim/uim-scm.h>
-#include "uim/uim-eb.h"
-#endif /* HAVE_EBLIB */
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
 #include <glib.h>
@@ -279,34 +275,10 @@

   if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
     char *annotation = NULL;
-#if HAVE_EBLIB
-    /* FIXME! This is a ad-hoc solution to advance
-       annotation related discussion. */
-    if (uim_scm_symbol_value_bool("eb-enable-for-annotation?")) {
-      gchar *cand = NULL;
-
-      gtk_tree_model_get(model, &iter,
-                         COLUMN_CANDIDATE, &cand,
-                         -1);
-      if (cand && *cand) {
-        char *book;
-        uim_eb *ueb = NULL;
-        book = uim_scm_symbol_value_str("eb-dic-path");
-        if (book && *book)
-          ueb = uim_eb_new(book);
-        if (ueb) {
-          annotation = uim_eb_search_text(ueb, cand);
-          uim_eb_destroy(ueb);
-        }
-        free(book);
-      }
-      g_free(cand);
-    }
-#else
+
     gtk_tree_model_get(model, &iter,
                        COLUMN_ANNOTATION, &annotation,
                        -1);
-#endif /* HAVE_EB_LIB */

     if (annotation && *annotation) {
       if (!cwin->sub_window.window)


--
Subscription settings: http://groups.google.com/group/uim-commit/subscribe?hl=en

Reply via email to