This is for package maintainers that their distro also offers (or is likely that user has) 0.3.x version of notification-daemon.
In that version, they break their API. So for Gajim to work under 0.3 the attached patch is needed. Please note that with this patch, Gajim continues to work ok with 0.2.x version of notification-daemon. patch adopted to 0.9.1 (from svn) by Dawid Gajownik (FC packager), thanks Dawid. Thank you for your attention PS. packagers maintainers are encouraged to subscribe to [EMAIL PROTECTED] which will contain such announcements as well announcements on releases and pre-releases. This means that they can follow that information, without traffic about devel. -- Nikos Kouremenos
diff -Nur gajim-0.9.1.orig/src/notify.py gajim-0.9.1/src/notify.py --- gajim-0.9.1.orig/src/notify.py 2005-12-27 01:07:44.000000000 +0100 +++ gajim-0.9.1/src/notify.py 2006-03-30 01:34:02.000000000 +0200 @@ -189,10 +189,29 @@ self.notif = dbus_support.get_notifications_interface() if self.notif is None: raise dbus.dbus_bindings.DBusException() - self.id = self.notif.Notify(dbus.String(_('Gajim')), - dbus.String(path), dbus.UInt32(0), ntype, dbus.Byte(0), - dbus.String(event_type), dbus.String(txt), - [dbus.String(path)], {'default':0}, [''], True, dbus.UInt32(5)) + timeout = gajim.config.get('notification_timeout') # in seconds + # Determine the version of notifications + # FIXME: This code is blocking, as is the next set. That should be fixed + # now that we have a class to encapsulate this behavior + try: + (name, vendor, version) = self.notif.GetServerInfo() + except: + # No way to determine the version number, set it to the latest + # since it doesn't properly support the version number + version = '0.3.1' + if version.startswith('0.2'): + try: + self.id = self.notif.Notify(dbus.String(_('Gajim')), + dbus.String(path), dbus.UInt32(0), ntype, dbus.Byte(0), + dbus.String(event_type), dbus.String(txt), + [dbus.String(path)], {'default': 0}, [''], True, dbus.UInt32( + timeout)) + except AttributeError: + version = '0.3.1' # we're actually dealing with the newer version + if version.startswith('0.3'): + self.id = self.notif.Notify(dbus.String(_('Gajim')), + dbus.String(path), dbus.UInt32(0), dbus.String(event_type), + dbus.String(txt), dbus.String(""), {}, dbus.UInt32(timeout*1000)) notification_response_manager.attach_to_interface() notification_response_manager.pending[self.id] = self
_______________________________________________ Gajim-devel mailing list Gajim-devel@gajim.org https://lists.gajim.org/cgi-bin/listinfo/gajim-devel