forked from mia/Aegisub
Show the hotkeys for the edit box buttons in the tooltip
This commit is contained in:
parent
1b68790c4b
commit
b3486440f3
1 changed files with 2 additions and 1 deletions
|
@ -65,6 +65,7 @@
|
||||||
#include "subs_edit_ctrl.h"
|
#include "subs_edit_ctrl.h"
|
||||||
#include "subs_grid.h"
|
#include "subs_grid.h"
|
||||||
#include "timeedit_ctrl.h"
|
#include "timeedit_ctrl.h"
|
||||||
|
#include "tooltip_manager.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "validators.h"
|
#include "validators.h"
|
||||||
#include "video_context.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) {
|
void SubsEditBox::MakeButton(const char *cmd_name) {
|
||||||
cmd::Command *command = cmd::get(cmd_name);
|
cmd::Command *command = cmd::get(cmd_name);
|
||||||
wxBitmapButton *btn = new wxBitmapButton(this, -1, command->Icon(16));
|
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());
|
MiddleBotSizer->Add(btn, wxSizerFlags().Center().Expand());
|
||||||
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(cmd::call, cmd_name, c));
|
btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::tr1::bind(cmd::call, cmd_name, c));
|
||||||
|
|
Loading…
Reference in a new issue