[Commits] [wesnoth/wesnoth] 517479: GUI2/Toggle Button: fire NOTIFY_MODIFIED when sett...

GitHub noreply at github.com
Wed Aug 23 05:50:46 UTC 2017


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

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

  Log Message:
  -----------
  GUI2/Toggle Button: fire NOTIFY_MODIFIED when setting value

This matches other widget such as the toggle_panel.


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

  Changed paths:
    M src/gui/auxiliary/field.hpp

  Log Message:
  -----------
  GUI2/Field: minor mostly cosmetic cleanup


  Commit: 8050a630d1eb8b71130e9fb2eb5293cc6e38da09
      https://github.com/wesnoth/wesnoth/commit/8050a630d1eb8b71130e9fb2eb5293cc6e38da09
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-08-23 (Wed, 23 Aug 2017)

  Changed paths:
    M src/gui/core/event/dispatcher.cpp
    M src/gui/core/event/dispatcher.hpp

  Log Message:
  -----------
  GUI2/Dispatcher: changed dispatcher signals to take a widget reference as a first parameter

This fixes an issue where functions taking `widget` as a parameter couldn't be bound to a signal function
with the first argument passed via placeholder since `std::bind` requires arguments match exactly when using
the placeholders.

The dispatcher's `this` was cast to `widget` before the signal functions were fired anyway, so this doesn't
really constitute any functional change.


  Commit: 342ef8a77441a920c434cb0a70dba72394cfc34a
      https://github.com/wesnoth/wesnoth/commit/342ef8a77441a920c434cb0a70dba72394cfc34a
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-08-23 (Wed, 23 Aug 2017)

  Changed paths:
    M src/gui/auxiliary/field.hpp
    M src/gui/dialogs/campaign_selection.cpp
    M src/gui/dialogs/drop_down_menu.cpp
    M src/gui/dialogs/editor/resize_map.cpp
    M src/gui/dialogs/label_settings.cpp
    M src/gui/dialogs/lobby/lobby.cpp
    M src/gui/dialogs/lobby/lobby.hpp
    M src/gui/dialogs/multiplayer/mp_create_game.cpp
    M src/gui/dialogs/multiplayer/mp_options_helper.cpp
    M src/gui/dialogs/preferences_dialog.cpp
    M src/gui/widgets/generator.cpp
    M src/gui/widgets/group.hpp
    M src/gui/widgets/listbox.cpp
    M src/scripting/lua_gui2.cpp

  Log Message:
  -----------
  GUI2: convert uses of 'state changed' callbacks to NOTIFY_MODIFIED signal handlers


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

  Changed paths:
    M src/gui/widgets/menu_button.cpp
    M src/gui/widgets/menu_button.hpp
    M src/gui/widgets/selectable_item.hpp
    M src/gui/widgets/toggle_button.cpp
    M src/gui/widgets/toggle_button.hpp
    M src/gui/widgets/toggle_panel.cpp
    M src/gui/widgets/toggle_panel.hpp

  Log Message:
  -----------
  GUI2: removed state_changed callback interface from selected_item child classes

I left the callbacks in tree_view_node for now since they don't really inherit from selected_item and
I need to make it fire NOTIFY_MODIFED correctly and decide if I want to keep the state to-fold/to-unfold
distinctions.


  Commit: 91285d1bfa2dcfac15bb0a360abff70c5e34d91c
      https://github.com/wesnoth/wesnoth/commit/91285d1bfa2dcfac15bb0a360abff70c5e34d91c
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-08-23 (Wed, 23 Aug 2017)

  Changed paths:
    M src/gui/dialogs/unit_create.cpp
    M src/gui/dialogs/unit_create.hpp

  Log Message:
  -----------
  GUI2/Unit Create: show type details based on currently selected gender


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

  Changed paths:
    M src/gui/core/event/dispatcher.hpp

  Log Message:
  -----------
  GUI2/Dispatcher: added signal handler register helper for double click events

Mostly because I needed to register it in the back_post_child queue position to work.
See doc comment for more details.


  Commit: 88dd4fd644bf002d33f5900260b6161a968a185f
      https://github.com/wesnoth/wesnoth/commit/88dd4fd644bf002d33f5900260b6161a968a185f
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-08-23 (Wed, 23 Aug 2017)

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

  Log Message:
  -----------
  GUI2/MP Lobby: convert two uses of set_callback_mouse_left_double_click to signal handlers


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

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

  Log Message:
  -----------
  GUI2/Toggle Panel: removed callback_mouse_left_double_click interface


  Commit: 03c8289a0856700a7f42ec1cc382faaac2975f73
      https://github.com/wesnoth/wesnoth/commit/03c8289a0856700a7f42ec1cc382faaac2975f73
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-08-23 (Wed, 23 Aug 2017)

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

  Log Message:
  -----------
  GUI2/Text Box: set font size and style in ctor (fixes issue with password box)

Since the password box had its own builder, this wasn't getting called, leading to cursor offset issues.
I'm not sure this is the best place to have it, but it works for now.


  Commit: 4be3111992340317897e03994ad80fa456d77525
      https://github.com/wesnoth/wesnoth/commit/4be3111992340317897e03994ad80fa456d77525
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-08-23 (Wed, 23 Aug 2017)

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

  Log Message:
  -----------
  GUI2/Preferences Dialog: added more explanatory comments about binding lambdas

[ci skip]


Compare: https://github.com/wesnoth/wesnoth/compare/a9588de50799...4be311199234


More information about the Commits mailing list