rewrite image handler to work more like notification-daemon (aka correctly)

SVN revision: 64701
This commit is contained in:
Mike Blumenkrantz 2011-11-03 14:32:55 +00:00
parent b516fb6bb1
commit 26d555de4d
1 changed files with 39 additions and 36 deletions

View File

@ -392,9 +392,15 @@ _notification_popup_refresh(Popup_Data *popup)
}
/* Check if the app specify an icon either by a path or by a hint */
if ((icon_path = e_notification_app_icon_get(popup->notif)) && *icon_path)
img = e_notification_hint_image_data_get(popup->notif);
if (!img)
{
if (!memcmp(icon_path, "file://", 7)) icon_path += 7;
icon_path = e_notification_hint_image_path_get(popup->notif);
if ((!icon_path) || (!icon_path[0]))
icon_path = e_notification_app_icon_get(popup->notif);
if (icon_path)
{
if (!strncmp(icon_path, "file://", 7)) icon_path += 7;
if (!ecore_file_exists(icon_path))
{
const char *new_path;
@ -429,19 +435,16 @@ _notification_popup_refresh(Popup_Data *popup)
else e_icon_size_get(popup->app_icon, &w, &h);
}
}
else
{
}
if ((!img) && (!popup->app_icon))
img = e_notification_hint_icon_data_get(popup->notif);
if (!img) img = e_notification_hint_image_data_get(popup->notif);
if (img)
{
popup->app_icon = e_notification_image_evas_object_add(popup->e,
img);
popup->app_icon = e_notification_image_evas_object_add(popup->e, img);
evas_object_image_filled_set(popup->app_icon, EINA_TRUE);
evas_object_image_alpha_set(popup->app_icon, EINA_TRUE);
evas_object_image_size_get(popup->app_icon, &w, &h);
}
}
if (!popup->app_icon)
{