From: Enlightenment S. <no-...@en...> - 2011-11-08 12:34:11
|
Log: fix some issues pointed out by raster Author: discomfitor Date: 2011-11-08 04:34:02 -0800 (Tue, 08 Nov 2011) New Revision: 64943 Trac: http://trac.enlightenment.org/e/changeset/64943 Modified: trunk/e_dbus/src/lib/notification/notification.c Modified: trunk/e_dbus/src/lib/notification/notification.c =================================================================== --- trunk/e_dbus/src/lib/notification/notification.c 2011-11-08 12:07:50 UTC (rev 64942) +++ trunk/e_dbus/src/lib/notification/notification.c 2011-11-08 12:34:02 UTC (rev 64943) @@ -378,12 +378,9 @@ EAPI Eina_Bool e_notification_image_init(E_Notification_Image *img, Evas_Object *obj) { - Eina_Bool rgb = EINA_TRUE; EINA_SAFETY_ON_NULL_RETURN_VAL(img, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE); - img->data = evas_object_image_data_convert(obj, EVAS_COLORSPACE_ARGB8888); - if (img->data) rgb = EINA_FALSE; - else img->data = evas_object_image_data_get(obj, EINA_FALSE); + img->data = evas_object_image_data_get(obj, EINA_FALSE); if (!img->data) return EINA_FALSE; evas_object_image_size_get(obj, &img->width, &img->height); if ((!img->width) || (!img->height)) @@ -392,10 +389,9 @@ img->width = img->height = 0; return EINA_FALSE; } - img->has_alpha = 1; - img->channels = 4; + img->has_alpha = evas_object_image_alpha_get(obj); + img->channels = img->has_alpha ? 4 : 3; img->rowstride = evas_object_image_stride_get(obj); - if (rgb) evas_object_image_data_set(obj, img->data); img->free_data = EINA_FALSE; return EINA_TRUE; } |