diff --git a/aegisub/changelog.txt b/aegisub/changelog.txt index c5db7616b..5a4a646c2 100644 --- a/aegisub/changelog.txt +++ b/aegisub/changelog.txt @@ -105,6 +105,8 @@ Please visit http://aegisub.net to download latest version - Added shortcut keys (escape to close and delete to delete a style, plus ctrl+c/v for copy/paste) to style manager. (Dansolo) - Added a dummy video provider to create a blank video with customizeable options. (jfs & AMZ) - Changing script resolution when asked to on video loading will now set an undo point. (AMZ) +- Frame number is now the default box on the "go to" dialog. (AMZ) +- Two storages with the same name can no longer be created in the styles manager. (AMZ) = 1.10 beta - 2006.08.07 =========================== diff --git a/aegisub/dialog_style_manager.cpp b/aegisub/dialog_style_manager.cpp index 74702a9ff..0e9756b1b 100644 --- a/aegisub/dialog_style_manager.cpp +++ b/aegisub/dialog_style_manager.cpp @@ -391,16 +391,26 @@ void DialogStyleManager::OnCatalogNew (wxCommandEvent &event) { } } } - if (badchars_removed > 0) { - wxLogWarning(_("The specified catalog name contains one or more illegal characters. They have been replaced with underscores instead.\nThe catalog has been renamed to \"%s\"."), name.c_str()); + + // Make sure that there is no storage with the same name + if (CatalogList->FindString(name) != wxNOT_FOUND) { + wxMessageBox(_("A catalog with that name already exists."),_("Catalog name conflict"),wxICON_ERROR); + return; } + // Warn about bad characters + if (badchars_removed > 0) { + wxMessageBox(wxString::Format(_("The specified catalog name contains one or more illegal characters. They have been replaced with underscores instead.\nThe catalog has been renamed to \"%s\"."), name.c_str()),_("Invalid characters")); + } + + // Add to list of storages Store.Clear(); StorageList->Clear(); CatalogList->Append(name); CatalogList->SetStringSelection(name); StorageActions(true); + // Save wxString dirname = AegisubApp::folderName; dirname += _T("/catalog/"); if (!wxDirExists(dirname)) {