Ticket #1564 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Mouse wheel on history and menus

Reported by: dmartina Owned by: andrew_b
Priority: major Milestone: 4.7.0-pre3
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master

Description

Could we have the mouse wheel operate on menus and history list?

Attachments

wheel_on_panel.diff (707 bytes) - added by dmartina 9 years ago.
Smooth wheel movement on file panels

Change History

comment:1 Changed 9 years ago by slavazanko

if it will made someone more happy - must have :)

comment:2 Changed 9 years ago by andrew_b

  • severity changed from no branch to on review
  • Milestone changed from 4.7 to 4.7.0-pre3

Created branch 1564_mouse_wheel_menus_listbox. Parent branch: master.
changeset:99a05b076d97ab00067f186956d83fe413698dbb

comment:3 follow-up: ↓ 6 Changed 9 years ago by dmartina

Great for the menus! Both horizontal and vertical rotating! :-)

History is pending, isn't it? BTW, the Alt-h History also needs some way to escape. I mean a mouse based way to get the keyboard Esc-Esc behaviour and go back to the panels. Other dialogs have a «Cancel» button but this one doesn't (see, I'm not asking for it). Maybe clicking outside the dialog?

comment:4 follow-up: ↓ 7 Changed 9 years ago by dmartina

Hmm, some very fine tuning:

  • Wheel on first line rotates main menu
  • Wheel on a particular menu rotates this menu
  • Wheel outside makes menu loose focus and close. If over panel, panel and selection move.

I wouldn't close menus on wheel movement, just on key clicks. I don't now if this can be distinguished easily.

About the listing panels operated with the mouse wheel, when window is at top or bottom of the list, then selection "jumps" to first/last item. It may be smoother: keep window and decrease/increase selection in single steps.

comment:5 Changed 9 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted

comment:6 in reply to: ↑ 3 ; follow-up: ↓ 8 Changed 9 years ago by andrew_b

Replying to dmartina:

Maybe clicking outside the dialog?

Already done! :) http://www.midnight-commander.org/ticket/312#comment:15

comment:7 in reply to: ↑ 4 ; follow-up: ↓ 10 Changed 9 years ago by andrew_b

  • severity changed from on review to on rework

Replying to dmartina:

I wouldn't close menus on wheel movement, just on key clicks. I don't now if this can be distinguished easily.

I'll try fix that.

comment:8 in reply to: ↑ 6 ; follow-up: ↓ 9 Changed 9 years ago by dmartina

Replying to andrew_b:

Already done! :) http://www.midnight-commander.org/ticket/312#comment:15

I've found it in the ini file! Why does it default to 0?

comment:9 in reply to: ↑ 8 Changed 9 years ago by dmartina

Replying to dmartina:

I've found it in the ini file! Why does it default to 0?

Sorry, now I do have read the whole thread about it :) I think that it may be optional for common dialogs (with «Cancel»), but if this one doesn't have other means of mouse-closing...

I don't want to reopen the debate. For my personal use it's fair enough to have the option as is, and now I have permanently set it.

comment:10 in reply to: ↑ 7 Changed 9 years ago by andrew_b

Replying to andrew_b:

Replying to dmartina:

I wouldn't close menus on wheel movement, just on key clicks. I don't now if this can be distinguished easily.

I'll try fix that.

changeset:cfe4310a4a758955a4bbf924392ee9b0344754bb

comment:11 Changed 9 years ago by andrew_b

  • severity changed from on rework to on review

comment:12 follow-up: ↓ 14 Changed 9 years ago by dmartina

Much better (background clapping).

Let's do some more checking about boundary conditions.

  • When rolling over the right border then selection moves, but not on left, top nor bottom lines (I'm testing with konsole+KDE+Ubuntu). Is that the expected behaviour?
  • With Spanish locale, the two last menus (that is "right" and "options") are pushed to the right edge of the window and it doesn't process wheel movements on the two rightmost positions (border line and margin space). In fact, if you click there menu closes! You may reproduce this under default C locale resizing the window to a smaller width.

None of them really matters but you may want to check them.

Changed 9 years ago by dmartina

Smooth wheel movement on file panels

comment:13 follow-up: ↓ 15 Changed 9 years ago by dmartina

Replying to dmartina:

About the listing panels operated with the mouse wheel, when window is at top or bottom of the list, then selection "jumps" to first/last item. It may be smoother: keep window and decrease/increase selection in single steps.

I tried it and I got a patch for screen.c
Move to new ticket or just drop it?

comment:14 in reply to: ↑ 12 ; follow-up: ↓ 17 Changed 9 years ago by andrew_b

Replying to dmartina:

None of them really matters but you may want to check them.

OK, I'll check that.

comment:15 in reply to: ↑ 13 Changed 9 years ago by andrew_b

Replying to dmartina:

Replying to dmartina:

About the listing panels operated with the mouse wheel, when window is at top or bottom of the list, then selection "jumps" to first/last item. It may be smoother: keep window and decrease/increase selection in single steps.

I tried it and I got a patch for screen.c

Nice. :) I like the new behavior. Thanks!

Move to new ticket or just drop it?

I think, there is no reason for new ticket. I'll commit your patch to this branch a bit later, after all menu changes.

comment:16 Changed 9 years ago by andrew_b

  • severity changed from on review to on rework

comment:17 in reply to: ↑ 14 Changed 9 years ago by andrew_b

Replying to andrew_b:

Replying to dmartina:

None of them really matters but you may want to check them.

OK, I'll check that.

changeset:c956ba349f6cb630335f44f5302bdf168d81ed3f

comment:18 Changed 9 years ago by angel_il

this branch broke mouse wheele behaviour when mc started in putty

comment:19 Changed 9 years ago by angel_il

*wheel

comment:20 Changed 9 years ago by andrew_b

  • severity changed from on rework to on review

Most implemented or fixed mouse wheel support items:

  • scroll of listboxes
  • smooth panel scrolling in first and last pages
  • inactive panel is not scrollable now
  • horizontal rotation of main menu
  • vertical rotation of dropped menu

Also

  • if main menu is hidden, single left click on the first screen row calls menu in all panel type: file list, info, tree, quick view
  • single mouse click outside menu area closes menu
  • if menu is dropped, single middle click executes the selected menu item independently of mouse pointer location

Known problem: if main editor menu is rotated by mouse wheel, it is not refreshed if MC is run under PuTTY.

Please review.

comment:21 Changed 9 years ago by slavazanko

  • Votes for changeset set to slavazanko

Well... behavior in putty it's a another bug. If someone have putty - new tickets with patches are welcome ;)

All work fine. Vote here.

comment:22 Changed 9 years ago by dmartina

  • Votes for changeset changed from slavazanko to slavazanko dmartina

I use putty and I was trying this. Putty behaviour is as good or as bad as it used to be...

comment:23 Changed 9 years ago by angel_il

  • Votes for changeset changed from slavazanko dmartina to slavazanko dmartina angel_il
  • severity changed from on review to approved

comment:24 Changed 9 years ago by andrew_b

  • Votes for changeset changed from slavazanko dmartina angel_il to commited-master
  • severity changed from approved to merged

Merged to master.

git log --pretty=oneline c66f620..1f0b05b

comment:25 Changed 9 years ago by andrew_b

  • Status changed from accepted to testing
  • Resolution set to fixed

comment:26 Changed 9 years ago by andrew_b

  • Status changed from testing to closed

comment:27 Changed 9 years ago by andrew_b

  • Status changed from closed to reopened
  • Votes for changeset commited-master deleted
  • severity changed from merged to no branch
  • Resolution fixed deleted
  • Version changed from 4.7.0-pre1 to master
  • Type changed from enhancement to defect

Segfault on GPM_DRAG mouse event above or below drop-down menus.

comment:28 Changed 9 years ago by andrew_b

  • severity changed from no branch to on review

Created 1564_menu_mouse_drag branch. Parent branch master.
changeset:b1721e5b5efcbdc45603a87423f33b5d091e20a6

comment:29 Changed 9 years ago by slavazanko

  • severity changed from on review to on rework

Bug present in anyway :)

comment:30 Changed 9 years ago by andrew_b

  • severity changed from on rework to on review

comment:31 Changed 9 years ago by iNode

  • Votes for changeset set to iNode

Looks good.

comment:32 Changed 9 years ago by angel_il

  • Votes for changeset changed from iNode to iNode angel_il
  • severity changed from on review to approved

comment:33 Changed 9 years ago by andrew_b

  • Status changed from reopened to closed
  • Votes for changeset changed from iNode angel_il to commited-master
  • Resolution set to fixed
  • severity changed from approved to merged
Note: See TracTickets for help on using tickets.