From 5ac80872f927e25921a47b3a39eed2cd9edc03d2 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Mon, 12 Oct 2009 20:24:02 -0700 Subject: [PATCH] prefix button names with link type for -s linknameurl --- lib/devices/swf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/devices/swf.c b/lib/devices/swf.c index 48b054a..179c6e2 100644 --- a/lib/devices/swf.c +++ b/lib/devices/swf.c @@ -1972,10 +1972,14 @@ static void drawlink(gfxdevice_t*dev, ActionTAG*actions1, ActionTAG*actions2, gf swf_ButtonPostProcess(i->tag, 1); } } + char buf[80]; + char*buf2 = 0; const char* name = 0; if(i->config_linknameurl) { - name = url; + buf2 = malloc(strlen(type)+strlen(url)+2); + sprintf(buf2, "%s:%s", type, url); + name = buf2; } else { name = buf; sprintf(buf, "button%d", buttonid); @@ -1997,6 +2001,9 @@ static void drawlink(gfxdevice_t*dev, ActionTAG*actions1, ActionTAG*actions2, gf } else { swf_ObjectPlace(i->tag, buttonid, getNewDepth(dev),&i->page_matrix,0,(U8*)name); } + + if(buf2) + free(buf2); } -- 1.7.10.4