summaryrefslogtreecommitdiff
path: root/src/signs_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-06-15 15:27:33 +0000
committerfrosch <frosch@openttd.org>2013-06-15 15:27:33 +0000
commitd9e9710cb3c4273d3742d0097dbe0b78511a5511 (patch)
treea107a3a43bbd18fb929a32c3298c75bba31ce7b8 /src/signs_gui.cpp
parentcd0a57fba30a7d365ab84af9846860c64da6b242 (diff)
downloadopenttd-d9e9710cb3c4273d3742d0097dbe0b78511a5511.tar.xz
(svn r25408) -Codechange: Simplify hotkeys by removing unused stuff.
Diffstat (limited to 'src/signs_gui.cpp')
-rw-r--r--src/signs_gui.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp
index 4975bc4aa..433165f3d 100644
--- a/src/signs_gui.cpp
+++ b/src/signs_gui.cpp
@@ -284,7 +284,7 @@ struct SignListWindow : Window, SignList {
virtual EventState OnKeyPress(uint16 key, uint16 keycode)
{
EventState state = ES_NOT_HANDLED;
- if (CheckHotkeyMatch(signlist_hotkeys, keycode, this) == SLHK_FOCUS_FILTER_BOX) {
+ if (CheckHotkeyMatch(signlist_hotkeys, keycode) == SLHK_FOCUS_FILTER_BOX) {
this->SetFocusedWidget(WID_SIL_FILTER_TEXT);
SetFocusedWindow(this); // The user has asked to give focus to the text box, so make sure this window is focused.
state = ES_HANDLED;
@@ -332,14 +332,14 @@ struct SignListWindow : Window, SignList {
}
}
- static Hotkey<SignListWindow> signlist_hotkeys[];
+ static Hotkey signlist_hotkeys[];
};
-Hotkey<SignListWindow> SignListWindow::signlist_hotkeys[] = {
- Hotkey<SignListWindow>('F', "focus_filter_box", SLHK_FOCUS_FILTER_BOX),
- HOTKEY_LIST_END(SignListWindow)
+Hotkey SignListWindow::signlist_hotkeys[] = {
+ Hotkey('F', "focus_filter_box", SLHK_FOCUS_FILTER_BOX),
+ HOTKEY_LIST_END
};
-Hotkey<SignListWindow> *_signlist_hotkeys = SignListWindow::signlist_hotkeys;
+Hotkey *_signlist_hotkeys = SignListWindow::signlist_hotkeys;
static const NWidgetPart _nested_sign_list_widgets[] = {
NWidget(NWID_HORIZONTAL),
@@ -389,7 +389,7 @@ Window *ShowSignList()
EventState SignListGlobalHotkeys(uint16 key, uint16 keycode)
{
- int num = CheckHotkeyMatch<SignListWindow>(_signlist_hotkeys, keycode, NULL, true);
+ int num = CheckHotkeyMatch(_signlist_hotkeys, keycode, true);
if (num == -1) return ES_NOT_HANDLED;
Window *w = ShowSignList();
if (w == NULL) return ES_NOT_HANDLED;