[libshumate] view: Remove 'deceleration' property



commit be067301a80278331e9dde4494e617a00c5c4a25
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Mar 9 15:29:55 2021 -0300

    view: Remove 'deceleration' property
    
    It currently is stub, and it doesn't seem to be much useful either.
    
    Remove the 'deceleration' property.

 shumate/shumate-view.c | 66 +-------------------------------------------------
 shumate/shumate-view.h |  3 ---
 2 files changed, 1 insertion(+), 68 deletions(-)
---
diff --git a/shumate/shumate-view.c b/shumate/shumate-view.c
index 6e0bd73..1912ee0 100644
--- a/shumate/shumate-view.c
+++ b/shumate/shumate-view.c
@@ -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
diff --git a/shumate/shumate-view.h b/shumate/shumate-view.h
index 5e553b6..41f15bd 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_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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]