From 3f522b8836aa7159a3fc80c10825564b572f4186 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Sun, 13 Jan 2008 21:54:31 +0000 Subject: [PATCH] Several minor fixes to spellchecking dialog. Also added a help button to it. Originally committed to SVN as r1702. --- aegisub/changelog.txt | 3 ++- aegisub/dialog_spellchecker.cpp | 27 ++++++++++++++++----------- aegisub/help_button.cpp | 1 + 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/aegisub/changelog.txt b/aegisub/changelog.txt index 0e5a15768..e3fbdc2e0 100644 --- a/aegisub/changelog.txt +++ b/aegisub/changelog.txt @@ -1,7 +1,7 @@ Aegisub changelog Please visit http://aegisub.net to download latest version -= 2.00 - 2007.xx.xx =========================== += 2.00 - 2008.xx.xx =========================== - New Aegisub logo. (AMZ) - The Automation 4 system has been introduced. This means lots of changes. (jfs) @@ -168,6 +168,7 @@ Please visit http://aegisub.net to download latest version - Added offsetting support to the resolution resampler. (AMZ) - Several fixes to Matroska parsing. (AMZ) - Untitled files will now get auto-saved as "Untitled.AUTOSAVE.ass". (AMZ) +- Added several "Help" buttons. (AMZ) diff --git a/aegisub/dialog_spellchecker.cpp b/aegisub/dialog_spellchecker.cpp index 1944fe4ea..a6195c39a 100644 --- a/aegisub/dialog_spellchecker.cpp +++ b/aegisub/dialog_spellchecker.cpp @@ -45,6 +45,7 @@ #include "utils.h" #include "subs_edit_box.h" #include "options.h" +#include "help_button.h" /////// @@ -113,29 +114,33 @@ DialogSpellChecker::DialogSpellChecker(wxFrame *parent) // Actions sizer wxSizer *actionsSizer = new wxBoxSizer(wxVERTICAL); - actionsSizer->Add(new wxButton(this,BUTTON_REPLACE,_("Replace")),0,wxEXPAND | wxBOTTOM,2); - actionsSizer->Add(new wxButton(this,BUTTON_REPLACE_ALL,_("Replace All")),0,wxEXPAND | wxBOTTOM,2); - actionsSizer->Add(new wxButton(this,BUTTON_IGNORE,_("Ignore")),0,wxEXPAND | wxBOTTOM,2); - actionsSizer->Add(new wxButton(this,BUTTON_IGNORE_ALL,_("Ignore all")),0,wxEXPAND | wxBOTTOM,2); - actionsSizer->Add(new wxButton(this,BUTTON_ADD,_("Add to dictionary")),0,wxEXPAND | wxBOTTOM,0); + actionsSizer->Add(new wxButton(this,BUTTON_REPLACE,_("Replace")),0,wxEXPAND | wxBOTTOM,5); + actionsSizer->Add(new wxButton(this,BUTTON_REPLACE_ALL,_("Replace All")),0,wxEXPAND | wxBOTTOM,5); + actionsSizer->Add(new wxButton(this,BUTTON_IGNORE,_("Ignore")),0,wxEXPAND | wxBOTTOM,5); + actionsSizer->Add(new wxButton(this,BUTTON_IGNORE_ALL,_("Ignore all")),0,wxEXPAND | wxBOTTOM,5); + actionsSizer->Add(new wxButton(this,BUTTON_ADD,_("Add to dictionary")),0,wxEXPAND | wxBOTTOM,5); + actionsSizer->Add(new HelpButton(this,_T("Spell Checker")),0,wxEXPAND | wxBOTTOM,0); + actionsSizer->AddStretchSpacer(1); // Bottom sizer - suggestList = new wxListBox(this,LIST_SUGGESTIONS,wxDefaultPosition,wxSize(150,100)); + suggestList = new wxListBox(this,LIST_SUGGESTIONS,wxDefaultPosition,wxSize(300,150)); language = new wxComboBox(this,LIST_LANGUAGES,_T(""),wxDefaultPosition,wxDefaultSize,langNames,wxCB_DROPDOWN | wxCB_READONLY); language->SetSelection(curLangPos); wxFlexGridSizer *botSizer = new wxFlexGridSizer(2,2,5,5); botSizer->Add(suggestList,1,wxEXPAND); - botSizer->Add(actionsSizer,0,wxEXPAND); - botSizer->Add(language,1,wxEXPAND); - botSizer->Add(new wxButton(this,wxID_CLOSE),0,wxEXPAND); + botSizer->Add(actionsSizer,1,wxEXPAND); + botSizer->Add(language,0,wxEXPAND); + botSizer->Add(new wxButton(this,wxID_CANCEL),0,wxEXPAND); botSizer->AddGrowableCol(0,1); - SetEscapeId(wxID_CLOSE); + botSizer->AddGrowableRow(0,1); + //SetEscapeId(wxID_CLOSE); // Main sizer wxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); mainSizer->Add(topSizer,0,wxEXPAND | wxALL,5); mainSizer->Add(botSizer,1,wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM,5); SetSizer(mainSizer); + mainSizer->SetSizeHints(this); CenterOnParent(); // Go to first match and show @@ -242,7 +247,7 @@ void DialogSpellChecker::SetWord(wxString word) { /////////////// // Event table BEGIN_EVENT_TABLE(DialogSpellChecker,wxDialog) - EVT_BUTTON(wxID_CLOSE,DialogSpellChecker::OnClose) + EVT_BUTTON(wxID_CANCEL,DialogSpellChecker::OnClose) EVT_BUTTON(BUTTON_REPLACE,DialogSpellChecker::OnReplace) EVT_BUTTON(BUTTON_REPLACE_ALL,DialogSpellChecker::OnReplaceAll) EVT_BUTTON(BUTTON_IGNORE,DialogSpellChecker::OnIgnore) diff --git a/aegisub/help_button.cpp b/aegisub/help_button.cpp index ca8329661..42d8bf4d7 100644 --- a/aegisub/help_button.cpp +++ b/aegisub/help_button.cpp @@ -99,6 +99,7 @@ void HelpButton::InitStatic() { page[_T("Main")] = _T(""); page[_T("Options")] = _T("Options"); page[_T("Resampler")] = _T("Resolution_Resampler"); + page[_T("Spell Checker")] = _T("Other_Tools"); page[_T("Style Editor")] = _T("Styles"); page[_T("Styles Manager")] = _T("Styles"); page[_T("Styling Assistant")] = _T("Styling_Assistant");