summaryrefslogtreecommitdiff
path: root/navit/osd
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-01-28 21:55:18 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-01-28 21:55:18 +0000
commit6192144b5e0293c445803e3a98a4834492edc173 (patch)
tree6427d12dae43be2f9f861957e7de7636c862ee43 /navit/osd
parentfb9f84f3be0684832b3b37cb6182952e5a8d6d41 (diff)
downloadnavit-6192144b5e0293c445803e3a98a4834492edc173.tar.gz
Add:osd_core:Support command attribute for compass
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5358 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/osd')
-rw-r--r--navit/osd/core/osd_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/navit/osd/core/osd_core.c b/navit/osd/core/osd_core.c
index 519f83d58..89b0d3722 100644
--- a/navit/osd/core/osd_core.c
+++ b/navit/osd/core/osd_core.c
@@ -94,6 +94,7 @@ static int b_commandtable_added = 0;
struct compass {
int width;
struct graphics_gc *green;
+ struct callback *click_cb;
};
static void
@@ -1391,6 +1392,8 @@ osd_compass_init(struct osd_priv_common *opc, struct navit *nav)
graphics_gc_set_linewidth(opc->osd_item.graphic_fg_white, this->width);
navit_add_callback(nav, callback_new_attr_1(callback_cast(osd_compass_draw), attr_position_coord_geo, opc));
+ if (opc->osd_item.command)
+ navit_add_callback(nav, this->click_cb = callback_new_attr_1(callback_cast (osd_std_click), attr_button, &opc->osd_item));
osd_compass_draw(opc, nav, NULL);
}