[libshumate] view: Remove 'kinetic-mode' property
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libshumate] view: Remove 'kinetic-mode' property
- Date: Tue, 9 Mar 2021 19:35:57 +0000 (UTC)
commit 84a5100bce7000190540b82aad9dc77e58d1d20e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Mar 9 15:36:56 2021 -0300
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.
demos/launcher-vala.vala | 1 -
shumate/shumate-view.c | 64 +-----------------------------------------------
shumate/shumate-view.h | 3 ---
3 files changed, 1 insertion(+), 67 deletions(-)
---
diff --git a/demos/launcher-vala.vala b/demos/launcher-vala.vala
index a10f37c..1424eae 100644
--- a/demos/launcher-vala.vala
+++ b/demos/launcher-vala.vala
@@ -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 ();
diff --git a/shumate/shumate-view.c b/shumate/shumate-view.c
index 1912ee0..57fbb4d 100644
--- a/shumate/shumate-view.c
+++ b/shumate/shumate-view.c
@@ -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
diff --git a/shumate/shumate-view.h b/shumate/shumate-view.h
index 41f15bd..8e8ea36 100644
--- a/shumate/shumate-view.h
+++ b/shumate/shumate-view.h
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]