forked from AuroraMiddleware/gtk
Deprecate and ignore timeout-expand setting
This commit is contained in:
parent
57fc8763e9
commit
dae6afc847
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user