g_clear_pointer (&priv->browse_files_popover, gtk_widget_destroy);
g_clear_object (&priv->extra_widget);
- remove_settings_signal (impl, gtk_widget_get_display (GTK_WIDGET (impl)));
g_clear_pointer (&priv->bookmarks_manager, _gtk_bookmarks_manager_free);
if (priv->external_entry && priv->location_entry == priv->external_entry)
priv->toplevel_current_focus_widget = NULL;
}
- remove_settings_signal (impl, gtk_widget_get_display (widget));
- check_icon_theme (impl);
-
GTK_WIDGET_CLASS (gtk_file_chooser_widget_parent_class)->unroot (widget);
}
}
}
+static void
+display_changed_cb (GtkWidget *wiget,
+ GParamSpec *pspec,
+ GtkFileChooserWidget *impl)
+{
+ remove_settings_signal (impl, gtk_widget_get_display (GTK_WIDGET (impl)));
+ check_icon_theme (impl);
+}
+
static void
gtk_file_chooser_widget_init (GtkFileChooserWidget *impl)
{
gtk_widget_init_template (GTK_WIDGET (impl));
gtk_widget_set_size_request (priv->browse_files_tree_view, 280, -1);
+ g_signal_connect (impl, "notify::display,", G_CALLBACK (display_changed_cb), impl);
+ check_icon_theme (impl);
+
set_file_system_backend (impl);
priv->bookmarks_manager = _gtk_bookmarks_manager_new (NULL, NULL);
*
* Note that this function can only be called when the #GtkWidget
* is attached to a toplevel, since the settings object is specific
- * to a particular #GdkDisplay.
+ * to a particular #GdkDisplay. If you want to monitor the widget for
+ * changes in its settings, connect to notify::display.
*
* Returns: (transfer none): the relevant #GtkSettings object
*/