From 8c2e7605ef5d21312ada4060da7bf21e7b71abaf Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Sat, 22 Jan 2011 13:53:56 -0500 Subject: [PATCH] ocarina: Create settings window every time Trying to save the window each time wasn't working well. I found that clicking the preferences button a second time would display an empty window, rather than what was saved. The user probably won't notice the time it takes to create the window again. --- ocarina/settings/__init__.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ocarina/settings/__init__.py b/ocarina/settings/__init__.py index ac5c7c81..bbf4f956 100644 --- a/ocarina/settings/__init__.py +++ b/ocarina/settings/__init__.py @@ -3,12 +3,7 @@ import ocarina gtk = ocarina.gtk -window = None -pages = None - -def create_window(): - global window - global pages +def configure(): import general window = gtk.Window() @@ -19,8 +14,4 @@ def create_window(): pages.show() pages.append_page(general.get_page(), gtk.Label("General")) - -def configure(): - if window == None: - create_window() window.show()