Commit be067301 authored by Georges Basile Stavracas Neto's avatar Georges Basile Stavracas Neto
Browse files

view: Remove 'deceleration' property

It currently is stub, and it doesn't seem to be much useful either.

Remove the 'deceleration' property.
parent 61f35d43
......@@ -81,8 +81,7 @@ enum
enum
{
PROP_DECELERATION = 1,
PROP_KINETIC_MODE,
PROP_KINETIC_MODE = 1,
PROP_ZOOM_ON_DOUBLE_CLICK,
PROP_ANIMATE_ZOOM,
PROP_STATE,
......@@ -626,14 +625,6 @@ shumate_view_get_property (GObject *object,
g_value_set_boolean (value, priv->kinetic_mode);
break;
case PROP_DECELERATION:
{
double decel = 0.0;
//g_object_get (priv->kinetic_scroll, "deceleration", &decel, NULL);
g_value_set_double (value, decel);
break;
}
case PROP_ZOOM_ON_DOUBLE_CLICK:
g_value_set_boolean (value, priv->zoom_on_double_click);
break;
......@@ -670,10 +661,6 @@ shumate_view_set_property (GObject *object,
shumate_view_set_kinetic_mode (view, g_value_get_boolean (value));
break;
case PROP_DECELERATION:
shumate_view_set_deceleration (view, g_value_get_double (value));
break;
case PROP_ZOOM_ON_DOUBLE_CLICK:
shumate_view_set_zoom_on_double_click (view, g_value_get_boolean (value));
break;
......@@ -765,18 +752,6 @@ shumate_view_class_init (ShumateViewClass *shumateViewClass)
FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
/**
* ShumateView:deceleration:
*
* The deceleration rate for the kinetic mode. The default value is 1.1.
*/
obj_properties[PROP_DECELERATION] =
g_param_spec_double ("deceleration",
"Deceleration rate",
"Rate at which the view will decelerate in kinetic mode.",
1.0001, 2.0, 1.1,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
/**
* ShumateView:zoom-on-double-click:
*
......@@ -1179,26 +1154,6 @@ shumate_view_set_map_source (ShumateView *view,
shumate_viewport_set_reference_map_source (priv->viewport, source);
}
/**
* shumate_view_set_deceleration:
* @view: a #ShumateView
* @rate: a #double between 1.001 and 2.0
*
* The deceleration rate for the kinetic mode.
*/
void
shumate_view_set_deceleration (ShumateView *view,
double rate)
{
g_return_if_fail (SHUMATE_IS_VIEW (view));
g_return_if_fail (rate < 2.0 && rate > 1.0001);
//g_object_set (view->priv->kinetic_scroll, "decel-rate", rate, NULL);
g_object_notify_by_pspec (G_OBJECT (view), obj_properties[PROP_DECELERATION]);
}
/**
* shumate_view_set_kinetic_mode:
* @view: a #ShumateView
......@@ -1258,25 +1213,6 @@ shumate_view_set_animate_zoom (ShumateView *view,
g_object_notify_by_pspec (G_OBJECT (view), obj_properties[PROP_ANIMATE_ZOOM]);
}
/**
* shumate_view_get_deceleration:
* @view: a #ShumateView
*
* Gets the view's deceleration rate.
*
* Returns: the view's deceleration rate.
*/
double
shumate_view_get_deceleration (ShumateView *view)
{
g_return_val_if_fail (SHUMATE_IS_VIEW (view), 0.0);
double decel = 0.0;
//g_object_get (view->priv->kinetic_scroll, "decel-rate", &decel, NULL);
return decel;
}
/**
* shumate_view_get_kinetic_mode:
* @view: a #ShumateView
......
......@@ -77,8 +77,6 @@ void shumate_view_remove_overlay_source (ShumateView *view,
ShumateMapSource *map_source);
GList *shumate_view_get_overlay_sources (ShumateView *view);
void shumate_view_set_deceleration (ShumateView *view,
double rate);
void shumate_view_set_kinetic_mode (ShumateView *view,
gboolean kinetic);
void shumate_view_set_zoom_on_double_click (ShumateView *view,
......@@ -90,7 +88,6 @@ void shumate_view_add_layer (ShumateView *view,
void shumate_view_remove_layer (ShumateView *view,
ShumateLayer *layer);
double shumate_view_get_deceleration (ShumateView *view);
gboolean shumate_view_get_kinetic_mode (ShumateView *view);
gboolean shumate_view_get_zoom_on_double_click (ShumateView *view);
gboolean shumate_view_get_animate_zoom (ShumateView *view);
......
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