aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-12-09 15:51:08 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-12-09 15:51:08 +0000
commit945ebeab6f857d345e8e6a5490a6ec3a71c8c6e3 (patch)
tree6364af577cdd0bce0caf7d72cd55f1a5a84a0c96 /main.c
parent[w3m-dev 03548] close anchor before <img align=...> (diff)
downloadw3m-945ebeab6f857d345e8e6a5490a6ec3a71c8c6e3.tar.gz
w3m-945ebeab6f857d345e8e6a5490a6ec3a71c8c6e3.zip
[w3m-dev 03549] link list
* anchor.c (addMultirowsImg): add a->slave (getAnchorText): arg AnchorList *al (link_list_panel): added * funcname.tab (LIST): added (LIST_MENU): added (MOVE_LIST_MENU): added * main.c (anchorMn): added (accessKey): use anchorMn() (listMn): added (movlistMn): added (linkLst): added * map.c (searchMapList): not static * menu.c (accesskey_menu): pass AnchorList to getAnchorText() (lmKeys): added (lmKeys2): added (nlmKeys): added (nlmKeys2): added (lmGoto): added (lmSelect): added (list_menu): added * proto.h (linkLst): added (listMn): added (movlistMn): added (list_menu): added (searchMapList): added (getAnchorText): arg AnchorList *al (link_list_panel): added * doc/README.func (LIST): added (LIST_MENU): added (MOVE_LIST_MENU): added * doc-jp/README.func (LINK_MENU): fix message (LIST): added (LIST_MENU): added (MOVE_LIST_MENU): added * scripts/w3mhelp.cgi.in (Page/Cursor motion): add movlistMn (Hyperlink operation): add linkLst linkMn From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r--main.c51
1 files changed, 44 insertions, 7 deletions
diff --git a/main.c b/main.c
index bb6c58f..4d35d39 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.162 2002/12/09 15:32:18 ukai Exp $ */
+/* $Id: main.c,v 1.163 2002/12/09 15:51:09 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -4177,27 +4177,64 @@ linkMn(void)
parsedURL2Str(&Currentbuf->currentURL)->ptr);
}
-/* accesskey */
-void
-accessKey(void)
+static void
+anchorMn(Anchor * (*menu_func) (Buffer *), int go)
{
Anchor *a;
BufferPoint *po;
if (!Currentbuf->href || !Currentbuf->hmarklist)
return;
- a = accesskey_menu(Currentbuf);
+ a = menu_func(Currentbuf);
if (!a || a->hseq < 0)
return;
po = &Currentbuf->hmarklist->marks[a->hseq];
gotoLine(Currentbuf, po->line);
Currentbuf->pos = po->pos;
arrangeCursor(Currentbuf);
- onA();
- followA();
+ displayBuffer(Currentbuf, B_NORMAL);
+ if (go) {
+ onA();
+ followA();
+ }
+}
+
+/* accesskey */
+void
+accessKey(void)
+{
+ anchorMn(accesskey_menu, TRUE);
+}
+
+/* list menu */
+void
+listMn(void)
+{
+ anchorMn(list_menu, TRUE);
+}
+
+void
+movlistMn(void)
+{
+ anchorMn(list_menu, FALSE);
}
#endif
+/* link,anchor,image list */
+void
+linkLst(void)
+{
+ Buffer *buf;
+
+ buf = link_list_panel(Currentbuf);
+ if (buf != NULL) {
+#ifdef JP_CHARSET
+ buf->document_code = Currentbuf->document_code;
+#endif /* JP_CHARSET */
+ cmd_loadBuffer(buf, BP_NORMAL, LB_NOLINK);
+ }
+}
+
#ifdef USE_COOKIE
/* cookie list */
void