Commit 8e62cee0 authored by Matthias Clasen's avatar Matthias Clasen

Add a few settings getters

parent 4151b671
......@@ -3475,3 +3475,37 @@ gtk_settings_reset_property (GtkSettings *settings,
priv->property_values[pspec->param_id - 1].source = GTK_SETTINGS_SOURCE_DEFAULT;
g_object_notify_by_pspec (G_OBJECT (settings), pspec);
}
gboolean
gtk_settings_get_enable_animations (GtkSettings *settings)
{
GtkSettingsPrivate *priv = settings->priv;
GtkSettingsPropertyValue *svalue = &priv->property_values[PROP_ENABLE_ANIMATIONS - 1];
if (svalue->source < GTK_SETTINGS_SOURCE_XSETTING)
{
GParamSpec *pspec;
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (settings), "gtk-enable-animations");
settings_update_xsetting (settings, pspec, FALSE);
}
return g_value_get_boolean (&svalue->value);
}
gint
gtk_settings_get_dnd_drag_threshold (GtkSettings *settings)
{
GtkSettingsPrivate *priv = settings->priv;
GtkSettingsPropertyValue *svalue = &priv->property_values[PROP_DND_DRAG_THRESHOLD - 1];
if (svalue->source < GTK_SETTINGS_SOURCE_XSETTING)
{
GParamSpec *pspec;
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (settings), "gtk-dnd-drag-threshold");
settings_update_xsetting (settings, pspec, FALSE);
}
return g_value_get_int (&svalue->value);
}
......@@ -52,6 +52,9 @@ typedef enum
GtkSettingsSource _gtk_settings_get_setting_source (GtkSettings *settings,
const gchar *name);
gboolean gtk_settings_get_enable_animations (GtkSettings *settings);
gint gtk_settings_get_dnd_drag_threshold (GtkSettings *settings);
G_END_DECLS
#endif /* __GTK_SETTINGS_PRIVATE_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment