The frame and experimental sections are currently used for some settings
related to frame colour and experimental features respectively and as
such should not be parsed as rules.
Make every setting be overridable from the command line using
-setting_name. Previously, some settings had shortened command line
flags (e.g. -fn instead of -font) which made the command line arguments
confusing.
Calculating the screen dpi on a per-monitor basis can cause
inconsistencies if multiple monitors with slightly different dpis are
used and in some cases it might not be the expected behaviour.
As such, the per-monitor dpi calculation was changed from a default
fallback to an opt in experimental feature and the default value of 96
will be used for the dpi if Xft.dpi is not set.
In the future, depending on how we decide to continue, we can either
move this setting in the global configuration section and fall back to
the X11 display dpi as the default or simply always use the per-monitor
dpi calculation. But to preserve backwards compatibility, this decision
can wait until the next major release.
When checking for the markup value in rules, an empty string was
specified as the default value so it can easily be checked if the actual
config value was empty or not. While that string got strdup'ed in the
ini_get_string call, it was only freed if the length > 0, effectively
leaking a tiny amount of memory.
Change that behaviour to use a NULL check instead to avoid leaking
memory.
string_to_argv parsing was very simplistic and didn't properly handle
quotations. Since we are already using glib, g_shell_parse_argv serves
the same purpose with much better parsing and error handling.
Merge the allow_markup and plain_text settings into a single setting.
These 2 settings had a similar function, allow_markup controlled whether
markup was parsed or stripped and plain_text whether the notification
was escaped and displayed as is.
To cover all the possible combinations of the settings mentioned above
`markup` can take the following values:
full: The equivalent of allow_markup yes, plain_text no.
Passes the text straight to pango with minimal parsing. All valid
pango tags will be parsed.
strip: The equivalent of allow_markup no, plain_text no.
Strips the markup using string_strip_delimited. The parsing is
simplistic and if there are any unescaped '<' and/or '>'
characters it might get tripped and strip out actual text.
According to the GNOME notification specification, if a server
doesn't support markup(and we don't advertise that we do if it is
turned off) it should be stripped clientside, so this setting
should rarely be used. It is mainly left in for compatibility
with broken clients that don't follow the specification.
no: The equivalent of allow_markup [yes/no](any value), plain_text
yes.
Makes the notification content be rendered as plain text
regardless if it contains markup. Any Markup will be shown as
regular text.
Markup inside 'format' will still be parsed regardless of what markup is
set to.
Closes#279