mirror of https://github.com/odrling/Aegisub
Added support for ASSDraw3 (that is, a menu item to launch the program if it's available on the same folder as Aegisub.exe)
Originally committed to SVN as r1790.
This commit is contained in:
parent
8b8a93f560
commit
1d237af42c
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -249,6 +249,10 @@ void FrameMain::InitToolbar () {
|
|||
#endif
|
||||
|
||||
// Tools
|
||||
if (HasASSDraw()) {
|
||||
Toolbar->AddTool(Menu_Tools_ASSDraw,_T("ASSDraw3"),wxBITMAP(assdraw3),_("Launches ai-chan's \"ASSDraw3\" tool for vector drawing."));
|
||||
Toolbar->AddSeparator();
|
||||
}
|
||||
Toolbar->AddTool(Menu_Edit_Shift,_("Shift Times"),wxBITMAP(shift_times_toolbutton),_("Open Shift Times Dialogue"));
|
||||
Toolbar->AddTool(Menu_Tools_Styling,_("Styling Assistant"),wxBITMAP(styling_toolbutton),_("Open Styling Assistant"));
|
||||
Toolbar->AddTool(Menu_Tools_Translation,_("Translation Assistant"),wxBITMAP(translation_toolbutton),_("Open Translation Assistant"));
|
||||
|
@ -350,6 +354,10 @@ void FrameMain::InitMenu() {
|
|||
AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Translation, _("&Translation Assistant..."),_("Open translation assistant"), wxBITMAP(translation_toolbutton));
|
||||
AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_Resample,_("Resample Resolution..."), _("Changes resolution and modifies subtitles to conform to change"), wxBITMAP(resample_toolbutton));
|
||||
AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_SpellCheck, _("Spe&ll Checker..."),_("Open spell checker"), wxBITMAP(spellcheck_toolbutton));
|
||||
if (HasASSDraw()) {
|
||||
subtitlesMenu->AppendSeparator();
|
||||
AppendBitmapMenuItem (subtitlesMenu,Menu_Tools_ASSDraw,_T("ASSDraw3..."),_("Launches ai-chan's \"ASSDraw3\" tool for vector drawing."), wxBITMAP(assdraw3));
|
||||
}
|
||||
subtitlesMenu->AppendSeparator();
|
||||
AppendBitmapMenuItem(InsertMenu,MENU_INSERT_BEFORE,_("&Before Current"),_("Inserts a line before current"),wxBITMAP(blank_button));
|
||||
AppendBitmapMenuItem(InsertMenu,MENU_INSERT_AFTER,_("&After Current"),_("Inserts a line after current"),wxBITMAP(blank_button));
|
||||
|
@ -1361,3 +1369,15 @@ void FrameMain::SetUndoRedoDesc() {
|
|||
editMenu->SetHelpString(0,_T("Undo ")+AssFile::GetUndoDescription());
|
||||
editMenu->SetHelpString(1,_T("Redo ")+AssFile::GetRedoDescription());
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
// Check if ASSDraw is available
|
||||
bool FrameMain::HasASSDraw() {
|
||||
#ifdef __WINDOWS__
|
||||
wxFileName fn(StandardPaths::DecodePath(_T("?data/ASSDraw3.exe")));
|
||||
return fn.FileExists();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -223,6 +223,7 @@ private:
|
|||
void OnOpenTimingProcessor (wxCommandEvent &event);
|
||||
void OnOpenKanjiTimer (wxCommandEvent &event);
|
||||
void OnOpenVideoDetails (wxCommandEvent &event);
|
||||
void OnOpenASSDraw (wxCommandEvent &event);
|
||||
|
||||
void OnOpenOptions (wxCommandEvent &event);
|
||||
void OnOpenLog (wxCommandEvent &event);
|
||||
|
@ -289,6 +290,7 @@ public:
|
|||
void SetDisplayMode(int showVid,int showAudio);
|
||||
|
||||
void SetUndoRedoDesc();
|
||||
bool HasASSDraw();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
@ -393,6 +395,7 @@ enum {
|
|||
Menu_Tools_Kanji_Timer,
|
||||
Menu_Tools_Options,
|
||||
Menu_Tools_Log,
|
||||
Menu_Tools_ASSDraw,
|
||||
|
||||
Menu_Help_Contents,
|
||||
Menu_Help_IRCChannel,
|
||||
|
|
|
@ -178,6 +178,7 @@ BEGIN_EVENT_TABLE(FrameMain, wxFrame)
|
|||
EVT_MENU(Menu_Tools_Kanji_Timer, FrameMain::OnOpenKanjiTimer)
|
||||
EVT_MENU(Menu_Tools_Options, FrameMain::OnOpenOptions)
|
||||
EVT_MENU(Menu_Tools_Log, FrameMain::OnOpenLog)
|
||||
EVT_MENU(Menu_Tools_ASSDraw, FrameMain::OnOpenASSDraw)
|
||||
|
||||
EVT_MENU(Menu_Subs_Snap_Start_To_Video, FrameMain::OnSnapSubsStartToVid)
|
||||
EVT_MENU(Menu_Subs_Snap_End_To_Video, FrameMain::OnSnapSubsEndToVid)
|
||||
|
@ -1033,6 +1034,13 @@ void FrameMain::OnOpenLog (wxCommandEvent &event) {
|
|||
}
|
||||
|
||||
|
||||
//////////////////
|
||||
// Launch ASSDraw
|
||||
void FrameMain::OnOpenASSDraw (wxCommandEvent &event) {
|
||||
wxExecute(StandardPaths::DecodePath(_T("?data/ASSDraw3.exe")));
|
||||
}
|
||||
|
||||
|
||||
///////////////////
|
||||
// Open Automation
|
||||
void FrameMain::OnOpenAutomation (wxCommandEvent &event) {
|
||||
|
|
|
@ -167,6 +167,8 @@ eyedropper_cursor CURSOR "bitmaps/eyedropper.cur"
|
|||
|
||||
splash BITMAP "bitmaps/splash.bmp"
|
||||
|
||||
assdraw3 BITMAP "bitmaps/assdraw3.bmp"
|
||||
|
||||
|
||||
// The following define is necessary for Visual Studio
|
||||
#define wxUSE_NO_MANIFEST 1
|
||||
|
|
Loading…
Reference in New Issue