diff --git a/src/notify.py b/src/notify.py index 934be11eb1255ed4c1b42e4d4edf0c6a0f98b865..1534734da792f332e032232a871c0f1bbd9740f9 100644 --- a/src/notify.py +++ b/src/notify.py @@ -132,27 +132,36 @@ class DesktopNotification: if event_type == _('Contact Signed In'): ntype = 'presence.online' + button_text = _('Start Chat with Contact') elif event_type == _('Contact Signed Out'): ntype = 'presence.offline' elif event_type in (_('New Message'), _('New Single Message'), _('New Private Message')): ntype = 'im.received' + button_text = _('Focus Received Message') elif event_type == _('File Transfer Request'): ntype = 'transfer' + button_text = _('Manage File Transfer') elif event_type == _('File Transfer Error'): ntype = 'transfer.error' + button_text = _('Manage File Transfer') elif event_type in (_('File Transfer Completed'), _('File Transfer Stopped')): ntype = 'transfer.complete' + button_text = _('Manage File Transfer') elif event_type == _('New E-mail'): ntype = 'email.arrived' + button_text = _('View New E-Mail') elif event_type == _('Groupchat Invitation'): ntype = 'im.invitation' + button_text = _('Manage Invitation') else: # default failsafe values self.path_to_image = os.path.abspath( os.path.join(gajim.DATA_DIR, 'pixmaps', 'events', 'chat_msg_recv.png')) # img to display ntype = 'im' # Notification Type + button_text = event_type + self.response_description = button_text self.notif = dbus_support.get_notifications_interface() if self.notif is None: @@ -195,7 +204,8 @@ class DesktopNotification: dbus.String(self.path_to_image), dbus.String(self.event_type), dbus.String(self.text), - ( dbus.String('default'), dbus.String(self.event_type) ), + ( dbus.String(ntype), + dbus.String(self.response_description) ), hints, dbus.UInt32(timeout*1000), reply_handler=self.attach_by_id,