From: robk-tahoe Date: Fri, 15 Feb 2008 07:11:23 +0000 (-0700) Subject: confwiz: make opening the welcome page options, off by default on windows, on on mac X-Git-Tag: allmydata-tahoe-0.8.0~40 X-Git-Url: https://git.rkrishnan.org/pf/content/frontends//%22%22.?a=commitdiff_plain;h=d293240bfbdc9d92b85161f81e028c44e69b79f8;p=tahoe-lafs%2Ftahoe-lafs.git confwiz: make opening the welcome page options, off by default on windows, on on mac --- 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)