A bug, introduced in #576. If alignment isn't set in the config, the
settings would print a warning about an invalid value. But actually it's
just the default string, which can't get parsed.
The fallback value should get handled by a false return value and not by
the option_get_string's default value.
Changes all string parsers to have a the almost same interface while
also having a proper return value, which indicates success of the
parsing process.
Just recently, I started using g_return_val_if_fail as a brief assertion
checker. It'll also exit the function with a specified return value.
But actually this introduces some weird behavior. It's configurable by
environment variables and it'll print out a log message, if the
expression didn't validate properly. But some of these assertions are
actually ment to be silent.
Using a simple macro makes it simple to structure the assertions and its
return values in a block at the start of a function or anywhere else.
The xctx color field is a full duplicate of the settings logic.
Only logic included in xctx color fields, are the frame colors, which
fall back to the global frame setting. So, this required to handle it
directly in settings.c
Parsing the arguments with g_shell_parse_argv is more safe than just
splitting it by spaces. Also this allows to pass values with spaces to
the browser command.
* Move mouse_left/middle/right_click to global section
* Match the enum value style
* Ignore unknow mouse event
* Split copy-paste code into a function
* Fix typo
Change the value of geometry in settings from an unparsed string to a
struct containing the properly parsed geometry info. Since we depend on
X11 for geometry parsing this (unfortunately) introduces an X11
dependency on the settings module, this can only be resolved if we
implement our own parsing.
time(NULL) is vulnerable against timeshifts by NTP, timezones,...
g_get_monotonic_time() is not, but counts its in microseconds with the
gint64 datatype. To prevent any conversion bugs, all internal
timeformats are now using a gint64 and only get converted during import
or export (DBus notification arrives, configuration reading, age
threshold display).