summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Lima (Etrunko) <eduardo.lima@intel.com>2013-10-03 11:58:15 -0300
committerEduardo Lima (Etrunko) <eduardo.lima@intel.com>2013-10-03 11:58:15 -0300
commitea80b4367ddc439d77b53aa9383c5cdf57eec4b8 (patch)
treeb31aa4bc3cbc77415e864b9a13ea81e299de2c20
parent9c744b620236b394f1cf9bd092f98a5c015b9579 (diff)
downloadweekeyboard-ea80b4367ddc439d77b53aa9383c5cdf57eec4b8.tar.gz
weekeyboard-ea80b4367ddc439d77b53aa9383c5cdf57eec4b8.tar.bz2
weekeyboard-ea80b4367ddc439d77b53aa9383c5cdf57eec4b8.zip
Receive path as parameter in config_register
Change-Id: Ibcf24447cff3cc560b75cf11bc3148c452779f2d Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
-rw-r--r--src/wkb-ibus-config.c5
-rw-r--r--src/wkb-ibus.c6
-rw-r--r--src/wkb-ibus.h2
3 files changed, 6 insertions, 7 deletions
diff --git a/src/wkb-ibus-config.c b/src/wkb-ibus-config.c
index 96cdf56..ccfc14b 100644
--- a/src/wkb-ibus-config.c
+++ b/src/wkb-ibus-config.c
@@ -185,10 +185,9 @@ static const Eldbus_Service_Interface_Desc _wkb_ibus_config_interface =
};
Eldbus_Service_Interface *
-wkb_ibus_config_register(Eldbus_Connection *conn)
+wkb_ibus_config_register(Eldbus_Connection *conn, const char *path)
{
Eldbus_Service_Interface *ret = NULL;
- const char *path;
if (_conf_eet)
{
@@ -202,9 +201,7 @@ wkb_ibus_config_register(Eldbus_Connection *conn)
goto end;
}
- path = eina_stringshare_printf("%s/wkb-ibus-cfg.eet", efreet_config_home_get());
_conf_eet = wkb_ibus_config_eet_new(path, ret);
- eina_stringshare_del(path);
if (!_conf_eet)
{
diff --git a/src/wkb-ibus.c b/src/wkb-ibus.c
index b2b299b..eee552b 100644
--- a/src/wkb-ibus.c
+++ b/src/wkb-ibus.c
@@ -82,7 +82,7 @@ _wkb_name_owner_changed_cb(void *data, const char *bus, const char *old_id, cons
static void
_wkb_name_acquired_cb(void *data, const Eldbus_Message *msg)
{
- const char *name;
+ const char *name, *path;
_check_message_errors(msg);
@@ -101,7 +101,9 @@ _wkb_name_acquired_cb(void *data, const Eldbus_Message *msg)
}
else if (strncmp(name, IBUS_INTERFACE_CONFIG, strlen(IBUS_INTERFACE_CONFIG)) == 0)
{
- ctx->config = wkb_ibus_config_register(ctx->conn);
+ path = eina_stringshare_printf("%s/wkb-ibus-cfg.eet", efreet_config_home_get());
+ ctx->config = wkb_ibus_config_register(ctx->conn, path);
+ eina_stringshare_del(path);
INF("Registering Config Interface: %s", ctx->config ? "Success" : "Fail");
}
else
diff --git a/src/wkb-ibus.h b/src/wkb-ibus.h
index 8d04acf..1d92eef 100644
--- a/src/wkb-ibus.h
+++ b/src/wkb-ibus.h
@@ -36,7 +36,7 @@ Eina_Bool wkb_ibus_is_connected(void);
Eldbus_Service_Interface * wkb_ibus_panel_register(Eldbus_Connection *conn);
/* Config */
-Eldbus_Service_Interface * wkb_ibus_config_register(Eldbus_Connection *conn);
+Eldbus_Service_Interface * wkb_ibus_config_register(Eldbus_Connection *conn, const char *path);
void wkb_ibus_config_unregister(void);
#ifdef __cplusplus