diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c index dac07465b2..60c82da1f7 100644 --- a/gtk/gtkexpander.c +++ b/gtk/gtkexpander.c @@ -117,6 +117,7 @@ #define DEFAULT_EXPANDER_SIZE 10 #define DEFAULT_EXPANDER_SPACING 2 +#define TIMEOUT_EXPAND 500 enum { @@ -1144,13 +1145,7 @@ gtk_expander_drag_motion (GtkWidget *widget, if (!priv->expanded && !priv->expand_timer) { - GtkSettings *settings; - guint timeout; - - settings = gtk_widget_get_settings (widget); - g_object_get (settings, "gtk-timeout-expand", &timeout, NULL); - - priv->expand_timer = gdk_threads_add_timeout (timeout, (GSourceFunc) expand_timeout, expander); + priv->expand_timer = gdk_threads_add_timeout (TIMEOUT_EXPAND, (GSourceFunc) expand_timeout, expander); } return TRUE; diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index 5b59739cae..b548682ac3 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -104,6 +104,7 @@ #define EJECT_BUTTON_XPAD 6 #define ICON_CELL_XPAD 6 +#define TIMEOUT_EXPAND 500 #define DO_NOT_COMPILE 0 @@ -1470,23 +1471,17 @@ switch_location_timer (gpointer user_data) static void check_switch_location_timer (GtkPlacesSidebar *sidebar, const char *uri) { - GtkSettings *settings; - guint timeout; - if (g_strcmp0 (uri, sidebar->drop_target_uri) == 0) { return; } remove_switch_location_timer (sidebar); - settings = gtk_widget_get_settings (GTK_WIDGET (sidebar)); - g_object_get (settings, "gtk-timeout-expand", &timeout, NULL); - g_free (sidebar->drop_target_uri); sidebar->drop_target_uri = NULL; if (uri != NULL) { sidebar->drop_target_uri = g_strdup (uri); - sidebar->switch_location_timer = gdk_threads_add_timeout (timeout, switch_location_timer, sidebar); + sidebar->switch_location_timer = gdk_threads_add_timeout (TIMEOUT_EXPAND, switch_location_timer, sidebar); } } diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index e5d31c4a08..fadb39540b 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -694,12 +694,17 @@ gtk_settings_class_init (GtkSettingsClass *class) g_assert (result == PROP_TIMEOUT_REPEAT); + /** + * GtkSettings:gtk-timeout-expand: + * + * Deprecated: 3.10: This setting is ignored. + */ result = settings_install_property_parser (class, g_param_spec_int ("gtk-timeout-expand", P_("Expand timeout"), P_("Expand value for timeouts, when a widget is expanding a new region"), 0, G_MAXINT, DEFAULT_TIMEOUT_EXPAND, - GTK_PARAM_READWRITE), + GTK_PARAM_READWRITE | G_PARAM_DEPRECATED), NULL); g_assert (result == PROP_TIMEOUT_EXPAND);