mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* screen.c (panel_event): Implement support for mouse wheel.
This commit is contained in:
parent
2e3fc9234b
commit
ac608302f8
@ -1,5 +1,7 @@
|
||||
2002-09-24 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* screen.c (panel_event): Implement support for mouse wheel.
|
||||
|
||||
* view.c (display): Fix wrapping of tabs.
|
||||
Reported by Arpad Biro <biro_arpad@yahoo.com>
|
||||
|
||||
|
2
src/TODO
2
src/TODO
@ -14,8 +14,6 @@ Add support for mouse wheel with gpm.
|
||||
|
||||
Recheck all mouse handlers, make sure that they check button number.
|
||||
|
||||
Make mouse wheel work on the panels.
|
||||
|
||||
ncurses 5.2 turns off keypad under heavy load on xterm. Check if
|
||||
anything can be done about it.
|
||||
|
||||
|
13
src/screen.c
13
src/screen.c
@ -2282,16 +2282,29 @@ panel_event (Gpm_Event *event, WPanel *panel)
|
||||
|
||||
int my_index;
|
||||
|
||||
/* Mouse wheel events */
|
||||
if ((event->buttons & GPM_B_UP) && (event->type & GPM_DOWN)) {
|
||||
prev_page (panel);
|
||||
return MOU_NORMAL;
|
||||
}
|
||||
if ((event->buttons & GPM_B_DOWN) && (event->type & GPM_DOWN)) {
|
||||
next_page (panel);
|
||||
return MOU_NORMAL;
|
||||
}
|
||||
|
||||
/* "<" button */
|
||||
if (event->type & GPM_DOWN && event->x == 1 + 1 && event->y == 0 + 1) {
|
||||
directory_history_prev (panel);
|
||||
return MOU_NORMAL;
|
||||
}
|
||||
|
||||
/* ">" button */
|
||||
if (event->type & GPM_DOWN && event->x == panel->widget.cols - 2 + 1 && event->y == 0 + 1) {
|
||||
directory_history_next (panel);
|
||||
return MOU_NORMAL;
|
||||
}
|
||||
|
||||
/* "v" button */
|
||||
if (event->type & GPM_DOWN && event->x == panel->widget.cols - 3 + 1 && event->y == 0 + 1) {
|
||||
directory_history_list (panel);
|
||||
return MOU_NORMAL;
|
||||
|
Loading…
Reference in New Issue
Block a user