From 39f5d216e423314bcf09cec1f5fa4557ea8186ff Mon Sep 17 00:00:00 2001 From: Anna Date: Mon, 17 May 2010 22:47:57 -0400 Subject: [PATCH] Only update new pane when adding a pane to the notebook --- mytwitter.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mytwitter.py b/mytwitter.py index decfd2b..719b27c 100755 --- a/mytwitter.py +++ b/mytwitter.py @@ -109,7 +109,7 @@ class MyTwitter(): # Add the tabs from last session to the notebook page_num = self.db['active_page'] for tab, single_tweet in self.db['open_tabs']: - self.add_to_notebook(tab, single_tweet, update=False) + self.add_to_notebook(tab, single_tweet) self.tweet_notebook.set_current_page(page_num) self.update_windows() @@ -262,7 +262,7 @@ class MyTwitter(): self.remove_view(name, single_tweet) - def add_to_notebook(self, name, single_tweet=None, update=True): + def add_to_notebook(self, name, single_tweet=None): # If it already exists, don't add it, just switch to it for i in range(self.tweet_notebook.get_n_pages()): pane = self.tweet_notebook.get_nth_page(i) @@ -307,10 +307,8 @@ class MyTwitter(): apithreads.GetSingleTweet(api=self.api, pane=new_pane, single_tweet=single_tweet).start() - - if update: - self.update_windows() - self.tweet_notebook.set_current_page(-1) # switch to the new pane + else: + self.update_single_window(new_pane) def on_tab_change(self, event, page, page_num):