diff options
-rw-r--r-- | src/modules/home/search.c | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/src/modules/home/search.c b/src/modules/home/search.c index 7f79fbb..ceb2f75 100644 --- a/src/modules/home/search.c +++ b/src/modules/home/search.c @@ -41,14 +41,14 @@ static int unregister_search_module(void); #ifdef _SUPPORT_SCREEN_READER static int register_search_tts(void *data); #endif -#define EXPORT_PUBLIC __attribute__ ((visibility ("default"))) +#define EXPORT_PUBLIC __attribute__ ((visibility("default"))) icon_s search = { .type = INDICATOR_IMG_ICON, .name = MODULE_NAME, .priority = ICON_PRIORITY, .always_top = EINA_FALSE, - .img_obj = {0,0,FIXED4_ICON_WIDTH,FIXED4_ICON_HEIGHT}, + .img_obj = {0, 0, FIXED4_ICON_WIDTH, FIXED4_ICON_HEIGHT}, .obj_exist = EINA_FALSE, .area = INDICATOR_ICON_AREA_FIXED, .exist_in_view = EINA_FALSE, @@ -67,7 +67,7 @@ static const char *icon_path[] = { -static void set_app_state(void* data) +static void set_app_state(void *data) { search.ad = data; } @@ -101,38 +101,33 @@ EXPORT_PUBLIC void show_search_icon(void) show_image_icon(0); } -static void _handle_search_icon(void* data) + + +static void _handle_search_icon(void *data) { int lock_status = -1; int bHide = 0; int ret = -1; struct appdata *ad = (struct appdata *)data; - retif(data == NULL, , "Invalid parameter!"); + retm_if(data == NULL, "Invalid parameter!"); ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_LOCK_STATE, &lock_status); retm_if(ret != SYSTEM_SETTINGS_ERROR_NONE, "Cannot get LOCK_STATE status"); - _D("_indicator_lock_status_cb!!(%d)",lock_status); + _D("_indicator_lock_status_cb!!(%d)", lock_status); - if(lock_status == SYSTEM_SETTINGS_LOCK_STATE_LOCK) - { + if (lock_status == SYSTEM_SETTINGS_LOCK_STATE_LOCK) bHide = 1; - } else - { bHide = 0; - } - if (bHide==0) - { - DBG("_lock_status_cb : show search!"); + if (bHide == 0) { + _D("_lock_status_cb : show search!"); show_image_icon(0); - util_signal_emit_by_win(&(ad->win),"indicator.lock.off", "indicator.prog"); - } - else - { - DBG("_lock_status_cb : hide search"); + util_signal_emit_by_win(&(ad->win), "indicator.lock.off", "indicator.prog"); + } else { + _D("_lock_status_cb : hide search"); util_signal_emit_by_win(&(ad->win), "indicator.lock.on", "indicator.prog"); hide_image_icon(); } @@ -142,7 +137,7 @@ static void _handle_search_icon(void* data) static void _lock_status_cb(system_settings_key_e key, void *data) { - DBG("lock state change"); + _D("lock state change"); _handle_search_icon(data); } @@ -189,7 +184,8 @@ static char *_access_info_cb(void *data, Evas_Object *obj) Evas_Object *item = data; char *tmp = NULL; char buf[256] = {0,}; - snprintf(buf, sizeof(buf), "%s, %s, %s", _("IDS_IDLE_SK_SMARTSEARCH_SEARCH"),_("IDS_COM_BODY_BUTTON_T_TTS"), _("IDS_IDLE_BODY_STATUS_BAR_ITEM")); + snprintf(buf, sizeof(buf), "%s, %s, %s", _("IDS_IDLE_SK_SMARTSEARCH_SEARCH"), + _("IDS_COM_BODY_BUTTON_T_TTS"), _("IDS_IDLE_BODY_STATUS_BAR_ITEM")); tmp = strdup(buf); if (!tmp) return NULL; @@ -211,8 +207,8 @@ static int register_search_tts(void *data) to = (Evas_Object *) edje_object_part_object_get(elm_layout_edje_get(ad->win.layout), "elm.swallow.fixed6.access"); ao = util_access_object_register(to, ad->win.layout); - util_access_object_info_cb_set(ao,ELM_ACCESS_INFO,_access_info_cb,data); - util_access_object_activate_cb_set(ao,_apptray_access_cb,data); + util_access_object_info_cb_set(ao, ELM_ACCESS_INFO, _access_info_cb, data); + util_access_object_activate_cb_set(ao, _apptray_access_cb, data); return OK; } |