Fix #4140.
This commit is contained in:
parent
ee85e67da2
commit
90b2d8fa8d
|
@ -1239,12 +1239,15 @@ class ChatControl(ChatControlBase):
|
||||||
|
|
||||||
if activity is not None:
|
if activity is not None:
|
||||||
if activity in ACTIVITIES:
|
if activity in ACTIVITIES:
|
||||||
self._activity_image.set_from_pixbuf(
|
|
||||||
gtkgui_helpers.load_activity_icon(activity).get_pixbuf())
|
|
||||||
# Translate standard activities
|
# Translate standard activities
|
||||||
if subactivity in ACTIVITIES[activity]:
|
if subactivity in ACTIVITIES[activity]:
|
||||||
subactivity = ACTIVITIES[activity] \
|
self._activity_image.set_from_pixbuf(
|
||||||
[subactivity]
|
gtkgui_helpers.load_activity_icon(activity, subactivity). \
|
||||||
|
get_pixbuf())
|
||||||
|
subactivity = ACTIVITIES[activity][subactivity]
|
||||||
|
else:
|
||||||
|
self._activity_image.set_from_pixbuf(
|
||||||
|
gtkgui_helpers.load_activity_icon(activity).get_pixbuf())
|
||||||
activity = ACTIVITIES[activity]['category']
|
activity = ACTIVITIES[activity]['category']
|
||||||
else:
|
else:
|
||||||
self._activity_image.set_from_pixbuf(
|
self._activity_image.set_from_pixbuf(
|
||||||
|
|
|
@ -996,10 +996,19 @@ class RosterWindow:
|
||||||
and 'activity' in gajim.connections[account].activity \
|
and 'activity' in gajim.connections[account].activity \
|
||||||
and gajim.connections[account].activity['activity'].strip() \
|
and gajim.connections[account].activity['activity'].strip() \
|
||||||
in ACTIVITIES:
|
in ACTIVITIES:
|
||||||
self.model[child_iter][C_ACTIVITY_PIXBUF] = \
|
if 'subactivity' in gajim.connections[account].activity \
|
||||||
gtkgui_helpers.load_activity_icon(
|
and gajim.connections[account].activity['subactivity'].strip() \
|
||||||
gajim.connections[account]. \
|
in ACTIVITIES[gajim.connections[account].activity['activity'].strip()]:
|
||||||
activity['activity'].strip()).get_pixbuf()
|
self.model[child_iter][C_ACTIVITY_PIXBUF] = \
|
||||||
|
gtkgui_helpers.load_activity_icon(
|
||||||
|
gajim.connections[account].activity['activity'].strip(),
|
||||||
|
gajim.connections[account].activity['subactivity'].strip()). \
|
||||||
|
get_pixbuf()
|
||||||
|
else:
|
||||||
|
self.model[child_iter][C_ACTIVITY_PIXBUF] = \
|
||||||
|
gtkgui_helpers.load_activity_icon(
|
||||||
|
gajim.connections[account].activity['activity'].strip()). \
|
||||||
|
get_pixbuf()
|
||||||
elif gajim.config.get('show_activity_in_roster') \
|
elif gajim.config.get('show_activity_in_roster') \
|
||||||
and 'activity' in gajim.connections[account].activity:
|
and 'activity' in gajim.connections[account].activity:
|
||||||
self.model[child_iter][C_ACTIVITY_PIXBUF] = \
|
self.model[child_iter][C_ACTIVITY_PIXBUF] = \
|
||||||
|
@ -1247,8 +1256,15 @@ class RosterWindow:
|
||||||
contact = gajim.contacts.get_contact(account, jid)
|
contact = gajim.contacts.get_contact(account, jid)
|
||||||
if 'activity' in contact.activity \
|
if 'activity' in contact.activity \
|
||||||
and contact.activity['activity'].strip() in ACTIVITIES:
|
and contact.activity['activity'].strip() in ACTIVITIES:
|
||||||
pixbuf = gtkgui_helpers.load_activity_icon(
|
if 'subactivity' in contact.activity \
|
||||||
contact.activity['activity'].strip()).get_pixbuf()
|
and contact.activity['subactivity'].strip() in \
|
||||||
|
ACTIVITIES[contact.activity['activity'].strip()]:
|
||||||
|
pixbuf = gtkgui_helpers.load_activity_icon(
|
||||||
|
contact.activity['activity'].strip(),
|
||||||
|
contact.activity['subactivity'].strip()).get_pixbuf()
|
||||||
|
else:
|
||||||
|
pixbuf = gtkgui_helpers.load_activity_icon(
|
||||||
|
contact.activity['activity'].strip()).get_pixbuf()
|
||||||
elif 'activity' in contact.activity:
|
elif 'activity' in contact.activity:
|
||||||
pixbuf = gtkgui_helpers.load_activity_icon(
|
pixbuf = gtkgui_helpers.load_activity_icon(
|
||||||
'unknown').get_pixbuf()
|
'unknown').get_pixbuf()
|
||||||
|
|
Loading…
Reference in New Issue