forked from enlightenment/enlightenment
rewrite image handler to work more like notification-daemon (aka correctly)
SVN revision: 64701
This commit is contained in:
parent
b516fb6bb1
commit
26d555de4d
|
@ -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 */
|
/* 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))
|
if (!ecore_file_exists(icon_path))
|
||||||
{
|
{
|
||||||
const char *new_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 e_icon_size_get(popup->app_icon, &w, &h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
if ((!img) && (!popup->app_icon))
|
||||||
img = e_notification_hint_icon_data_get(popup->notif);
|
img = e_notification_hint_icon_data_get(popup->notif);
|
||||||
if (!img) img = e_notification_hint_image_data_get(popup->notif);
|
|
||||||
if (img)
|
if (img)
|
||||||
{
|
{
|
||||||
popup->app_icon = e_notification_image_evas_object_add(popup->e,
|
popup->app_icon = e_notification_image_evas_object_add(popup->e, img);
|
||||||
img);
|
|
||||||
evas_object_image_filled_set(popup->app_icon, EINA_TRUE);
|
evas_object_image_filled_set(popup->app_icon, EINA_TRUE);
|
||||||
evas_object_image_alpha_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);
|
evas_object_image_size_get(popup->app_icon, &w, &h);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!popup->app_icon)
|
if (!popup->app_icon)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue