Merge branch 'buschjaeger_new_ui' of git.linphone.org:linphone-iphone-buschjaeger into buschjaeger_new_ui

This commit is contained in:
Yann Diorcet 2013-01-10 12:04:10 +01:00
commit ff6e956fb0
8 changed files with 25 additions and 30 deletions

View file

@ -177,7 +177,7 @@
/* init gradients for lightsButton */
{
bool enabled = (usr != nil && usr.switchlight);
bool enabled = (usr != nil && usr.switchlight && ![[NSUserDefaults standardUserDefaults] boolForKey:@"switchlight_preference"]);
UIColor* col1 = (enabled)?BUSCHJAEGER_NORMAL_COLOR:BUSCHJAEGER_GRAY_COLOR;
UIColor* col2 = (enabled)?BUSCHJAEGER_NORMAL_COLOR2:BUSCHJAEGER_GRAY_COLOR2;

View file

@ -424,6 +424,8 @@ static NSString *const CONFIGURATION_HOME_AP_KEY = @"CONFIGURATION_HOME_AP_KEY";
}
}
[[NSUserDefaults standardUserDefaults] synchronize];
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"ipgateway_preference"];
[[NSUserDefaults standardUserDefaults] setObject:[[NSURL URLWithString:urlString] host] forKey:@"ipgateway_preference"];
} else {
dispatch_async(dispatch_get_main_queue(), ^{
[delegate buschJaegerConfigurationError:[NSString stringWithFormat:@"Request not succeed (Status code:%d)", urlResponse.statusCode]];

View file

@ -318,8 +318,8 @@ static BuschJaegerMainView* mainViewInstance=nil;
- (void)displayMessage:(id)message {
if (![[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
|| [UIApplication sharedApplication].applicationState == UIApplicationStateActive) {
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Dring !",nil)
message: [NSString stringWithFormat:NSLocalizedString(@"%@ ring!",nil), [LinphoneManager instance].configuration.levelPushButton.name]
UIAlertView* error = [[UIAlertView alloc] initWithTitle:@"Welcome"
message: [NSString stringWithFormat:@"%@", [LinphoneManager instance].configuration.levelPushButton.name]
delegate:nil
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
otherButtonTitles:nil,nil];

View file

@ -145,6 +145,7 @@
@"ringtone_01_1600", @"ringtone_preference",
@"ringtone_01_1600", @"level_ringtone_preference",
@"NO", @"lockdoors_preference",
@"NO", @"switchlight_preference",
majorVersion, @"version_preference",
nil];

View file

@ -474,7 +474,7 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
data->notification = [[UILocalNotification alloc] init];
if (data->notification) {
data->notification.repeatInterval = 0;
data->notification.alertBody = [NSString stringWithFormat:NSLocalizedString(@"%@ ring!",nil), address];
data->notification.alertBody = [NSString stringWithFormat:@"%@", address];
data->notification.alertAction = NSLocalizedString(@"Answer", nil);
data->notification.soundName = ringtone;
data->notification.userInfo = [NSDictionary dictionaryWithObject:callId forKey:@"callId"];
@ -601,7 +601,7 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo
UILocalNotification* notif = [[[UILocalNotification alloc] init] autorelease];
if (notif) {
notif.repeatInterval = 0;
notif.alertBody = [NSString stringWithFormat:NSLocalizedString(@"%@ ring!",nil), configuration.levelPushButton.name];
notif.alertBody = [NSString stringWithFormat:@"%@", configuration.levelPushButton.name];
notif.alertAction = NSLocalizedString(@"Show", nil);
notif.soundName = ringtone;
@ -1463,7 +1463,6 @@ static void audioRouteChangeListenerCallback (
//madatory parameters
NSString* username = [[NSUserDefaults standardUserDefaults] stringForKey:@"username_preference"];
NSString* domain = [[NSUserDefaults standardUserDefaults] stringForKey:@"domain_preference"];
NSString* accountPassword = [[NSUserDefaults standardUserDefaults] stringForKey:@"password_preference"];
//bool configCheckDisable = [[NSUserDefaults standardUserDefaults] boolForKey:@"check_config_disable_preference"];
/* MODIFICATION always enable outbound*/
@ -1474,7 +1473,8 @@ static void audioRouteChangeListenerCallback (
linphone_core_clear_all_auth_info(theLinphoneCore);
//clear existing proxy config
linphone_core_clear_proxy_config(theLinphoneCore);
if (username && [username length] >0 && domain && [domain length]>0) {
if (username && [username length] >0) {
NSString* domain = configuration.network.domain;
const char* identity = [[NSString stringWithFormat:@"sip:%@@%@",username,domain] cStringUsingEncoding:[NSString defaultCStringEncoding]];
const char* password = [accountPassword cStringUsingEncoding:[NSString defaultCStringEncoding]];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 886 B

After

Width:  |  Height:  |  Size: 497 B

View file

@ -64,29 +64,11 @@
<key>IsSecure</key>
<false/>
<key>Key</key>
<string>domain_preference</string>
<string>ipgateway_preference</string>
<key>KeyboardType</key>
<string>URL</string>
<key>Title</key>
<string>Domain</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
</dict>
<dict>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<false/>
<key>Key</key>
<string>proxy_preference</string>
<key>KeyboardType</key>
<string>URL</string>
<key>Title</key>
<string>Proxy</string>
<string>IP-Gateway</string>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
</dict>
@ -162,10 +144,20 @@
<key>Key</key>
<string>lockdoors_preference</string>
<key>Title</key>
<string>Lock doors</string>
<string>Hide Lock door</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Hide Switch Light</string>
<key>Key</key>
<string>switchlight_preference</string>
<key>DefaultValue</key>
<false/>
</dict>
<dict>
<key>DefaultValue</key>
<true/>

View file

@ -45,11 +45,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.4.0</string>
<string>0.5.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.4.0</string>
<string>0.5.0</string>
<key>NSMainNibFile</key>
<string>BuschJaegerApp</string>
<key>NSMainNibFile~ipad</key>