Add a reset logs button

This commit is contained in:
Guillaume BIENKOWSKI 2015-01-07 17:55:28 +01:00
parent ed6dc34f7f
commit 7c75cfd825
2 changed files with 12 additions and 0 deletions

View file

@ -492,6 +492,7 @@ static UICompositeViewDescription *compositeDescription = nil;
BOOL debugEnabled = [[notif.userInfo objectForKey:@"debugenable_preference"] boolValue];
removeFromHiddenKeys = debugEnabled;
[keys addObject:@"send_logs_button"];
[keys addObject:@"reset_logs_button"];
[[LinphoneManager instance] setLogsEnabled:debugEnabled];
} else if( [@"advanced_account_preference" compare:notif.object] == NSOrderedSame) {
removeFromHiddenKeys = [[notif.userInfo objectForKey:@"advanced_account_preference"] boolValue];
@ -591,6 +592,7 @@ static UICompositeViewDescription *compositeDescription = nil;
if (! [[LinphoneManager instance] lpConfigBoolForKey:@"debugenable_preference"]) {
[hiddenKeys addObject:@"send_logs_button"];
[hiddenKeys addObject:@"reset_logs_button"];
}
[hiddenKeys addObject:@"playback_gain_preference"];
@ -702,6 +704,8 @@ static UICompositeViewDescription *compositeDescription = nil;
[alert release];
} else if([key isEqual:@"about_button"]) {
[[PhoneMainView instance] changeCurrentView:[AboutViewController compositeViewDescription] push:TRUE];
} else if ([key isEqualToString:@"reset_logs_button"]) {
linphone_core_reset_log_collection();
} else if ([key isEqual:@"send_logs_button"]) {
char * filepath = linphone_core_compress_log_collection([LinphoneManager getLc]);
if (filepath == NULL) {

View file

@ -28,6 +28,14 @@
<key>Type</key>
<string>IASKButtonSpecifier</string>
</dict>
<dict>
<key>Key</key>
<string>reset_logs_button</string>
<key>Title</key>
<string>Clear Logs</string>
<key>Type</key>
<string>IASKButtonSpecifier</string>
</dict>
<dict>
<key>Title</key>
<string></string>