only use nice 48x48 img
This commit is contained in:
parent
69fe0f02d7
commit
c914a0d058
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
|
@ -110,17 +110,11 @@ class DesktopNotification:
|
||||||
else:
|
else:
|
||||||
actor = jid
|
actor = jid
|
||||||
|
|
||||||
# default value of txt
|
|
||||||
txt = actor
|
|
||||||
|
|
||||||
img = 'chat.png' # img to display
|
|
||||||
ntype = 'im' # Notification Type
|
|
||||||
|
|
||||||
if event_type == _('Contact Signed In'):
|
if event_type == _('Contact Signed In'):
|
||||||
img = 'online.png'
|
img = 'contact_online.png'
|
||||||
ntype = 'presence.online'
|
ntype = 'presence.online'
|
||||||
elif event_type == _('Contact Signed Out'):
|
elif event_type == _('Contact Signed Out'):
|
||||||
img = 'offline.png'
|
img = 'contact_offline.png'
|
||||||
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')):
|
||||||
|
@ -182,18 +176,14 @@ class DesktopNotification:
|
||||||
img = 'ft_stopped.png'
|
img = 'ft_stopped.png'
|
||||||
else:
|
else:
|
||||||
txt = ''
|
txt = ''
|
||||||
|
else: # failsafe values
|
||||||
|
img = 'chat_msg_recv.png' # img to display
|
||||||
|
ntype = 'im' # Notification Type
|
||||||
|
txt = actor # default value of txt
|
||||||
|
|
||||||
path = os.path.join(gajim.DATA_DIR, 'pixmaps', 'events', img)
|
path = os.path.join(gajim.DATA_DIR, 'pixmaps', 'events', img)
|
||||||
path = os.path.abspath(path)
|
path = os.path.abspath(path)
|
||||||
|
|
||||||
if not os.path.exists(path): # we may use img from iconset
|
|
||||||
iconset = gajim.config.get('iconset')
|
|
||||||
iconset = gajim.config.get('iconset')
|
|
||||||
if not iconset:
|
|
||||||
iconset = 'sun'
|
|
||||||
path = os.path.join(gajim.DATA_DIR, 'iconsets', iconset, '16x16', img)
|
|
||||||
path = os.path.abspath(path)
|
|
||||||
|
|
||||||
self.notif = dbus_support.get_notifications_interface()
|
self.notif = dbus_support.get_notifications_interface()
|
||||||
if self.notif is None:
|
if self.notif is None:
|
||||||
raise dbus.DBusException()
|
raise dbus.DBusException()
|
||||||
|
|
Loading…
Reference in New Issue