diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m index a60ba0ab8..5fb259515 100644 --- a/Classes/LinphoneCoreSettingsStore.m +++ b/Classes/LinphoneCoreSettingsStore.m @@ -25,6 +25,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); @implementation LinphoneCoreSettingsStore + - (void)handleMigration { NSUserDefaults *oldconfig=[NSUserDefaults standardUserDefaults]; NSArray *allkeys=[[oldconfig dictionaryRepresentation] allKeys]; @@ -39,8 +40,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); - (id)init { self = [super init]; if (self){ - dict=[[NSMutableDictionary alloc] init]; - changedDict=[[NSMutableDictionary alloc] init]; + dict = [[NSMutableDictionary alloc] init]; + changedDict = [[NSMutableDictionary alloc] init]; [self transformLinphoneCoreToKeys]; LinphoneCore *lc=[LinphoneManager getLc]; if (lp_config_get_int(linphone_core_get_config(lc), LINPHONERC_APPLICATION_KEY,"config_migrated",0) == 0) { diff --git a/Classes/LinphoneUI/UIVideoButton.m b/Classes/LinphoneUI/UIVideoButton.m index 6100bc7da..82727c22d 100644 --- a/Classes/LinphoneUI/UIVideoButton.m +++ b/Classes/LinphoneUI/UIVideoButton.m @@ -104,6 +104,7 @@ - (bool)onUpdate { if([LinphoneManager isLcReady]) { bool val = false; +#ifdef VIDEO_ENABLED if(linphone_core_video_enabled([LinphoneManager getLc])) { LinphoneCall* currentCall = linphone_core_get_current_call([LinphoneManager getLc]); if (currentCall) { @@ -141,6 +142,9 @@ [self setEnabled:FALSE]; [waitView stopAnimating]; } +#else //VIDEO_ENABLED + [self setEnabled:FALSE]; +#endif //VIDEO_ENABLED return val; } else { [LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot update video button: Linphone core not ready"]; diff --git a/Classes/SettingsViewController.m b/Classes/SettingsViewController.m index 6e7cbdc45..5c5955e37 100644 --- a/Classes/SettingsViewController.m +++ b/Classes/SettingsViewController.m @@ -542,6 +542,10 @@ static UICompositeViewDescription *compositeDescription = nil; [hiddenKeys addObject:@"enable_first_login_view_preference"]; +#ifndef VIDEO_ENABLED + [hiddenKeys addObject:@"enable_video_preference"]; +#endif //VIDEO_ENABLED + if (!linphone_core_video_enabled([LinphoneManager getLc])) { [hiddenKeys addObject:@"video_menu"]; }