[Commits] [wesnoth/wesnoth] 6759f4: GUI2: cleaned up and restructured initialization p...

GitHub noreply at github.com
Mon Dec 11 03:50:00 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 6759f41b1efd85651e365af73eb3b39c1183a5d1
      https://github.com/wesnoth/wesnoth/commit/6759f41b1efd85651e365af73eb3b39c1183a5d1
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-12-11 (Mon, 11 Dec 2017)

  Changed paths:
    M projectfiles/VC12/wesnoth.vcxproj
    M projectfiles/VC12/wesnoth.vcxproj.filters
    M source_lists/wesnoth
    A src/gui/core/gui_definition.cpp
    A src/gui/core/gui_definition.hpp
    M src/gui/core/register_widget.hpp
    A src/gui/core/static_registry.cpp
    A src/gui/core/static_registry.hpp
    M src/gui/core/widget_definition.hpp
    M src/gui/core/window_builder.cpp
    M src/gui/core/window_builder.hpp
    M src/gui/dialogs/modal_dialog.hpp
    M src/gui/dialogs/title_screen.cpp
    M src/gui/dialogs/tooltip.cpp
    A src/gui/gui.cpp
    A src/gui/gui.hpp
    M src/gui/widgets/helper.cpp
    M src/gui/widgets/helper.hpp
    M src/gui/widgets/matrix.cpp
    M src/gui/widgets/settings.cpp
    M src/gui/widgets/settings.hpp
    M src/gui/widgets/size_lock.cpp
    M src/gui/widgets/styled_widget.cpp
    M src/gui/widgets/viewport.cpp
    M src/gui/widgets/window.cpp
    M src/gui/widgets/window.hpp
    M src/scripting/lua_gui2.cpp
    M src/scripting/lua_kernel_base.cpp
    M src/tests/gui/test_gui2.cpp
    M src/tests/main.cpp
    M src/tests/utils/game_config_manager.cpp
    M src/wesnoth.cpp

  Log Message:
  -----------
  GUI2: cleaned up and restructured initialization process

This mostly has to do with moving various components into more logical locations instead of
all mushed together in gui/widgets/settings.*pp. To that end, the following changes have been
made:

* The gui2::init function has been moved to its own file in the gui/ toplevel.
* load_settings() has been merged into init().
* All functions and code relating to gui theme definitions have been moved to their own file.
* All code relating to widgets or window static init have been moved to their own file.
* window::update_screen_size has been moved out of the window class and into settings.cpp.
* The unimplemented free-stadnding version of load_widget_definitions has been removed.
* gui_definition::read and gui_defintion::load have been merged into the gui_definition ctor
  and greatly simplified.
* Some functions relating to builder_widgets have been renamed for clarity.
* add/remove_single_widget_defintion now access the current gui theme instead of the default.
  This looks like it was a mistake made in the original code.
* Since the static registry is now externally linked, the unit tests accessor for window types
  has been removed.
* Documentation has been updated. The wikidoc comment for gui_definition has been removed. It
  was rather out-of-date and needed to be reworked anyway.
* widget_builder_func_t's signature is now to take a config reference and not a copy, though
  REGISRER_WIDGET had already passed register_builder_widget a lambda that took a reference.
* Various other misc cleanups and improvements.





More information about the Commits mailing list