Fixed Shift Times window layout and added help buttons to it and translation assistant.

Originally committed to SVN as r1704.
This commit is contained in:
Rodrigo Braz Monteiro 2008-01-13 22:25:26 +00:00
parent 62e3c7a3a6
commit 2127d100ac
4 changed files with 26 additions and 30 deletions

View File

@ -52,6 +52,7 @@
#include "main.h"
#include "font_file_lister.h"
#include "utils.h"
#include "help_button.h"
///////
@ -113,17 +114,14 @@ DialogFontsCollector::DialogFontsCollector(wxWindow *parent)
// Buttons sizer
StartButton = new wxButton(this,START_BUTTON,_("&Start!"));
CloseButton = new wxButton(this,wxID_CANCEL);
StartButton->SetDefault();
CloseButton = new wxButton(this,wxID_CANCEL,_T("Close"));
wxSizer *ButtonSizer = new wxBoxSizer(wxHORIZONTAL);
ButtonSizer->AddStretchSpacer(1);
#ifdef __WXMAC__
ButtonSizer->Add(CloseButton,0,wxRIGHT,5);
ButtonSizer->Add(StartButton);
#else
ButtonSizer->Add(StartButton,0,wxRIGHT,5);
ButtonSizer->Add(CloseButton);
#endif
wxStdDialogButtonSizer *ButtonSizer = new wxStdDialogButtonSizer();
ButtonSizer->AddButton(StartButton);
ButtonSizer->AddButton(CloseButton);
ButtonSizer->AddButton(new HelpButton(this,_T("Fonts Collector")));
ButtonSizer->SetAffirmativeButton(StartButton);
ButtonSizer->Realize();
// Main sizer
wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);

View File

@ -52,6 +52,7 @@
#include "ass_dialogue.h"
#include "subs_edit_box.h"
#include "utils.h"
#include "help_button.h"
///////////////
@ -111,24 +112,16 @@ DialogShiftTimes::DialogShiftTimes (wxWindow *parent,SubtitlesGrid *_grid)
// History
History = new wxListBox(this,-1,wxDefaultPosition,wxSize(350,100), 0, NULL, wxLB_HSCROLL);
wxButton *ClearButton = new wxButton(this,SHIFT_CLEAR_HISTORY,_("Clear"));
HistorySizer->Add(History,1,wxEXPAND,0);
HistorySizer->Add(ClearButton,0,wxEXPAND,0);
// Buttons
wxButton *OKButton = new wxButton(this,wxID_OK);
wxButton *CancelButton = new wxButton(this,wxID_CANCEL);
wxButton *ClearButton = new wxButton(this,SHIFT_CLEAR_HISTORY,_("Clear"));
OKButton->SetDefault();
wxSizer *ButtonSizer = new wxBoxSizer(wxHORIZONTAL);
ButtonSizer->AddStretchSpacer(2);
#ifndef __WXMAC__
ButtonSizer->Add(OKButton,0,wxALIGN_CENTER|wxRIGHT,5);
ButtonSizer->Add(CancelButton,0,wxALIGN_CENTER|wxRIGHT,0);
#else
ButtonSizer->Add(CancelButton,0,wxRIGHT,5);
ButtonSizer->Add(OKButton,0,wxRIGHT,0);
#endif
ButtonSizer->AddStretchSpacer(1);
ButtonSizer->Add(ClearButton,0,wxALIGN_RIGHT|wxRIGHT,5);
wxStdDialogButtonSizer *ButtonSizer = new wxStdDialogButtonSizer();
ButtonSizer->AddButton(new wxButton(this,wxID_OK));
ButtonSizer->AddButton(new wxButton(this,wxID_CANCEL));
ButtonSizer->AddButton(new HelpButton(this,_T("Shift Times")));
ButtonSizer->Realize();
// General layout
wxSizer *LeftSizer = new wxBoxSizer(wxVERTICAL);

View File

@ -49,6 +49,7 @@
#include "frame_main.h"
#include "hotkeys.h"
#include "utils.h"
#include "help_button.h"
///////////////
@ -112,12 +113,14 @@ DialogTranslation::DialogTranslation (wxWindow *parent,AssFile *_subs,SubtitlesG
KeysSizer->Add(PreviewCheck,0,wxTOP,5);
// Button sizer
wxSizer *ButtonSizer = new wxBoxSizer(wxHORIZONTAL);
ButtonSizer->AddStretchSpacer(1);
wxStdDialogButtonSizer *ButtonSizer = new wxStdDialogButtonSizer();
wxButton *PlayButton = new wxButton(this,BUTTON_TRANS_PLAY,_("Play Audio"));
PlayButton->Enable(audio->loaded);
ButtonSizer->Add(PlayButton,0,wxRIGHT,0);
ButtonSizer->Add(new wxButton(this,wxID_CLOSE),0,wxRIGHT,0);
ButtonSizer->AddButton(PlayButton);
ButtonSizer->AddButton(new wxButton(this,wxID_CANCEL));
ButtonSizer->AddButton(new HelpButton(this,_T("Translation Assistant")));
ButtonSizer->SetAffirmativeButton(PlayButton);
ButtonSizer->Realize();
// General layout
wxSizer *MainSizer = new wxBoxSizer(wxVERTICAL);

View File

@ -96,11 +96,13 @@ void HelpButton::InitStatic() {
pages = new std::map<wxString,wxString>;
std::map<wxString,wxString> &page = *pages;
page[_T("Colour Picker")] = _T("Colour_Picker");
page[_T("Fonts Collector")] = _T("Fonts_Collector");
page[_T("Kanji Timer")] = _T("Kanji_Timer");
page[_T("Main")] = _T("");
page[_T("Options")] = _T("Options");
page[_T("Resampler")] = _T("Resolution_Resampler");
page[_T("Spell Checker")] = _T("Other_Tools");
page[_T("Shift Times")] = _T("Other_Tools#Shift_Times");
page[_T("Spell Checker")] = _T("Other_Tools#Spell_Checker");
page[_T("Style Editor")] = _T("Styles");
page[_T("Styles Manager")] = _T("Styles");
page[_T("Styling Assistant")] = _T("Styling_Assistant");