From: Pierre-Luc Beaudoin Date: Thu, 27 Aug 2009 00:30:18 +0000 (-0400) Subject: Comment out misleading code in demos X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6479441c9367724936600569dc9348e39a416e22;p=libchamplain Comment out misleading code in demos But leave the code there as it is a good example of how to make acters reactive. --- diff --git a/demos/markers.c b/demos/markers.c index 6166eaa..992643b 100644 --- a/demos/markers.c +++ b/demos/markers.c @@ -19,6 +19,13 @@ #include #include +/* This event callback will never be called if you use + * ChamplainSelectionLayer. The selection layer uses this + * event for the selection and do not pass the event forward. + * For this event to be fired, you should use a simple + * ChamplainLayer. + */ +/* static gboolean marker_button_release_cb (ClutterActor *actor, ClutterButtonEvent *event, @@ -31,6 +38,7 @@ marker_button_release_cb (ClutterActor *actor, return TRUE; } +*/ ChamplainLayer * create_marker_layer (ChamplainView *view) @@ -50,9 +58,15 @@ create_marker_layer (ChamplainView *view) champlain_base_marker_set_position (CHAMPLAIN_BASE_MARKER (marker), 45.528178, -73.563788); champlain_layer_add_marker (layer, CHAMPLAIN_BASE_MARKER (marker)); + /* + * This event handler will never be called anyway because this demo is using + * a ChamplainSelectionLayer but we leave it here in the demo so that you know + * how to have reactive markers + clutter_actor_set_reactive (marker, TRUE); g_signal_connect_after (marker, "button-release-event", G_CALLBACK (marker_button_release_cb), view); + */ marker = champlain_marker_new_from_file ("/usr/share/icons/gnome/24x24/emblems/emblem-generic.png", NULL); champlain_marker_set_text (CHAMPLAIN_MARKER (marker), "New York");