[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
|
||||
num_unread = len(gajim.events.get_events(self.account, jid,
|
||||
['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
|
||||
|
||||
if num_unread and gajim.config.get('show_unread_tab_icon'):
|
||||
img_16 = gajim.interface.roster.get_appropriate_state_images(
|
||||
self.contact.jid, icon_name = 'message')
|
||||
tab_img = img_16['message']
|
||||
self.contact.jid, icon_name = 'event')
|
||||
tab_img = img_16['event']
|
||||
else:
|
||||
contact = gajim.contacts.get_contact_with_highest_priority(
|
||||
self.account, self.contact.jid)
|
||||
|
|
|
@ -547,14 +547,14 @@ def get_global_status():
|
|||
def get_icon_name_to_show(contact, account = None):
|
||||
'''Get the icon name to show in online, away, requested, ...'''
|
||||
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,
|
||||
contact.get_full_jid()):
|
||||
return 'message'
|
||||
return 'event'
|
||||
if account and gajim.interface.minimized_controls.has_key(account) and \
|
||||
contact.jid in gajim.interface.minimized_controls[account] and gajim.interface.\
|
||||
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 gajim.gc_connected[account][contact.jid]:
|
||||
return 'muc_active'
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
## Copyright (C) 2006 Travis Shirk <travis@pobox.com>
|
||||
## Copyright (C) 2005-2007 Nikos Kouremenos <kourem@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
|
||||
## 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()
|
||||
state_images =\
|
||||
gajim.interface.roster.get_appropriate_state_images(
|
||||
self.room_jid, icon_name = 'message')
|
||||
image = state_images['message']
|
||||
self.room_jid, icon_name = 'event')
|
||||
image = state_images['event']
|
||||
model[iter][C_IMG] = image
|
||||
if self.parent_win:
|
||||
self.parent_win.show_title()
|
||||
|
@ -836,7 +837,7 @@ class GroupchatControl(ChatControlBase):
|
|||
nick)
|
||||
state_images = gajim.interface.roster.jabber_state_images['16']
|
||||
if len(gajim.events.get_events(self.account, self.room_jid + '/' + nick)):
|
||||
image = state_images['message']
|
||||
image = state_images['event']
|
||||
else:
|
||||
image = state_images[gc_contact.show]
|
||||
|
||||
|
|
|
@ -677,13 +677,13 @@ class RosterWindow:
|
|||
# look if another resource has awaiting events
|
||||
for c in contact_instances:
|
||||
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
|
||||
break
|
||||
path = model.get_path(iter)
|
||||
if model.iter_has_child(iter):
|
||||
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)
|
||||
if icon_name in ('error', 'offline'):
|
||||
# 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_account = model[child_iter][C_ACCOUNT].decode('utf-8')
|
||||
if len(gajim.events.get_events(child_account, child_jid)):
|
||||
icon_name = 'message'
|
||||
icon_name = 'event'
|
||||
break
|
||||
child_iter = model.iter_next(child_iter)
|
||||
if self.tree.row_expanded(path):
|
||||
|
@ -4292,11 +4292,11 @@ class RosterWindow:
|
|||
'not in roster')
|
||||
else:
|
||||
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')
|
||||
if pixbuf2:
|
||||
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)
|
||||
|
||||
def load_icon(self, icon_name):
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
## statusicon.py
|
||||
##
|
||||
## 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
|
||||
## 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()
|
||||
self.status_icon.set_tooltip(text)
|
||||
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
|
||||
else:
|
||||
state = self.status
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
## Copyright (C) 2005 Dimitur Kirov <dkirov@gmail.com>
|
||||
## Copyright (C) 2005-2006 Travis Shirk <travis@pobox.com>
|
||||
## 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
|
||||
## it under the terms of the GNU General Public License as published
|
||||
|
@ -82,7 +83,7 @@ class Systray:
|
|||
if not gajim.interface.systray_enabled:
|
||||
return
|
||||
if gajim.events.get_nb_systray_events():
|
||||
state = 'message'
|
||||
state = 'event'
|
||||
else:
|
||||
state = self.status
|
||||
image = gajim.interface.roster.jabber_state_images['16'][state]
|
||||
|
|