mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-27 07:59:20 +00:00
Disable video button and hide video when compiled without video
This commit is contained in:
parent
efcc6c9f35
commit
e6207f08b1
3 changed files with 11 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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"];
|
||||
|
|
|
|||
|
|
@ -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"];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue