[Bug] if there is no library in 'More ... ' menu tree, do not show the 'More ......
authorJing Yigang <yigang.jing@samsung.com>
Tue, 4 Sep 2012 09:44:32 +0000 (17:44 +0800)
committerJing Yigang <yigang.jing@samsung.com>
Tue, 4 Sep 2012 09:44:32 +0000 (17:44 +0800)
Change-Id: I596003eb6e3ac459c0feee45875488da8f752081

src/setting-main.c

index cc013a6..6333b2f 100755 (executable)
@@ -640,7 +640,9 @@ void __load_connectivity_menu_list(void *data, Cfg_Item_Position inputPos, Evas_
                            && SETTING_VIEW_MAIN == ad->view_load
                            && MAIN_PROFILE_PREFERRED == ad->profile_type) {
 
-                               ad->more_connective_menus[idx_second_menu++] = keyStr;
+                               if (is_ug_installed_by_ug_args(ug_args)) {
+                                       ad->more_connective_menus[idx_second_menu++] = keyStr;
+                               }
                        }
 
                        if (Cfg_Item_Pos_Level_All == inputPos) {
@@ -690,7 +692,7 @@ void __load_connectivity_menu_list(void *data, Cfg_Item_Position inputPos, Evas_
 
        //end group , only display in setting main view
 #if SUPPORT_MORE_ITEM_FUNCTION
-               if (SETTING_VIEW_MAIN == ad->view_load && MAIN_PROFILE_PREFERRED == ad->profile_type)
+               if (SETTING_VIEW_MAIN == ad->view_load && MAIN_PROFILE_PREFERRED == ad->profile_type && idx_second_menu > 0)
                {
                        char sub_text[MAX_COMMON_BUFFER_LEN] = {0, };
                        int idx = 0;
@@ -803,7 +805,10 @@ void __load_system_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object
                            && Cfg_Item_Pos_Level1 == tmpPos
                            && SETTING_VIEW_MAIN == ad->view_load
                            && MAIN_PROFILE_PREFERRED == ad->profile_type) {
+
+                           if (is_ug_installed_by_ug_args(ug_args)) {
                                ad->more_system_menus[idx_second_menu++] = keyStr;
+                           }
                        }
 
                        if (Cfg_Item_Pos_Level_All == inputPos) {
@@ -876,7 +881,7 @@ void __load_system_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object
        }
        //end group, only display in setting main view
 #if SUPPORT_MORE_ITEM_FUNCTION
-               if (SETTING_VIEW_MAIN == ad->view_load && MAIN_PROFILE_PREFERRED == ad->profile_type)
+               if (SETTING_VIEW_MAIN == ad->view_load && MAIN_PROFILE_PREFERRED == ad->profile_type && idx_second_menu > 0)
                {
                        char sub_text[MAX_COMMON_BUFFER_LEN] = {0, };
                        int idx = 0;