Merge "fix N_SE-11026, 11017, 10424, 7981"
authorHyejin Kim <hyejin0906.kim@tizendev.org>
Tue, 9 Oct 2012 10:27:18 +0000 (19:27 +0900)
committerGerrit Code Review <gerrit2@kim11>
Tue, 9 Oct 2012 10:27:18 +0000 (19:27 +0900)
src/setting-plugin.c
src/setting.c

index faa8608..e86cc87 100755 (executable)
@@ -146,7 +146,9 @@ static drawer_fp __drawer_find(char* type)
 void setting_drawer_list_init()
 {
        SETTING_TRACE_BEGIN;
+#if 0
        /* <navigationbar> */__drawer_add("navigationbar", navigationbar_func);
+#endif
        /* <bool>          */__drawer_add("bool", checkbox_func);
        /* <string>        */__drawer_add("string", editbox_func);
        /* <group>         */__drawer_add("group", group_func);
@@ -434,11 +436,11 @@ static void ___click_softkey_back_cb(void *data, Evas_Object *obj,
 
        setting_plugin_destroy(node);
 
-//     pd->scroller = NULL;
-//     pd->navi_bar = NULL;
-//     pd->cfg_file = NULL;
+       pd->scroller = NULL;
+       pd->navi_bar = NULL;
+       pd->cfg_file = NULL;
 
-//     pd->root = NULL;
+       pd->root = NULL;
 }
 
 
@@ -672,10 +674,10 @@ static void* slider_func(void *data, xmlNode *xmlObj)
 */
 static void* navigationbar_func(void *data, xmlNode *xmlObj)
 {
+#if 1
        SETTING_TRACE_BEGIN;
        ret_if(!data || !xmlObj);
 
-       //Draw_Data *pd = node->pd;
        PluginNode* node = (PluginNode*)data;
        Draw_Data *pd = node->pd;
 
@@ -692,7 +694,10 @@ static void* navigationbar_func(void *data, xmlNode *xmlObj)
                {
                        if (!xmlStrcmp(cur->name, (const xmlChar*)"button")) {
                                btn[i] = xmlGetProp(cur, "title");
-                               SETTING_TRACE("------>>> node type : Element, name=%s id=%s / btn[%d] = %s ", cur->name,xmlGetProp(cur, "id"), i, btn[i]);
+                               SETTING_TRACE("------>>> node type : Element, name=%s id=%s / btn[%d] = %s ",
+                                                               cur->name,xmlGetProp(cur, "id"),
+                                                               i,
+                                                               btn[i]);
                                i++;
                        }
                        cur = cur->next;
@@ -708,6 +713,7 @@ static void* navigationbar_func(void *data, xmlNode *xmlObj)
                                                   ___click_softkey_back_cb, data, &pd->scroller,
                                                   &(pd->navi_bar));
 
+#endif
        return NULL;
 };
 
@@ -1032,16 +1038,21 @@ static void* settings_func(void *data, xmlNode *xmlObj)
 // <setting>
 static void* setting_func(void *data, xmlNode *xmlObj)
 {
-#if 0/*{{{*/
-       // DO NOTHING
+       SETTING_TRACE_BEGIN;
+       ret_if(!data || !xmlObj);
+
+#if 1/*{{{*/
+       //Draw_Data *pd = node->pd;
+       PluginNode* node = (PluginNode*)data;
+       Draw_Data *pd = node->pd;
+
        //----------------------------------------------------------------
        // [DATA] title, btn[0], btn[1]
-       Draw_Data *pd = data;
        const char *title = (char*)xmlGetProp(xmlObj, "title");
-       char *btn[2] = {0, };
+       char *btn[2] = {/* 0 */"OK", /* 1 */"NO"};
 
        // find child nodes named 'elements'
-#if 0
+       #if 0
        if (xmlObj->children) {
                xmlNode* cur = xmlObj->children;
                int i =0;
@@ -1049,24 +1060,29 @@ static void* setting_func(void *data, xmlNode *xmlObj)
                {
                        if (!xmlStrcmp(cur->name, (const xmlChar*)"button")) {
                                btn[i] = xmlGetProp(cur, "title");
-                               SETTING_TRACE("------>>> node type : Element, name=%s id=%s / btn[%d] = %s ", cur->name,xmlGetProp(cur, "id"), i, btn[i]);
+                               SETTING_TRACE("------>>> node type : Element, name=%s id=%s / btn[%d] = %s ",
+                                                               cur->name,xmlGetProp(cur, "id"),
+                                                               i,
+                                                               btn[i]);
                                i++;
                        }
                        cur = cur->next;
                }
        }
-#endif
+       #endif
        //----------------------------------------------------------------
+       SETTING_TRACE("before setting_create_layout_navi_bar_genlist");
        // [UI] with DATA
        pd->ly_main = setting_create_layout_navi_bar_genlist(pd->win_get,
                                                   pd->win_get,
                                                   _(title),
-                                                  _("NO"), _("YES"),
+                                                  _(btn[1]), _(btn[0]),
                                                   ___click_softkey_back_cb,
-                                                  ___click_softkey_back_cb, pd, &pd->scroller,
+                                                  ___click_softkey_back_cb, data, &pd->scroller,
                                                   &(pd->navi_bar));
-#endif/*}}}*/
+       SETTING_TRACE("after setting_create_layout_navi_bar_genlist");
 
+#endif/*}}}*/
        return NULL;
 }
 
index 517ebe4..49f09be 100755 (executable)
@@ -219,32 +219,11 @@ static void setting_main_rotate(enum appcore_rm m, void *data)
 {
        SETTING_TRACE_BEGIN;
        setting_main_appdata *ad = data;
-       int r;
 
        if (ad == NULL || ad->win_main == NULL)
-               return 0;
-
-#if 0
-       switch (m) {
-       case APPCORE_RM_PORTRAIT_NORMAL:
-               r = 0;
-               break;
-       case APPCORE_RM_PORTRAIT_REVERSE:
-               r = 180;
-               break;
-       case APPCORE_RM_LANDSCAPE_NORMAL:
-               r = 270;
-               break;
-       case APPCORE_RM_LANDSCAPE_REVERSE:
-               r = 90;
-               break;
-       default:
-               r = -1;
-               break;
-       }
-#endif
-       if (r >= 0)
-               elm_win_rotation_with_resize_set(ad->win_main, r);
+               return;
+
+       elm_win_rotation_with_resize_set(ad->win_main, m);
 }
 #endif