fix TB when python-notify is installed but not notification-daemon. fixes #2893
This commit is contained in:
parent
dc4f4922af
commit
99b08744ed
|
@ -320,13 +320,17 @@ def popup(event_type, jid, account, msg_type = '', path_to_image = None,
|
||||||
notification.add_action('default', 'Default Action',
|
notification.add_action('default', 'Default Action',
|
||||||
on_pynotify_notification_clicked)
|
on_pynotify_notification_clicked)
|
||||||
|
|
||||||
notification.show()
|
try:
|
||||||
|
notification.show()
|
||||||
|
return
|
||||||
|
except gobject.GError, e:
|
||||||
|
# Connection to notification-daemon failed, see #2893
|
||||||
|
gajim.log.debug(str(e))
|
||||||
|
|
||||||
else: # go old style
|
# go old style
|
||||||
instance = dialogs.PopupNotificationWindow(event_type, jid,
|
instance = dialogs.PopupNotificationWindow(event_type, jid, account,
|
||||||
account, msg_type, path_to_image, title, text)
|
msg_type, path_to_image, title, text)
|
||||||
gajim.interface.roster.popup_notification_windows.append(
|
gajim.interface.roster.popup_notification_windows.append(instance)
|
||||||
instance)
|
|
||||||
|
|
||||||
def on_pynotify_notification_clicked(notification, action):
|
def on_pynotify_notification_clicked(notification, action):
|
||||||
jid = notification.get_data('jid')
|
jid = notification.get_data('jid')
|
||||||
|
|
Loading…
Reference in New Issue