[w3m-dev 03458] Re: mouse menu
* display.c (displayBuffer): nTab2 -> nTab, mouse_menu * fm.h (nTab2): deleted (MouseMenuMap): added (MouseMenu): added (LIMIT_MOUSE_MENU): added * func.c (initMouseMenu): delete mouse_menu_map initialization conv_from_system mouse_menu->width * main.c (main): mouse_menu->in_action = FALSE (posTab): check mouse_menu (mouse_menu_action): add y arg mouse_menu_width check (process_mouse): nTab2 -> nTab, mouse_menu (nTabLine): deleted (calcTabPos): check mouse_menu * menu.c (mainMn): x, y (selMn): mouse_menu check (tabMn): mosue_menu check * proto.h (nTabLine): deleted From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
37
menu.c
37
menu.c
@@ -1,4 +1,4 @@
|
||||
/* $Id: menu.c,v 1.18 2002/11/15 15:36:48 ukai Exp $ */
|
||||
/* $Id: menu.c,v 1.19 2002/11/22 15:43:14 ukai Exp $ */
|
||||
/*
|
||||
* w3m menu.c
|
||||
*/
|
||||
@@ -1252,6 +1252,8 @@ mainMn(void)
|
||||
Menu *menu = &MainMenu;
|
||||
char *data;
|
||||
int n;
|
||||
int x = Currentbuf->cursorX + Currentbuf->rootX,
|
||||
y = Currentbuf->cursorY + Currentbuf->rootY;
|
||||
|
||||
data = searchKeyData();
|
||||
if (data != NULL) {
|
||||
@@ -1260,8 +1262,13 @@ mainMn(void)
|
||||
return;
|
||||
menu = w3mMenuList[n].menu;
|
||||
}
|
||||
popupMenu(Currentbuf->cursorX + Currentbuf->rootX,
|
||||
Currentbuf->cursorY + Currentbuf->rootY, menu);
|
||||
#ifdef USE_MOUSE
|
||||
if (mouse_menu && mouse_menu->in_action) {
|
||||
x = mouse_menu->cursorX - FRAME_WIDTH - 1;
|
||||
y = mouse_menu->cursorY;
|
||||
}
|
||||
#endif
|
||||
popupMenu(x, y, menu);
|
||||
}
|
||||
|
||||
/* --- MainMenu (END) --- */
|
||||
@@ -1271,8 +1278,16 @@ mainMn(void)
|
||||
void
|
||||
selMn(void)
|
||||
{
|
||||
popupMenu(Currentbuf->cursorX + Currentbuf->rootX,
|
||||
Currentbuf->cursorY + Currentbuf->rootY, &SelectMenu);
|
||||
int x = Currentbuf->cursorX + Currentbuf->rootX,
|
||||
y = Currentbuf->cursorY + Currentbuf->rootY;
|
||||
|
||||
#ifdef USE_MOUSE
|
||||
if (mouse_menu && mouse_menu->in_action) {
|
||||
x = mouse_menu->cursorX - FRAME_WIDTH - 1;
|
||||
y = mouse_menu->cursorY;
|
||||
}
|
||||
#endif
|
||||
popupMenu(x, y, &SelectMenu);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1408,8 +1423,16 @@ smDelBuf(char c)
|
||||
void
|
||||
tabMn(void)
|
||||
{
|
||||
popupMenu(Currentbuf->cursorX + Currentbuf->rootX,
|
||||
Currentbuf->cursorY + Currentbuf->rootY, &SelTabMenu);
|
||||
int x = Currentbuf->cursorX + Currentbuf->rootX,
|
||||
y = Currentbuf->cursorY + Currentbuf->rootY;
|
||||
|
||||
#ifdef USE_MOUSE
|
||||
if (mouse_menu && mouse_menu->in_action) {
|
||||
x = mouse_menu->cursorX - FRAME_WIDTH - 1;
|
||||
y = mouse_menu->cursorY;
|
||||
}
|
||||
#endif
|
||||
popupMenu(x, y, &SelTabMenu);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user