! 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-power-manager-1.0.3 (and git) fails to compile with libnotify-0.7 API
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Samuli Suominen 2011-01-29 15:28:32 CET
[ .. ]

xfpm-notify.c: In function ‘xfpm_notify_new_notification_internal’:
xfpm-notify.c:212:5: error: too many arguments to function ‘notify_notification_new’
/usr/include/libnotify/notification.h:114:21: note: declared here
make[3]: *** [xfce4_power_manager-xfpm-notify.o] Error 1

[ .. ]

See how this should be fixed from Xfce Core packages where it works, or here:

http://bugzilla.xfce.org/show_bug.cgi?id=7204
http://git.gnome.org/browse/network-manager-applet/commit/?id=68459b6b864ad45a842bfd1bdc80f126829ef596
Comment 1 Samuli Suominen 2011-01-29 15:34:53 CET
Created attachment 3440 
Fix for libnotify-0.7

The code could look like this, just needs the autotools bits added
Comment 2 Ali Abdallah editbugs 2011-02-15 10:32:43 CET
Applied, thanks!

Will go into 1.1.0
Comment 3 Samuli Suominen 2011-02-15 13:39:21 CET
Sorry for attaching the incomplete patch here but I said "just needs the autotools bits added" so it wasn't complete :)

Since you propably want a version that doesn't need configure.ac editing. Here:

First add this after including notify.h to keep compability with old libnotify versions that didn't define NOTIFY_CHECK_VERSION yet:

#ifndef NOTIFY_CHECK_VERSION
#define NOTIFY_CHECK_VERSION(x,y,z) 0
#endif 

Then you can use:

#if NOTIFY_CHECK_VERSION (0, 7, 0) 
do stuff that 0.7 supports
#else
do stuff that 0.4 and 0.5 supports
#endif

Examples here:

http://git.xfce.org/apps/orage/commit/?id=bfa601ba135f84163eded2bb2e060e21d9ca08ce

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-i18n/uim/files/uim-1.6.1-libnotify-0.7.patch?revision=1.1&view=markup
Comment 4 Ali Abdallah editbugs 2011-02-15 15:31:26 CET
Thanks, fixed, please reopen in case of problems.

Bug #7205

Reported by:
Samuli Suominen
Reported on: 2011-01-29
Last modified on: 2011-02-15

People

Assignee:
Ali Abdallah
CC List:
0 users

Version

Attachments

Fix for libnotify-0.7 (606 bytes, patch)
2011-01-29 15:34 CET , Samuli Suominen
no flags

Additional information