Hello, I've written a small patch to conform notifications to the
notify-osd spec (that is to say that the icons should not be resized
to 48x48)
Unfortunately it introduces a crash, which seems related to libnotify
and not to empathy, when the code reaches the call to
notify_get_server_info.
I would like you to test it, to see if the problem is in notify-osd or
in my code (even if I did a copy paste from an ubuntu howto [1]).
Does it crash in your non-ubuntu karmic installations?
See bug http://bugzilla.gnome.org/show_bug.cgi?id=588054
[1]
https://wiki.ubuntu.com/NotificationDevelopmentGuidelines#If%20a%20notification%E2%80%99s%20icon%20looks%20blurry%20or%20jagged
diff --git a/src/empathy-misc.c b/src/empathy-misc.c
index a1a0847..7d521b7 100644
--- a/src/empathy-misc.c
+++ b/src/empathy-misc.c
@@ -26,6 +26,7 @@
#include <libempathy/empathy-utils.h>
#include <libempathy-gtk/empathy-ui-utils.h>
#include <libempathy-gtk/empathy-conf.h>
+#include <libnotify/notify.h>
/* public methods */
@@ -34,16 +35,29 @@ empathy_misc_get_pixbuf_for_notification (EmpathyContact *contact,
const char *icon_name)
{
GdkPixbuf *pixbuf = NULL;
+ gint size;
+ gchar *server_name = NULL;
+
+ notify_get_server_info (&server_name, NULL, NULL, NULL);
+
+ if (!g_strcmp0 ("notification-daemon", server_name)) {
+ size = 48;
+ }
+ else {
+ size = 128;
+ }
if (contact != NULL) {
pixbuf = empathy_pixbuf_avatar_from_contact_scaled (contact,
- 48, 48);
+ size, size);
}
if (!pixbuf) {
pixbuf = empathy_pixbuf_from_icon_name_sized
- (icon_name, 48);
+ (icon_name, size);
}
+
+ g_free (server_name);
return pixbuf;
}
_______________________________________________
telepathy mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/telepathy