Hide MessageWidget when user changes the URL
Review Request #110369 - Created May 8, 2013 and submitted
|Kai Uwe Broulik|
This patch makes Dolphin hide the MessageWidget as soon as the user manually changes the URL by editing the address bar or entering another folder. I, personally, consider the MessageWidget shifting the view down not distracting or annoying, more the fact that it stays there forever until you close it. Imho it makes sense to hide the MessageWidget as soon as the URL is changed by the user because usually the message only contains information relevant to the current view as is. For example trying to delete a folder that you are not allowed to, as soon as you change into another folder, you don't see the one you're trying to delete and so there is no point in having it still tell you you couldn't. Or, if you try to access a folder you're not allowed to, you get an empty view and have to go back/leave manually anyway, so you will have noticed the empty view and the error.
- Try to delete a folder you're not allowed to and go to another folder ? Message Widget closes - Try to access a folder you're not allowed to and go back ? Message Widget closes - Try to access a folder that doesn't exist and enter another URL manually ? Message Widget closes - Try to access a folder that doesn't exist and go to another location by clicking a parent breadcrumb ? Message Widget closes Only issue I have found so far: 1. Navigate to ftp://someserverthatdoesntexist.com ? Get "Could not connect message" 2. Navigate to ftp://anotherserverthatdoesntexist.com ? The MessageWidget closes but the error message KIO produces is emitted before the MessageWidget is fully closed (when it animates) and so the error is discarded and you do not get an error. (We probably need to cancel the hide animation and/or force a new one to be shown anyways) I am not sure if the place I put it is the right one, as I only intended to make the widget hide when changing location via URL bar but turned out it also changes when clicking a folder in the view (whose behavior is fine imho but the code should probably connect to the view url changed signal?)
Review request changed
Patch Revision 1 does what I have described in this review's description. This Patch Revision 2 does the hiding in the URL changed slot of the view. Both seem to produce the same result.
Revision 2 (+13)
Thanks for the patch! Funny - I've been looking into this issue a few days ago. This is what I came up with: http://paste.kde.org/740900/ I think that this approach works better because it does not have the issue that you have pointed out. What do you think?