GUI2: drop t prefix from hotkey function typedef

This commit is contained in:
Charles Dang 2017-05-04 18:45:09 +11:00
parent 787a46820e
commit 8eec51ca69
2 changed files with 5 additions and 5 deletions

View file

@ -177,14 +177,14 @@ bool dispatcher::fire(const ui_event event, widget& target, message& msg)
return fire_event<signal_message_function>(event, this, &target, msg);
}
void dispatcher::register_hotkey(const hotkey::HOTKEY_COMMAND id, const thotkey_function& function)
void dispatcher::register_hotkey(const hotkey::HOTKEY_COMMAND id, const hotkey_function& function)
{
hotkeys_[id] = function;
}
bool dispatcher::execute_hotkey(const hotkey::HOTKEY_COMMAND id)
{
std::map<hotkey::HOTKEY_COMMAND, thotkey_function>::iterator itor = hotkeys_.find(id);
std::map<hotkey::HOTKEY_COMMAND, hotkey_function>::iterator itor = hotkeys_.find(id);
if(itor == hotkeys_.end()) {
return false;

View file

@ -128,7 +128,7 @@ typedef std::function<void(dispatcher& dispatcher,
/** Hotkey function handler signature. */
typedef std::function<bool(dispatcher& dispatcher,
hotkey::HOTKEY_COMMAND id)> thotkey_function;
hotkey::HOTKEY_COMMAND id)> hotkey_function;
/**
* Base class for event handling.
@ -727,7 +727,7 @@ public:
* @param function The callback function to call.
*/
void register_hotkey(const hotkey::HOTKEY_COMMAND id,
const thotkey_function& function);
const hotkey_function& function);
/**
* Executes a hotkey.
@ -780,7 +780,7 @@ private:
bool connected_;
/** The registered hotkeys for this dispatcher. */
std::map<hotkey::HOTKEY_COMMAND, thotkey_function> hotkeys_;
std::map<hotkey::HOTKEY_COMMAND, hotkey_function> hotkeys_;
};
/***** ***** ***** ***** ***** Common helpers ***** ***** ***** ***** *****/