[PACKAGE UPLOAD] VERSION 0.0.61
authorEunmi Son <eunmi.son@samsung.com>
Wed, 30 Jan 2013 19:24:18 +0000 (23:24 +0400)
committerEunmi Son <eunmi.son@samsung.com>
Wed, 30 Jan 2013 19:24:18 +0000 (23:24 +0400)
Fix the running app list

Change-Id: I0f4c5c7f496cbf8ff3e09dd6c37db7217d32d5d1

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

index 66f2efe..0cf32b0 100644 (file)
@@ -3,7 +3,7 @@
 
 Name:          ug-setting-manage-applications-efl
 Summary:       Manage Application package
-Version:       0.0.60
+Version:       0.0.61
 Release:       0
 Group:         Applications/System
 License:       Flora Software License
index 47bb045..8d6d696 100644 (file)
@@ -37,6 +37,8 @@ struct _mgr_app_app_info_t {
        bool    nodisplay;\r
        bool    removable;\r
        bool    taskmanage;\r
+\r
+       char    *main_appid;\r
 };\r
 \r
 void mgrapp_view_list_create(void *data);\r
@@ -44,7 +46,7 @@ void mgrapp_view_list_update(void *data);
 void mgrapp_view_info_create(char *pkg_name, void *data);\r
 void mgrapp_view_info_update(void *data);\r
 void mgrapp_view_info_destroy(void *data);\r
-\r
+void mgrapp_view_list_update_by_uninstall(const char *pkg_type, const char *pkg_name, void *data);\r
 \r
 #ifdef __cplusplus\r
 }\r
index 5ad05b4..eeac05a 100755 (executable)
@@ -163,9 +163,9 @@ static void _force_stop_clicked_cb(void *data, Evas_Object *obj, void *event_inf
        ret_if(app_info->pkg_name == NULL);
        bool is_running = false;
        int ret = APP_MANAGER_ERROR_NONE;
+       struct ug_data *ugd = NULL;
 
-
-       ret = app_manager_is_running(app_info->pkg_name, &is_running);
+       ret = app_manager_is_running(app_info->main_appid, &is_running);
        switch (ret) {
        case APP_MANAGER_ERROR_NONE:
                MGR_APP_DEBUG("is_running APP_MANAGER_ERROR_NONE");
@@ -179,10 +179,10 @@ static void _force_stop_clicked_cb(void *data, Evas_Object *obj, void *event_inf
        }
 
        if (is_running) {
-               MGR_APP_DEBUG("%s app_is_running", app_info->pkg_name);
+               MGR_APP_DEBUG("%s app_is_running", app_info->main_appid);
                app_context_h app_context = {0, };
 
-               ret = app_manager_get_app_context(app_info->pkg_name, &app_context);
+               ret = app_manager_get_app_context(app_info->main_appid, &app_context);
                switch (ret) {
                case APP_MANAGER_ERROR_NONE:
                        MGR_APP_DEBUG("get_app_context APP_MANAGER_ERROR_NONE");
@@ -229,9 +229,11 @@ static void _force_stop_clicked_cb(void *data, Evas_Object *obj, void *event_inf
                        MGR_APP_DEBUG("default");
                        break;
                }
+               ugd = evas_object_data_get(_genlist, STR_UGD);
+               mgrapp_view_list_update_by_uninstall(app_info->pkg_type, app_info->pkg_name, (void*)ugd);
 
        } else {
-               MGR_APP_DEBUG("%s app is not running", app_info->pkg_name);
+               MGR_APP_DEBUG("%s app is not running", app_info->main_appid);
        }
 
 
@@ -849,7 +851,7 @@ static Evas_Object *_gl_icon_get_life(void *data, Evas_Object *obj, const char *
 
                        if (app_info->taskmanage) {
                                bool is_running = false;
-                               int ret = app_manager_is_running(app_info->pkg_name, &is_running);
+                               int ret = app_manager_is_running(app_info->main_appid, &is_running);
 
                                switch (ret) {
                                case APP_MANAGER_ERROR_NONE:
index 0d8de41..681ed8e 100755 (executable)
@@ -93,6 +93,7 @@ static void _free_resources(struct ug_data * ugd)
                MGR_APP_MEM_FREE(app_info->pkg_name);
                MGR_APP_MEM_FREE(app_info->pkg_type);
                MGR_APP_MEM_FREE(app_info->icon_path);
+               MGR_APP_MEM_FREE(app_info->main_appid);
                _installed_list = g_list_remove(_installed_list, app_info);
        }
 
@@ -142,6 +143,7 @@ static void _gl_del(void *data, Evas_Object *obj)
        MGR_APP_MEM_FREE(app_info->pkg_label);
        MGR_APP_MEM_FREE(app_info->pkg_type);
        MGR_APP_MEM_FREE(app_info->icon_path);
+       MGR_APP_MEM_FREE(app_info->main_appid);
        //MGR_APP_MEM_FREE(app_info);
 #endif
 
@@ -310,6 +312,7 @@ static void _get_appinfo_from_pkgmgr(const pkgmgrinfo_pkginfo_h handler, mgr_app
                goto end;
        }
        MGR_APP_DEBUG("main_appid: %s", main_appid);
+       MGR_APP_MEM_STRDUP(app_info->main_appid, main_appid);
 
        r = pkgmgrinfo_appinfo_get_appinfo(main_appid, &appinfo_h);
        if (r < 0) {
@@ -597,7 +600,7 @@ end:
        MGR_APP_END();
 }
 
-static void mgrapp_view_list_update_by_uninstall(const char *pkg_type, const char *pkg_name, void *data)
+void mgrapp_view_list_update_by_uninstall(const char *pkg_type, const char *pkg_name, void *data)
 {
        MGR_APP_BEGIN();
 
@@ -1010,7 +1013,7 @@ static void _create_genlist_app_list(seg_type_t seg, void *data)
                MGR_APP_DEBUG("genlist %d app_info->pkg_label: %s", i, app_info->pkg_label);
 
                if (LIST_SEG_TYPE_RUNNING == seg
-                               && APP_MANAGER_ERROR_NONE == app_manager_is_running(app_info->pkg_name, &is_running)
+                               && APP_MANAGER_ERROR_NONE == app_manager_is_running(app_info->main_appid, &is_running)
                                && false == is_running) {
                        continue;
                }