diff --git a/mitterlib/ui/ui_pygtk.py b/mitterlib/ui/ui_pygtk.py index bc39399..4aa1c4a 100644 --- a/mitterlib/ui/ui_pygtk.py +++ b/mitterlib/ui/ui_pygtk.py @@ -363,8 +363,8 @@ class Interface(object): clear_action = gtk.Action('Clear', '_Clear', 'Clear the message list', gtk.STOCK_CLEAR) + clear_action.connect('activate', self._clear_posts) action_group.add_action_with_accel(clear_action, None) - # TODO: Connect #shrink_url_action = gtk.Action('ShrinkURL', 'Shrink _URL', # 'Shrink selected URL', gtk.STOCK_EXECUTE) @@ -548,7 +548,6 @@ class Interface(object): # use a different highlight for the current user # TODO: How to handle this with several networks? - # SOLUTION: self._connection.is_self(message) #message = re.sub(r'(@'+self.twitter.username+')', # r'\1', # message) @@ -692,6 +691,11 @@ class Interface(object): self._connection.can_repost(data)) return 0 + + def _clear_posts(self, widget, user_data=None): + """Clear the list of posts from the grid.""" + self._grid.get_model().clear() + return # ------------------------------------------------------------ # Network related functions