Commit 6c6bc68a authored by Asias He's avatar Asias He
Browse files

Imported Upstream version 1.3.3

parent 9727e999
......@@ -69,7 +69,7 @@ debian/changelog:
version=@[email protected]; \
serie=$(serie); \
if test -z "$$serie"; then \
serie=lucid; \
serie=maverick; \
fi; \
if test -z "$$release"; then \
release=1; \
......
......@@ -155,6 +155,7 @@ CXXFLAGS = @[email protected]
CYGPATH_W = @[email protected]
DEFS = @D[email protected]
DEPDIR = @[email protected]
DLLTOOL = @[email protected]
DSYMUTIL = @[email protected]
DUMPBIN = @[email protected]
ECHO_C = @[email protected]
......@@ -194,6 +195,7 @@ M17N_CFLAGS = @[email protected]
M17N_LIBS = @[email protected]
MAINT = @[email protected]
MAKEINFO = @[email protected]
MANIFEST_TOOL = @[email protected]
MKDIR_P = @[email protected]
MSGFMT = @[email protected]
MSGFMT_015 = @[email protected]
......@@ -234,6 +236,7 @@ abs_builddir = @[email protected]
abs_srcdir = @[email protected]
abs_top_builddir = @[email protected]
abs_top_srcdir = @[email protected]
ac_ct_AR = @[email protected]
ac_ct_CC = @[email protected]
ac_ct_CXX = @[email protected]
ac_ct_DUMPBIN = @[email protected]
......@@ -829,7 +832,7 @@ debian/changelog:
version=@[email protected]; \
serie=$(serie); \
if test -z "$$serie"; then \
serie=lucid; \
serie=maverick; \
fi; \
if test -z "$$release"; then \
release=1; \
......
......@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],,
[m4_warning([this file was generated for autoconf 2.66.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.68.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
......
......@@ -25,6 +25,9 @@
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Define to 1 if you have the `ibus_engine_get_surrounding_text' function. */
#undef HAVE_IBUS_ENGINE_GET_SURROUNDING_TEXT
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
......
This diff is collapsed.
......@@ -22,7 +22,7 @@
m4_define([ibus_released], [1])
m4_define([ibus_major_version], [1])
m4_define([ibus_minor_version], [3])
m4_define([ibus_micro_version], [2])
m4_define([ibus_micro_version], [3])
m4_define(ibus_maybe_datestamp,
m4_esyscmd([if test x]ibus_released[ != x1; then date +.%Y%m%d | tr -d '\n\r'; fi]))
......@@ -89,7 +89,22 @@ fi
AM_CONDITIONAL([HAVE_GTK],[test x$with_gtk != xno])
# check if minput_list, which is available in m17n-lib 1.6.2+ (CVS)
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
CFLAGS="$CFLAGS $M17N_CFLAGS"
LIBS="$LIBS $M17N_LIBS"
AC_REPLACE_FUNCS([minput_list])
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
# check if ibus_engine_get_surrounding_text, which is available in ibus-1.3.99+ (git master)
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
CFLAGS="$CFLAGS $IBUS_CFLAGS"
LIBS="$LIBS $IBUS_LIBS"
AC_CHECK_FUNCS([ibus_engine_get_surrounding_text])
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
# define GETTEXT_* variables
GETTEXT_PACKAGE=ibus-m17n
......
......@@ -124,6 +124,7 @@ CXXFLAGS = @[email protected]
CYGPATH_W = @[email protected]
DEFS = @[email protected]
DEPDIR = @[email protected]
DLLTOOL = @[email protected]
DSYMUTIL = @[email protected]
DUMPBIN = @[email protected]
ECHO_C = @[email protected]
......@@ -163,6 +164,7 @@ M17N_CFLAGS = @[email protected]
M17N_LIBS = @[email protected]
MAINT = @[email protected]
MAKEINFO = @[email protected]
MANIFEST_TOOL = @[email protected]
MKDIR_P = @[email protected]
MSGFMT = @[email protected]
MSGFMT_015 = @[email protected]
......@@ -203,6 +205,7 @@ abs_builddir = @[email protected]
abs_srcdir = @[email protected]
abs_top_builddir = @[email protected]
abs_top_srcdir = @[email protected]
ac_ct_AR = @[email protected]
ac_ct_CC = @[email protected]
ac_ct_CXX = @[email protected]
ac_ct_DUMPBIN = @[email protected]
......
This diff is collapsed.
......@@ -99,6 +99,7 @@ CXXFLAGS = @[email protected]
CYGPATH_W = @[email protected]
DEFS = @[email protected]
DEPDIR = @[email protected]
DLLTOOL = @[email protected]
DSYMUTIL = @[email protected]
DUMPBIN = @[email protected]
ECHO_C = @[email protected]
......@@ -138,6 +139,7 @@ M17N_CFLAGS = @[email protected]
M17N_LIBS = @[email protected]
MAINT = @[email protected]
MAKEINFO = @[email protected]
MANIFEST_TOOL = @[email protected]
MKDIR_P = @[email protected]
MSGFMT = @[email protected]
MSGFMT_015 = @[email protected]
......@@ -178,6 +180,7 @@ abs_builddir = @[email protected]
abs_srcdir = @[email protected]
abs_top_builddir = @[email protected]
abs_top_srcdir = @[email protected]
ac_ct_AR = @[email protected]
ac_ct_CC = @[email protected]
ac_ct_CXX = @[email protected]
ac_ct_DUMPBIN = @[email protected]
......
This diff is collapsed.
......@@ -7,17 +7,17 @@
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# Generated from ltversion.in.
# @[email protected]
# serial 3175 ltversion.m4
# serial 3293 ltversion.m4
# This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.2.10])
m4_define([LT_PACKAGE_REVISION], [1.3175])
m4_define([LT_PACKAGE_VERSION], [2.4])
m4_define([LT_PACKAGE_REVISION], [1.3293])
AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.2.10'
macro_revision='1.3175'
[macro_version='2.4'
macro_revision='1.3293'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n"
"POT-Creation-Date: 2011-03-07 11:49+0900\n"
"POT-Creation-Date: 2011-08-29 17:42+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <[email protected]>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
......@@ -17,6 +17,6 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/m17nutil.c:307
#: src/m17nutil.c:311
msgid "M17N"
msgstr ""
No preview for this file type
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n"
"POT-Creation-Date: 2011-03-07 11:49+0900\n"
"POT-Creation-Date: 2011-08-29 17:42+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <[email protected]>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
......@@ -17,6 +17,6 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/m17nutil.c:307
#: src/m17nutil.c:311
msgid "M17N"
msgstr ""
......@@ -193,6 +193,7 @@ CXXFLAGS = @[email protected]
CYGPATH_W = @[email protected]
DEFS = @[email protected]
DEPDIR = @[email protected]
DLLTOOL = @[email protected]
DSYMUTIL = @[email protected]
DUMPBIN = @[email protected]
ECHO_C = @[email protected]
......@@ -232,6 +233,7 @@ M17N_CFLAGS = @[email protected]
M17N_LIBS = @[email protected]
MAINT = @[email protected]
MAKEINFO = @[email protected]
MANIFEST_TOOL = @[email protected]
MKDIR_P = @[email protected]
MSGFMT = @[email protected]
MSGFMT_015 = @[email protected]
......@@ -272,6 +274,7 @@ abs_builddir = @[email protected]
abs_srcdir = @[email protected]
abs_top_builddir = @[email protected]
abs_top_srcdir = @[email protected]
ac_ct_AR = @[email protected]
ac_ct_CC = @[email protected]
ac_ct_CXX = @[email protected]
ac_ct_DUMPBIN = @[email protected]
......
/* vim:set et sts=4: */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <ibus.h>
#include <m17n.h>
......@@ -6,23 +9,6 @@
#include "m17nutil.h"
#include "engine.h"
/* type module to assign different GType to each engine */
#define IBUS_TYPE_M17N_TYPE_MODULE (ibus_m17n_type_module_get_type ())
#define IBUS_M17N_TYPE_MODULE (module) (G_TYPE_CHECK_INSTANCE_CAST (module, IBUS_TYPE_M17N_TYPE_MODULE, IBusM17NTypeModule)
typedef struct _IBusM17NTypeModule IBusM17NTypeModule;
typedef struct _IBusM17NTypeModuleClass IBusM17NTypeModuleClass;
struct _IBusM17NTypeModule
{
GTypeModule parent_instance;
};
struct _IBusM17NTypeModuleClass
{
GTypeModuleClass parent_class;
};
typedef struct _IBusM17NEngine IBusM17NEngine;
typedef struct _IBusM17NEngineClass IBusM17NEngineClass;
......@@ -53,10 +39,7 @@ struct _IBusM17NEngineClass {
};
/* functions prototype */
static GType
ibus_m17n_type_module_get_type (void);
static void ibus_m17n_engine_class_init (IBusM17NEngineClass *klass);
static void ibus_m17n_engine_class_finalize (IBusM17NEngineClass *klass);
static void ibus_m17n_config_value_changed (IBusConfig *config,
const gchar *section,
const gchar *name,
......@@ -119,7 +102,6 @@ static void ibus_m17n_engine_update_lookup_table
static IBusEngineClass *parent_class = NULL;
static IBusConfig *config = NULL;
static IBusM17NTypeModule *module = NULL;
void
ibus_m17n_init (IBusBus *bus)
......@@ -128,55 +110,6 @@ ibus_m17n_init (IBusBus *bus)
if (config)
g_object_ref_sink (config);
ibus_m17n_init_common ();
module = g_object_new (IBUS_TYPE_M17N_TYPE_MODULE, NULL);
}
static gboolean
ibus_m17n_type_module_load (GTypeModule *module)
{
return TRUE;
}
static void
ibus_m17n_type_module_unload (GTypeModule *module)
{
}
static void
ibus_m17n_type_module_class_init (IBusM17NTypeModuleClass *klass)
{
GTypeModuleClass *module_class = G_TYPE_MODULE_CLASS (klass);
module_class->load = ibus_m17n_type_module_load;
module_class->unload = ibus_m17n_type_module_unload;
}
static GType
ibus_m17n_type_module_get_type (void)
{
static GType type = 0;
static const GTypeInfo type_info = {
sizeof (IBusM17NTypeModuleClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) ibus_m17n_type_module_class_init,
(GClassFinalizeFunc) NULL,
NULL,
sizeof (IBusM17NTypeModule),
0,
(GInstanceInitFunc) NULL,
};
if (type == 0) {
type = g_type_register_static (G_TYPE_TYPE_MODULE,
"IBusM17NTypeModule",
&type_info,
(GTypeFlags) 0);
}
return type;
}
static gboolean
......@@ -239,14 +172,14 @@ ibus_m17n_engine_get_type_for_name (const gchar *engine_name)
GTypeInfo type_info = {
sizeof (IBusM17NEngineClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) ibus_m17n_engine_class_init,
(GClassFinalizeFunc)ibus_m17n_engine_class_finalize,
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) ibus_m17n_engine_class_init,
(GClassFinalizeFunc) NULL,
NULL,
sizeof (IBusM17NEngine),
0,
(GInstanceInitFunc) ibus_m17n_engine_init,
(GInstanceInitFunc) ibus_m17n_engine_init,
};
if (!ibus_m17n_scan_engine_name (engine_name, &lang, &name)) {
......@@ -264,11 +197,10 @@ ibus_m17n_engine_get_type_for_name (const gchar *engine_name)
g_assert (type == 0 || g_type_is_a (type, IBUS_TYPE_ENGINE));
if (type == 0) {
type = g_type_module_register_type (G_TYPE_MODULE (module),
IBUS_TYPE_ENGINE,
type_name,
&type_info,
(GTypeFlags) 0);
type = g_type_register_static (IBUS_TYPE_ENGINE,
type_name,
&type_info,
(GTypeFlags) 0);
}
g_free (type_name);
......@@ -407,14 +339,6 @@ ibus_m17n_config_value_changed (IBusConfig *config,
}
}
static void
ibus_m17n_engine_class_finalize (IBusM17NEngineClass *klass)
{
if (klass->im)
minput_close_im (klass->im);
g_free (klass->config_section);
}
static void
ibus_m17n_engine_init (IBusM17NEngine *m17n)
{
......@@ -773,6 +697,12 @@ ibus_m17n_engine_enable (IBusEngine *engine)
IBusM17NEngine *m17n = (IBusM17NEngine *) engine;
parent_class->enable (engine);
#ifdef HAVE_IBUS_ENGINE_GET_SURROUNDING_TEXT
/* Issue a dummy ibus_engine_get_surrounding_text() call to tell
input context that we will use surrounding-text. */
ibus_engine_get_surrounding_text (engine, NULL, NULL, NULL);
#endif /* HAVE_IBUS_ENGINE_GET_SURROUNDING_TEXT */
}
static void
......@@ -986,8 +916,58 @@ ibus_m17n_engine_callback (MInputContext *context,
}
else if (command == Minput_reset) {
}
else if (command == Minput_get_surrounding_text) {
}
else if (command == Minput_delete_surrounding_text) {
/* ibus_engine_get_surrounding_text is only available in the current
git master (1.3.99+) */
#ifdef HAVE_IBUS_ENGINE_GET_SURROUNDING_TEXT
else if (command == Minput_get_surrounding_text &&
(((IBusEngine *) m17n)->client_capabilities &
IBUS_CAP_SURROUNDING_TEXT) != 0) {
IBusText *text;
guint cursor_pos, anchor_pos, nchars, nbytes;
MText *mt, *surround;
int len, pos;
ibus_engine_get_surrounding_text ((IBusEngine *) m17n,
&text,
&cursor_pos,
&anchor_pos);
nchars = ibus_text_get_length (text);
nbytes = g_utf8_offset_to_pointer (text->text, nchars) - text->text;
mt = mconv_decode_buffer (Mcoding_utf_8, text->text, nbytes);
g_object_unref (text);
len = (long) mplist_value (m17n->context->plist);
if (len < 0) {
pos = cursor_pos + len;
if (pos < 0)
pos = 0;
surround = mtext_duplicate (mt, pos, cursor_pos);
}
else if (len > 0) {
pos = cursor_pos + len;
if (pos > nchars)
pos = nchars;
surround = mtext_duplicate (mt, cursor_pos, pos);
}
else {
surround = mtext ();
}
m17n_object_unref (mt);
mplist_set (m17n->context->plist, Mtext, surround);
m17n_object_unref (surround);
}
#endif /* !HAVE_IBUS_ENGINE_GET_SURROUNDING_TEXT */
else if (command == Minput_delete_surrounding_text &&
(((IBusEngine *) m17n)->client_capabilities &
IBUS_CAP_SURROUNDING_TEXT) != 0) {
int len;
len = (long) mplist_value (m17n->context->plist);
if (len < 0)
ibus_engine_delete_surrounding_text ((IBusEngine *) m17n,
len, -len);
else if (len > 0)
ibus_engine_delete_surrounding_text ((IBusEngine *) m17n,
0, len);
}
}
/* vim:set et sts=4: */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <string.h>
#include <errno.h>
#include "m17nutil.h"
......
/* vim:set et sts=4: */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <ibus.h>
#include <locale.h>
......
/* replacement of minput_list, which is available in m17n-lib 1.6.2+ (CVS) */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <m17n.h>
......
/* vim:set et sts=4: */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gtk/gtk.h>
#include <ibus.h>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment