Skip to content

Allow Mac users to select the key theme name

John Ralls requested to merge jralls/gtk:mac-key-theme into gtk-3-24

When GDK_IS_QUARTZ_DISPLAY is true gtk_settings_create_for_display passes "gtk-key-theme-name", "Mac" as a property to g_object_new for creating the settings object. This cannot be replaced from any settings.ini for two reasons: The settings.ini files are processed in gtk_settings_init before g_object_new processes the passed-in properties and properties are set with GTK_SETTINGS_SOURCE_APPLICATION, the highest source priority, while the contents of settings.ini files are set with GTK_SETTINGS_SOURCE_DEFAULT, the lowest.

This MR extracts the settings.ini loading into a new static function settings_load_from_init_files and calls that from gtk_settings_create_for_display after settings object initialization to resolve the first obstacle and adds another static function set_default_theme_property that sets "gtk-key-theme-name" with GTK_SETTINGS_SOURCE_DEFAULT, called from gtk_settings_create_for_display immediately after initializing the settings object for Quartz.

Merge request reports