diff --git a/Classes/SettingsViewController.h b/Classes/SettingsViewController.h index af0be21d4..49358e650 100644 --- a/Classes/SettingsViewController.h +++ b/Classes/SettingsViewController.h @@ -23,7 +23,7 @@ #import "IASKAppSettingsViewController.h" #import "LinphoneCoreSettingsStore.h" -@interface SettingsViewController: UIViewController { +@interface SettingsViewController: UIViewController { @private LinphoneCoreSettingsStore* settingsStore; } diff --git a/Classes/SettingsViewController.m b/Classes/SettingsViewController.m index 831c430a8..458acc1c9 100644 --- a/Classes/SettingsViewController.m +++ b/Classes/SettingsViewController.m @@ -719,13 +719,28 @@ static UICompositeViewDescription *compositeDescription = nil; if([key isEqual:@"console_button"]) { [[PhoneMainView instance] changeCurrentView:[ConsoleViewController compositeViewDescription] push:TRUE]; } else if([key isEqual:@"wizard_button"]) { - WizardViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[WizardViewController compositeViewDescription]], WizardViewController); - if(controller != nil) { - [controller reset]; - } + UIAlertView* alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Warning",nil) + message:NSLocalizedString(@"Launching the Wizard will delete any existing proxy config.\nAre you sure to want it?",nil) + delegate:self + cancelButtonTitle:NSLocalizedString(@"Cancel",nil) + otherButtonTitles:NSLocalizedString(@"Launch Wizard",nil), nil]; + [alert show]; + [alert release]; } else if([key isEqual:@"about_button"]) { [[PhoneMainView instance] changeCurrentView:[AboutViewController compositeViewDescription] push:TRUE]; } } +#pragma mark - UIAlertView delegate + +- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { + if( buttonIndex != 1 ) return; + + WizardViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[WizardViewController compositeViewDescription]], WizardViewController); + if(controller != nil) { + [controller reset]; + } +} + + @end diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index da3e56166..651d9e01f 100644 --- a/Resources/en.lproj/Localizable.strings +++ b/Resources/en.lproj/Localizable.strings @@ -302,3 +302,8 @@ "Enter an address" = "Enter SIP address or phone number..."; "%@ is composing..." = "%@ is composing..."; "Resend" = "Resend"; + +/* Alert view for Wizard in Settings */ +"Warning" = "Warning"; +"Launching the Wizard will delete any existing proxy config.\nAre you sure to want it?" = "Launching the Wizard will delete any existing proxy config.\nAre you sure to want it?"; +"Launch Wizard" = "Launch Wizard"; diff --git a/Resources/fr.lproj/Localizable.strings b/Resources/fr.lproj/Localizable.strings index fd6db7002..f86462ee0 100644 --- a/Resources/fr.lproj/Localizable.strings +++ b/Resources/fr.lproj/Localizable.strings @@ -302,3 +302,8 @@ "Enter an address" = "Entrez une addresse SIP ou un numéro de téléphone..."; "%@ is composing..." = "%@ rédige un message..."; "Resend" = "Renvoyer"; + +/* Alert view for Wizard in Settings */ +"Warning" = "Attention"; +"Launching the Wizard will delete any existing proxy config.\nAre you sure to want it?" = "Lancer l'Assistant va effacer vos réglages. Êtes-vous sûr de vouloir cela?"; +"Launch Wizard" = "Lancer l'assistant"; diff --git a/Resources/ru.lproj/Localizable.strings b/Resources/ru.lproj/Localizable.strings index e8b5c0d8e..5bbf56e8d 100644 --- a/Resources/ru.lproj/Localizable.strings +++ b/Resources/ru.lproj/Localizable.strings @@ -302,3 +302,8 @@ "Enter an address" = "Введите адрес SIP или номер телефона..."; "%@ is composing..." = "%@ is composing..."; "Resend" = "Resend"; + +/* Alert view for Wizard in Settings */ +"Warning" = "Warning"; +"Launching the Wizard will delete any existing proxy config.\nAre you sure to want it?" = "Launching the Wizard will delete any existing proxy config.\nAre you sure to want it?"; +"Launch Wizard" = "Launch Wizard";