mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-14 13:28:11 +00:00
confwiz: make opening the welcome page options, off by default on windows, on on mac
This commit is contained in:
@ -148,18 +148,20 @@ def DisplayTraceback(message):
|
|||||||
wx.MessageBox(u"%s\n (%s)"%(message,''.join(xc)), 'Error')
|
wx.MessageBox(u"%s\n (%s)"%(message,''.join(xc)), 'Error')
|
||||||
|
|
||||||
class ConfWizApp(wx.App):
|
class ConfWizApp(wx.App):
|
||||||
def __init__(self, server):
|
def __init__(self, server, open_welcome_page=False):
|
||||||
self.server = server
|
self.server = server
|
||||||
|
self.show_welcome = open_welcome_page
|
||||||
wx.App.__init__(self, 0)
|
wx.App.__init__(self, 0)
|
||||||
|
|
||||||
def get_backend(self):
|
def get_backend(self):
|
||||||
return self.server + BACKEND
|
return self.server + BACKEND
|
||||||
|
|
||||||
def open_welcome_page(self):
|
def open_welcome_page(self):
|
||||||
args = {'v': str(allmydata.__version__),
|
if self.show_welcome:
|
||||||
'plat': sys.platform,
|
args = {'v': str(allmydata.__version__),
|
||||||
}
|
'plat': sys.platform,
|
||||||
webbrowser.open(self.server + WELCOME_PAGE + '?' + urlencode(args))
|
}
|
||||||
|
webbrowser.open(self.server + WELCOME_PAGE + '?' + urlencode(args))
|
||||||
|
|
||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
try:
|
try:
|
||||||
|
@ -63,7 +63,7 @@ class App(object):
|
|||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
if self.is_config_incomplete():
|
if self.is_config_incomplete():
|
||||||
app = ConfWizApp(DEFAULT_SERVER_URL)
|
app = ConfWizApp(DEFAULT_SERVER_URL, open_welcome_page=True)
|
||||||
app.MainLoop()
|
app.MainLoop()
|
||||||
|
|
||||||
if self.is_config_incomplete():
|
if self.is_config_incomplete():
|
||||||
|
@ -2,4 +2,4 @@ import sys
|
|||||||
from allmydata.gui.confwiz import main
|
from allmydata.gui.confwiz import main
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main(sys.argv)
|
main(sys.argv, open_welcome_page=False)
|
||||||
|
Reference in New Issue
Block a user