don't require python2.5

This commit is contained in:
Yann Leboulanger 2008-07-29 07:08:56 +00:00
parent e7b7e01b54
commit 0e4df7800d
1 changed files with 5 additions and 7 deletions

View File

@ -589,17 +589,15 @@ class RosterTooltip(NotificationAreaTooltip):
activity = act_plain = \
contact.activity['activity'].strip()
activity = gobject.markup_escape_text(activity)
activity = ACTIVITIES[activity]['category'] \
if act_plain in ACTIVITIES else activity
if act_plain in ACTIVITIES:
activity = ACTIVITIES[activity]['category']
activity_string = _('Activity:') + ' <b>%s' % activity
if contact.activity.has_key('subactivity'):
activity_sub = \
contact.activity['subactivity'].strip()
activity_sub = \
ACTIVITIES[act_plain][activity_sub] \
if act_plain in ACTIVITIES and \
activity_sub in ACTIVITIES[act_plain] \
else activity_sub
if act_plain in ACTIVITIES and activity_sub in \
ACTIVITIES[act_plain]:
activity_sub = ACTIVITIES[act_plain][activity_sub]
activity_sub = \
gobject.markup_escape_text(activity_sub)
activity_string += ' (%s)</b>' % activity_sub