summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglasseyes <dglassey@gmail.com>2018-12-19 22:10:03 +0700
committerglasseyes <dglassey@gmail.com>2018-12-19 22:10:03 +0700
commitff953568afd09dfb875b18750534b3e529b8fe50 (patch)
tree2ef50c84c63d449e38f04296d2af5ff738f7c99e /src
parent652c6120e2b1b616b32b917453df52fd1d3afd35 (diff)
New upstream version 10.99.64
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/Makefile.in40
-rw-r--r--src/engine.c13
-rw-r--r--src/keyman-service.c379
-rw-r--r--src/keyman-service.h69
-rw-r--r--src/kmfl.xml.in5
-rw-r--r--src/kmfl.xml.in.in3
-rw-r--r--src/kmflutil.c12
-rw-r--r--src/main.c7
9 files changed, 16 insertions, 514 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index d52a1aa..df1e959 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -53,8 +53,6 @@ ibus_engine_kmfl_SOURCES = \
main.c \
engine.c \
engine.h \
- keyman-service.c \
- keyman-service.h \
$(NULL)
ibus_engine_kmfl_CFLAGS = \
@IBUS_CFLAGS@ \
diff --git a/src/Makefile.in b/src/Makefile.in
index eb8f11e..529287a 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -115,13 +115,13 @@ libexec_PROGRAMS = ibus-engine-kmfl$(EXEEXT)
subdir = src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
- $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
- $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -134,8 +134,7 @@ am__installdirs = "$(DESTDIR)$(libexecdir)" \
PROGRAMS = $(libexec_PROGRAMS)
am_ibus_engine_kmfl_OBJECTS = ibus_engine_kmfl-kmflutil.$(OBJEXT) \
ibus_engine_kmfl-main.$(OBJEXT) \
- ibus_engine_kmfl-engine.$(OBJEXT) \
- ibus_engine_kmfl-keyman-service.$(OBJEXT)
+ ibus_engine_kmfl-engine.$(OBJEXT)
ibus_engine_kmfl_OBJECTS = $(am_ibus_engine_kmfl_OBJECTS)
ibus_engine_kmfl_LDADD = $(LDADD)
AM_V_lt = $(am__v_lt_@AM_V@)
@@ -450,6 +449,7 @@ EGREP = @EGREP@
ENV = @ENV@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
@@ -510,6 +510,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -589,8 +590,6 @@ ibus_engine_kmfl_SOURCES = \
main.c \
engine.c \
engine.h \
- keyman-service.c \
- keyman-service.h \
$(NULL)
ibus_engine_kmfl_CFLAGS = \
@@ -725,7 +724,6 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ibus_engine_kmfl-engine.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ibus_engine_kmfl-keyman-service.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ibus_engine_kmfl-kmflutil.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ibus_engine_kmfl-main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_kmfl-kmflutil.Po@am__quote@
@@ -793,20 +791,6 @@ ibus_engine_kmfl-engine.obj: engine.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ibus_engine_kmfl_CFLAGS) $(CFLAGS) -c -o ibus_engine_kmfl-engine.obj `if test -f 'engine.c'; then $(CYGPATH_W) 'engine.c'; else $(CYGPATH_W) '$(srcdir)/engine.c'; fi`
-ibus_engine_kmfl-keyman-service.o: keyman-service.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ibus_engine_kmfl_CFLAGS) $(CFLAGS) -MT ibus_engine_kmfl-keyman-service.o -MD -MP -MF $(DEPDIR)/ibus_engine_kmfl-keyman-service.Tpo -c -o ibus_engine_kmfl-keyman-service.o `test -f 'keyman-service.c' || echo '$(srcdir)/'`keyman-service.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ibus_engine_kmfl-keyman-service.Tpo $(DEPDIR)/ibus_engine_kmfl-keyman-service.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='keyman-service.c' object='ibus_engine_kmfl-keyman-service.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ibus_engine_kmfl_CFLAGS) $(CFLAGS) -c -o ibus_engine_kmfl-keyman-service.o `test -f 'keyman-service.c' || echo '$(srcdir)/'`keyman-service.c
-
-ibus_engine_kmfl-keyman-service.obj: keyman-service.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ibus_engine_kmfl_CFLAGS) $(CFLAGS) -MT ibus_engine_kmfl-keyman-service.obj -MD -MP -MF $(DEPDIR)/ibus_engine_kmfl-keyman-service.Tpo -c -o ibus_engine_kmfl-keyman-service.obj `if test -f 'keyman-service.c'; then $(CYGPATH_W) 'keyman-service.c'; else $(CYGPATH_W) '$(srcdir)/keyman-service.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ibus_engine_kmfl-keyman-service.Tpo $(DEPDIR)/ibus_engine_kmfl-keyman-service.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='keyman-service.c' object='ibus_engine_kmfl-keyman-service.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ibus_engine_kmfl_CFLAGS) $(CFLAGS) -c -o ibus_engine_kmfl-keyman-service.obj `if test -f 'keyman-service.c'; then $(CYGPATH_W) 'keyman-service.c'; else $(CYGPATH_W) '$(srcdir)/keyman-service.c'; fi`
-
test_kmfl-kmflutil.o: kmflutil.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_kmfl_CFLAGS) $(CFLAGS) -MT test_kmfl-kmflutil.o -MD -MP -MF $(DEPDIR)/test_kmfl-kmflutil.Tpo -c -o test_kmfl-kmflutil.o `test -f 'kmflutil.c' || echo '$(srcdir)/'`kmflutil.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_kmfl-kmflutil.Tpo $(DEPDIR)/test_kmfl-kmflutil.Po
diff --git a/src/engine.c b/src/engine.c
index f7e01b7..cde3e8b 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -29,7 +29,6 @@
#include <X11/keysym.h>
#include "kmflutil.h"
-#include "keyman-service.h"
#include "engine.h"
typedef struct _IBusKMFLEngine IBusKMFLEngine;
@@ -412,13 +411,6 @@ ibus_kmfl_engine_enable (IBusEngine *engine)
engine_name = ibus_engine_get_name (engine);
g_assert (engine_name);
g_message("WDG: ibus_kmfl_engine_enable %s", engine_name);
- im = (KInputMethod *) g_hash_table_lookup (im_table, engine_name);
- // own dbus name com.Keyman
- // expose properties LDMLFile and Name
- KeymanService *service = km_service_get_default();
- //const gchar *ldmlfile = "";
- km_service_set_ldmlfile (service, im->keyboard_ldmlfile);
- km_service_set_name (service, im->keyboard_name);
parent_class->enable (engine);
}
@@ -432,11 +424,6 @@ ibus_kmfl_engine_disable (IBusEngine *engine)
g_assert (engine_name);
g_message("WDG: ibus_kmfl_engine_disable %s", engine_name);
ibus_kmfl_engine_focus_out (engine);
- // stop owning dbus name com.Keyman
- KeymanService *service = km_service_get_default();
- km_service_set_ldmlfile (service, "");
- km_service_set_name (service, "None");
- // g_clear_object(&service);
parent_class->disable (engine);
}
diff --git a/src/keyman-service.c b/src/keyman-service.c
deleted file mode 100644
index c768430..0000000
--- a/src/keyman-service.c
+++ /dev/null
@@ -1,379 +0,0 @@
-/* vim:set et sts=4: */
-
-/*
- * KMFL Input Method for IBUS (The Input Bus)
- *
- * Copyright (C) 2018 SIL International
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- *
- */
-
- /*
- This file is based on work from Mousetweaks
- Copyright © 2007-2010 Gerd Kohlberger <gerdko gmail com>
-*/
-
-#include <gio/gio.h>
-
-#include "keyman-service.h"
-
-struct _KeymanServicePrivate
-{
- guint owner_id;
- GDBusNodeInfo *ispec;
-
- gchar * name;
- gchar * ldmlfile;
-};
-
-enum
-{
- PROP_0,
- PROP_NAME,
- PROP_LDMLFILE
-};
-
-static const gchar introspection_xml[] =
- "<node>"
- " <interface name='com.Keyman'>"
- " <property type='s' name='LDMLFile' access='read'/>"
- " <property type='s' name='Name' access='read'/>"
- " </interface>"
- "</node>";
-
-static void km_service_bus_acquired (GDBusConnection *connection,
- const gchar *name,
- gpointer data);
-
-G_DEFINE_TYPE (KeymanService, km_service, G_TYPE_OBJECT)
-
-static void
-km_service_init (KeymanService *service)
-{
- KeymanServicePrivate *priv;
- GError *error = NULL;
-
- g_message("WDG: km_service_init");
-
- service->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (service,
- KM_TYPE_SERVICE,
- KeymanServicePrivate);
-
- priv->name = g_strdup ("None");
- priv->ldmlfile = g_strdup ("");
- priv->owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
- KEYMAN_DBUS_NAME,
- G_BUS_NAME_OWNER_FLAGS_NONE,
- km_service_bus_acquired,
- NULL, NULL,
- service, NULL);
- priv->ispec = g_dbus_node_info_new_for_xml (introspection_xml, &error);
- if (error)
- {
- g_warning ("%s\n", error->message);
- g_error_free (error);
- }
-}
-
-static void
-km_service_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- KeymanService *service = KM_SERVICE (object);
-
- switch (prop_id)
- {
- case PROP_NAME:
- if (service->priv->name)
- {
- g_free(service->priv->name);
- }
- service->priv->name = g_value_dup_string (value);
- break;
- case PROP_LDMLFILE:
- if (service->priv->ldmlfile)
- {
- g_free(service->priv->ldmlfile);
- }
- service->priv->ldmlfile = g_value_dup_string (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- }
-}
-
-static void
-km_service_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- KeymanService *service = KM_SERVICE (object);
-
- switch (prop_id)
- {
- case PROP_NAME:
- g_value_set_string (value, service->priv->name);
- break;
- case PROP_LDMLFILE:
- g_value_set_string (value, service->priv->ldmlfile);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- }
-}
-
-static void
-km_service_dispose (GObject *object)
-{
- g_message("WDG: km_service_dispose");
- KeymanServicePrivate *priv = KM_SERVICE (object)->priv;
-
- if (priv->owner_id)
- {
- g_bus_unown_name (priv->owner_id);
- priv->owner_id = 0;
- }
-
- if (priv->ispec)
- {
- g_dbus_node_info_unref (priv->ispec);
- priv->ispec = NULL;
- }
-
- if (priv->name)
- {
- g_free(priv->name);
- }
-
- if (priv->ldmlfile)
- {
- g_free(priv->ldmlfile);
- }
-
- G_OBJECT_CLASS (km_service_parent_class)->dispose (object);
-}
-
-static void
-km_service_class_init (KeymanServiceClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- object_class->get_property = km_service_get_property;
- object_class->set_property = km_service_set_property;
- object_class->dispose = km_service_dispose;
-
- g_object_class_install_property (object_class,
- PROP_NAME,
- g_param_spec_string ("name",
- "Name",
- "Name of the currently active Keyman keyboard",
- "None",
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS));
- g_object_class_install_property (object_class,
- PROP_LDMLFILE,
- g_param_spec_string ("ldmlfile",
- "LDML file",
- "On screen keyboard file for the currently active Keyman keyboard",
- "",
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS));
-
- g_type_class_add_private (klass, sizeof (KeymanServicePrivate));
-}
-
-static GVariant *
-handle_get_property (GDBusConnection *connection,
- const gchar *sender,
- const gchar *path,
- const gchar *interface_name,
- const gchar *property,
- GError **error,
- KeymanService *service)
-{
- GVariant *ret = NULL;
-
- if (g_strcmp0 (property, "Name") == 0)
- {
- ret = g_variant_new_string (service->priv->name);
- }
- else if (g_strcmp0 (property, "LDMLFile") == 0)
- {
- ret = g_variant_new_string (service->priv->ldmlfile);
- }
- return ret;
-}
-
-static gboolean
-handle_set_property (GDBusConnection *connection,
- const gchar *sender,
- const gchar *path,
- const gchar *interface,
- const gchar *property,
- GVariant *value,
- GError **error,
- KeymanService *service)
-{
- gsize sz;
- if (g_strcmp0 (property, "Name") == 0)
- {
- km_service_set_name (service, g_variant_dup_string (value, &sz));
- }
- else if (g_strcmp0 (property, "LDMLFile") == 0)
- {
- km_service_set_ldmlfile (service, g_variant_dup_string (value, &sz));
- }
- return TRUE;
-}
-
-static const GDBusInterfaceVTable interface_vtable =
-{
- (GDBusInterfaceMethodCallFunc) NULL,
- (GDBusInterfaceGetPropertyFunc) handle_get_property,
- (GDBusInterfaceSetPropertyFunc) handle_set_property
-};
-
-static void
-emit_property_changed (GObject *object,
- GParamSpec *pspec,
- GDBusConnection *connection)
-{
- KeymanService *service = KM_SERVICE (object);
- GError *error = NULL;
- GVariantBuilder builder, inv_builder;
- GVariant *prop_v;
-
- g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY);
- g_variant_builder_init (&inv_builder, G_VARIANT_TYPE ("as"));
-
- if (g_strcmp0 (pspec->name, "name") == 0)
- {
- g_variant_builder_add (&builder, "{sv}", "Name",
- g_variant_new_string (service->priv->name));
- }
- else if (g_strcmp0 (pspec->name, "ldmlfile") == 0)
- {
- g_variant_builder_add (&builder, "{sv}", "LDMLFile",
- g_variant_new_string (service->priv->ldmlfile));
- }
-
- prop_v = g_variant_new ("(sa{sv}as)",
- KEYMAN_DBUS_IFACE,
- &builder, &inv_builder);
-
- if (!g_dbus_connection_emit_signal (connection, NULL,
- KEYMAN_DBUS_PATH,
- "org.freedesktop.DBus.Properties",
- "PropertiesChanged",
- prop_v, &error))
- {
- g_warning ("%s\n", error->message);
- g_error_free (error);
- }
-}
-
-static void
-km_service_bus_acquired (GDBusConnection *connection,
- const gchar *name,
- gpointer data)
-{
- KeymanService *service = data;
-
- if (service->priv->ispec)
- {
- GError *error = NULL;
-
- g_dbus_connection_register_object (connection,
- KEYMAN_DBUS_PATH,
- service->priv->ispec->interfaces[0],
- &interface_vtable,
- service, NULL, &error);
- if (error)
- {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
-
- g_signal_connect (service, "notify",
- G_CALLBACK (emit_property_changed), connection);
- }
-}
-
-KeymanService *
-km_service_get_default (void)
-{
- static KeymanService *service = NULL;
-
- // if (service)
- // {
- // g_free(service);
- // service = g_object_new (KM_TYPE_SERVICE, NULL);
- // g_object_add_weak_pointer (G_OBJECT (service), (gpointer *) &service);
- // }
- if (!service)
- {
- service = g_object_new (KM_TYPE_SERVICE, NULL);
- g_object_add_weak_pointer (G_OBJECT (service), (gpointer *) &service);
- }
- return service;
-}
-
-void
-km_service_set_name (KeymanService *service,
- const gchar *name)
-{
- g_return_if_fail (KM_IS_SERVICE (service));
-
- if (g_strcmp0(name,service->priv->name) != 0)
- {
- g_free(service->priv->name);
- service->priv->name = g_strdup(name);
- g_object_notify (G_OBJECT (service), "name");
- }
-}
-
-// const gchar *
-// km_service_get_name (KeymanService *service)
-// {
-// g_return_val_if_fail (KM_IS_SERVICE (service), -1);
-
-// return service->priv->name;
-// }
-
-void
-km_service_set_ldmlfile (KeymanService *service,
- const gchar *xml)
-{
- g_return_if_fail (KM_IS_SERVICE (service));
-
- if (g_strcmp0(xml,service->priv->ldmlfile) != 0)
- {
- g_free(service->priv->ldmlfile);
- service->priv->ldmlfile = g_strdup(xml);
- g_object_notify (G_OBJECT (service), "ldmlfile");
- }
-}
-
-// const gchar *
-// km_service_get_ldmlfile (KeymanService *service)
-// {
-// g_return_val_if_fail (KM_IS_SERVICE (service), -1);
-
-// return service->priv->ldmlfile;
-// }
diff --git a/src/keyman-service.h b/src/keyman-service.h
deleted file mode 100644
index 0ce5237..0000000
--- a/src/keyman-service.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* vim:set et sts=4: */
-
-/*
- * KMFL Input Method for IBUS (The Input Bus)
- *
- * Copyright (C) 2018 SIL International
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- *
- */
-
- /*
- This file is based on work from Mousetweaks
- Copyright © 2007-2010 Gerd Kohlberger <gerdko gmail com>
-*/
-
-#ifndef __KM_SERVICE_H__
-#define __KM_SERVICE_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-#define KEYMAN_DBUS_NAME "com.Keyman"
-#define KEYMAN_DBUS_IFACE "com.Keyman"
-#define KEYMAN_DBUS_PATH "/com/Keyman/IBus"
-
-#define KM_TYPE_SERVICE (km_service_get_type ())
-#define KM_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), KM_TYPE_SERVICE, KeymanService))
-#define KM_IS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), KM_TYPE_SERVICE))
-
-typedef GObjectClass KeymanServiceClass;
-typedef struct _KeymanService KeymanService;
-typedef struct _KeymanServicePrivate KeymanServicePrivate;
-
-struct _KeymanService
-{
- GObject parent;
- KeymanServicePrivate *priv;
-};
-
-GType km_service_get_type (void) G_GNUC_CONST;
-
-KeymanService * km_service_get_default (void);
-
-// const gchar * km_service_get_ldmlfile (KeymanService *service);
-void km_service_set_ldmlfile (KeymanService *service,
- const gchar *xml);
-
-// const gchar * km_service_get_name (KeymanService *service);
-void km_service_set_name (KeymanService *service,
- const gchar *name);
-
-
-G_END_DECLS
-
-#endif /* __KM_SERVICE_H__ */
diff --git a/src/kmfl.xml.in b/src/kmfl.xml.in
index d284c37..40e5437 100644
--- a/src/kmfl.xml.in
+++ b/src/kmfl.xml.in
@@ -4,7 +4,7 @@
<name>org.freedesktop.IBus.KMFL</name>
<description>KMFL Component</description>
<exec>${libexecdir}/ibus-engine-kmfl --ibus</exec>
- <version>10.99.33</version>
+ <version>10.99.64</version>
<author>Doug Rintoul &lt;doug_rintoul@sil.org&gt;</author>
<license>GPL</license>
<homepage>http://kmfl.sourceforge.net</homepage>
@@ -12,8 +12,7 @@
<observed-paths>
<path>/usr/share/kmfl/</path>
<path>~/.kmfl/</path>
- <path>/usr/local/share/keyman/</path>
- <path>~/.local/share/keyman/</path>
+ <path>/usr/local/share/kmfl/</path>
</observed-paths>
<engines exec=\"${libexecdir}/ibus-engine-kmfl --xml\" />
</component>
diff --git a/src/kmfl.xml.in.in b/src/kmfl.xml.in.in
index b42c001..32a2f47 100644
--- a/src/kmfl.xml.in.in
+++ b/src/kmfl.xml.in.in
@@ -12,8 +12,7 @@
<observed-paths>
<path>/usr/share/kmfl/</path>
<path>~/.kmfl/</path>
- <path>/usr/local/share/keyman/</path>
- <path>~/.local/share/keyman/</path>
+ <path>/usr/local/share/kmfl/</path>
</observed-paths>
<engines exec=\"${libexecdir}/ibus-engine-kmfl --xml\" />
</component>
diff --git a/src/kmflutil.c b/src/kmflutil.c
index 983ce98..2e4eb94 100644
--- a/src/kmflutil.c
+++ b/src/kmflutil.c
@@ -308,11 +308,7 @@ ibus_kmfl_list_engines (void)
engines = ibus_kmfl_add_engines(engines, keyboard_list);
g_list_free(keyboard_list);
- keyboard_list = kmfl_get_keyboard_list("/usr/share/keyman");
- engines = ibus_kmfl_add_engines(engines, keyboard_list);
- g_list_free(keyboard_list);
-
- keyboard_list = kmfl_get_keyboard_list("/usr/local/share/keyman");
+ keyboard_list = kmfl_get_keyboard_list("/usr/local/share/kmfl");
engines = ibus_kmfl_add_engines(engines, keyboard_list);
g_list_free(keyboard_list);
@@ -322,12 +318,6 @@ ibus_kmfl_list_engines (void)
g_free(local_keyboard_path);
g_list_free(keyboard_list);
- local_keyboard_path= g_strdup_printf("%s/.local/share/keyman", getenv("HOME"));
- keyboard_list = kmfl_get_keyboard_list(local_keyboard_path);
- engines = ibus_kmfl_add_engines(engines, keyboard_list);
- g_free(local_keyboard_path);
- g_list_free(keyboard_list);
-
return engines;
}
diff --git a/src/main.c b/src/main.c
index 273423b..4d29670 100644
--- a/src/main.c
+++ b/src/main.c
@@ -27,7 +27,6 @@
#include <stdio.h>
#include "kmflutil.h"
#include "engine.h"
-#include "keyman-service.h"
static IBusBus *bus = NULL;
static IBusFactory *factory = NULL;
@@ -50,10 +49,6 @@ static void
ibus_disconnected_cb (IBusBus *bus,
gpointer user_data)
{
- g_debug ("bus disconnected");
- KeymanService *service = km_service_get_default();
- g_clear_object(&service);
-
ibus_quit ();
}
@@ -67,7 +62,6 @@ start_component (void)
ibus_init ();
bus = ibus_bus_new ();
- g_signal_connect (bus, "disconnected", G_CALLBACK (ibus_disconnected_cb), NULL);
component = ibus_kmfl_get_component ();
@@ -92,7 +86,6 @@ start_component (void)
}
g_object_unref (component);
- km_service_get_default(); // initialise dbus service
ibus_main ();
}