[Commits] [wesnoth/wesnoth] 8601c7: Cache the config cache files prefix

GitHub noreply at github.com
Fri Jun 20 00:46:29 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 8601c79647333079aab4d80f4dee681938108232
      https://github.com/wesnoth/wesnoth/commit/8601c79647333079aab4d80f4dee681938108232
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-19 (Thu, 19 Jun 2014)

  Changed paths:
    M src/config_cache.cpp
    M src/config_cache.hpp

  Log Message:
  -----------
  Cache the config cache files prefix

No pun intended.

This micro-refactoring step will be required for introducing
functionality that requires to know the config cache files' naming
pattern.


  Commit: c5e81ca5f5c2a8d559b0fdf48c1cd5ee87055c6d
      https://github.com/wesnoth/wesnoth/commit/c5e81ca5f5c2a8d559b0fdf48c1cd5ee87055c6d
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-19 (Thu, 19 Jun 2014)

  Changed paths:
    M src/filesystem.cpp
    M src/filesystem.hpp

  Log Message:
  -----------
  fs: Add dir_size() function to obtain the total size of directory's contents


  Commit: 3154af156a2318aae03e7c1bfcf4c23259ccf480
      https://github.com/wesnoth/wesnoth/commit/3154af156a2318aae03e7c1bfcf4c23259ccf480
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-19 (Thu, 19 Jun 2014)

  Changed paths:
    M src/config_cache.cpp
    M src/config_cache.hpp

  Log Message:
  -----------
  Add functionality to clean or purge the cache to game_config::config_cache

Cleaning the cache removes all stale cache files (files that do not
match the current cache's naming pattern), and purging removes
*everything* in sight in the cache dir.

Ideally we would clean the cache every once in a while without asking,
but for now there will be a user-controlled option to allow doing this
by hand.


  Commit: 17c8d568d54067ddc0ffd94b3dd11796ca686253
      https://github.com/wesnoth/wesnoth/commit/17c8d568d54067ddc0ffd94b3dd11796ca686253
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-19 (Thu, 19 Jun 2014)

  Changed paths:
    M changelog
    A data/gui/default/window/game_cache_options.cfg
    M players_changelog
    M src/CMakeLists.txt
    M src/SConscript
    M src/game_preferences_display.cpp
    A src/gui/dialogs/game_cache_options.cpp
    A src/gui/dialogs/game_cache_options.hpp

  Log Message:
  -----------
  gui2/tgame_cache_options: New Preferences subdialog for cache management

It allows the user to browse to the cache (using a desktop API call),
copy its path to clipboard, clean the cache contents (deleting stale
files), or purge it entirely.

This is ideal for people sticking to the same cache dir for very long
and thus keeping content that was generated by previous versions of
Wesnoth they might not even use anymore. Purging the cache might also
aid troubleshooting (although there is a --nocache switch for that too).

The dialog also makes Wesnoth slightly more transparent about its own
disk usage, information which may not be readily accessible to people
without the technical know-how to locate a hidden directory.

For now it's accessed by pushing a button in Preferences -> General,
even though this is not ideal since it is actually Advanced Preferences
material given the nature of the cache. Unfortunately, the Advanced
page's layout is currently monopolized by the advanced preferences
options and I'm not interested right now in solving that UI design
puzzle; it will have to wait, much like the Paths dialog has done and
continues to do for 1.12.


  Commit: d48ad2440edf1345c7a1131bccd78125ba958fa1
      https://github.com/wesnoth/wesnoth/commit/d48ad2440edf1345c7a1131bccd78125ba958fa1
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-19 (Thu, 19 Jun 2014)

  Changed paths:
    M changelog
    A data/gui/default/window/game_cache_options.cfg
    M players_changelog
    M src/CMakeLists.txt
    M src/SConscript
    M src/config_cache.cpp
    M src/config_cache.hpp
    M src/filesystem.cpp
    M src/filesystem.hpp
    M src/game_preferences_display.cpp
    A src/gui/dialogs/game_cache_options.cpp
    A src/gui/dialogs/game_cache_options.hpp

  Log Message:
  -----------
  Merge branch 'feature/cache-manager'


Compare: https://github.com/wesnoth/wesnoth/compare/2415df79b8d1...d48ad2440edf


More information about the Commits mailing list