don't require python2.5

This commit is contained in:
Yann Leboulanger 2008-07-29 07:20:12 +00:00
parent 4ebee785ff
commit b039c1e229
1 changed files with 21 additions and 16 deletions

View File

@ -1231,13 +1231,15 @@ class ChatControl(ChatControlBase):
mood = gobject.markup_escape_text(mood) mood = gobject.markup_escape_text(mood)
text = gobject.markup_escape_text(text) text = gobject.markup_escape_text(text)
self._mood_image.set_tooltip_markup( markup = '<b>%s</b>' % mood
'<b>%s</b>%s%s' % (mood, if text != '':
'\n' if text is not '' else '', text)) text += '\n' + text
self._mood_image.set_tooltip_markup(markup)
else: else:
self._mood_tooltip.set_tip( markup = mood
self._mood_image, '%s%s%s' % (mood, if text != '':
'\n' if text is not '' else '', text)) text += '\n' + text
self._mood_tooltip.set_tip(self._mood_image, markup)
self._mood_image.show() self._mood_image.show()
else: else:
self._mood_image.hide() self._mood_image.hide()
@ -1281,18 +1283,21 @@ class ChatControl(ChatControlBase):
subactivity) subactivity)
text = gobject.markup_escape_text(text) text = gobject.markup_escape_text(text)
self._activity_image.set_tooltip_markup( markup = '<b>' + activity
'<b>%s%s%s</b>%s%s' % (activity, if subactivity != '':
': ' if subactivity is not '' else '', markup += ': ' + subactivity
subactivity, markup += '</b>'
'\n' if text is not '' else '', text)) if text != '':
markup += '\n' + text
self._activity_image.set_tooltip_markup(markup)
else: else:
markup = activity
if subactivity != '':
markup += ': ' + subactivity
if text != '':
markup += '\n' + text
self._activity_tooltip.set_tip( self._activity_tooltip.set_tip(
self._activity_image, '%s%s%s%s%s' % ( self._activity_image, markup)
activity,
': ' if subactivity is not '' else '',
subactivity,
'\n' if text is not '' else '', text))
self._activity_image.show() self._activity_image.show()
else: else: