Reworked how adding lists is handled (so the child thread does the actual work and we can employ a Condition object to allow the add_to_notebook function to have the list information available) and put in code that should list the lists a user is in. Currently seems to not function as expected, however.

This commit is contained in:
Anna
2010-06-02 17:00:11 -04:00
parent 48cce6a353
commit 8fac5ad7c2
3 changed files with 74 additions and 23 deletions

View File

@ -225,6 +225,13 @@ class TweetPane(gtk.ScrolledWindow):
def on_follow_clicked(self, widget, data):
self.emit('follow-clicked', data)
def set_lists(self, lists):
if not self.is_user:
return
self.user_box.set_lists(lists)
### end class TweetPane
# signals for TweetPane
@ -629,15 +636,19 @@ class UserBox(gtk.VBox):
self.at_button = gtk.Button('@')
self.follow_label = gtk.Label('You are following this user')
self.verified_label = gtk.Label('Verified account')
self.list_box = gtk.combo_box_entry_new_text()
self.list_label = gtk.Label('')
self.name_label.set_alignment(0.0, 0.0)
self.follow_label.set_alignment(0.0, 0.0)
self.verified_label.set_alignment(0.0, 0.0)
self.list_label.set_alignment(0.0, 0.0)
text_col = gtk.VBox()
text_col.pack_start(self.name_label, expand=False)
text_col.pack_start(self.verified_label, expand=False)
text_col.pack_start(self.follow_label, expand=False)
text_col.pack_start(self.list_label, expand=False)
info_row = gtk.HBox()
info_row.pack_start(self.avatar, expand=False)
@ -693,6 +704,9 @@ class UserBox(gtk.VBox):
self.at_button.show()
self.follow_button.show()
if self.list_label.get_text() != '':
self.list_label.show()
self.info_loaded = True
@ -740,6 +754,18 @@ class UserBox(gtk.VBox):
self.name_label.hide()
self.avatar.hide()
def set_lists(self, lists):
if not lists:
return
list_label_text = 'In lists: '
for l in lists:
list_label_text += l + ' '
self.list_label.set_text(list_label_text)
# end class UserBox
# signals for UserBox