271 |
} |
} |
272 |
} |
} |
273 |
|
|
274 |
|
static void on_relations(GtkWidget *button, tag_context_t *context) { |
275 |
|
relation_list(context->dialog, context->appdata, &context->object); |
276 |
|
} |
277 |
|
|
278 |
static GtkWidget *tag_widget(tag_context_t *context) { |
static GtkWidget *tag_widget(tag_context_t *context) { |
279 |
context->list = list_new(LIST_HILDON_WITH_HEADERS_ON_MAEMO5); |
context->list = list_new(LIST_HILDON_WITH_HEADERS_ON_MAEMO5); |
280 |
|
|
284 |
list_set_selection_function(context->list, view_selection_func, context); |
list_set_selection_function(context->list, view_selection_func, context); |
285 |
|
|
286 |
list_set_user_buttons(context->list, |
list_set_user_buttons(context->list, |
287 |
LIST_BUTTON_USER0, _("Last"), on_tag_last, |
LIST_BUTTON_USER0, _("Last"), on_tag_last, |
288 |
|
LIST_BUTTON_USER2, _("Relations"), on_relations, |
289 |
0); |
0); |
290 |
|
|
291 |
|
/* check whether this object is part of any relations and enable relations */ |
292 |
|
/* button accordingly */ |
293 |
|
relation_chain_t *rchain = osm_object_to_relation(context->appdata->osm, |
294 |
|
&context->object); |
295 |
|
list_button_enable(context->list, LIST_BUTTON_USER2, rchain != NULL); |
296 |
|
osm_relation_chain_free(rchain); |
297 |
|
|
298 |
|
|
299 |
/* setup both columns */ |
/* setup both columns */ |
300 |
list_set_columns(context->list, |
list_set_columns(context->list, |
301 |
_("Key"), TAG_COL_KEY, |
_("Key"), TAG_COL_KEY, |