diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-07-01 13:12:54 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-07-01 13:12:54 +0000 |
commit | b5c09d8f0618df6649fc11ebccdd77ba49b9cdbe (patch) | |
tree | 8f93b82bd40b182d91e3a7c3ac1c18dc240e3ba0 /navit/popup.c | |
parent | b4656721e527cb0429f4f3e112a8c5f01288228e (diff) | |
download | navit-svn-b5c09d8f0618df6649fc11ebccdd77ba49b9cdbe.tar.gz |
Add:Core:Dump option in popup menu
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3464 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/popup.c')
-rw-r--r-- | navit/popup.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/navit/popup.c b/navit/popup.c index d2755faf..5addaccc 100644 --- a/navit/popup.c +++ b/navit/popup.c @@ -246,6 +246,18 @@ popup_show_attrs(struct map *map, void *menu, struct item *item) } static void +popup_item_dump(struct item *item) +{ + struct map_rect *mr; + mr=map_rect_new(item->map,NULL); + item=map_rect_get_item_byid(mr, item->id_hi, item->id_lo); + dbg(0,"item=%p\n",item); + item_dump_filedesc(item,item->map,stdout); + map_rect_destroy(mr); +} + + +static void popup_show_item(struct navit *nav, void *popup, struct displayitem *di) { struct map_rect *mr; @@ -281,6 +293,7 @@ popup_show_item(struct navit *nav, void *popup, struct displayitem *di) dbg(1,"item=%p\n", item); if (item) { popup_show_attrs(item->map, menu_item, item); + popup_printf_cb(menu_item, menu_type_menu, callback_new_1(callback_cast(popup_item_dump), diitem), "Dump"); if (item->type < type_line) { struct coord co; struct pcoord *c; |