[wesnoth-commits] [wesnoth/wesnoth] 194262: Some refactoring of preferences-related hotkey inf...

GitHub noreply at github.com
Mon Apr 23 16:36:34 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 1942627052298aca366147fbf59ee0e268810875
      https://github.com/wesnoth/wesnoth/commit/1942627052298aca366147fbf59ee0e268810875
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2018-04-24 (Tue, 24 Apr 2018)

  Changed paths:
    M src/gui/dialogs/preferences_dialog.cpp
    M src/gui/dialogs/preferences_dialog.hpp
    M src/hotkey/hotkey_command.cpp
    M src/hotkey/hotkey_command.hpp

  Log Message:
  -----------
  Some refactoring of preferences-related hotkey info storage (fixes #2953)

This commit does a few things:

First, it moves the hotkey category names out of the preferences dialog and into
the more appropriate hotkey file. Each name is now properly mapped to its corresponding
category enum, so we don't have to worry about that anymore.

Second, it adds a new mapping of hotkey categories to commands so one can easily fetch
a list of hotkeys in a given category.

Third, it excludes categories with no hotkeys from the filter dropdown in the Prefs
dialog (this is the part that actually fixes the bug above).

This also includes a slight behavior change to hotkey type filtering. Previously, if a
hotkey's category didn't match any of the ones listed in the dropdown, that hotkey's
row visibility would be set to the toggle state of the first row in the filter dropdown.
Now it gets set to false.




More information about the Commits mailing list