! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-notifyd 0.2.0 can't load a custom icon
Status:
RESOLVED: FIXED
Product:
Xfce4-notifyd
Component:
general

Comments

Description Yves-Alexis Perez editbugs 2010-11-29 20:58:54 CET
Created attachment 3220 
implement loading icon with paths

Hey,

custom icons (using a path instead of an icon name) won't work in xfce4-notifyd.

This is because icon loading in xfce_notify_window_set_icon_name() is done using gtk_icon_theme_load_icon() which only picks an icon name, while 0.1.0 was using xfce_themed_icon_load() from libxfcegui4, which could pick an icon name or path.

Since xfce_themed_icon_load() doesn't exist anymore in libxfce4ui, I've just added the same trick it was using in xfce4-notifyd.

Attached patch fix the problem for me.
Comment 1 Nick Schermer editbugs 2010-11-29 21:12:03 CET
21:05 <+NSchermer> g_you don't need to test the path, just use 
                   g_path_is_absolute
21:05 <+NSchermer> function will return null if not found
21:07 <+Corsac> (i've just used what used the function in libxfcegui4 to be 
                honest :)
21:07 <+NSchermer> you could also fix 
                   gtk_image_set_from_pixbuf(GTK_IMAGE(window->icon), NULL); > 
                   should be gtk_image_clear(GTK_IMAGE(window->icon))
21:07 <+NSchermer> just saying... there is a function for it
21:08 <+NSchermer> and it does exactly the same
21:09 <+NSchermer> asuming the file always exists, you now test the file 2 times
21:10 <+Corsac> I'll let jeromeg do that :)
Comment 2 Yves-Alexis Perez editbugs 2010-11-29 21:17:23 CET
Created attachment 3221 
implement loading icon with paths, updated
Comment 3 Jérôme Guelfucci editbugs 2010-11-29 23:40:24 CET
Pushed to git master, thanks for the patch.

Bug #6895

Reported by:
Yves-Alexis Perez
Reported on: 2010-11-29
Last modified on: 2010-11-29

People

Assignee:
Jérôme Guelfucci
CC List:
1 user

Version

Version:
unspecified

Attachments

implement loading icon with paths (842 bytes, patch)
2010-11-29 20:58 CET , Yves-Alexis Perez
no flags
implement loading icon with paths, updated (1.06 KB, patch)
2010-11-29 21:17 CET , Yves-Alexis Perez
no flags

Additional information