[libchamplain] Some fixes of the demos



commit 3c21ea50ac4650520e42fe6869fc0896a84d84be
Author: JiÅ?í Techet <techet gmail com>
Date:   Sun Mar 27 19:03:50 2011 +0200

    Some fixes of the demos

 demos/launcher-gtk.c |    5 ++++-
 demos/polygons.c     |    3 ---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/demos/launcher-gtk.c b/demos/launcher-gtk.c
index 6b9aae9..67b7a6a 100644
--- a/demos/launcher-gtk.c
+++ b/demos/launcher-gtk.c
@@ -29,6 +29,7 @@
 #define COL_NAME 1
 
 static ChamplainPathLayer *path_layer;
+static ChamplainPathLayer *path;
 static gboolean destroying = FALSE;
 
 /*
@@ -49,11 +50,13 @@ toggle_layer (GtkToggleButton *widget,
   if (gtk_toggle_button_get_active (widget))
     {
       champlain_path_layer_set_visible (path_layer, TRUE);
+      champlain_path_layer_set_visible (path, TRUE);
       champlain_marker_layer_animate_in_all_markers (CHAMPLAIN_MARKER_LAYER (layer));
     }
   else
     {
       champlain_path_layer_set_visible (path_layer, FALSE);
+      champlain_path_layer_set_visible (path, FALSE);
       champlain_marker_layer_animate_out_all_markers (CHAMPLAIN_MARKER_LAYER (layer));
     }
 }
@@ -219,7 +222,6 @@ main (int argc,
   ChamplainMarkerLayer *layer;
   ClutterActor *scale;
   ChamplainLicense *license_actor;
-  ChamplainPathLayer *path;
 
   g_thread_init (NULL);
   gtk_clutter_init (&argc, &argv);
@@ -295,6 +297,7 @@ main (int argc,
   gtk_container_add (GTK_CONTAINER (bbox), button);
 
   button = gtk_toggle_button_new_with_label ("Markers");
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
   g_signal_connect (button, "toggled", G_CALLBACK (toggle_layer), layer);
   gtk_container_add (GTK_CONTAINER (bbox), button);
 
diff --git a/demos/polygons.c b/demos/polygons.c
index 55de768..fb5ab30 100644
--- a/demos/polygons.c
+++ b/demos/polygons.c
@@ -122,9 +122,6 @@ main (int argc,
   /* draw a line */
   layer = champlain_path_layer_new ();
   /* Cheap approx of Highway 10 */
-  int i = 0;
-  for (i = 0; i < 50000; i++)
-    append_point (layer, 45.4095 + i / 10000.0, -73.3197 + i / 10000.0);
   append_point (layer, 45.4104, -73.2846);
   append_point (layer, 45.4178, -73.2239);
   append_point (layer, 45.4176, -73.2181);



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