Mailinglist Archive: opensuse-commit (2092 mails)

< Previous Next >
commit scim-tomoe
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Mon, 06 Aug 2007 23:14:59 +0200
  • Message-id: <20070806211459.5C6B667817A@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package scim-tomoe
checked in at Mon Aug 6 23:14:59 CEST 2007.

--------
--- GNOME/scim-tomoe/scim-tomoe.changes 2006-12-14 18:27:02.000000000 +0100
+++ /mounts/work_src_done/STABLE/scim-tomoe/scim-tomoe.changes  2007-08-06 19:10:02.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Aug 06 19:09:35 CEST 2007 - mfabian@xxxxxxx
+
+- update to 0.5.0:
+  • Adaptation to libtomoegtk-0.5.0.
+
+-------------------------------------------------------------------

Old:
----
  scim-tomoe-0.4.0.tar.bz2

New:
----
  scim-tomoe-0.5.0.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ scim-tomoe.spec ++++++
--- /var/tmp/diff_new_pack.z10012/_old  2007-08-06 23:14:42.000000000 +0200
+++ /var/tmp/diff_new_pack.z10012/_new  2007-08-06 23:14:42.000000000 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package scim-tomoe (Version 0.4.0)
+# spec file for package scim-tomoe (Version 0.5.0)
 #
-# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
 # This file and all modifications and additions to the pristine
 # package are under the same license as the package itself.
 #
@@ -11,15 +11,15 @@
 # norootforbuild
 
 Name:           scim-tomoe
-BuildRequires:  gcc-c++ gtk2-devel libtomoe-gtk-devel scim-devel tomoe-devel update-desktop-files
-Version:        0.4.0
+BuildRequires:  gcc-c++ gtk2-devel gucharmap-devel libtomoe-gtk-devel scim-devel tomoe-devel update-desktop-files
+Version:        0.5.0
 Release:        1
-License:        GNU General Public License (GPL)
+License:        GPL v2 or later
 Group:          System/I18n/Japanese
 Autoreqprov:    on
 Provides:       locale(scim:ja)
 URL:            http://sourceforge.jp/projects/scim-imengine/
-Source0:        http://osdn.dl.sourceforge.jp/scim-imengine/22896/scim-tomoe-0.4.0.tar.bz2
+Source0:        http://globalbase.dl.sourceforge.jp/scim-imengine/23343/scim-tomoe-0.5.0.tar.bz2
 Patch0:         libtool-autoconf.patch
 Patch2:         fix-to-build-with-scim-1.4.5.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -66,11 +66,15 @@
 %files -f scim-tomoe.lang
 %defattr(-, root, root)
 %doc AUTHORS COPYING NEWS README TODO ChangeLog
+%{_bindir}/scim-tomoe
 %{_libdir}/scim-1.0/%{scim_binary_version}/Helper/tomoe*
 %dir %{_datadir}/scim/icons/
 %{_datadir}/scim/icons/scim-tomoe.png
 
-%changelog -n scim-tomoe
+%changelog
+* Mon Aug 06 2007 - mfabian@xxxxxxx
+- update to 0.5.0:
+  • Adaptation to libtomoegtk-0.5.0.
 * Thu Dec 14 2006 - mfabian@xxxxxxx
 - update to 0.4.0.
   • Adaptation to libtomoegtk-0.3.0.

++++++ scim-tomoe-0.4.0.tar.bz2 -> scim-tomoe-0.5.0.tar.bz2 ++++++
++++ 1654 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/scim-tomoe-0.4.0/ChangeLog new/scim-tomoe-0.5.0/ChangeLog
--- old/scim-tomoe-0.4.0/ChangeLog      2006-11-29 04:40:08.000000000 +0100
+++ new/scim-tomoe-0.5.0/ChangeLog      2006-12-28 05:18:54.000000000 +0100
@@ -1,3 +1,86 @@
+2006-12-29  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * Version-0.5.0.
+
+2006-12-18  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * configure.ac: Bump version number.
+
+2006-12-11  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * src/scim-tomoe.in: Add.
+       * configure.ac, src/Makefile.am: Ditto.
+
+2006-12-07  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * src/scim_tomoe.cpp: TOMOE -> Tomoe.
+
+2006-12-06  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * src/scim_tomoe.cpp: Call gtk_main_quit() from here.
+
+2006-12-05  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * src/scim_tomoe_prefs_widget.cpp: Increase padding.
+
+2006-12-05  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * src/scim_tomoe_prefs_widget.cpp: Set default font name to font buttons
+       if corresponding settings are empty.
+
+2006-12-05  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * src/scim_tomoe_prefs_widget.cpp: Clean up.
+
+2006-12-05  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * src/scim_tomoe_prefs.h, src/scim_tomoe_prefs_widget.cpp: Add a
+       preference for selecting the font for the candidates view.
+       But default font is not set to the font button yet.
+       * po/ja.po, po/scim-tomoe.pot: Update.
+
+2006-12-05  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * src/scim_tomoe.cpp: Remove needless code.
+
+2006-12-05  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * src/scim_tomoe_prefs_widget.cpp: Fix a clash bug in dispose().
+       * src/scim_tomoe.cpp: Remove a needless line.
+
+2006-12-05  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * src/scim_tomoe_prefs_widget.cpp: Indent "auto find time" widget.
+
+2006-12-05  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * po/ja.po, po/scim-tomoe.pot: Update.
+
+2006-12-04  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * src/scim_tomoe_prefs_widget.cpp: Add "Unicode table" page.
+       * src/scim_tomoe.cpp: Minor fix.
+
+2006-12-04  Takuro Ashie  <ashie@xxxxxxxxxx>
+
+       * src/scim_tomoe.cpp: Follow libtomoe-gtk.
+       * src/scim_tomoe_prefs_widget.cpp: Separate preferences pages.
+       * po/ja.po, po/scim-tomoe.pot: Update.
+
+2006-12-01  Hiroyuki Ikezoe  <poincare@xxxxxxxxxx>
+
+       * src/scim_tomoe.cpp: Follow libtomoe-gtk.
+
+2006-12-01  Hiroyuki Ikezoe  <poincare@xxxxxxxxxx>
+
+       * src/scim_tomoe.cpp: Receive "selected" signal from
+       TomoeWindow itself.
+
+2006-12-01  Hiroyuki Ikezoe  <poincare@xxxxxxxxxx>
+
+       * src/scim_tomoe.cpp: Receive "selected" signal from
+       TomoeStrokeSearch.
+
 2006-11-29  Takuro Ashie  <ashie@xxxxxxxxxx>
 
        * Version-0.4.0.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/scim-tomoe-0.4.0/configure.ac new/scim-tomoe-0.5.0/configure.ac
--- old/scim-tomoe-0.4.0/configure.ac   2006-11-28 06:34:15.000000000 +0100
+++ new/scim-tomoe-0.5.0/configure.ac   2006-12-18 08:39:43.000000000 +0100
@@ -1,7 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)
 
-AC_INIT(scim-tomoe, 0.4.0, poincare@xxxxxxxxxx)
+AC_INIT(scim-tomoe, 0.5.0, poincare@xxxxxxxxxx)
 AC_CONFIG_SRCDIR([configure.ac])
 
 # Save this value here, since automake will set cflags and cxxflags later
@@ -9,7 +9,7 @@
 cppflags_set=${CPPFLAGS+set}
 
 SCIM_TOMOE_MAJOR_VERSION=0
-SCIM_TOMOE_MINOR_VERSION=4
+SCIM_TOMOE_MINOR_VERSION=5
 SCIM_TOMOE_MICRO_VERSION=0
 
 SCIM_TOMOE_VERSION=$SCIM_TOMOE_MAJOR_VERSION.$SCIM_TOMOE_MINOR_VERSION.$SCIM_TOMOE_MICRO_VERSION
@@ -101,6 +101,7 @@
 SCIM_DATADIR=`$PKG_CONFIG --variable=scimdatadir scim`
 SCIM_ICONDIR=`$PKG_CONFIG --variable=icondir scim`
 SCIM_MODULEDIR=`$PKG_CONFIG --variable=moduledir scim`
+SCIM_LIBEXECDIR=`$PKG_CONFIG --variable=moduledir scim`
 
 if test "x$SCIM_DATADIR" = "x"; then
   SCIM_DATADIR=${datadir}/scim
@@ -119,6 +120,7 @@
 AC_SUBST(SCIM_DATADIR)
 AC_SUBST(SCIM_ICONDIR)
 AC_SUBST(SCIM_MODULEDIR)
+AC_SUBST(SCIM_LIBEXECDIR)
 AC_SUBST(SCIM_TOMOE_DATADIR)
         
 AC_CONFIG_FILES([
@@ -128,6 +130,7 @@
 m4/Makefile
 src/Makefile
 data/Makefile
+src/scim-tomoe
 ])
 
 AC_OUTPUT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/scim-tomoe-0.4.0/NEWS new/scim-tomoe-0.5.0/NEWS
--- old/scim-tomoe-0.4.0/NEWS   2006-10-20 04:25:26.000000000 +0200
+++ new/scim-tomoe-0.5.0/NEWS   2006-12-28 05:21:09.000000000 +0100
@@ -1,3 +1,11 @@
+Overview of Changes from scim-tomoe-0.4.0 to scim-tomoe-0.5.0
+=============================================================
+* Adaptation to libtomoegtk-0.5.0.
+
+Overview of Changes from scim-tomoe-0.3.0 to scim-tomoe-0.4.0
+=============================================================
+* Adaptation to libtomoegtk-0.4.0.
+
 Overview of Changes from scim-tomoe-0.2.0 to scim-tomoe-0.3.0
 ==============================================================
 * Adaptation to libtomoegtk-0.3.0.
Files old/scim-tomoe-0.4.0/po/ja.gmo and new/scim-tomoe-0.5.0/po/ja.gmo differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/scim-tomoe-0.4.0/po/ja.po new/scim-tomoe-0.5.0/po/ja.po
--- old/scim-tomoe-0.4.0/po/ja.po       2006-11-28 06:37:32.000000000 +0100
+++ new/scim-tomoe-0.5.0/po/ja.po       2006-12-11 07:28:50.000000000 +0100
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: scim-tomoe\n"
 "Report-Msgid-Bugs-To: ashie@xxxxxxxxxx\n"
-"POT-Creation-Date: 2006-11-28 14:37+0900\n"
+"POT-Creation-Date: 2006-12-11 15:28+0900\n"
 "PO-Revision-Date: 2005-08-05 19:16+0900\n"
 "Last-Translator: Hiroyuki Ikezoe <poincare@xxxxxxxxxx>\n"
 "Language-Team: Japanese <ja@xxxxxx>\n"
@@ -15,57 +15,83 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/scim_tomoe.cpp:108
+#: src/scim_tomoe.cpp:105 src/scim_tomoe_prefs_widget.cpp:88
 msgid "Handwriting recognition"
 msgstr "手書き認識"
 
-#: src/scim_tomoe.cpp:110
-msgid "An front-end for handwriting recognition engine"
+#: src/scim_tomoe.cpp:107
+msgid "A front-end for handwriting recognition engine"
 msgstr "手書き認識エンジン用のフロントエンド"
 
-#: src/scim_tomoe.cpp:219
-msgid "TOMOE"
-msgstr "TOMOE"
+#: src/scim_tomoe.cpp:216
+msgid "Tomoe"
+msgstr ""
 
-#: src/scim_tomoe.cpp:221
-msgid "Show/Hide TOMOE."
+#: src/scim_tomoe.cpp:218
+#, fuzzy
+msgid "Show/Hide Tomoe."
 msgstr "TOMOEを表示/非表示"
 
-#: src/scim_tomoe.cpp:263
+#: src/scim_tomoe.cpp:258
 msgid "Space"
 msgstr "Space"
 
-#: src/scim_tomoe.cpp:271
+#: src/scim_tomoe.cpp:266
 msgid "BackSpace"
 msgstr "BackSpace"
 
-#: src/scim_tomoe.cpp:279
+#: src/scim_tomoe.cpp:274
 msgid "Enter"
 msgstr "Enter"
 
-#: src/scim_tomoe.cpp:310
-msgid "Preferences for SCIM-TOMOE"
-msgstr "SCIM-TOMOEの設定"
-
-#: src/scim_tomoe_prefs_widget.cpp:100
-msgid "Common"
-msgstr "一般"
+#: src/scim_tomoe.cpp:295
+msgid "Preferences for scim-tomoe"
+msgstr "scim-tomoeの設定"
+
+#: src/scim_tomoe_prefs_widget.cpp:81
+msgid "Window"
+msgstr "ウィンドウ"
+
+#: src/scim_tomoe_prefs_widget.cpp:95
+msgid "Unicode table"
+msgstr "Unicode表"
 
-#: src/scim_tomoe_prefs_widget.cpp:107
+#: src/scim_tomoe_prefs_widget.cpp:263
+msgid "Show on _top of other windows"
+msgstr "常に他のウインドウより前に表示する(_T)"
+
+#: src/scim_tomoe_prefs_widget.cpp:282
 msgid "Use auto _find"
 msgstr "自動検索を使用する(_F)"
 
-#: src/scim_tomoe_prefs_widget.cpp:129
+#: src/scim_tomoe_prefs_widget.cpp:296
 msgid "_Interval time until start auto find:"
 msgstr "自動検索を開始するまでの時間(_I):"
 
-#: src/scim_tomoe_prefs_widget.cpp:171
+#: src/scim_tomoe_prefs_widget.cpp:297
+msgid "[msec]"
+msgstr "[msec]"
+
+#: src/scim_tomoe_prefs_widget.cpp:312
 msgid "_Clear the canvas when select a candidate"
 msgstr "候補選択時にクリアする(_C)"
 
-#: src/scim_tomoe_prefs_widget.cpp:189
-msgid "Show on _top of other windows"
-msgstr "常に他のウインドウより前に表示する(_T)"
+#: src/scim_tomoe_prefs_widget.cpp:317
+msgid "Font for the candidates view:"
+msgstr "候補一覧のフォント:"
+
+#: src/scim_tomoe_prefs_widget.cpp:333
+msgid "Font for the Unicode table:"
+msgstr "Unicode表のフォント:"
+
+#~ msgid "TOMOE"
+#~ msgstr "TOMOE"
+
+#~ msgid "Handwriting Recognition"
+#~ msgstr "手書き認識"
+
+#~ msgid "Common"
+#~ msgstr "一般"
 
 #~ msgid "Preferences for handwriting pad"
 #~ msgstr "手書き認識パッドの設定"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/scim-tomoe-0.4.0/README new/scim-tomoe-0.5.0/README
--- old/scim-tomoe-0.4.0/README 2006-11-28 06:34:44.000000000 +0100
+++ new/scim-tomoe-0.5.0/README 2006-12-28 05:21:46.000000000 +0100
@@ -12,8 +12,8 @@
 2. Requirements
 ===============
 
-tomoe-0.4.0 or later.
-libtomoe-gtk-0.4.0 or later.
+tomoe-0.5.0 or later.
+libtomoe-gtk-0.5.0 or later.
 
 
 3. Usage
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/scim-tomoe-0.4.0/src/Makefile.am new/scim-tomoe-0.5.0/src/Makefile.am
--- old/scim-tomoe-0.4.0/src/Makefile.am        2006-10-13 08:37:02.000000000 +0200
+++ new/scim-tomoe-0.5.0/src/Makefile.am        2006-12-11 07:16:59.000000000 +0100
@@ -37,3 +37,7 @@
                    @GTK2_LIBS@ \
                    @LIBTOMOE_GTK_LIBS@ \
                    @TOMOE_LIBS@
+
+bin_SCRIPTS = scim-tomoe
+
+EXTRA_DIST = scim-tomoe.in
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/scim-tomoe-0.4.0/src/scim_tomoe.cpp new/scim-tomoe-0.5.0/src/scim_tomoe.cpp
--- old/scim-tomoe-0.4.0/src/scim_tomoe.cpp     2006-11-28 03:58:48.000000000 +0100
+++ new/scim-tomoe-0.5.0/src/scim_tomoe.cpp     2006-12-07 04:59:48.000000000 +0100
@@ -1,4 +1,3 @@
-
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /*
  * Copyright (c) 2005 Hiroyuki Ikezoe <poincare@xxxxxxxxxx>
@@ -18,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * $Id: scim_tomoe.cpp,v 1.27 2006/11/28 01:42:05 ikezoe Exp $
+ * $Id: scim_tomoe.cpp,v 1.38 2006/12/07 03:59:48 makeinu Exp $
  *
  */
 
@@ -56,8 +55,6 @@
 
 #define SCIM_TOMOE_ICON (SCIM_ICONDIR "/scim-tomoe.png")
 
-#define OBJECT_DATA_PREFS_WIN "ScimTomoe::PrefsWin"
-
 using namespace scim;
 
 static void       slot_exit                   (const HelperAgent   *agent,
@@ -70,7 +67,7 @@
 static void       run                         (const String        &display,
                                                const ConfigPointer &config);
 
-static void       on_char_table_selected      (TomoeCharTable      *table,
+static void       on_candidate_selected       (TomoeWindow         *window,
                                                gpointer             user_data);
 static void       on_space_button_clicked     (GtkButton           *button,
                                                gpointer             user_data);
@@ -84,7 +81,7 @@
                                                gpointer             user_data);
 
 static HelperAgent  helper_agent;
-static GtkWidget   *main_window;
+static GtkWidget   *main_window = NULL;
 static gint         main_window_xpos = 0;
 static gint         main_window_ypos = 0;
 
@@ -107,7 +104,7 @@
 
         helper_info.name = String (_("Handwriting recognition"));
         helper_info.description = String (
-            _("An front-end for handwriting recognition engine"));
+            _("A front-end for handwriting recognition engine"));
     }
 
     void scim_module_exit (void)
@@ -170,7 +167,7 @@
     if (gdk_display_get_n_screens (gdk_display_get_default ()) > screen) {
         GdkScreen *scr = gdk_display_get_screen (gdk_display_get_default (),
                                                  screen);
-        if (scr)
+        if (scr && main_window)
             gtk_window_set_screen (GTK_WINDOW (main_window), scr);
     }
 }
@@ -179,7 +176,7 @@
 slot_trigger_property (const HelperAgent *agent, int ic,
                        const String &uuid, const String &property)
 {
-    if (property == "/TOMOE") {
+    if (property == "/Tomoe") {
         if (GTK_WIDGET_VISIBLE (main_window)) {
             gtk_window_get_position (GTK_WINDOW (main_window),
                                      &main_window_xpos,
@@ -216,9 +213,9 @@
     GIOChannel *ch = g_io_channel_unix_new (fd);
 
     if (fd >= 0 && ch) {
-        Property prop ("/TOMOE", _("TOMOE"),
+        Property prop ("/Tomoe", _("Tomoe"),
                        SCIM_TOMOE_ICON,
-                       _("Show/Hide TOMOE."));
+                       _("Show/Hide Tomoe."));
            PropertyList props;
 
            props.push_back (prop);
@@ -245,8 +242,6 @@
         g_object_unref (icon);
     }
     gtk_widget_show (window);
-    g_signal_connect (G_OBJECT (window), "response",
-                      G_CALLBACK (gtk_main_quit), NULL);
     main_window = window;
 
     // add software keyboard buttons
@@ -255,7 +250,7 @@
 
     separator = gtk_hseparator_new ();
     GtkWidget *hw_page = tomoe_window_get_handwriting_page (TOMOE_WINDOW (tomoe));
-    GtkWidget *button_area = tomoe_stroke_search_get_button_area (TOMOE_STROKE_SEARCH (hw_page));
+    GtkWidget *button_area = tomoe_handwriting_get_button_area (TOMOE_HANDWRITING (hw_page));
     gtk_box_pack_start (GTK_BOX (button_area), separator,
                         FALSE, FALSE, 4);
     gtk_widget_show (separator);
@@ -288,48 +283,37 @@
     GtkWidget *notebook = tomoe_window_get_notebook (TOMOE_WINDOW (tomoe));;
     g_signal_connect (G_OBJECT (notebook), "switch-page",
                       G_CALLBACK (on_notebook_switch_page), window);
-    // add hooks
-    GtkWidget *candidates_view = tomoe_stroke_search_get_candidates_view (TOMOE_STROKE_SEARCH (hw_page));
-    g_signal_connect (G_OBJECT (candidates_view), "selected",
-                      G_CALLBACK (on_char_table_selected),
-                      (gpointer) tomoe);
 
     // create preferences widget
     GtkWidget *prefs_widget = scim_tomoe_prefs_widget_new (tomoe, config);
-    g_object_set_data (G_OBJECT (window),
-                       OBJECT_DATA_PREFS_WIN, prefs_widget);
     gtk_widget_show (prefs_widget);
-    bool always_top = SCIM_TOMOE_PREFS_WIDGET (prefs_widget)->config->read (
-        SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP,
-        SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP_DEFAULT);
-    gtk_window_set_keep_above (GTK_WINDOW (window), always_top ? TRUE: FALSE);
 
     // add preference page
-    tomoe_window_append_page (tomoe, prefs_widget, 
-                              gtk_image_new_from_stock (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU),
-                              _("Preferences for SCIM-TOMOE"));
+    tomoe_window_append_page (
+        tomoe, prefs_widget, 
+        gtk_image_new_from_stock (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU),
+        _("Preferences for scim-tomoe"));
+
+    // connect to the window's signals
+    g_signal_connect (G_OBJECT (window), "destroy",
+                      G_CALLBACK (gtk_main_quit),
+                      NULL);
+    g_signal_connect (G_OBJECT (window), "selected",
+                      G_CALLBACK (on_candidate_selected),
+                      prefs_widget);
 
     // run
     gtk_main ();
-
-    // quit
-    gtk_widget_destroy (window);
 }
 
 static void
-on_char_table_selected (TomoeCharTable *table, gpointer user_data)
+on_candidate_selected (TomoeWindow *window, gpointer user_data)
 {
-    TomoeWindow *window = TOMOE_WINDOW (user_data);
-    gpointer object_data = g_object_get_data (G_OBJECT (window),
-                                              OBJECT_DATA_PREFS_WIN);
-    ScimTomoePrefsWidget *prefs_widget = SCIM_TOMOE_PREFS_WIDGET (object_data);
+    ScimTomoePrefsWidget *prefs_widget = SCIM_TOMOE_PREFS_WIDGET (user_data);
 
     if (helper_agent.get_connection_number () < 0) return;
 
-    TomoeChar *t_char = tomoe_char_table_get_selected (table);
-    if (!t_char) return;
-
-    const gchar *str = tomoe_char_get_utf8 (t_char);
+    const gchar *str = tomoe_window_get_selected_char (window);
     if (str && *str) {
         helper_agent.commit_string (-1, "", scim::utf8_mbstowcs (str));
 
@@ -338,8 +322,10 @@
             String (SCIM_TOMOE_CONFIG_CLEAR_ON_SELECT),
             SCIM_TOMOE_CONFIG_CLEAR_ON_SELECT_DEFAULT);
         if (value) {
+            TomoeHandwriting *hw;
             TomoeCanvas *canvas;
-            canvas = TOMOE_CANVAS (tomoe_window_get_canvas (window));
+            hw = TOMOE_HANDWRITING (tomoe_window_get_handwriting_page (window));
+            canvas = TOMOE_CANVAS (tomoe_handwriting_get_canvas (hw));
             tomoe_canvas_clear (TOMOE_CANVAS (canvas));
         }
     }
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/scim-tomoe-0.4.0/src/scim-tomoe.in new/scim-tomoe-0.5.0/src/scim-tomoe.in
--- old/scim-tomoe-0.4.0/src/scim-tomoe.in      1970-01-01 01:00:00.000000000 +0100
+++ new/scim-tomoe-0.5.0/src/scim-tomoe.in      2006-12-11 07:28:42.000000000 +0100
@@ -0,0 +1,32 @@
+#!/bin/sh
+# scim-tomoe launcher
+#
+# Copyright (c) 2006 Takuro Ashie <ashie@xxxxxxxxxx>
+#
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+# 
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+# Boston, MA  02111-1307  USA
+
+# $Id: scim-tomoe.in,v 1.2 2006/12/11 06:28:42 makeinu Exp $
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+localedir=@datadir@/locale
+datadir=@datadir@
+sysconfdir=@sysconfdir@
+
+@SCIM_LIBEXECDIR@/scim-helper-launcher tomoe b1bfe2b4-6930-41b0-8c07-d05bce8c92e2 $*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/scim-tomoe-0.4.0/src/scim_tomoe_prefs.h new/scim-tomoe-0.5.0/src/scim_tomoe_prefs.h
--- old/scim-tomoe-0.4.0/src/scim_tomoe_prefs.h 2006-10-26 06:34:35.000000000 +0200
+++ new/scim-tomoe-0.5.0/src/scim_tomoe_prefs.h 2006-12-05 06:27:07.000000000 +0100
@@ -20,14 +20,23 @@
 #ifndef __SCIM_TOMOE_PREFS_H__
 #define __SCIM_TOMOE_PREFS_H__
 
+#define SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP       "/Helper/Tomoe/AlwaysTop"
+
 #define SCIM_TOMOE_CONFIG_USE_AUTO_FIND           "/Helper/Tomoe/UseAutoFind"
 #define SCIM_TOMOE_CONFIG_AUTO_FIND_TIME          "/Helper/Tomoe/AutoFindTime"
 #define SCIM_TOMOE_CONFIG_CLEAR_ON_SELECT         "/Helper/Tomoe/ClearOnSelect"
-#define SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP       "/Helper/Tomoe/AlwaysTop"
+#define SCIM_TOMOE_CONFIG_CAND_FONT               "/Helper/Tomoe/CandidateFont"
+
+#define SCIM_TOMOE_CONFIG_UNICODE_TABLE_FONT      "/Helper/Tomoe/UnicodeTableFont"
+
+
+#define SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP_DEFAULT  false
+
+#define SCIM_TOMOE_CONFIG_USE_AUTO_FIND_DEFAULT      true
+#define SCIM_TOMOE_CONFIG_AUTO_FIND_TIME_DEFAULT     0
+#define SCIM_TOMOE_CONFIG_CLEAR_ON_SELECT_DEFAULT    false
+#define SCIM_TOMOE_CONFIG_CAND_FONT_DEFAULT          ""
 
-#define SCIM_TOMOE_CONFIG_USE_AUTO_FIND_DEFAULT     true
-#define SCIM_TOMOE_CONFIG_AUTO_FIND_TIME_DEFAULT    0
-#define SCIM_TOMOE_CONFIG_CLEAR_ON_SELECT_DEFAULT   false
-#define SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP_DEFAULT false
+#define SCIM_TOMOE_CONFIG_UNICODE_TABLE_FONT_DEFAULT ""
 
 #endif /* __SCIM_TOMOE_PREFS_H__ */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/scim-tomoe-0.4.0/src/scim_tomoe_prefs_widget.cpp new/scim-tomoe-0.5.0/src/scim_tomoe_prefs_widget.cpp
--- old/scim-tomoe-0.4.0/src/scim_tomoe_prefs_widget.cpp        2006-10-26 06:34:35.000000000 +0200
+++ new/scim-tomoe-0.5.0/src/scim_tomoe_prefs_widget.cpp        2006-12-06 09:14:26.000000000 +0100
@@ -34,211 +34,320 @@
 #define OBJECT_DATA_CONFIG_KEY        "ScimTomoePrefsWidget::ConfigKey"
 #define OBJECT_DATA_CONFIG_VALUE      "ScimTomoePrefsWidget::ConfigValue"
 
+G_DEFINE_TYPE (ScimTomoePrefsWidget, scim_tomoe_prefs_widget, GTK_TYPE_VBOX)
+
 static void scim_tomoe_prefs_widget_class_init  (ScimTomoePrefsWidgetClass *klass);
 static void scim_tomoe_prefs_widget_init        (ScimTomoePrefsWidget      *prefs_widget);
 static void scim_tomoe_prefs_widget_dispose     (GObject                *object);
 
-static void load_config                      (ScimTomoePrefsWidget      *prefs_widget);
-static void apply_config                     (ScimTomoePrefsWidget      *prefs_widget);
-
-static void on_default_toggle_button_toggled (GtkToggleButton        *togglebutton,
-                                              gpointer                user_data);
-static void on_default_toggle_button_set_sensitive
-                                             (GtkToggleButton        *togglebutton,
-                                              gpointer                user_data);
-static void on_default_spin_button_changed   (GtkSpinButton          *spinbutton,
-                                              gpointer                user_data);
+static GtkWidget *create_window_page            (ScimTomoePrefsWidget *prefs_widget);
+static GtkWidget *create_handwriting_page       (ScimTomoePrefsWidget *prefs_widget);
+static GtkWidget *create_unicode_table_page     (ScimTomoePrefsWidget *prefs_widget);
+static void       load_config                   (ScimTomoePrefsWidget      *prefs_widget);
+static void       apply_config                  (ScimTomoePrefsWidget      *prefs_widget);
+
+static void       on_default_toggle_button_toggled
+                                                (GtkToggleButton        *togglebutton,
+                                                 gpointer                user_data);
+static void       on_default_toggle_button_set_sensitive
+                                                (GtkToggleButton        *togglebutton,
+                                                 gpointer                user_data);
+static void       on_default_spin_button_changed(GtkSpinButton          *spinbutton,
+                                                 gpointer                user_data);
+static void       on_default_font_button_changed(GtkFontButton          *button,
+                                                 gpointer                user_data);
 
 //static guint prefs_widget_signals[LAST_SIGNAL] = { 0 };
-static GtkVBoxClass *parent_class = NULL;
-
-GType
-scim_tomoe_prefs_widget_get_type (void)
-{
-    static GType type = 0;
-
-    if (!type) {
-        static const GTypeInfo info = {
-            sizeof (ScimTomoePrefsWidgetClass),
-            NULL,           /* base_init */
-            NULL,           /* base_finalize */
-            (GClassInitFunc) scim_tomoe_prefs_widget_class_init,
-            NULL,           /* class_finalize */
-            NULL,           /* class_data */
-            sizeof (ScimTomoePrefsWidget),
-            0,              /* n_preallocs */
-            (GInstanceInitFunc) scim_tomoe_prefs_widget_init,
-        };
-
-        type = g_type_register_static (GTK_TYPE_VBOX,
-                                       "ScimTomoePrefsWidget",
-                                       &info, (GTypeFlags) 0);
-    }
-
-    return type;
-}
 
 static void
 scim_tomoe_prefs_widget_class_init (ScimTomoePrefsWidgetClass *klass)
 {
     GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
-    parent_class = (GtkVBoxClass *) g_type_class_peek_parent (klass);
-
     gobject_class->dispose = scim_tomoe_prefs_widget_dispose;
 }
 
 static void
-scim_tomoe_prefs_widget_init (ScimTomoePrefsWidget *prefs_widget)
+scim_tomoe_prefs_widget_init (ScimTomoePrefsWidget *prefs)
 {
-    GtkWidget *main_vbox = GTK_WIDGET (prefs_widget);
+    GtkWidget *main_vbox = GTK_WIDGET (prefs);
 
     GtkWidget *notebook = gtk_notebook_new ();
+    gtk_container_set_border_width (GTK_CONTAINER (notebook), 8);
     gtk_box_pack_start (GTK_BOX (main_vbox), notebook, TRUE, TRUE, 0);
     gtk_widget_show (notebook);
 
-    GtkWidget *label = gtk_label_new (_("Common"));
-    GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
-    gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox, label);
+    /* "Window" page */
+    GtkWidget *label  = gtk_label_new (_("Window"));
+    GtkWidget *widget = create_window_page (prefs);
+    gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
     gtk_widget_show (label);
-    gtk_widget_show (vbox);
+    gtk_widget_show (widget);
 
-    // use auto find
-    GtkWidget *check = gtk_check_button_new_with_mnemonic (_("Use auto _find"));
-    gtk_container_set_border_width (GTK_CONTAINER (check), 4);
-    gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
+    /* "Handwriting recognition" page  */
+    label  = gtk_label_new (_("Handwriting recognition"));
+    widget = create_handwriting_page (prefs);
+    gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
+    gtk_widget_show (label);
+    gtk_widget_show (widget);
+
+    /* "Unicode table" page */
+    label  = gtk_label_new (_("Unicode table"));
+    widget = create_unicode_table_page (prefs);
+    gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
+    gtk_widget_show (label);
+    gtk_widget_show (widget);
+}
+
+static void
+scim_tomoe_prefs_widget_dispose (GObject *object)
+{
+    ScimTomoePrefsWidget *prefs = SCIM_TOMOE_PREFS_WIDGET (object);
+
+    if (prefs->config)
+        prefs->config->flush ();
+    prefs->config = NULL;
+
+    if (G_OBJECT_CLASS(scim_tomoe_prefs_widget_parent_class)->dispose)
+        G_OBJECT_CLASS(scim_tomoe_prefs_widget_parent_class)->dispose(object);
+}
+
+GtkWidget *
+scim_tomoe_prefs_widget_new (TomoeWindow *window, const ConfigPointer &config)
+{
+    GtkWidget *widget = GTK_WIDGET(g_object_new (SCIM_TOMOE_TYPE_PREFS_WIDGET,
+                                                 NULL));
+    ScimTomoePrefsWidget *prefs = SCIM_TOMOE_PREFS_WIDGET (widget);
+
+    prefs->config = config;
+    prefs->parent = GTK_WIDGET (window);
+
+    load_config (SCIM_TOMOE_PREFS_WIDGET(widget));
+
+    return widget;
+}
+
+static GtkWidget *
+create_check_button (ScimTomoePrefsWidget *prefs,
+                     const gchar *label_text,
+                     const gchar *key,
+                     bool value)
+{
+    GtkWidget *check = gtk_check_button_new_with_mnemonic (label_text);
     g_object_set_data (G_OBJECT (check),
-                       OBJECT_DATA_CONFIG_KEY,
-                       (gpointer) SCIM_TOMOE_CONFIG_USE_AUTO_FIND);
+                       OBJECT_DATA_CONFIG_KEY, (gpointer) key);
     g_object_set_data (G_OBJECT (check),
-                       OBJECT_DATA_CONFIG_VALUE,
-                       GINT_TO_POINTER (SCIM_TOMOE_CONFIG_USE_AUTO_FIND_DEFAULT));
+                       OBJECT_DATA_CONFIG_VALUE, GINT_TO_POINTER (value));
     g_signal_connect (G_OBJECT (check), "toggled",
                       G_CALLBACK (on_default_toggle_button_toggled),
-                      prefs_widget);
-    gtk_widget_show (check);
+                      prefs);
+
+    prefs->widget_list = g_list_append (prefs->widget_list, check);
 
-    prefs_widget->widget_list = g_list_append (prefs_widget->widget_list, check);
+    return check;
+}
 
-    // table
+static GtkWidget *
+create_spin_button (ScimTomoePrefsWidget *prefs,
+                    const gchar *label_text,
+                    const gchar *unit_text,
+                    const gchar *key,
+                    gint value,
+                    gint min, gint max, gint step, gint page_size)
+{
     GtkWidget *table = gtk_table_new (4, 4, FALSE);
-    gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
-    gtk_widget_show (table);
 
-    // auto find time
-    label = gtk_label_new_with_mnemonic (_("_Interval time until start auto find:"));
+    GtkWidget *label = gtk_label_new_with_mnemonic (label_text);
     gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
                       (GtkAttachOptions) (GTK_FILL),
                       (GtkAttachOptions) (GTK_FILL),
                       4, 4);
     gtk_widget_show (label);
 
-    GtkObject *adj = gtk_adjustment_new (0, 0.0, 99999.0, 50.0, 200.0, 200.0);
+    GtkObject *adj = gtk_adjustment_new (value, min, max, step,
+                                         page_size, page_size);
     GtkWidget *spin = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 0.0, 0);
     g_object_set_data (G_OBJECT (spin),
-                       OBJECT_DATA_CONFIG_KEY,
-                       (gpointer) SCIM_TOMOE_CONFIG_AUTO_FIND_TIME);
+                       OBJECT_DATA_CONFIG_KEY, (gpointer) key);
     g_object_set_data (G_OBJECT (spin),
-                       OBJECT_DATA_CONFIG_VALUE,
-                       GINT_TO_POINTER (SCIM_TOMOE_CONFIG_AUTO_FIND_TIME_DEFAULT));
+                       OBJECT_DATA_CONFIG_VALUE, GINT_TO_POINTER (value));
     gtk_table_attach (GTK_TABLE (table), spin, 1, 2, 1, 2,
                       (GtkAttachOptions) (GTK_FILL),
                       (GtkAttachOptions) (GTK_FILL),
                       4, 4);
     g_signal_connect (G_OBJECT (spin), "value-changed",
                       G_CALLBACK (on_default_spin_button_changed),
-                      prefs_widget);
+                      prefs);
     gtk_widget_show (spin);
 
     gtk_label_set_mnemonic_widget (GTK_LABEL (label), spin);
 
-    label = gtk_label_new ("[msec]");
-    gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2,
-                      (GtkAttachOptions) (GTK_FILL),
-                      (GtkAttachOptions) (GTK_FILL),
-                      4, 4);
-    gtk_widget_show (label);
+    if (unit_text) {
+        label = gtk_label_new (unit_text);
+        gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2,
+                          (GtkAttachOptions) (GTK_FILL),
+                          (GtkAttachOptions) (GTK_FILL),
+                          4, 4);
+        gtk_widget_show (label);
+    }
 
-    g_signal_connect (G_OBJECT (check), "toggled",
-                      G_CALLBACK (on_default_toggle_button_set_sensitive),
-                      table);
-    gtk_widget_set_sensitive (table, FALSE);
+    prefs->widget_list = g_list_append (prefs->widget_list, spin);
 
-    prefs_widget->widget_list = g_list_append (prefs_widget->widget_list, spin);
+    return table;
+}
 
-    // clear the canvas
-    check = gtk_check_button_new_with_mnemonic (
-        _("_Clear the canvas when select a candidate"));
-    gtk_container_set_border_width (GTK_CONTAINER (check), 4);
-    gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
-    g_object_set_data (G_OBJECT (check),
-                       OBJECT_DATA_CONFIG_KEY,
-                       (gpointer) SCIM_TOMOE_CONFIG_CLEAR_ON_SELECT);
-    g_object_set_data (G_OBJECT (check),
-                       OBJECT_DATA_CONFIG_VALUE,
-                       GINT_TO_POINTER (SCIM_TOMOE_CONFIG_CLEAR_ON_SELECT_DEFAULT));
-    g_signal_connect (G_OBJECT (check), "toggled",
-                      G_CALLBACK (on_default_toggle_button_toggled),
-                      prefs_widget);
-    gtk_widget_show (check);
+static GtkWidget *
+create_font_button (ScimTomoePrefsWidget *prefs,
+                    const gchar *label_text,
+                    const gchar *key,
+                    const gchar *value)
+{
+    GtkWidget *hbox = gtk_hbox_new (FALSE, 0);
+    gtk_widget_show (hbox);
 
-    prefs_widget->widget_list = g_list_append (prefs_widget->widget_list, check);
+    GtkWidget *label = gtk_label_new (label_text);
+    gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+    gtk_widget_show (label);
 
-    // show on top of other windows.
-    check = gtk_check_button_new_with_mnemonic (
-        _("Show on _top of other windows"));
-    gtk_container_set_border_width (GTK_CONTAINER (check), 4);
-    gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, FALSE, 0);
-    g_object_set_data (G_OBJECT (check),
-                       OBJECT_DATA_CONFIG_KEY,
-                       (gpointer) SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP);
-    g_object_set_data (G_OBJECT (check),
-                       OBJECT_DATA_CONFIG_VALUE,
-                       GINT_TO_POINTER (SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP_DEFAULT));
-    g_signal_connect (G_OBJECT (check), "toggled",
-                      G_CALLBACK (on_default_toggle_button_toggled),
-                      prefs_widget);
-    gtk_widget_show (check);
+    GtkWidget *button = gtk_font_button_new ();
+    gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 4);
+    gtk_widget_show (button);
+
+    g_object_set_data (G_OBJECT (button),
+                       OBJECT_DATA_CONFIG_KEY, (gpointer) key);
+    g_object_set_data (G_OBJECT (button),
+                       OBJECT_DATA_CONFIG_VALUE, (gpointer) value);
+    g_signal_connect (G_OBJECT (button), "font-set",
+                      G_CALLBACK (on_default_font_button_changed),
+                      prefs);
 
-    prefs_widget->widget_list = g_list_append (prefs_widget->widget_list, check);
+    prefs->widget_list = g_list_append (prefs->widget_list, button);
+
+    return hbox;
 }
 
 static void
-scim_tomoe_prefs_widget_dispose (GObject *object)
+set_default_font (ScimTomoePrefsWidget *prefs,
+                  const gchar *key,
+                  GtkWidget *widget)
 {
-    ScimTomoePrefsWidget *prefs_widget = SCIM_TOMOE_PREFS_WIDGET (object);
+    GList *node;
 
-    prefs_widget->config->flush ();
-    prefs_widget->config = NULL;
+    for (node = prefs->widget_list; node; node = g_list_next (node)) {
+        GtkWidget *w = (GtkWidget *) node->data;
+        const gchar *k;
+        gchar *str;
+
+        if (!GTK_IS_FONT_BUTTON (w)) continue;
+
+        k = (const gchar *) g_object_get_data (G_OBJECT (w),
+                                               OBJECT_DATA_CONFIG_KEY);
+        if (strcmp (k, key)) continue;
+
+        str = pango_font_description_to_string (widget->style->font_desc);
+        gtk_font_button_set_font_name (GTK_FONT_BUTTON (w), str);
+        g_free (str);
 
-    if (G_OBJECT_CLASS(parent_class)->dispose)
-        G_OBJECT_CLASS(parent_class)->dispose(object);
+        break;
+    }
 }
 
-GtkWidget *
-scim_tomoe_prefs_widget_new (TomoeWindow *window, const ConfigPointer &config)
+static GtkWidget *
+create_window_page (ScimTomoePrefsWidget *prefs)
 {
-    GtkWidget *widget = GTK_WIDGET(g_object_new (SCIM_TOMOE_TYPE_PREFS_WIDGET,
-                                                 NULL));
-    ScimTomoePrefsWidget *prefs_widget = SCIM_TOMOE_PREFS_WIDGET (widget);
+    GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
+    gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+
+    // show on top of other windows.
+    GtkWidget *widget;
+    widget = create_check_button (prefs, _("Show on _top of other windows"),
+                                  SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP,
+                                  SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP_DEFAULT);
+    gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 4);
+    gtk_widget_show (widget);
 
-    prefs_widget->config = config;
-    prefs_widget->parent = GTK_WIDGET (window);
+    return vbox;
+}
 
-    load_config (SCIM_TOMOE_PREFS_WIDGET(widget));
+static GtkWidget *
+create_handwriting_page (ScimTomoePrefsWidget *prefs)
+{
 
-    return widget;
+    GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
+    gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+
+    GtkWidget *widget;
+
+    // use auto find
+    widget = create_check_button (prefs, _("Use auto _find"),
+                                  SCIM_TOMOE_CONFIG_USE_AUTO_FIND,
+                                  SCIM_TOMOE_CONFIG_USE_AUTO_FIND_DEFAULT);
+    gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 4);
+    gtk_widget_show (widget);
+
+    // auto find time
+    GtkWidget *alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
+    gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 24, 0);
+    gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
+    gtk_widget_show (alignment);
+
+    GtkWidget *table = create_spin_button (
+        prefs,
+        _("_Interval time until start auto find:"),
+        _("[msec]"),
+        SCIM_TOMOE_CONFIG_AUTO_FIND_TIME,
+        SCIM_TOMOE_CONFIG_AUTO_FIND_TIME_DEFAULT,
+        0, 100000, 50, 200);
+    gtk_widget_set_sensitive (table, FALSE);
+    gtk_container_add (GTK_CONTAINER (alignment), table);
+    gtk_widget_show (table);
+
+    g_signal_connect (G_OBJECT (widget), "toggled",
+                      G_CALLBACK (on_default_toggle_button_set_sensitive),
+                      table);
+
+    // clear the canvas
+    widget = create_check_button (
+        prefs,
+        _("_Clear the canvas when select a candidate"),
+        SCIM_TOMOE_CONFIG_CLEAR_ON_SELECT,
+        SCIM_TOMOE_CONFIG_CLEAR_ON_SELECT_DEFAULT);
+
+    // font for the candidate view
+    widget = create_font_button (prefs, _("Font for the candidates view:"),
+                                 SCIM_TOMOE_CONFIG_CAND_FONT,
+                                 SCIM_TOMOE_CONFIG_CAND_FONT_DEFAULT);
+    gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 4);
+    gtk_widget_show (widget);
+
+    return vbox;
+}
+
+static GtkWidget *
+create_unicode_table_page (ScimTomoePrefsWidget *prefs)
+{
+    GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
+    gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+
+    GtkWidget *widget;
+    widget = create_font_button (prefs, _("Font for the Unicode table:"),
+                                 SCIM_TOMOE_CONFIG_UNICODE_TABLE_FONT,
+                                 SCIM_TOMOE_CONFIG_UNICODE_TABLE_FONT_DEFAULT);
+    gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 4);
+    gtk_widget_show (widget);
+
+    return vbox;
 }
 
 static void
-load_config (ScimTomoePrefsWidget *prefs_widget)
+load_config (ScimTomoePrefsWidget *prefs)
 {
     GList *node;
 
-    if (prefs_widget->config.null ())
+    if (prefs->config.null ())
         return;
 
-    for (node = prefs_widget->widget_list; node; node = g_list_next (node)) {
+    for (node = prefs->widget_list; node; node = g_list_next (node)) {
         GtkWidget *widget = GTK_WIDGET (node->data);
 
         if (GTK_IS_TOGGLE_BUTTON (widget)) {
@@ -254,7 +363,7 @@
             key = (const char*) key_p;
             value = GPOINTER_TO_INT (value_p);
 
-            value = prefs_widget->config->read (String (key), value);
+            value = prefs->config->read (String (key), value);
             gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), value);
 
         } else if (GTK_IS_SPIN_BUTTON (widget)) {
@@ -270,34 +379,59 @@
             key = (const char*) key_p;
             value = GPOINTER_TO_INT (value_p);
 
-            value = prefs_widget->config->read (String (key), value);
+            value = prefs->config->read (String (key), value);
             gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), value);
 
-        } else if (GTK_IS_EDITABLE (widget)) {
-            // FIXME
+        } else if (GTK_IS_FONT_BUTTON (widget)) {
+            gpointer key_p, value_p;
+            const char *key, *value;
+            String str;
+
+            key_p   = g_object_get_data (G_OBJECT (widget),
+                                         OBJECT_DATA_CONFIG_KEY);
+            value_p = g_object_get_data (G_OBJECT (widget),
+                                         OBJECT_DATA_CONFIG_VALUE);
+
+            key   = (const char*) key_p;
+            value = (const char*) value_p;
+
+            str = prefs->config->read (String (key),
+                                              value ? value : String (""));
+            if (str.length() > 0)
+                gtk_font_button_set_font_name (GTK_FONT_BUTTON (widget),
+                                               str.c_str());
         }
     }
 
-    apply_config (prefs_widget);
+    apply_config (prefs);
 }
 
 static void
-apply_config (ScimTomoePrefsWidget *prefs_widget)
+apply_config (ScimTomoePrefsWidget *prefs)
 {
-    TomoeWindow *parent = TOMOE_WINDOW (prefs_widget->parent);
-    TomoeCanvas *canvas = TOMOE_CANVAS (tomoe_window_get_canvas (parent));
+    TomoeWindow *parent = TOMOE_WINDOW (prefs->parent);
+    TomoeHandwriting *hw = TOMOE_HANDWRITING (tomoe_window_get_handwriting_page (parent));
+    TomoeCanvas *canvas = TOMOE_CANVAS (tomoe_handwriting_get_canvas (hw));
+
+    // window z-level option
+    bool always_top;
+    always_top = prefs->config->read (
+        String (SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP),
+        SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP_DEFAULT);
+    gtk_window_set_keep_above (GTK_WINDOW (parent), always_top ? TRUE : FALSE);
 
+    // auto find
     bool use_auto_find;
     gint time1, time2;
 
     time1 = tomoe_canvas_get_auto_find_time (canvas);
 
-    use_auto_find = prefs_widget->config->read (
-        SCIM_TOMOE_CONFIG_USE_AUTO_FIND,
+    use_auto_find = prefs->config->read (
+        String (SCIM_TOMOE_CONFIG_USE_AUTO_FIND),
         SCIM_TOMOE_CONFIG_USE_AUTO_FIND_DEFAULT);
 
-    time2 = prefs_widget->config->read (
-        SCIM_TOMOE_CONFIG_AUTO_FIND_TIME,
+    time2 = prefs->config->read (
+        String (SCIM_TOMOE_CONFIG_AUTO_FIND_TIME),
         SCIM_TOMOE_CONFIG_AUTO_FIND_TIME_DEFAULT);
 
     if (!use_auto_find)
@@ -305,28 +439,53 @@
     else if (time1 != time2)
         tomoe_canvas_set_auto_find_time (canvas, time2);
 
-    // window z-level option
-    bool always_top;
-    always_top = prefs_widget->config->read (
-        SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP,
-        SCIM_TOMOE_CONFIG_WINDOW_ALWAYS_TOP_DEFAULT);
-    gtk_window_set_keep_above (GTK_WINDOW (parent), always_top ? TRUE : FALSE);
+    // candidates view font
+    GtkWidget *view = tomoe_handwriting_get_char_table (hw);
+    String font;
+    font = prefs->config->read (
+        String (SCIM_TOMOE_CONFIG_CAND_FONT),
+        String (SCIM_TOMOE_CONFIG_CAND_FONT_DEFAULT));
+
+    if (font.length() > 0) {
+        PangoFontDescription *desc;
+
+        desc = pango_font_description_from_string (font.c_str ());
+        gtk_widget_modify_font (view, desc);
+        pango_font_description_free (desc);
+    } else {
+        set_default_font (prefs, SCIM_TOMOE_CONFIG_CAND_FONT, view);
+    }
+
+    // Unicode table font
+    TomoeGucharmap *gucharmap = TOMOE_GUCHARMAP (tomoe_window_get_gucharmap_page (parent));
+    GucharmapCharmap *charmap = tomoe_gucharmap_get_charmap (gucharmap);
+    font = prefs->config->read (
+        String (SCIM_TOMOE_CONFIG_UNICODE_TABLE_FONT),
+        String (SCIM_TOMOE_CONFIG_UNICODE_TABLE_FONT_DEFAULT));
+
+    if (font.length() > 0) {
+        gucharmap_charmap_set_font (charmap, font.c_str ());
+    } else {
+        gucharmap_charmap_set_font (charmap, NULL);
+        set_default_font (prefs, SCIM_TOMOE_CONFIG_CAND_FONT,
+                          GTK_WIDGET (charmap));
+    }
 }
 
 static void
 on_default_toggle_button_toggled (GtkToggleButton *togglebutton,
                                   gpointer user_data)
 {
-    ScimTomoePrefsWidget *prefs_widget = SCIM_TOMOE_PREFS_WIDGET (user_data);
+    ScimTomoePrefsWidget *prefs = SCIM_TOMOE_PREFS_WIDGET (user_data);
 
     gboolean value = gtk_toggle_button_get_active (togglebutton);
     gpointer key_p   = g_object_get_data (G_OBJECT (togglebutton),
                                           OBJECT_DATA_CONFIG_KEY);
     const gchar *key = (const gchar *) key_p;
     if (key && *key)
-        prefs_widget->config->write (String (key), value);
+        prefs->config->write (String (key), value);
 
-    apply_config (prefs_widget);
+    apply_config (prefs);
 }
 
 static void
@@ -341,16 +500,31 @@
 static void
 on_default_spin_button_changed (GtkSpinButton *spinbutton, gpointer user_data)
 {
-    ScimTomoePrefsWidget *prefs_widget = SCIM_TOMOE_PREFS_WIDGET (user_data);
+    ScimTomoePrefsWidget *prefs = SCIM_TOMOE_PREFS_WIDGET (user_data);
 
     gint value = (gint) gtk_spin_button_get_value (spinbutton);
     gpointer key_p   = g_object_get_data (G_OBJECT (spinbutton),
                                           OBJECT_DATA_CONFIG_KEY);
     const gchar *key = (const gchar *) key_p;
     if (key && *key)
-        prefs_widget->config->write (String (key), value);
+        prefs->config->write (String (key), value);
+
+    apply_config (prefs);
+}
+
+static void
+on_default_font_button_changed (GtkFontButton *button, gpointer user_data)
+{
+    ScimTomoePrefsWidget *prefs = SCIM_TOMOE_PREFS_WIDGET (user_data);
+
+    const gchar *value = gtk_font_button_get_font_name (button);
+    gpointer key_p   = g_object_get_data (G_OBJECT (button),
+                                          OBJECT_DATA_CONFIG_KEY);
+    const gchar *key = (const gchar *) key_p;
+    if (key && *key)
+        prefs->config->write (String (key), value ? value : String (""));
 
-    apply_config (prefs_widget);
+    apply_config (prefs);
 }
 /*
 vi:ts=4:nowrap:ai:expandtab
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/scim-tomoe-0.4.0/TODO new/scim-tomoe-0.5.0/TODO
--- old/scim-tomoe-0.4.0/TODO   2005-09-06 06:15:32.000000000 +0200
+++ new/scim-tomoe-0.5.0/TODO   2006-12-05 09:40:07.000000000 +0100
@@ -1,42 +1,9 @@
-Version-0.2.0 (Sep 29, 2005?):
-
-* Window
-  - Plural canvas like zaurus
-* Canvas
-  - Add ruled lines.
-  - Preferences for lines:
-    = Width and color of handwrited lines
-    = Width, color, and type of normalized lines
-    = Width, color, and type of ruled lines
-* Candidates view.
-  - Font and color preference
-* Commit the first candidate automatically
-
-
-Version-0.3.0 (Oct 29, 2005?):
-
-* Menu (GtkAction)
-* Annotations like kanjipad
-
-
-
-Until version-1.0:
-
-* Canvas:
-  - Resizable
-* Candidates view:
-  - Add popup window for displaying additional informations
-  - Suppport multiple rows and columns
-  - Page switching, add Up and Down button
-  - (Scrollable interface for scrolled window)
-  - Mouse wheel support
-* Add software keybord buttons
-  - (Cursor)
-* Input recognized letter to application
-  - Software keybord mode
-* Add registering glyph feature
-* Glyph editor
-* Glyph viewer
+* Preferences
+  - TomoeCanvas
+    = Width and color of handwriting lines.
+    = Width, color, and type of normalized lines.
+    = Width, color, and type of ruled lines.
+  - Commiting the first candidate automatically (and its delay time).
+* Buttons
+  - Cursor keys
 * Combination of Hiragana only mode and Kana typing
-* Separate tomoe_* widgets to external library
-* Gesture


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages