[Commits] [wesnoth/wesnoth] dddd61: GUI2/Status Label Helper: minor cleanup and added ...

GitHub noreply at github.com
Tue Aug 22 09:13:00 UTC 2017


  Branch: refs/heads/some_gui2_refactoring
  Home:   https://github.com/wesnoth/wesnoth
  Commit: dddd617a6f64f9c04402daa5ec2e0720f5be4714
      https://github.com/wesnoth/wesnoth/commit/dddd617a6f64f9c04402daa5ec2e0720f5be4714
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-08-22 (Tue, 22 Aug 2017)

  Changed paths:
    M src/gui/widgets/status_label_helper.hpp

  Log Message:
  -----------
  GUI2/Status Label Helper: minor cleanup and added documentation

Renamed default_value_getter so it can be used outside the context of this class without being
confusing.


  Commit: 8e6676e548e7a99096c7e19ac1824f021737474d
      https://github.com/wesnoth/wesnoth/commit/8e6676e548e7a99096c7e19ac1824f021737474d
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-08-22 (Tue, 22 Aug 2017)

  Changed paths:
    M src/gui/dialogs/editor/generator_settings.cpp
    M src/gui/dialogs/multiplayer/mp_create_game.cpp
    M src/gui/dialogs/preferences_dialog.cpp
    M src/gui/widgets/status_label_helper.hpp

  Log Message:
  -----------
  GUI2/Status Label Helper: take source containing widget as a pointer

They were only used in the context of pointers anyway,


  Commit: 13717da4aaaab62124a4de9bc983d14959b11b64
      https://github.com/wesnoth/wesnoth/commit/13717da4aaaab62124a4de9bc983d14959b11b64
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-08-22 (Tue, 22 Aug 2017)

  Changed paths:
    M src/gui/dialogs/preferences_dialog.cpp

  Log Message:
  -----------
  GUI2/Preferences Dialog: use standard status label value getters instead of lambdas where possible

Only reason I was using lambdas was since I needed to specify the fourth argument. I didn't realize I
could just bind the default value getters, especially since the functionality was equivalent.

Menu buttons can't use them yet.


  Commit: 06f86960d5db2b94d299fd49fd4766c9bd46a899
      https://github.com/wesnoth/wesnoth/commit/06f86960d5db2b94d299fd49fd4766c9bd46a899
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-08-22 (Tue, 22 Aug 2017)

  Changed paths:
    M src/gui/widgets/listbox.cpp
    M src/gui/widgets/listbox.hpp

  Log Message:
  -----------
  GUI2/Listbox: move some common code for key handling to its own function


  Commit: aaa5e0b5e4ec5cc625dbe0599c21d3b8bec9c187
      https://github.com/wesnoth/wesnoth/commit/aaa5e0b5e4ec5cc625dbe0599c21d3b8bec9c187
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-08-22 (Tue, 22 Aug 2017)

  Changed paths:
    M src/gui/widgets/listbox.cpp

  Log Message:
  -----------
  GUI2/Listbox: fire NOTIFY_MODIFIED events where callback_value_changed_ is called

This is the beginning of an effort to finish converting the event callbacks to signal handles instead
of function callbacks.


  Commit: 6aea58654a1677b77c005fc9e805fa81b97101e5
      https://github.com/wesnoth/wesnoth/commit/6aea58654a1677b77c005fc9e805fa81b97101e5
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-08-22 (Tue, 22 Aug 2017)

  Changed paths:
    M src/gui/dialogs/addon/manager.cpp
    M src/gui/dialogs/core_selection.cpp
    M src/gui/dialogs/drop_down_menu.cpp
    M src/gui/dialogs/editor/generate_map.cpp
    M src/gui/dialogs/file_dialog.cpp
    M src/gui/dialogs/game_load.cpp
    M src/gui/dialogs/game_stats.cpp
    M src/gui/dialogs/game_version.cpp
    M src/gui/dialogs/lobby/lobby.cpp
    M src/gui/dialogs/multiplayer/faction_select.cpp
    M src/gui/dialogs/multiplayer/mp_change_control.cpp
    M src/gui/dialogs/multiplayer/mp_create_game.cpp
    M src/gui/dialogs/preferences_dialog.cpp
    M src/gui/dialogs/statistics_dialog.cpp
    M src/gui/dialogs/unit_advance.cpp
    M src/gui/dialogs/unit_create.cpp
    M src/gui/dialogs/unit_list.cpp
    M src/gui/dialogs/unit_recall.cpp
    M src/gui/dialogs/unit_recruit.cpp
    M src/gui/widgets/addon_list.hpp
    M src/gui/widgets/chatbox.cpp
    M src/scripting/lua_gui2.cpp

  Log Message:
  -----------
  GUI2: use signal handlers for listbox event handling

This affects uses of both set_callback_item_change and set_callback_value_change.
Finally we get rid of most of the conditional GUI2_EXPERIMENTAL_LISTBOX handler setups. \o/


  Commit: a9588de507999f4827e9424e7e2b505c0e8feec4
      https://github.com/wesnoth/wesnoth/commit/a9588de507999f4827e9424e7e2b505c0e8feec4
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-08-22 (Tue, 22 Aug 2017)

  Changed paths:
    M src/gui/widgets/listbox.cpp
    M src/gui/widgets/listbox.hpp

  Log Message:
  -----------
  GUI2/Listbox: removed callback interface

Do note the removal of the extra precondition of a valid callback before NOTIFED_MODIFED events
were fired in two cases is probably a bugfix on aaa5e0b5e.


Compare: https://github.com/wesnoth/wesnoth/compare/f223bdfcd5ed...a9588de50799


More information about the Commits mailing list