Tizen directory path migration
[apps/native/ug-wifi-direct.git] / ug-wifidirect / src / wfd_ug.c
index f770a26..196d5b7 100644 (file)
@@ -32,7 +32,6 @@
 #include <ui-gadget-module.h>
 #include <app_control.h>
 
-#include <wifi-direct.h>
 #include "wfd_ug.h"
 #include "wfd_ug_view.h"
 #include "wfd_client.h"
@@ -118,7 +117,7 @@ static void __wfd_hotspot_mode_vconf_change_cb(keynode_t *key, void *data)
 
        res = vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_MODE, &hotspot_mode);
        if (res) {
-               WDS_LOGE("Failed to get vconf value for PLMN(%d)", res);
+               DBG(LOG_INFO, "Failed to get vconf value for PLMN(%d)", res);
                return;
        }
        DBG(LOG_INFO, "__wfd_hotspot_mode_vconf_change_cb mode %d", hotspot_mode);
@@ -304,7 +303,6 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
        __FUNC_ENTER__;
        struct ug_data *ugd;
        int wfd_status = -1;
-       int rots[4] = { 0, 90, 180, 270 };
        int ret;
 
        if (!ug || !priv) {
@@ -321,8 +319,11 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
                return NULL;
        }
 
-       elm_win_wm_rotation_available_rotations_set(ugd->win, rots, 1);
-
+       /* set rotation */
+       if (elm_win_wm_rotation_supported_get(ugd->win)) {
+               int rots[4] = {0, 90, 180, 270};
+               elm_win_wm_rotation_available_rotations_set(ugd->win, (const int *)(&rots), 4);
+       }
 
        /* check the input parameters from app at first */
        ugd->wfds = NULL;
@@ -330,7 +331,7 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h control,
        ugd->is_auto_exit = false;
        ugd->is_multi_connect = true;
        ugd->is_init_ok = false;
-       ugd->title = strdup(_("IDS_WIFI_BODY_WI_FI_DIRECT_ABB"));
+       ugd->title = strdup(D_("IDS_WIFI_BODY_WI_FI_DIRECT_ABB"));
 
        if (control) {
                char *wfds = NULL;
@@ -531,7 +532,7 @@ static void on_start(ui_gadget_h ug, app_control_h control, void *priv)
        } else {
                DBG_SECURE(LOG_INFO, "HW ID of this device [%s]\n", kernel_info.machine);
                if (strncmp(kernel_info.machine, "arm", 3) != 0) {
-                       wfd_ug_warn_popup(ugd, _("IDS_ST_POP_NOT_SUPPORTED"), POPUP_TYPE_TERMINATE_NOT_SUPPORT);
+                       wfd_ug_warn_popup(ugd, D_("IDS_ST_POP_NOT_SUPPORTED"), POPUP_TYPE_TERMINATE_NOT_SUPPORT);
                        return;
                }
        }
@@ -612,7 +613,7 @@ static void on_destroy(ui_gadget_h ug, app_control_h control, void *priv)
 
        if (ugd->scan_toolbar) {
                wfd_ug_view_refresh_button(ugd->scan_toolbar,
-                       _("IDS_WIFI_SK4_SCAN"), FALSE);
+                       D_("IDS_WIFI_SK4_SCAN"), FALSE);
        }
 
        ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_DEVICE_NAME_STR,
@@ -843,7 +844,7 @@ UG_MODULE_API int setting_plugin_search_init(app_control_h control, void *priv,
 {
        __FUNC_ENTER__;
 
-       *applocale = strdup("ug-setting-wifidirect-efl");
+       *applocale = strdup(PACKAGE);
        void *node = NULL;
 
        Eina_List **pplist = (Eina_List**)priv;