diff --git a/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj b/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj
index 376c31dfa..fc9754759 100644
--- a/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj
+++ b/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj
@@ -1915,10 +1915,6 @@
RelativePath="..\..\src\command\keyframe.cpp"
>
-
-
diff --git a/aegisub/src/command/command.cpp b/aegisub/src/command/command.cpp
index 875d265a5..721fdc457 100644
--- a/aegisub/src/command/command.cpp
+++ b/aegisub/src/command/command.cpp
@@ -19,6 +19,7 @@
/// @ingroup command
#include "command.h"
+
#include "icon.h"
#include
@@ -85,7 +86,6 @@ namespace cmd {
void init_grid();
void init_help();
void init_keyframe();
- void init_menu();
void init_recent();
void init_subtitle();
void init_time();
@@ -102,7 +102,6 @@ namespace cmd {
init_grid();
init_help();
init_keyframe();
- init_menu();
init_recent();
init_subtitle();
init_time();
diff --git a/aegisub/src/command/command.h b/aegisub/src/command/command.h
index 4b3e1b8d3..52eba5a03 100644
--- a/aegisub/src/command/command.h
+++ b/aegisub/src/command/command.h
@@ -37,8 +37,8 @@ DEFINE_SIMPLE_EXCEPTION_NOINNER(CommandIconNone, CommandError, "command/icon")
DEFINE_SIMPLE_EXCEPTION_NOINNER(CommandIconInvalid, CommandError, "command/icon/invalid")
#define CMD_NAME(a) const char* name() { return a; }
-#define STR_MENU(a) wxString StrMenu() const { return a; }
-#define STR_DISP(a) wxString StrDisplay() const { return a; }
+#define STR_MENU(a) wxString StrMenu(const agi::Context *) const { return a; }
+#define STR_DISP(a) wxString StrDisplay(const agi::Context *) const { return a; }
#define STR_HELP(a) wxString StrHelp() const { return a; }
#define CMD_TYPE(a) int Type() const { using namespace cmd; return a; }
@@ -85,10 +85,15 @@ namespace cmd {
/// Holds an individual Command
class Command {
public:
- virtual const char* name()=0; ///< Command name.
- virtual wxString StrMenu() const=0; ///< String for menu purposes including accelerators.
- virtual wxString StrDisplay() const=0; ///< Plain string for display purposes.
- virtual wxString StrHelp() const=0; ///< Short help string descripting the command purpose.
+ /// Command name
+ virtual const char* name()=0;
+ /// String for menu purposes including accelerators, but not hotkeys
+ virtual wxString StrMenu(const agi::Context *) const=0;
+ /// Plain string for display purposes; should normally be the same as StrMenu
+ /// but without accelerators
+ virtual wxString StrDisplay(const agi::Context *) const=0;
+ /// Short help string descripting the command purpose.
+ virtual wxString StrHelp() const=0;
/// Get this command's type flags
/// @return Bitmask of CommandFlags
diff --git a/aegisub/src/command/edit.cpp b/aegisub/src/command/edit.cpp
index 3db1252a9..ad2053211 100644
--- a/aegisub/src/command/edit.cpp
+++ b/aegisub/src/command/edit.cpp
@@ -347,11 +347,16 @@ struct edit_line_swap : public Command {
/// Redoes last action.
struct edit_redo : public Command {
CMD_NAME("edit/redo")
- STR_MENU("&Redo")
- STR_DISP("Redo")
STR_HELP("Redoes last action.")
CMD_TYPE(COMMAND_VALIDATE | COMMAND_DYNAMIC_NAME)
+ wxString StrMenu(const agi::Context *c) const {
+ return wxString::Format(_("&Redo %s"), c->ass->GetRedoDescription());
+ }
+ wxString StrDisplay(const agi::Context *c) const {
+ return wxString::Format(_("Redo %s"), c->ass->GetRedoDescription());
+ }
+
bool Validate(const agi::Context *c) {
return !c->ass->IsRedoStackEmpty();
}
@@ -380,11 +385,16 @@ struct edit_search_replace : public Command {
/// Undoes last action.
struct edit_undo : public Command {
CMD_NAME("edit/undo")
- STR_MENU("&Undo")
- STR_DISP("Undo")
STR_HELP("Undoes last action.")
CMD_TYPE(COMMAND_VALIDATE | COMMAND_DYNAMIC_NAME)
+ wxString StrMenu(const agi::Context *c) const {
+ return wxString::Format(_("&Undo %s"), c->ass->GetUndoDescription());
+ }
+ wxString StrDisplay(const agi::Context *c) const {
+ return wxString::Format(_("Undo %s"), c->ass->GetUndoDescription());
+ }
+
bool Validate(const agi::Context *c) {
return !c->ass->IsUndoStackEmpty();
}
diff --git a/aegisub/src/command/menu_.cpp b/aegisub/src/command/menu_.cpp
deleted file mode 100644
index eb4410b81..000000000
--- a/aegisub/src/command/menu_.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 2010, Amar Takhar
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// * Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following disclaimer in the documentation
-// and/or other materials provided with the distribution.
-// * Neither the name of the Aegisub Group nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Aegisub Project http://www.aegisub.org/
-//
-// $Id$
-
-/// @file menu.cpp
-/// @brief menu/ commands, related to activating/deactivating/populating menu items
-/// @ingroup command
-///
-
-#include "../config.h"
-
-#ifndef AGI_PRE
-#endif
-
-#include "command.h"
-
-#include "../include/aegisub/context.h"
-
-namespace {
- using cmd::Command;
-/// @defgroup cmd-menu Main menu dropdown and submenu related commands.
-/// @{
-
-COMMAND_GROUP(main_audio, "main/audio", "Audio", "Audio", "Audio manipulation.");
-COMMAND_GROUP(main_automation, "main/automation", "Automation", "Automation", "Automation manipulation and scripts.");
-COMMAND_GROUP(main_edit, "main/edit", "&Edit", "Edit", "Editing operations.");
-COMMAND_GROUP(main_edit_sort_lines, "main/edit/sort lines", "Sort lines", "Sort lines", "Sort lines by column.");
-COMMAND_GROUP(main_file, "main/file", "&File", "File", "Operations on subtitles.");
-COMMAND_GROUP(main_help, "main/help", "Help", "Help", "Help options.");
-COMMAND_GROUP(main_subtitle, "main/subtitle", "&Subtitle", "Subtitle", "Subtitle manipulation.");
-COMMAND_GROUP(main_subtitle_insert_lines, "main/subtitle/insert lines", "&Insert Lines", "Insert Lines", "Insert lines into currently active subtitle file.");
-COMMAND_GROUP(main_subtitle_sort_lines, "main/subtitle/sort lines", "Sort Lines", "Sort Lines", "Sort lines by column.");
-COMMAND_GROUP(main_subtitle_join_lines, "main/subtitle/join lines", "Join Lines", "Join Lines", "Merge 2 or more lines together.");
-COMMAND_GROUP(main_timing, "main/timing", "&Timing", "Timing", "Time manipulation.");
-COMMAND_GROUP(main_timing_make_times_continuous, "main/timing/make times continuous", "Make Times Continuous", "Make Times Continuous", "Make time continuous.");
-COMMAND_GROUP(main_video, "main/video", "&Video", "Video", "Video operations.");
-COMMAND_GROUP(main_video_override_ar, "main/video/override ar", "Override AR", "Override AR", "Override Aspect Ratio");
-COMMAND_GROUP(main_video_set_zoom, "main/video/set zoom", "Set Zoom", "Set Zoom", "Set zoom level.");
-COMMAND_GROUP(main_view, "main/view", "View", "View", "View options.");
-}
-
-/// @}
-
-namespace cmd {
- void init_menu() {
- reg(new main_audio);
- reg(new main_automation);
- reg(new main_edit);
- reg(new main_edit_sort_lines);
- reg(new main_file);
- reg(new main_help);
- reg(new main_subtitle);
- reg(new main_subtitle_insert_lines);
- reg(new main_subtitle_join_lines);
- reg(new main_subtitle_sort_lines);
- reg(new main_timing);
- reg(new main_timing_make_times_continuous);
- reg(new main_video);
- reg(new main_video_override_ar);
- reg(new main_video_set_zoom);
- reg(new main_view);
- }
-}
diff --git a/aegisub/src/command/recent.cpp b/aegisub/src/command/recent.cpp
index e0888bc4f..db26d631e 100644
--- a/aegisub/src/command/recent.cpp
+++ b/aegisub/src/command/recent.cpp
@@ -57,9 +57,9 @@ namespace {
/// @{
COMMAND_GROUP(recent_audio, "recent/audio", "Recent", "Recent", "Open recent audio.");
-COMMAND_GROUP(recent_keyframe, "recent/keyframe", "Recent", "Recent", "Open recent keyframes.");
+COMMAND_GROUP(recent_keyframes, "recent/keyframe", "Recent", "Recent", "Open recent keyframes.");
COMMAND_GROUP(recent_subtitle, "recent/subtitle", "Recent", "Recent", "Open recent subtitles.");
-COMMAND_GROUP(recent_timecode, "recent/timecode", "Recent", "Recent", "Open recent timecodes.");
+COMMAND_GROUP(recent_timecodes, "recent/timecodes", "Recent", "Recent", "Open recent timecodes.");
COMMAND_GROUP(recent_video, "recent/video", "Recent", "Recent", "Open recent video.");
struct recent_audio_entry : public Command {
@@ -73,8 +73,8 @@ struct recent_audio_entry : public Command {
}
};
-struct recent_keyframe_entry : public Command {
- CMD_NAME("recent/keyframe/")
+struct recent_keyframes_entry : public Command {
+ CMD_NAME("recent/keyframes/")
STR_MENU("Recent")
STR_DISP("Recent")
STR_HELP("Open recent keyframes.")
@@ -95,8 +95,8 @@ struct recent_subtitle_entry : public Command {
}
};
-struct recent_timecode_entry : public Command {
- CMD_NAME("recent/timecode/")
+struct recent_timecodes_entry : public Command {
+ CMD_NAME("recent/timecodes/")
STR_MENU("Recent")
STR_DISP("Recent")
STR_HELP("Open recent timecodes.")
@@ -141,17 +141,17 @@ public:
namespace cmd {
void init_recent() {
reg(new recent_audio);
- reg(new recent_keyframe);
+ reg(new recent_keyframes);
reg(new recent_subtitle);
- reg(new recent_timecode);
+ reg(new recent_timecodes);
reg(new recent_video);
/// @todo 16 is an implementation detail that maybe needs to be exposed
for (int i = 0; i < 16; ++i) {
reg(new mru_wrapper(i));
- reg(new mru_wrapper(i));
+ reg(new mru_wrapper(i));
reg(new mru_wrapper(i));
- reg(new mru_wrapper(i));
+ reg(new mru_wrapper(i));
reg(new mru_wrapper(i));
}
}
diff --git a/aegisub/src/frame_main.cpp b/aegisub/src/frame_main.cpp
index 5b04d66de..388329918 100644
--- a/aegisub/src/frame_main.cpp
+++ b/aegisub/src/frame_main.cpp
@@ -144,10 +144,6 @@ FrameMain::FrameMain (wxArrayString args)
context->previousFocus = 0;
AegisubApp::Get()->frame = this;
- StartupLog("Binding commands");
- // XXX: This is a hack for now, it will need to be dealt with when other frames are involved.
- Bind(wxEVT_COMMAND_MENU_SELECTED, &FrameMain::cmd_call, this);
-
#ifdef __WXMAC__
// Bind(FrameMain::OnAbout, &FrameMain::cmd_call, this, cmd::id("app/about"));
#endif
@@ -163,7 +159,7 @@ FrameMain::FrameMain (wxArrayString args)
InitToolbar();
StartupLog("Initialize menu bar");
- InitMenu();
+ menu::GetMenuBar("main", this, context.get());
StartupLog("Create status bar");
CreateStatusBar(2);
@@ -248,29 +244,26 @@ void FrameMain::cmd_call(wxCommandEvent& event) {
LOG_D("event/select") << "Id: " << id;
if (id < cmd::count())
cmd::call(context.get(), id);
- else if (id >= ID_MENU_AUTOMATION_MACRO)
- OnAutomationMacro(event);
}
+void FrameMain::OnMenuOpen(wxMenuEvent &event) {
+ if (wxMenu *menu = event.GetMenu()) {
+ wxMenuItemList& items = menu->GetMenuItems();
+ for (wxMenuItemList::iterator it = items.begin(); it != items.end(); ++it) {
+ if (wxMenu *submenu = (*it)->GetSubMenu()) {
+ submenu->GetEventHandler()->QueueEvent(event.Clone());
+ }
+ }
+ }
+}
+
+/// @brief Initialize toolbar
void FrameMain::InitToolbar () {
wxSystemOptions::SetOption("msw.remap", 0);
toolbar::AttachToolbar(this, "main", context.get(), "Default");
GetToolBar()->Realize();
}
-void FrameMain::InitMenu() {
-
-#ifdef __WXMAC__
- // Make sure special menu items are placed correctly on Mac
-// wxApp::s_macAboutMenuItemId = Menu_Help_About;
-// wxApp::s_macExitMenuItemId = Menu_File_Exit;
-// wxApp::s_macPreferencesMenuItemId = Menu_Tools_Options;
-// wxApp::s_macHelpMenuTitleName = _("&Help");
-#endif
-
- SetMenuBar(menu::menu->GetMainMenu());
-}
-
void FrameMain::InitContents() {
StartupLog("Create background panel");
Panel = new wxPanel(this,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL | wxCLIP_CHILDREN);
@@ -607,7 +600,6 @@ BEGIN_EVENT_TABLE(FrameMain, wxFrame)
EVT_SASH_DRAGGED(ID_SASH_MAIN_AUDIO, FrameMain::OnAudioBoxResize)
- EVT_MENU_OPEN(FrameMain::OnMenuOpen)
EVT_KEY_DOWN(FrameMain::OnKeyDown)
#ifdef __WXMAC__
@@ -616,208 +608,6 @@ BEGIN_EVENT_TABLE(FrameMain, wxFrame)
#endif
END_EVENT_TABLE()
-void FrameMain::RebuildRecentList(const char *root_command, const char *mru_name) {
- wxMenu *menu = menu::menu->GetMenu(root_command);
-
- int count = (int)menu->GetMenuItemCount();
- for (int i=count;--i>=0;) {
- menu->Destroy(menu->FindItemByPosition(i));
- }
-
- const agi::MRUManager::MRUListMap *map_list = config::mru->Get(mru_name);
- if (map_list->empty()) {
- menu->Append(-1, _("Empty"))->Enable(false);
- return;
- }
-
- int i = 0;
- for (agi::MRUManager::MRUListMap::const_iterator it = map_list->begin(); it != map_list->end(); ++it) {
- std::stringstream ss;
- ss << root_command;
- ss << "/";
- ss << i;
-
- wxFileName shortname(lagi_wxString(*it));
-
- menu->Append(cmd::id(ss.str()),
- wxString::Format("%s%d %s", i <= 9 ? "&" : "", i + 1, shortname.GetFullName()));
- ++i;
- }
-}
-
-static void validate(wxMenuBar *menu, const agi::Context *c, const char *command) {
- menu->Enable(cmd::id(command), cmd::get(command)->Validate(c));
-}
-
-static void check(wxMenuBar *menu, const agi::Context *c, const char *command) {
- menu->Check(cmd::id(command), cmd::get(command)->IsActive(c));
-}
-
-void FrameMain::OnMenuOpen (wxMenuEvent &event) {
- wxMenuBar *MenuBar = menu::menu->GetMainMenu();
-
- MenuBar->Freeze();
- wxMenu *curMenu = event.GetMenu();
-
- // File menu
- if (curMenu == menu::menu->GetMenu("main/file")) {
- RebuildRecentList("recent/subtitle", "Subtitle");
- validate(MenuBar, context.get(), "subtitle/open/video");
- }
-
- // View menu
- else if (curMenu == menu::menu->GetMenu("main/view")) {
- if (!showVideo && !showAudio) MenuBar->Check(cmd::id("app/display/subs"),true);
- else if (showVideo && !showAudio) MenuBar->Check(cmd::id("app/display/video_subs"),true);
- else if (showAudio && showVideo) MenuBar->Check(cmd::id("app/display/full"),true);
- else MenuBar->Check(cmd::id("app/display/audio_subs"),true);
-
- check(MenuBar, context.get(), "grid/tags/show");
- check(MenuBar, context.get(), "grid/tags/simplify");
- check(MenuBar, context.get(), "grid/tags/hide");
- }
- // Video menu
- else if (curMenu == menu::menu->GetMenu("main/video")) {
- validate(MenuBar, context.get(), "timecode/save");
- validate(MenuBar, context.get(), "timecode/close");
- validate(MenuBar, context.get(), "keyframe/close");
- validate(MenuBar, context.get(), "keyframe/save");
-
- check(MenuBar, context.get(), "video/aspect/default");
- check(MenuBar, context.get(), "video/aspect/full");
- check(MenuBar, context.get(), "video/aspect/wide");
- check(MenuBar, context.get(), "video/aspect/cinematic");
- check(MenuBar, context.get(), "video/aspect/custom");
-
- check(MenuBar, context.get(), "video/show_overscan");
-
- RebuildRecentList("recent/video", "Video");
- RebuildRecentList("recent/timecode", "Timecodes");
- RebuildRecentList("recent/keyframe", "Keyframes");
- }
-
- // Audio menu
- else if (curMenu == menu::menu->GetMenu("main/audio")) {
- validate(MenuBar, context.get(), "audio/open/video");
- validate(MenuBar, context.get(), "audio/close");
- RebuildRecentList("recent/audio", "Audio");
- }
-
- // Subtitles menu
- else if (curMenu == menu::menu->GetMenu("main/subtitle")) {
- validate(MenuBar, context.get(), "main/subtitle/insert lines");
- validate(MenuBar, context.get(), "edit/line/duplicate");
- validate(MenuBar, context.get(), "edit/line/duplicate/shift");
- validate(MenuBar, context.get(), "edit/line/swap");
- validate(MenuBar, context.get(), "edit/line/join/concatenate");
- validate(MenuBar, context.get(), "edit/line/join/keep_first");
- validate(MenuBar, context.get(), "edit/line/join/as_karaoke");
- validate(MenuBar, context.get(), "main/subtitle/join lines");
- validate(MenuBar, context.get(), "edit/line/recombine");
- }
-
- // Timing menu
- else if (curMenu == menu::menu->GetMenu("main/timing")) {
- validate(MenuBar, context.get(), "time/snap/start_video");
- validate(MenuBar, context.get(), "time/snap/end_video");
- validate(MenuBar, context.get(), "time/snap/scene");
- validate(MenuBar, context.get(), "time/frame/current");
-
- validate(MenuBar, context.get(), "time/continuous/start");
- validate(MenuBar, context.get(), "time/continuous/end");
- }
-
- // Edit menu
- else if (curMenu == menu::menu->GetMenu("main/edit")) {
- wxMenu *editMenu = menu::menu->GetMenu("main/edit");
-
- // Undo state
- wxString undo_text = wxString::Format("%s %s\t%s",
- cmd::get("edit/undo")->StrMenu(),
- context->ass->GetUndoDescription(),
- hotkey::get_hotkey_str_first("Default", "edit/undo"));
- wxMenuItem *item = editMenu->FindItem(cmd::id("edit/undo"));
- item->SetItemLabel(undo_text);
- item->Enable(!context->ass->IsUndoStackEmpty());
-
- // Redo state
- wxString redo_text = wxString::Format("%s %s\t%s",
- cmd::get("edit/redo")->StrMenu(),
- context->ass->GetRedoDescription(),
- hotkey::get_hotkey_str_first("Default", "edit/redo"));
- item = editMenu->FindItem(cmd::id("edit/redo"));
- item->SetItemLabel(redo_text);
- item->Enable(!context->ass->IsRedoStackEmpty());
-
- validate(MenuBar, context.get(), "edit/line/cut");
- validate(MenuBar, context.get(), "edit/line/copy");
- validate(MenuBar, context.get(), "edit/line/paste");
- validate(MenuBar, context.get(), "edit/line/paste/over");
- }
-
- // Automation menu
-#ifdef WITH_AUTOMATION
- else if (curMenu == menu::menu->GetMenu("main/automation")) {
- wxMenu *automationMenu = menu::menu->GetMenu("main/automation");
-
- // Remove old macro items
- for (unsigned int i = 0; i < activeMacroItems.size(); i++) {
- wxMenu *p = 0;
- wxMenuItem *it = MenuBar->FindItem(ID_MENU_AUTOMATION_MACRO + i, &p);
- if (it)
- p->Delete(it);
- }
- activeMacroItems.clear();
-
- // Add new ones
- int added = 0;
- added += AddMacroMenuItems(automationMenu, wxGetApp().global_scripts->GetMacros());
- added += AddMacroMenuItems(automationMenu, context->local_scripts->GetMacros());
-
- // If none were added, show a ghosted notice
- if (added == 0) {
- automationMenu->Append(ID_MENU_AUTOMATION_MACRO, _("No Automation macros loaded"))->Enable(false);
- activeMacroItems.push_back(0);
- }
- }
-#endif
-
- MenuBar->Thaw();
-}
-
-int FrameMain::AddMacroMenuItems(wxMenu *menu, const std::vector ¯os) {
-#ifdef WITH_AUTOMATION
- if (macros.empty()) {
- return 0;
- }
-
- int id = activeMacroItems.size();;
- for (std::vector::const_iterator i = macros.begin(); i != macros.end(); ++i) {
- wxMenuItem * m = menu->Append(ID_MENU_AUTOMATION_MACRO + id, (*i)->GetName(), (*i)->GetDescription());
- m->Enable((*i)->Validate(context->ass, SubsGrid->GetAbsoluteSelection(), SubsGrid->GetFirstSelRow()));
- activeMacroItems.push_back(*i);
- id++;
- }
-
- return macros.size();
-#else
- return 0;
-#endif
-}
-
-void FrameMain::OnAutomationMacro (wxCommandEvent &event) {
-#ifdef WITH_AUTOMATION
- SubsGrid->BeginBatch();
- // First get selection data
- std::vector selected_lines = SubsGrid->GetAbsoluteSelection();
- int first_sel = SubsGrid->GetFirstSelRow();
- // Run the macro...
- activeMacroItems[event.GetId()-ID_MENU_AUTOMATION_MACRO]->Process(context->ass, selected_lines, first_sel, this);
- SubsGrid->SetSelectionFromAbsolute(selected_lines);
- SubsGrid->EndBatch();
-#endif
-}
-
void FrameMain::OnCloseWindow (wxCloseEvent &event) {
// Stop audio and video
context->videoController->Stop();
diff --git a/aegisub/src/frame_main.h b/aegisub/src/frame_main.h
index 4b82e194f..133099f49 100644
--- a/aegisub/src/frame_main.h
+++ b/aegisub/src/frame_main.h
@@ -99,7 +99,6 @@ class FrameMain: public wxFrame {
void InitToolbar();
void InitContents();
- void InitMenu();
bool LoadList(wxArrayString list);
void UpdateTitle();
@@ -112,15 +111,11 @@ class FrameMain: public wxFrame {
void OnAutoSave(wxTimerEvent &event);
void OnStatusClear(wxTimerEvent &event);
void OnCloseWindow (wxCloseEvent &event);
- /// @brief General handler for all Automation-generated menu items
- void OnAutomationMacro(wxCommandEvent &event);
/// Close the currently open subs, asking the user if they want to save if there are unsaved changes
/// @param enableCancel Should the user be able to cancel the close?
int TryToCloseSubs(bool enableCancel=true);
- void RebuildRecentList(const char *root_command, const char *mru_name);
-
// AudioControllerAudioEventListener implementation
void OnAudioOpen(AudioProvider *provider);
void OnAudioClose();
diff --git a/aegisub/src/include/aegisub/menu.h b/aegisub/src/include/aegisub/menu.h
index d60b77ba3..4cb362b9b 100644
--- a/aegisub/src/include/aegisub/menu.h
+++ b/aegisub/src/include/aegisub/menu.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010, Amar Takhar
+// Copyright (c) 2011, Thomas Goyne
//
// Permission to use, copy, modify, and distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -19,51 +19,44 @@
/// @ingroup menu toolbar
#ifndef AGI_PRE
-#include