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

view: Remove 'kinetic-mode' property

It doesn't seem to be useful enough to justify its existance, so just
remove it. Adapt the Vala demo to not use it too.
parent be067301
......@@ -43,7 +43,6 @@ public class Launcher : Gtk.Application {
/* Finish initialising the map view */
view.get_viewport ().zoom_level = 7;
view.kinetic_mode = true;
view.center_on (45.466, -73.75);
window.present ();
......
......@@ -81,8 +81,7 @@ enum
enum
{
PROP_KINETIC_MODE = 1,
PROP_ZOOM_ON_DOUBLE_CLICK,
PROP_ZOOM_ON_DOUBLE_CLICK = 1,
PROP_ANIMATE_ZOOM,
PROP_STATE,
PROP_GO_TO_DURATION,
......@@ -148,8 +147,6 @@ typedef struct
gboolean zoom_on_double_click;
gboolean animate_zoom;
gboolean kinetic_mode;
ShumateState state; /* View's global state */
// shumate_view_go_to's context, kept for stop_go_to
......@@ -621,10 +618,6 @@ shumate_view_get_property (GObject *object,
switch (prop_id)
{
case PROP_KINETIC_MODE:
g_value_set_boolean (value, priv->kinetic_mode);
break;
case PROP_ZOOM_ON_DOUBLE_CLICK:
g_value_set_boolean (value, priv->zoom_on_double_click);
break;
......@@ -657,10 +650,6 @@ shumate_view_set_property (GObject *object,
switch (prop_id)
{
case PROP_KINETIC_MODE:
shumate_view_set_kinetic_mode (view, g_value_get_boolean (value));
break;
case PROP_ZOOM_ON_DOUBLE_CLICK:
shumate_view_set_zoom_on_double_click (view, g_value_get_boolean (value));
break;
......@@ -740,18 +729,6 @@ shumate_view_class_init (ShumateViewClass *shumateViewClass)
object_class->get_property = shumate_view_get_property;
object_class->set_property = shumate_view_set_property;
/**
* ShumateView:kinetic-mode:
*
* Determines whether the view should use kinetic mode.
*/
obj_properties[PROP_KINETIC_MODE] =
g_param_spec_boolean ("kinetic-mode",
"Kinetic Mode",
"Determines whether the view should use kinetic mode.",
FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
/**
* ShumateView:zoom-on-double-click:
*
......@@ -883,7 +860,6 @@ shumate_view_init (ShumateView *view)
priv->viewport = shumate_viewport_new ();
priv->zoom_on_double_click = TRUE;
priv->animate_zoom = TRUE;
priv->kinetic_mode = FALSE;
priv->state = SHUMATE_STATE_NONE;
priv->goto_context = NULL;
priv->tiles_loading = 0;
......@@ -1154,26 +1130,6 @@ shumate_view_set_map_source (ShumateView *view,
shumate_viewport_set_reference_map_source (priv->viewport, source);
}
/**
* shumate_view_set_kinetic_mode:
* @view: a #ShumateView
* @kinetic: TRUE for kinetic mode, FALSE for push mode
*
* Determines the way the view reacts to scroll events.
*/
void
shumate_view_set_kinetic_mode (ShumateView *view,
gboolean kinetic)
{
ShumateViewPrivate *priv = shumate_view_get_instance_private (view);
g_return_if_fail (SHUMATE_IS_VIEW (view));
priv->kinetic_mode = kinetic;
//g_object_set (view->priv->kinetic_scroll, "mode", kinetic, NULL);
g_object_notify_by_pspec (G_OBJECT (view), obj_properties[PROP_KINETIC_MODE]);
}
/**
* shumate_view_set_zoom_on_double_click:
* @view: a #ShumateView
......@@ -1213,24 +1169,6 @@ shumate_view_set_animate_zoom (ShumateView *view,
g_object_notify_by_pspec (G_OBJECT (view), obj_properties[PROP_ANIMATE_ZOOM]);
}
/**
* shumate_view_get_kinetic_mode:
* @view: a #ShumateView
*
* Gets the view's scroll mode behaviour.
*
* Returns: TRUE for kinetic mode, FALSE for push mode.
*/
gboolean
shumate_view_get_kinetic_mode (ShumateView *view)
{
ShumateViewPrivate *priv = shumate_view_get_instance_private (view);
g_return_val_if_fail (SHUMATE_IS_VIEW (view), FALSE);
return priv->kinetic_mode;
}
/**
* shumate_view_get_zoom_on_double_click:
* @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_kinetic_mode (ShumateView *view,
gboolean kinetic);
void shumate_view_set_zoom_on_double_click (ShumateView *view,
gboolean value);
void shumate_view_set_animate_zoom (ShumateView *view,
......@@ -88,7 +86,6 @@ void shumate_view_add_layer (ShumateView *view,
void shumate_view_remove_layer (ShumateView *view,
ShumateLayer *layer);
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);
ShumateState shumate_view_get_state (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