Remove notification_icon_get wrapper

This commit is contained in:
Benedikt Heine 2018-12-28 18:48:13 +01:00
parent cd09d5a88e
commit f9f5804b08
3 changed files with 2 additions and 15 deletions

View File

@ -270,8 +270,8 @@ static struct colored_layout *layout_init_shared(cairo_t *c, const struct notifi
pango_layout_set_ellipsize(cl->l, ellipsize);
}
if (settings.icon_position != ICON_OFF) {
cl->icon = icon_get_for_notification(n);
if (settings.icon_position != ICON_OFF && n->icon) {
cl->icon = gdk_pixbuf_to_cairo_surface(n->icon);
} else {
cl->icon = NULL;
}

View File

@ -222,9 +222,4 @@ GdkPixbuf *get_pixbuf_from_raw_image(const struct raw_image *raw_image)
return pixbuf;
}
cairo_surface_t *icon_get_for_notification(const struct notification *n)
{
return gdk_pixbuf_to_cairo_surface(n->icon);
}
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */

View File

@ -41,13 +41,5 @@ GdkPixbuf *get_pixbuf_from_icon(const char *iconname);
*/
GdkPixbuf *get_pixbuf_from_raw_image(const struct raw_image *raw_image);
/**
* Get a cairo surface with the appropriate icon for the notification, scaled
* according to the current settings
*
* @return a cairo_surface_t pointer or NULL if no icon could be retrieved.
*/
cairo_surface_t *icon_get_for_notification(const struct notification *n);
#endif
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */