diff options
-rwxr-xr-x | home/include/conf.h | 13 | ||||
-rwxr-xr-x | home/res/edje/circle/preview.edc | 276 | ||||
-rwxr-xr-x | home/res/edje/rectangle/preview.edc | 54 | ||||
-rw-r--r-- | home/src/add-viewer.c | 64 | ||||
-rw-r--r-- | home/src/add-viewer_package.c | 20 | ||||
-rw-r--r-- | home/src/notification/summary.c | 46 |
6 files changed, 127 insertions, 346 deletions
diff --git a/home/include/conf.h b/home/include/conf.h index 5fa520a..3990555 100755 --- a/home/include/conf.h +++ b/home/include/conf.h @@ -94,17 +94,22 @@ #define ADD_WIDGET_BUTTON_HEIGHT (24+37+24) #define BUTTON_HEIGHT_REL (0.15) #define ADD_WIDGET_BUTTON_TEXT_MIN 328 86 -#define ADD_VIEWER_PREVIEW_WIDTH 216 #if CIRCLE_TYPE -#define ADD_VIEWER_PREVIEW_HEIGHT 216 +#define ADD_VIEWER_PREVIEW_WIDTH 276 +#define ADD_VIEWER_PREVIEW_HEIGHT 276 +#define ADD_VIEWER_PAGE_HEIGHT 329 +#define ADD_VIEWER_TEXT_WIDTH 130 +#define ADD_VIEWER_TEXT_HEIGHT 37 #else +#define ADD_VIEWER_PREVIEW_WIDTH 216 #define ADD_VIEWER_PREVIEW_HEIGHT 288 +#define ADD_VIEWER_PAGE_HEIGHT 377 +#define ADD_VIEWER_TEXT_WIDTH 216 +#define ADD_VIEWER_TEXT_HEIGHT 37 #endif #define ADD_VIEWER_PREVIEW_LINE_WIDTH (ADD_VIEWER_PREVIEW_WIDTH+4) #define ADD_VIEWER_PREVIEW_LINE_HEIGHT (ADD_VIEWER_PREVIEW_HEIGHT+4) -#define ADD_VIEWER_TEXT_HEIGHT 74 #define ADD_VIEWER_PAGE_WIDTH 360 -#define ADD_VIEWER_PAGE_HEIGHT 377 #define ADD_VIEWER_PREVIEW_PAD_LEFT 72 #define ADD_VIEWER_PREVIEW_PAD_TOP 7 #define ADD_VIEWER_PAD 8 diff --git a/home/res/edje/circle/preview.edc b/home/res/edje/circle/preview.edc index c08dc14..a8f3e62 100755 --- a/home/res/edje/circle/preview.edc +++ b/home/res/edje/circle/preview.edc @@ -17,41 +17,9 @@ #include "conf.edc" #include "../color_classes.edc" -styles { - style { - name: "preview,title"; - base: "font=Tizen text_class=AT0311 style=shadow shadow_color=#0000004C font_size=40 align=center color=#FFFFFF color_class=AT0311 wrap=word"; # ellipsis=1.0 - tag: "br" "\n"; - tag: "hilight" "+ font=Tizen:style=Bold"; - tag: "b" "+ font=Tizen:style=Bold"; - tag: "tag" "\t"; - } -} -styles { - style { - name: "preview,title,dim"; - base: "font=Tizen text_class=AT0312 style=shadow shadow_color=#0000004C font_size=40 align=center color=#FFFFFF color_class=AT0312 wrap=word"; # ellipsis=1.0 - tag: "br" "\n"; - tag: "hilight" "+ font=Tizen:style=Bold"; - tag: "b" "+ font=Tizen:style=Bold"; - tag: "tag" "\t"; - } -} - -styles { - style { - name: "preview,title,press"; - base: "font=Tizen text_class=AT0312 style=shadow shadow_color=#0000004C font_size=40 align=center color=#FFFFFF color_class=AT0312 wrap=word"; # ellipsis=1.0 - tag: "br" "\n"; - tag: "hilight" "+ font=Tizen:style=Bold"; - tag: "b" "+ font=Tizen:style=Bold"; - tag: "tag" "\t"; - } -} - images { image: "b_widget_favorite_bg.png" COMP; - image: "b_home_screen_widget_line.#.png" COMP; + image: "widget_circle_bg_stroke.png" COMP; image: "b_home_screen_widget_line_ef.png" COMP; image: "b_home_screen_edit_cover.png" COMP; image: "b_home_screen_edit_cover_ef.png" COMP; @@ -132,39 +100,32 @@ collections { state: "default" 0.0; rel1 { relative: 0.0 0.0; } rel2 { relative: 1.0 1.0; } - min: ADD_VIEWER_PREVIEW_WIDTH HEIGHT; color: 0 0 0 0; } } - part { name: "title"; - type: TEXTBLOCK; + type: SWALLOW; scale: 1; - multiline: 1; description { state: "default" 0.0; - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 ADD_VIEWER_TEXT_HEIGHT/HEIGHT; } - text { - style: "preview,title"; - align: 0.5 1.0; - min: 0 1; - } - min: 0 ADD_VIEWER_TEXT_HEIGHT; + rel1 { relative: 0.5 0.0; to: "preview"; } + rel2 { relative: 0.5 0.0; to: "preview"; } + min: ADD_VIEWER_TEXT_WIDTH ADD_VIEWER_TEXT_HEIGHT; + max: ADD_VIEWER_TEXT_WIDTH ADD_VIEWER_TEXT_HEIGHT; + align: 0.5 1.0; + fixed: 1 1; + visible: 1; } description { state: "hide" 0.0; inherit: "default" 0.0; - text { style: "preview,title,dim"; } } description { state: "pressed" 0.0; inherit: "default" 0.0; - text { style: "preview,title,press"; } } } - part { name: "pad"; type: SPACER; @@ -173,7 +134,6 @@ collections { state: "default" 0.0; rel1 { relative: 0.0 ADD_VIEWER_TEXT_HEIGHT/HEIGHT; } rel2 { relative: 1.0 (ADD_VIEWER_TEXT_HEIGHT+ADD_VIEWER_PAD)/HEIGHT; } - min: 0 ADD_VIEWER_PAD; } } @@ -204,42 +164,18 @@ collections { visible: 1; } } - part { name: "preview"; type: SWALLOW; - scale: 1; description { state: "default" 0.0; rel1 { relative: 0.0 (ADD_VIEWER_TEXT_HEIGHT+ADD_VIEWER_PAD)/HEIGHT; } rel2 { relative: 1.0 1.0; } - min: ADD_VIEWER_PREVIEW_WIDTH ADD_VIEWER_PREVIEW_HEIGHT; // 216, 288 } description { state: "pressed" 0.0; rel1 { relative: 5/ADD_VIEWER_PREVIEW_WIDTH (ADD_VIEWER_TEXT_HEIGHT+ADD_VIEWER_PAD+5)/HEIGHT; } rel2 { relative: (ADD_VIEWER_PREVIEW_WIDTH-5)/ADD_VIEWER_PREVIEW_WIDTH (HEIGHT-5)/HEIGHT; } - min: (ADD_VIEWER_PREVIEW_WIDTH-10) (ADD_VIEWER_PREVIEW_HEIGHT-10); - } - } - part { - name: "check_ef"; - type: IMAGE; - description { - state: "default" 0.0; - rel1 { relative: (ADD_VIEWER_PREVIEW_WIDTH-54)/ADD_VIEWER_PREVIEW_WIDTH (ADD_VIEWER_TEXT_HEIGHT+ADD_VIEWER_PAD)/HEIGHT; } - rel2 { relative: 1.0 (ADD_VIEWER_TEXT_HEIGHT+ADD_VIEWER_PAD+54)/HEIGHT; } - image { - normal: "b_home_screen_widget_check_ef.png"; - } - color_class: "AO063"; - min: 54 54; - visible: 0; - } - description { - state: "show" 0.0; - inherit: "default" 0.0; - visible: 1; } } part { @@ -263,118 +199,6 @@ collections { } } part { - name: "cover_ef"; - type: IMAGE; - scale: 1; - mouse_events: 0; - description { - state: "default" 0.0; - rel1.to: "preview"; - rel2.to: "preview"; - image { - normal: "b_home_screen_edit_cover_ef.png"; - } - color_class: "AO065"; - fixed: 1 1; - min: ITEM_EDIT_EF_WIDTH ITEM_EDIT_EF_HEIGHT; - align: 0.5 0.5; - visible: 0; - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - visible: 1; - } - } - part { - name: "cover"; - type: IMAGE; - scale: 1; - mouse_events: 0; - description { - state: "default" 0.0; - rel1.to: "preview"; - rel2.to: "preview"; - image { - normal: "b_home_screen_edit_cover.png"; - } - color_class: "AO0482"; - min: ADD_VIEWER_PREVIEW_WIDTH ADD_VIEWER_PREVIEW_HEIGHT; - visible: 1; - } - description { - state: "pressed" 0.0; - inherit: "default" 0.0; - color_class: "AO0661"; - } - } - part { - name: "line_ef"; - type: IMAGE; - scale: 1; - mouse_events: 1; - clip_to: "line_clipper"; - description { - state: "default" 0.0; - rel1 { relative: 0.5 0.5; to: "preview"; } - rel2 { relative: 0.5 0.5; to: "preview"; } - image { - normal: "b_home_screen_widget_line_ef.png"; - } - color_class: "AO063"; - fixed: 1 1; - min: ITEM_EDIT_EF_WIDTH ITEM_EDIT_EF_HEIGHT; - align: 0.5 0.5; - visible: 1; - } - description { - state: "pressed" 0.0; - inherit: "default" 0.0; - color_class: "AO0663"; - } - } - part { - name: "line_clipper"; - type: RECT; - mouse_events: 0; - description { - state: "default" 0.0; - rel1.to: "line_ef"; - rel2.to: "line_ef"; - color: 255 255 255 255; - visible: 1; - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - color: 255 255 255 0; - } - } - part { - name: "line"; - type: IMAGE; - scale: 1; - mouse_events: 1; - clip_to: "line_clipper"; - description { - state: "default" 0.0; - rel1 { relative: 0.5 0.5; to: "preview"; } - rel2 { relative: 0.5 0.5; to: "preview"; } - image { - normal: "b_home_screen_widget_line.#.png"; - } - color_class: "AO043"; - min: ADD_VIEWER_PREVIEW_LINE_WIDTH ADD_VIEWER_PREVIEW_LINE_HEIGHT; - align: 0.5 0.5; - visible: 1; - } - description { - state: "pressed" 0.0; - inherit: "default" 0.0; - color_class: "AO0662"; - } - } - part { name: "preview,dbg"; type: RECT; mouse_events: 1; @@ -396,19 +220,9 @@ collections { if (get_int(g_focus) != 0) { set_state(PART:"preview", "pressed", 0.0); set_state(PART:"title", "pressed", 0.0); - set_state(PART:"cover", "pressed", 0.0); - set_state(PART:"line", "pressed", 0.0); - set_state(PART:"line_ef", "pressed", 0.0); - set_state(PART:"line_clipper", "default", 0.0); - set_state(PART:"cover_ef", "default", 0.0); } else { set_state(PART:"preview", "pressed", 0.0); - set_state(PART:"cover", "pressed", 0.0); set_state(PART:"title", "hide", 0.0); - set_state(PART:"line", "pressed", 0.0); - set_state(PART:"line_ef", "pressed", 0.0); - set_state(PART:"line_clipper", "hide", 0.0); - set_state(PART:"cover_ef", "hide", 0.0); } } } @@ -420,19 +234,9 @@ collections { if (get_int(g_focus) != 0) { set_state(PART:"preview", "default", 0.0); set_state(PART:"title", "default", 0.0); - set_state(PART:"cover", "default", 0.0); - set_state(PART:"line", "default", 0.0); - set_state(PART:"line_ef", "default", 0.0); - set_state(PART:"line_clipper", "default", 0.0); - set_state(PART:"cover_ef", "default", 0.0); } else { set_state(PART:"preview", "default", 0.0); - set_state(PART:"cover", "default", 0.0); - set_state(PART:"line", "default", 0.0); - set_state(PART:"line_ef", "default", 0.0); set_state(PART:"title", "hide", 0.0); - set_state(PART:"line_clipper", "hide", 0.0); - set_state(PART:"cover_ef", "hide", 0.0); } } } @@ -465,71 +269,10 @@ collections { target: "gradient,bg"; } program { - name: "show,line"; - signal: "show"; - source: "line"; - action: STATE_SET "default" 0.0; - target: "title"; - after: "show,after"; - } - program { - name: "show,after"; - script { - set_int(g_focus, 1); - } - after: "show,after,2"; - } - program { - name: "show,after,2"; - action: STATE_SET "default" 0.0; - target: "line_clipper"; - target: "cover_ef"; - transition: LINEAR 0.5; - } - program { - name: "hide,line"; - signal: "hide"; - source: "line"; - action: STATE_SET "hide" 0.0; - target: "title"; - after: "hide,after"; - } - program { - name: "hide,after"; - script { - set_int(g_focus, 0); - } - after: "hide,after,2"; - } - program { - name: "hide,after,2"; - action: STATE_SET "hide" 0.0; - target: "line_clipper"; - target: "cover_ef"; - transition: LINEAR 0.5; - } - program { - name: "hide,line,im"; - signal: "hide,im"; - source: "line"; - script { - set_int(g_focus, 0); - } - after: "hide,im,after"; - } - program { - name: "hide,im,after"; - action: STATE_SET "hide" 0.0; - target: "line_clipper"; - target: "title"; - target: "cover_ef"; - } - program { name: "duplicated,mark,show"; signal: "show"; source: "duplicated"; action: STATE_SET "show" 0.0; - target: "check_ef"; target: "check"; } program { @@ -537,7 +280,6 @@ collections { signal: "hide"; source: "duplicated"; action: STATE_SET "default" 0.0; - target: "check_ef"; target: "check"; } } // programs diff --git a/home/res/edje/rectangle/preview.edc b/home/res/edje/rectangle/preview.edc index c08dc14..2aed1cc 100755 --- a/home/res/edje/rectangle/preview.edc +++ b/home/res/edje/rectangle/preview.edc @@ -17,38 +17,6 @@ #include "conf.edc" #include "../color_classes.edc" -styles { - style { - name: "preview,title"; - base: "font=Tizen text_class=AT0311 style=shadow shadow_color=#0000004C font_size=40 align=center color=#FFFFFF color_class=AT0311 wrap=word"; # ellipsis=1.0 - tag: "br" "\n"; - tag: "hilight" "+ font=Tizen:style=Bold"; - tag: "b" "+ font=Tizen:style=Bold"; - tag: "tag" "\t"; - } -} -styles { - style { - name: "preview,title,dim"; - base: "font=Tizen text_class=AT0312 style=shadow shadow_color=#0000004C font_size=40 align=center color=#FFFFFF color_class=AT0312 wrap=word"; # ellipsis=1.0 - tag: "br" "\n"; - tag: "hilight" "+ font=Tizen:style=Bold"; - tag: "b" "+ font=Tizen:style=Bold"; - tag: "tag" "\t"; - } -} - -styles { - style { - name: "preview,title,press"; - base: "font=Tizen text_class=AT0312 style=shadow shadow_color=#0000004C font_size=40 align=center color=#FFFFFF color_class=AT0312 wrap=word"; # ellipsis=1.0 - tag: "br" "\n"; - tag: "hilight" "+ font=Tizen:style=Bold"; - tag: "b" "+ font=Tizen:style=Bold"; - tag: "tag" "\t"; - } -} - images { image: "b_widget_favorite_bg.png" COMP; image: "b_home_screen_widget_line.#.png" COMP; @@ -136,35 +104,29 @@ collections { color: 0 0 0 0; } } - part { name: "title"; - type: TEXTBLOCK; + type: SWALLOW; scale: 1; - multiline: 1; description { state: "default" 0.0; - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 ADD_VIEWER_TEXT_HEIGHT/HEIGHT; } - text { - style: "preview,title"; - align: 0.5 1.0; - min: 0 1; - } - min: 0 ADD_VIEWER_TEXT_HEIGHT; + rel1 { relative: 0.5 0.0; to: "preview"; } + rel2 { relative: 0.5 0.0; to: "preview"; } + min: ADD_VIEWER_PREVIEW_WIDTH ADD_VIEWER_TEXT_HEIGHT; + max: ADD_VIEWER_PREVIEW_WIDTH ADD_VIEWER_TEXT_HEIGHT; + align: 0.5 1.0; + fixed: 1 1; + visible: 1; } description { state: "hide" 0.0; inherit: "default" 0.0; - text { style: "preview,title,dim"; } } description { state: "pressed" 0.0; inherit: "default" 0.0; - text { style: "preview,title,press"; } } } - part { name: "pad"; type: SPACER; diff --git a/home/src/add-viewer.c b/home/src/add-viewer.c index e752139..0a0ca0b 100644 --- a/home/src/add-viewer.c +++ b/home/src/add-viewer.c @@ -832,32 +832,62 @@ static void preview_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_i } } +static void _operator_name_slide_mode_set(Evas_Object *name) +{ + Evas_Object *name_edje; + Evas_Object *tb; + Evas_Coord tb_w=0; + + if (name == NULL) { + ErrPrint("paramter error!"); + } + + elm_label_slide_mode_set(name, ELM_LABEL_SLIDE_MODE_NONE); + + name_edje = elm_layout_edje_get(name); + if (!name_edje) { + ErrPrint("Failed to get label edje"); + return; + } + + tb = (Evas_Object*)edje_object_part_object_get(name_edje, "elm.text"); + if (!tb) { + ErrPrint("Failed to get label tb"); + return; + } + + evas_object_textblock_size_native_get(tb, &tb_w, NULL); + + if((tb_w>0) && (tb_w>ELM_SCALE_SIZE(ADD_VIEWER_TEXT_WIDTH))) { + elm_label_slide_mode_set(name, ELM_LABEL_SLIDE_MODE_AUTO); + } + elm_label_slide_go(name); +} + static Evas_Object *winset_preview_add(struct widget_data *widget_data, Evas_Object *parent, struct add_viewer_package *package, const char *name, int type, int no_event) { const char *size_str; const char *icon_group; Evas_Object *preview; Evas_Object *thumbnail; + Evas_Object *label; int w; int h; int ret; int idx; char *filename; Evas_Object *bg; + char buf[512] = {0, }; filename = widget_service_get_preview_image_path(add_viewer_package_list_pkgname(package), type); switch (type) { - case WIDGET_SIZE_TYPE_1x1: - size_str = "preview,1x1"; - icon_group = "default,1x1"; - idx = 8; - break; case WIDGET_SIZE_TYPE_2x2: size_str = "preview,2x2"; icon_group = "default,2x2"; idx = 8; break; + case WIDGET_SIZE_TYPE_1x1: case WIDGET_SIZE_TYPE_2x1: case WIDGET_SIZE_TYPE_4x1: case WIDGET_SIZE_TYPE_4x2: @@ -977,7 +1007,29 @@ static Evas_Object *winset_preview_add(struct widget_data *widget_data, Evas_Obj name = add_viewer_package_list_name(package); } - elm_object_part_text_set(preview, "title", name); + label = elm_label_add(preview); + if (!label) { + ErrPrint("Failed to create the label\n"); + evas_object_del(preview); + evas_object_del(thumbnail); + return NULL; + } + if (name) { + snprintf(buf, sizeof(buf), "<align=center><color=#FFFFFF>%s</color></align>", name); + } else { + snprintf(buf, sizeof(buf), "<align=center><color=#FFFFFF>%s</color></align>", " "); + } + elm_object_text_set(label, buf); + elm_object_style_set(label, "slide_short"); + elm_label_wrap_width_set(label, ELM_SCALE_SIZE(ADD_VIEWER_TEXT_WIDTH)); + evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL); + + _operator_name_slide_mode_set(label); + evas_object_show(label); + elm_object_part_content_set(preview, "title", label); + + //elm_object_part_text_set(preview, "title", name); DbgPrint("[%s] Image %dx%d\n", name, w, h); edje_object_size_min_calc(elm_layout_edje_get(preview), &w, &h); diff --git a/home/src/add-viewer_package.c b/home/src/add-viewer_package.c index 865a0aa..33db445 100644 --- a/home/src/add-viewer_package.c +++ b/home/src/add-viewer_package.c @@ -240,11 +240,11 @@ static int widget_list_callback(const char *appid, const char *widget_id, int is * If it is preloaded packages, we have not to display it on the list. */ switch (size_types[0]) { - case WIDGET_SIZE_TYPE_1x1: - case WIDGET_SIZE_TYPE_2x1: case WIDGET_SIZE_TYPE_2x2: preloaded = is_preloaded(appid); break; + case WIDGET_SIZE_TYPE_1x1: + case WIDGET_SIZE_TYPE_2x1: default: break; } @@ -256,20 +256,12 @@ static int widget_list_callback(const char *appid, const char *widget_id, int is preview = NULL; switch (size_types[cnt]) { - case WIDGET_SIZE_TYPE_1x1: - case WIDGET_SIZE_TYPE_2x1: case WIDGET_SIZE_TYPE_2x2: #if defined(CHECK_PRELOAD) if (preloaded) { continue; } #endif - case WIDGET_SIZE_TYPE_4x1: - case WIDGET_SIZE_TYPE_4x2: - case WIDGET_SIZE_TYPE_4x3: - case WIDGET_SIZE_TYPE_4x4: - case WIDGET_SIZE_TYPE_4x5: - case WIDGET_SIZE_TYPE_4x6: preview = calloc(1, sizeof(*preview)); if (!preview) { ErrPrint("Heap: %s\n", strerror(errno)); @@ -285,6 +277,14 @@ static int widget_list_callback(const char *appid, const char *widget_id, int is preview->data = NULL; preview_list = eina_list_append(preview_list, preview); break; + case WIDGET_SIZE_TYPE_1x1: + case WIDGET_SIZE_TYPE_2x1: + case WIDGET_SIZE_TYPE_4x1: + case WIDGET_SIZE_TYPE_4x2: + case WIDGET_SIZE_TYPE_4x3: + case WIDGET_SIZE_TYPE_4x4: + case WIDGET_SIZE_TYPE_4x5: + case WIDGET_SIZE_TYPE_4x6: case WIDGET_SIZE_TYPE_EASY_1x1: case WIDGET_SIZE_TYPE_EASY_3x1: case WIDGET_SIZE_TYPE_EASY_3x3: diff --git a/home/src/notification/summary.c b/home/src/notification/summary.c index 477790e..5a67114 100644 --- a/home/src/notification/summary.c +++ b/home/src/notification/summary.c @@ -16,6 +16,7 @@ */ #include <Elementary.h> +#include <pkgmgr-info.h> #include "util.h" #include "log.h" @@ -143,6 +144,7 @@ HAPI Evas_Object *summary_create_item(Evas_Object *page, const char *pkgname, co Evas_Object *icon = NULL; Evas_Object *launch_button = NULL; Evas_Object *delete_button = NULL; + pkgmgrinfo_appinfo_h appinfo_h = NULL; char *text_time = NULL; char buf[BUFSZE] = {0, }; @@ -169,22 +171,38 @@ HAPI Evas_Object *summary_create_item(Evas_Object *page, const char *pkgname, co evas_object_show(rect); elm_object_part_content_set(item, "bg", rect); - /* Icon */ - if (icon_path) { - icon = elm_icon_add(item); - goto_if(!icon, ERROR); - goto_if(elm_image_file_set(icon, icon_path, NULL) == EINA_FALSE, ERROR); + /* Icon */ + icon = elm_icon_add(item); + goto_if(!icon, ERROR); + if (icon_path) { + goto_if(elm_image_file_set(icon, icon_path, NULL) == EINA_FALSE, ERROR); + } + else { + goto_if(0 > pkgmgrinfo_appinfo_get_appinfo(pkgname, &appinfo_h), ERROR); + goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_get_icon(appinfo_h, &icon_path), ERROR); + + if (icon_path == NULL || strlen(icon_path) == 0) { + _D("actual icon_path [%s]", RESDIR"/images/unknown.png"); + goto_if(elm_image_file_set(icon, RESDIR"/images/unknown.png", NULL) == EINA_FALSE, ERROR); + } + else { + goto_if(elm_image_file_set(icon, icon_path, NULL) == EINA_FALSE, ERROR); + } - elm_image_preload_disabled_set(icon, EINA_TRUE); - elm_image_smooth_set(icon, EINA_TRUE); - elm_image_no_scale_set(icon, EINA_FALSE); + if (appinfo_h) { + pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h); + appinfo_h = NULL; + } + } + elm_image_preload_disabled_set(icon, EINA_TRUE); + elm_image_smooth_set(icon, EINA_TRUE); + elm_image_no_scale_set(icon, EINA_FALSE); - evas_object_size_hint_min_set(icon, NOTIFICATION_ICON_WIDTH, NOTIFICATION_ICON_HEIGHT); - evas_object_show(icon); + evas_object_size_hint_min_set(icon, NOTIFICATION_ICON_WIDTH, NOTIFICATION_ICON_HEIGHT); + evas_object_show(icon); - elm_object_part_content_set(item, "icon", icon); - elm_object_signal_emit(item, "show,icon", "icon"); - } + elm_object_part_content_set(item, "icon", icon); + elm_object_signal_emit(item, "show,icon", "icon"); /* Title */ if (title) { @@ -233,6 +251,8 @@ ERROR: if (icon) evas_object_del(icon); if (rect) evas_object_del(rect); if (item) evas_object_del(item); + if (appinfo_h) + pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h); return NULL; } |