Fix some more strings marked for translation in the source code to be
more correct and easier to localize.
References #1071#1029
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This introduces a new INI config option called "IniVersion". Whenever
default values change or options are renmaed, the latest version number is
incremented and an update path is run.
This change also rewrites part of the initialization routine by adding
more safety checks before creating or reading the configuration file.
This removes the global accessors for individual options in favor of a
proxy template class with a simpler per-type API. This adds compile-time
checks to validate that the right option is used with the right type
when accessing it directly.
Fix some source strings in the source code that are marked for
translation to be more formally/grammatically correct and easier to
localize.
References #1029
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
* Clean-up ConfigManager options
Many of the options in ConfigManager were not actually used.
* Some options are only used by wx, they have been moved to gopts. In
addition, the type of the option has been changed to "bool" when
applicable.
* Some options are only used by SDL and do not have a corresponding
configuration option, they have been moved to the SDL implementation.
* Some options are not used at all, they have been removed.
Move ru.po to ru_RU.po because it is the more complete translation, and
the latter is checked first.
Fix#1057
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This reverts commit 1ac7ac999b.
The %% sequence turned out to not be dealt with specially by gettext
tools.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add a few translation markers for strings that are translated in the
wxWidgets catalogs, which we do not pull yet.
Also change the string "% of normal:" to "percent of normal:" because
the percent sign was causing an error in poedit.
Fix#1029.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
* Add convenience direct accessors to individual Options.
* Move BasicOptionObserver to a separate header and allow it to
observer multiple options. This also removes the include for
"config/option.h" for using this observer, reducing build time.
* Never skip the "Plugin" option when changing filters. This is
already handled properly in the GameArea class. If the plugin is
unusable, GameArea resets the filter to the default value.
* Make the OptionID names slightly less long and fix the inconsistent
naming in the enum.
This adds a generic Observer interface to config::Option. To
demonstrate its intended usage, the Display Configuration dialog and
the options it controls have been updated to be entirely handled via
the config::Option class.
Implementations for wxValidator are used to validate the flow between
the UI and the underlying Option. In turn, modifying the Option value
triggers all of its observers that should then do what they need to
do.
Rather than explicitly calling all of the needed methods after
modifying a global option value, the UI elements that need to be
notified when an Option value is modified will be notified via their
observers. Runtime assert checks are put in place to prevent infinite
recursion if an observer attempts to modify an Option while handling
the observer callback.
Once all uses of Options have been updated, we should get into a state
where the following will be true:
* cmdevents.cpp will no longer rely on the application state.
* All dialogs will have been moved to specific implementations,
reducing the size of guiinit.cpp
* update_opts() will no longer need to be called and will be removed.
This will then make it easier to update accelerator handling to be
done with config::UserInput.
Bug: #745
Add support for `eglSwapInterval()` to enable or disable VSync on
Wayland.
Also add status messages for enabling or disabling VSync, for both EGL
and GLX.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>