[Lukas and I] use 'event' instead of 'message' as icons names ans
states. Fix #2755.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 541 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 428 B |
Before Width: | Height: | Size: 815 B After Width: | Height: | Size: 815 B |
Before Width: | Height: | Size: 523 B After Width: | Height: | Size: 523 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 308 B After Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
@ -1457,13 +1457,13 @@ class ChatControl(ChatControlBase):
|
||||||
jid = self.contact.jid
|
jid = self.contact.jid
|
||||||
num_unread = len(gajim.events.get_events(self.account, jid,
|
num_unread = len(gajim.events.get_events(self.account, jid,
|
||||||
['printed_' + self.type_id, self.type_id]))
|
['printed_' + self.type_id, self.type_id]))
|
||||||
# Set tab image (always 16x16); unread messages show the 'message' image
|
# Set tab image (always 16x16); unread messages show the 'event' image
|
||||||
tab_img = None
|
tab_img = None
|
||||||
|
|
||||||
if num_unread and gajim.config.get('show_unread_tab_icon'):
|
if num_unread and gajim.config.get('show_unread_tab_icon'):
|
||||||
img_16 = gajim.interface.roster.get_appropriate_state_images(
|
img_16 = gajim.interface.roster.get_appropriate_state_images(
|
||||||
self.contact.jid, icon_name = 'message')
|
self.contact.jid, icon_name = 'event')
|
||||||
tab_img = img_16['message']
|
tab_img = img_16['event']
|
||||||
else:
|
else:
|
||||||
contact = gajim.contacts.get_contact_with_highest_priority(
|
contact = gajim.contacts.get_contact_with_highest_priority(
|
||||||
self.account, self.contact.jid)
|
self.account, self.contact.jid)
|
||||||
|
|
|
@ -547,14 +547,14 @@ def get_global_status():
|
||||||
def get_icon_name_to_show(contact, account = None):
|
def get_icon_name_to_show(contact, account = None):
|
||||||
'''Get the icon name to show in online, away, requested, ...'''
|
'''Get the icon name to show in online, away, requested, ...'''
|
||||||
if account and gajim.events.get_nb_roster_events(account, contact.jid):
|
if account and gajim.events.get_nb_roster_events(account, contact.jid):
|
||||||
return 'message'
|
return 'event'
|
||||||
if account and gajim.events.get_nb_roster_events(account,
|
if account and gajim.events.get_nb_roster_events(account,
|
||||||
contact.get_full_jid()):
|
contact.get_full_jid()):
|
||||||
return 'message'
|
return 'event'
|
||||||
if account and gajim.interface.minimized_controls.has_key(account) and \
|
if account and gajim.interface.minimized_controls.has_key(account) and \
|
||||||
contact.jid in gajim.interface.minimized_controls[account] and gajim.interface.\
|
contact.jid in gajim.interface.minimized_controls[account] and gajim.interface.\
|
||||||
minimized_controls[account][contact.jid].get_nb_unread_pm() > 0:
|
minimized_controls[account][contact.jid].get_nb_unread_pm() > 0:
|
||||||
return 'message'
|
return 'event'
|
||||||
if account and gajim.gc_connected[account].has_key(contact.jid):
|
if account and gajim.gc_connected[account].has_key(contact.jid):
|
||||||
if gajim.gc_connected[account][contact.jid]:
|
if gajim.gc_connected[account][contact.jid]:
|
||||||
return 'muc_active'
|
return 'muc_active'
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
## Copyright (C) 2006 Travis Shirk <travis@pobox.com>
|
## Copyright (C) 2006 Travis Shirk <travis@pobox.com>
|
||||||
## Copyright (C) 2005-2007 Nikos Kouremenos <kourem@gmail.com>
|
## Copyright (C) 2005-2007 Nikos Kouremenos <kourem@gmail.com>
|
||||||
## Copyright (C) 2007 Julien Pivotto <roidelapluie@gmail.com>
|
## Copyright (C) 2007 Julien Pivotto <roidelapluie@gmail.com>
|
||||||
|
## Copyright (C) 2007 Lukas Petrovicky <lukas@petrovicky.net>
|
||||||
##
|
##
|
||||||
## This program is free software; you can redistribute it and/or modify
|
## This program is free software; you can redistribute it and/or modify
|
||||||
## it under the terms of the GNU General Public License as published
|
## it under the terms of the GNU General Public License as published
|
||||||
|
@ -552,8 +553,8 @@ class GroupchatControl(ChatControlBase):
|
||||||
model = self.list_treeview.get_model()
|
model = self.list_treeview.get_model()
|
||||||
state_images =\
|
state_images =\
|
||||||
gajim.interface.roster.get_appropriate_state_images(
|
gajim.interface.roster.get_appropriate_state_images(
|
||||||
self.room_jid, icon_name = 'message')
|
self.room_jid, icon_name = 'event')
|
||||||
image = state_images['message']
|
image = state_images['event']
|
||||||
model[iter][C_IMG] = image
|
model[iter][C_IMG] = image
|
||||||
if self.parent_win:
|
if self.parent_win:
|
||||||
self.parent_win.show_title()
|
self.parent_win.show_title()
|
||||||
|
@ -836,7 +837,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
nick)
|
nick)
|
||||||
state_images = gajim.interface.roster.jabber_state_images['16']
|
state_images = gajim.interface.roster.jabber_state_images['16']
|
||||||
if len(gajim.events.get_events(self.account, self.room_jid + '/' + nick)):
|
if len(gajim.events.get_events(self.account, self.room_jid + '/' + nick)):
|
||||||
image = state_images['message']
|
image = state_images['event']
|
||||||
else:
|
else:
|
||||||
image = state_images[gc_contact.show]
|
image = state_images[gc_contact.show]
|
||||||
|
|
||||||
|
|
|
@ -677,13 +677,13 @@ class RosterWindow:
|
||||||
# look if another resource has awaiting events
|
# look if another resource has awaiting events
|
||||||
for c in contact_instances:
|
for c in contact_instances:
|
||||||
c_icon_name = helpers.get_icon_name_to_show(c, account)
|
c_icon_name = helpers.get_icon_name_to_show(c, account)
|
||||||
if c_icon_name in ('message', 'muc_active', 'muc_inactive'):
|
if c_icon_name in ('event', 'muc_active', 'muc_inactive'):
|
||||||
icon_name = c_icon_name
|
icon_name = c_icon_name
|
||||||
break
|
break
|
||||||
path = model.get_path(iter)
|
path = model.get_path(iter)
|
||||||
if model.iter_has_child(iter):
|
if model.iter_has_child(iter):
|
||||||
if not self.tree.row_expanded(path) and \
|
if not self.tree.row_expanded(path) and \
|
||||||
icon_name not in ('message', 'muc_active', 'muc_inactive'):
|
icon_name not in ('event', 'muc_active', 'muc_inactive'):
|
||||||
child_iter = model.iter_children(iter)
|
child_iter = model.iter_children(iter)
|
||||||
if icon_name in ('error', 'offline'):
|
if icon_name in ('error', 'offline'):
|
||||||
# get the icon from the first child as they are sorted by show
|
# get the icon from the first child as they are sorted by show
|
||||||
|
@ -700,7 +700,7 @@ class RosterWindow:
|
||||||
child_jid = model[child_iter][C_JID].decode('utf-8')
|
child_jid = model[child_iter][C_JID].decode('utf-8')
|
||||||
child_account = model[child_iter][C_ACCOUNT].decode('utf-8')
|
child_account = model[child_iter][C_ACCOUNT].decode('utf-8')
|
||||||
if len(gajim.events.get_events(child_account, child_jid)):
|
if len(gajim.events.get_events(child_account, child_jid)):
|
||||||
icon_name = 'message'
|
icon_name = 'event'
|
||||||
break
|
break
|
||||||
child_iter = model.iter_next(child_iter)
|
child_iter = model.iter_next(child_iter)
|
||||||
if self.tree.row_expanded(path):
|
if self.tree.row_expanded(path):
|
||||||
|
@ -4292,11 +4292,11 @@ class RosterWindow:
|
||||||
'not in roster')
|
'not in roster')
|
||||||
else:
|
else:
|
||||||
list = ('connecting', 'online', 'chat', 'away', 'xa', 'dnd',
|
list = ('connecting', 'online', 'chat', 'away', 'xa', 'dnd',
|
||||||
'invisible', 'offline', 'error', 'requested', 'message', 'opened',
|
'invisible', 'offline', 'error', 'requested', 'event', 'opened',
|
||||||
'closed', 'not in roster', 'muc_active', 'muc_inactive')
|
'closed', 'not in roster', 'muc_active', 'muc_inactive')
|
||||||
if pixbuf2:
|
if pixbuf2:
|
||||||
list = ('connecting', 'online', 'chat', 'away', 'xa', 'dnd',
|
list = ('connecting', 'online', 'chat', 'away', 'xa', 'dnd',
|
||||||
'offline', 'error', 'requested', 'message', 'not in roster')
|
'offline', 'error', 'requested', 'event', 'not in roster')
|
||||||
return self._load_icon_list(list, path, pixbuf2)
|
return self._load_icon_list(list, path, pixbuf2)
|
||||||
|
|
||||||
def load_icon(self, icon_name):
|
def load_icon(self, icon_name):
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
## statusicon.py
|
## statusicon.py
|
||||||
##
|
##
|
||||||
## Copyright (C) 2006 Nikos Kouremenos <kourem@gmail.com>
|
## Copyright (C) 2006 Nikos Kouremenos <kourem@gmail.com>
|
||||||
|
## Copyright (C) 2007 Lukas Petrovicky <lukas@petrovicky.net>
|
||||||
##
|
##
|
||||||
## This program is free software; you can redistribute it and/or
|
## This program is free software; you can redistribute it and/or
|
||||||
## modify it under the terms of the GNU General Public License
|
## modify it under the terms of the GNU General Public License
|
||||||
|
@ -56,7 +57,7 @@ class StatusIcon(systray.Systray):
|
||||||
text = helpers.get_notification_icon_tooltip_text()
|
text = helpers.get_notification_icon_tooltip_text()
|
||||||
self.status_icon.set_tooltip(text)
|
self.status_icon.set_tooltip(text)
|
||||||
if gajim.events.get_nb_systray_events():
|
if gajim.events.get_nb_systray_events():
|
||||||
state = 'message' # FIXME: this state should be called event, not message
|
state = 'event'
|
||||||
self.status_icon.props.blinking = True
|
self.status_icon.props.blinking = True
|
||||||
else:
|
else:
|
||||||
state = self.status
|
state = self.status
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
## Copyright (C) 2005 Dimitur Kirov <dkirov@gmail.com>
|
## Copyright (C) 2005 Dimitur Kirov <dkirov@gmail.com>
|
||||||
## Copyright (C) 2005-2006 Travis Shirk <travis@pobox.com>
|
## Copyright (C) 2005-2006 Travis Shirk <travis@pobox.com>
|
||||||
## Copyright (C) 2005 Norman Rasmussen <norman@rasmussen.co.za>
|
## Copyright (C) 2005 Norman Rasmussen <norman@rasmussen.co.za>
|
||||||
|
## Copyright (C) 2007 Lukas Petrovicky <lukas@petrovicky.net>
|
||||||
##
|
##
|
||||||
## This program is free software; you can redistribute it and/or modify
|
## This program is free software; you can redistribute it and/or modify
|
||||||
## it under the terms of the GNU General Public License as published
|
## it under the terms of the GNU General Public License as published
|
||||||
|
@ -82,7 +83,7 @@ class Systray:
|
||||||
if not gajim.interface.systray_enabled:
|
if not gajim.interface.systray_enabled:
|
||||||
return
|
return
|
||||||
if gajim.events.get_nb_systray_events():
|
if gajim.events.get_nb_systray_events():
|
||||||
state = 'message'
|
state = 'event'
|
||||||
else:
|
else:
|
||||||
state = self.status
|
state = self.status
|
||||||
image = gajim.interface.roster.jabber_state_images['16'][state]
|
image = gajim.interface.roster.jabber_state_images['16'][state]
|
||||||
|
|