wesnoth/data/advanced_preferences.cfg
Ignacio R. Morelle 553c56b2bd preferences: Merge compress_saves and bzip2_savegame_compression options
Now that we have combo box options in Preferences -> Advanced, we can
finally present the saved game compression options in a user-friendly
fashion instead of having two separate options with an unclear
relationship.

However, in order to achieve this I had to move far more code than I am
normally comfortable with:

 * Moved the config_writer::compressor enum type to a separate header
   file, serialization/compression.hpp, in order to make it available to
   more units without pulling a bunch of heavy crap (such as the boost
   iostreams headers) that's normally unneeded. The new type is
   compression::format.

 * Added a compression::format_extension() function to determine a file
   extension string according to a compression type. This is needed more
   often than one would think, see below.

 * Changed all savegame-related classes to use the compression::format
   type instead of a single boolean flag and bzip2_savegame_compression
   queries. This is a code-heavy task by design.

 * Changed all code scattered around deciding whether to use ".gz" or
   ".bz2" for a save extension to use compression::format_extension()
   instead. This affects both saved game implementation and interface
   code for some reason (read: poor design).

 * Removed the bzip2_savegame_compression preferences option, reusing
   the previous compress_saves option for this feature, turning it from
   a boolean option to a string option ("none", "gzip", "bzip2",
   defaults to "gzip" per advanced_preferences.cfg).

 * preferences::compress_saves() became
   preferences::save_compression_format().

 * Without bzip2_savegame_compression, people who previously enabled
   bzip2 compression will revert to gzip compression. This seems to be a
   rare enough case to me to bother with providing backwards
   compatibility with a feature that only existed for [1.11.0, 1.11.8).

 * For preferences files from previous versions where compress_saves was
   set to either "yes" or "no", there will be a conspicuous value in the
   second column of the advanced preferences list, especially if they
   are using a translation; it'll be either "yes" or "no" as an
   untranslatable string. A value of "yes" is equivalent to "gzip", and
   a value of "no" is equivalent to "none". Any other unrecognized value
   is equivalent to "gzip". As soon as the user chooses a compression
   format again, one of the three supported values ("none", "gzip", or
   "bzip2") will be written to the compressed_saves attribute in the
   preferences file.

All in all, a ridiculously messy commit that's not particularly feasible
to break down into separate pieces because all of the involved code is
very closely related to the overarching feature that's being
implemented in it.

Note that the save_index currently only uses gzip regardless of whether
bzip2 is the current compression format choice. This was the case even
before this commit, and I'm not sure it's worth it to change it given
the potential CPU usage and the fact that save_index tends to be broken
most of the time anyway.
2013-12-20 23:36:46 -03:00

389 lines
8.5 KiB
INI

#textdomain wesnoth
[advanced_preference]
field=compress_saves
# po: Associated save_compression_short^ entries need to be as short as
# po: possible to avoid stretching the advanced preferences list too
# po: much.
name= _ "Compress saved games"
type=combo
default=gzip
[option]
id=gzip
name= _ "save_compression^Gzip"
name_short= _ "save_compression_short^gzip"
description= _ "save_compression_desc^Default compression, faster"
[/option]
[option]
id=bzip2
name= _ "save_compression^Bzip2"
name_short= _ "save_compression_short^bzip2"
description= _ "save_compression_desc^Best compression, slower"
[/option]
[option]
id=none
name= _ "save_compression^No"
name_short= _ "save_compression_short^no"
description= _ "save_compression_desc^Large plain text files"
[/option]
[/advanced_preference]
[advanced_preference]
field=ask_delete
name= _ "Confirm deleting saves"
type=boolean
default=yes
[/advanced_preference]
[advanced_preference]
field=mouse_scrolling
name= _ "Mouse scrolling"
type=boolean
default=yes
[/advanced_preference]
[advanced_preference]
field=middle_click_scrolls
name= _ "Middle-click scrolling"
type=boolean
default=yes
[/advanced_preference]
[advanced_preference]
field=scroll_when_mouse_outside
name= _ "Keep scrolling when mouse leaves window"
type=boolean
default=yes
[/advanced_preference]
[advanced_preference]
field=local_tod_lighting
name= _ "Local time of day area lighting"
type=boolean
default=yes
[/advanced_preference]
[advanced_preference]
field=startup_effect
name= _ "Show titlescreen animation"
type=boolean
default=yes
[/advanced_preference]
[advanced_preference]
field=show_combat
name= _ "Show combat"
type=boolean
default=yes
[/advanced_preference]
[advanced_preference]
field=ping_timeout
name= _ "Ping timeout"
description= _ "Number of seconds to wait for a ping reply before timing out. Set to 0 to disable"
type=int
default=0
min=0
max=60
step=5
[/advanced_preference]
[advanced_preference]
field=lobby_whisper_friends_only
name= _ "Accept whispers from friends only"
type=boolean
default=no
[/advanced_preference]
[advanced_preference]
field=lobby_auto_open_whisper_windows
name= _ "Auto-open whisper windows in lobby"
type=boolean
default=yes
[/advanced_preference]
[advanced_preference]
field=lobby_playerlist_group_players
name= _ "Group players in lobby"
type=boolean
default=yes
[/advanced_preference]
[advanced_preference]
field=lobby_sounds
name= _ "Lobby sounds"
type=boolean
default=yes
[/advanced_preference]
[advanced_preference]
field=disable_notifications
name= _ "Disable notifications"
type=boolean
default=no
[/advanced_preference]
[advanced_preference]
field=flip_time
name= _ "Reverse time graphics"
description= _ "Choose whether the sun moves left-to-right or right-to-left"
type=boolean
default=no
[/advanced_preference]
[advanced_preference]
field=scroll_to_action
name= _ "Follow unit actions"
description= _ "Choose whether the map view should scroll to a unit when an action or move is animated"
type=boolean
default=yes
[/advanced_preference]
#[advanced_preference]
# field=dummy_slider
# name="Dummy Slider"
# type=int
# default=42
# min=0
# max=50
#[/advanced_preference]
[advanced_preference]
field=chat_message_aging
name= _ "Chat message aging"
description= _ "Number of minutes to wait before clearing an ingame chat message. Set to 0 to disable"
type=int
default=20
min=0
max=60
step=1
[/advanced_preference]
[advanced_preference]
field=use_twelve_hour_clock_format
name= _ "Use 12-hour clock format"
type=boolean
default=no
[/advanced_preference]
[advanced_preference]
field=confirm_load_save_from_different_version
name= _ "Confirm loading of saves from a different version"
type=boolean
default=yes
[/advanced_preference]
[advanced_preference]
field=show_all_units_in_help
name= _ "Show all unit types in help"
description= _ "Show all unit types in the help (requires restart). This does not alter the list of encountered units"
type=boolean
default=no
[/advanced_preference]
[advanced_preference]
field=new_lobby
name= _ "Experimental multiplayer lobby"
description= _ "Replace the classic multiplayer lobby with a newer, experimental interface"
type=boolean
default=no
[/advanced_preference]
#ifndef APPLE
[advanced_preference]
field=color_cursors
name= _ "Show color cursors"
description= _ "Use colored mouse cursors, which may be slower or break the game (use at your own risk)"
type=boolean
default=no
[/advanced_preference]
#endif
#ifdef __UNUSED__
[advanced_preference]
field=joystick_support_enabled
name= _ "Joystick support"
type=boolean
default=no
[/advanced_preference]
[advanced_preference]
field=joystick_num_scroll_xaxis
name= _ "Joystick: number of the scroll X-axis joystick"
type=int
default=0
min=-1
max=3
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_scroll_xaxis_num
name= _ "Joystick: number of the scroll X-axis"
type=int
default=0
min=0
max=7
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_num_scroll_yaxis
name= _ "Joystick: number of the scroll Y-axis joystick"
type=int
default=0
min=-1
max=3
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_scroll_yaxis_num
name= _ "Joystick: number of the scroll Y-axis"
type=int
default=1
min=0
max=7
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_scroll_deadzone
name= _ "Joystick: deadzone of the scrolling stick"
type=int
default=1500
min=0
max=16000
step=500
[/advanced_preference]
[advanced_preference]
field=joystick_num_cursor_xaxis
name= _ "Joystick: number of the cursor X-axis joystick"
type=int
default=0
min=-1
max=3
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_cursor_xaxis_num
name= _ "Joystick: number of the cursor X-axis"
type=int
default=3
min=0
max=7
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_num_cursor_yaxis
name= _ "Joystick: number of the cursor Y-axis joystick"
type=int
default=0
min=-1
max=3
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_cursor_yaxis_num
name= _ "Joystick: number of the cursor Y-axis"
type=int
default=4
min=-1
max=7
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_cursor_deadzone
name= _ "Joystick: deadzone of the cursor stick"
type=int
default=1500
min=0
max=16000
step=500
[/advanced_preference]
[advanced_preference]
field=joystick_num_mouse_xaxis
name= _ "Joystick: number of the mouse X-axis joystick"
type=int
default=-1
min=-1
max=3
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_mouse_xaxis_num
name= _ "Joystick: number of the mouse X-axis"
type=int
default=0
min=0
max=7
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_num_mouse_yaxis
name= _ "Joystick: number of the mouse Y-axis joystick"
type=int
default=-1
min=-1
max=3
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_mouse_yaxis_num
name= _ "Joystick: number of the mouse Y-axis"
type=int
default=1
min=0
max=7
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_mouse_deadzone
name= _ "Joystick: deadzone of the mouse stick"
type=int
default=1500
min=0
max=16000
step=500
[/advanced_preference]
[advanced_preference]
field=joystick_num_thrusta_axis
name= _ "Joystick: number of the thrust axis joystick"
type=int
default=0
min=-1
max=3
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_thrusta_axis_num
name= _ "Joystick: number of the thrust axis"
type=int
default=2
min=0
max=7
step=1
[/advanced_preference]
[advanced_preference]
field=joystick_thrusta_deadzone
name= _ "Joystick: deadzone of the thruster"
type=int
default=1500
min=0
max=16000
step=500
[/advanced_preference]
#endif