glib-2.0
dbus-1
gio-2.0
+ pkgmgr-info
)
IF (with_cbhm)
BuildRequires: pkgconfig(capi-system-system-settings)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gio-2.0)
+BuildRequires: pkgconfig(pkgmgr-info)
# This is for old profile-based OBS project optimizations.
# In 4.0 unified build env, this if statement is always true.
bool engine_loader_dbus_init(void *data);
bool engine_loader_dbus_shutdown();
-void engine_loader_set_imengine(const char *engine_id);
+void engine_loader_set_imengine(const char *engine_id, const char *module_name);
void engine_loader_flush_imengine();
void engine_loader_reset_imengine();
void engine_loader_send_imengine_event(int command, uint32_t value);
#endif
#define DEFAULT_KEYBOARD_ISE_UUID "org.tizen.ise-engine-default"
+#define DEFAULT_KEYBOARD_ISE_PKGID "ise-engine-default"
//#define INPUT_MODE_NATIVE MAX_INPUT_MODE /* Native mode. It will distinguish to the current user language */
#include <dlog.h>
#include <inputmethod.h>
#include <inputmethod_internal.h>
+#include <pkgmgr-info.h>
#include "ise-dbus.h"
return true;
}
-void engine_loader_set_imengine(const char *engine_id)
+void engine_loader_set_imengine(const char *engine_id, const char *module_name)
{
GDBusMessage *reply = NULL;
GVariant *reply_body = NULL;
- bool result;
+ bool result = false;
- if (_send_sync_message(dbus_info->gdbus_connection, g_variant_new("(s)", engine_id), &reply, "set_imengine")) {
+ if (_send_sync_message(dbus_info->gdbus_connection, g_variant_new("(ss)", engine_id, module_name), &reply, "set_imengine")) {
reply_body = g_dbus_message_get_body(reply);
g_variant_get(reply_body, "(b)", &result);
}
bool engine_loader_process_key_event(scim::KeyEvent& key)
{
- bool result;
+ bool result = false;
GDBusMessage *reply = NULL;
GVariant *reply_body = NULL;
GVariantBuilder *key_event_builder = NULL;
if (ic == g_keyboard_state.focused_ic) {
if (g_keyboard_state.layout == ISE_LAYOUT_STYLE_PHONENUMBER ||
- g_keyboard_state.layout == ISE_LAYOUT_STYLE_IP ||
- g_keyboard_state.layout == ISE_LAYOUT_STYLE_MONTH ||
- g_keyboard_state.layout == ISE_LAYOUT_STYLE_NUMBERONLY) {
- engine_loader_set_imengine(DEFAULT_KEYBOARD_ISE_UUID);
+ g_keyboard_state.layout == ISE_LAYOUT_STYLE_IP ||
+ g_keyboard_state.layout == ISE_LAYOUT_STYLE_MONTH ||
+ g_keyboard_state.layout == ISE_LAYOUT_STYLE_NUMBERONLY) {
+
+ engine_loader_set_imengine(DEFAULT_KEYBOARD_ISE_UUID, DEFAULT_KEYBOARD_ISE_PKGID);
}
}
#include <iconv.h>
#include <inputmethod.h>
#include <inputmethod_internal.h>
+#include <pkgmgr-info.h>
#include "ise.h"
#include "sdk.h"
if (strcmp(language, table[loop].language) == 0) {
if (g_ui) {
if (table[loop].keyboard_ise_uuid) {
- engine_loader_set_imengine(table[loop].keyboard_ise_uuid);
+ int ret = 0;
+ char *pkgid = NULL;
+ pkgmgrinfo_appinfo_h handle;
+ ret = pkgmgrinfo_appinfo_get_appinfo(table[loop].keyboard_ise_uuid, &handle);
+ if (ret == PMINFO_R_OK) {
+ ret = pkgmgrinfo_appinfo_get_pkgid(handle, &pkgid);
+ if (ret == PMINFO_R_OK) {
+ engine_loader_set_imengine(table[loop].keyboard_ise_uuid, pkgid);
+ }
+ else {
+ LOGE("Retrieve pkgid failed : %s, %p", table[loop].keyboard_ise_uuid, handle);
+ }
+ }
+ else {
+ LOGE("Retrieve app info failed : %s", table[loop].keyboard_ise_uuid);
+ }
+
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ handle = NULL;
/*
g_core.send_imengine_event(-1, table[loop].keyboard_ise_uuid,
table[loop].language_command, table[loop].language_code);