From 2804e0cb529b67486097b2747e7cb5905a342dfe Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Wed, 5 Jan 2011 14:07:23 +0000 Subject: [PATCH] Actually trigger a hotkey if it exists. Originally committed to SVN as r5128. --- aegisub/src/frame_main.h | 4 ++-- aegisub/src/hotkey.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/aegisub/src/frame_main.h b/aegisub/src/frame_main.h index 42ff4f3cc..aa6e115ac 100644 --- a/aegisub/src/frame_main.h +++ b/aegisub/src/frame_main.h @@ -94,10 +94,10 @@ public: void DetachVideo(bool detach=true); void LoadVFR(wxString filename); -private: - agi::Context temp_context; +private: + void cmd_call(wxCommandEvent& event); AssFile *ass; diff --git a/aegisub/src/hotkey.cpp b/aegisub/src/hotkey.cpp index 7b4fc52ea..f5e354a9f 100644 --- a/aegisub/src/hotkey.cpp +++ b/aegisub/src/hotkey.cpp @@ -36,7 +36,8 @@ #include "aegisub/toolbar.h" #include "libresrc/libresrc.h" #include "command/command.h" - +#include "frame_main.h" +#include "main.h" namespace hotkey { @@ -68,6 +69,7 @@ void check(std::string context, int key_code, wchar_t key_char, int modifier) { std::string command; if (agi::hotkey::hotkey->Scan(context, combo, command) == 0) { + (*cmd::get(command))(&wxGetApp().frame->temp_context); } }