Create sub-text of 'More connectivity' and 'More system' menu.
[apps/core/preloaded/settings.git] / src / setting.c
index f9e69a1..9aac66e 100755 (executable)
@@ -330,15 +330,33 @@ static int setting_main_lang_changed_cb(void *data)
        }
 
        if (ad->data_moreConnect) {
-               str = (char*)g_strdup(_(MORE_CONNECT_STR));
-               if ( ! str) str = g_strdup("err");
-               ad->data_moreConnect->sub_desc = str;
+               char sub_text[MAX_COMMON_BUFFER_LEN] = {0, };
+               int idx = 0;
+               while (idx < MAX_MORE_MENU_NUM && ad->more_connective_menus[idx])
+               {
+                       if (idx != 0)
+                       {
+                               safeStrNCat(sub_text, ", ", MAX_COMMON_BUFFER_LEN);
+                       }
+                       safeStrNCat(sub_text, _(ad->more_connective_menus[idx]), MAX_COMMON_BUFFER_LEN);
+                       idx++;
+               }
+               ad->data_moreConnect->sub_desc = g_strdup(sub_text);
        }
 
        if (ad->data_moreSystem) {
-               str = (char*)g_strdup(_(MORE_SYSTEM_STR));
-               if ( ! str) str = g_strdup("err");
-               ad->data_moreSystem->sub_desc = str;
+               char sub_text[MAX_COMMON_BUFFER_LEN] = {0, };
+               int idx = 0;
+               while (idx < MAX_MORE_MENU_NUM && ad->more_system_menus[idx])
+               {
+                       if (idx != 0)
+                       {
+                               safeStrNCat(sub_text, ", ", MAX_COMMON_BUFFER_LEN);
+                       }
+                       safeStrNCat(sub_text, _(ad->more_system_menus[idx]), MAX_COMMON_BUFFER_LEN);
+                       idx++;
+               }
+               ad->data_moreSystem->sub_desc = g_strdup(sub_text);
        }
 
        if (ad->main_genlist) elm_genlist_realized_items_update(ad->main_genlist);