From 627969763808d37b5455bbc7f3927d50fcae6987 Mon Sep 17 00:00:00 2001
From: Nick Schermer <nick@xfce.org>
Date: Fri, 12 Aug 2011 19:57:46 +0000
Subject: Accept uri-image locations.
---
diff --git a/xfce4-notifyd/xfce-notify-window.c b/xfce4-notifyd/xfce-notify-window.c
index e7612c2..891f5a5 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -1041,6 +1041,7 @@ xfce_notify_window_set_icon_name(XfceNotifyWindow *window,
const gchar *icon_name)
{
gboolean icon_set = FALSE;
+ gchar *filename;
g_return_if_fail(XFCE_IS_NOTIFY_WINDOW(window));
@@ -1052,6 +1053,12 @@ xfce_notify_window_set_icon_name(XfceNotifyWindow *window,
if(g_path_is_absolute(icon_name))
pix = gdk_pixbuf_new_from_file_at_size(icon_name, w, h, NULL);
+ else if(g_str_has_prefix (icon_name, "file://")) {
+ filename = g_filename_from_uri(icon_name, NULL, NULL);
+ if(filename)
+ pix = gdk_pixbuf_new_from_file_at_size(filename, w, h, NULL);
+ g_free(filename);
+ }
else
pix = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(),
icon_name,
--
cgit v0.9.0.3