From 3a1fa9c1fa202b449a8844eba2282f7799908cc8 Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Fri, 8 Oct 2010 19:45:36 +0000 Subject: [PATCH] Remove some unused commented out code. Added in 2007-08-07T17:28:04Z!koraq@xs4all.nl and unused since. nNa discovered the unwanted translatable strings it added, so remove the code to remove the strings. --- src/hotkeys.cpp | 14 -------------- src/hotkeys.hpp | 8 -------- src/menu_events.cpp | 17 ----------------- src/menu_events.hpp | 4 ---- src/play_controller.cpp | 5 ----- src/playsingle_controller.cpp | 11 ----------- src/playsingle_controller.hpp | 4 ---- 7 files changed, 63 deletions(-) diff --git a/src/hotkeys.cpp b/src/hotkeys.cpp index 2b73a8d36e6..00cc8d5eb62 100644 --- a/src/hotkeys.cpp +++ b/src/hotkeys.cpp @@ -200,10 +200,6 @@ const struct { { hotkey::HOTKEY_CUSTOM_CMD, "customcommand", N_("Custom command"), false, hotkey::SCOPE_GAME }, { hotkey::HOTKEY_AI_FORMULA, "aiformula", N_("Run AI formula"), false, hotkey::SCOPE_GAME }, { hotkey::HOTKEY_CLEAR_MSG, "clearmessages", N_("Clear messages"), false, hotkey::SCOPE_GAME }, -#ifdef USRCMD2 - { hotkey::HOTKEY_USER_CMD_2, "usercommand#2", N_("User-Command#2"), false, hotkey::SCOPE_GAME }, - { hotkey::HOTKEY_USER_CMD_3, "usercommand#3", N_("User-Command#3"), false, hotkey::SCOPE_GAME }, -#endif { hotkey::TITLE_SCREEN__RELOAD_WML , "title_screen__reload_wml" @@ -891,16 +887,6 @@ bool command_executor::execute_command(HOTKEY_COMMAND command, int /*index*/) case HOTKEY_CLEAR_MSG: clear_messages(); break; -#ifdef USRCMD2 - case HOTKEY_USER_CMD_2: - //user_command(); - user_command_2(); - break; - case HOTKEY_USER_CMD_3: - user_command_3(); - break; -#endif - case HOTKEY_LANGUAGE: change_language(); break; diff --git a/src/hotkeys.hpp b/src/hotkeys.hpp index f27fa8fcb3c..a5020add762 100644 --- a/src/hotkeys.hpp +++ b/src/hotkeys.hpp @@ -104,10 +104,6 @@ enum HOTKEY_COMMAND { HOTKEY_CUSTOM_CMD, HOTKEY_AI_FORMULA, HOTKEY_CLEAR_MSG, -#ifdef USRCMD2 - HOTKEY_USER_CMD_2, - HOTKEY_USER_CMD_3, -#endif /* Gui2 specific hotkeys. */ TITLE_SCREEN__RELOAD_WML, TITLE_SCREEN__NEXT_TIP, @@ -303,10 +299,6 @@ public: virtual void custom_command() {} virtual void ai_formula() {} virtual void clear_messages() {} -#ifdef USRCMD2 - virtual void user_command_2() {} - virtual void user_command_3() {} -#endif virtual void change_language() {} virtual void play_replay() {} virtual void reset_replay() {} diff --git a/src/menu_events.cpp b/src/menu_events.cpp index c0e5a39b70f..ac2ae4ec8d9 100644 --- a/src/menu_events.cpp +++ b/src/menu_events.cpp @@ -3619,23 +3619,6 @@ void menu_handler::clear_messages() gui_->clear_chat_messages(); // also clear debug-messages and WML-error-messages } -#ifdef USRCMD2 -// not used yet - for future hotkey-commands: -void menu_handler::user_command_2() -{ - gui2::show_transient_message(*gui_.video(), "Test", "User-Command#2"); - //sound::play_bell(game_config::sounds::turn_bell); - sound::play_bell("bell.wav"); -} - -void menu_handler::user_command_3() -{ - gui2::show_transient_message(*gui_.video(), "Info", _("User-Command#3")); - //gui2::show_error_message(disp().video(), "User-Command#3"); - //sound::play_sound("heal.wav"); - sound::play_sound("select.wav"); -} -#endif void menu_handler::change_controller(const std::string& side, const std::string& controller) { config cfg; diff --git a/src/menu_events.hpp b/src/menu_events.hpp index 2aba3cf1cc0..75c77ac97cf 100644 --- a/src/menu_events.hpp +++ b/src/menu_events.hpp @@ -85,10 +85,6 @@ public: void custom_command(); void ai_formula(); void clear_messages(); -#ifdef USRCMD2 - void user_command_2(); - void user_command_3(); -#endif std::vector get_commands_list(); unit_map::iterator current_unit(); diff --git a/src/play_controller.cpp b/src/play_controller.cpp index 7325b210759..1acc993e0c4 100644 --- a/src/play_controller.cpp +++ b/src/play_controller.cpp @@ -774,11 +774,6 @@ bool play_controller::can_execute_command(hotkey::HOTKEY_COMMAND command, int in case hotkey::HOTKEY_CUSTOM_CMD: case hotkey::HOTKEY_AI_FORMULA: case hotkey::HOTKEY_CLEAR_MSG: -#ifdef USRCMD2 -//%% - case hotkey::HOTKEY_USER_CMD_2: - case hotkey::HOTKEY_USER_CMD_3: -#endif return true; // Commands that have some preconditions: diff --git a/src/playsingle_controller.cpp b/src/playsingle_controller.cpp index 5d495cc8856..59e88123c05 100644 --- a/src/playsingle_controller.cpp +++ b/src/playsingle_controller.cpp @@ -239,17 +239,6 @@ void playsingle_controller::whiteboard_bump_down_action() whiteboard_manager_->contextual_bump_down_action(); } - -#ifdef USRCMD2 -void playsingle_controller::user_command_2(){ - menu_handler_.user_command_2(); -} - -void playsingle_controller::user_command_3(){ - menu_handler_.user_command_3(); -} -#endif - void playsingle_controller::report_victory( std::ostringstream &report, int player_gold, int remaining_gold, int finishing_bonus_per_turn, int turns_left, int finishing_bonus) diff --git a/src/playsingle_controller.hpp b/src/playsingle_controller.hpp index b04e63bd45d..fa267f4ef3d 100644 --- a/src/playsingle_controller.hpp +++ b/src/playsingle_controller.hpp @@ -64,10 +64,6 @@ public: virtual void whiteboard_delete_action(); virtual void whiteboard_bump_up_action(); virtual void whiteboard_bump_down_action(); -#ifdef USRCMD2 - virtual void user_command_2(); - virtual void user_command_3(); -#endif void linger(); virtual void force_end_level(LEVEL_RESULT res)