Merge remote branch 'bc/master' into tunnel

Conflicts:
	linphone.xcodeproj/project.pbxproj
This commit is contained in:
Jehan Monnier 2011-03-25 08:38:31 +01:00
commit d94b86610f
3 changed files with 33 additions and 2 deletions

View file

@ -43,7 +43,38 @@
[[LinphoneManager instance] becomeActive];
}
- (void)registerDefaultsFromSettingsBundle {
// source: http://stackoverflow.com/questions/510216/
NSString *settingsBundle = [[NSBundle mainBundle] pathForResource:@"Settings" ofType:@"bundle"];
if(!settingsBundle) {
NSLog(@"Could not find Settings.bundle");
return;
}
NSDictionary *settings = [NSDictionary dictionaryWithContentsOfFile:[settingsBundle stringByAppendingPathComponent:@"Root.plist"]];
NSArray *preferences = [settings objectForKey:@"PreferenceSpecifiers"];
NSMutableDictionary *defaultsToRegister = [[NSMutableDictionary alloc] initWithCapacity:[preferences count]];
for(NSDictionary *prefSpecification in preferences) {
NSString *key = [prefSpecification objectForKey:@"Key"];
if(key) {
[defaultsToRegister setObject:[prefSpecification objectForKey:@"DefaultValue"] forKey:key];
}
}
[[NSUserDefaults standardUserDefaults] registerDefaults:defaultsToRegister];
[defaultsToRegister release];
}
- (void) loadDefaultSettings {
// if this is the first launch after installing, we would like to load default settings values from Settings.bundle
NSObject *somePrefVal = [[NSUserDefaults standardUserDefaults] objectForKey:@"debugenable_preference"];
if(!somePrefVal) {
// has no value, so defaults have not been loaded yet
[self registerDefaultsFromSettingsBundle];
}
NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:
@"NO", @"enable_first_login_view_preference", //
nil];

View file

@ -193,7 +193,7 @@ build-libgsm:
cd $(BUILDER_BUILD_DIR)/$(gsm_dir)\
&& mkdir -p $(prefix)/include/gsm \
&& host_alias=$(host) . $(BUILDER_SRC_DIR)/build/$(config_site) \
&& make CC="$${CC}" INSTALL_ROOT=$(prefix) GSM_INSTALL_INC=$(prefix)/include/gsm install
&& make -j1 CC="$${CC}" INSTALL_ROOT=$(prefix) GSM_INSTALL_INC=$(prefix)/include/gsm install
clean-libgsm:
cd $(BUILDER_BUILD_DIR)/$(gsm_dir)\

@ -1 +1 @@
Subproject commit c17f2142dadfba0f7f0bc5a92c680c845b56686a
Subproject commit 35e72d0c3a383da8865fbf37e5e13b6cfd9483fd