void osm_progress_set_widget(sqlite3 *db, GtkProgressBar *w);
gboolean osm_db_prepare(sqlite3 *db);
+gboolean osm_way_search(gdouble lat, gdouble lon, gchar *text, GtkListStore **store);
+
gboolean osm_way_get_nodes(osm_way *w);
gboolean osm_way_get_name(osm_way *w);
gboolean osm_way_get_ref(osm_way *w);
GtkTreeIter iter;
search_dialog *s=(search_dialog *)data;
-if ((strlen(gtk_entry_get_text(s->search_entry))<2) && (cid==-1)) {
+if ((strlen(gtk_entry_get_text(GTK_ENTRY(s->search_entry)))<2) && (cid==-1)) {
popup_error(s->dialog, _("Query string too short. Minimum 2 characters."));
return TRUE;
}
-st=g_strdup(gtk_entry_get_text(s->search_entry));
+st=g_strdup(gtk_entry_get_text(GTK_ENTRY(s->search_entry)));
switch (s->stype) {
case SEARCH_TYPE_POI:
}
break;
case SEARCH_TYPE_WAY:
+ if (osm_way_search(s->lat, s->lon, st, &s->store)==TRUE) {
+ gtk_tree_view_set_model(GTK_TREE_VIEW(s->list), GTK_TREE_MODEL(s->store));
+ g_object_unref(G_OBJECT(s->store));
+ } else {
+ s->store=NULL;
+ gtk_tree_view_set_model(GTK_TREE_VIEW(s->list), GTK_TREE_MODEL(s->store));
+ }
popup_error(s->dialog, "Not yet implemented");
break;
case SEARCH_TYPE_PLACE: