[libchamplain] Rename champlain_location_set_position to champlain_location_set_location()



commit 9d4a6c19c12e964bf5a0d13292151a44924b5df6
Author: JiÅ?í Techet <techet gmail com>
Date:   Thu Feb 17 22:34:55 2011 +0100

    Rename champlain_location_set_position to champlain_location_set_location()
    
    There's a clash of clutter_actor_set_position() and this
    function in bindings because the prefix of both functions gets
    removed and they appear to be identical.

 champlain/champlain-coordinate.c         |   10 +++++-----
 champlain/champlain-label.c              |    2 +-
 champlain/champlain-location.c           |    6 +++---
 champlain/champlain-location.h           |    6 +++---
 champlain/champlain-marker-layer.c       |    2 +-
 champlain/champlain-marker.c             |   12 ++++++------
 demos/animated-marker.c                  |    2 +-
 demos/markers.c                          |   10 +++++-----
 demos/url-marker.c                       |    2 +-
 docs/reference/libchamplain-sections.txt |    2 +-
 10 files changed, 27 insertions(+), 27 deletions(-)
---
diff --git a/champlain/champlain-coordinate.c b/champlain/champlain-coordinate.c
index 5def650..dd0dba0 100644
--- a/champlain/champlain-coordinate.c
+++ b/champlain/champlain-coordinate.c
@@ -38,7 +38,7 @@ enum
 };
 
 
-static void set_position (ChamplainLocation *location,
+static void set_location (ChamplainLocation *location,
     gdouble latitude,
     gdouble longitude);
 static gdouble get_latitude (ChamplainLocation *location);
@@ -98,14 +98,14 @@ champlain_coordinate_set_property (GObject *object,
     case PROP_LONGITUDE:
     {
       gdouble lon = g_value_get_double (value);
-      set_position (CHAMPLAIN_LOCATION (coordinate), priv->lat, lon);
+      set_location (CHAMPLAIN_LOCATION (coordinate), priv->lat, lon);
       break;
     }
 
     case PROP_LATITUDE:
     {
       gdouble lat = g_value_get_double (value);
-      set_position (CHAMPLAIN_LOCATION (coordinate), lat, priv->lon);
+      set_location (CHAMPLAIN_LOCATION (coordinate), lat, priv->lon);
       break;
     }
 
@@ -116,7 +116,7 @@ champlain_coordinate_set_property (GObject *object,
 
 
 static void
-set_position (ChamplainLocation *location,
+set_location (ChamplainLocation *location,
     gdouble latitude,
     gdouble longitude)
 {
@@ -159,7 +159,7 @@ location_interface_init (ChamplainLocationIface *iface)
 {
   iface->get_latitude = get_latitude;
   iface->get_longitude = get_longitude;
-  iface->set_position = set_position;
+  iface->set_location = set_location;
 }
 
 
diff --git a/champlain/champlain-label.c b/champlain/champlain-label.c
index e737227..1e4ad7c 100644
--- a/champlain/champlain-label.c
+++ b/champlain/champlain-label.c
@@ -26,7 +26,7 @@
  *
  * A marker is nothing more than a regular #ClutterActor.  You can draw on it
  * what ever you want. Set the markers position on the map
- * using #champlain_location_set_position.
+ * using #champlain_location_set_location.
  *
  * Champlain has a default type of markers with text. To create one,
  * use #champlain_label_new_with_text.
diff --git a/champlain/champlain-location.c b/champlain/champlain-location.c
index ad1acc2..1a8c38f 100644
--- a/champlain/champlain-location.c
+++ b/champlain/champlain-location.c
@@ -61,7 +61,7 @@ champlain_location_default_init (ChamplainLocationInterface *iface)
 
 
 /**
- * champlain_location_set_position:
+ * champlain_location_set_location:
  * @location: a #ChamplainLocation
  * @latitude: the latitude
  * @longitude: the longitude
@@ -71,11 +71,11 @@ champlain_location_default_init (ChamplainLocationInterface *iface)
  * Since: 0.10
  */
 void 
-champlain_location_set_position (ChamplainLocation *location,
+champlain_location_set_location (ChamplainLocation *location,
     gdouble latitude,
     gdouble longitude)
 {
-  CHAMPLAIN_LOCATION_GET_IFACE (location)->set_position (location,
+  CHAMPLAIN_LOCATION_GET_IFACE (location)->set_location (location,
                                                          latitude,
                                                          longitude);
 }
diff --git a/champlain/champlain-location.h b/champlain/champlain-location.h
index 96bc8f7..b9f61f6 100644
--- a/champlain/champlain-location.h
+++ b/champlain/champlain-location.h
@@ -45,7 +45,7 @@ typedef struct _ChamplainLocationIface ChamplainLocationIface;
  * ChamplainLocationIface:
  * @get_latitude: virtual function for obtaining latitude.
  * @get_longitude: virtual function for obtaining longitude.
- * @set_position: virtual function for setting position.
+ * @set_location: virtual function for setting position.
  * 
  * An interface common to objects having latitude and longitude.
  */
@@ -57,14 +57,14 @@ struct _ChamplainLocationIface
   /*< public >*/
   gdouble (* get_latitude) (ChamplainLocation *location);
   gdouble (* get_longitude) (ChamplainLocation *location);
-  void (* set_position) (ChamplainLocation *location,
+  void (* set_location) (ChamplainLocation *location,
     gdouble latitude,
     gdouble longitude);
 };
 
 GType champlain_location_get_type (void) G_GNUC_CONST;
 
-void champlain_location_set_position (ChamplainLocation *location,
+void champlain_location_set_location (ChamplainLocation *location,
     gdouble latitude,
     gdouble longitude);
 gdouble champlain_location_get_latitude (ChamplainLocation *location);
diff --git a/champlain/champlain-marker-layer.c b/champlain/champlain-marker-layer.c
index 1d8b632..1ddfa45 100644
--- a/champlain/champlain-marker-layer.c
+++ b/champlain/champlain-marker-layer.c
@@ -411,7 +411,7 @@ marker_move_by_cb (ChamplainMarker *marker,
   lon = champlain_view_x_to_longitude (view, x);
   lat = champlain_view_y_to_latitude (view, y);
     
-  champlain_location_set_position (CHAMPLAIN_LOCATION (marker), lat, lon);
+  champlain_location_set_location (CHAMPLAIN_LOCATION (marker), lat, lon);
 }
 
 
diff --git a/champlain/champlain-marker.c b/champlain/champlain-marker.c
index f354f20..8980fba 100644
--- a/champlain/champlain-marker.c
+++ b/champlain/champlain-marker.c
@@ -27,7 +27,7 @@
  *
  * A marker is nothing more than a regular #clutteractor. You can draw on
  * it what ever you want.  Set the markers position
- * on the map using #champlain_location_set_position.
+ * on the map using #champlain_location_set_location.
  *
  * This is a base abstract class of all markers. libchamplain has a more evoluted
  * type of markers with text and image support. See #ChamplainLabel for more details.
@@ -76,7 +76,7 @@ enum
 
 /* static guint champlain_marker_signals[LAST_SIGNAL] = { 0, }; */
 
-static void set_position (ChamplainLocation *location,
+static void set_location (ChamplainLocation *location,
     gdouble latitude,
     gdouble longitude);
 static gdouble get_latitude (ChamplainLocation *location);
@@ -225,14 +225,14 @@ champlain_marker_set_property (GObject *object,
     case PROP_LONGITUDE:
     {
       gdouble lon = g_value_get_double (value);
-      set_position (CHAMPLAIN_LOCATION (marker), priv->lat, lon);
+      set_location (CHAMPLAIN_LOCATION (marker), priv->lat, lon);
       break;
     }
 
     case PROP_LATITUDE:
     {
       gdouble lat = g_value_get_double (value);
-      set_position (CHAMPLAIN_LOCATION (marker), lat, priv->lon);
+      set_location (CHAMPLAIN_LOCATION (marker), lat, priv->lon);
       break;
     }
 
@@ -264,7 +264,7 @@ champlain_marker_set_property (GObject *object,
 
 
 static void
-set_position (ChamplainLocation *location,
+set_location (ChamplainLocation *location,
     gdouble latitude,
     gdouble longitude)
 {
@@ -307,7 +307,7 @@ location_interface_init (ChamplainLocationIface *iface)
 {
   iface->get_latitude = get_latitude;
   iface->get_longitude = get_longitude;
-  iface->set_position = set_position;
+  iface->set_location = set_location;
 }
 
 
diff --git a/demos/animated-marker.c b/demos/animated-marker.c
index a87dc48..22660bd 100644
--- a/demos/animated-marker.c
+++ b/demos/animated-marker.c
@@ -111,7 +111,7 @@ gps_callback (GpsCallbackData *data)
   lat += 0.005;
   lon += 0.005;
   champlain_view_center_on (data->view, lat, lon);
-  champlain_location_set_position (CHAMPLAIN_LOCATION (data->marker), lat, lon);
+  champlain_location_set_location (CHAMPLAIN_LOCATION (data->marker), lat, lon);
   return TRUE;
 }
 
diff --git a/demos/markers.c b/demos/markers.c
index c36534b..9243753 100644
--- a/demos/markers.c
+++ b/demos/markers.c
@@ -38,32 +38,32 @@ create_marker_layer (G_GNUC_UNUSED ChamplainView *view, ChamplainPathLayer **pat
   champlain_label_set_alignment (CHAMPLAIN_LABEL (marker), PANGO_ALIGN_RIGHT);
   champlain_label_set_color (CHAMPLAIN_LABEL (marker), &orange);
 
-  champlain_location_set_position (CHAMPLAIN_LOCATION (marker),
+  champlain_location_set_location (CHAMPLAIN_LOCATION (marker),
       45.528178, -73.563788);
   champlain_marker_layer_add_marker (layer, CHAMPLAIN_MARKER (marker));
   champlain_path_layer_add_node (*path, CHAMPLAIN_LOCATION (marker));
 
   marker = champlain_label_new_from_file ("/usr/share/icons/gnome/24x24/emblems/emblem-generic.png", NULL);
   champlain_label_set_text (CHAMPLAIN_LABEL (marker), "New York");
-  champlain_location_set_position (CHAMPLAIN_LOCATION (marker), 40.77, -73.98);
+  champlain_location_set_location (CHAMPLAIN_LOCATION (marker), 40.77, -73.98);
   champlain_marker_layer_add_marker (layer, CHAMPLAIN_MARKER (marker));
   champlain_path_layer_add_node (*path, CHAMPLAIN_LOCATION (marker));
 
   marker = champlain_label_new_from_file ("/usr/share/icons/gnome/24x24/emblems/emblem-important.png", NULL);
-  champlain_location_set_position (CHAMPLAIN_LOCATION (marker), 47.130885,
+  champlain_location_set_location (CHAMPLAIN_LOCATION (marker), 47.130885,
       -70.764141);
   champlain_marker_layer_add_marker (layer, CHAMPLAIN_MARKER (marker));
   champlain_path_layer_add_node (*path, CHAMPLAIN_LOCATION (marker));
 
   marker = champlain_point_new ();
-  champlain_location_set_position (CHAMPLAIN_LOCATION (marker), 45.130885,
+  champlain_location_set_location (CHAMPLAIN_LOCATION (marker), 45.130885,
       -65.764141);
   champlain_marker_layer_add_marker (layer, CHAMPLAIN_MARKER (marker));
   champlain_path_layer_add_node (*path, CHAMPLAIN_LOCATION (marker));
 
   marker = champlain_label_new_from_file ("/usr/share/icons/gnome/24x24/emblems/emblem-favorite.png", NULL);
   champlain_label_set_draw_background (CHAMPLAIN_LABEL (marker), FALSE);
-  champlain_location_set_position (CHAMPLAIN_LOCATION (marker), 45.41484,
+  champlain_location_set_location (CHAMPLAIN_LOCATION (marker), 45.41484,
       -71.918907);
   champlain_marker_layer_add_marker (layer, CHAMPLAIN_MARKER (marker));
   champlain_path_layer_add_node (*path, CHAMPLAIN_LOCATION (marker));
diff --git a/demos/url-marker.c b/demos/url-marker.c
index d0ac051..414c760 100644
--- a/demos/url-marker.c
+++ b/demos/url-marker.c
@@ -190,7 +190,7 @@ image_downloaded_cb (SoupSession *session,
   /* Finally create a marker with the texture */
   marker = champlain_label_new_with_image (texture);
   texture = NULL;
-  champlain_location_set_position (CHAMPLAIN_LOCATION (marker),
+  champlain_location_set_location (CHAMPLAIN_LOCATION (marker),
       marker_data->latitude, marker_data->longitude);
   champlain_marker_layer_add_marker (marker_data->layer, CHAMPLAIN_MARKER (marker));
 
diff --git a/docs/reference/libchamplain-sections.txt b/docs/reference/libchamplain-sections.txt
index b177fe9..f528596 100644
--- a/docs/reference/libchamplain-sections.txt
+++ b/docs/reference/libchamplain-sections.txt
@@ -774,7 +774,7 @@ ChamplainCoordinatePrivate
 <TITLE>ChamplainLocation</TITLE>
 ChamplainLocation
 ChamplainLocationIface
-champlain_location_set_position
+champlain_location_set_location
 champlain_location_get_latitude
 champlain_location_get_longitude
 <SUBSECTION Standard>



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