From f51d1876102a19e8f6c242db545824ae01fc2b25 Mon Sep 17 00:00:00 2001 From: Anna Date: Tue, 1 Jun 2010 17:21:06 -0400 Subject: [PATCH] Hide empty button when it is not relevant, so that it doesn't receive focus erroneously --- twitterwidgets.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/twitterwidgets.py b/twitterwidgets.py index c5b2f3a..d6eaf52 100644 --- a/twitterwidgets.py +++ b/twitterwidgets.py @@ -379,6 +379,7 @@ class TweetBox(gtk.HBox): self.reply_to_button.set_relief(gtk.RELIEF_NONE) button_box.pack_start(self.reply_to_button, expand=False) self.reply_to_button.connect("clicked", self.on_in_reply_to_clicked) + self.reply_to_button.hide() self.conversation_button = gtk.Button("(conversation)") self.conversation_button.set_relief(gtk.RELIEF_NONE) @@ -480,6 +481,7 @@ class TweetBox(gtk.HBox): # If this is in reply to something, set appropriate label if not self.conversation and self.in_reply_to_screen_name and self.in_reply_to_id: self.reply_to_button.set_label('in reply to ' + self.in_reply_to_screen_name) + self.reply_to_button.show() self.conversation_button.show() @@ -493,6 +495,7 @@ class TweetBox(gtk.HBox): self.id = None self.set_read(True) self.reply_to_button.set_label('') + self.reply_to_button.hide() self.conversation_button.hide() if not self.is_user: self.avatar.hide()