From 689a69b4332ff5d253395dc2046819ed471ba851 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 8 Jul 2007 02:33:43 +0000 Subject: [PATCH] Kill off the option to suppress lobby minimaps. It doesn't save any network bandwidth and the amount of vertical space it saves in the lobby display is insignificant. All it was doing was cluttering up the prefs display and creating a code adhesion we can do without. --- src/game_preferences.cpp | 13 ------------- src/game_preferences.hpp | 3 --- src/multiplayer_lobby.cpp | 8 +------- src/preferences_display.cpp | 16 +++------------- 4 files changed, 4 insertions(+), 36 deletions(-) diff --git a/src/game_preferences.cpp b/src/game_preferences.cpp index 07c30e30a42..dd041b0932d 100644 --- a/src/game_preferences.cpp +++ b/src/game_preferences.cpp @@ -43,8 +43,6 @@ bool haloes = true; bool unit_genders = true; -bool lobby_minimaps = true; - std::set encountered_units_set; std::set encountered_terrains_set; @@ -89,17 +87,6 @@ manager::~manager() encountered_terrains_set.clear(); } -bool show_lobby_minimaps() -{ - return lobby_minimaps; -} - -void save_show_lobby_minimaps(bool show) -{ - preferences::set("lobby_minimaps", (show ? "yes" : "no")); - lobby_minimaps = show; -} - bool adjust_gamma() { return preferences::get("adjust_gamma") == "yes"; diff --git a/src/game_preferences.hpp b/src/game_preferences.hpp index 99ba6d2fd1a..84312b5a762 100644 --- a/src/game_preferences.hpp +++ b/src/game_preferences.hpp @@ -36,9 +36,6 @@ namespace preferences { base_manager base; }; - bool show_lobby_minimaps(); - void save_show_lobby_minimaps(const bool show); - bool adjust_gamma(); void _set_adjust_gamma(bool val); diff --git a/src/multiplayer_lobby.cpp b/src/multiplayer_lobby.cpp index 6956078635c..3d890b10103 100644 --- a/src/multiplayer_lobby.cpp +++ b/src/multiplayer_lobby.cpp @@ -310,13 +310,7 @@ void gamebrowser::set_game_items(const config& cfg, const config& game_config) { const bool scrolled_to_max = (has_scrollbar() && get_position() == get_max_position()); - //if you change lobby_minimaps setting, content will be update on lobby update - minimaps_ = preferences::show_lobby_minimaps(); - if (minimaps_) { - item_height_ = 100; - } else { - item_height_ = 75; - } + item_height_ = 100; // don't throw the rendered minimaps away std::vector minimap_cache; diff --git a/src/preferences_display.cpp b/src/preferences_display.cpp index d1ba35cc23b..857b8927950 100644 --- a/src/preferences_display.cpp +++ b/src/preferences_display.cpp @@ -55,7 +55,6 @@ display_manager::display_manager(display* d) set_fullscreen(fullscreen()); set_gamma(gamma()); set_colour_cursors(preferences::get("colour_cursors") == "yes"); - save_show_lobby_minimaps(preferences::get("lobby_minimaps") != "no"); } display_manager::~display_manager() @@ -229,8 +228,9 @@ private: gui::list_slider turbo_slider_; gui::button fullscreen_button_, turbo_button_, show_ai_moves_button_, show_grid_button_, save_replays_button_, delete_autosaves_button_, - lobby_minimaps_button_, show_lobby_joins_button1_, - show_lobby_joins_button2_, show_lobby_joins_button3_, + show_lobby_joins_button1_, + show_lobby_joins_button2_, + show_lobby_joins_button3_, sort_list_by_group_button_, iconize_list_button_, friends_list_button_, friends_back_button_, friends_add_friend_button_, friends_add_ignore_button_, @@ -277,7 +277,6 @@ preferences_dialog::preferences_dialog(display& disp, const config& game_cfg) show_grid_button_(disp.video(), _("Show Grid"), gui::button::TYPE_CHECK), save_replays_button_(disp.video(), _("Save Replays"), gui::button::TYPE_CHECK), delete_autosaves_button_(disp.video(), _("Delete Autosaves"), gui::button::TYPE_CHECK), - lobby_minimaps_button_(disp.video(), _("Show Lobby Minimaps"), gui::button::TYPE_CHECK), show_lobby_joins_button1_(disp.video(), _("Do Not Show Lobby Joins"), gui::button::TYPE_CHECK), show_lobby_joins_button2_(disp.video(), _("Show Lobby Joins Of Friends Only"), gui::button::TYPE_CHECK), show_lobby_joins_button3_(disp.video(), _("Show All Lobby Joins"), gui::button::TYPE_CHECK), @@ -444,9 +443,6 @@ preferences_dialog::preferences_dialog(display& disp, const config& game_cfg) show_grid_button_.set_check(grid()); show_grid_button_.set_help_string(_("Overlay a grid onto the map")); - lobby_minimaps_button_.set_check(show_lobby_minimaps()); - lobby_minimaps_button_.set_help_string(_("Show minimaps in the multiplayer lobby")); - sort_list_by_group_button_.set_check(sort_list()); sort_list_by_group_button_.set_help_string(_("Sort the player list in the lobby by player groups")); @@ -517,7 +513,6 @@ handler_vector preferences_dialog::handler_members() h.push_back(&save_replays_button_); h.push_back(&delete_autosaves_button_); h.push_back(&show_grid_button_); - h.push_back(&lobby_minimaps_button_); h.push_back(&sort_list_by_group_button_); h.push_back(&iconize_list_button_); h.push_back(&show_lobby_joins_button1_); @@ -696,7 +691,6 @@ void preferences_dialog::update_location(SDL_Rect const &rect) rect.w - horizontal_padding - right_border, 0 }; chat_lines_slider_.set_location(chat_lines_rect); ypos += item_interline; chat_timestamp_button_.set_location(rect.x, ypos); - ypos += item_interline; lobby_minimaps_button_.set_location(rect.x, ypos); ypos += item_interline; sort_list_by_group_button_.set_location(rect.x, ypos); ypos += item_interline; iconize_list_button_.set_location(rect.x, ypos); @@ -896,9 +890,6 @@ void preferences_dialog::process_event() } if (tab_ == MULTIPLAYER_TAB) { - if (lobby_minimaps_button_.pressed()) - save_show_lobby_minimaps(lobby_minimaps_button_.checked()); - if (show_lobby_joins_button1_.pressed()) { set_lobby_joins(SHOW_NON); show_lobby_joins_button1_.set_check(true); @@ -1143,7 +1134,6 @@ void preferences_dialog::set_selection(int index) chat_lines_label_.hide(hide_multiplayer); chat_lines_slider_.hide(hide_multiplayer); chat_timestamp_button_.hide(hide_multiplayer); - lobby_minimaps_button_.hide(hide_multiplayer); sort_list_by_group_button_.hide(hide_multiplayer); iconize_list_button_.hide(hide_multiplayer); show_lobby_joins_button1_.hide(hide_multiplayer);