Threading makes some ugliness happen before the tweets are ready... this fixes that

This commit is contained in:
Anna 2010-04-22 16:22:09 -04:00
parent 1f16b491fa
commit 5b85ca65f4

View File

@ -55,6 +55,7 @@ class TweetPane(gtk.ScrolledWindow):
self.tweets[i].connect('retweet', self.on_retweet) self.tweets[i].connect('retweet', self.on_retweet)
self.tweets[i].connect('in-reply-to', self.on_tweet_reply_to) self.tweets[i].connect('in-reply-to', self.on_tweet_reply_to)
self.tweets[i].connect('show-user', self.on_show_user) self.tweets[i].connect('show-user', self.on_show_user)
self.tweets[i].hide()
viewport.add(tweet_box) viewport.add(tweet_box)
@ -68,6 +69,9 @@ class TweetPane(gtk.ScrolledWindow):
self.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS) self.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
self.show_all() self.show_all()
for tweet in self.tweets:
tweet.hide()
def update_window(self, statuses): def update_window(self, statuses):
if self.updated_once is False: if self.updated_once is False:
@ -90,8 +94,10 @@ class TweetPane(gtk.ScrolledWindow):
self.num_new_tweets += 1 self.num_new_tweets += 1
read = False read = False
self.tweets[i].set_status(statuses[i], read) self.tweets[i].set_status(statuses[i], read)
self.tweets[i].show()
else: else:
self.tweets[i].clear_status() self.tweets[i].clear_status()
self.tweets[i].hide()
try: try:
self.latest_tweet = statuses[0].id self.latest_tweet = statuses[0].id