54 |
} |
} |
55 |
|
|
56 |
gboolean collision = FALSE; |
gboolean collision = FALSE; |
57 |
|
|
58 |
|
#if 0 |
59 |
tag_t *tags = tag; |
tag_t *tags = tag; |
60 |
|
|
61 |
if(id == ID_ILLEGAL) |
if(id == ID_ILLEGAL) |
62 |
str = g_strdup_printf(_("Unknown item")); |
str = g_strdup_printf(_("Unknown item")); |
63 |
else { |
else { |
64 |
str = g_strdup_printf("%s #" ITEM_ID_FORMAT, item_str, id); |
str = g_strdup_printf("%s", item_str); |
65 |
|
|
66 |
/* add some tags ... */ |
/* add some tags ... */ |
67 |
/* |
/* |
68 |
* XXX Should we just try to present only the name or the ref (or the |
* Should we just try to present only the name or the ref (or the |
69 |
* alt_name, old_name, whatever) here? Hurling a load of tags in the |
* alt_name, old_name, whatever) here? Hurling a load of tags in the |
70 |
* user's face in some unpredictable, uninformative order isn't very |
* user's face in some unpredictable, uninformative order isn't very |
71 |
* friendly. |
* friendly. |
72 |
* |
* |
73 |
* Actually, a tag_short_desc() function would be useful in dialogs |
* Actually, a tag_short_desc() function would be useful in dialogs |
74 |
* nd user messages too. |
* and user messages too. |
75 |
*/ |
*/ |
76 |
while(tag) { |
while(tag) { |
77 |
if(!collision && info_tag_key_collision(tags, tag)) |
if(!collision && info_tag_key_collision(tags, tag)) |
86 |
tag = tag->next; |
tag = tag->next; |
87 |
} |
} |
88 |
} |
} |
89 |
|
#else |
90 |
|
str = osm_object_string(&map_item->object); |
91 |
|
str[0] = g_ascii_toupper(str[0]); |
92 |
|
#endif |
93 |
|
|
94 |
statusbar_set(map->appdata, str, collision); |
statusbar_set(map->appdata, str, collision); |
95 |
g_free(str); |
g_free(str); |
1801 |
map->appdata = appdata; |
map->appdata = appdata; |
1802 |
map->action.type = MAP_ACTION_IDLE; |
map->action.type = MAP_ACTION_IDLE; |
1803 |
|
|
1804 |
map->canvas = canvas_new(map->style->background.color); |
map->canvas = canvas_new(); |
1805 |
|
|
1806 |
GtkWidget *canvas_widget = canvas_get_widget(map->canvas); |
GtkWidget *canvas_widget = canvas_get_widget(map->canvas); |
1807 |
|
|
1830 |
void map_init(appdata_t *appdata) { |
void map_init(appdata_t *appdata) { |
1831 |
map_t *map = appdata->map; |
map_t *map = appdata->map; |
1832 |
|
|
1833 |
|
/* update canvas background color */ |
1834 |
|
canvas_set_background(map->canvas, map->style->background.color); |
1835 |
|
|
1836 |
/* set initial zoom */ |
/* set initial zoom */ |
1837 |
map_set_zoom(map, map->state->zoom, FALSE); |
map_set_zoom(map, map->state->zoom, FALSE); |
1838 |
josm_elemstyles_colorize_world(map->style, appdata->osm); |
josm_elemstyles_colorize_world(map->style, appdata->osm); |