some coding standards. Fixes #4211

This commit is contained in:
Yann Leboulanger 2008-08-25 20:13:16 +00:00
parent f55651d905
commit 4549515669

View file

@ -1298,15 +1298,12 @@ class ChatControl(ChatControlBase):
if HAVE_MARKUP_TOOLTIPS: if HAVE_MARKUP_TOOLTIPS:
self._tune_image.set_tooltip_markup( self._tune_image.set_tooltip_markup(
_('<b>"%(title)s"</b> by ' + _('<b>"%(title)s"</b> by <i>%(artist)s</i>\n'
'<i>%(artist)s</i>\n' + 'from <i>%(source)s</i>') % {'title': title, 'artist': artist,
'from <i>%(source)s</i>') %
{'title': title, 'artist': artist,
'source': source}) 'source': source})
else: else:
self._tune_tooltip.set_tip(self._tune_image, self._tune_tooltip.set_tip(self._tune_image,
_('%(title)s by %(artist)s\n' + _('%(title)s by %(artist)s\nfrom %(source)s') % {'title': title,
'from %(source)s') % {'title': title,
'artist': artist, 'source': source}) 'artist': artist, 'source': source})
self._tune_image.show() self._tune_image.show()
else: else:
@ -1335,16 +1332,14 @@ class ChatControl(ChatControlBase):
# do we have something bigger to show? # do we have something bigger to show?
if avatar_w > scaled_buf_w or avatar_h > scaled_buf_h: if avatar_w > scaled_buf_w or avatar_h > scaled_buf_h:
# wait for 0.5 sec in case we leave earlier # wait for 0.5 sec in case we leave earlier
self.show_bigger_avatar_timeout_id = \ self.show_bigger_avatar_timeout_id = gobject.timeout_add(500,
gobject.timeout_add(500,
self.show_bigger_avatar, widget) self.show_bigger_avatar, widget)
def on_avatar_eventbox_leave_notify_event(self, widget, event): def on_avatar_eventbox_leave_notify_event(self, widget, event):
'''we left the eventbox area that holds the avatar img''' '''we left the eventbox area that holds the avatar img'''
# did we add a timeout? if yes remove it # did we add a timeout? if yes remove it
if self.show_bigger_avatar_timeout_id is not None: if self.show_bigger_avatar_timeout_id is not None:
gobject.source_remove( gobject.source_remove(self.show_bigger_avatar_timeout_id)
self.show_bigger_avatar_timeout_id)
def on_avatar_eventbox_button_press_event(self, widget, event): def on_avatar_eventbox_button_press_event(self, widget, event):
'''If right-clicked, show popup''' '''If right-clicked, show popup'''