diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-11-21 16:31:35 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-11-21 16:31:35 +0000 |
commit | 1248fa2911c932a71c0c70d0cc5b512df723acf2 (patch) | |
tree | da82f2a799df79bf1856fb6fd029d5ccdb52e54c /display.c | |
parent | * NEWS: func: NEXT, PREV (diff) | |
download | w3m-1248fa2911c932a71c0c70d0cc5b512df723acf2.tar.gz w3m-1248fa2911c932a71c0c70d0cc5b512df723acf2.zip |
[w3m-dev 03455] mouse menu
* configure (config.h): MOUSE_FILE
* display.c (displayBuffer): nTab -> nTab2, N_TAB -> nTabLine()
(redrawNLine): nTab -> nTab2, N_TAB -> nTabLine()
mouse_menu support
* fm.h (nTab2): added
(N_TAB): deleted
(NO_TABBUFFER): added
(struct _MouseMenu): added
(mouse_menu_map): added
(mouse_menu): added
* func.c (initMouseMenu): added
* main.c (main): initMouseMenu()
(posTab): mouse_menu support
(mouse_menu_action): added
(process_mouse): mouse_menu support
(reinit): initMouseMenu()
(nTabLine): added
(moveTab): check NO_TABBUFFER
* proto.h (nTabLine): added
(initMouseMenu): added
* rc.c (sync_with_option): initMouseMenu()
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r-- | display.c | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -1,4 +1,4 @@ -/* $Id: display.c,v 1.34 2002/11/19 17:40:31 ukai Exp $ */ +/* $Id: display.c,v 1.35 2002/11/21 16:31:35 ukai Exp $ */ #include <signal.h> #include "fm.h" @@ -254,8 +254,8 @@ displayBuffer(Buffer *buf, int mode) else buf->rootX = 0; buf->COLS = COLS - buf->rootX; - if (nTab > 1) { - ny = (nTab - 1) / N_TAB + 2; + if (nTab2 > 1) { + ny = (nTab2 - 1) / nTabLine() + 2; if (ny > LASTLINE) ny = LASTLINE; } @@ -445,12 +445,18 @@ redrawNLine(Buffer *buf, int n) #endif /* USE_BG_COLOR */ } #endif /* USE_COLOR */ - if (nTab > 1) { + if (nTab2 > 1) { TabBuffer *t; - int nx = N_TAB, col = COLS - 2, x, l; + int nx = nTabLine(), col = COLS - 2, x, l; + i = 0; move(0, 0); - for (t = FirstTab, i = 0; t; t = t->nextTab, i++) { + if (mouse_menu) { + addstr(mouse_menu); + clrtoeolx(); + i++; + } + for (t = FirstTab; t; t = t->nextTab, i++) { x = col * (i % nx) / nx; move(i / nx, x); if (t == CurrentTab) @@ -474,7 +480,7 @@ redrawNLine(Buffer *buf, int n) } move(0, col); addstr(" x"); - move((nTab - 1) / nx + 1, 0); + move((nTab2 - 1) / nx + 1, 0); for (i = 0; i < COLS; i++) addch('~'); } |