Tizen directory path migration
[apps/native/ug-wifi-direct.git] / popup-wifidirect / src / wfd-app-popup-view.c
index 6a007af..f25f2a0 100755 (executable)
 #include <glib.h>
 
 #include <Elementary.h>
-#include <efl-assist/efl_assist.h>
 #include <vconf.h>
-#if defined(X)
-#include <X11/Xatom.h>
-#include <X11/Xutil.h>
-#include <Ecore_X.h>
-#include <utilX.h>
-#endif
 #include <notification.h>
 #include <feedback.h>
-#include <wifi-direct.h>
 #include <efl_extension.h>
 
 #include "wfd-app.h"
@@ -72,30 +64,6 @@ static void mouseup_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
                evas_object_del(obj);
        }
 }*/
-static Eina_Bool __rotate(void *data, int type, void *event)
-{
-       __WFD_APP_FUNC_ENTER__;
-       wfd_appdata_t *ad = (wfd_appdata_t *)data;
-#if defined(X)
-       Ecore_X_Event_Client_Message *ev = event;
-#endif
-       int rots[4] = {0, 90, 180, 270};
-
-       if (ad == NULL || ad->win == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Parameter NULL");
-               return EINA_FALSE;
-       }
-
-#if defined(X)
-       if (ev->message_type == ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE) {
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "ev->message_type: [%d]\n", ev->message_type);
-               elm_win_wm_rotation_available_rotations_set(ad->win, rots, 1);
-       }
-#endif
-
-       __WFD_APP_FUNC_EXIT__;
-       return EINA_FALSE;
-}
 
 /**
  *     This function let the ug make a callback for click the button in popup
@@ -115,11 +83,6 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
 
        WFD_APP_LOG(WFD_APP_LOG_HIGH, "popup resp : %d\n", resp);
 
-       if (ad->rotate_event_handler) {
-               ecore_event_handler_del(ad->rotate_event_handler);
-               ad->rotate_event_handler = NULL;
-       }
-
        switch (resp) {
        case /* MT */ WFD_POP_RESP_APRV_CONNECT_PBC_YES:
        {
@@ -133,7 +96,7 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
                        evas_object_hide(ad->win);
 
                        /* tickernoti popup */
-                       snprintf(msg, WFD_POP_STR_MAX_LEN, _("IDS_WIFI_POP_FAILED_TO_CONNECT_TO_PS"),
+                       snprintf(msg, WFD_POP_STR_MAX_LEN, D_("IDS_WIFI_POP_FAILED_TO_CONNECT_TO_PS"),
                                                        connection->peer_name);
                        notification_status_message_post(msg);
                }
@@ -154,7 +117,7 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
                        WFD_APP_LOG(WFD_APP_LOG_LOW,
                                "wifi_direct_accept_connection() failed. result=[%d]\n", result);
                        /* tickernoti popup */
-                       notification_status_message_post(_("IDS_WIFI_POP_FAILED_TO_CONNECT_TO_PS"));
+                       notification_status_message_post(D_("IDS_WIFI_POP_FAILED_TO_CONNECT_TO_PS"));
                }
        }
        break;
@@ -174,7 +137,7 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
                        WFD_APP_LOG(WFD_APP_LOG_ERROR, "Error, Incorrect PIN!!\n");
                        keypad_popup_timeout--;
                        /* tickernoti popup */
-                       notification_status_message_post(_("IDS_COM_BODY_PINS_DO_NOT_MATCH"));
+                       notification_status_message_post(D_("IDS_COM_BODY_PINS_DO_NOT_MATCH"));
 
                        /* redraw the popup */
                        wfd_prepare_popup(WFD_POP_PROG_CONNECT_WITH_KEYPAD, (void *) NULL);
@@ -185,7 +148,7 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
                result = wifi_direct_set_wps_pin(connection->wps_pin);
                if (result != WIFI_DIRECT_ERROR_NONE) {
                        /* tickernoti popup */
-                       snprintf(msg, WFD_POP_STR_MAX_LEN, _("IDS_WIFI_POP_FAILED_TO_CONNECT_TO_PS"),
+                       snprintf(msg, WFD_POP_STR_MAX_LEN, D_("IDS_WIFI_POP_FAILED_TO_CONNECT_TO_PS"),
                                                        connection->peer_name);
                        notification_status_message_post(msg);
                        return;
@@ -197,7 +160,7 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info)
                        evas_object_hide(ad->win);
 
                        /* tickernoti popup */
-                       snprintf(msg, WFD_POP_STR_MAX_LEN, _("IDS_WIFI_POP_FAILED_TO_CONNECT_TO_PS"),
+                       snprintf(msg, WFD_POP_STR_MAX_LEN, D_("IDS_WIFI_POP_FAILED_TO_CONNECT_TO_PS"),
                                                        connection->peer_name);
                        notification_status_message_post(msg);
                }
@@ -294,114 +257,7 @@ void wfd_destroy_popup()
        __WFD_APP_FUNC_EXIT__;
        return;
 }
-#if defined(X)
-static int __get_window_property(Display *dpy, Window win, Atom atom,
-               Atom type, unsigned int *val, unsigned int len)
-{
-       __WFD_APP_FUNC_ENTER__;
-       unsigned char *prop_ret = NULL;
-       Atom type_ret = -1;
-       unsigned long bytes_after = 0;
-       unsigned long  num_ret = -1;
-       int format_ret = -1;
-       unsigned int i = 0;
-       int num = 0;
-
-       prop_ret = NULL;
-       if (XGetWindowProperty(dpy, win, atom, 0, 0x7fffffff, False,
-                               type, &type_ret, &format_ret, &num_ret,
-                               &bytes_after, &prop_ret) != Success) {
-               return -1;
-       }
-
-       if (type_ret != type || format_ret != 32) {
-               num = -1;
-       } else if (num_ret == 0 || !prop_ret) {
-               num = 0;
-       } else {
-               if (num_ret < len) {
-                       len = num_ret;
-               }
-               for (i = 0; i < len; i++) {
-                       val[i] = ((unsigned long *)prop_ret)[i];
-               }
-               num = len;
-       }
-
-       if (prop_ret) {
-               XFree(prop_ret);
-       }
-
-       __WFD_APP_FUNC_EXIT__;
-       return num;
-}
-
-static int __x_rotation_get(Display *dpy, void* win)
-{
-       __WFD_APP_FUNC_ENTER__;
-       Window active_win = 0;
-       Window root_win = 0;
-       int rotation = -1;
-       int ret = -1;
-
-       Atom atom_active_win;
-       Atom atom_win_rotate_angle;
-
-       root_win = XDefaultRootWindow(dpy);
-
-       atom_active_win = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
-       ret = __get_window_property(dpy, root_win, atom_active_win,
-                       XA_WINDOW, (unsigned int *)&active_win, 1);
-
-       if (ret != 1) {
-               return 0;
-       }
-
-       atom_win_rotate_angle =
-               XInternAtom(dpy, "_E_ILLUME_ROTATE_WINDOW_ANGLE", False);
-       ret = __get_window_property(dpy, active_win     ,
-                       atom_win_rotate_angle, XA_CARDINAL,
-                       (unsigned int *)&rotation, 1);
-
-       __WFD_APP_FUNC_EXIT__;
 
-       if (ret == 1) {
-               return rotation;
-       } else {
-               return 0;
-       }
-}
-void __set_parent_rotate_angle(wfd_appdata_t *ad)
-{
-       __WFD_APP_FUNC_ENTER__;
-
-       int rotate_angle = 0;
-       int rots1[1] = {0};
-       int rots2[4] = {0, 90, 180, 270};
-
-       if (ad == NULL || ad->win == NULL) {
-               WFD_APP_LOG(WFD_APP_LOG_ERROR, "Parameter NULL");
-               return;
-       }
-
-       rotate_angle = __x_rotation_get(ecore_x_display_get(), NULL);
-
-       WFD_APP_LOG(WFD_APP_LOG_LOW, "rotate_angle: [%d]\n", rotate_angle);
-
-       if (rotate_angle < 0) {
-               rotate_angle = 0;
-       }
-
-       if (rotate_angle == 0) {
-               elm_win_wm_rotation_available_rotations_set(ad->win, rots1, 1);
-       } else {
-               elm_win_wm_rotation_available_rotations_set(ad->win, rots2, 1);
-       }
-
-       __WFD_APP_FUNC_EXIT__;
-       return;
-}
-#endif
 /**
  *     This function let the app create a popup which includes no button
  *     @return   popup
@@ -417,20 +273,15 @@ static Evas_Object *wfd_draw_pop_type_a(Evas_Object * win, wfd_popup_t * pop)
 
        popup = elm_popup_add(win);
        elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
-       eext_object_event_callback_add(popup, EA_CALLBACK_BACK, __popup_resp_cb, NULL);
+       eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, __popup_resp_cb, NULL);
        evas_object_event_callback_add(popup, EVAS_CALLBACK_MOUSE_UP, mouseup_cb, ad);
 //     evas_object_event_callback_add(popup, EVAS_CALLBACK_KEY_DOWN, keydown_cb, ad);
        evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        elm_object_domain_translatable_text_set(popup, PACKAGE, pop->text);
        elm_popup_timeout_set(popup, pop->timeout);
-#if defined(X)
-       __set_parent_rotate_angle(ad);
-#endif
+
        evas_object_show(popup);
        evas_object_show(win);
-#if defined(X)
-       ad->rotate_event_handler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, __rotate, ad);
-#endif
 
        __WFD_APP_FUNC_EXIT__;
        return popup;
@@ -451,7 +302,7 @@ static Evas_Object *wfd_draw_pop_type_b(Evas_Object * win, wfd_popup_t * pop)
 
        popup = elm_popup_add(win);
        elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
-       eext_object_event_callback_add(popup, EA_CALLBACK_BACK, __popup_resp_cb, (void *) pop->resp_data1);
+       eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, __popup_resp_cb, (void *) pop->resp_data1);
        evas_object_event_callback_add(popup, EVAS_CALLBACK_MOUSE_UP, mouseup_cb, ad);
 //     evas_object_event_callback_add(popup, EVAS_CALLBACK_KEY_DOWN, keydown_cb, ad);
        evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -463,14 +314,8 @@ static Evas_Object *wfd_draw_pop_type_b(Evas_Object * win, wfd_popup_t * pop)
        elm_object_part_content_set(popup, "button1", btn);
        evas_object_smart_callback_add(btn, "clicked", __popup_resp_cb, (void *) pop->resp_data1);
 
-#if defined(X)
-       __set_parent_rotate_angle(ad);
-#endif
        evas_object_show(popup);
        evas_object_show(win);
-#if defined(X)
-       ad->rotate_event_handler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, __rotate, ad);
-#endif
 
        __WFD_APP_FUNC_EXIT__;
        return popup;
@@ -491,12 +336,12 @@ static Evas_Object *wfd_draw_pop_type_c(Evas_Object * win, wfd_popup_t * pop)
 
        popup = elm_popup_add(win);
        elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
-       eext_object_event_callback_add(popup, EA_CALLBACK_BACK, __popup_resp_cb, (void *) pop->resp_data2);
+       eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, __popup_resp_cb, (void *) pop->resp_data2);
        evas_object_event_callback_add(popup, EVAS_CALLBACK_MOUSE_UP, mouseup_cb, ad);
 //     evas_object_event_callback_add(popup, EVAS_CALLBACK_KEY_DOWN, keydown_cb, ad);
        evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        elm_object_domain_translatable_part_text_set(popup, "title,text",
-                       PACKAGE, _("IDS_WIFI_HEADER_WI_FI_DIRECT_CONNECTION_ABB"));
+                       PACKAGE, D_("IDS_WIFI_HEADER_WI_FI_DIRECT_CONNECTION_ABB"));
        elm_object_domain_translatable_text_set(popup, PACKAGE, pop->text);
 
        btn1 = elm_button_add(popup);
@@ -513,14 +358,8 @@ static Evas_Object *wfd_draw_pop_type_c(Evas_Object * win, wfd_popup_t * pop)
        evas_object_smart_callback_add(btn2, "clicked", __popup_resp_cb,
                (void *) pop->resp_data1);
 
-#if defined(X)
-       __set_parent_rotate_angle(ad);
-#endif
        evas_object_show(popup);
        evas_object_show(win);
-#if defined(X)
-       ad->rotate_event_handler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, __rotate, ad);
-#endif
 
        __WFD_APP_FUNC_EXIT__;
        return popup;
@@ -536,11 +375,6 @@ static void _wfd_ug_automatic_turn_off_popup_cb(void *data, Evas_Object *obj, vo
                ad->popup = NULL;
        }
 
-       if (ad->rotate_event_handler) {
-               ecore_event_handler_del(ad->rotate_event_handler);
-               ad->rotate_event_handler = NULL;
-       }
-
        if (ad->win) {
                evas_object_hide(ad->win);
        }
@@ -559,7 +393,7 @@ Evas_Object *wfd_draw_pop_type_auto_deactivation(Evas_Object *win,  void *userda
 
        popup = elm_popup_add(win);
        elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
-       eext_object_event_callback_add(popup, EA_CALLBACK_BACK, _wfd_ug_automatic_turn_off_popup_cb, userdata);
+       eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, _wfd_ug_automatic_turn_off_popup_cb, userdata);
        evas_object_event_callback_add(popup, EVAS_CALLBACK_MOUSE_UP, mouseup_cb, ad);
 //     evas_object_event_callback_add(popup, EVAS_CALLBACK_KEY_DOWN, keydown_cb, ad);
        evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -575,14 +409,8 @@ Evas_Object *wfd_draw_pop_type_auto_deactivation(Evas_Object *win,  void *userda
        elm_object_part_content_set(popup, "button1", btn);
        evas_object_smart_callback_add(btn, "clicked", _wfd_ug_automatic_turn_off_popup_cb, userdata);
 
-#if defined(X)
-       __set_parent_rotate_angle(ad);
-#endif
        evas_object_show(popup);
        evas_object_show(win);
-#if defined(X)
-       ad->rotate_event_handler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, __rotate, ad);
-#endif
 
        __WFD_APP_FUNC_EXIT__;
        return popup;
@@ -691,6 +519,7 @@ static Eina_Bool _keypad_popup_timer_cb(void *data)
 
        char msg1[WFD_POP_STR_MAX_LEN] = {0};
        char msg2[WFD_POP_STR_MAX_LEN] = {0};
+       char label_str[WFD_POP_STR_MAX_LEN] = {0, };
 
        Evas_Object *label = (Evas_Object*) data;
        wfd_appdata_t *ad = wfd_get_appdata();
@@ -706,14 +535,13 @@ static Eina_Bool _keypad_popup_timer_cb(void *data)
 
        if (keypad_popup_timeout > 0) {
                _replace_1PS_2PD((char *)msg1, sizeof(msg1),
-                               _("IDS_ST_BODY_CONNECT_WITH_PS_IN_PD_SECS_ABB"),
+                               D_("IDS_ST_BODY_CONNECT_WITH_PS_IN_PD_SECS_ABB"),
                                connection->peer_name, keypad_popup_timeout);
 
-               strcat(msg1, " ");
-               snprintf(msg2, sizeof(msg2), _("IDS_WIFI_POP_ENTER_PIN_TO_CONNECT_TO_PS"),
+               snprintf(msg2, sizeof(msg2), D_("IDS_WIFI_POP_ENTER_PIN_TO_CONNECT_TO_PS"),
                                                connection->peer_name);
-               strcat(msg1, msg2);
-               elm_object_domain_translatable_text_set(label, PACKAGE, msg1);
+               snprintf(label_str, sizeof(label_str), "%s %s", msg1, msg2);
+               elm_object_domain_translatable_text_set(label, PACKAGE, label_str);
 
        }
 
@@ -833,7 +661,7 @@ Evas_Object *wfd_draw_pop_type_display(Evas_Object * win, wfd_popup_t * pop)
 //     evas_object_event_callback_add(popup, EVAS_CALLBACK_KEY_DOWN, keydown_cb, ad);
        evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, 0.0);
        elm_object_domain_translatable_part_text_set(popup, "title,text",
-                        PACKAGE, _("IDS_WIFI_HEADER_WI_FI_DIRECT_CONNECTION_ABB"));
+                        PACKAGE, D_("IDS_WIFI_HEADER_WI_FI_DIRECT_CONNECTION_ABB"));
 
        layout = elm_layout_add(popup);
        if (layout == NULL) {
@@ -858,7 +686,7 @@ Evas_Object *wfd_draw_pop_type_display(Evas_Object * win, wfd_popup_t * pop)
        /* add time */
        time = elm_label_add(layout);
        elm_label_line_wrap_set(time, ELM_WRAP_MIXED);
-       elm_object_text_set(time, _("<font_size=40><align=center>00:00</align></font_size>"));
+       elm_object_text_set(time, D_("<font_size=40><align=center>00:00</align></font_size>"));
        evas_object_size_hint_weight_set(time, EVAS_HINT_EXPAND, 0.0);
        evas_object_size_hint_align_set(time, EVAS_HINT_FILL, EVAS_HINT_FILL);
        evas_object_show(time);
@@ -882,7 +710,7 @@ Evas_Object *wfd_draw_pop_type_display(Evas_Object * win, wfd_popup_t * pop)
                elm_object_part_content_set(popup, "button1", btn2);
                evas_object_smart_callback_add(btn2, "clicked", __popup_resp_cb,
                        (void *) pop->resp_data2);
-               eext_object_event_callback_add(popup, EA_CALLBACK_BACK, __popup_resp_cb, (void *) pop->resp_data2);
+               eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, __popup_resp_cb, (void *) pop->resp_data2);
        }
 
        if (pop->resp_data1 == WFD_POP_RESP_APRV_CONNECT_KEYPAD_YES || pop->resp_data1 == WFD_POP_RESP_APRV_CONNECT_PBC_YES ) {
@@ -893,18 +721,12 @@ Evas_Object *wfd_draw_pop_type_display(Evas_Object * win, wfd_popup_t * pop)
                elm_object_part_content_set(popup, "button2", btn1);
                evas_object_smart_callback_add(btn1, "clicked", __popup_resp_cb,
                        (void *) pop->resp_data1);
-               eext_object_event_callback_add(popup, EA_CALLBACK_BACK, __popup_resp_cb, (void *) pop->resp_data1);
+               eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, __popup_resp_cb, (void *) pop->resp_data1);
        }
 
        elm_object_content_set(popup, layout);
-#if defined(X)
-       __set_parent_rotate_angle(ad);
-#endif
        evas_object_show(popup);
        evas_object_show(win);
-#if defined(X)
-       ad->rotate_event_handler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, __rotate, ad);
-#endif
 
        __WFD_APP_FUNC_EXIT__;
        return popup;
@@ -979,6 +801,7 @@ static char *__wfd_main_desc_label_get(void *data, Evas_Object *obj,
                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, };
        char msg2[WFD_POP_STR_MAX_LEN] = {0, };
        wfd_appdata_t *ad = wfd_get_appdata();
@@ -986,22 +809,24 @@ static char *__wfd_main_desc_label_get(void *data, Evas_Object *obj,
        wfd_connection_info_s *connection = ad->connection;
        WFD_RETV_IF(connection == NULL, NULL, "Incorrect parameter(NULL)\n");
 
-       if (!g_strcmp0(part, "elm.text.multiline")) {
+       if (!strcmp("elm.text.multiline", part)) {
                if (keypad_popup_timeout > 0) {
                                ad->timeout = keypad_popup_timeout;
                }
-               _replace_1PS_2PD((char *)msg1, sizeof(msg1),
-                               _("IDS_ST_BODY_CONNECT_WITH_PS_IN_PD_SECS_ABB"),
+               _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);
 
-               strcat(msg1, " ");
-               snprintf(msg2, sizeof(msg2),
-                               _("IDS_WIFI_POP_ENTER_PIN_TO_CONNECT_TO_PS"),
+               snprintf(msg2, WFD_POP_STR_MAX_LEN,
+                               D_("IDS_WIFI_POP_ENTER_PIN_TO_CONNECT_TO_PS"),
                                connection->peer_name);
-               strcat(msg1, msg2);
-               WFD_APP_LOG(WFD_APP_LOG_LOW, "string %s", msg1);
+
+               WFD_APP_LOG(WFD_APP_LOG_LOW, "string %s %s", msg1, msg2);
+               snprintf(buf, WFD_POP_STR_MAX_LEN,
+                               "<font_size=30>%s %s</font_size>",
+                               msg1, msg2);
                __WFD_APP_FUNC_EXIT__;
-               return g_strdup(msg1);
+               return g_strdup(buf);
        }
        __WFD_APP_FUNC_EXIT__;
        return NULL;
@@ -1042,7 +867,7 @@ static Evas_Object *__wfd_pin_entry_icon_get(void *data, Evas_Object *obj,
                        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, _("IDS_WIFI_POP_PIN"));
+                        PACKAGE, D_("IDS_WIFI_POP_PIN"));
        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);
@@ -1126,7 +951,7 @@ static char *__wfd_password_label(void *data, Evas_Object *obj, const char *part
        }
        WFD_APP_LOG(WFD_APP_LOG_LOW, "Part %s", part);
 
-       if (!g_strcmp0(part, "elm.text.main.right")) {
+       if (!strcmp("elm.text", part)) {
                __WFD_APP_FUNC_EXIT__;
                return g_strdup(" Show password");
        }
@@ -1147,7 +972,7 @@ static Evas_Object *__wfd_password_check(void *data, Evas_Object *obj,
 
        WFD_APP_LOG(WFD_APP_LOG_LOW, "Part %s", part);
 
-       if (!g_strcmp0(part, "elm.icon.left")) {
+       if (!strcmp("elm.swallow.icon", part)) {
                check = elm_check_add(obj);
                evas_object_propagate_events_set(check, EINA_FALSE);
                evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -1187,11 +1012,11 @@ Evas_Object *wfd_draw_pop_type_keypad(Evas_Object * win, wfd_popup_t * pop)
 
        pinpopup = elm_popup_add(ad->layout);
        elm_popup_align_set(pinpopup, ELM_NOTIFY_ALIGN_FILL, 1.0);
-       eext_object_event_callback_add(pinpopup, EA_CALLBACK_BACK, eext_popup_back_cb,
+       eext_object_event_callback_add(pinpopup, EEXT_CALLBACK_BACK, eext_popup_back_cb,
                        NULL);
        evas_object_size_hint_weight_set(pinpopup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        elm_object_domain_translatable_part_text_set(pinpopup, "title,text",
-                        PACKAGE, _("IDS_WIFI_HEADER_WI_FI_DIRECT_CONNECTION_ABB"));
+                        PACKAGE, D_("IDS_WIFI_HEADER_WI_FI_DIRECT_CONNECTION_ABB"));
 
        genlist = elm_genlist_add(pinpopup);
        elm_genlist_homogeneous_set(genlist, EINA_TRUE);
@@ -1204,7 +1029,7 @@ Evas_Object *wfd_draw_pop_type_keypad(Evas_Object * win, wfd_popup_t * pop)
        /* Entry genlist item */
        ad->pin_desc_itc = elm_genlist_item_class_new();
        if(ad->pin_desc_itc != NULL) {
-               ad->pin_desc_itc->item_style = "multiline_main";
+               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;
                ad->pin_desc_itc->func.state_get = NULL;
@@ -1235,7 +1060,7 @@ Evas_Object *wfd_draw_pop_type_keypad(Evas_Object * win, wfd_popup_t * pop)
 
        ad->paswd_itc = elm_genlist_item_class_new();
        if(ad->paswd_itc != NULL) {
-               ad->paswd_itc->item_style = "1line";
+               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.state_get = NULL;
@@ -1264,16 +1089,9 @@ Evas_Object *wfd_draw_pop_type_keypad(Evas_Object * win, wfd_popup_t * pop)
        evas_object_show(genlist);
        elm_object_content_set(pinpopup, genlist);
 
-#if defined(X)
-       __set_parent_rotate_angle(ad);
-#endif
        evas_object_show(pinpopup);
        evas_object_show(win);
        elm_object_focus_set(ad->pin_entry, EINA_TRUE);
-#if defined(X)
-       ad->rotate_event_handler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE,
-                       __rotate, ad);
-#endif
 
        __WFD_APP_FUNC_EXIT__;
        return pinpopup;
@@ -1343,11 +1161,11 @@ void wfd_prepare_popup(int type, void *user_data)
        case /* MT */ WFD_POP_APRV_CONNECTION_WPS_PUSHBUTTON_REQ:
 
                _replace_1PS_2PD((char *)pop->text, sizeof(pop->text),
-                               _("IDS_WIFI_POP_CONNECT_TO_PS_IN_PD_SECONDS"),
+                               D_("IDS_WIFI_POP_CONNECT_TO_PS_IN_PD_SECONDS"),
                                peer_name, WFD_POP_TIMER_120);
 
-               snprintf(pop->label1, sizeof(pop->label1), "%s", _("IDS_WIFI_SK2_OK"));
-               snprintf(pop->label2, sizeof(pop->label2), "%s", _("IDS_WIFI_SK_CANCEL"));
+               snprintf(pop->label1, sizeof(pop->label1), "%s", D_("IDS_WIFI_SK2_OK"));
+               snprintf(pop->label2, sizeof(pop->label2), "%s", D_("IDS_WIFI_SK_CANCEL"));
                pop->timeout = WFD_POP_TIMER_120;
                pop->resp_data1 = WFD_POP_RESP_APRV_CONNECT_PBC_YES;
                pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
@@ -1357,10 +1175,10 @@ void wfd_prepare_popup(int type, void *user_data)
 
        case /* MT */ WFD_POP_APRV_CONNECTION_WPS_DISPLAY_REQ:
                snprintf(pop->text, sizeof(pop->text),
-                               _("IDS_WIFI_BODY_PS_IS_REQUESTING_A_WI_FI_DIRECT_CONNECTION_ALLOW_Q"),
+                               D_("IDS_WIFI_BODY_PS_IS_REQUESTING_A_WI_FI_DIRECT_CONNECTION_ALLOW_Q"),
                                peer_name);
-               snprintf(pop->label1, sizeof(pop->label1), "%s", _("IDS_WIFI_BUTTON_ALLOW"));
-               snprintf(pop->label2, sizeof(pop->label2), "%s", _("IDS_BR_SK_CANCEL"));
+               snprintf(pop->label1, sizeof(pop->label1), "%s", D_("IDS_WIFI_BUTTON_ALLOW"));
+               snprintf(pop->label2, sizeof(pop->label2), "%s", D_("IDS_BR_SK_CANCEL"));
                pop->timeout = WFD_POP_TIMER_120;
                pop->resp_data1 = WFD_POP_RESP_APRV_CONNECT_DISPLAY_OK;
                pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
@@ -1370,10 +1188,10 @@ void wfd_prepare_popup(int type, void *user_data)
 
        case /* MT */ WFD_POP_APRV_CONNECTION_WPS_KEYPAD_REQ:
                _replace_1PS_2PD((char *)pop->text, sizeof(pop->text),
-                                       _("IDS_WIFI_POP_CONNECT_TO_PS_IN_PD_SECONDS"),
+                                       D_("IDS_WIFI_POP_CONNECT_TO_PS_IN_PD_SECONDS"),
                                        peer_name, WFD_POP_TIMER_120);
-               snprintf(pop->label1, sizeof(pop->label1), "%s", _("IDS_BR_SK_OK"));
-               snprintf(pop->label2, sizeof(pop->label2), "%s", _("IDS_BR_SK_CANCEL"));
+               snprintf(pop->label1, sizeof(pop->label1), "%s", D_("IDS_BR_SK_OK"));
+               snprintf(pop->label2, sizeof(pop->label2), "%s", D_("IDS_BR_SK_CANCEL"));
                pop->timeout = WFD_POP_TIMER_120;
                pop->resp_data1 = WFD_POP_RESP_APRV_CONNECT_KEYPAD_YES;
                pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
@@ -1382,8 +1200,8 @@ void wfd_prepare_popup(int type, void *user_data)
                break;
 
        case /* MT */ WFD_POP_PROG_CONNECT:
-               snprintf(pop->text, sizeof(pop->text), "%s", _("IDS_WIFI_BODY_CONNECTING_ING"));
-               snprintf(pop->label1, sizeof(pop->label1), "%s", _("IDS_BR_SK_CANCEL"));
+               snprintf(pop->text, sizeof(pop->text), "%s", D_("IDS_WIFI_BODY_CONNECTING_ING"));
+               snprintf(pop->label1, sizeof(pop->label1), "%s", D_("IDS_BR_SK_CANCEL"));
                pop->timeout = WFD_POP_TIMER_120;
                pop->resp_data1 = WFD_POP_RESP_APRV_CONNECT_NO;
 
@@ -1392,16 +1210,16 @@ void wfd_prepare_popup(int type, void *user_data)
 
        case /* MO */ WFD_POP_PROG_CONNECT_WITH_KEYPAD:
                _replace_1PS_2PD((char *)text, sizeof(text),
-                                               _("IDS_WIFI_POP_CONNECT_TO_PS_IN_PD_SECONDS"),
+                                               D_("IDS_WIFI_POP_CONNECT_TO_PS_IN_PD_SECONDS"),
                                                peer_name, WFD_POP_TIMER_120);
 
                snprintf(text1, WFD_POP_STR_MAX_LEN, "%s %s",
-                               text, _("IDS_WIFI_POP_ENTER_PIN_TO_CONNECT_TO_PS"));
+                               text, D_("IDS_WIFI_POP_ENTER_PIN_TO_CONNECT_TO_PS"));
 
                snprintf(pop->text, sizeof(pop->text), text1, connection->peer_name);
 
-               snprintf(pop->label1, sizeof(pop->label1), "%s", _("IDS_WIFI_SK_CONNECT"));
-               snprintf(pop->label2, sizeof(pop->label2), "%s", _("IDS_BR_SK_CANCEL"));
+               snprintf(pop->label1, sizeof(pop->label1), "%s", D_("IDS_WIFI_SK_CONNECT"));
+               snprintf(pop->label2, sizeof(pop->label2), "%s", D_("IDS_BR_SK_CANCEL"));
                pop->timeout = WFD_POP_TIMER_120;
                pop->resp_data1 = WFD_POP_RESP_PROG_CONNECT_KEYPAD_OK;
                pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
@@ -1411,16 +1229,16 @@ void wfd_prepare_popup(int type, void *user_data)
 
        case /* MO/MT */ WFD_POP_PROG_CONNECT_WITH_PIN:
                _replace_1PS_2PD((char *)text, sizeof(text),
-                               _("IDS_WIFI_POP_CONNECT_TO_PS_IN_PD_SECONDS"),
+                               D_("IDS_WIFI_POP_CONNECT_TO_PS_IN_PD_SECONDS"),
                                peer_name, WFD_POP_TIMER_120);
 
                snprintf(text1, WFD_POP_STR_MAX_LEN, "%s %s %s",
                                text,
                                "<br>",
-                               _("IDS_WIFI_POP_PIN_CODE_PS"));
+                               D_("IDS_WIFI_POP_PIN_CODE_PS"));
                snprintf(pop->text, sizeof(pop->text), text1, connection->wps_pin);
 
-               snprintf(pop->label2, sizeof(pop->label2), "%s", _("IDS_BR_SK_CANCEL"));
+               snprintf(pop->label2, sizeof(pop->label2), "%s", D_("IDS_BR_SK_CANCEL"));
                pop->timeout = WFD_POP_TIMER_120;
                pop->resp_data2 = WFD_POP_RESP_APRV_CONNECT_NO;
 
@@ -1428,7 +1246,7 @@ void wfd_prepare_popup(int type, void *user_data)
                break;
 
        case WFD_POP_PROG_CONNECT_CANCEL:
-               snprintf(pop->text, sizeof(pop->text), "%s", _("IDS_BR_SK_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;