revert buttons in notif-daemon popups. notif-daemon new release will fix position bug reported as attach in #1537
This commit is contained in:
parent
6ecdbb7470
commit
99276b5b8b
1 changed files with 5 additions and 26 deletions
|
@ -1,19 +1,8 @@
|
||||||
## notify.py
|
## notify.py
|
||||||
##
|
##
|
||||||
## Contributors for this file:
|
## Copyright (C) 2005-2006 Yann Le Boulanger <asterix@lagaule.org>
|
||||||
## - Yann Le Boulanger <asterix@lagaule.org>
|
## Copyright (C) 2005-2006 Nikos Kouremenos <kourem@gmail.com>
|
||||||
## - Nikos Kouremenos <kourem@gmail.com>
|
## Copyright (C) 2005-2006 Andrew Sayman <lorien420@myrealbox.com>
|
||||||
## - Dimitur Kirov <dkirov@gmail.com>
|
|
||||||
## - Andrew Sayman <lorien420@myrealbox.com>
|
|
||||||
##
|
|
||||||
## Copyright (C) 2003-2004 Yann Le Boulanger <asterix@lagaule.org>
|
|
||||||
## Vincent Hanquez <tab@snarc.org>
|
|
||||||
## Copyright (C) 2005 Yann Le Boulanger <asterix@lagaule.org>
|
|
||||||
## Vincent Hanquez <tab@snarc.org>
|
|
||||||
## Nikos Kouremenos <nkour@jabber.org>
|
|
||||||
## Dimitur Kirov <dkirov@gmail.com>
|
|
||||||
## Travis Shirk <travis@pobox.com>
|
|
||||||
## Norman Rasmussen <norman@rasmussen.co.za>
|
|
||||||
##
|
##
|
||||||
## DBUS/libnotify connection code:
|
## DBUS/libnotify connection code:
|
||||||
## Copyright (C) 2005 by Sebastian Estienne
|
## Copyright (C) 2005 by Sebastian Estienne
|
||||||
|
@ -130,38 +119,29 @@ class DesktopNotification:
|
||||||
if not text:
|
if not text:
|
||||||
self.text = gajim.get_name_from_jid(account, jid) # default value of text
|
self.text = gajim.get_name_from_jid(account, jid) # default value of text
|
||||||
|
|
||||||
button_text = event_type
|
|
||||||
if event_type == _('Contact Signed In'):
|
if event_type == _('Contact Signed In'):
|
||||||
ntype = 'presence.online'
|
ntype = 'presence.online'
|
||||||
button_text = _('Start Chat with Contact')
|
|
||||||
elif event_type == _('Contact Signed Out'):
|
elif event_type == _('Contact Signed Out'):
|
||||||
ntype = 'presence.offline'
|
ntype = 'presence.offline'
|
||||||
elif event_type in (_('New Message'), _('New Single Message'),
|
elif event_type in (_('New Message'), _('New Single Message'),
|
||||||
_('New Private Message')):
|
_('New Private Message')):
|
||||||
ntype = 'im.received'
|
ntype = 'im.received'
|
||||||
button_text = _('Focus Received Message')
|
|
||||||
elif event_type == _('File Transfer Request'):
|
elif event_type == _('File Transfer Request'):
|
||||||
ntype = 'transfer'
|
ntype = 'transfer'
|
||||||
button_text = _('Manage File Transfer')
|
|
||||||
elif event_type == _('File Transfer Error'):
|
elif event_type == _('File Transfer Error'):
|
||||||
ntype = 'transfer.error'
|
ntype = 'transfer.error'
|
||||||
button_text = _('Manage File Transfer')
|
|
||||||
elif event_type in (_('File Transfer Completed'), _('File Transfer Stopped')):
|
elif event_type in (_('File Transfer Completed'), _('File Transfer Stopped')):
|
||||||
ntype = 'transfer.complete'
|
ntype = 'transfer.complete'
|
||||||
button_text = _('Manage File Transfer')
|
|
||||||
elif event_type == _('New E-mail'):
|
elif event_type == _('New E-mail'):
|
||||||
ntype = 'email.arrived'
|
ntype = 'email.arrived'
|
||||||
button_text = _('View New E-Mail')
|
|
||||||
elif event_type == _('Groupchat Invitation'):
|
elif event_type == _('Groupchat Invitation'):
|
||||||
ntype = 'im.invitation'
|
ntype = 'im.invitation'
|
||||||
button_text = _('Manage Invitation')
|
|
||||||
else:
|
else:
|
||||||
# default failsafe values
|
# default failsafe values
|
||||||
self.path_to_image = os.path.abspath(
|
self.path_to_image = os.path.abspath(
|
||||||
os.path.join(gajim.DATA_DIR, 'pixmaps', 'events',
|
os.path.join(gajim.DATA_DIR, 'pixmaps', 'events',
|
||||||
'chat_msg_recv.png')) # img to display
|
'chat_msg_recv.png')) # img to display
|
||||||
ntype = 'im' # Notification Type
|
ntype = 'im' # Notification Type
|
||||||
self.response_description = button_text
|
|
||||||
|
|
||||||
self.notif = dbus_support.get_notifications_interface()
|
self.notif = dbus_support.get_notifications_interface()
|
||||||
if self.notif is None:
|
if self.notif is None:
|
||||||
|
@ -204,8 +184,7 @@ class DesktopNotification:
|
||||||
dbus.String(self.path_to_image),
|
dbus.String(self.path_to_image),
|
||||||
dbus.String(self.event_type),
|
dbus.String(self.event_type),
|
||||||
dbus.String(self.text),
|
dbus.String(self.text),
|
||||||
( dbus.String(ntype),
|
( dbus.String('default'), dbus.String(self.event_type) ),
|
||||||
dbus.String(self.response_description) ),
|
|
||||||
hints,
|
hints,
|
||||||
dbus.UInt32(timeout*1000),
|
dbus.UInt32(timeout*1000),
|
||||||
reply_handler=self.attach_by_id,
|
reply_handler=self.attach_by_id,
|
||||||
|
|
Loading…
Add table
Reference in a new issue