From b3486440f3ffbd1a8dafa167d2bb95f20d43f666 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 9 Oct 2012 09:37:28 -0700 Subject: [PATCH] Show the hotkeys for the edit box buttons in the tooltip --- aegisub/src/subs_edit_box.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aegisub/src/subs_edit_box.cpp b/aegisub/src/subs_edit_box.cpp index 438d7b825..c3ca7a008 100644 --- a/aegisub/src/subs_edit_box.cpp +++ b/aegisub/src/subs_edit_box.cpp @@ -65,6 +65,7 @@ #include "subs_edit_ctrl.h" #include "subs_grid.h" #include "timeedit_ctrl.h" +#include "tooltip_manager.h" #include "utils.h" #include "validators.h" #include "video_context.h" @@ -232,7 +233,7 @@ TimeEdit *SubsEditBox::MakeTimeCtrl(bool end, wxString const& tooltip, void (Sub void SubsEditBox::MakeButton(const char *cmd_name) { cmd::Command *command = cmd::get(cmd_name); wxBitmapButton *btn = new wxBitmapButton(this, -1, command->Icon(16)); - btn->SetToolTip(command->StrHelp()); + ToolTipManager::Bind(btn, command->StrHelp(), "Subtitle Edit Box", cmd_name); MiddleBotSizer->Add(btn, wxSizerFlags().Center().Expand()); btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(cmd::call, cmd_name, c));