From c6f49f994fe25b94396232e40f7d5d9cb3d0509a Mon Sep 17 00:00:00 2001 From: "Alejandro G. Castro" Date: Fri, 22 May 2009 11:22:03 +0200 Subject: [PATCH] Added code to sync the gtk dnd threshold with the panning threshold. * hildon/hildon-pannable-area.c, (hildon_pannable_area_set_property): Added code to sync the gtk dnd threshold with the panning threshold. --- ChangeLog | 6 ++++++ hildon/hildon-pannable-area.c | 15 ++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c81e175..3f35ecd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ 2009-05-25 Alejandro G. Castro * hildon/hildon-pannable-area.c, + (hildon_pannable_area_set_property): Added code to sync the gtk + dnd threshold with the panning threshold. + +2009-05-25 Alejandro G. Castro + + * hildon/hildon-pannable-area.c, (hildon_pannable_area_class_init): Changed some of the default values, now it should be less responsive and more accurate. diff --git a/hildon/hildon-pannable-area.c b/hildon/hildon-pannable-area.c index 450b2fa..230f4c7 100644 --- a/hildon/hildon-pannable-area.c +++ b/hildon/hildon-pannable-area.c @@ -824,7 +824,20 @@ hildon_pannable_area_set_property (GObject * object, priv->sps = g_value_get_uint (value); break; case PROP_PANNING_THRESHOLD: - priv->panning_threshold = g_value_get_uint (value); + { + GtkSettings *settings = gtk_settings_get_default (); + GtkSettingsValue svalue = { NULL, { 0, }, }; + + priv->panning_threshold = g_value_get_uint (value); + + /* insure gtk dnd is the same we are using, not allowed + different thresholds in the same application */ + svalue.origin = "panning_threshold"; + g_value_init (&svalue.value, G_TYPE_LONG); + g_value_set_long (&svalue.value, priv->panning_threshold); + gtk_settings_set_property_value (settings, "gtk-dnd-drag-threshold", &svalue); + g_value_unset (&svalue.value); + } break; case PROP_SCROLLBAR_FADE_DELAY: /* convert to miliseconds */ -- 1.7.9.5