Diff of /trunk/src/map.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 191 by harbaum, Tue Jul 7 07:36:27 2009 UTC revision 194 by harbaum, Tue Jul 7 19:31:45 2009 UTC
# Line 54  static void map_statusbar(map_t *map, ma Line 54  static void map_statusbar(map_t *map, ma
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))
# Line 84  static void map_statusbar(map_t *map, ma Line 86  static void map_statusbar(map_t *map, ma
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);
# Line 1795  GtkWidget *map_new(appdata_t *appdata) { Line 1801  GtkWidget *map_new(appdata_t *appdata) {
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    
# Line 1824  GtkWidget *map_new(appdata_t *appdata) { Line 1830  GtkWidget *map_new(appdata_t *appdata) {
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);

Legend:
Removed from v.191  
changed lines
  Added in v.194