[mathiew schnik] Patch to support new Notification Daemon API (0.3.2)
This commit is contained in:
parent
1ef27715af
commit
a7620919f7
|
@ -143,6 +143,9 @@ class DesktopNotification:
|
||||||
except:
|
except:
|
||||||
# No way to determine the version number, set it to the latest
|
# No way to determine the version number, set it to the latest
|
||||||
# since it doesn't properly support the version number
|
# since it doesn't properly support the version number
|
||||||
|
try:
|
||||||
|
(name, version, version, spec_version) = self.notif.GetServerInformation()
|
||||||
|
except:
|
||||||
version = '0.3.1'
|
version = '0.3.1'
|
||||||
if version.startswith('0.2'):
|
if version.startswith('0.2'):
|
||||||
try:
|
try:
|
||||||
|
@ -154,6 +157,11 @@ class DesktopNotification:
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
version = '0.3.1' # we're actually dealing with the newer version
|
version = '0.3.1' # we're actually dealing with the newer version
|
||||||
if version.startswith('0.3'):
|
if version.startswith('0.3'):
|
||||||
|
if version >= ( 0, 3, 2):
|
||||||
|
self.id = self.notif.Notify(dbus.String(_('Gajim')),
|
||||||
|
dbus.UInt32(0), dbus.String(path_to_image), dbus.String(event_type),
|
||||||
|
dbus.String(text), ( dbus.String(ntype), dbus.String(event_type) ), {}, dbus.UInt32(timeout*1000))
|
||||||
|
else:
|
||||||
self.id = self.notif.Notify(dbus.String(_('Gajim')),
|
self.id = self.notif.Notify(dbus.String(_('Gajim')),
|
||||||
dbus.String(path_to_image), dbus.UInt32(0), dbus.String(event_type),
|
dbus.String(path_to_image), dbus.UInt32(0), dbus.String(event_type),
|
||||||
dbus.String(text), dbus.String(''), {}, dbus.UInt32(timeout*1000))
|
dbus.String(text), dbus.String(''), {}, dbus.UInt32(timeout*1000))
|
||||||
|
|
Loading…
Reference in New Issue