Update follow status on account change

This commit is contained in:
Anna 2010-05-19 16:10:25 -04:00
parent 8fd11f6fa5
commit 340c261e2d
2 changed files with 19 additions and 6 deletions

View file

@ -513,11 +513,18 @@ class MyTwitter():
def on_account_changed(self, widget, new_account):
if widget.get_active() and self.accounts.has_key(new_account):
self.username = new_account
self.api = self.accounts[self.username]
self.db['active_user'] = self.username
self.update_account_label()
if not (widget.get_active() and self.accounts.has_key(new_account)):
return
self.username = new_account
self.api = self.accounts[self.username]
self.db['active_user'] = self.username
self.update_account_label()
for i in range(0, self.tweet_notebook.get_n_pages()):
pane = self.tweet_notebook.get_nth_page(i)
if re.match(r'user: ', pane.get_list_name()):
user = re.sub(r'user: ', r'', pane.get_list_name())
apithreads.GetFollowing(api=self.api, pane=pane, user=user).start()
def on_lists_ready(self, widget, username, list_names):