From a17f5fe8175ccab8f52513f0b8141f7fd6ef393a Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Tue, 19 Nov 2002 17:40:30 +0000 Subject: [w3m-dev 03452] image map * display.c (displayBuffer): use getCurrentMapLabel() * fm.h (MapArea): delete ifdef MENU_MAP (image_map_list): added * main.c (followA): don't call retrieveCurrentImg() ifdef USE_IMAGE use retrieveCurrentMap() ifndef USE_IMAGE (_followForm): indent (drawAnchorCursor0): add AnchorList (drawAnchorCuror): pass AnchorList to drawAnchorCursor0 (follow_map): follow_map_panel * map.c (searchMapList): added (nearestMapArea): n, min default value to -1 (searchMapArea): added (getCurrentMapLabel): added (getMapXY): moved (retrieveCurrentMap): added (follow_map_menu): parsed_tagarg -> name rewrite to search map list/area (follow_map_panel): parsed_tagarg -> name rewrite to search map list/area (newMapArea): delete ifdef MENU_MAP (append_map_info): added (page_info_panel): append_map_info * proto.h (follow_map_menu): parsed_tagarg -> name (follow_map_panel): parsed_tagarg -> name (getCurrentMapLabel): added (retrieveCurrentMap): added * rc.c (CMT_IMAGE_MAP_LIST): added (image_map_list): added From: Hironori SAKAMOTO --- display.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'display.c') diff --git a/display.c b/display.c index dbd9c18..9936b55 100644 --- a/display.c +++ b/display.c @@ -1,4 +1,4 @@ -/* $Id: display.c,v 1.33 2002/11/18 16:42:25 ukai Exp $ */ +/* $Id: display.c,v 1.34 2002/11/19 17:40:31 ukai Exp $ */ #include #include "fm.h" @@ -226,7 +226,7 @@ void displayBuffer(Buffer *buf, int mode) { Str msg; - Anchor *aa = NULL; + Str s = NULL; int ny = 0; if (buf->topLine == NULL && readBufferCache(buf) == 0) { /* clear_buffer */ @@ -341,14 +341,22 @@ displayBuffer(Buffer *buf, int mode) #endif Strcat_charp(msg, " <"); Strcat_charp(msg, buf->buffername); - if (displayLink) - aa = retrieveCurrentAnchor(buf); - if (aa) { - ParsedURL url; - Str s; + if (displayLink) { +#ifdef USE_IMAGE + s = getCurrentMapLabel(buf); + if (!s) +#endif + { + Anchor *a = retrieveCurrentAnchor(buf); + if (a) { + ParsedURL pu; + parseURL2(a->url, &pu, baseURL(buf)); + s = parsedURL2Str(&pu); + } + } + } + if (s) { int l; - parseURL2(aa->url, &url, baseURL(buf)); - s = parsedURL2Str(&url); l = buf->width - 2; if (s->length > l) { if (l >= 4) { -- cgit v1.2.3