show success/fail popup after uninstalling app
[apps/home/ug-setting-manage-applications-efl.git] / view / src / mgr-app-view-app-info.c
index e2ee28d..d807445 100755 (executable)
 #include "mgr-app-view-factory.h"
 #include "mgr-app-common-util.h"
 #include "mgr-app-uigadget.h"
-#include <aul.h>
 #include <package-manager.h>
 #include <appsvc.h>
+#include <app_manager.h>
 
 
 #define WRT_PREFIX                                     "wgt"
-#define JAVA_PREFIX                            "jar"
-#define DEB_PREFIX                                     "deb"
 #define RPM_PREFIX                                     "rpm"
+#define TPK_PREFIX                                     "tpk"
 
 #define UG_NAME_MIDLET_INFO_EFL        "midlet-info-efl"
 #define UG_NAME_WEBAPP_INFO_EFL                "webapp-detail-efl"
 #define STR_INSTALLED_SIZE                     "installed_size"
 #define STR_DATA_SIZE                          "data_size"
 
-#define STR_FORCE_STOP                         "Force stop"
-#define STR_UNINSTALL                          "Uninstall"
-#define STR_CLEAR_DATA                         "Clear data"
+#define STR_BTN_UNINSTALL                      "btn_uninstall"
+#define STR_POPUP                                      "popup"
 
 #define MAX_NAME_LEN                           128
-#define NUM_KILO                                       1000
-#define NUM_MEGA                                       1000000
-#define NUM_GIGA                                       1000000000
+#define NUM_KILO                                       1024
+#define NUM_MEGA                                       1024*1024
+#define NUM_GIGA                                       1024*1024*1024
 
 #define ELM_TEXT_1                                     "elm.text.1"
 #define ELM_TEXT_2                                     "elm.text.2"
 #define ELM_TEXT                                       "elm.text"
 #define ELM_ICON_1                                     "elm.icon.1"
 #define ELM_ICON_2                                     "elm.icon.2"
-#define ELM_BUTTON_STYLE_2                     "style2"
+#define ELM_BUTTON_STYLE                       "popup_button/default"
 
 #define ITC_ITEM_STYLE                         "dialogue/2text.1icon.2"
 #define ITC_LIFE_ITEM_STYLE                    "dialogue/bg/2icon"
@@ -68,7 +66,6 @@
 #define ITC_LAUNCH_ITEM_STYLE          "dialogue/1text"
 #define ITC_LAUNCH_TEXT_ITEM_STYLE     "multiline/1text"
 #define ITC_DETAIL_ITEM_STYLE          "dialogue/1text"
-#define ITC_SEP_1_ITEM_STYLE           "dialogue/separator/1/with_line"
 #define ITC_SEP_10_ITEM_STYLE          "dialogue/separator/10"
 #define ITC_SEP_21_ITEM_STYLE          "dialogue/separator/21/with_line"
 
@@ -109,7 +106,6 @@ static Elm_Genlist_Item_Class *itc_launch_title = NULL;
 static Elm_Genlist_Item_Class *itc_launch      = NULL;
 static Elm_Genlist_Item_Class *itc_launch_text = NULL;
 static Elm_Genlist_Item_Class *itc_detail      = NULL;
-static Elm_Genlist_Item_Class *itc_sep_1       = NULL;
 static Elm_Genlist_Item_Class *itc_sep_10      = NULL;
 static Elm_Genlist_Item_Class *itc_sep_21      = NULL;
 
@@ -127,6 +123,7 @@ void _app_info_back_cb(void *data, Evas_Object *obj, void *event_info)
 
        ret_if(data == NULL);
        struct ug_data *ugd = (struct ug_data*)data;
+       int ret = 0;
 
        if (ugd->pc) {
                MGR_APP_DEBUG("pc is freed");
@@ -134,10 +131,10 @@ void _app_info_back_cb(void *data, Evas_Object *obj, void *event_info)
                ugd->pc = NULL;
        }
 
-       /* java ug destroy */
-       if (ugd->sub_ug) {
-               ug_destroy(ugd->sub_ug);
-               ugd->sub_ug = NULL;
+       /* ug destroy */
+       ret = ug_destroy(ugd->sub_ug);
+       if (-1 == ret) {
+               MGR_APP_DEBUG_ERR("ug_destroy ugd->sub_ug is failed");
        }
 
        mgr_app_view_common_back_cb(ugd, EINA_FALSE);
@@ -154,65 +151,92 @@ void _app_info_back_cb(void *data, Evas_Object *obj, void *event_info)
        elm_genlist_item_class_free(itc_launch_title);
        elm_genlist_item_class_free(itc_launch);
        elm_genlist_item_class_free(itc_launch_text);
-       elm_genlist_item_class_free(itc_sep_1);
        elm_genlist_item_class_free(itc_detail);
 
        MGR_APP_END();
 }
 
-static int _force_stop_iter_func_cb(const aul_app_info *info, void *data)
+static void _force_stop_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
        MGR_APP_BEGIN();
 
        ret_if(data == NULL);
        mgr_app_app_info_t *app_info = (mgr_app_app_info_t*)data;
+       ret_if(app_info->pkg_name == NULL);
+       bool is_running = false;
+       int ret = APP_MANAGER_ERROR_NONE;
 
-       if (app_info->pkg_name && info->pkg_name && strncmp(app_info->pkg_name, info->pkg_name, strlen(app_info->pkg_name)) == 0) {
-               MGR_APP_DEBUG("pkg: %s, aul pkg: %s, pid: %d", app_info->pkg_name, info->pkg_name, info->pid);
-               app_info->pid = info->pid;
-       } else {
-               MGR_APP_DEBUG_ERR("pkg: %s, aul pkg: %s, pid: %d", app_info->pkg_name, info->pkg_name, info->pid);
-       }
 
-       MGR_APP_END();
+       ret = app_manager_is_running(app_info->pkg_name, &is_running);
+       switch (ret) {
+       case APP_MANAGER_ERROR_NONE:
+               MGR_APP_DEBUG("is_running APP_MANAGER_ERROR_NONE");
+               break;
+       case APP_MANAGER_ERROR_INVALID_PARAMETER:
+               MGR_APP_DEBUG("is_running APP_MANAGER_ERROR_INVALID_PARAMETER");
+               return;
+       default:
+               MGR_APP_DEBUG("default");
+               return;
+       }
 
-       return 0;
-}
+       if (is_running) {
+               MGR_APP_DEBUG("%s app_is_running", app_info->pkg_name);
+               app_context_h app_context = {0, };
 
-static void _force_stop_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       MGR_APP_BEGIN();
+               ret = app_manager_get_app_context(app_info->pkg_name, &app_context);
+               switch (ret) {
+               case APP_MANAGER_ERROR_NONE:
+                       MGR_APP_DEBUG("get_app_context APP_MANAGER_ERROR_NONE");
+                       break;
+               case APP_MANAGER_ERROR_INVALID_PARAMETER:
+                       MGR_APP_DEBUG("get_app_context APP_MANAGER_ERROR_INVALID_PARAMETER");
+                       return;
+               case APP_MANAGER_ERROR_DB_FAILED:
+                       MGR_APP_DEBUG("get_app_context APP_MANAGER_ERROR_DB_FAILED");
+                       return;
+               case APP_MANAGER_ERROR_OUT_OF_MEMORY:
+                       MGR_APP_DEBUG("get_app_context APP_MANAGER_ERROR_OUT_OF_MEMORY");
+                       return;
+               case APP_MANAGER_ERROR_NO_SUCH_APP:
+                       MGR_APP_DEBUG("get_app_context APP_MANAGER_ERROR_NO_SUCH_APP");
+                       return;
+               default:
+                       MGR_APP_DEBUG("default");
+                       return;
+               }
 
-       ret_if(data == NULL);
-       mgr_app_app_info_t *app_info = (mgr_app_app_info_t*)data;
+               ret = app_manager_terminate_app(app_context);
+               switch (ret) {
+               case APP_MANAGER_ERROR_NONE:
+                       MGR_APP_DEBUG("terminate_app APP_MANAGER_ERROR_NONE");
+                       break;
+               case APP_MANAGER_ERROR_INVALID_PARAMETER:
+                       MGR_APP_DEBUG("terminate_app APP_MANAGER_ERROR_INVALID_PARAMETER");
+                       return;
+               default:
+                       MGR_APP_DEBUG("default");
+                       return;
+               }
 
-       if (app_info->pkg_name && aul_app_is_running(app_info->pkg_name) == 1) {
-               MGR_APP_DEBUG("%s app_is_running", app_info->pkg_name);
-               aul_app_get_running_app_info(_force_stop_iter_func_cb, (void*)app_info);
-               MGR_APP_DEBUG("pid : %d", app_info->pid);
-
-               if (app_info->pid != 0) {
-                       int ret = aul_terminate_pid(app_info->pid);
-
-                       switch (ret) {
-                       case AUL_R_OK:
-                               MGR_APP_DEBUG("AUL_R_OK");
-                               break;
-                       case AUL_R_EINVAL:
-                               MGR_APP_DEBUG("AUL_R_EINVAL");
-                               break;
-                       case AUL_R_ERROR:
-                               MGR_APP_DEBUG("AUL_R_ERROR");
-                               break;
-                       default:
-                               MGR_APP_DEBUG("default");
-                               break;
-                       }
+               ret = app_context_destroy(app_context);
+               switch (ret) {
+               case APP_MANAGER_ERROR_NONE:
+                       MGR_APP_DEBUG("context_destroy APP_MANAGER_ERROR_NONE");
+                       break;
+               case APP_MANAGER_ERROR_INVALID_PARAMETER:
+                       MGR_APP_DEBUG("context_destroy APP_MANAGER_ERROR_INVALID_PARAMETER");
+                       break;
+               default:
+                       MGR_APP_DEBUG("default");
+                       break;
                }
+
        } else {
-               MGR_APP_DEBUG("%s app_is_not_running or null", app_info->pkg_name);
+               MGR_APP_DEBUG("%s app is not running", app_info->pkg_name);
        }
 
+
        if (obj) {
                elm_object_disabled_set(obj, EINA_TRUE);
        }
@@ -220,13 +244,21 @@ static void _force_stop_clicked_cb(void *data, Evas_Object *obj, void *event_inf
        MGR_APP_END();
 }
 
-static void _uninstall_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+static void _no_response_cb(void *data, Evas_Object *obj, void *event_info)
 {
        MGR_APP_BEGIN();
 
-       ret_if(obj == NULL);
-       Evas_Object *button = obj;
+       ret_if(data == NULL);
+       evas_object_del(data);
 
+       MGR_APP_END();
+}
+
+static void _uninstall_by_pkgmgr_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       MGR_APP_BEGIN();
+
+       ret_if(obj == NULL);
        ret_if(data == NULL);
        mgr_app_app_info_t *app_info = (mgr_app_app_info_t*)data;
 
@@ -240,7 +272,21 @@ static void _uninstall_clicked_cb(void *data, Evas_Object *obj, void *event_info
        ugd             = evas_object_data_get(app_info_view_data->genlist, STR_UGD);
        ret_if(ugd == NULL);
 
-       _force_stop_clicked_cb(data, obj, event_info);
+       Evas_Object *btn_uninstall = NULL;
+       btn_uninstall = (Evas_Object*)evas_object_data_get(obj, STR_BTN_UNINSTALL);
+       ret_if(btn_uninstall == NULL);
+
+       Evas_Object *popup = NULL;
+       popup = (Evas_Object*)evas_object_data_get(obj, STR_POPUP);
+       ret_if(popup == NULL);
+
+       evas_object_data_del(obj, STR_BTN_UNINSTALL);
+       evas_object_data_del(obj, STR_POPUP);
+       evas_object_del(popup);
+
+       mgr_app_create_popup_progressbar(ugd->win_main, dgettext(PACKAGE, "IDS_ST_POP_UNINSTALLING_ING"));
+
+       _force_stop_clicked_cb(data, btn_uninstall, event_info);
 
        MGR_APP_DEBUG("pkg type: %s, pkg_name: %s", app_info->pkg_type, app_info->pkg_name);
        int req_id = 0;
@@ -255,7 +301,7 @@ static void _uninstall_clicked_cb(void *data, Evas_Object *obj, void *event_info
                return;
        }
 
-       req_id = pkgmgr_client_uninstall(ugd->pc, app_info->pkg_type, app_info->pkg_name, PM_DEFAULT, /*mgr_app_view_listen_cb*/NULL, /*(void*)ugd*/NULL);
+       req_id = pkgmgr_client_uninstall(ugd->pc, app_info->pkg_type, app_info->pkg_name, PM_QUIET, /*mgr_app_view_listen_cb*/NULL, /*(void*)ugd*/NULL);
 
        if (req_id > 0) {
                MGR_APP_DEBUG("uninstall success, req_id=%d", req_id);
@@ -282,6 +328,50 @@ static void _uninstall_clicked_cb(void *data, Evas_Object *obj, void *event_info
        MGR_APP_END();
 }
 
+static void _uninstall_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       MGR_APP_BEGIN();
+
+       ret_if(obj == NULL);
+       Evas_Object *btn_uninstall = obj;
+
+       ret_if(data == NULL);
+       mgr_app_app_info_t *app_info = (mgr_app_app_info_t*)data;
+
+       ret_if(mgr_app_view_app_info.view_common_data == NULL);
+       mgr_app_view_common_data_t *view_common_data = mgr_app_view_app_info.view_common_data;
+
+       Evas_Object *popup = NULL;
+       Evas_Object *btn_yes = NULL;
+       Evas_Object *btn_no = NULL;
+
+       popup = elm_popup_add(view_common_data->common_navibar);
+       ret_if(popup == NULL);
+       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_text_set(popup, "Uninstall?");
+       elm_object_part_text_set(popup, "title,text", app_info->app_name);
+
+       btn_yes = elm_button_add(popup);
+       ret_if(btn_yes == NULL);
+       elm_object_text_set(btn_yes, "Yes");
+       elm_object_part_content_set(popup, "button1", btn_yes);
+       elm_object_style_set(btn_yes, ELM_BUTTON_STYLE);
+       evas_object_smart_callback_add(btn_yes, "clicked", _uninstall_by_pkgmgr_cb, data);
+       evas_object_data_set(btn_yes, STR_BTN_UNINSTALL, btn_uninstall);
+       evas_object_data_set(btn_yes, STR_POPUP, popup);
+
+       btn_no = elm_button_add(popup);
+       ret_if(btn_no == NULL);
+       elm_object_text_set(btn_no, "No");
+       elm_object_part_content_set(popup, "button2", btn_no);
+       elm_object_style_set(btn_no, ELM_BUTTON_STYLE);
+       evas_object_smart_callback_add(btn_no, "clicked", _no_response_cb, (void*)popup);
+
+       evas_object_show(popup);
+
+       MGR_APP_END();
+}
+
 static void _clear_data_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
        MGR_APP_BEGIN();
@@ -337,14 +427,14 @@ static void _gl_sel_launch(void *data, Evas_Object *obj, void *event_info)
        MGR_APP_END();
 }
 
-static void _layout_cb(struct ui_gadget *ug, enum ug_mode mode, void *priv)
+static void _layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv)
 {
        MGR_APP_BEGIN();
 
        Evas_Object *base       = NULL;
        Evas_Object *win        = NULL;
 
-       if (!ug || !priv) {
+       if (!priv) {
                MGR_APP_END();
                return;
        }
@@ -371,22 +461,44 @@ static void _layout_cb(struct ui_gadget *ug, enum ug_mode mode, void *priv)
        MGR_APP_END();
 }
 
-static void _result_cb(struct ui_gadget *ug, bundle *result, void *priv)
+static void _result_cb(ui_gadget_h ug, service_h service, void *priv)
 {
        MGR_APP_BEGIN();
-       MGR_APP_DEBUG("<<< priv:%d, ug:%d", priv, ug);
 
        struct ug_data *mydata = NULL;
-       const char *val = NULL;
+       char *val = NULL;
 
-       if (!ug || !priv) {
+       if (!priv) {
                MGR_APP_END();
                return;
        }
 
        mydata = priv;
-       if (result) {
-               val = bundle_get_val(result, "name");
+       if (service) {
+               int ret = SERVICE_ERROR_NONE;
+
+               ret = service_get_extra_data(service, "name", &val);
+               switch (ret) {
+               case SERVICE_ERROR_NONE:
+                       MGR_APP_DEBUG_ERR("SERVICE_ERROR_NONE");
+                       break;
+               case SERVICE_ERROR_INVALID_PARAMETER:
+                       MGR_APP_DEBUG_ERR("SERVICE_ERROR_INVALID_PARAMETER");
+                       break;
+               case SERVICE_ERROR_KEY_NOT_FOUND:
+                       MGR_APP_DEBUG_ERR("SERVICE_ERROR_KEY_NOT_FOUND");
+                       break;
+               case SERVICE_ERROR_OUT_OF_MEMORY:
+                       MGR_APP_DEBUG_ERR("SERVICE_ERROR_OUT_OF_MEMORY");
+                       break;
+               case SERVICE_ERROR_INVALID_DATA_TYPE:
+                       MGR_APP_DEBUG_ERR("SERVICE_ERROR_INVALID_DATA_TYPE");
+                       break;
+               default:
+                       MGR_APP_DEBUG_ERR("ret value has an error. %d.", ret);
+                       break;
+               }
+
                if (val) {
                        MGR_APP_DEBUG("The name of UI gadget that sends result is [%s]", val);
                }
@@ -401,7 +513,7 @@ static void _result_cb(struct ui_gadget *ug, bundle *result, void *priv)
        MGR_APP_END();
 }
 
-static void _destroy_cb(struct ui_gadget *ug, void *priv)
+static void _destroy_cb(ui_gadget_h ug, void *priv)
 {
        MGR_APP_BEGIN();
 
@@ -429,40 +541,74 @@ static void __create_ug(void *data)
        ret_if(ugd->data == NULL);
        app_info = (mgr_app_app_info_t*)ugd->data;
 
-
-       bundle *arg_bundle = bundle_create();
-
-       struct ui_gadget *ug = NULL;
+       ui_gadget_h ug = {0, };
        struct ug_cbs cbs = {0,};
+       service_h service = {0, };
+       int ret = MGR_APP_OK;
 
        cbs.layout_cb   = _layout_cb;
        cbs.result_cb   = _result_cb;
        cbs.destroy_cb  = _destroy_cb;
        cbs.priv                = (void*)ugd;
 
-       if (app_info->pkg_type && !strncmp(app_info->pkg_type, JAVA_PREFIX, strlen(JAVA_PREFIX))) {
-               MGR_APP_DEBUG("app_info->pkg_type: %s", app_info->pkg_type);
-               MGR_APP_DEBUG("app_info->pkg_name : %s", app_info->pkg_name);
-               bundle_add(arg_bundle, UG_PARAM_KEY_PKG_NAME, app_info->pkg_name);
+       ret = service_create(&service);
+       switch (ret) {
+       case SERVICE_ERROR_NONE:
+               MGR_APP_DEBUG("service_create SERVICE_ERROR_NONE");
+               break;
+       case SERVICE_ERROR_INVALID_PARAMETER:
+               MGR_APP_DEBUG_ERR("service_create SERVICE_ERROR_INVALID_PARAMETER");
+               return;
+       case SERVICE_ERROR_OUT_OF_MEMORY:
+               MGR_APP_DEBUG_ERR("service_create SERVICE_ERROR_OUT_OF_MEMORY");
+               return;
+       default:
+               MGR_APP_DEBUG_ERR("service_create ret value has an error, %d.", ret);
+               return;
+       }
 
-               /* jar ug more detail info */
-               ug = ug_create(ugd->ug, UG_NAME_MIDLET_INFO_EFL, UG_MODE_FULLVIEW, arg_bundle, &cbs);
-               ugd->sub_ug = ug;
-       } else if (app_info->pkg_type && !strncmp(app_info->pkg_type, WRT_PREFIX, strlen(WRT_PREFIX))) {
+       if (app_info->pkg_type && !strncmp(app_info->pkg_type, WRT_PREFIX, strlen(WRT_PREFIX))) {
                MGR_APP_DEBUG("app_info->pkg_type: %s", app_info->pkg_type);
                MGR_APP_DEBUG("app_info->pkg_name : %s", app_info->pkg_name);
-               bundle_add(arg_bundle, UG_PARAM_KEY_PKG_NAME, app_info->pkg_name);
+
+               ret = service_add_extra_data(service, UG_PARAM_KEY_PKG_NAME, app_info->pkg_name);
+               switch (ret) {
+               case SERVICE_ERROR_NONE:
+                       MGR_APP_DEBUG("service_add_extra_data SERVICE_ERROR_NONE");
+                       break;
+               case SERVICE_ERROR_INVALID_PARAMETER:
+                       MGR_APP_DEBUG_ERR("service_add_extra_data SERVICE_ERROR_INVALID_PARAMETER");
+                       goto end;
+               case SERVICE_ERROR_KEY_REJECTED:
+                       MGR_APP_DEBUG_ERR("service_add_extra_data SERVICE_ERROR_KEY_REJECTED");
+                       goto end;
+               default:
+                       MGR_APP_DEBUG_ERR("service_add_extra_data ret value has an error, %d.", ret);
+                       goto end;
+               }
 
                /* wrt ug more detail info */
-               ug = ug_create(ugd->ug, UG_NAME_WEBAPP_INFO_EFL, UG_MODE_FULLVIEW, arg_bundle, &cbs);
+               ug = ug_create(ugd->ug, UG_NAME_WEBAPP_INFO_EFL, UG_MODE_FULLVIEW, service, &cbs);
                ugd->sub_ug = ug;
        } else {
                MGR_APP_DEBUG(">>> NOT SUPPORTED TYPE");
        }
 
-       if (arg_bundle){
-               bundle_free(arg_bundle);
-               arg_bundle = NULL;
+end:
+       ret = service_destroy(service);
+       switch (ret) {
+       case SERVICE_ERROR_NONE:
+               MGR_APP_DEBUG("service_destroy SERVICE_ERROR_NONE");
+               break;
+       case SERVICE_ERROR_INVALID_PARAMETER:
+               MGR_APP_DEBUG_ERR("service_destroy SERVICE_ERROR_INVALID_PARAMETER");
+               break;
+       case SERVICE_ERROR_OUT_OF_MEMORY:
+               MGR_APP_DEBUG_ERR("service_destroy SERVICE_ERROR_OUT_OF_MEMORY");
+               break;
+       default:
+               MGR_APP_DEBUG_ERR("service_destroy ret value has an error, %d.", ret);
+               break;
        }
 
        MGR_APP_END();
@@ -520,7 +666,7 @@ static char *_gl_label_get(void *data, Evas_Object *obj, const char *part)
        char *icon_path         = app_info->icon_path;
        char *pkg_type          = app_info->pkg_type;
 
-       MGR_APP_DEBUG("package_name:[%s], x_slp_packagetype:[%s], icon_path:[%s]\n", app_name, pkg_type, icon_path);
+       MGR_APP_DEBUG("package_name:[%s], app_name:[%s], x_slp_packagetype:[%s], icon_path:[%s]\n", package_name, app_name, pkg_type, icon_path);
        MGR_APP_DEBUG("part:%s\n", part);
        retv_if(app_name == NULL, NULL);
 
@@ -703,19 +849,36 @@ static Evas_Object *_gl_icon_get_life(void *data, Evas_Object *obj, const char *
                button = elm_button_add(obj);
                if (button) {
                        elm_object_disabled_set(button, EINA_TRUE);
-                       elm_object_text_set(button, STR_FORCE_STOP);
-                       elm_object_style_set(button, ELM_BUTTON_STYLE_2);
+                       elm_object_text_set(button, dgettext(PACKAGE, "IDS_ST_BUTTON_FORCE_STOP"));
+                       elm_object_style_set(button, ELM_BUTTON_STYLE);
                        evas_object_smart_callback_add(button, "clicked", _force_stop_clicked_cb, (void*)data);
-                       if (app_info->taskmanage && aul_app_is_running(app_info->pkg_name) != 0) {
-                               elm_object_disabled_set(button, EINA_FALSE);
+
+                       if (app_info->taskmanage) {
+                               bool is_running = false;
+                               int ret = app_manager_is_running(app_info->pkg_name, &is_running);
+
+                               switch (ret) {
+                               case APP_MANAGER_ERROR_NONE:
+                                       MGR_APP_DEBUG("is_running APP_MANAGER_ERROR_NONE");
+                                       if (is_running) {
+                                               elm_object_disabled_set(button, EINA_FALSE);
+                                       }
+                                       break;
+                               case APP_MANAGER_ERROR_INVALID_PARAMETER:
+                                       MGR_APP_DEBUG("is_running APP_MANAGER_ERROR_INVALID_PARAMETER");
+                                       break;
+                               default:
+                                       MGR_APP_DEBUG("default");
+                                       break;
+                               }
                        }
                }
        } else if (!strncmp(part, ELM_ICON_2, strlen(ELM_ICON_2))) {
                button = elm_button_add(obj);
                if (button) {
                        elm_object_disabled_set(button, EINA_TRUE);
-                       elm_object_text_set(button, STR_UNINSTALL);
-                       elm_object_style_set(button, ELM_BUTTON_STYLE_2);
+                       elm_object_text_set(button, dgettext(PACKAGE, "IDS_ST_BUTTON_UNINSTALL"));
+                       elm_object_style_set(button, ELM_BUTTON_STYLE);
                        evas_object_smart_callback_add(button, "clicked", _uninstall_clicked_cb, (void*)data);
 
                        if (app_info->removable) {
@@ -743,10 +906,10 @@ static Evas_Object *_gl_icon_get_data(void *data, Evas_Object *obj, const char *
        if (!strncmp(part, ELM_ICON_2, strlen(ELM_ICON_2))) {
                button = elm_button_add(obj);
                if (button) {
-                       elm_object_text_set(button, STR_CLEAR_DATA);
-                       elm_object_style_set(button, ELM_BUTTON_STYLE_2);
+                       elm_object_text_set(button, dgettext(PACKAGE, "IDS_ST_BUTTON_CLEAR_DATA"));
+                       elm_object_style_set(button, ELM_BUTTON_STYLE);
                        evas_object_smart_callback_add(button, "clicked", _clear_data_clicked_cb, (void*)data);
-                       if (app_info->data_size <= 0 || strncmp(app_info->pkg_type, JAVA_PREFIX, strlen(JAVA_PREFIX))) {
+                       if (app_info->data_size <= 0) {
                                elm_object_disabled_set(button, EINA_TRUE);
                        }
                }
@@ -789,7 +952,6 @@ static Evas_Object *__create_genlist_app_info(Evas_Object *parent, void *data)
        Elm_Object_Item *item_launch_text       = NULL;
        Elm_Object_Item *item_launch_title      = NULL;
        Elm_Object_Item *item_launch            = NULL;
-       Elm_Object_Item *item_sep_1             = NULL;
        Elm_Object_Item *item_sep_10            = NULL;
        Elm_Object_Item *item_sep_21            = NULL;
        Elm_Object_Item *item_detail            = NULL;
@@ -824,8 +986,6 @@ static Evas_Object *__create_genlist_app_info(Evas_Object *parent, void *data)
        retv_if(itc_launch == NULL, NULL);
        itc_launch_text = elm_genlist_item_class_new();
        retv_if(itc_launch_text == NULL, NULL);
-       itc_sep_1 = elm_genlist_item_class_new();
-       retv_if(itc_sep_1 == NULL, NULL);
        itc_detail = elm_genlist_item_class_new();
        retv_if(itc_detail == NULL, NULL);
 
@@ -901,12 +1061,6 @@ static Evas_Object *__create_genlist_app_info(Evas_Object *parent, void *data)
        itc_launch_text->func.state_get = NULL;
        itc_launch_text->func.del               = NULL;
 
-       itc_sep_1->item_style                   = ITC_SEP_1_ITEM_STYLE;
-       itc_sep_1->func.text_get                = NULL;
-       itc_sep_1->func.content_get     = NULL;
-       itc_sep_1->func.state_get               = NULL;
-       itc_sep_1->func.del                     = NULL;
-
        itc_detail->item_style                  = ITC_DETAIL_ITEM_STYLE;
        itc_detail->func.text_get               = _gl_label_get_detail;
        itc_detail->func.content_get    = NULL;
@@ -953,6 +1107,7 @@ static Evas_Object *__create_genlist_app_info(Evas_Object *parent, void *data)
        elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
        elm_genlist_scroller_policy_set(genlist, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
        evas_object_data_set(genlist, STR_UGD, (void*)ugd);
+       elm_object_style_set(genlist, "dialogue");
        evas_object_show(genlist);
 
        MGR_APP_MEM_STRDUP(sto_title, dgettext(PACKAGE, "IDS_ST_BODY_STORAGE"));
@@ -975,12 +1130,6 @@ static Evas_Object *__create_genlist_app_info(Evas_Object *parent, void *data)
        item_life = elm_genlist_item_append(genlist, itc_life, (void *)app_info, NULL, ELM_GENLIST_ITEM_NONE, _gl_sel, NULL);
 
 
-       /* separator with bottom line */
-       item_sep_10 = elm_genlist_item_append(genlist, itc_sep_10, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       if (item_sep_10)
-               elm_genlist_item_select_mode_set(item_sep_10, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-
-
        /* Storage */
        item_sto_title = elm_genlist_item_append(genlist, itc_sto_title, sto_title, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
        item_sto_total = elm_genlist_item_append(genlist, itc_sto_total, (void *)app_info, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
@@ -995,9 +1144,9 @@ static Evas_Object *__create_genlist_app_info(Evas_Object *parent, void *data)
 
 
        /* separator with no bottom line */
-       item_sep_10 = elm_genlist_item_append(genlist, itc_sep_10, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       if (item_sep_10)
-               elm_genlist_item_select_mode_set(item_sep_10, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+       //item_sep_10 = elm_genlist_item_append(genlist, itc_sep_10, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+       //if (item_sep_10)
+       //      elm_genlist_item_select_mode_set(item_sep_10, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
 
        /* Clear Data */
@@ -1022,15 +1171,15 @@ static Evas_Object *__create_genlist_app_info(Evas_Object *parent, void *data)
        item_launch_text = elm_genlist_item_append(genlist, itc_launch_text, (void *)app_info, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
        if (item_launch_text)
                elm_genlist_item_select_mode_set(item_launch_text, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-       item_sep_1 = elm_genlist_item_append(genlist, itc_sep_1, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-       if (item_sep_1)
-               elm_genlist_item_select_mode_set(item_sep_1, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+       item_sep_21 = elm_genlist_item_append(genlist, itc_sep_21, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+       if (item_sep_21)
+               elm_genlist_item_select_mode_set(item_sep_21, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
 
        /* More Detail */
        item_detail = elm_genlist_item_append(genlist, itc_detail, (void *)app_info, NULL, ELM_GENLIST_ITEM_NONE, _gl_sel_detail, (void*)ugd);
        if (app_info->pkg_type) {
-               if (item_detail != NULL && (!strncmp(app_info->pkg_type, DEB_PREFIX, strlen(DEB_PREFIX)) || !strncmp(app_info->pkg_type, RPM_PREFIX, strlen(RPM_PREFIX)))) {
+               if (item_detail != NULL && (!strncmp(app_info->pkg_type, TPK_PREFIX, strlen(TPK_PREFIX)) || !strncmp(app_info->pkg_type, RPM_PREFIX, strlen(RPM_PREFIX)))) {
                        elm_genlist_item_selected_set(item_detail, EINA_FALSE);
                        elm_object_item_disabled_set(item_detail, EINA_TRUE);
                }