#include <app_preference.h>
#include <ode/internal-encryption.h>
#include <notification.h>
-#include "clipboard.h"
#include "autofill.h"
#include "ise.h"
#include "utils.h"
#define MULTITAP_TIMEOUT 3.0
#define USER_KEYSTRING_OPTION "OPTION"
#define USER_KEYSTRING_EMOTICON "EMOTICON_LAYOUT"
-#define USER_KEYSTRING_CLIPBOARD "CLIPBOARD"
#define USER_KEYSTRING_VOICE "STT_3X4"
#define USER_KEYSTRING_FLOATING "FLOATING"
#define USER_KEYSTRING_STICKER "STICKER_LAYOUT"
#define USER_VOICE_LANGUAGE "LANGUAGE"
static sclboolean _cm_popup_opened = FALSE;
-static const char *_cm_key_list[CM_KEY_LIST_SIZE] = {USER_KEYSTRING_OPTION, USER_KEYSTRING_EMOTICON, USER_KEYSTRING_CLIPBOARD,
+static const char *_cm_key_list[CM_KEY_LIST_SIZE] = {USER_KEYSTRING_OPTION, USER_KEYSTRING_EMOTICON,
USER_KEYSTRING_VOICE, USER_KEYSTRING_FLOATING, USER_KEYSTRING_STICKER, USER_KEYSTRING_TRANSLATION};
static scluint _current_cm_key_id = 0;
const_cast<sclchar*>("icon/54x54/icon_setting_press.png"),
const_cast<sclchar*>("icon/54x54/icon_setting_dim.png")};
ui->set_private_key("CM_KEY", const_cast<sclchar*>(" "), imagelabel, NULL, 0, const_cast<sclchar*>(USER_KEYSTRING_OPTION), TRUE);
- } else if (strcmp(_cm_key_list[cm_key_id], USER_KEYSTRING_CLIPBOARD) == 0) {
- sclchar* imagelabel[SCL_BUTTON_STATE_MAX] = {
- const_cast<sclchar*>("icon/54x54/icon_clipboard_nor.png"),
- const_cast<sclchar*>("icon/54x54/icon_clipboard_press.png"),
- const_cast<sclchar*>("icon/54x54/icon_clipboard_dim.png")};
- ui->set_private_key("CM_KEY", const_cast<sclchar*>(" "), imagelabel, NULL, 0, const_cast<sclchar*>(USER_KEYSTRING_CLIPBOARD), TRUE);
} else if (strcmp(_cm_key_list[cm_key_id], USER_KEYSTRING_VOICE) == 0) {
sclchar* imagelabel[SCL_BUTTON_STATE_MAX] = {
const_cast<sclchar*>("icon/54x54/icon_mic_nor.png"),
}
}
if (input_mode && strcmp (input_mode, "NUMONLY_3X4_SIGDEC") == 0 &&
- strcmp(event_desc.key_value, ".") == 0) {
+ event_desc.key_value && strcmp(event_desc.key_value, ".") == 0) {
ime_update_preedit_string(_sig_dec[_click_count%SIG_DEC_SIZE], NULL);
ime_show_preedit_string();
delete_commit_timer();
launch_option();
ret = SCL_EVENT_DONE;
- } else if (strcmp(event_desc.key_value, USER_KEYSTRING_CLIPBOARD) == 0) {
- clipboard_show();
-
- ret = SCL_EVENT_DONE;
} else if (strcmp(event_desc.key_value, USER_KEYSTRING_FLOATING) == 0) {
CONFIG_VALUES *config_values = get_config_values();
launch_option();
ret = SCL_EVENT_DONE;
- } else if (strcmp(event_desc.key_value, USER_KEYSTRING_CLIPBOARD) == 0) {
- clipboard_show();
- ret = SCL_EVENT_DONE;
} else if (strcmp(event_desc.key_value, "Cancel") == 0) {
ret = SCL_EVENT_DONE;
const sclchar *input_mode = ui->get_input_mode();
if (_cm_popup_opened) {
if (strcmp(event_desc.key_value, USER_KEYSTRING_OPTION) == 0 ||
- strcmp(event_desc.key_value, USER_KEYSTRING_CLIPBOARD) == 0 ||
strcmp(event_desc.key_value, USER_KEYSTRING_STICKER) == 0 ||
strcmp(event_desc.key_value, USER_KEYSTRING_TRANSLATION) == 0) {
scluint id = ise_get_cm_key_id(event_desc.key_value);
LOGD("deleting ui\n");
delete ui;
ui = NULL;
+ g_ui = NULL;
}
if (g_candidate) {
if (elm_scale)
elm_app_base_scale_set(atof(elm_scale));
- clipboard_init();
-
- nmt_init();
+ if (nmt_check_agent_install())
+ nmt_init();
}
static void ime_app_exit_cb(void *user_data)
if (!engine_loader_dbus_shutdown())
LOGE("Failed to finalize dbus");
- clipboard_shutdown();
-
nmt_shutdown();
}
LOGD("Enter\n");
ise_hide();
- clipboard_set_mime_type(false);
-
g_ic_smartreply = -1;
}
LOGD("Enter\n");
ise_focus_out(context_id);
g_imdata_state = 0;
- clipboard_set_mime_type(false);
input_smartreply_deinit();
g_ic_smartreply = -1;
static void ime_app_mime_type_set_request_cb(const char *mime_types, void *user_data)
{
LOGD("mime type : %s\n", mime_types);
-
- clipboard_set_mime_type(true);
- clipboard_init_sel_type();
-
- string str(mime_types), text_key = "text/", image_key = "image/";
-
- if (str.find(text_key) != string::npos)
- clipboard_add_sel_type(CLIPBOARD_SEL_TEXT);
-
- if (str.find(image_key) != string::npos)
- clipboard_add_sel_type(CLIPBOARD_SEL_IMAGE);
}
static void ime_app_prediction_hint_data_set_cb(const char *key, const char *value, void *user_data)