[Commits] [wesnoth/wesnoth] 030835: Added a getter for a static pango_text object

GitHub noreply at github.com
Fri Jun 23 02:21:23 UTC 2017


  Branch: refs/heads/accelerated_rendering
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 030835ce8b96d7faef7fcb698f93b0f0209cd6df
      https://github.com/wesnoth/wesnoth/commit/030835ce8b96d7faef7fcb698f93b0f0209cd6df
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-22 (Thu, 22 Jun 2017)

  Changed paths:
    M src/font/text.cpp
    M src/font/text.hpp
    M src/gui/core/canvas.cpp
    M src/gui/widgets/styled_widget.hpp

  Log Message:
  -----------
  Added a getter for a static pango_text object

The reason I added this was so I can refactor some temporary pango_text objects out of the display class.
styled_widget doesn't use this for reasons explained in the comment.


  Commit: b0effe7d05332871ef2970800d681b05f4404bb7
      https://github.com/wesnoth/wesnoth/commit/b0effe7d05332871ef2970800d681b05f4404bb7
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-22 (Thu, 22 Jun 2017)

  Changed paths:
    M data/gui/window/addon_manager.cfg

  Log Message:
  -----------
  GUI2/Addon Manager: removed some excessive borders in the low resolution definition


  Commit: 02768914ced9f8c7de879940bfa4a4735ffd9366
      https://github.com/wesnoth/wesnoth/commit/02768914ced9f8c7de879940bfa4a4735ffd9366
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-22 (Thu, 22 Jun 2017)

  Changed paths:
    M data/gui/widget/addon_list.cfg
    M src/gui/widgets/addon_list.cpp

  Log Message:
  -----------
  GUI2/Addon List: restrict markup to name and installation status fields

We don't want markup in any of the other fields. I still need to find a slightly better solution for the name
field, though. We don't want users to be able to use markup unnecessairly, but we do need markup to highlight
the names of ready-to-upload addons.

This fixes warnings about unescaped ampersands in the Author field.


  Commit: d4d94a8dbc977389ade98b412ddf5c37321359d2
      https://github.com/wesnoth/wesnoth/commit/d4d94a8dbc977389ade98b412ddf5c37321359d2
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-06-23 (Fri, 23 Jun 2017)

  Changed paths:
    A data/gui/window/command_console.cfg
    M projectfiles/CodeBlocks/wesnoth.cbp
    M source_lists/wesnoth
    M src/controller_base.cpp
    A src/gui/dialogs/command_console.cpp
    A src/gui/dialogs/command_console.hpp
    M src/menu_events.cpp
    M src/menu_events.hpp
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/playsingle_controller.cpp
    M src/playsingle_controller.hpp

  Log Message:
  -----------
  Port floating textbox/command console to GUI2

The old floating textbox was extremely entwined with the controller_base, play_controller, and menu_handler
classes. controller_base::have_keyboard_focus essentially controlled whether some events were executed based
on whether the floating textbox was open or not. Additionally, those events weren't even reached if a UI dialog
was open at all.

The new design features a singleton console class that can be called from anywhere, not just the game. I've also
decoupled the execution object from play_controller. The relevant functions in menu_handler are now passed to
the console as callbacks.

To work around map events such as clicking not being available if the console was open, I removed the exclusionary
is-in-dialog check from controller_base::handle_event and instead exit early out certain types of events using
controller_base::have_keyboard_focus. As mentioned in the accompanying comment, this isn't the best solution, but
it will do for now.

The new console also isn't fully feature-comparable with the old GUI1 one. The following are still missing:
* The checbox, for use when sending messages.
* Tab completion.
* A crash occurs when existing the app if a game was exited with the console open.

I'm leaving the old floating_textbox code around for now for reference.


Compare: https://github.com/wesnoth/wesnoth/compare/3d23a6d206e3...d4d94a8dbc97


More information about the Commits mailing list