On Mon, 2011-05-02 at 12:09 +0200, Vincent Untz wrote:
d) libnotify API changed
A few functions were removed, and an argument to notify_notification_new() was removed.
The solution for this issue is not too hard. The first thing to do is to check upstream if a fix got committed already. Else, a patch can be easily written. An example can be found at: https://build.opensuse.org/stage/package/view_file?file=tsclient-libnotify07.patch&package=tsclient&project=GNOME%3AApps
A different way for the same is to do what most upstream projects seem to be merging: Given that libnotify 0.7.0 (and newer) changed the API call for notify_notification_new to require one parameter less, and given that NOTIFY_CHECK_VERSION() was introduce a little bit late (in libnotify 0.5.0 actually), you can use these samples: Introduce the NOTIFY_CHECK_VERSION macro. We do not know which version it is, so we assume "0" +ifndef NOTIFY_CHECK_VERSION +define NOTIFY_CHECK_VERSION(x,y,z) 0 +endif Then the various API calls can be captured like this: +if !NOTIFY_CHECK_VERSION(0,7,0) n = notify_notification_new (summary, body, GTK_STOCK_DIALOG_INFO, NULL); +#else + n = notify_notification_new (summary, body, GTK_STOCK_DIALOG_INFO); +#endif Of course which one looks neater or not is in the eye of the viewer. It's just that introducing the NOTIFY_CHECK_VERSION makes the code more 'future readable' as it's how most future checks for LIBNOTIFY will be handled.. so let's start this now. Dominique -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org