Hide empty button when it is not relevant, so that it doesn't receive focus erroneously

This commit is contained in:
Anna 2010-06-01 17:21:06 -04:00
parent f52c107c9f
commit f51d187610

View File

@ -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()