Fixed a few dialogs and added the early medusa shortcuts stuff

Originally committed to SVN as r661.
This commit is contained in:
Rodrigo Braz Monteiro 2006-12-30 20:58:24 +00:00
parent 9037e186f9
commit 23e73cb505
11 changed files with 75 additions and 13 deletions

View File

@ -170,6 +170,10 @@ wxPanel(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL|wxBORDER_RAISE
SSAMode->SetToolTip(_("Substation Alpha Mode - Left click sets start and right click sets end"));
SSAMode->SetValue(Options.AsBool(_T("Audio SSA Mode")));
ButtonSizer->Add(SSAMode,0,wxRIGHT | wxALIGN_CENTER | wxEXPAND,0);
MedusaMode = new ToggleBitmap(this,Audio_Check_Medusa,wxBITMAP(toggle_audio_medusa),wxSize(30,-1));
MedusaMode->SetToolTip(_("Enable Medusa-Style Timing Shortcuts"));
MedusaMode->SetValue(Options.AsBool(_T("Audio Medusa Timing Hotkeys")));
ButtonSizer->Add(MedusaMode,0,wxRIGHT | wxALIGN_CENTER | wxEXPAND,0);
SpectrumMode = new ToggleBitmap(this,Audio_Check_Spectrum,wxBITMAP(toggle_audio_spectrum),wxSize(30,-1));
SpectrumMode->SetToolTip(_("Spectrum analyzer mode"));
SpectrumMode->SetValue(Options.AsBool(_T("Audio Spectrum")));

View File

@ -75,6 +75,7 @@ private:
wxButton *JoinButton;
ToggleBitmap *AutoScroll;
ToggleBitmap *SSAMode;
ToggleBitmap *MedusaMode;
ToggleBitmap *AutoCommit;
ToggleBitmap *SpectrumMode;
@ -166,6 +167,7 @@ enum {
Audio_Check_AutoCommit,
Audio_Check_AutoGoto,
Audio_Check_SSA,
Audio_Check_Medusa,
Audio_Check_Spectrum
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -40,7 +40,7 @@ Please visit http://aegisub.net to download latest version
- Added support to save and load keyframe list files. (AMZ)
- Switching to a new line in audio mode now centers the line on the grid. (AMZ)
- Commiting changes in audio to the last line will insert a new line after it. (AMZ)
- Fonts collector can now collect fonts directly to a zip archive. (AMZ)
- Fonts collector can now collect fonts directly to a zipped archive; also, fixed behavior of the Escape key in it. (AMZ)
- Added support for DirectShowSource2 if avss.dll is on Aegisub's folder. (AMZ)
- Added DirectSound audio output, to avoid using PortAudio under Win32. (AMZ)
- Replaced wxTextCtrl with wxScintilla, to solve many issues related to the Rich Text edit control. (AMZ)
@ -56,7 +56,7 @@ Please visit http://aegisub.net to download latest version
- Tweaked the layout of Subtitles Edit area. (AMZ)
- Actor and Effect fields now show a "ghosted" caption saying their name when they are not focused on and blank. (AMZ)
- Aegisub now remembers if it was maximized when it was last quit, and restores its state when opening again. (AMZ)
- A few minor tweaks to the Find dialogue. (AMZ)
- A few minor fixes to the Find dialogue regarding initial focus and the behavior of the Escape key. (AMZ)
- Tweaked the behavior of the margin boxes, now they no longer show padding zeros. (AMZ)
- Minor fix to the calculation of the grid's "Style" column width. (AMZ)
- Added a "Selection Onward" option to the Shift Times dialogue. (AMZ)

View File

@ -52,6 +52,7 @@
#include "options.h"
#include "frame_main.h"
#include "subs_grid.h"
#include "main.h"
///////////////
@ -68,10 +69,13 @@ DialogFontsCollector::DialogFontsCollector(wxWindow *parent)
wxFileName filename(AssFile::top->filename);
dest = filename.GetPath();
}
AttachmentCheck = new wxCheckBox(this,ATTACHMENT_CHECK,_T("As attachments"),wxDefaultPosition);
ArchiveCheck = new wxCheckBox(this,ARCHIVE_CHECK,_T("As a zipped archive"),wxDefaultPosition);
DestBox = new wxTextCtrl(this,-1,dest,wxDefaultPosition,wxSize(250,20),0);
BrowseButton = new wxButton(this,BROWSE_BUTTON,_("&Browse..."));
AttachmentCheck = new wxCheckBox(this,ATTACHMENT_CHECK,_T("As attachments"),wxDefaultPosition);
AttachmentCheck->SetValue(Options.AsBool(_T("Fonts Collector Attachment")));
ArchiveCheck = new wxCheckBox(this,ARCHIVE_CHECK,_T("As a zipped archive"),wxDefaultPosition);
ArchiveCheck->SetValue(Options.AsBool(_T("Fonts Collector Archive")));
if (ArchiveCheck->GetValue()) AttachmentCheck->SetValue(false);
wxSizer *DestBottomSizer = new wxBoxSizer(wxHORIZONTAL);
DestLabel = new wxStaticText(this,-1,_("Choose the folder where the fonts will be collected to.\nIt will be created if it doesn't exist."));
DestBottomSizer->Add(DestBox,1,wxEXPAND | wxRIGHT,5);
@ -90,15 +94,15 @@ DialogFontsCollector::DialogFontsCollector(wxWindow *parent)
// Buttons sizer
StartButton = new wxButton(this,START_BUTTON,_("&Start!"));
StartButton->SetDefault();
CloseButton = new wxButton(this,wxID_CLOSE);
CloseButton = new wxButton(this,wxID_CANCEL,_T("Close"));
wxSizer *ButtonSizer = new wxBoxSizer(wxHORIZONTAL);
ButtonSizer->AddStretchSpacer(1);
#ifndef __WXMAC__
ButtonSizer->Add(StartButton,0,wxRIGHT,5);
ButtonSizer->Add(CloseButton);
#else
#ifdef __WXMAC__
ButtonSizer->Add(CloseButton,0,wxRIGHT,5);
ButtonSizer->Add(StartButton);
#else
ButtonSizer->Add(StartButton,0,wxRIGHT,5);
ButtonSizer->Add(CloseButton);
#endif
// Main sizer
@ -110,6 +114,9 @@ DialogFontsCollector::DialogFontsCollector(wxWindow *parent)
// Set sizer
SetSizer(MainSizer);
MainSizer->SetSizeHints(this);
// Run dummy event to update label
Update();
}
@ -236,19 +243,42 @@ void DialogFontsCollector::OnCheckAttach(wxCommandEvent &event) {
bool check = AttachmentCheck->IsChecked();
BrowseButton->Enable(!check);
DestBox->Enable(!check);
if (check) ArchiveCheck->SetValue(false);
if (check) {
ArchiveCheck->SetValue(false);
Update();
}
}
/////////////////
// Check Archive
void DialogFontsCollector::OnCheckArchive(wxCommandEvent &event) {
bool check = ArchiveCheck->IsChecked();
BrowseButton->Enable(check);
DestBox->Enable(check);
Update();
}
///////////////////
// Update controls
void DialogFontsCollector::Update() {
bool check = ArchiveCheck->IsChecked();
if (check) {
AttachmentCheck->SetValue(false);
DestLabel->SetLabel(_("Enter the name of the destination zip file to collect the fonts to.\nIf a folder is entered, a default name will be used."));
}
else DestLabel->SetLabel(_("Choose the folder where the fonts will be collected to.\nIt will be created if it doesn't exist."));
else {
// Set label
DestLabel->SetLabel(_("Choose the folder where the fonts will be collected to.\nIt will be created if it doesn't exist."));
// Remove filename from browser box
wxFileName fname(DestBox->GetValue());
if (fname.DirExists()) {
DestBox->SetValue(fname.GetPath());
}
else DestBox->SetValue(((AegisubApp*)wxTheApp)->folderName);
}
}

View File

@ -104,6 +104,7 @@ private:
void OnBrowse(wxCommandEvent &event);
void OnCheckAttach(wxCommandEvent &event);
void OnCheckArchive(wxCommandEvent &event);
void Update();
public:
DialogFontsCollector(wxWindow *parent);

View File

@ -118,7 +118,7 @@ DialogSearchReplace::DialogSearchReplace (wxWindow *parent,bool _hasReplace,wxSt
ButtonSizer->Add(new wxButton(this,BUTTON_REPLACE_NEXT,_("Replace next")),0,wxEXPAND | wxBOTTOM,3);
ButtonSizer->Add(new wxButton(this,BUTTON_REPLACE_ALL,_("Replace all")),0,wxEXPAND | wxBOTTOM,3);
}
ButtonSizer->Add(new wxButton(this,wxID_CLOSE),0,wxEXPAND | wxBOTTOM,20);
ButtonSizer->Add(new wxButton(this,wxID_CANCEL),0,wxEXPAND | wxBOTTOM,20);
//ButtonSizer->Add(new wxButton(this,wxID_HELP),0,wxEXPAND | wxBOTTOM,0);
// Main sizer
@ -128,6 +128,8 @@ DialogSearchReplace::DialogSearchReplace (wxWindow *parent,bool _hasReplace,wxSt
MainSizer->SetSizeHints(this);
SetSizer(MainSizer);
CenterOnParent();
// Open
Search.OnDialogOpen();
}
@ -158,7 +160,7 @@ void DialogSearchReplace::UpdateSettings() {
///////////////
// Event table
BEGIN_EVENT_TABLE(DialogSearchReplace,wxDialog)
EVT_BUTTON(wxID_CLOSE,DialogSearchReplace::OnClose)
EVT_BUTTON(wxID_CANCEL,DialogSearchReplace::OnClose)
EVT_BUTTON(BUTTON_FIND_NEXT,DialogSearchReplace::OnFindNext)
EVT_BUTTON(BUTTON_REPLACE_NEXT,DialogSearchReplace::OnReplaceNext)
EVT_BUTTON(BUTTON_REPLACE_ALL,DialogSearchReplace::OnReplaceAll)

View File

@ -186,6 +186,10 @@ void HotkeyType::FillMap() {
keyName[WXK_NUMPAD9] = _T("KP_9");
keyName[WXK_NUMPAD_ADD] = _T("KP_Add");
keyName[WXK_NUMPAD_SUBTRACT] = _T("KP_Subtract");
keyName[WXK_NUMPAD_SUBTRACT] = _T("KP_Subtract");
keyName[WXK_NUMPAD_MULTIPLY] = _T("KP_Multiply");
keyName[WXK_NUMPAD_DIVIDE] = _T("KP_Divide");
keyName[WXK_NUMPAD_DECIMAL] = _T("KP_Decimal");
keyName[WXK_F1] = _T("F1");
keyName[WXK_F2] = _T("F2");
@ -378,6 +382,18 @@ void HotkeyManager::LoadDefaults() {
SetHotkey(_("Audio Add Lead In"),_T("C"));
SetHotkey(_("Audio Add Lead Out"),_T("V"));
SetHotkey(_("Audio Medusa Toggle"),_T("Ctrl-KP_Multiply"));
SetHotkey(_("Audio Medusa Play"),_T("KP_5"));
SetHotkey(_("Audio Medusa Stop"),_T("KP_8"));
SetHotkey(_("Audio Medusa Shift Start Back"),_T("KP_4"));
SetHotkey(_("Audio Medusa Shift Start Forward"),_T("KP_6"));
SetHotkey(_("Audio Medusa Shift End Back"),_T("KP_7"));
SetHotkey(_("Audio Medusa Shift End Forward"),_T("KP_9"));
SetHotkey(_("Audio Medusa Play Before"),_T("KP_1"));
SetHotkey(_("Audio Medusa Play After"),_T("KP_3"));
SetHotkey(_("Audio Medusa Next"),_T("KP_2"));
SetHotkey(_("Audio Medusa Previous"),_T("KP_0"));
SetHotkey(_("Translation Assistant Play"),_T("End"));
SetHotkey(_("Translation Assistant Next"),_T("PgDn"));
SetHotkey(_("Translation Assistant Prev"),_T("PgUp"));

View File

@ -111,6 +111,7 @@ void OptionsManager::LoadDefaults() {
SetBool(_T("Audio Autocommit"),false);
SetBool(_T("Audio Autoscroll"),true);
SetBool(_T("Audio SSA Mode"),false);
SetBool(_T("Audio Medusa Timing Hotkeys"),false);
SetBool(_T("Audio SSA Next Line on Commit"),true);
SetBool(_T("Audio SSA Allow Autocommit"),false);
SetBool(_T("Audio Autofocus"),false);
@ -244,6 +245,8 @@ void OptionsManager::LoadDefaults() {
SetBool(_T("Paste Over #9"),true);
SetText(_T("Fonts Collector Destination"),_T("?script"));
SetBool(_T("Fonts Collector Attachment"),0);
SetBool(_T("Fonts Collector Archive"),1);
SetInt(_T("Audio Display Height"),100);
SetBool(_T("Audio Spectrum"),false);

View File

@ -135,6 +135,7 @@ button_leadout BITMAP "bitmaps/button_leadout.bmp"
toggle_audio_autoscroll BITMAP "bitmaps/toggle_audio_autoscroll.bmp"
toggle_audio_autocommit BITMAP "bitmaps/toggle_audio_autocommit.bmp"
toggle_audio_ssa BITMAP "bitmaps/toggle_audio_ssa.bmp"
toggle_audio_medusa BITMAP "bitmaps/toggle_audio_medusa.bmp"
toggle_audio_spectrum BITMAP "bitmaps/toggle_audio_spectrum.bmp"
toggle_audio_link BITMAP "bitmaps/toggle_audio_link.bmp"
toggle_video_autoscroll BITMAP "bitmaps/toggle_video_autoscroll.bmp"

View File

@ -70,7 +70,10 @@ bool ToggleBitmap::GetValue() {
/////////////
// Set state
void ToggleBitmap::SetValue(bool _state) {
// Set flag
state = _state;
// Refresh
Refresh(false);
}