[emerillon/gtk3] search-plugin: fix invalid cast runtime warning



commit b00acfb89b4fa76b65f7814b6dd68efd1a29e69e
Author: Andreas Henriksson <andreas fatal se>
Date:   Thu Aug 4 22:17:40 2011 +0200

    search-plugin: fix invalid cast runtime warning
    
    Replace old clutter code with new champlain api to get rid of
    runtime warnings (and assumptions on how champlain inherits from clutter).

 plugins/search/search.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/plugins/search/search.c b/plugins/search/search.c
index 4d7b22b..3b8e406 100644
--- a/plugins/search/search.c
+++ b/plugins/search/search.c
@@ -232,7 +232,6 @@ search_address (SearchPlugin *plugin)
   gchar *locale;
   gchar lang[2];
   GError *error = NULL;
-  GList *children, *l;
   SearchPluginPrivate *priv = SEARCH_PLUGIN (plugin)->priv;
 
   query = gtk_entry_get_text (GTK_ENTRY (plugin->priv->search_entry));
@@ -242,12 +241,7 @@ search_address (SearchPlugin *plugin)
   gtk_list_store_clear (GTK_LIST_STORE (priv->model));
 
   /* Remove markers */
-  children = clutter_container_get_children (CLUTTER_CONTAINER (priv->layer));
-  for (l = children; l != NULL; l = l->next)
-    {
-      champlain_marker_layer_remove_marker (priv->layer, CHAMPLAIN_MARKER (l->data));
-    }
-  g_list_free (children);
+  champlain_marker_layer_remove_all (priv->layer);
 
   if (priv->proxy == NULL)
     priv->proxy = rest_proxy_new ("http://ws.geonames.org/";, FALSE);



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