Change the display text from size to version 2.1b_release accepted/tizen_2.1/20130426.150548 submit/tizen_2.1/20130426.150435
authorEunmi Son <eunmi.son@samsung.com>
Thu, 25 Apr 2013 10:37:58 +0000 (19:37 +0900)
committerEunmi Son <eunmi.son@samsung.com>
Thu, 25 Apr 2013 10:37:58 +0000 (19:37 +0900)
Change-Id: I3362040188a9d05b6372ceff570af1100605c4cb

packaging/ug-setting-manage-applications-efl.spec
ug/include/mgr-app-string.h
ug/include/mgr-app-view-main.h
ug/src/mgr-app-view-app-info.c

index 653f65c..23f81ef 100644 (file)
@@ -3,7 +3,7 @@
 
 Name:          ug-setting-manage-applications-efl
 Summary:       Manage Application package
-Version:       0.0.70
+Version:       0.0.71
 Release:       0
 Group:         Applications/System
 License:       Flora Software License
index 2772dba..bd96ba9 100644 (file)
@@ -30,6 +30,7 @@ extern "C" {
 #define MGRAPP_STR_NO dgettext("sys_string", "IDS_COM_SK_NO")\r
 #define MGRAPP_STR_ERROR dgettext("sys_string", "IDS_COM_POP_ERROR")\r
 #define MGRAPP_STR_ALL dgettext("sys_string", "IDS_COM_BODY_ALL")\r
+#define MGRAPP_STR_VERSION dgettext("sys_string", "IDS_COM_POP_VERSION")\r
 \r
 #define MGRAPP_STR_MANAGE_APPLICATIONS dgettext(PACKAGE, "IDS_ST_BODY_MANAGE_APPLICATIONS")\r
 #define MGRAPP_STR_APPLICATION_INFO dgettext(PACKAGE, "IDS_ST_HEADER_APPLICATION_INFO")\r
index 8d6d696..bb6d401 100644 (file)
@@ -31,7 +31,8 @@ struct _mgr_app_app_info_t {
        char    *icon_path;\r
 \r
        char    *pkg_label;\r
-       char    *pkg_type;      \r
+       char    *pkg_type;\r
+       char    *pkg_version;\r
        int     total_size;\r
        int             data_size;\r
        bool    nodisplay;\r
index 11e0e3a..8c2fa12 100755 (executable)
@@ -639,6 +639,7 @@ static char *_gl_label_get(void *data, Evas_Object *obj, const char *part)
        mgr_app_app_info_t *app_info = _app_info;
 
        char *label = NULL;
+       char buf[MAX_NAME_LEN] = {0, };
 
        char *package_name      = app_info->pkg_name;
        char *package_label     = app_info->pkg_label;
@@ -658,7 +659,8 @@ static char *_gl_label_get(void *data, Evas_Object *obj, const char *part)
                        MGR_APP_MEM_STRDUP(label, package_label);
                }
        } else if (0 == strcmp(part, ELM_TEXT_2)) {
-               label = _get_formated_size((float)app_info->total_size);
+               snprintf(buf, MAX_NAME_LEN, "%s: %s", MGRAPP_STR_VERSION, app_info->pkg_version);
+               MGR_APP_MEM_STRDUP(label, buf);
        } else {
                MGR_APP_MEM_STRDUP(label, MGRAPP_STR_ERROR);
        }
@@ -1192,6 +1194,7 @@ static void _get_app_info_from_pkgmgr(char *pkg_name, mgr_app_app_info_t *app_in
        char *icon_path = NULL; 
        char *pkg_label = NULL;
        char *pkg_type = NULL;
+       char *pkg_version = NULL;
        char *data_size = NULL;
        char *total_size = NULL;
        int r = 0;
@@ -1240,11 +1243,24 @@ static void _get_app_info_from_pkgmgr(char *pkg_name, mgr_app_app_info_t *app_in
                } else if (pkg_type) {
                        MGR_APP_MEM_STRDUP(app_info->pkg_type, pkg_type);
                } else {
-                       MGR_APP_MEM_STRDUP(app_info->pkg_label, "");
+                       MGR_APP_MEM_STRDUP(app_info->pkg_type, "");
                }
        } 
        MGR_APP_DEBUG("pkg_type: %s", pkg_type);
 
+       if (NULL == app_info->pkg_version) {
+               r = pkgmgrinfo_pkginfo_get_version(pkginfo_h, &pkg_version);
+               if (r < 0) {
+                       MGR_APP_DEBUG_ERR("pkgmgrinfo_pkginfo_get_version failed. %d", r);
+                       goto end;
+               } else if (pkg_version) {
+                       MGR_APP_MEM_STRDUP(app_info->pkg_version, pkg_version);
+               } else {
+                       MGR_APP_MEM_STRDUP(app_info->pkg_version, "");
+               }
+       } 
+       MGR_APP_DEBUG("pkg_version: %s", pkg_version);
+
        r = pkgmgrinfo_pkginfo_get_data_size(pkginfo_h, &app_info->data_size);
        if (r < 0) {
                MGR_APP_DEBUG_ERR("pkgmgrinfo_pkginfo_get_data_size failed. %d", r);