diff --git a/aegisub/changelog.txt b/aegisub/changelog.txt index 5a4a646c2..10e2abcce 100644 --- a/aegisub/changelog.txt +++ b/aegisub/changelog.txt @@ -107,6 +107,8 @@ Please visit http://aegisub.net to download latest version - 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) +- Style editor will no longer admit creation of styles with equal names. (AMZ) +- Hitting enter on style editor will now "OK" it. (AMZ) = 1.10 beta - 2006.08.07 =========================== diff --git a/aegisub/dialog_style_editor.cpp b/aegisub/dialog_style_editor.cpp index ea701ab6e..885f81b3b 100644 --- a/aegisub/dialog_style_editor.cpp +++ b/aegisub/dialog_style_editor.cpp @@ -272,17 +272,17 @@ DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, Subtit // Buttons wxSizer *ButtonSizer = new wxBoxSizer(wxHORIZONTAL); ButtonSizer->AddStretchSpacer(1); + wxButton *okButton = new wxButton(this, wxID_OK); #ifndef __WXMAC__ - ButtonSizer->Add(new wxButton(this, wxID_OK),0,wxRIGHT,5); + ButtonSizer->Add(okButton,0,wxRIGHT,5); ButtonSizer->Add(new wxButton(this, wxID_CANCEL),0,wxRIGHT,5); ButtonSizer->Add(new wxButton(this, wxID_APPLY),0,wxRIGHT,5); #else - wxButton *okButton = new wxButton(this, wxID_OK); ButtonSizer->Add(new wxButton(this, wxID_APPLY),0,wxRIGHT,5); ButtonSizer->Add(new wxButton(this, wxID_CANCEL),0,wxRIGHT,5); ButtonSizer->Add(okButton,0,wxRIGHT,5); - okButton->SetDefault(); #endif + okButton->SetDefault(); // General Layout MainSizer = new wxBoxSizer(wxVERTICAL); @@ -360,8 +360,8 @@ void DialogStyleEditor::Apply (bool apply,bool close) { for (unsigned int i=0;iass->GetStyle(styles[i]) != style) { - int answer = wxMessageBox(_T("There is already a style with this name. Proceed anyway?"),_T("Style name conflict."),wxYES_NO); - if (answer == wxNO) return; + wxMessageBox(_T("There is already a style with this name. Please choose another name."),_T("Style name conflict."),wxICON_ERROR); + return; } } }