Fixed a race condition. Vroom
This commit is contained in:
parent
8b56ed2dcf
commit
df901febbd
11
mytwitter.py
11
mytwitter.py
|
@ -42,6 +42,10 @@ class MyTwitter():
|
|||
print "Error: You must define at least one [account] section in " + config_file
|
||||
sys.exit(1)
|
||||
|
||||
# Init the glade stuff here, so we don't have a race condition with
|
||||
# the lists-ready signal
|
||||
self.init_user_interface('./default.glade')
|
||||
|
||||
self.accounts = {}
|
||||
for item in config.sections():
|
||||
if (re.match(r'account', item)):
|
||||
|
@ -69,8 +73,7 @@ class MyTwitter():
|
|||
|
||||
self.reply_id = None
|
||||
|
||||
# Load up all the GUI stuff
|
||||
self.init_user_interface('./default.glade')
|
||||
# Load up all the programmatic GUI stuff
|
||||
self.init_widgets()
|
||||
|
||||
|
||||
|
@ -78,8 +81,6 @@ class MyTwitter():
|
|||
self.widget_tree=gtk.glade.XML(path_to_skin, "window")
|
||||
self.widget_tree.signal_autoconnect(self)
|
||||
|
||||
|
||||
def init_widgets(self):
|
||||
# Get widgets from glade
|
||||
self.tweet_notebook = self.widget_tree.get_widget('tweet_notebook')
|
||||
self.view_menu = self.widget_tree.get_widget('view_menu')
|
||||
|
@ -92,6 +93,8 @@ class MyTwitter():
|
|||
self.verified_label = self.widget_tree.get_widget('verified_label')
|
||||
self.account_select = self.widget_tree.get_widget('account_select')
|
||||
|
||||
|
||||
def init_widgets(self):
|
||||
self.context_id = self.status_bar.get_context_id('message')
|
||||
|
||||
# Manual tweaks to the glade UI, to overcome its limitations
|
||||
|
|
Reference in New Issue
Block a user