From 7e6a5ad6c80413800643544cd02cc95f67648788 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Fri, 27 Jul 2007 07:30:33 +0000 Subject: [PATCH] Implemented issue #345 - Added a "new window" command to the file menu, to launch a new instance of Aegisub. Originally committed to SVN as r1447. --- aegisub/changelog.txt | 1 + aegisub/frame_main.cpp | 1 + aegisub/frame_main.h | 2 ++ aegisub/frame_main_events.cpp | 10 ++++++++++ 4 files changed, 14 insertions(+) diff --git a/aegisub/changelog.txt b/aegisub/changelog.txt index afffe4781..188997c09 100644 --- a/aegisub/changelog.txt +++ b/aegisub/changelog.txt @@ -157,6 +157,7 @@ Please visit http://aegisub.net to download latest version - Removed FexTracker due to licensing problems; there are plans to implement a new motion tracker in its place (jfs) - Changed translation assistent to use Scintilla text controls to avoid several issues, including Right-To-Left text entry. (AMZ) - Joining of two lines will no longer take the timings of any line that starts and ends at 0 into consideration. (AMZ) +- Added a "new window" command to the file menu, to launch a new instance of Aegisub. (AMZ) = 1.10 beta - 2006.08.07 =========================== diff --git a/aegisub/frame_main.cpp b/aegisub/frame_main.cpp index 638463537..57412c312 100644 --- a/aegisub/frame_main.cpp +++ b/aegisub/frame_main.cpp @@ -285,6 +285,7 @@ void FrameMain::InitMenu() { AppendBitmapMenuItem (fileMenu,Menu_Tools_Properties, _("&Properties..."), _("Open script properties window"),wxBITMAP(properties_toolbutton)); AppendBitmapMenuItem (fileMenu,Menu_Tools_Attachments, _("&Attachments..."), _("Open the attachment list"), wxBITMAP(attach_button)); fileMenu->AppendSeparator(); + AppendBitmapMenuItem(fileMenu,Menu_File_New_Window, _("New Window"), _("Open a new application window"),wxBITMAP(blank_button)); AppendBitmapMenuItem(fileMenu,Menu_File_Exit, MakeHotkeyText(_("E&xit"), _T("Exit")), _("Exit the application"),wxBITMAP(exit_button)); MenuBar->Append(fileMenu, _("&File")); diff --git a/aegisub/frame_main.h b/aegisub/frame_main.h index 16c67eed2..6af70ef6e 100644 --- a/aegisub/frame_main.h +++ b/aegisub/frame_main.h @@ -122,6 +122,7 @@ private: void OnOpenRecentTimecodes (wxCommandEvent &event); void OnOpenRecentKeyframes (wxCommandEvent &event); + void OnNewWindow (wxCommandEvent &event); void OnCloseWindow (wxCloseEvent &event); void OnMenuOpen (wxMenuEvent &event); void OnExit(wxCommandEvent &WXUNUSED(event)); @@ -296,6 +297,7 @@ enum { Menu_File_Export_Subtitles, Menu_File_Open_VFR, Menu_File_Close_VFR, + Menu_File_New_Window, Menu_File_Exit, Menu_File_Recent_Subs_Parent, diff --git a/aegisub/frame_main_events.cpp b/aegisub/frame_main_events.cpp index bacff13b5..8205d62aa 100644 --- a/aegisub/frame_main_events.cpp +++ b/aegisub/frame_main_events.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include "subs_grid.h" #include "frame_main.h" #include "video_display.h" @@ -103,6 +104,7 @@ BEGIN_EVENT_TABLE(FrameMain, wxFrame) EVT_MENU_RANGE(Menu_Automation_Macro,Menu_Automation_Macro+99, FrameMain::OnAutomationMacro) EVT_MENU_RANGE(MENU_GRID_START+1,MENU_GRID_END-1,FrameMain::OnGridEvent) + EVT_MENU(Menu_File_New_Window, FrameMain::OnNewWindow) EVT_MENU(Menu_File_Exit, FrameMain::OnExit) EVT_MENU(Menu_File_Open_Video, FrameMain::OnOpenVideo) EVT_MENU(Menu_File_Close_Video, FrameMain::OnCloseVideo) @@ -506,6 +508,14 @@ void FrameMain::OnOpenRecentAudio(wxCommandEvent &event) { } +/////////////////// +// Open new Window +void FrameMain::OnNewWindow(wxCommandEvent& WXUNUSED(event)) { + wxStandardPaths stand; + wxExecute(stand.GetExecutablePath()); +} + + //////// // Exit void FrameMain::OnExit(wxCommandEvent& WXUNUSED(event)) {