[libchamplain] Add missing property change notifications



commit 34026cfd682af1452211d8288fa8f827205cc91e
Author: JiÅ?í Techet <techet gmail com>
Date:   Thu Mar 24 01:22:33 2011 +0100

    Add missing property change notifications

 champlain/champlain-label.c                    |    3 +-
 champlain/champlain-license.c                  |    1 +
 champlain/champlain-marker.c                   |   18 +++++++++--
 champlain/champlain-memphis-renderer.c         |    1 +
 champlain/champlain-network-bbox-tile-source.c |    1 +
 champlain/champlain-network-tile-source.c      |    6 ++-
 champlain/champlain-path-layer.c               |   38 ++++++++++++------------
 champlain/champlain-scale.c                    |    2 +
 champlain/champlain-tile.c                     |   22 ++++++++++----
 champlain/champlain-view.c                     |   26 +++++++++++++---
 10 files changed, 81 insertions(+), 37 deletions(-)
---
diff --git a/champlain/champlain-label.c b/champlain/champlain-label.c
index 9cc8ff1..b1b1b94 100644
--- a/champlain/champlain-label.c
+++ b/champlain/champlain-label.c
@@ -1082,6 +1082,7 @@ champlain_label_set_text (ChamplainLabel *label,
     g_free (priv->text);
 
   priv->text = g_strdup (text);
+  g_object_notify (G_OBJECT (label), "text");
   champlain_label_queue_redraw (label);
 }
 
@@ -1288,7 +1289,7 @@ champlain_label_set_wrap_mode (ChamplainLabel *label,
   g_return_if_fail (CHAMPLAIN_IS_LABEL (label));
 
   label->priv->wrap_mode = wrap_mode;
-  g_object_notify (G_OBJECT (label), "wrap");
+  g_object_notify (G_OBJECT (label), "wrap-mode");
   champlain_label_queue_redraw (label);
 }
 
diff --git a/champlain/champlain-license.c b/champlain/champlain-license.c
index b35cbf9..e8059bc 100644
--- a/champlain/champlain-license.c
+++ b/champlain/champlain-license.c
@@ -452,6 +452,7 @@ champlain_license_set_extra_text (ChamplainLicense *license,
     g_free (priv->extra_text);
 
   priv->extra_text = g_strdup (text);
+  g_object_notify (G_OBJECT (license), "extra-text");
   redraw_license (license);
 }
 
diff --git a/champlain/champlain-marker.c b/champlain/champlain-marker.c
index 3df4646..77fd97d 100644
--- a/champlain/champlain-marker.c
+++ b/champlain/champlain-marker.c
@@ -749,8 +749,13 @@ champlain_marker_animate_in_with_delay (ChamplainMarker *marker,
   timeline = clutter_timeline_new (1000);
   clutter_timeline_set_delay (timeline, delay);
   clutter_actor_animate_with_timeline (CLUTTER_ACTOR (marker),
-      CLUTTER_EASE_OUT_BOUNCE, timeline, "opacity", 255, "y", y,
-      "scale-x", 1.0, "scale-y", 1.0, NULL);
+      CLUTTER_EASE_OUT_BOUNCE, 
+      timeline, 
+      "opacity", 255, 
+      "y", y,
+      "scale-x", 1.0, 
+      "scale-y", 1.0, 
+      NULL);
 }
 
 
@@ -820,8 +825,13 @@ champlain_marker_animate_out_with_delay (ChamplainMarker *marker,
   timeline = clutter_timeline_new (750);
   clutter_timeline_set_delay (timeline, delay);
   animation = clutter_actor_animate_with_timeline (CLUTTER_ACTOR (marker),
-        CLUTTER_EASE_IN_BACK, timeline, "opacity", 0, "y", y - 100,
-        "scale-x", 2.0, "scale-y", 2.0, NULL);
+        CLUTTER_EASE_IN_BACK, 
+        timeline, 
+        "opacity", 0, 
+        "y", y - 100,
+        "scale-x", 2.0, 
+        "scale-y", 2.0, 
+        NULL);
   g_signal_connect (animation, "completed",
       G_CALLBACK (on_animation_completed), marker);
 }
diff --git a/champlain/champlain-memphis-renderer.c b/champlain/champlain-memphis-renderer.c
index fe65a2f..3d5a4e9 100644
--- a/champlain/champlain-memphis-renderer.c
+++ b/champlain/champlain-memphis-renderer.c
@@ -753,4 +753,5 @@ set_bounding_box (ChamplainMemphisRenderer *renderer, ChamplainBoundingBox *bbox
 
   champlain_bounding_box_free (priv->bbox);
   priv->bbox = champlain_bounding_box_copy (bbox);
+  g_object_notify (G_OBJECT (renderer), "bounding-box");
 }
diff --git a/champlain/champlain-network-bbox-tile-source.c b/champlain/champlain-network-bbox-tile-source.c
index 9a8c53e..19e3c8f 100644
--- a/champlain/champlain-network-bbox-tile-source.c
+++ b/champlain/champlain-network-bbox-tile-source.c
@@ -480,4 +480,5 @@ champlain_network_bbox_tile_source_set_api_uri (
 
   g_free (priv->api_uri);
   priv->api_uri = g_strdup (api_uri);
+  g_object_notify (G_OBJECT (self), "api-uri");
 }
diff --git a/champlain/champlain-network-tile-source.c b/champlain/champlain-network-tile-source.c
index 3e6695f..04e4cb2 100644
--- a/champlain/champlain-network-tile-source.c
+++ b/champlain/champlain-network-tile-source.c
@@ -282,8 +282,10 @@ champlain_network_tile_source_init (ChamplainNetworkTileSource *tile_source)
 #endif
         NULL);
   g_object_set (G_OBJECT (priv->soup_session),
-      "user-agent", "libchamplain/" CHAMPLAIN_VERSION_S,
-      "max-conns-per-host", 2, NULL); /* This is as required by OSM */
+      "user-agent", 
+      "libchamplain/" CHAMPLAIN_VERSION_S,
+      "max-conns-per-host", 2,    /* This is as required by OSM */ 
+      NULL); 
 }
 
 
diff --git a/champlain/champlain-path-layer.c b/champlain/champlain-path-layer.c
index a951856..2afa4f0 100644
--- a/champlain/champlain-path-layer.c
+++ b/champlain/champlain-path-layer.c
@@ -857,6 +857,25 @@ champlain_path_layer_set_fill_color (ChamplainPathLayer *layer,
 
 
 /**
+ * champlain_path_layer_get_fill_color:
+ * @layer: a #ChamplainPathLayer
+ *
+ * Gets the path's fill color.
+ *
+ * Returns: the path's fill color.
+ *
+ * Since: 0.10
+ */
+ClutterColor *
+champlain_path_layer_get_fill_color (ChamplainPathLayer *layer)
+{
+  g_return_val_if_fail (CHAMPLAIN_IS_PATH_LAYER (layer), NULL);
+
+  return layer->priv->fill_color;
+}
+
+
+/**
  * champlain_path_layer_set_stroke_color:
  * @layer: a #ChamplainPathLayer
  * @color: (allow-none): The path's stroke color or NULL to reset to the
@@ -886,25 +905,6 @@ champlain_path_layer_set_stroke_color (ChamplainPathLayer *layer,
 
 
 /**
- * champlain_path_layer_get_fill_color:
- * @layer: a #ChamplainPathLayer
- *
- * Gets the path's fill color.
- *
- * Returns: the path's fill color.
- *
- * Since: 0.10
- */
-ClutterColor *
-champlain_path_layer_get_fill_color (ChamplainPathLayer *layer)
-{
-  g_return_val_if_fail (CHAMPLAIN_IS_PATH_LAYER (layer), NULL);
-
-  return layer->priv->fill_color;
-}
-
-
-/**
  * champlain_path_layer_get_stroke_color:
  * @layer: a #ChamplainPathLayer
  *
diff --git a/champlain/champlain-scale.c b/champlain/champlain-scale.c
index 87dd88c..aab30fb 100644
--- a/champlain/champlain-scale.c
+++ b/champlain/champlain-scale.c
@@ -549,6 +549,7 @@ champlain_scale_set_max_width (ChamplainScale *scale,
 
   scale->priv->max_scale_width = value;
   create_scale (scale);
+  g_object_notify (G_OBJECT (scale), "max-width");
   schedule_redraw (scale);
 }
 
@@ -569,6 +570,7 @@ champlain_scale_set_unit (ChamplainScale *scale,
   g_return_if_fail (CHAMPLAIN_IS_SCALE (scale));
 
   scale->priv->scale_unit = unit;
+  g_object_notify (G_OBJECT (scale), "unit");
   schedule_redraw (scale);
 }
 
diff --git a/champlain/champlain-tile.c b/champlain/champlain-tile.c
index 686d5d1..da5dff9 100644
--- a/champlain/champlain-tile.c
+++ b/champlain/champlain-tile.c
@@ -470,10 +470,16 @@ champlain_tile_class_init (ChamplainTileClass *klass)
    * Since: 0.10
    */
   champlain_tile_signals[RENDER_COMPLETE] =
-    g_signal_new ("render-complete", G_OBJECT_CLASS_TYPE (object_class),
-        G_SIGNAL_RUN_LAST, 0, NULL, NULL,
-        _champlain_marshal_VOID__POINTER_UINT_BOOLEAN, G_TYPE_NONE,
-        3, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_BOOLEAN);
+    g_signal_new ("render-complete", 
+        G_OBJECT_CLASS_TYPE (object_class),
+        G_SIGNAL_RUN_LAST, 
+        0, 
+        NULL, 
+        NULL,
+        _champlain_marshal_VOID__POINTER_UINT_BOOLEAN, 
+        G_TYPE_NONE,
+        3, 
+        G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_BOOLEAN);
 }
 
 
@@ -740,8 +746,12 @@ champlain_tile_new_full (guint x,
     guint size,
     guint zoom_level)
 {
-  return g_object_new (CHAMPLAIN_TYPE_TILE, "x", x, "y", y, "zoom-level",
-      zoom_level, "size", size, NULL);
+  return g_object_new (CHAMPLAIN_TYPE_TILE, 
+      "x", x, 
+      "y", y, 
+      "zoom-level", zoom_level, 
+      "size", size, 
+      NULL);
 }
 
 
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index f792918..d017132 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -352,11 +352,21 @@ resize_viewport (ChamplainView *view)
    */
   g_signal_handlers_block_by_func (priv->viewport, G_CALLBACK (viewport_pos_changed_cb), view);
 
-  g_object_set (hadjust, "lower", lower_x, "upper", upper_x,
-      "page-size", 1.0, "step-increment", 1.0, "elastic", TRUE, NULL);
-
-  g_object_set (vadjust, "lower", lower_y, "upper", upper_y,
-      "page-size", 1.0, "step-increment", 1.0, "elastic", TRUE, NULL);
+  g_object_set (hadjust, 
+      "lower", lower_x, 
+      "upper", upper_x,
+      "page-size", 1.0, 
+      "step-increment", 1.0, 
+      "elastic", TRUE, 
+      NULL);
+
+  g_object_set (vadjust, 
+      "lower", lower_y, 
+      "upper", upper_y,
+      "page-size", 1.0, 
+      "step-increment", 1.0, 
+      "elastic", TRUE, 
+      NULL);
 
   g_signal_handlers_unblock_by_func (priv->viewport, G_CALLBACK (viewport_pos_changed_cb), view);
 }
@@ -1603,6 +1613,7 @@ champlain_view_set_min_zoom_level (ChamplainView *view,
     return;
 
   priv->min_zoom_level = min_zoom_level;
+  g_object_notify (G_OBJECT (view), "min-zoom-level");
 
   if (priv->zoom_level < min_zoom_level)
     champlain_view_set_zoom_level (view, min_zoom_level);
@@ -1634,6 +1645,7 @@ champlain_view_set_max_zoom_level (ChamplainView *view,
     return;
 
   priv->max_zoom_level = max_zoom_level;
+  g_object_notify (G_OBJECT (view), "max-zoom-level");
 
   if (priv->zoom_level > max_zoom_level)
     champlain_view_set_zoom_level (view, max_zoom_level);
@@ -2151,6 +2163,7 @@ champlain_view_set_deceleration (ChamplainView *view,
       rate < 2.0 && rate > 1.0001);
 
   g_object_set (view->priv->kinetic_scroll, "deceleration", rate, NULL);
+  g_object_notify (G_OBJECT (view), "deceleration");
 }
 
 
@@ -2175,6 +2188,7 @@ champlain_view_set_kinetic_mode (ChamplainView *view,
 
   priv->kinetic_mode = kinetic;
   g_object_set (view->priv->kinetic_scroll, "mode", kinetic, NULL);
+  g_object_notify (G_OBJECT (view), "kinetic-mode");
 }
 
 
@@ -2196,6 +2210,7 @@ champlain_view_set_keep_center_on_resize (ChamplainView *view,
   g_return_if_fail (CHAMPLAIN_IS_VIEW (view));
 
   view->priv->keep_center_on_resize = value;
+  g_object_notify (G_OBJECT (view), "keep-center-on-resize");
 }
 
 
@@ -2217,6 +2232,7 @@ champlain_view_set_zoom_on_double_click (ChamplainView *view,
   g_return_if_fail (CHAMPLAIN_IS_VIEW (view));
 
   view->priv->zoom_on_double_click = value;
+  g_object_notify (G_OBJECT (view), "zoom-on-double-click");
 }
 
 



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