Set the Mac key theme when creating a Quartz settings object instead of
having it the default when quartz is enabled.
This keeps compatibility with the GTK2 behavior that the Mac key theme
is not used for the X11 backend, which could now happen for a
multi-backend build.
Previously we were enabling some settings properties only if the X11
backend was enabled. This worked fine with GTK2 where only one backend
was enabled at a time, but now when multiple backends can be enabled,
this does not make sense.
When loading a theme, make sure we take into account the variant
so we don't use the plain version when the theme changes.
Also make sure to fallback to the plain theme when loading a variant
fails.
https://bugzilla.gnome.org/show_bug.cgi?id=640983
This lets themes override settings values again. We are using
the same priority that was used from the rc file parser, so things
are largely unchanged, relative to other settings sources.
Move key file parsing to gtk_settings_load_from_key_file(), in
preparation for loading per-theme files. Load key files from both
/etc and ~/.config, with the latter overriding the former. Support
parsing enum values.
Most code in gtkrc.c has been turned into a no-op, but that one
reverting in public API (gtk_rc_scanner_new() and such). GtStyle
is also more shallow, now fully relies in the backing
GtkStyleContext and all connection to gtkrc.c has been removed.
GtkBinding has been also affected, there is no replacement yet
for custom keybindings in style files, so that piece of code that
hooked into gtkrc has been replaced by a FIXME so in the future
it may be added back.
Some GtkSettings property are registered by other classes. This leads
to the "interesting" issue that setting GtkSettings:gtk-button-images
requires that the GtkButton class is referenced first - or that a
GtkButton is created.
https://bugzilla.gnome.org/show_bug.cgi?id=632538
32K of border ought to be enough for any pixel dimensions. At least
until screens are so huge we start using doubles.
This saves a nice 64 bits of space when we have a GtkBorder
stored somewhere.
Signed integers are used to avoid surprising unsigned math
issues. Just search GTK's whole git log from inception
for "unsigned" if you want to find any number of commits
fixing signed/unsigned bugs.
https://bugzilla.gnome.org/show_bug.cgi?id=629387
Some types of applications would benefit from having "dark" themes,
usually black backgrounds, such as:
* Movie players
* Photo management and display applications
To make it easy for those applications to prefer a dark theme,
we're adding the "gtk-application-prefer-dark-theme" GtkSetting, which
will make the theme loading code automatically look for a "gtkrc-dark"
file in the same directory you would usually find a gtkrc file.
the same name and a "-dark" suffix.
If no "-dark" gtkrc variant is available, the normal gtkrc will
be used.
https://bugzilla.gnome.org/show_bug.cgi?id=617955
...and show them in menus when navigating the menu with the keyboard.
This is similar to what other platforms do, and reduces visual clutter.
There is a setting to control this. Most of the work on this patch was
done by Thomas Wood. See bug 588554.
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations. Merge those into the GTK source files.
Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.