From d9d235b7f56da9868c1729ae78e0cdf7532d63d3 Mon Sep 17 00:00:00 2001 From: Sungmin Kwak Date: Wed, 1 Apr 2015 15:03:10 +0900 Subject: [PATCH] Remove scim_helper_module_number_of_helpers(), scim_helper_module_get_helper_info() and scim_helper_module_get_helper_language() Remove the call to isf_control_get_ise_info() Change-Id: Ide00f8f14fa17a090504e132747d1713c6f73c50 --- src/sclconnection-isf.cpp | 54 ++--------------------------------------------- src/sclcoreui-efl.cpp | 18 +++++----------- 2 files changed, 7 insertions(+), 65 deletions(-) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index 65b6e60..39db979 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -17,7 +17,6 @@ #include "sclconnection-isf.h" #include "sclcoreimpl.h" -#include #include #include @@ -552,15 +551,7 @@ sclboolean CSCLConnectionISF::init() if (impl) { sclchar *uuid = impl->get_uuid(); if (uuid) { - sclchar *name = NULL; - int options = 0; - if (isf_control_get_ise_info(uuid, &name, NULL, NULL, &options) == 0) { - m_helper_info.uuid = scim::String(uuid); - m_helper_info.name = scim::String(name); - m_helper_info.option = (scluint)options; - if (name) - free(name); - } + m_helper_info.uuid = uuid; } } @@ -926,48 +917,6 @@ extern "C" void scim_module_exit (void) { } - unsigned int scim_helper_module_number_of_helpers (void) { - return 1; - } - - bool scim_helper_module_get_helper_info (unsigned int idx, scim::HelperInfo &info) { - CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); - if (impl) { - sclchar *uuid = impl->get_uuid(); - if (uuid) { - sclchar *name = NULL; - int options = 0; - if (isf_control_get_ise_info(uuid, &name, NULL, NULL, &options) == 0) { - info.uuid = scim::String(uuid); - info.name = scim::String(name); - info.option = (scluint)options; - if (name) - free(name); - return true; - } - } - } - return false; - } - - scim::String scim_helper_module_get_helper_language (unsigned int idx) { - CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); - if (impl) { - sclchar *uuid = impl->get_uuid(); - if (uuid) { - sclchar *language = NULL; - if (isf_control_get_ise_info(uuid, NULL, &language, NULL, NULL) == 0) { - if (language) { - scim::String lang = scim::String(language); - free(language); - return lang; - } - } - } - } - return scim::String(""); - } - void scim_helper_module_run_helper (const scim::String &uuid, const scim::ConfigPointer &config, const scim::String &display) { _scim_config = config; CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); @@ -976,3 +925,4 @@ extern "C" } } } + diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index 085425a..69a4057 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -17,7 +17,6 @@ #include "sclcoreui-efl.h" #include "sclcoreimpl.h" -#include #include #include @@ -264,20 +263,13 @@ void CSCLCoreUIEFL::run(const sclchar *display) char *argv[4]; int argc = 3; - std::string name; CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { sclchar *uuid = impl->get_uuid(); - if (uuid) { - sclchar *label = NULL; - if (isf_control_get_ise_info(uuid, &label, NULL, NULL, NULL) == 0) { - name = std::string(label); - if (label) - free(label); - } - } + if (!uuid) + uuid = ""; - argv [0] = const_cast (name.c_str()); + argv [0] = const_cast (uuid); argv [1] = (char *)"--display"; argv [2] = const_cast (display); argv [3] = 0; @@ -286,13 +278,13 @@ void CSCLCoreUIEFL::run(const sclchar *display) elm_policy_set(ELM_POLICY_THROTTLE, ELM_POLICY_THROTTLE_NEVER); - Evas_Object *main_window = elm_win_add(NULL, name.c_str(), ELM_WIN_UTILITY); + Evas_Object *main_window = elm_win_add(NULL, uuid, ELM_WIN_UTILITY); m_main_window = SCL_WINDOW_CAST(main_window); elm_win_borderless_set(main_window, EINA_TRUE); elm_win_keyboard_win_set(main_window, EINA_TRUE); elm_win_autodel_set(main_window, EINA_TRUE); - elm_win_title_set(main_window, name.c_str()); + elm_win_title_set(main_window, uuid); elm_win_prop_focus_skip_set(main_window, EINA_TRUE); unsigned int set = 1; -- 2.7.4