GUI2/Dialogs: made use of nested namespace specifiers where possible

This commit is contained in:
Charles Dang 2021-02-20 21:41:13 +11:00
parent 34cb0c8ea9
commit 8118cc5f1b
131 changed files with 200 additions and 593 deletions

View file

@ -25,9 +25,7 @@
#include <functional>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(addon_connect)
@ -66,4 +64,3 @@ void addon_connect::post_show(window& window)
}
} // namespace dialogs
} // namespace gui2

View file

@ -16,16 +16,14 @@
#include "gui/dialogs/modal_dialog.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* This shows the dialog for managing addons and connecting to the addon server.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|----------|---------|-----------
* hostname | text_box |yes |This text contains the name of the server to connect to.
* show_help | @ref gui::button |yes |Thus button shows the in-game help about add-ons management when triggered.
@ -64,4 +62,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -24,9 +24,7 @@
#include "gui/widgets/window.hpp"
#include "tstring.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(install_dependencies)
@ -44,4 +42,3 @@ void install_dependencies::pre_show(window& window)
}
}
}

View file

@ -18,9 +18,7 @@
#include "gui/dialogs/modal_dialog.hpp"
#include <string>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
class install_dependencies : public modal_dialog
@ -43,4 +41,3 @@ private:
};
}
}

View file

@ -58,9 +58,7 @@
#include <sstream>
#include <stdexcept>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
namespace {
@ -973,4 +971,3 @@ bool addon_manager::exit_hook(window& window)
}
} // namespace dialogs
} // namespace gui2

View file

@ -23,9 +23,7 @@
#include <algorithm>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(addon_uninstall_list)
@ -91,4 +89,3 @@ std::vector<std::string> addon_uninstall_list::selected_addons() const
}
} // namespace dialogs
} // namespace gui2

View file

@ -18,16 +18,14 @@
#include <map>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* Dialog with a checkbox list for choosing installed add-ons to remove.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* addons_list | @ref listbox |yes |A listbox containing add-on selection entries.
* checkbox | toggle_button |yes |A toggle button allowing the user to mark/unmark the add-on.
@ -67,4 +65,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -37,9 +37,7 @@
#include <iomanip>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(attack_predictions)
@ -400,4 +398,3 @@ hp_probability_vector attack_predictions::get_hitpoint_probabilities(const std::
}
} // namespace dialogs
} // namespace gui2

View file

@ -30,9 +30,7 @@
static lg::log_domain log_wml("wml");
#define WRN_WML LOG_STREAM(warn, log_wml)
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(campaign_difficulty)
@ -114,4 +112,3 @@ void campaign_difficulty::post_show(window& window)
}
}
} // namespace dialogs
} // namespace gui2

View file

@ -19,9 +19,7 @@
#include <vector>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
@ -32,9 +30,9 @@ config generate_difficulty_config(const config& source);
/**
* @ingroup GUIWindowDefinitionWML
*
*
* The campaign mode difficulty menu.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* title | @ref label |yes |Dialog title label.
* message | scroll_label |no |Text label displaying a description or instructions.
@ -75,4 +73,3 @@ private:
virtual void post_show(window& window) override;
};
} // namespace dialogs
} // namespace gui2

View file

@ -38,9 +38,7 @@
#include <functional>
#include "utils/irdya_datetime.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(campaign_selection)
@ -465,4 +463,3 @@ void campaign_selection::mod_toggled()
}
} // namespace dialogs
} // namespace gui2

View file

@ -21,16 +21,14 @@
#include <boost/dynamic_bitset.hpp>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* This shows the dialog which allows the user to choose which campaign to play.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|-----------------|---------|-----------
* campaign_list | @ref listbox |yes |A listbox that contains all available campaigns.
* icon | @ref image |no |The icon for the campaign.
@ -138,4 +136,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -44,9 +44,7 @@ static lg::log_domain log_chat_log("chat_log");
#define WRN_CHAT_LOG LOG_STREAM(warn, log_chat_log)
#define ERR_CHAT_LOG LOG_STREAM(err, log_chat_log)
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(chat_log)
@ -437,4 +435,3 @@ void chat_log::pre_show(window& window)
}
} // namespace dialogs
} // namespace gui2

View file

@ -19,9 +19,7 @@
class replay;
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
class chat_log : public modal_dialog
@ -46,4 +44,3 @@ private:
std::shared_ptr<view> view_;
};
} // namespace dialogs
} // namespace gui2

View file

@ -26,9 +26,7 @@
#include <functional>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(core_selection)
@ -95,4 +93,3 @@ void core_selection::post_show(window& window)
}
} // namespace dialogs
} // namespace gui2

View file

@ -18,16 +18,14 @@
class config;
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* This shows the dialog which allows the user to choose which core to play.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* core_list | @ref listbox |yes |A listbox that contains all available cores.
* icon | @ref image |no |The icon for the core.
@ -72,4 +70,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -28,9 +28,7 @@
#include <ctime>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(debug_clock)
@ -171,4 +169,3 @@ bool debug_clock::time::step(const unsigned milliseconds)
}
} // namespace dialogs
} // namespace gui2

View file

@ -21,9 +21,7 @@
#include "formula/string_utils.hpp"
#include "gettext.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(depcheck_confirm_change)
@ -54,4 +52,3 @@ depcheck_confirm_change::depcheck_confirm_change(
register_label("itemlist", false, list);
}
} // namespace dialogs
} // namespace gui2

View file

@ -18,16 +18,14 @@
#include <vector>
#include <string>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* Asks the user to confirm a change required to proceed. Currently used for enabling/disabling modifications.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* message | @ref label |yes |displays the details of the required changes
* itemlist | scroll_label |yes |displays the list of affected items
@ -58,4 +56,3 @@ protected:
};
} // namespace dialogs
} // namespace gui2

View file

@ -22,9 +22,7 @@
#include "gui/widgets/listbox.hpp"
#include "gettext.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(depcheck_select_new)
@ -81,4 +79,3 @@ void depcheck_select_new::post_show(window& window)
}
}
} // namespace dialogs
} // namespace gui2

View file

@ -19,16 +19,14 @@
#include <vector>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* Offers a list of compatible items if a currently selected one is incompatible. Currently used for switching era or map.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* message | @ref label |yes |displays the details of the required changes
* itemlist | @ref listbox |yes |displays the available items to choose from
@ -76,4 +74,3 @@ private:
int result_;
};
} // namespace dialogs
} // namespace gui2

View file

@ -32,9 +32,7 @@
#include "sdl/rect.hpp"
#include <functional>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(drop_down_menu)
@ -269,4 +267,3 @@ boost::dynamic_bitset<> drop_down_menu::get_toggle_states() const
}
} // namespace dialogs
} // namespace gui2

View file

@ -18,9 +18,7 @@
#include "gui/widgets/settings.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(edit_label)
@ -31,4 +29,3 @@ edit_label::edit_label(std::string& label, bool& team_only)
register_bool("team_only_toggle", true, team_only);
}
} // namespace dialogs
} // namespace gui2

View file

@ -16,16 +16,14 @@
#include "gui/dialogs/modal_dialog.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* Dialog for editing gamemap labels.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* title | @ref label |yes |Dialog title label.
* label | @ref text_box |yes |Input field for the map label.
@ -58,4 +56,3 @@ private:
virtual const std::string& window_id() const override;
};
} // namespace dialogs
} // namespace gui2

View file

@ -23,9 +23,7 @@
#include <boost/algorithm/string/trim.hpp>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(edit_text)
@ -59,4 +57,3 @@ void edit_text::on_text_change()
}
} // namespace dialogs
} // namespace gui2

View file

@ -16,16 +16,14 @@
#include "gui/dialogs/modal_dialog.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* Dialog for renaming units in-game.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* name | text_box |yes |Input field for the unit name.
*/
@ -73,4 +71,3 @@ private:
bool disallow_empty_;
};
} // namespace dialogs
} // namespace gui2

View file

@ -32,9 +32,7 @@
#include <functional>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
static custom_tod::string_pair tod_getter_image(const time_of_day& tod)
@ -307,4 +305,3 @@ void custom_tod::post_show(window& /*window*/)
}
} // namespace dialogs
} // namespace gui2

View file

@ -23,9 +23,7 @@
#include <functional>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(editor_edit_label)
@ -68,4 +66,3 @@ void editor_edit_label::save_color_component(uint8_t color_t::* component, const
color_store.*component = value;
}
} // namespace dialogs
} // namespace gui2

View file

@ -17,16 +17,14 @@
#include "gui/dialogs/modal_dialog.hpp"
#include "color.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* Dialog for editing gamemap labels.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* title | @ref label |yes |Dialog title label.
* label | @ref text_box |yes |Input field for the map label.
@ -47,7 +45,7 @@ public:
* @param visible_fog Sets visible_fog_toggle attribute.
* @param visible_shroud Sets visible_shroud_toggle attribute.
* @param color Sets slider color.
* @param category Sets category attribute.
* @param category Sets category attribute.
*/
editor_edit_label(std::string& text,
bool& immutable,
@ -70,4 +68,3 @@ private:
virtual void pre_show(window& window) override;
};
} // namespace dialogs
} // namespace gui2

View file

@ -21,9 +21,7 @@
#include "gui/widgets/text_box.hpp"
#include "gui/widgets/window.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(editor_edit_scenario)
@ -56,4 +54,3 @@ void editor_edit_scenario::pre_show(window& win)
}
} // namespace dialogs
} // namespace gui2

View file

@ -16,16 +16,14 @@
#include "gui/dialogs/modal_dialog.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* Dialog for editing gamemap scenarios.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* title | @ref label |yes |Dialog title label.
* label | @ref text_box |yes |Input field for the map label.
@ -52,4 +50,3 @@ private:
virtual void pre_show(window& window) override;
};
} // namespace dialogs
} // namespace gui2

View file

@ -22,9 +22,7 @@
#include <functional>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(editor_edit_side)
@ -76,4 +74,3 @@ void editor_edit_side::post_show(window&)
}
} // namespace dialogs
} // namespace gui2

View file

@ -30,9 +30,7 @@
#define ERR_ED LOG_STREAM_INDENT(err, editor)
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(editor_generate_map)
@ -127,4 +125,3 @@ std::optional<uint32_t> editor_generate_map::get_seed()
}
} // namespace dialogs
} // namespace gui2

View file

@ -24,9 +24,7 @@
#include <functional>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
static int max_coastal = 5;
@ -91,4 +89,3 @@ void generator_settings::adjust_minimum_size_by_players()
}
} // namespace dialogs
} // namespace gui2

View file

@ -17,9 +17,7 @@
#include "gui/widgets/settings.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(editor_new_map)
@ -33,4 +31,3 @@ editor_new_map::editor_new_map(const t_string& title, int& width, int& height)
}
} // namespace dialogs
} // namespace gui2

View file

@ -18,15 +18,13 @@
#include "tstring.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Key |Type |Mandatory|Description
*
* Key |Type |Mandatory|Description
* ------------------|------------------|---------|-----------
* width | integer_selector |yes |An integer selector to determine the width of the map to create.
* height | integer_selector |yes |An integer selector to determine the height of the map to create.
@ -60,4 +58,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -22,9 +22,7 @@
#include <functional>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(editor_resize_map)
@ -150,4 +148,3 @@ void editor_resize_map::update_expand_direction()
}
} // namespace dialogs
} // namespace gui2

View file

@ -31,9 +31,7 @@
#include <sstream>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(end_credits)
@ -144,4 +142,3 @@ void end_credits::key_press_callback(const SDL_Keycode key)
}
} // namespace dialogs
} // namespace gui2

View file

@ -96,9 +96,7 @@ inline void isort_dir_entries(std::vector<std::string>& entries)
} // unnamed namespace
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(file_dialog)
@ -745,4 +743,3 @@ void file_dialog::on_file_delete_cmd()
}
} // namespace dialogs
} // namespace gui2

View file

@ -22,9 +22,7 @@
#include "gui/widgets/settings.hpp"
#include "gui/widgets/window.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(folder_create)
@ -43,4 +41,3 @@ void folder_create::pre_show(window& window)
}
} // namespace dialogs
} // namespace gui2

View file

@ -16,16 +16,14 @@
#include "gui/dialogs/modal_dialog.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* Dialog for providing the name of a new folder to create. Used by the file dialog.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* name | text_box |yes |Input field for the new folder name.
*/
@ -77,4 +75,3 @@ public:
};
} // namespace dialogs
} // namespace gui2

View file

@ -26,9 +26,7 @@
#include <functional>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(formula_debugger)
@ -153,4 +151,3 @@ void formula_debugger::callback_stepout_button()
}
} // namespace dialogs
} // namespace gui2

View file

@ -21,16 +21,14 @@ namespace wfl
class formula_debugger;
}
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* This shows the debugger for the formulas.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* stack | control |yes |A stack.
* execution | control |yes |Execution trace label.
@ -69,4 +67,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -33,9 +33,7 @@
#include "gettext.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(game_cache_options)
@ -158,4 +156,3 @@ bool game_cache_options::purge_cache()
}
} // namespace dialogs
} // namespace gui2

View file

@ -17,9 +17,7 @@
#include "preferences/game.hpp"
#include "gui/widgets/settings.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(game_delete)
@ -53,4 +51,3 @@ game_delete::game_delete()
}
} // namespace dialogs
} // namespace gui2

View file

@ -16,16 +16,14 @@
#include "gui/dialogs/modal_dialog.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* This shows the dialog to confirm deleting a savegame file.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|------------------|---------|-----------
* dont_ask_again | boolean_selector |yes |A checkbox to not show this dialog again.
*/
@ -42,4 +40,3 @@ private:
virtual const std::string& window_id() const override;
};
} // namespace dialogs
} // namespace gui2

View file

@ -53,9 +53,7 @@ static lg::log_domain log_gameloaddlg{"gui/dialogs/game_load_dialog"};
#define LOG_GAMELOADDLG LOG_STREAM(info, log_gameloaddlg)
#define DBG_GAMELOADDLG LOG_STREAM(debug, log_gameloaddlg)
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(game_load)
@ -499,4 +497,3 @@ void game_load::handle_dir_select()
}
} // namespace dialogs
} // namespace gui2

View file

@ -22,9 +22,7 @@
#include "gui/widgets/label.hpp"
#include "gui/widgets/settings.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(game_save)
@ -67,4 +65,3 @@ game_save_oos::game_save_oos(bool& ignore_all,
}
} // namespace dialogs
} // namespace gui2

View file

@ -16,16 +16,14 @@
#include "gui/dialogs/modal_dialog.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* This shows the dialog to create a savegame file.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* lblTitle | @ref label |yes |The title of the window.
* txtFilename | text_box |yes |The name of the savefile.
@ -71,4 +69,3 @@ private:
virtual const std::string& window_id() const override;
};
} // namespace dialogs
} // namespace gui2

View file

@ -41,9 +41,7 @@
static lg::log_domain log_display("display");
#define LOG_DP LOG_STREAM(info, log_display)
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(game_stats)
@ -267,4 +265,3 @@ void game_stats::post_show(window& window)
}
} // namespace dialogs
} // namespace gui2

View file

@ -27,9 +27,7 @@ class display;
class team;
struct team_data;
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
class game_stats : public modal_dialog
@ -72,4 +70,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -49,9 +49,7 @@ const std::string text_feature_off = "<span color='#f00'>&#9679;</span>";
} // end anonymous namespace
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(game_version)
@ -276,4 +274,3 @@ void game_version::generate_plain_text_report()
}
} // namespace dialogs
} // namespace gui2

View file

@ -66,9 +66,7 @@ inline std::string config_to_string(const config& cfg, std::string only_children
}
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
class gamestate_inspector::model
@ -802,4 +800,3 @@ void gamestate_inspector::pre_show(window& window)
}
} // namespace dialogs
} // namespace gui2

View file

@ -20,16 +20,14 @@
namespace game_events {class manager; }
class display_context;
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* This shows the gamestate inspector.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* inspector_name | control |yes |Name of the inspector.
* stuff_list | control |yes |List of various stuff that can be viewed.
@ -62,4 +60,3 @@ private:
const display_context& dc_;
};
} // namespace dialogs
} // namespace gui2

View file

@ -37,9 +37,7 @@
#include "help/help.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(help_browser)
@ -106,4 +104,3 @@ void help_browser::on_topic_select()
}
} // namespace dialogs
} // namespace gui2

View file

@ -17,9 +17,7 @@
#include "gui/dialogs/modal_dialog.hpp"
class game_config_view;
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/** Help browser dialog. */
@ -45,4 +43,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -20,9 +20,7 @@
#include <SDL2/SDL.h>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(hotkey_bind)
@ -53,4 +51,3 @@ void hotkey_bind::sdl_event_callback(const SDL_Event &event)
} // namespace dialogs
} // namespace gui2

View file

@ -20,9 +20,7 @@
#include <string>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
class hotkey_bind : public modal_dialog
@ -50,4 +48,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -32,9 +32,7 @@
#include <vector>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(label_settings)
@ -143,4 +141,3 @@ void label_settings::toggle_category(widget& box, const std::string& category)
}
} // namespace dialogs
} // namespace gui2

View file

@ -20,9 +20,7 @@
#include <map>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
class label_settings : public modal_dialog
{
@ -51,4 +49,3 @@ private:
void toggle_category(widget& box, const std::string& category);
};
} // namespace dialogs
} // namespace gui2

View file

@ -23,9 +23,7 @@
#include "language.hpp"
#include "preferences/general.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
@ -70,4 +68,3 @@ void language_selection::post_show(window& window)
}
} // namespace dialogs
} // namespace gui2

View file

@ -16,17 +16,15 @@
#include "gui/dialogs/modal_dialog.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* This shows the dialog to select the language to use.
* When the dialog is closed with the OK button it also updates the selected language in the preferences.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* language_list | @ref listbox |yes |This listbox contains the list with available languages.
* free to choose | control |no |Show the name of the language in the current row.
@ -53,4 +51,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -65,9 +65,7 @@ static const std::map<loading_stage, std::string> stage_names {
{ loading_stage::download_lobby_data, N_("Downloading lobby data") },
};
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(loading_screen)
@ -200,4 +198,3 @@ void loading_screen::display(std::function<void()> f)
}
} // namespace dialogs
} // namespace gui2

View file

@ -26,9 +26,7 @@
#include "log.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(log_settings)
@ -157,4 +155,3 @@ void log_settings::set_logger(const std::string log_domain)
}
} // namespace dialogs
} // namespace gui2

View file

@ -56,9 +56,7 @@ static lg::log_domain log_lua_int("lua/interpreter");
#define WRN_LUA LOG_STREAM(warn, log_lua_int)
#define ERR_LUA LOG_STREAM(err, log_lua_int)
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(lua_interpreter)
@ -721,4 +719,3 @@ lua_interpreter::lua_interpreter(lua_kernel_base & lk)
}
} // namespace dialogs
} // namespace gui2

View file

@ -18,9 +18,7 @@
class lua_kernel_base;
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
class lua_interpreter : public modal_dialog
@ -47,4 +45,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -23,9 +23,7 @@
#include "scripting/plugins/manager.hpp"
#include "video.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
modal_dialog::modal_dialog()
: window_(nullptr)
@ -272,4 +270,3 @@ void modal_dialog::finalize_fields(window& window, const bool save_fields)
}
} // namespace dialogs
} // namespace gui2

View file

@ -21,9 +21,7 @@
#include <string>
#include <vector>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* Registers a window.
@ -224,7 +222,7 @@ protected:
* with ok.
* @param callback_change When the value of the widget changes this
* callback is called.
* @param initial_fire
* @param initial_fire
*
* @returns Pointer to the created widget.
*/
@ -248,7 +246,7 @@ protected:
* @ref field::field for more information.
* @param callback_change When the value of the widget changes this
* callback is called.
* @param initial_fire
* @param initial_fire
*
* @returns Pointer to the created widget.
*/
@ -456,4 +454,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -19,9 +19,7 @@
#include "gui/widgets/window.hpp"
#include "video.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
modeless_dialog::modeless_dialog() : window_(nullptr)
@ -83,4 +81,3 @@ void modeless_dialog::pre_show(window& /*window*/)
}
} // namespace dialogs
} // namespace gui2

View file

@ -34,9 +34,7 @@
#include <functional>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(faction_select)
@ -239,4 +237,3 @@ void faction_select::post_show(window& /*window*/)
}
} // namespace dialogs
} // namespace gui2

View file

@ -20,9 +20,7 @@
#include <string>
#include <vector>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
class faction_select : public modal_dialog
@ -66,4 +64,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -61,9 +61,7 @@ static lg::log_domain log_lobby("lobby");
#define ERR_LB LOG_STREAM(err, log_lobby)
#define SCOPE_LB log_scope2(log_lobby, __func__)
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(mp_lobby)
@ -1203,4 +1201,3 @@ void mp_lobby::skip_replay_changed_callback()
}
} // namespace dialogs
} // namespace gui2

View file

@ -19,9 +19,7 @@
#include "gui/widgets/window.hpp"
#include "wesnothd_connection.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(mp_match_history)
@ -43,4 +41,3 @@ void mp_match_history::request_history(int offset)
}
} // namespace dialogs
} // namespace gui2

View file

@ -32,9 +32,7 @@
#include "gettext.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
static toggle_button * setup_pref_toggle_button(const std::string & id, bool def, window & window)
@ -129,4 +127,3 @@ void mp_alerts_options::post_show(window& /*window*/)
}
} // namespace dialogs
} // namespace gui2

View file

@ -16,16 +16,14 @@
#include "gui/dialogs/modal_dialog.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* A Preferences subdialog permitting to configure the sounds and notifications generated in response to various mp lobby / game events.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* _label | @ref label |yes |Item name.
* _sound | toggle_button |yes |Toggles whether to play the item sound.
@ -57,4 +55,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -40,9 +40,7 @@ static lg::log_domain log_gui("gui/dialogs/mp_change_control");
#define LOG_GUI LOG_STREAM(info, log_gui)
#define DBG_GUI LOG_STREAM(debug, log_gui)
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(mp_change_control)
@ -181,4 +179,3 @@ void mp_change_control::post_show(window& window)
}
} // namespace dialogs
} // namespace gui2

View file

@ -24,16 +24,14 @@ namespace events
class menu_handler;
}
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* This shows the multiplayer change control dialog.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* sides_list | @ref listbox |yes |List of sides participating in the MP game.
* nicks_list | @ref listbox |yes |List of nicks of all clients playing or observing the MP game.
@ -73,4 +71,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -53,9 +53,7 @@ static lg::log_domain log_mp_create("mp/create");
#define WRN_MP LOG_STREAM(warn, log_mp_create)
#define ERR_MP LOG_STREAM(err, log_mp_create)
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
// Special retval value for loading a game
@ -959,4 +957,3 @@ void mp_create_game::post_show(window& window)
}
} // namespace dialogs
} // namespace gui2

View file

@ -18,9 +18,7 @@
#include "preferences/game.hpp"
#include "gui/widgets/settings.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(mp_host_game_prompt)
@ -52,4 +50,3 @@ mp_host_game_prompt::mp_host_game_prompt()
}
} // namespace dialogs
} // namespace gui2

View file

@ -17,16 +17,14 @@
#include "gui/dialogs/modal_dialog.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* This shows the dialog to confirm deleting a savegame file.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|------------------|---------|-----------
* do_not_show_again | boolean_selector |yes |A checkbox to not show this dialog again.
*/
@ -43,4 +41,3 @@ private:
virtual const std::string& window_id() const override;
};
} // namespace dialogs
} // namespace gui2

View file

@ -52,9 +52,7 @@ static lg::log_domain log_mp_connect_engine("mp/connect/engine");
#define WRN_MP LOG_STREAM(warn, log_mp_connect_engine)
#define ERR_MP LOG_STREAM(err, log_mp_connect_engine)
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(mp_join_game)
@ -581,4 +579,3 @@ void mp_join_game::post_show(window& window)
}
} // namespace dialogs
} // namespace gui2

View file

@ -16,9 +16,7 @@
#include "gui/widgets/settings.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(mp_join_game_password_prompt)
@ -30,4 +28,3 @@ mp_join_game_password_prompt::mp_join_game_password_prompt(
}
} // namespace dialogs
} // namespace gui2

View file

@ -16,16 +16,14 @@
#include "gui/dialogs/modal_dialog.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* Dialog for entering a password for joining a password-protected MP game.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* password | text_box |yes |Input field for the game password.
*/
@ -52,4 +50,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -26,9 +26,7 @@
#include "gui/widgets/toggle_button.hpp"
#include "gui/widgets/window.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(mp_login)
@ -81,4 +79,3 @@ void mp_login::post_show(window& /*win*/) {
}
} // namespace dialogs
} // namespace gui2

View file

@ -26,9 +26,7 @@
#include "gui/widgets/window.hpp"
#include "preferences/credentials.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(mp_method_selection)
@ -67,4 +65,3 @@ void mp_method_selection::post_show(window& window)
}
} // namespace dialogs
} // namespace gui2

View file

@ -16,16 +16,14 @@
#include "gui/dialogs/modal_dialog.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* This shows the dialog to select the kind of MP game the user wants to play.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* user_name | text_box |yes |This text contains the name the user on the MP server. This widget will get a fixed maximum length by the engine.
* method_list | @ref listbox |yes |The list with possible game methods.
@ -68,4 +66,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -27,9 +27,7 @@
#include "gui/widgets/window.hpp"
#include "deprecation.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
mp_options_helper::mp_options_helper(window& window, ng::create_engine& create_engine)
@ -339,4 +337,3 @@ config mp_options_helper::get_options_config()
}
} // namespace dialogs
} // namespace gui2 // namespace gui2

View file

@ -41,9 +41,7 @@
#include "units/types.hpp"
#include "wesnothd_connection.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(mp_staging)
@ -590,4 +588,3 @@ void mp_staging::post_show(window& window)
}
} // namespace dialogs
} // namespace gui2

View file

@ -28,9 +28,7 @@
#include <functional>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(lobby_player_info)
@ -239,4 +237,3 @@ void lobby_player_info::do_kick_ban(bool ban)
}
} // namespace dialogs
} // namespace gui2

View file

@ -20,9 +20,7 @@
#include "game_config.hpp"
#include <memory>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
class plugin_executor
@ -55,4 +53,3 @@ protected:
};
} // namespace dialogs
} // namespace gui2

View file

@ -28,9 +28,7 @@
#include <functional>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(synched_choice_wait)
@ -75,4 +73,3 @@ void synched_choice_wait::handle_generic_event(const std::string& event_name)
}
} // namespace dialogs
} // namespace gui2

View file

@ -28,9 +28,7 @@
#include <chrono>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
using namespace std::chrono_literals;
@ -132,4 +130,3 @@ void network_transmission::post_show(window& /*window*/)
}
} // namespace dialogs
} // namespace gui2

View file

@ -23,9 +23,7 @@
#include <atomic>
#include <future>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
@ -96,4 +94,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -27,9 +27,7 @@
#include <cmath>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(outro)
@ -160,4 +158,3 @@ void outro::post_show(window& /*window*/)
}
} // namespace dialogs
} // namespace gui2

View file

@ -18,9 +18,7 @@
class game_classification;
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/** Dialog to display 'The End' at the end of a campaign. */
class outro : public modal_dialog
@ -63,4 +61,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

View file

@ -60,9 +60,7 @@
#include <functional>
#include <numeric>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
namespace
{
@ -1093,4 +1091,3 @@ void preferences_dialog::post_show(window& /*window*/)
}
} // namespace dialogs
} // namespace gui2

View file

@ -34,9 +34,7 @@
#include <functional>
#include <stdexcept>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
REGISTER_DIALOG(screenshot_notification)
@ -128,4 +126,3 @@ void screenshot_notification::keypress_callback(bool& handled, SDL_Keycode key)
}
} // namespace dialogs
} // namespace gui2

View file

@ -17,18 +17,16 @@
#include "gui/dialogs/modal_dialog.hpp"
#include "sdl/surface.hpp"
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
*
* Notification dialog used after saving a game or map screenshot to display information about it for the user.
* Key |Type |Mandatory|Description
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* path | text_box |yes |Read-only textbox containing the screenshot path.
* path | text_box |yes |Read-only textbox containing the screenshot path.
* filesize | @ref label |no |Optional label to display the file size.
* copy | @ref button |yes |Button to copy the path to clipboard.
* open | @ref button |yes |Button to open the screnshot using the default application.
@ -67,4 +65,3 @@ private:
virtual void pre_show(window& window) override;
};
} // namespace dialogs
} // namespace gui2

View file

@ -28,9 +28,7 @@
#include "preferences/general.hpp"
#include <functional>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
namespace
{
@ -157,4 +155,3 @@ void select_orb_colors::reset_orb_callback()
}
} // namespace dialogs
} // namespace gui2

View file

@ -18,9 +18,7 @@
#include <map>
namespace gui2
{
namespace dialogs
namespace gui2::dialogs
{
class select_orb_colors : public modal_dialog
{
@ -64,4 +62,3 @@ private:
};
} // namespace dialogs
} // namespace gui2

Some files were not shown because too many files have changed in this diff Show more