-Kenichi Handa <handa@m17n.org>
-Naoto Takahashi <ntakahas@m17n.org>
+Core developers:
+
+ Kenichi Handa <handa@m17n.org>
+ Mikiko Nishikimi <nisikimi@m17n.org>
+ Naoto Takahashi <ntakahas@m17n.org>
+ Satoru Tomura <tomura@m17n.org>
-# Makefile.am -- top level Makefile for the m17n library.
-# Copyright (C) 2003, 2004
+# Makefile.am -- Makefile for the m17n-im-config package
+# Copyright (C) 2007
# National Institute of Advanced Industrial Science and Technology (AIST)
# Registration Number H15PRO112
-# This file is part of the m17n library.
+# This file is part of the m17n-im-config package; a sub-part of the
+# m17n library.
# The m17n library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
+This directory tree holds version 0.9.0 of the m17n-im-config package.
+Copyright (C) 2007
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H15PRO112
+See the end for copying conditions.
+
+(1) What is this package.
+
+This package provides:
+
+(1-1) C library to create a GTK+ widget for per-user configuration of
+input methods provided by the m17n.
+
+(1-2) Standalone GTK+ program that uses the above widget.
+
+
+(2) How to install.
+
+(2-1) Prerequisite
+
+This package requires these libralies:
+
+ * the m17n library of version 1.3.4 or the later.
+
+ * GTK+ version 2.4.0 or the later
+
+(2-2) From CVS working directory
+
+Run the script "bootstrap.sh" in this directory. It is tested that
+the script run successfully with these versions of autotools.
+
+ libtool-1.5.6
+ automake-1.4-p6
+ autoconf-2.59
+
+Then, proceed to the next step.
+
+(2-3) From the tarball.
+
+Run the following commands:
+
+ % ./configure
+ % make
+ % make install
+
+
+(3) Documentaion
+
+
+
+----------------------------------------------------------------------
+Copyright information
+
+Copyright (C) 2007
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H15PRO112
+
+This file is part of the m17n-im-config package; a sub-part of the
+m17n library..
+
+The m17n 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.1 of
+the License, or (at your option) any later version.
+
+The m17n 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 the m17n library; if not, write to the Free
+Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.
msgstr ""
"Project-Id-Version: m17n-im-config 0.9.0\n"
"Report-Msgid-Bugs-To: m17n-lib@m17n.org\n"
-"POT-Creation-Date: 2007-03-19 11:23+0900\n"
+"POT-Creation-Date: 2007-03-20 23:25+0900\n"
"PO-Revision-Date: 2007-03-18 18:19+0900\n"
"Last-Translator: Kenichi Handa <m17n-lib@m17n.org>\n"
"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
msgid "Default"
msgstr "¥Ç¥Õ¥©¥ë¥ÈÃÍ"
-#: src/mim-config.c:317
+#: src/mim-config.c:315
msgid "global"
msgstr "¥°¥í¡¼¥Ð¥ë"
-#: src/mim-config.c:467
+#: src/mim-config.c:465
msgid "default"
msgstr "¥Ç¥Õ¥©¥ë¥ÈÃÍ"
-#: src/mim-config.c:468
+#: src/mim-config.c:466
msgid "customized"
msgstr "¥æ¡¼¥¶ÀßÄê"
-#: src/mim-config.c:469
+#: src/mim-config.c:467
msgid "modified"
msgstr "Êѹ¹¤µ¤ì¤Æ¤¤¤Þ¤¹"
-#: src/mim-config.c:470
+#: src/mim-config.c:468
msgid "uncustomizable"
msgstr "Êѹ¹ÉÔ²Ä"
-#: src/mim-config.c:480
+#: src/mim-config.c:478
msgid "Input Method"
msgstr "ÆþÎϥ᥽¥Ã¥É"
-#: src/mim-config.c:485
+#: src/mim-config.c:483
msgid "status"
msgstr "¾õÂÖ"
+/* m17n-im-config.c -- M17N input method configuration header file
+ Copyright (C) 2007
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H15PRO112
+
+ This file is part of the m17n-im-config package; a sub-part of the
+ m17n library.
+
+ The m17n 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.1 of
+ the License, or (at your option) any later version.
+
+ The m17n 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 the m17n library; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ 02111-1307, USA. */
+
+#ifndef _M17N_IM_CONFIG_H_
+#define _M17N_IM_CONFIG_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+extern int mim_config_init (void);
+extern int mim_config_fini (void);
+
typedef struct _MimConfigCallback
{
void (*func) (gboolean modified, gpointer arg);
gpointer arg;
} MimConfigCallback;
-GtkWidget *mim_config_widget (MimConfigCallback *callback);
-gboolean mim_config_modified (GtkWidget *config);
-gboolean mim_config_revert (GtkWidget *config);
-gboolean mim_config_save (GtkWidget *config);
+extern GtkWidget *mim_config_widget (MimConfigCallback *callback);
+extern gboolean mim_config_modified (GtkWidget *config);
+extern gboolean mim_config_revert (GtkWidget *config);
+extern gboolean mim_config_save (GtkWidget *config);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _M17N_IM_CONFIG_H_ */
+/* main.c -- M17N input method configuration tool
+ Copyright (C) 2007
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H15PRO112
+
+ This file is part of the m17n-im-config package; a sub-part of the
+ m17n library.
+
+ The m17n 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.1 of
+ the License, or (at your option) any later version.
+
+ The m17n 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 the m17n library; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ 02111-1307, USA. */
+
#include <stdlib.h>
#include <string.h>
#include <libintl.h>
#include <gtk/gtk.h>
#include <m17n-im-config.h>
+/* Argument to callback functions. */
+
struct ConfigSaveRevert
{
- GtkWidget *config, *save, *revert;
+ /* IM configuration widget created by mim_config_widget (). */
+ GtkWidget *config;
+ /* Button widget "revert" */
+ GtkWidget *revert;
+ /* Button widget "save" */
+ GtkWidget *save;
};
+
+/* Called when the status of configuration (modified or not) is
+ changed. */
void
status_changed_cb (gboolean modified, gpointer data)
{
{
if (! modified)
{
- gtk_widget_set_sensitive (config_save_revert->save, FALSE);
gtk_widget_set_sensitive (config_save_revert->revert, FALSE);
+ gtk_widget_set_sensitive (config_save_revert->save, FALSE);
}
}
else
{
if (modified)
{
- gtk_widget_set_sensitive (config_save_revert->save, TRUE);
gtk_widget_set_sensitive (config_save_revert->revert, TRUE);
+ gtk_widget_set_sensitive (config_save_revert->save, TRUE);
}
}
}
-static gboolean
-delete (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
- gtk_main_quit ();
- return FALSE;
-}
-
-
static void
revert_clicked_cb (GtkButton *button, gpointer data)
{
bind_textdomain_codeset ("m17n-im-config", "UTF-8");
#endif
gtk_init (&argc, &argv);
+ if (mim_config_init () < 0)
+ {
+ g_print ("m17n-im-config initialization error\n");
+ exit (1);
+ }
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_set_size_request (window, 500, 300);
gtk_window_set_title (GTK_WINDOW (window), _("M17N-IM Configuration"));
+---------------------------------------+
*/
- vbox = gtk_vbox_new (FALSE, 10);
+ vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
revert = gtk_button_new_from_stock (GTK_STOCK_REVERT_TO_SAVED);
quit = gtk_button_new_from_stock (GTK_STOCK_QUIT);
ok = gtk_button_new_from_stock (GTK_STOCK_OK);
- config_save_revert.save = save;
config_save_revert.revert = revert;
+ config_save_revert.save = save;
callback.func = status_changed_cb;
callback.arg = &config_save_revert;
config = mim_config_widget (&callback);
hbox = gtk_hbutton_box_new ();
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_END);
- gtk_box_set_spacing (GTK_BOX (hbox), 10);
+ gtk_box_set_spacing (GTK_BOX (hbox), 5);
gtk_container_add (GTK_CONTAINER (hbox), revert);
gtk_container_add (GTK_CONTAINER (hbox), save);
gtk_container_add (GTK_CONTAINER (hbox), quit);
gtk_container_add (GTK_CONTAINER (hbox), ok);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 5);
gtk_widget_show_all (window);
gtk_main ();
+ mim_config_fini ();
return 0;
}
+/* mim-config.c -- M17N input method configuration
+ Copyright (C) 2007
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H15PRO112
+
+ This file is part of the m17n-im-config package; a sub-part of the
+ m17n library.
+
+ The m17n 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.1 of
+ the License, or (at your option) any later version.
+
+ The m17n 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 the m17n library; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ 02111-1307, USA. */
+
#include <stdlib.h>
#include <string.h>
#include <libintl.h>
}
}
-static gboolean
-config_deleted_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
- M17N_FINI ();
- return FALSE;
-}
-
typedef struct _MimTable
{
gchar *lang;
\f
/* Public API */
-GtkWidget *
-mim_config_widget (MimConfigCallback *callback)
+int
+mim_config_init ()
{
- GtkWidget *tree, *config;
- GtkTreeStore *store;
- GtkCellRenderer *renderer;
- GtkTreeViewColumn *column;
-
M17N_INIT ();
#if ENABLE_NLS
mim_status_str[MIM_STATUS_MODIFIED] = _("modified");
mim_status_str[MIM_STATUS_NO] = _("uncustomizable");
+ return 0;
+}
+
+int
+mim_config_fini ()
+{
+ M17N_FINI ();
+
+ return 0;
+}
+
+GtkWidget *
+mim_config_widget (MimConfigCallback *callback)
+{
+ GtkWidget *tree, *config;
+ GtkTreeStore *store;
+ GtkCellRenderer *renderer;
+ GtkTreeViewColumn *column;
+
store = make_store_for_input_methods ();
tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
g_object_unref (G_OBJECT (store));
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (config),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (config), tree);
- g_signal_connect (G_OBJECT (config), "destroy",
- G_CALLBACK (config_deleted_cb), NULL);
g_object_set_data (G_OBJECT (config), CONFIG_TREE_VIEW, tree);