erickutcher / httpdownloader

HTTP(S) download manager that uses input/output completion ports (IOCP).
https://erickutcher.github.io/#HTTP_Downloader
558 stars 62 forks source link

Home/End keys do not work #162

Closed smaragdus closed 3 years ago

smaragdus commented 3 years ago

In version 1.0.4.1 Home and End keys do not work while in version 1.0.3.1 Home key navigates to the first download in the list and End key navigates to the last download in the list. I do not know exactly when this bug appeared as I updated from version 1.0.3.1 directly to version 1.0.4.1.

erickutcher commented 3 years ago

Starting with 1.0.3.2, I replaced the listview control with a custom treelistview control. I created it so that multi-host/mirrored downloads would display nicely. I guess I overlooked some keyboard stuff. Should be easy enough to implement.

erickutcher commented 3 years ago

I implemented Home, End, Page Up, and Page Down support.

smaragdus commented 3 years ago

@erickutcher

Thanks very much for the explanation. I used an older version for too long and although I usually read what was new in the new versions I was not well-acquainted with the new features.

I implemented Home, End, Page Up, and Page Down support.

This is essential for me (especially the end key). Thank you for re-adding key controls!

erickutcher commented 3 years ago

A new version is up.

smaragdus commented 3 years ago

@erickutcher

I tested version 1.0.4.2 and unfortunately it does not work as it used to work in version 1.0.3.1. Some issues:

I think that the implementation of 'Home' key and 'End' key commands is buggy.

Please confirm.

smaragdus commented 3 years ago

I would like to explain what I expect when I execute 'Home'/'End' keyboard commands.

smaragdus commented 3 years ago

One last example of the issues I have with version 1.0.4.2:

I hope that this behaviour is reproducible.

erickutcher commented 3 years ago

The scrolling behavior is correct, but I don't have it set to select anything. I see now what the standard ListView control does. I can replicate that behavior.

smaragdus commented 3 years ago

@erickutcher

So you mean that it would be possible to replicate the behaviour Home/End keyboard commands had until version 1.0.3.1?

erickutcher commented 3 years ago

Yes, I'll make it behave the same as the earlier version.

smaragdus commented 3 years ago

@erickutcher

Yes, I'll make it behave the same as the earlier version.

For me this is a huge relief. I have been using HTTP Downloader since the very early versions of the program (I believe, since version 1.0.0.6) and for the first time I have been seriously considering to downgrade to a previous version (1.0.3.1) since my download needs are rather basic- as I have set it up I almost do not interact with the program, all downloads are automatic and work in 99.99% of the cases, I only open the main window of the program from time to time to copy certain download URLs and in such cases I depend on Home/End keyboard commands for swift navigation up and down the download list. For me the new tree list view control has no practical advantages over the old list view control as I download files from a single host and do not need mirrored downloads. What I would lose if I downgrade would be the site manager (which I have not yet used) and the extended FTP support (for FTP stuff I mostly use FTP clients, very rarely I encounter FTP download links posted on web-sites). So for me working Home/End keyboard commands which replicate the behaviour of these commands before the new tree list view control was implemented is essential.

erickutcher commented 3 years ago

Here's a 1.0.4.3 release preview if you'd like to try it: HTTP_Downloader.zip

I did change the settings file in this version. I wanted to reorganized and clean up the code for that. I hate having to force a settings reset, but sometimes it's necessary.

The TreeListView is significantly faster than a standard ListView. You can load and process tens of thousands of entries in a second and there's no graphical anomalies when scrolling long lists. You'll notice the difference between this version and the older one when doing Page Down on a long list. The overall memory footprint should be smaller too.

Anyway, let me know if this version works as you'd expect.

smaragdus commented 3 years ago

@erickutcher

Thank you for the detailed explanation.

I will download the preview release and will test it briefly because I will soon have to go out. I hope that tomorrow I will have more time for testing.

Thanks

smaragdus commented 3 years ago

@erickutcher

I did a brief test (I downloaded 7 files).

What I observed:

I think that Scroll to last item when adding URL(s) has been discussed in the past in several separate issues. Now I find it perfectly implemented. I find this feature quite useful.

One question, not request- Home, End, PageUp and PageDown keys work even in Options window but do not work inside Advanced tab (when active) which also has a scroll bar (as it contains lots of options), would it be possible these Home, End, PageUp and PageDown keys to work also inside Advanced tab when it is active?

So far 1.0.4.3 preview release works just perfectly for me. I will test it more tomorrow.

Thank you for your excellent work!

Regards

erickutcher commented 3 years ago

Do you mean the Appearance tab instead the Advanced tab? That's the only options window that has a scrollbar. I implemented Home, End, Page Up/Down for that. Navigating it is kind of tricky, but it can all be done using the keyboard. Tabs and arrow keys allow you to change the focus. When the Appearance item in the tree is selected with the keyboard, the window frame on the right will be focused and Home, End, etc. will be able to control the scrollbar.

smaragdus commented 3 years ago

@erickutcher

I did some more testing and I can conclude that Home - End - PageUp - PageDown keys work in all cases and the behaviour is absolutely the the same as it was prior to list view control was implemented.

The TreeListView is significantly faster than a standard ListView. You can load and process tens of thousands of entries in a second and there's no graphical anomalies when scrolling long lists. You'll notice the difference between this version and the older one when doing Page Down on a long list. The overall memory footprint should be smaller too.

As far as I can remember when the download list was huge (1000+ downloaded items) sometimes scrolling was not very smooth, it was choppy.

Do you mean the Appearance tab instead the Advanced tab? That's the only options window that has a scrollbar.

Yes, my mistake I meant Appearance, not Advanced.

I implemented Home, End, Page Up/Down for that. Navigating it is kind of tricky, but it can all be done using the keyboard. Tabs and arrow keys allow you to change the focus. When the Appearance item in the tree is selected with the keyboard, the window frame on the right will be focused and Home, End, etc. will be able to control the scrollbar.

If you think this is a useless feature which just bloats the code, remove it.

By the way there are two check boxes in Appearance tab which perplex me:

as I cannot see what actually changes when these options are enabled.

In conclusion, I find the preview of 1.0.4.3 version ready for new release (at least as the keyboard commands are concerned).

Thanks

erickutcher commented 3 years ago

I made the Appearance window scroll when items are focused with the tab key. The Home, End, etc. keys also work like how I mentioned above.

Draw full rows will draw the row beyond the last column. Draw all rows will draw the rows beyond the last item entry. The effects are noticeable when there's no scrollbars and the window is maximized.

smaragdus commented 3 years ago

@erickutcher

Thanks for all the explanations. I am waiting for the new release (but I am not impatient).

Regards

erickutcher commented 3 years ago

A new version is up.

smaragdus commented 3 years ago

@erickutcher

I have just read the change log. I will download and test. I am not sure whether the download history will be lost with version 1.0.4.3. I will check that as well and respond here.

smaragdus commented 3 years ago

@erickutcher

I checked version 1.0.4.3 and at first glance everything seems fine. Download history is intact! Navigation via keyboard Home - End - PgUp - PgDn keys works fine. These keys also work inside Appearance tab when it is focused. However I noticed something which I don't know whether it is a glitch or it is by design. When General, the first tab in options, is active and I hit End key it navigates to the last tab in Options- Advanced, but it does not select it so hitting Home key would not navigate back to the first tab in Options- General. Is this by design?

Many thanks for the new version- 1.0.4.3!

erickutcher commented 3 years ago

Each category of settings exists in their own window and they're children of the main Options window. When an item in the treeview is selected using the keyboard, focus is transferred to the child window. It's necessary, at least in the case of the Appearance options, so that you can use the Home/End, etc. keys on it since it has a scrollbar.

Tabbing and arrow keys are a better way to navigate it even though it's cumbersome.

smaragdus commented 3 years ago

@erickutcher

Thank you for the explanation. I am closing this issue.

Regards

erickutcher commented 3 years ago

I've updated the navigation of the Options window in the latest release. The tree on the left, when focused, can be navigated with the up and down arrow keys. Pressing tab while it's focused will set focus to the first setting in the child window on its right. I think it's a little more intuitive now. The Appearance child window is the only one that can scroll up and down with the Home/End/Page Up/Page Down keys. To be able to do that, you have to press tab once when the Appearance tree item is selected. That causes the focus to change to the Appearance child window and gives it the ability to scroll. Pressing tab again will set focus to the first setting in the Appearance child window.

smaragdus commented 3 years ago

@erickutcher

Thanks for the new release and for the information!

I will have a look perhaps tomorrow.

Best regards!

smaragdus commented 3 years ago

@erickutcher

I tested both versions 1.0.4.4 and 1.0.4.5 and I find the keyboard control implementation perfect! Actually it is so perfect that it looks like a bit of overkill. perfection for the sake of perfection! I like such approach anyway. For me HTTP Downloader has become the embodiment of perfection. So fortunately or unfortunately I don't expect to open new issues in the foreseeable future. :)

When I first discovered your download manager I didn't have an idea what a great program it would become.

Great work as usual, thanks!

smaragdus commented 3 years ago

Off-topic, I thought that the Firefox extension was discontinued as I didn't see it updated on the Releases but several minutes ago I discovered it on Firefox add-ons page so I had the honour to be the first to post a review.

erickutcher commented 3 years ago

I appreciate that. Yeah, I switched it over to a public release about three versions ago so that it would auto-update. Makes it easier for everyone. I did the same for the Edge browser.

smaragdus commented 3 years ago

@erickutcher

Yeah, I switched it over to a public release about three versions ago so that it would auto-update.

I prefer manual updates and one of the aspects I hate most about Chromium is that auto-update of extensions cannot be turned off (long ago it was possible to disable auto-update by modifying the manifest files but this is no longer possible), it often happens that a new version of an extension is faulty, or even worse- outright malware (a recent example was The Great Suspender extension which was acquired by new shady developers who turned it into malware). At least Mozilla still allows to disable auto-updates of extensions and to download previous versions. So you won't publish new versions of Firefox extensions on Releases page? Perhaps it might be better to publish the extension both on Mozilla add-ons and on GitHub? Although rarely compared to Chrome Web Store, Mozilla also removes extensions from its store for no apparent reason.

I did the same for the Edge browser.

I am curious- do you know whether one can install extensions from M$ store on Chromium-based, not Edge, browsers? Is the Edge extension different from the Chrome one?

Regards

erickutcher commented 3 years ago

I uploaded the Firefox WebExtension to the Releases page. Seems it would only be useful for those who disable the automatic updates.

You can't directly install the Edge extension in Chrome. The Edge extension, however, is the exact same thing as the Chrome one. In fact, I just upload the Chrome one to Microsoft and they do their thing with it to sign it for Edge. Since I don't want to pay Google to use their extension store, the only way to get it working in their browser is to load the unpacked (unzipped) extension with Developer mode enabled.

Vivaldi and Opera are the only two Chromium browsers I've used that don't complain about the .crx extension.

smaragdus commented 3 years ago

@erickutcher

Thanks for uploading the Firefox extension. Actually I use a Firefox fork rarely, just to test some extensions, not available for Chromium-based browsers.

My default browser- Cent Browser, does not complain about CRX either, but I am not using the latest version.