mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
add default settings
This commit is contained in:
parent
57ff6ba06f
commit
bbea0544cc
4 changed files with 19 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/* IncallViewController.h
|
||||
/* FirstLoginViewController.h
|
||||
*
|
||||
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* IncallViewController.h
|
||||
/* FirstLoginViewController.m
|
||||
*
|
||||
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
|
||||
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
|
||||
}
|
||||
-(void) displayRegisteredFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName onDomain:(NSString*)domain {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:true forKey:@"enable_first_login_view_preference"];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:false forKey:@"enable_first_login_view_preference"];
|
||||
[self.parentViewController dismissModalViewControllerAnimated:true];
|
||||
[self.activityIndicator setHidden:true];
|
||||
[[LinphoneManager instance] setRegistrationDelegate:nil];
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[[UIApplication sharedApplication] setIdleTimerDisabled:true];
|
||||
[mute reset];
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enable_first_login_view_preference"] == false) {
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"enable_first_login_view_preference"] == true) {
|
||||
myFirstLoginViewController = [[FirstLoginViewController alloc] initWithNibName:@"FirstLoginViewController"
|
||||
bundle:[NSBundle mainBundle]];
|
||||
[[LinphoneManager instance] setRegistrationDelegate:myFirstLoginViewController];
|
||||
|
|
|
|||
|
|
@ -43,8 +43,21 @@
|
|||
[[LinphoneManager instance] becomeActive];
|
||||
}
|
||||
|
||||
- (void) loadDefaultSettings {
|
||||
NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"NO", @"enable_first_login_view_preference", //
|
||||
nil];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
}
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
|
||||
|
||||
/*
|
||||
*Custumization
|
||||
*/
|
||||
[self loadDefaultSettings];
|
||||
//as defined in PhoneMainView.xib
|
||||
//dialer
|
||||
myPhoneViewController = (PhoneViewController*) [myTabBarController.viewControllers objectAtIndex: DIALER_TAB_INDEX];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue