mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-09 11:51:21 +00:00
confwiz: make opening the welcome page options, off by default on windows, on on mac
This commit is contained in:
parent
b101d9cbcf
commit
d293240bfb
@ -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:
|
||||
|
@ -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():
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user