--- trunk/src/info.c 2009/07/06 19:17:24 190 +++ trunk/src/info.c 2009/07/07 07:36:27 191 @@ -271,6 +271,10 @@ } } +static void on_relations(GtkWidget *button, tag_context_t *context) { + relation_list(context->dialog, context->appdata, &context->object); +} + static GtkWidget *tag_widget(tag_context_t *context) { context->list = list_new(LIST_HILDON_WITH_HEADERS_ON_MAEMO5); @@ -280,9 +284,18 @@ list_set_selection_function(context->list, view_selection_func, context); list_set_user_buttons(context->list, - LIST_BUTTON_USER0, _("Last"), on_tag_last, + LIST_BUTTON_USER0, _("Last"), on_tag_last, + LIST_BUTTON_USER2, _("Relations"), on_relations, 0); + /* check whether this object is part of any relations and enable relations */ + /* button accordingly */ + relation_chain_t *rchain = osm_object_to_relation(context->appdata->osm, + &context->object); + list_button_enable(context->list, LIST_BUTTON_USER2, rchain != NULL); + osm_relation_chain_free(rchain); + + /* setup both columns */ list_set_columns(context->list, _("Key"), TAG_COL_KEY,