Add locks door and background mode toogle

This commit is contained in:
Yann Diorcet 2012-09-18 09:17:55 +02:00
parent 3e90ac95b5
commit 9c9de38c96
3 changed files with 30 additions and 3 deletions

View file

@ -121,7 +121,7 @@
User *usr = [[[LinphoneManager instance] configuration] getCurrentUser];
/* init gradients for openDoorButton*/
{
bool enabled = (usr != nil && usr.opendoor);
bool enabled = (usr != nil && usr.opendoor && ![[NSUserDefaults standardUserDefaults] boolForKey:@"lockdoors_preference"]);
UIColor* col1 = (enabled)?BUSCHJAEGER_NORMAL_COLOR:BUSCHJAEGER_GRAY_COLOR;
UIColor* col2 = (enabled)?BUSCHJAEGER_NORMAL_COLOR2:BUSCHJAEGER_GRAY_COLOR2;

View file

@ -174,6 +174,7 @@
@"YES", @"outbound_proxy_preference",
@"ringtone_01_1600", @"ringtone_preference",
@"ringtone_01_1600", @"level_ringtone_preference",
@"NO", @"lockdoors_preference",
nil];
[defaultsToRegister addEntriesFromDictionary:appDefaults];

View file

@ -87,8 +87,6 @@
<string>Sounds</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>FooterText</key>
<string>Welcome must be restarted for changes to take effect</string>
</dict>
<dict>
<key>DefaultValue</key>
@ -142,6 +140,34 @@
<string>ringtone_05_1600</string>
</array>
</dict>
<dict>
<key>Title</key>
<string>Advanced</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>FooterText</key>
<string>Welcome must be restarted for changes to take effect</string>
</dict>
<dict>
<key>DefaultValue</key>
<false/>
<key>Key</key>
<string>lockdoors_preference</string>
<key>Title</key>
<string>Lock doors</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>backgroundmode_preference</string>
<key>Title</key>
<string>Background mode</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Root</string>