From d293240bfbdc9d92b85161f81e028c44e69b79f8 Mon Sep 17 00:00:00 2001 From: robk-tahoe Date: Fri, 15 Feb 2008 00:11:23 -0700 Subject: [PATCH] confwiz: make opening the welcome page options, off by default on windows, on on mac --- src/allmydata/gui/confwiz.py | 12 +++++++----- src/allmydata/gui/macapp.py | 2 +- windows/confwiz.py | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/allmydata/gui/confwiz.py b/src/allmydata/gui/confwiz.py index 7d3eb2cd..07b4ad16 100644 --- a/src/allmydata/gui/confwiz.py +++ b/src/allmydata/gui/confwiz.py @@ -148,18 +148,20 @@ def DisplayTraceback(message): wx.MessageBox(u"%s\n (%s)"%(message,''.join(xc)), 'Error') class ConfWizApp(wx.App): - def __init__(self, server): + def __init__(self, server, open_welcome_page=False): self.server = server + self.show_welcome = open_welcome_page wx.App.__init__(self, 0) def get_backend(self): return self.server + BACKEND def open_welcome_page(self): - args = {'v': str(allmydata.__version__), - 'plat': sys.platform, - } - webbrowser.open(self.server + WELCOME_PAGE + '?' + urlencode(args)) + if self.show_welcome: + args = {'v': str(allmydata.__version__), + 'plat': sys.platform, + } + webbrowser.open(self.server + WELCOME_PAGE + '?' + urlencode(args)) def OnInit(self): try: diff --git a/src/allmydata/gui/macapp.py b/src/allmydata/gui/macapp.py index 95ad9b7e..6a99e37e 100644 --- a/src/allmydata/gui/macapp.py +++ b/src/allmydata/gui/macapp.py @@ -63,7 +63,7 @@ class App(object): f.close() if self.is_config_incomplete(): - app = ConfWizApp(DEFAULT_SERVER_URL) + app = ConfWizApp(DEFAULT_SERVER_URL, open_welcome_page=True) app.MainLoop() if self.is_config_incomplete(): diff --git a/windows/confwiz.py b/windows/confwiz.py index d92658ee..6b0c2473 100644 --- a/windows/confwiz.py +++ b/windows/confwiz.py @@ -2,4 +2,4 @@ import sys from allmydata.gui.confwiz import main if __name__ == '__main__': - main(sys.argv) + main(sys.argv, open_welcome_page=False) -- 2.45.2