static void mouseup_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Evas_Event_Mouse_Up *ev = event_info;
- if (ev->button == 3) {
+ if (ev->button == 3)
evas_object_del(obj);
- }
}
/*static void keydown_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
ad->popup_timeout_handle = 0;
}
- if (ad->win) {
+ if (ad->win)
evas_object_hide(ad->win);
- }
if (pb_timer) {
ecore_timer_del(pb_timer);
ad->popup = NULL;
}
- if (ad->win) {
+ if (ad->win)
evas_object_hide(ad->win);
- }
__WFD_APP_FUNC_EXIT__;
}
/* show the time label */
if (step < 60) {
- if (step < 10) {
+ if (step < 10)
snprintf(time_label, 32, "00:0%d", step);
- } else {
+ else
snprintf(time_label, 32, "00:%d", step);
- }
} else {
- if (step%60 < 10) {
+ if (step%60 < 10)
snprintf(time_label, 32, "0%d:0%d", step/60, step%60);
- } else {
+ else
snprintf(time_label, 32, "0%d:%d", step/60, step%60);
- }
}
char *remaining_time_str = g_strdup_printf(
return ECORE_CALLBACK_CANCEL;
}
- keypad_popup_timeout --;
+ keypad_popup_timeout--;
if (keypad_popup_timeout > 0) {
_replace_1PS_2PD((char *)msg1, sizeof(msg1),
(void *) (intptr_t) pop->resp_data2);
}
- if (pop->resp_data1 == WFD_POP_RESP_APRV_CONNECT_KEYPAD_YES || pop->resp_data1 == WFD_POP_RESP_APRV_CONNECT_PBC_YES ) {
+ if (pop->resp_data1 == WFD_POP_RESP_APRV_CONNECT_KEYPAD_YES || pop->resp_data1 == WFD_POP_RESP_APRV_CONNECT_PBC_YES) {
Evas_Object *btn1 = NULL;
btn1 = elm_button_add(popup);
elm_object_style_set(btn1, "popup");
Ecore_IMF_Context *imf_context;
imf_context = (Ecore_IMF_Context*)elm_entry_imf_context_get(entry);
- if (imf_context) {
+ if (imf_context)
ecore_imf_context_input_panel_hide(imf_context);
- }
elm_object_focus_set(entry, EINA_FALSE);
}
const char *part)
{
__WFD_APP_FUNC_ENTER__;
- if (obj == NULL || part == NULL) {
+ if (obj == NULL || part == NULL)
return NULL;
- }
+
WFD_APP_LOG(WFD_APP_LOG_LOW, "wfd_rename desc\n");
char buf[WFD_POP_STR_MAX_LEN] = {0, };
char msg1[WFD_POP_STR_MAX_LEN] = {0, };
WFD_RETV_IF(connection == NULL, NULL, "Incorrect parameter(NULL)\n");
if (!strcmp("elm.text.multiline", part)) {
- if (keypad_popup_timeout > 0) {
+ if (keypad_popup_timeout > 0)
ad->timeout = keypad_popup_timeout;
- }
+
_replace_1PS_2PD((char *)msg1, WFD_POP_STR_MAX_LEN,
D_("IDS_ST_BODY_CONNECT_WITH_PS_IN_PD_SECS_ABB"),
connection->peer_name, ad->timeout);
const char *part)
{
__WFD_APP_FUNC_ENTER__;
- if (obj == NULL || part == NULL) {
+ if (obj == NULL || part == NULL)
return NULL;
- }
+
wfd_appdata_t *ad = wfd_get_appdata();
WFD_RETV_IF(ad == NULL, NULL, "Incorrect parameter(NULL)\n");
Evas_Object *entry = NULL;
elm_entry_prediction_allow_set(entry, EINA_FALSE);
elm_entry_markup_filter_append(entry,
- elm_entry_filter_accept_set,&accept_set);
+ elm_entry_filter_accept_set, &accept_set);
elm_entry_input_panel_layout_set(entry,
ELM_INPUT_PANEL_LAYOUT_DATETIME);
elm_object_signal_emit(entry, "elm,action,hide,search_icon", "");
elm_object_domain_translatable_part_text_set(entry, "elm.guide",
PACKAGE, D_("IDS_WIFI_POP_PIN"));
- elm_entry_input_panel_return_key_autoenabled_set(entry,EINA_TRUE);
+ elm_entry_input_panel_return_key_autoenabled_set(entry, EINA_TRUE);
elm_entry_input_panel_return_key_type_set(entry,
ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
evas_object_smart_callback_add(button, "clicked",
__popup_eraser_clicked_cb, entry);
- elm_object_signal_emit (entry, "elm,action,hide,search_icon", "");
+ elm_object_signal_emit(entry, "elm,action,hide,search_icon", "");
evas_object_smart_callback_add(entry, "changed",
_entry_changed_cb, NULL);
evas_object_smart_callback_add(entry, "preedit,changed",
evas_object_event_callback_add(entry, EVAS_CALLBACK_KEY_DOWN,
_entry_keydown_cb, ad);
- elm_object_content_set(obj,entry);
+ elm_object_content_set(obj, entry);
evas_object_show(entry);
evas_object_smart_callback_add(entry, "changed", _smart_ime_cb, NULL);
elm_object_focus_set(entry, EINA_TRUE);
static void _chk_changed_cb(void *data, Evas_Object *obj, void *ei)
{
__WFD_APP_FUNC_ENTER__;
- if (obj == NULL || data == NULL) {
+ if (obj == NULL || data == NULL)
return;
- }
+
Eina_Bool state = elm_check_state_get(obj);
- if (state) {
+ if (state)
elm_entry_password_set((Evas_Object *)data, EINA_FALSE);
- } else {
+ else
elm_entry_password_set((Evas_Object *)data, EINA_TRUE);
- }
+
__WFD_APP_FUNC_EXIT__;
}
__WFD_APP_FUNC_ENTER__;
Elm_Object_Item *item = NULL;
item = (Elm_Object_Item *)ei;
- if (item == NULL) {
+ if (item == NULL)
return;
- }
+
wfd_appdata_t *ad = wfd_get_appdata();
if (ad == NULL) {
WFD_APP_LOG(WFD_APP_LOG_LOW, "Incorrect parameter(NULL)\n");
elm_genlist_item_selected_set(item, EINA_FALSE);
Eina_Bool state = elm_check_state_get(ck);
elm_check_state_set(ck, !state);
- if (ad) {
+ if (ad)
_chk_changed_cb(ad->pin_entry, ck, NULL);
- }
+
__WFD_APP_FUNC_EXIT__;
}
{
__WFD_APP_FUNC_ENTER__;
- if (data == NULL || part == NULL) {
+ if (data == NULL || part == NULL)
return NULL;
- }
+
WFD_APP_LOG(WFD_APP_LOG_LOW, "Part %s", part);
if (!strcmp("elm.text", part)) {
const char *part)
{
__WFD_APP_FUNC_ENTER__;
- if (obj == NULL || part == NULL) {
+ if (obj == NULL || part == NULL)
return NULL;
- }
+
wfd_appdata_t *ad = wfd_get_appdata();
WFD_RETV_IF(ad == NULL, NULL, "Incorrect parameter(NULL)\n");
Evas_Object *check = NULL;
/* Entry genlist item */
ad->pin_desc_itc = elm_genlist_item_class_new();
- if(ad->pin_desc_itc != NULL) {
+ if (ad->pin_desc_itc != NULL) {
ad->pin_desc_itc->item_style = WFD_GENLIST_MULTILINE_TEXT_STYLE;
ad->pin_desc_itc->func.text_get = __wfd_main_desc_label_get;
ad->pin_desc_itc->func.content_get = NULL;
git = elm_genlist_item_append(genlist, ad->pin_desc_itc, ad, NULL,
ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if(git != NULL)
+ if (git != NULL)
elm_genlist_item_select_mode_set(git,
ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
}
ad->pin_entry_itc = elm_genlist_item_class_new();
- if(ad->pin_entry_itc != NULL) {
+ if (ad->pin_entry_itc != NULL) {
ad->pin_entry_itc->item_style = "entry";
ad->pin_entry_itc->func.text_get = NULL;
ad->pin_entry_itc->func.content_get = __wfd_pin_entry_icon_get;
}
ad->paswd_itc = elm_genlist_item_class_new();
- if(ad->paswd_itc != NULL) {
+ if (ad->paswd_itc != NULL) {
ad->paswd_itc->item_style = WFD_GENLIST_1LINE_TEXT_ICON_STYLE;
ad->paswd_itc->func.text_get = __wfd_password_label;
ad->paswd_itc->func.content_get = __wfd_password_check;
ad->paswd_itc->func.del = NULL;
elm_genlist_item_append(genlist, ad->paswd_itc, pinpopup,
- NULL, ELM_GENLIST_ITEM_NONE, _gl_pswd_check_box_sel, (void *)ad );
+ NULL, ELM_GENLIST_ITEM_NONE, _gl_pswd_check_box_sel, (void *)ad);
}
btn1 = elm_button_add(pinpopup);
buf = g_strdup(haystack);
p = strstr(buf, niddle);
- if (p==NULL) {
+ if (p == NULL) {
free(buf);
return;
}
pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
ad->popup = wfd_draw_pop_type_display(ad->win, pop);
- break;
+ break;
case /* MT */ WFD_POP_APRV_CONNECTION_WPS_DISPLAY_REQ:
format_str = D_("IDS_WIFI_BODY_PS_IS_REQUESTING_A_WI_FI_DIRECT_CONNECTION_ALLOW_Q");
pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
ad->popup = wfd_draw_pop_type_c(ad->win, pop);
- break;
+ break;
case /* MT */ WFD_POP_APRV_CONNECTION_WPS_KEYPAD_REQ:
_replace_1PS_2PD((char *)pop->text, sizeof(pop->text),
pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
ad->popup = wfd_draw_pop_type_display(ad->win, pop);
- break;
+ break;
case /* MT */ WFD_POP_PROG_CONNECT:
snprintf(pop->text, sizeof(pop->text), "%s", D_("IDS_WIFI_BODY_CONNECTING_ING"));
pop->resp_data1 = WFD_POP_RESP_APRV_CONNECT_NO;
ad->popup = wfd_draw_pop_type_b(ad->win, pop);
- break;
+ break;
case /* MO */ WFD_POP_PROG_CONNECT_WITH_KEYPAD:
_replace_1PS_2PD((char *)text, sizeof(text),
pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
ad->popup = wfd_draw_pop_type_keypad(ad->win, pop);
- break;
+ break;
case /* MO/MT */ WFD_POP_PROG_CONNECT_WITH_PIN:
_replace_1PS_2PD((char *)text, sizeof(text),
pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
ad->popup = wfd_draw_pop_type_display(ad->win, pop);
- break;
+ break;
case WFD_POP_PROG_CONNECT_CANCEL:
snprintf(pop->text, sizeof(pop->text), "%s", D_("IDS_BR_SK_CANCEL"));
pop->timeout = WFD_POP_TIMER_120;
ad->popup = wfd_draw_pop_type_a(ad->win, pop);
- break;
+ break;
default:
break;
/* feedback play */
int ret = -1;
ret = feedback_play(FEEDBACK_PATTERN_GENERAL);
- if (ret != FEEDBACK_ERROR_NONE) {
- WFD_APP_LOG(WFD_APP_LOG_ERROR,"feedback_play error : %d\n", ret);
- }
+ if (ret != FEEDBACK_ERROR_NONE)
+ WFD_APP_LOG(WFD_APP_LOG_ERROR, "feedback_play error : %d\n", ret);
+
WFD_IF_FREE_MEM(peer_name);
__WFD_APP_FUNC_EXIT__;
return;