diff options
author | frosch <frosch@openttd.org> | 2012-11-13 21:46:46 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-11-13 21:46:46 +0000 |
commit | 6d1fe626f5524dc05febe0a715fd9ba80108befd (patch) | |
tree | b85ef2897db71dc2ab9fbce7a5db441dffce755a /src/network | |
parent | 336fcbc50e89b357fa5b9e059961b4a0c00de59e (diff) | |
download | openttd-6d1fe626f5524dc05febe0a715fd9ba80108befd.tar.xz |
(svn r24729) -Codechange: Unify the handling of HEBR_EDITING.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_chat_gui.cpp | 8 | ||||
-rw-r--r-- | src/network/network_content_gui.cpp | 5 | ||||
-rw-r--r-- | src/network/network_gui.cpp | 15 |
3 files changed, 3 insertions, 25 deletions
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index 9e7115d9e..a6a63703d 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -511,17 +511,11 @@ struct NetworkChatWindow : public QueryStringBaseWindow { } else { _chat_tab_completion_active = false; switch (this->HandleEditBoxKey(WID_NC_TEXTBOX, key, keycode, state)) { - default: NOT_REACHED(); - case HEBR_EDITING: { - Window *osk = FindWindowById(WC_OSK, 0); - if (osk != NULL && osk->parent == this) osk->InvalidateData(); - break; - } + default: break; case HEBR_CONFIRM: SendChat(this->text.buf, this->dtype, this->dest); /* FALL THROUGH */ case HEBR_CANCEL: delete this; break; - case HEBR_NOT_FOCUSED: break; } } return state; diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index ed4010d40..995f40ddf 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -766,10 +766,7 @@ public: default: { /* Handle editbox input */ EventState state = ES_NOT_HANDLED; - if (this->HandleEditBoxKey(WID_NCL_FILTER, key, keycode, state) == HEBR_EDITING) { - this->OnOSKInput(WID_NCL_FILTER); - } - + this->HandleEditBoxKey(WID_NCL_FILTER, key, keycode, state); return state; } } diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 99256bda9..0174497bd 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -847,11 +847,7 @@ public: } break; - case HEBR_CONFIRM: - break; - default: - this->OnOSKInput(WID_NG_CLIENT); break; } @@ -1184,16 +1180,7 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow { virtual EventState OnKeyPress(uint16 key, uint16 keycode) { EventState state = ES_NOT_HANDLED; - switch (this->HandleEditBoxKey(WID_NSS_GAMENAME, key, keycode, state)) { - case HEBR_CONFIRM: - case HEBR_NOT_FOCUSED: - break; - - default: - this->OnOSKInput(WID_NSS_GAMENAME); - break; - } - + this->HandleEditBoxKey(WID_NSS_GAMENAME, key, keycode, state); return state; } |