[Bug] Remove the launching other apps in Storage .
authorJing Yigang <yigang.jing@samsung.com>
Wed, 17 Oct 2012 07:38:33 +0000 (15:38 +0800)
committerJing Yigang <yigang.jing@samsung.com>
Wed, 17 Oct 2012 07:39:51 +0000 (15:39 +0800)
Change-Id: I72d5d55f27614cb13c4fdcac07f7edcffe58a1fd

setting-storage/src/setting-storage-main.c

index 93e0cad..c216fe8 100755 (executable)
@@ -583,22 +583,34 @@ static void __setting_storage_main_Gendial_mouse_up_cb(void *data, Evas_Object *
 
        SETTING_TRACE("clicking item[%s]", _(list_item->keyStr));
 
-       if (!safeStrCmp("IDS_ST_BODY_APPLICATIONS", list_item->keyStr)) {
-               __setting_storage_main_launch_manage_app_ug(ad);
-       } else if (!safeStrCmp(SETTING_STORAGE_DEFAULT_STORAGE_STR, list_item->keyStr)) {
-               setting_view_change(&setting_view_storage_main,
-                                   &setting_view_storage_default_storage, ad);
-       } else if (!safeStrCmp(SETTING_STORAGE_PICS_STR, list_item->keyStr)) {
-               __setting_storage_main_app_launch("org.tizen.gallery");
-       } else if (!safeStrCmp(SETTING_STORAGE_DOWNS_STR, list_item->keyStr)) {
-               __setting_storage_main_app_launch("org.tizen.download-manager");
-       } else if (!safeStrCmp(SETTING_STORAGE_AUDIO_STR, list_item->keyStr)) {
-               __setting_storage_main_app_launch("org.tizen.music-player");
-       } else if (!safeStrCmp(SETTING_STORAGE_MISCES_STR, list_item->keyStr)) {
-               setting_view_change(&setting_view_storage_main,
-                                   &setting_view_storage_miscellaneous_files, ad);
+       if (isEmulBin()) {
+               if (!safeStrCmp(SETTING_STORAGE_DEFAULT_STORAGE_STR, list_item->keyStr)) {
+                       setting_view_change(&setting_view_storage_main,
+                                           &setting_view_storage_default_storage, ad);
+               } else if (!safeStrCmp(SETTING_STORAGE_MISCES_STR, list_item->keyStr)) {
+                       setting_view_change(&setting_view_storage_main,
+                                           &setting_view_storage_miscellaneous_files, ad);
+               } else {
+                       // do nothing now
+               }
        } else {
-               // do nothing now
+               if (!safeStrCmp("IDS_ST_BODY_APPLICATIONS", list_item->keyStr)) {
+                       __setting_storage_main_launch_manage_app_ug(ad);
+               } else if (!safeStrCmp(SETTING_STORAGE_DEFAULT_STORAGE_STR, list_item->keyStr)) {
+                       setting_view_change(&setting_view_storage_main,
+                                           &setting_view_storage_default_storage, ad);
+               } else if (!safeStrCmp(SETTING_STORAGE_PICS_STR, list_item->keyStr)) {
+                       __setting_storage_main_app_launch("org.tizen.gallery");
+               } else if (!safeStrCmp(SETTING_STORAGE_DOWNS_STR, list_item->keyStr)) {
+                       __setting_storage_main_app_launch("org.tizen.download-manager");
+               } else if (!safeStrCmp(SETTING_STORAGE_AUDIO_STR, list_item->keyStr)) {
+                       __setting_storage_main_app_launch("org.tizen.music-player");
+               } else if (!safeStrCmp(SETTING_STORAGE_MISCES_STR, list_item->keyStr)) {
+                       setting_view_change(&setting_view_storage_main,
+                                           &setting_view_storage_miscellaneous_files, ad);
+               } else {
+                       // do nothing now
+               }
        }
 }
 
@@ -1138,7 +1150,9 @@ static int setting_storage_main_create(void *cb)
 
        Elm_Object_Item *item = NULL;
 
-       if (!isEmulBin()) {
+       bool is_emulator = isEmulBin();
+
+       if (!is_emulator) {
                item = elm_genlist_item_append(ad->genlist, &itc_seperator, NULL, NULL,
                                        ELM_GENLIST_ITEM_NONE, NULL, NULL);
                elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
@@ -1188,6 +1202,9 @@ static int setting_storage_main_create(void *cb)
                                             apps_desc, NULL);
        if (ad->apps) {
                ad->apps->userdata = ad;
+               if (is_emulator) {
+                       elm_genlist_item_select_mode_set(ad->apps->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+               }
        } else {
                SETTING_TRACE_ERROR("ad->apps is NULL");
                return SETTING_RETURN_FAIL;
@@ -1204,6 +1221,9 @@ static int setting_storage_main_create(void *cb)
                                             pics_videos_desc, NULL);
        if (ad->pics_videos) {
                ad->pics_videos->userdata = ad;
+               if (is_emulator) {
+                       elm_genlist_item_select_mode_set(ad->pics_videos->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+               }
        } else {
                SETTING_TRACE_ERROR("ad->pics_videos is NULL");
                return SETTING_RETURN_FAIL;
@@ -1221,6 +1241,9 @@ static int setting_storage_main_create(void *cb)
                                             NULL);
        if (ad->downloads) {
                ad->downloads->userdata = ad;
+               if (is_emulator) {
+                       elm_genlist_item_select_mode_set(ad->downloads->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+               }
        } else {
                SETTING_TRACE_ERROR("ad->downloads is NULL");
                return SETTING_RETURN_FAIL;
@@ -1238,6 +1261,10 @@ static int setting_storage_main_create(void *cb)
                                             NULL);
        if (ad->audio) {
                ad->audio->userdata = ad;
+
+               if (is_emulator) {
+                       elm_genlist_item_select_mode_set(ad->audio->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+               }
        } else {
                SETTING_TRACE_ERROR("ad->audio is NULL");
                return SETTING_RETURN_FAIL;
@@ -1281,7 +1308,7 @@ static int setting_storage_main_create(void *cb)
                return SETTING_RETURN_FAIL;
        }
 
-       if (!isEmulBin()) {
+       if (!is_emulator) {
                /* Format USB storage */
                setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), NULL,
                                                     ad, SWALLOW_Type_INVALID, NULL,