confwiz: update the config wiz to open the welcome page
authorrobk-tahoe <robk-tahoe@allmydata.com>
Fri, 15 Feb 2008 03:12:58 +0000 (20:12 -0700)
committerrobk-tahoe <robk-tahoe@allmydata.com>
Fri, 15 Feb 2008 03:12:58 +0000 (20:12 -0700)
regardless of platform, the confwiz now opens the welcoe page upon
writing a config.  it also provides a 'plat' argument (from python's
sys.platform) to help disambiguate our instructions by platform.

src/allmydata/gui/confwiz.py

index 3441c59de575d6ab96dfa1da05a8f7b5649ccdbd..7d3eb2cd206e2655a26dc020bc8a8cef1e8aab81 100644 (file)
@@ -3,6 +3,7 @@ DEFAULT_SERVER_URL = 'https://beta.allmydata.com/'
 
 BACKEND = 'native_client.php'
 ACCOUNT_PAGE = 'account'
+WELCOME_PAGE = 'welcome_install'
 TAHOESVC_NAME = 'Tahoe'
 WINFUSESVC_NAME = 'Allmydata Tahoe SMB'
 
@@ -13,11 +14,12 @@ import sys
 import traceback
 import urllib2
 from urllib import urlencode
-#import webbrowser
+import webbrowser
 import wx
 
 from allmydata.util.assertutil import precondition
 from allmydata import uri
+import allmydata
 
 import amdicon
 
@@ -153,6 +155,12 @@ class ConfWizApp(wx.App):
     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))
+
     def OnInit(self):
         try:
             wx.InitAllImageHandlers()
@@ -311,6 +319,8 @@ class LoginPanel(wx.Panel):
         configure(backend, user, passwd)
         maybe_start_services()
 
+        self.app.open_welcome_page()
+
         # exit
         self.parent.parent.Close()
 
@@ -454,6 +464,8 @@ class RegisterPanel(wx.Panel):
         configure(backend, user, passwd)
         maybe_start_services()
 
+        self.app.open_welcome_page()
+
         # exit
         self.parent.parent.Close()