static IMEngineInstancePointer _default_instance;
-static ConfigModule *_config_module = 0;
static ConfigPointer _config;
+static Connection _config_connection;
static BackEndPointer _backend;
static EcoreIMFContextISF *_focused_ic = 0;
}
if (config_module_name != "dummy") {
- //load config module
- SCIM_DEBUG_FRONTEND(1) << "Loading Config module: " << config_module_name << "...\n";
- _config_module = new ConfigModule (config_module_name);
-
- //create config instance
- if (_config_module != NULL && _config_module->valid ())
- _config = _config_module->create_config ();
+ _config = ConfigBase::get (true, config_module_name);
}
if (_config.null ()) {
- SCIM_DEBUG_FRONTEND(1) << "Config module cannot be loaded, using dummy Config.\n";
-
- if (_config_module) delete _config_module;
- _config_module = NULL;
-
+ SECURE_LOGD ("Config module cannot be loaded, using dummy Config. pid : %d\n", getpid ());
_config = new DummyConfig ();
config_module_name = "dummy";
}
reload_config_callback (_config);
- _config->signal_connect_reload (slot (reload_config_callback));
+ _config_connection = _config->signal_connect_reload (slot (reload_config_callback));
// create backend
_backend = new CommonBackEnd (_config, load_engine_list.size () > 0 ? load_engine_list : engine_list);
SCIM_DEBUG_FRONTEND(2) << " Releasing Config...\n";
_config.reset ();
-
- if (_config_module) {
- SCIM_DEBUG_FRONTEND(2) << " Deleting _config_module...\n";
- delete _config_module;
- _config_module = 0;
- }
-
+ _config_connection.disconnect ();
+ ConfigBase::set (0);
_focused_ic = NULL;
_ic_list = NULL;
static String _mdl_name;
static SetupModule *_mdl = NULL;
-static Ecore_IMF_Context *_imf_context = NULL;
static Eina_Bool _auto_capitalisation = EINA_FALSE;
static Eina_Bool _auto_full_stop = EINA_FALSE;
ConfigPointer isf_imf_context_get_config (void);
static void load_config_module (void)
{
- _config = isf_imf_context_get_config ();
+ _config = ConfigBase::get (true, "socket");
if (_config.null ()) {
std::cerr << "Create dummy config!!!\n";
_config = new DummyConfig ();
if (parent == NULL)
return NULL;
- if (_imf_context == NULL) {
- const char *ctx_id = ecore_imf_context_default_id_get ();
- if (ctx_id) {
- _imf_context = ecore_imf_context_add (ctx_id);
- }
- }
-
load_config_module ();
load_config_data (_config);
scim_get_setup_module_list (_setup_modules);
if (ug == NULL || priv == NULL)
return;
- if (_imf_context != NULL) {
- ecore_imf_context_del (_imf_context);
- _imf_context = NULL;
- }
-
struct ug_data *ugd = (struct ug_data *) priv;
if (ugd->naviframe != NULL) {
_config->flush ();
_config.reset ();
}
+ ConfigBase::set (0);
for (int i = 0; i < ITEM_TOTAL_COUNT; i++) {
if (_p_items[i] != NULL) {
if (vconf_set_bool (VCONFKEY_AUTOPERIOD_ALLOW_BOOL, false) == -1)
return -1;
- if (_imf_context == NULL) {
- const char *ctx_id = ecore_imf_context_default_id_get ();
- if (ctx_id) {
- _imf_context = ecore_imf_context_add (ctx_id);
- }
- }
-
load_config_module ();
isf_load_ise_information (ALL_ISE, _config);
helper_ise_reload_config ();
- if (_imf_context != NULL) {
- ecore_imf_context_del (_imf_context);
- _imf_context = NULL;
- }
return 0;
}
return -1;
}
- ConfigModule config_module (config);
-
- ConfigPointer config_pointer;
-
- if (config_module.valid ()) {
- config_pointer = config_module.create_config ();
- }
+ ConfigPointer config_pointer = ConfigBase::get (true, config);
if (config_pointer.null ()) {
config_pointer = new DummyConfig ();
if (!config_pointer.null ())
config_pointer.reset ();
-
+ ConfigBase::set (0);
snprintf (buf, sizeof (buf), "time:%ld pid:%d %s %s Helper ISE (%s) is destroyed!!!\n",
time (0), getpid (), __FILE__, __func__, uuid.c_str ());
isf_save_log (buf);