notification-daemon doesn't seem to like empty text string.

This commit is contained in:
Yann Leboulanger 2008-12-19 18:48:25 +00:00
parent 08bb703640
commit 8cf97654b8
1 changed files with 6 additions and 1 deletions

View File

@ -542,12 +542,17 @@ class DesktopNotification:
if version >= [0, 3, 2]: if version >= [0, 3, 2]:
hints['urgency'] = dbus.Byte(0) # Low Urgency hints['urgency'] = dbus.Byte(0) # Low Urgency
hints['category'] = dbus.String(ntype) hints['category'] = dbus.String(ntype)
# it seems notification-daemon doesn't like empty text
if self.text:
text = self.text
else:
text = ' '
self.notif.Notify( self.notif.Notify(
dbus.String(_('Gajim')), dbus.String(_('Gajim')),
dbus.UInt32(0), # this notification does not replace other dbus.UInt32(0), # this notification does not replace other
dbus.String(self.path_to_image), dbus.String(self.path_to_image),
dbus.String(self.title), dbus.String(self.title),
dbus.String(self.text), dbus.String(text),
( dbus.String('default'), dbus.String(self.event_type) ), ( dbus.String('default'), dbus.String(self.event_type) ),
hints, hints,
dbus.UInt32(timeout*1000), dbus.UInt32(timeout*1000),