From: Matthias Clasen Date: Tue, 17 Jan 2023 13:30:37 +0000 (-0500) Subject: settings: Drop object_list X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~8^2~54^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=af088d5e11ebc23aa56952268df4a8d37c3e70ba;p=gtk4.git settings: Drop object_list This code came from a time when we were installing additional settings at runtime. We no longer do that, so this code is unnecessary. --- diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index a547f9a086..2793b8bb1d 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -238,7 +238,6 @@ static void settings_update_provider (GdkDisplay *display /* --- variables --- */ static GQuark quark_gtk_settings = 0; -static GSList *object_list = NULL; static guint class_n_properties = 0; static GPtrArray *display_settings; @@ -259,7 +258,6 @@ gtk_settings_init (GtkSettings *settings) const char * const *config_dirs; g_datalist_init (&settings->queued_settings); - object_list = g_slist_prepend (object_list, settings); settings->style_cascades = g_slist_prepend (NULL, _gtk_style_cascade_new ()); settings->theme_provider = gtk_css_provider_new (); @@ -1074,8 +1072,6 @@ gtk_settings_finalize (GObject *object) GtkSettings *settings = GTK_SETTINGS (object); guint i; - object_list = g_slist_remove (object_list, settings); - for (i = 0; i < class_n_properties; i++) g_value_unset (&settings->property_values[i].value); g_free (settings->property_values); @@ -1435,8 +1431,6 @@ static guint settings_install_property_parser (GtkSettingsClass *class, GParamSpec *pspec) { - GSList *node, *next; - switch (G_TYPE_FUNDAMENTAL (G_PARAM_SPEC_VALUE_TYPE (pspec))) { case G_TYPE_BOOLEAN: @@ -1464,34 +1458,8 @@ settings_install_property_parser (GtkSettingsClass *class, return 0; } - for (node = object_list; node; node = node->next) - g_object_freeze_notify (node->data); - g_object_class_install_property (G_OBJECT_CLASS (class), ++class_n_properties, pspec); - for (node = object_list; node; node = node->next) - { - GtkSettings *settings = node->data; - GtkSettingsValue *qvalue; - - settings->property_values = g_renew (GtkSettingsPropertyValue, settings->property_values, class_n_properties); - settings->property_values[class_n_properties - 1].value.g_type = 0; - g_value_init (&settings->property_values[class_n_properties - 1].value, G_PARAM_SPEC_VALUE_TYPE (pspec)); - g_param_value_set_default (pspec, &settings->property_values[class_n_properties - 1].value); - settings->property_values[class_n_properties - 1].source = GTK_SETTINGS_SOURCE_DEFAULT; - g_object_notify_by_pspec (G_OBJECT (settings), pspec); - - qvalue = g_datalist_id_dup_data (&settings->queued_settings, g_param_spec_get_name_quark (pspec), NULL, NULL); - if (qvalue) - apply_queued_setting (settings, pspec, qvalue); - } - - for (node = object_list; node; node = next) - { - next = node->next; - g_object_thaw_notify (node->data); - } - return class_n_properties; }