[libgis] Load marker from callback in GisPluginTest
- From: Andy Spencer <andys src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgis] Load marker from callback in GisPluginTest
- Date: Fri, 10 Sep 2010 03:17:19 +0000 (UTC)
commit aa51def2e3da1a15677bc8a3a85098a7c9a57577
Author: Andy Spencer <andy753421 gmail com>
Date: Mon May 3 05:16:43 2010 +0000
Load marker from callback in GisPluginTest
src/plugins/test.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/test.c b/src/plugins/test.c
index 4dbc838..92b5886 100644
--- a/src/plugins/test.c
+++ b/src/plugins/test.c
@@ -34,6 +34,15 @@
/***********
* Methods *
***********/
+gboolean _load_marker(gpointer _test)
+{
+ GisPluginTest *test = _test;
+ GisMarker *marker = gis_marker_new("St. Charles");
+ gis_point_set_lle(gis_object_center(marker), 38.841847, -90.491982, 0);
+ GIS_OBJECT(marker)->lod = EARTH_R;
+ test->marker = gis_viewer_add(test->viewer, GIS_OBJECT(marker), GIS_LEVEL_OVERLAY, 0);
+ return FALSE;
+}
/**
* gis_plugin_test_new:
* @viewer: the #GisViewer to use for drawing
@@ -47,12 +56,7 @@ GisPluginTest *gis_plugin_test_new(GisViewer *viewer)
g_debug("GisPluginTest: new");
GisPluginTest *test = g_object_new(GIS_TYPE_PLUGIN_TEST, NULL);
test->viewer = g_object_ref(viewer);
-
- GisMarker *marker = gis_marker_new("St. Charles");
- gis_point_set_lle(gis_object_center(marker), 38.841847, -90.491982, 0);
- GIS_OBJECT(marker)->lod = EARTH_R;
- test->marker = gis_viewer_add(test->viewer, GIS_OBJECT(marker), GIS_LEVEL_OVERLAY, 0);
-
+ g_idle_add(_load_marker, test);
return test;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]