Remove annoying modal dialogs
This commit is contained in:
parent
7a00e13624
commit
1c0337c2f7
2 changed files with 6 additions and 13 deletions
|
@ -245,9 +245,7 @@ void add_styles(Func1 name_checker, Func2 style_adder) {
|
|||
}
|
||||
|
||||
int confirm_delete(int n, wxWindow *parent, wxString const& title) {
|
||||
return wxMessageBox(
|
||||
fmt_plural(n, "Are you sure you want to delete this style?", "Are you sure you want to delete these %d styles?", n),
|
||||
title, wxYES_NO | wxICON_EXCLAMATION, parent);
|
||||
return wxYES;
|
||||
}
|
||||
|
||||
int get_single_sel(wxListBox *lb) {
|
||||
|
@ -507,10 +505,8 @@ void DialogStyleManager::OnCopyToStorage() {
|
|||
wxString styleName = CurrentList->GetString(selections[i]);
|
||||
|
||||
if (AssStyle *style = Store.GetStyle(from_wx(styleName))) {
|
||||
if (wxYES == wxMessageBox(fmt_tl("There is already a style with the name \"%s\" in the current storage. Overwrite?", styleName), _("Style name collision"), wxYES_NO)) {
|
||||
*style = *styleMap.at(selections[i]);
|
||||
copied.push_back(styleName);
|
||||
}
|
||||
*style = *styleMap.at(selections[i]);
|
||||
copied.push_back(styleName);
|
||||
}
|
||||
else {
|
||||
Store.push_back(agi::make_unique<AssStyle>(*styleMap.at(selections[i])));
|
||||
|
@ -534,10 +530,8 @@ void DialogStyleManager::OnCopyToCurrent() {
|
|||
wxString styleName = StorageList->GetString(selections[i]);
|
||||
|
||||
if (AssStyle *style = c->ass->GetStyle(from_wx(styleName))) {
|
||||
if (wxYES == wxMessageBox(fmt_tl("There is already a style with the name \"%s\" in the current script. Overwrite?", styleName), _("Style name collision"), wxYES_NO)) {
|
||||
*style = *Store[selections[i]];
|
||||
copied.push_back(styleName);
|
||||
}
|
||||
*style = *Store[selections[i]];
|
||||
copied.push_back(styleName);
|
||||
}
|
||||
else {
|
||||
c->ass->Styles.push_back(*new AssStyle(*Store[selections[i]]));
|
||||
|
|
|
@ -252,7 +252,7 @@ void Project::DoLoadAudio(agi::fs::path const& path, bool quiet) {
|
|||
}
|
||||
}
|
||||
catch (agi::fs::FileNotFound const& e) {
|
||||
return ShowError(_("The audio file was not found: ") + to_wx(e.GetMessage()));
|
||||
return;
|
||||
}
|
||||
catch (agi::AudioDataNotFound const& e) {
|
||||
if (quiet) {
|
||||
|
@ -294,7 +294,6 @@ bool Project::DoLoadVideo(agi::fs::path const& path) {
|
|||
catch (agi::UserCancelException const&) { return false; }
|
||||
catch (agi::fs::FileSystemError const& err) {
|
||||
config::mru->Remove("Video", path);
|
||||
ShowError(to_wx(err.GetMessage()));
|
||||
return false;
|
||||
}
|
||||
catch (VideoProviderError const& err) {
|
||||
|
|
Loading…
Reference in a new issue