Scroll the Local and Remote List Views During Drag & Drop
Moderator: Project members
Scroll the Local and Remote List Views During Drag & Drop
Here is a patch that allows the local and remote file list views to scroll up when you a drag a file over the top item in the list and scroll down when you drag a file over the bottom item in the list.
- Attachments
-
- filezilla-3.5.3_Drag_Drop_Scroll_List_View01a.diff.txt
- (2.51 KiB) Downloaded 235 times
Re: Scroll the Local and Remote List Views During Drag & Dro
Thanks. While I like the general idea, the Sleep(50) is unacceptable. Please use a timer if you need to delay things.
Also, would it be possible to move the common code into listctrlex.cpp?
Also, would it be possible to move the common code into listctrlex.cpp?
Re: Scroll the Local and Remote List Views During Drag & Dro
Maybe more like this?
- Attachments
-
- FileZilla_3.5.3_Drag_Drop_Scroll_List_View01b.diff.txt
- (3.16 KiB) Downloaded 233 times
Re: Scroll the Local and Remote List Views During Drag & Dro
Thanks, it's in the repository now.
I've made a couple of changes so that it works without remembering the exact item, as the list might change underneath while doing a drag&drop operation, e.g. as result of a successful transfer. Also refactored the code into a new class so that it can be easily adapted to scroll the directory trees as well.
I've made a couple of changes so that it works without remembering the exact item, as the list might change underneath while doing a drag&drop operation, e.g. as result of a successful transfer. Also refactored the code into a new class so that it can be easily adapted to scroll the directory trees as well.
Re: Scroll the Local and Remote List Views During Drag & Dro
Directory trees seem to be a little bit harder since they can be expanded or collapsed. I think I have scroll down working but I need to add one more looping function call on scroll up to get the last child of the previous sibling.
Although it seems to be almost working, I don't think the code is going to be as efficiently written as you will want.
Although it seems to be almost working, I don't think the code is going to be as efficiently written as you will want.
Re: Scroll the Local and Remote List Views During Drag & Dro
So, this seems to get the job done: scrolls both the remote and local tree views during drag & drop.
- Attachments
-
- FileZilla_3.5.3.0_Drag_Drop_Scroll_Tree_View01a.diff.txt
- (9.9 KiB) Downloaded 225 times
Re: Scroll the Local and Remote List Views During Drag & Dro
Thanks, looking promising. One further request though: There's lots of similar logic between the drop targets for lists and trees. Would it be possible to move the common functionality into a common base class?
Also, there's something in the patch that tells me that you didn't try it under a non-Windows system.
Also, there's something in the patch that tells me that you didn't try it under a non-Windows system.