Bug 188129 - KUrlRequester should replace content on drag&drop
Summary: KUrlRequester should replace content on drag&drop
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-26 04:58 UTC by Christoph Burgmer
Modified: 2009-03-27 16:46 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Burgmer 2009-03-26 04:58:48 UTC
Version:            (using KDE 4.2.1)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Droping a file on KUrlRequester does insert the path of that file at the spot of the drop without replacing former content. So a URL get's inserted into another existing URL instead of replacing it.
While this seems to be the default behaviour for text edits combining to path's does not make sense.

A usecase is Kompare, KDE's diff viewer, that remembers and display's the currently displayed files' paths in the widgets. Droping a new file will not replace that content.
Comment 1 David Faure 2009-03-26 10:52:48 UTC
... but that's the usual behavior when dropping text.
Doesn't konqueror's location bar work just the same?
I thought this was the whole purpose of the embedded "clear" button.
It does show in KUrlRequester, right?
Comment 2 Christoph Burgmer 2009-03-26 11:22:40 UTC
Thanks for the feedback.

Well, I can not say that I am pretty confident about my suggestion, but with the usecase given I would say that there is pretty much a usability problem. Now, either the widget, the program or I'm doing it wrong.

I agree that droping text will and should insert at the given position, but in my case I was dropping a file. Am I correct in assuming that in general KDE libraries do make a difference between both in drag and drop? Could the widget just distinguish between the object dropped? When dropping a file I would believe nobody is actually trying to manipulate a previously entered string by inserting a absoulute path name, so that "replace" should be the only option.
Comment 3 David Faure 2009-03-26 12:08:40 UTC
Ah ok, dropping a file, not the copied-URL-of-a-file.
Now that makes a lot of sense indeed.

I'll have a look at this.

It applies to the konqueror location bar too, in fact.

Makes me wonder if I should do this for all lineedits, i.e. in KLineEdit.
Comment 4 David Faure 2009-03-26 13:52:38 UTC
SVN commit 944893 by dfaure:

When dropping a URL into a single-url-lineedit like KonqCombo or KUrlRequester,
better usability is to replace the current text with the new url, rather than insert/append.
BUG: 188129


 M  +21 -11    klineedit.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=944893
Comment 5 FiNeX 2009-03-27 09:44:44 UTC
@David: could this be similar to #152126 ?
Comment 6 David Faure 2009-03-27 16:46:48 UTC
FiNeX: unfortunately not. 152126 is about khtml's event handling, which prevents the KLineEdit code from being called at all.