Added and fixed more help buttons.

Originally committed to SVN as r1701.
This commit is contained in:
Rodrigo Braz Monteiro 2008-01-13 21:27:06 +00:00
parent e0f3086369
commit 6c19999e06
5 changed files with 26 additions and 14 deletions

View File

@ -63,6 +63,7 @@
#include "browse_button.h" #include "browse_button.h"
#include "tooltip_manager.h" #include "tooltip_manager.h"
#include "utils.h" #include "utils.h"
#include "help_button.h"
/////// ///////
@ -629,12 +630,17 @@ DialogOptions::DialogOptions(wxWindow *parent)
#endif #endif
// Buttons Sizer // Buttons Sizer
wxStdDialogButtonSizer *stdButtonSizer = new wxStdDialogButtonSizer();
stdButtonSizer->AddButton(new wxButton(this,wxID_OK));
stdButtonSizer->AddButton(new wxButton(this,wxID_CANCEL));
stdButtonSizer->AddButton(new wxButton(this,wxID_APPLY));
stdButtonSizer->AddButton(new HelpButton(this,_T("Options")));
stdButtonSizer->Realize();
wxSizer *buttonSizer = new wxBoxSizer(wxHORIZONTAL); wxSizer *buttonSizer = new wxBoxSizer(wxHORIZONTAL);
buttonSizer->Add(new wxButton(this,BUTTON_DEFAULTS,_("Defaults")),0); wxButton *defaultButton = new wxButton(this,BUTTON_DEFAULTS,_("Restore Defaults"));
buttonSizer->Add(defaultButton,0,wxEXPAND);
buttonSizer->AddStretchSpacer(1); buttonSizer->AddStretchSpacer(1);
buttonSizer->Add(new wxButton(this,wxID_OK),0,wxRIGHT,5); buttonSizer->Add(stdButtonSizer,0,wxEXPAND);
buttonSizer->Add(new wxButton(this,wxID_CANCEL),0,wxRIGHT,5);
buttonSizer->Add(new wxButton(this,wxID_APPLY),0);
// Main Sizer // Main Sizer
wxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); wxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);

View File

@ -53,6 +53,7 @@
#include "options.h" #include "options.h"
#include "subtitles_provider.h" #include "subtitles_provider.h"
#include "ass_style_storage.h" #include "ass_style_storage.h"
#include "help_button.h"
/////// ///////
@ -331,7 +332,7 @@ DialogStyleEditor::DialogStyleEditor (wxWindow *parent, AssStyle *_style, Subtit
okButton->SetDefault(); okButton->SetDefault();
ButtonSizer->AddButton(new wxButton(this, wxID_CANCEL)); ButtonSizer->AddButton(new wxButton(this, wxID_CANCEL));
ButtonSizer->AddButton(new wxButton(this, wxID_APPLY)); ButtonSizer->AddButton(new wxButton(this, wxID_APPLY));
ButtonSizer->AddButton(new wxButton(this, wxID_HELP)); ButtonSizer->AddButton(new HelpButton(this, _T("Style Editor")));
ButtonSizer->AddButton(okButton); ButtonSizer->AddButton(okButton);
ButtonSizer->Realize(); ButtonSizer->Realize();

View File

@ -114,13 +114,14 @@ wxDialog (parent, -1, _("Styling assistant"), wxDefaultPosition, wxDefaultSize,
BottomSizer->Add(RightSizer,1,wxEXPAND,0); BottomSizer->Add(RightSizer,1,wxEXPAND,0);
// Button sizer // Button sizer
wxSizer *ButtonSizer = new wxBoxSizer(wxHORIZONTAL); wxStdDialogButtonSizer *ButtonSizer = new wxStdDialogButtonSizer();
ButtonSizer->Add(new HelpButton(this,_T("Styling Assistant")),0,wxRIGHT,0); ButtonSizer->AddButton(new wxButton(this,wxID_OK));
ButtonSizer->AddStretchSpacer(1);
wxButton *PlayButton = new wxButton(this,BUTTON_PLAY,_("Play Audio")); wxButton *PlayButton = new wxButton(this,BUTTON_PLAY,_("Play Audio"));
PlayButton->Enable(audio->loaded); PlayButton->Enable(audio->loaded);
ButtonSizer->Add(PlayButton,0,wxRIGHT,5); ButtonSizer->AddButton(PlayButton);
ButtonSizer->Add(new wxButton(this,wxID_OK),0,wxRIGHT,0); ButtonSizer->AddButton(new HelpButton(this,_T("Styling Assistant")));
ButtonSizer->SetNegativeButton(PlayButton);
ButtonSizer->Realize();
// Main sizer // Main sizer
wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL); wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);

View File

@ -46,6 +46,7 @@
#include "ass_time.h" #include "ass_time.h"
#include "vfr.h" #include "vfr.h"
#include "utils.h" #include "utils.h"
#include "help_button.h"
/////////////// ///////////////
@ -153,7 +154,7 @@ DialogTimingProcessor::DialogTimingProcessor(wxWindow *parent,SubtitlesGrid *_gr
ApplyButton = new wxButton(this,wxID_OK); ApplyButton = new wxButton(this,wxID_OK);
ButtonSizer->AddButton(ApplyButton); ButtonSizer->AddButton(ApplyButton);
ButtonSizer->AddButton(new wxButton(this,wxID_CANCEL)); ButtonSizer->AddButton(new wxButton(this,wxID_CANCEL));
ButtonSizer->AddButton(new wxButton(this,wxID_HELP)); ButtonSizer->AddButton(new HelpButton(this,_T("Timing Processor")));
ButtonSizer->Realize(); ButtonSizer->Realize();
// Right Sizer // Right Sizer

View File

@ -95,10 +95,13 @@ void HelpButton::InitStatic() {
if (!pages) { if (!pages) {
pages = new std::map<wxString,wxString>; pages = new std::map<wxString,wxString>;
std::map<wxString,wxString> &page = *pages; std::map<wxString,wxString> &page = *pages;
page[_T("Main")] = _T("");
page[_T("Styling Assistant")] = _T("Styling_Assistant");
page[_T("Styles Manager")] = _T("Styles");
page[_T("Kanji Timer")] = _T("Kanji_Timer"); page[_T("Kanji Timer")] = _T("Kanji_Timer");
page[_T("Main")] = _T("");
page[_T("Options")] = _T("Options");
page[_T("Resampler")] = _T("Resolution_Resampler"); page[_T("Resampler")] = _T("Resolution_Resampler");
page[_T("Style Editor")] = _T("Styles");
page[_T("Styles Manager")] = _T("Styles");
page[_T("Styling Assistant")] = _T("Styling_Assistant");
page[_T("Timing Processor")] = _T("Timing_Post-Processor");
} }
} }