Various fixes for lists and open tabs

This commit is contained in:
Anna 2010-04-20 16:42:30 -04:00
parent 97daaedf6c
commit 5220961620

View File

@ -33,7 +33,7 @@ class MyTwitter():
self.db = shelve.open(db_file) self.db = shelve.open(db_file)
if not self.db.has_key('open_tabs'): if not self.db.has_key('open_tabs'):
self.db['open_tabs'] = ['Home', '@' + self.username, 'Direct Messages'] self.db['open_tabs'] = [self.username + '/Home', '@' + self.username, self.username + '/Direct Messages']
if self.refresh_time < 10: if self.refresh_time < 10:
self.refresh_time = 10 self.refresh_time = 10
@ -142,7 +142,7 @@ class MyTwitter():
# Lists load the appropriate list from the appropriate account # Lists load the appropriate list from the appropriate account
elif re.match(r'list: ', list_name): elif re.match(r'list: ', list_name):
username = re.sub(r'list: (.*)/.*', r'\1', list_name) username = re.sub(r'list: (.*)/.*', r'\1', list_name)
real_list = re.sub(r'list: .*/(.*)', r'\1', real_list) real_list = re.sub(r'list: .*/(.*)', r'\1', list_name)
account = self.accounts[username] account = self.accounts[username]
statuses = account.GetListStatuses(real_list, per_page=self.num_entries) statuses = account.GetListStatuses(real_list, per_page=self.num_entries)
@ -212,7 +212,7 @@ class MyTwitter():
elif name == '@' + username: elif name == '@' + username:
full_name = name full_name = name
else: else:
full_name = 'list: ' + name full_name = 'list: ' + username + '/' + name
# Now, add a new tab with this list # Now, add a new tab with this list
self.add_to_notebook(full_name) self.add_to_notebook(full_name)