From 6d1fe626f5524dc05febe0a715fd9ba80108befd Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 13 Nov 2012 21:46:46 +0000 Subject: (svn r24729) -Codechange: Unify the handling of HEBR_EDITING. --- src/network/network_chat_gui.cpp | 8 +------- src/network/network_content_gui.cpp | 5 +---- src/network/network_gui.cpp | 15 +-------------- 3 files changed, 3 insertions(+), 25 deletions(-) (limited to 'src/network') 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; } -- cgit v1.2.3-70-g09d2