! 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 !
xfdesktop fails to build with libnotify 0.7.x
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Christoph Wickert editbugs 2010-12-04 19:24:58 CET
There have been a couple of changes in libnotify 0.7.0:
notify_notification_new_with_status_icon   is gone
notify_notification_attach_to_status_icon  is gone
notify_notification_attach_to_widget       is gone
notify_notification_set_geometry_hints     is gone
notify_notification_new                    has lost its widget argument

The last one breaks xfdesktop:
xfdesktop-notify.c: In function 'xfdesktop_notify_unmount':
xfdesktop-notify.c:147:3: error: too many arguments to function 'notify_notification_new'
/usr/include/libnotify/notification.h:79:21: note: declared here
xfdesktop-notify.c: In function 'xfdesktop_notify_eject':
xfdesktop-notify.c:263:3: error: too many arguments to function 'notify_notification_new'
/usr/include/libnotify/notification.h:79:21: note: declared here
make[3]: *** [xfdesktop-xfdesktop-notify.o] Error 1

I was able to work around the problem with this simple fix:
$ diff -u xfdesktop-4.7.3.orig/src/xfdesktop-notify.c xfdesktop-4.7.3/src/xfdesktop-notify.c 
--- xfdesktop-4.7.3.orig/src/xfdesktop-notify.c	2010-12-04 11:28:19.000000000 +0100
+++ xfdesktop-4.7.3/src/xfdesktop-notify.c	2010-12-04 18:57:48.417090825 +0100
@@ -144,7 +144,7 @@
                                    name);
     }
 
-  notification = notify_notification_new (summary, message, icon_name, NULL);
+  notification = notify_notification_new (summary, message, icon_name);
   notify_notification_set_urgency (notification, NOTIFY_URGENCY_CRITICAL);
   notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER);
   notify_notification_show (notification, NULL);
@@ -260,7 +260,7 @@
                                    name);
     }
 
-  notification = notify_notification_new (summary, message, icon_name, NULL);
+  notification = notify_notification_new (summary, message, icon_name);
   notify_notification_set_urgency (notification, NOTIFY_URGENCY_CRITICAL);
   notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER);
   notify_notification_show (notification, NULL);

Of course there needs to be a proper detection of the libnotify version, but I'm too lazy for this right now.
Comment 1 Nick Schermer editbugs 2010-12-04 22:46:26 CET
Fixed in ccfa0d3.

Bug #6915

Reported by:
Christoph Wickert
Reported on: 2010-12-04
Last modified on: 2010-12-04

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
2 users

Version

Attachments

Additional information