#define ELM_TEXT_2 "elm.text.2"
#define ELM_TEXT "elm.text"
#define ELM_ICON "elm.icon"
+#define ELM_ICON_SWALLOW_1 "elm.slide.swallow.1"
+#define ELM_ICON_SWALLOW_2 "elm.slide.swallow.2"
#define ELM_BUTTON_STYLE "popup_button/default"
#define ITC_ITEM_STYLE "dialogue/2text.1icon.2"
-//#define ITC_LIFE_ITEM_STYLE "dialogue/bg/2icon"
-#define ITC_LIFE_ITEM_STYLE "1icon/with_no_line"
+#define ITC_LIFE_ITEM_STYLE "mode/slide2"
#define ITC_STO_TITLE_ITEM_STYLE "dialogue/title"
#define ITC_STO_TOTAL_ITEM_STYLE "dialogue/2text.2"
#define ITC_STO_APP_ITEM_STYLE "dialogue/2text.2"
};
static Elm_Genlist_Item_Class *itc = NULL;
-static Elm_Genlist_Item_Class *itc_forcestop= NULL;
-static Elm_Genlist_Item_Class *itc_uninstall= NULL;
+static Elm_Genlist_Item_Class *itc_life = NULL;
static Elm_Genlist_Item_Class *itc_sto_title= NULL;
static Elm_Genlist_Item_Class *itc_sto_total= NULL;
static Elm_Genlist_Item_Class *itc_sto_app = NULL;
elm_genlist_item_class_free(itc_sep);
elm_genlist_item_class_free(itc);
- elm_genlist_item_class_free(itc_forcestop);
- elm_genlist_item_class_free(itc_uninstall);
+ elm_genlist_item_class_free(itc_life);
elm_genlist_item_class_free(itc_sto_title);
elm_genlist_item_class_free(itc_sto_total);
elm_genlist_item_class_free(itc_sto_app);
return icon;
}
-static Evas_Object *_gl_icon_get_forcestop(void *data, Evas_Object *obj, const char *part)
+static Evas_Object *_gl_icon_get_life(void *data, Evas_Object *obj, const char *part)
{
MGR_APP_BEGIN();
mgr_app_app_info_t *app_info = _app_info;
Evas_Object *button = NULL;
- if (0 == strcmp(part, ELM_ICON)) {
+ if (0 == strcmp(part, ELM_ICON_SWALLOW_2)) {
button = elm_button_add(obj);
if (button) {
+ 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);
elm_object_disabled_set(button, EINA_TRUE);
+
+ if (app_info->removable) {
+ elm_object_disabled_set(button, EINA_FALSE);
+ }
+ }
+ } else if (0 == strcmp(part, ELM_ICON_SWALLOW_1)) {
+ button = elm_button_add(obj);
+ if (button) {
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);
+ elm_object_disabled_set(button, EINA_TRUE);
if (app_info->taskmanage) {
bool is_running = false;
return button;
}
-static Evas_Object *_gl_icon_get_uninstall(void *data, Evas_Object *obj, const char *part)
-{
- MGR_APP_BEGIN();
-
- MGR_APP_DEBUG("part:%s\n", part);
- retv_if(_app_info == NULL, NULL);
- mgr_app_app_info_t *app_info = _app_info;
-
- Evas_Object *button = NULL;
- if (0 == strcmp(part, ELM_ICON)) {
- button = elm_button_add(obj);
- if (button) {
- elm_object_disabled_set(button, EINA_TRUE);
- 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) {
- elm_object_disabled_set(button, EINA_FALSE);
- }
- }
- } else {
- MGR_APP_DEBUG_ERR("elm icon part is wrong");
- button = NULL;
- }
-
- MGR_APP_END();
- return button;
-}
-
static Evas_Object *_gl_icon_get_data(void *data, Evas_Object *obj, const char *part)
{
MGR_APP_BEGIN();
struct ug_data *ugd = (struct ug_data*)data;
Elm_Object_Item *item_app = NULL;
- Elm_Object_Item *item_forcestop = NULL;
- Elm_Object_Item *item_uninstall = NULL;
+ Elm_Object_Item *item_life = NULL;
Elm_Object_Item *item_sto_title = NULL;
Elm_Object_Item *item_sto_total = NULL;
Elm_Object_Item *item_sto_app = NULL;
retv_if(itc_sep == NULL, NULL);
itc = elm_genlist_item_class_new();
retv_if(itc == NULL, NULL);
- itc_forcestop = elm_genlist_item_class_new();
- retv_if(itc_forcestop == NULL, NULL);
- itc_uninstall = elm_genlist_item_class_new();
- retv_if(itc_uninstall == NULL, NULL);
+ itc_life = elm_genlist_item_class_new();
+ retv_if(itc_life == NULL, NULL);
itc_sto_title = elm_genlist_item_class_new();
retv_if(itc_sto_title == NULL, NULL);
itc_sto_total = elm_genlist_item_class_new();
itc_sep->func.state_get = NULL;
itc_sep->func.del = NULL;
- itc->item_style = ITC_ITEM_STYLE;
- itc->func.text_get = _gl_label_get;
- itc->func.content_get = _gl_icon_get;
- itc->func.state_get = NULL;
- itc->func.del = NULL;
-
- itc_forcestop->item_style = ITC_LIFE_ITEM_STYLE;
- itc_forcestop->func.text_get = NULL;
- itc_forcestop->func.content_get = _gl_icon_get_forcestop;
- itc_forcestop->func.state_get = NULL;
- itc_forcestop->func.del = NULL;
+ itc->item_style = ITC_ITEM_STYLE;
+ itc->func.text_get = _gl_label_get;
+ itc->func.content_get = _gl_icon_get;
+ itc->func.state_get = NULL;
+ itc->func.del = NULL;
- itc_uninstall->item_style = ITC_LIFE_ITEM_STYLE;
- itc_uninstall->func.text_get = NULL;
- itc_uninstall->func.content_get = _gl_icon_get_uninstall;
- itc_uninstall->func.state_get = NULL;
- itc_uninstall->func.del = NULL;
+ itc_life->item_style = ITC_LIFE_ITEM_STYLE;
+ itc_life->func.text_get = NULL;
+ itc_life->func.content_get = _gl_icon_get_life;
+ itc_life->func.state_get = NULL;
+ itc_life->func.del = NULL;
itc_sto_title->item_style = ITC_STO_TITLE_ITEM_STYLE;
itc_sto_title->func.text_get = _gl_label_get_title;
elm_genlist_item_select_mode_set(item_app, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
/* Force stop & Uninstall */
- item_forcestop = elm_genlist_item_append(genlist, itc_forcestop, ELM_STATE_DEFAULT, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item_forcestop)
- elm_genlist_item_select_mode_set(item_forcestop, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- item_uninstall = elm_genlist_item_append(genlist, itc_uninstall, ELM_STATE_DEFAULT, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
- if (item_uninstall)
- elm_genlist_item_select_mode_set(item_uninstall, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ item_life = elm_genlist_item_append(genlist, itc_life, ELM_STATE_DEFAULT, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ if (item_life)
+ elm_genlist_item_select_mode_set(item_life, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
/* separator with no bottom line */
item_sep = elm_genlist_item_append(genlist, itc_sep, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);