[libchamplain] Rename *movable* to *draggable*



commit 2117765bdf5703d101b4ab980014c97d1b4dd0cb
Author: JiÅ?í Techet <techet gmail com>
Date:   Thu Feb 10 22:08:56 2011 +0100

    Rename *movable* to *draggable*
    
    To make it clear the movement is made by mouse.

 champlain/champlain-marker-layer.c |   16 +++++-----
 champlain/champlain-marker-layer.h |    4 +-
 champlain/champlain-marker.c       |   52 ++++++++++++++++++------------------
 champlain/champlain-marker.h       |    4 +-
 demos/markers.c                    |    2 +-
 5 files changed, 39 insertions(+), 39 deletions(-)
---
diff --git a/champlain/champlain-marker-layer.c b/champlain/champlain-marker-layer.c
index cb80750..3587693 100644
--- a/champlain/champlain-marker-layer.c
+++ b/champlain/champlain-marker-layer.c
@@ -894,15 +894,15 @@ champlain_marker_layer_hide_all_markers (ChamplainMarkerLayer *layer)
 
 
 /**
- * champlain_marker_layer_set_all_markers_movable:
+ * champlain_marker_layer_set_all_markers_draggable:
  * @layer: a #ChamplainMarkerLayer
  *
- * Sets all markers movable
+ * Sets all markers draggable
  *
  * Since: 0.10
  */
 void
-champlain_marker_layer_set_all_markers_movable (ChamplainMarkerLayer *layer)
+champlain_marker_layer_set_all_markers_draggable (ChamplainMarkerLayer *layer)
 {
   ChamplainMarkerLayerPrivate *priv = GET_PRIVATE (layer);
   GList *elem;
@@ -913,21 +913,21 @@ champlain_marker_layer_set_all_markers_movable (ChamplainMarkerLayer *layer)
     {
       ChamplainMarker *marker = CHAMPLAIN_MARKER (elem->data);
 
-      champlain_marker_set_movable (marker, TRUE);
+      champlain_marker_set_draggable (marker, TRUE);
     }
 }
 
 
 /**
- * champlain_marker_layer_set_all_markers_unmovable:
+ * champlain_marker_layer_set_all_markers_undraggable:
  * @layer: a #ChamplainMarkerLayer
  *
- * Sets all markers unmovable
+ * Sets all markers undraggable
  *
  * Since: 0.10
  */
 void
-champlain_marker_layer_set_all_markers_unmovable (ChamplainMarkerLayer *layer)
+champlain_marker_layer_set_all_markers_undraggable (ChamplainMarkerLayer *layer)
 {
   ChamplainMarkerLayerPrivate *priv = GET_PRIVATE (layer);
   GList *elem;
@@ -938,7 +938,7 @@ champlain_marker_layer_set_all_markers_unmovable (ChamplainMarkerLayer *layer)
     {
       ChamplainMarker *marker = CHAMPLAIN_MARKER (elem->data);
 
-      champlain_marker_set_movable (marker, FALSE);
+      champlain_marker_set_draggable (marker, FALSE);
     }
 }
 
diff --git a/champlain/champlain-marker-layer.h b/champlain/champlain-marker-layer.h
index 73724d3..0562e50 100644
--- a/champlain/champlain-marker-layer.h
+++ b/champlain/champlain-marker-layer.h
@@ -102,8 +102,8 @@ void champlain_marker_layer_animate_out_all_markers (ChamplainMarkerLayer *layer
 void champlain_marker_layer_show_all_markers (ChamplainMarkerLayer *layer);
 void champlain_marker_layer_hide_all_markers (ChamplainMarkerLayer *layer);
 
-void champlain_marker_layer_set_all_markers_movable (ChamplainMarkerLayer *layer);
-void champlain_marker_layer_set_all_markers_unmovable (ChamplainMarkerLayer *layer);
+void champlain_marker_layer_set_all_markers_draggable (ChamplainMarkerLayer *layer);
+void champlain_marker_layer_set_all_markers_undraggable (ChamplainMarkerLayer *layer);
 
 void champlain_marker_layer_select_all_markers (ChamplainMarkerLayer *layer);
 void champlain_marker_layer_unselect_all_markers (ChamplainMarkerLayer *layer);
diff --git a/champlain/champlain-marker.c b/champlain/champlain-marker.c
index 586942e..df90e38 100644
--- a/champlain/champlain-marker.c
+++ b/champlain/champlain-marker.c
@@ -67,7 +67,7 @@ enum
   PROP_LATITUDE,
   PROP_SELECTED,
   PROP_SELECTABLE,
-  PROP_MOVABLE,
+  PROP_DRAGGABLE,
 };
 
 /* static guint champlain_marker_signals[LAST_SIGNAL] = { 0, }; */
@@ -83,7 +83,7 @@ struct _ChamplainMarkerPrivate
   gdouble lat;
   gboolean selected;
   gboolean selectable;
-  gboolean movable;
+  gboolean draggable;
   
   gfloat click_x;
   gfloat click_y;
@@ -116,8 +116,8 @@ champlain_marker_get_property (GObject *object,
       g_value_set_boolean (value, priv->selectable);
       break;
       
-    case PROP_MOVABLE:
-      g_value_set_boolean (value, priv->movable);
+    case PROP_DRAGGABLE:
+      g_value_set_boolean (value, priv->draggable);
       break;
       
     default:
@@ -165,10 +165,10 @@ champlain_marker_set_property (GObject *object,
       break;
     }
 
-    case PROP_MOVABLE:
+    case PROP_DRAGGABLE:
     {
       gboolean bvalue = g_value_get_boolean (value);
-      champlain_marker_set_movable (marker, bvalue);
+      champlain_marker_set_draggable (marker, bvalue);
       break;
     }
 
@@ -236,7 +236,7 @@ champlain_marker_class_init (ChamplainMarkerClass *marker_class)
    */
   g_object_class_install_property (object_class, PROP_SELECTED,
       g_param_spec_boolean ("selected", "Selected",
-          "The sighlighted stated of the marker",
+          "The sighlighted state of the marker",
           FALSE, CHAMPLAIN_PARAM_READWRITE));
           
   /**
@@ -248,19 +248,19 @@ champlain_marker_class_init (ChamplainMarkerClass *marker_class)
    */
   g_object_class_install_property (object_class, PROP_SELECTABLE,
       g_param_spec_boolean ("selectable", "Selectable",
-          "The movable stated of the marker",
+          "The draggable state of the marker",
           FALSE, CHAMPLAIN_PARAM_READWRITE));
 
   /**
-   * ChamplainMarker:movable:
+   * ChamplainMarker:draggable:
    *
-   * The movable state of the marker
+   * The draggable state of the marker
    *
    * Since: 0.10
    */
-  g_object_class_install_property (object_class, PROP_MOVABLE,
-      g_param_spec_boolean ("movable", "Movable",
-          "The movable state of the marker",
+  g_object_class_install_property (object_class, PROP_DRAGGABLE,
+      g_param_spec_boolean ("draggable", "Draggable",
+          "The draggable state of the marker",
           FALSE, CHAMPLAIN_PARAM_READWRITE));
 
   /**
@@ -377,7 +377,7 @@ button_press_event_cb (ClutterActor        *actor,
   if (clutter_actor_transform_stage_point (actor, bevent->x, bevent->y,
                                            &priv->click_x, &priv->click_y))
     {
-      if (priv->movable) 
+      if (priv->draggable) 
         {
           g_signal_connect (stage,
                             "captured-event",
@@ -414,7 +414,7 @@ champlain_marker_init (ChamplainMarker *marker)
   priv->lon = 0;
   priv->selected = FALSE;
   priv->selectable = TRUE;
-  priv->movable = FALSE;
+  priv->draggable = FALSE;
   
   clutter_actor_set_reactive (CLUTTER_ACTOR (marker), TRUE);
   
@@ -571,42 +571,42 @@ champlain_marker_get_selectable (ChamplainMarker *marker)
 }
 
 /**
- * champlain_marker_set_movable:
+ * champlain_marker_set_draggable:
  * @marker: a #ChamplainMarker
- * @value: the movable state
+ * @value: the draggable state
  *
- * Sets the marker as movable or not. 
+ * Sets the marker as draggable or not. 
  *
  * Since: 0.10
  */
 void
-champlain_marker_set_movable (ChamplainMarker *marker,
+champlain_marker_set_draggable (ChamplainMarker *marker,
     gboolean value)
 {
   g_return_if_fail (CHAMPLAIN_IS_MARKER (marker));
 
-  marker->priv->movable = value;
+  marker->priv->draggable = value;
 
-  g_object_notify (G_OBJECT (marker), "movable");
+  g_object_notify (G_OBJECT (marker), "draggable");
 }
 
 
 /**
- * champlain_marker_get_movable:
+ * champlain_marker_get_draggable:
  * @marker: a #ChamplainMarker
  *
- * Checks whether the marker is movable.
+ * Checks whether the marker is draggable.
  *
- * Returns: the movable or not state of the marker.
+ * Returns: the draggable or not state of the marker.
  *
  * Since: 0.10
  */
 gboolean
-champlain_marker_get_movable (ChamplainMarker *marker)
+champlain_marker_get_draggable (ChamplainMarker *marker)
 {
   g_return_val_if_fail (CHAMPLAIN_IS_MARKER (marker), FALSE);
 
-  return marker->priv->movable;
+  return marker->priv->draggable;
 }
 
 /**
diff --git a/champlain/champlain-marker.h b/champlain/champlain-marker.h
index e2255a1..9cd7472 100644
--- a/champlain/champlain-marker.h
+++ b/champlain/champlain-marker.h
@@ -79,9 +79,9 @@ void champlain_marker_set_selectable (ChamplainMarker *marker,
     gboolean value);
 gboolean champlain_marker_get_selectable (ChamplainMarker *marker);
 
-void champlain_marker_set_movable (ChamplainMarker *marker,
+void champlain_marker_set_draggable (ChamplainMarker *marker,
     gboolean value);
-gboolean champlain_marker_get_movable (ChamplainMarker *marker);
+gboolean champlain_marker_get_draggable (ChamplainMarker *marker);
 
 void champlain_marker_set_selected (ChamplainMarker *marker,
     gboolean value);
diff --git a/demos/markers.c b/demos/markers.c
index df3a064..bcd0b2a 100644
--- a/demos/markers.c
+++ b/demos/markers.c
@@ -62,7 +62,7 @@ create_marker_layer (G_GNUC_UNUSED ChamplainView *view)
       -71.918907);
   champlain_marker_layer_add_marker (layer, CHAMPLAIN_MARKER (marker));
   
-  champlain_marker_layer_set_all_markers_movable (layer);
+  champlain_marker_layer_set_all_markers_draggable (layer);
 
   clutter_actor_show (layer_actor);
   return layer;



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