[Xfce4-commits] <xfce4-notifyd:master> Accept uri-image locations.
Nick Schermer
noreply at xfce.org
Fri Aug 12 22:00:01 CEST 2011
Updating branch refs/heads/master
to 627969763808d37b5455bbc7f3927d50fcae6987 (commit)
from 47d83a6187c636439f5dac46168ed8fa7f59e0f9 (commit)
commit 627969763808d37b5455bbc7f3927d50fcae6987
Author: Nick Schermer <nick at xfce.org>
Date: Fri Aug 12 21:57:46 2011 +0200
Accept uri-image locations.
xfce4-notifyd/xfce-notify-window.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
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,
More information about the Xfce4-commits
mailing list