--- a/Sources/UserInterface/WelcomePage.h
+++ b/Sources/UserInterface/WelcomePage.h
@@ -14,16 +14,17 @@
The Original Code is weave-iphone.
The Initial Developer of the Original Code is Mozilla Labs.
Portions created by the Initial Developer are Copyright (C) 2009
the Initial Developer. All Rights Reserved.
Contributor(s):
Dan Walkowski <dwalkowski@mozilla.com>
+ Stefan Arentz <stefan@arentz.ca>
Alternatively, the contents of this file may be used under the terms of either
the GNU General Public License Version 2 or later (the "GPL"), or the GNU
Lesser General Public License Version 2.1 or later (the "LGPL"), in which case
the provisions of the GPL or the LGPL are applicable instead of those above.
If you wish to allow use of your version of this file only under the terms of
either the GPL or the LGPL, and not to allow others to use your version of
this file under the terms of the MPL, indicate your decision by deleting the
--- a/Sources/UserInterface/WelcomePage.m
+++ b/Sources/UserInterface/WelcomePage.m
@@ -14,16 +14,17 @@
The Original Code is weave-iphone.
The Initial Developer of the Original Code is Mozilla Labs.
Portions created by the Initial Developer are Copyright (C) 2009
the Initial Developer. All Rights Reserved.
Contributor(s):
Dan Walkowski <dwalkowski@mozilla.com>
+ Stefan Arentz <stefan@arentz.ca>
Alternatively, the contents of this file may be used under the terms of either
the GNU General Public License Version 2 or later (the "GPL"), or the GNU
Lesser General Public License Version 2.1 or later (the "LGPL"), in which case
the provisions of the GPL or the LGPL are applicable instead of those above.
If you wish to allow use of your version of this file only under the terms of
either the GPL or the LGPL, and not to allow others to use your version of
this file under the terms of the MPL, indicate your decision by deleting the
@@ -32,16 +33,19 @@
recipient may use your version of this file under the terms of any one of the
MPL, the GPL or the LGPL.
***** END LICENSE BLOCK *****/
#import "WelcomePage.h"
#import "AccountHelp.h"
#import "WeaveAppDelegate.h"
+#import "JPAKEReporter.h"
+
+JPAKEReporter* gSharedReporter = nil;
@implementation WelcomePage
- (void) manualSetupViewControllerDidLogin: (ManualSetupViewController*) vc
{
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"showedFirstRunPage"];
[[NSUserDefaults standardUserDefaults] synchronize];
@@ -100,18 +104,26 @@
if ([delegate canConnectToInternet] == NO) {
UIAlertView* alert = [[UIAlertView alloc] initWithTitle: NSLocalizedString(@"Cannot Setup Sync", @"Cannot Setup Sync")
message: NSLocalizedString(@"No internet connection available", "no internet connection")
delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", @"ok") otherButtonTitles:nil];
[alert show];
[alert release];
} else {
EasySetupViewController* easySetupViewController = [[EasySetupViewController new] autorelease];
- if (easySetupViewController != nil) {
- easySetupViewController.server = [NSURL URLWithString: @"https://stage-setup.services.mozilla.com"];
+ if (easySetupViewController != nil)
+ {
+ NSURL* server = [NSURL URLWithString: @"https://stage-setup.services.mozilla.com"];
+
+ if (gSharedReporter == nil) {
+ gSharedReporter = [[JPAKEReporter alloc] initWithServer: server];
+ }
+
+ easySetupViewController.reporter = gSharedReporter;
+ easySetupViewController.server = server;
easySetupViewController.delegate = self;
[self presentModalViewController: easySetupViewController animated: YES];
}
}
}
- (IBAction) presentAccountHelpViewController;
{