Bug 26255 - Bookmarks created by drag and drop: 'Name' should be the page title, not the URL
Summary: Bookmarks created by drag and drop: 'Name' should be the page title, not the URL
Status: CONFIRMED
Alias: None
Product: keditbookmarks
Classification: Applications
Component: general (other bugs)
Version First Reported In: 1.0
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konqueror Bugs
URL:
Keywords:
: 36148 119199 190458 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-05-27 13:48 UTC by tmb-kde-bugs
Modified: 2025-06-05 13:37 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tmb-kde-bugs 2001-05-27 13:38:03 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           keditbookmarks
Version:           1.0 (using KDE 2.1.2 )
Severity:          wishlist
Installed from:    Debian Package 4:2.1.2-2 (testing/unstable)
Compiler:          gcc version 2.95.4 20010319 (Debian prerelease)
OS:                Linux 2.4.4 i686
OS/Compiler notes: 

When dragging a URL from Konqueror into KEditBookmarks the name of the URL is derived from the last component.  It would be more useful if the name was derived from the title of the document like it is for "Add Bookmark" and in other browsers.

I suspect the current behavior is because KEditBookmarks doesn't receive the title as part of the drop.  The workarounds I can think of is to add another drop type for drops from Konqueror that includes both the URL and the title or to have a global cache of URLs and titles that KEditBookmarks can consult for the mapping.

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 lypanov 2003-02-21 14:13:36 UTC
*** Bug 36148 has been marked as a duplicate of this bug. ***
Comment 2 lypanov 2003-10-16 23:35:38 UTC
this is really a feature, but hopefully i'll get it finished by 3.2 in any case.

Alex
Comment 3 Frank Reininghaus 2009-02-09 22:16:32 UTC
*** Bug 119199 has been marked as a duplicate of this bug. ***
Comment 4 Frank Reininghaus 2009-02-09 22:19:00 UTC
I think fixing this is not as easy as duplicating the menu's "Add Bookmark" functionality (as some commenters in the duplicate reports suggested). "Add Bookmark" happens inside the application while drag&drop is a cross-application thing (note that you can drag the favicons from Konqueror's location bar or the tabs to the Firefox bookmark toolbar and vice versa).

To fix this issue, 2 things must be changed:

1. When the drag event is started, the QDrag object must be given MIME data not only for the URL, but also for the page title. Firefox seems to provide this in the MIME types "text/x-moz-url" and "_NETSCAPE_URL" (both contain first the URL, and then the page title).
In Konqueror, the creation of the QDrag object seems to happen in KonqDraggableLabel::mouseMoveEvent().

2. When the drop event is accepted, the page title must be read from the MIME data of the drop event. Both KEditBookmarks and the Konqueror bookmarks bar parse the MIME data using KBookmark::List::fromMimeData(). Changing this function accordingly would therefore fix this wish and all duplicates.

The problem is that both KonqDraggableLabel::mouseMoveEvent() and KBookmark::List::fromMimeData() rely on KUrl's methods for the MIME data generation and parsing, and KUrl does not seem to support a title in addition to the actual URL. So the required code change appears to be non-trivial :-(
Comment 5 Frank Reininghaus 2009-04-23 20:39:47 UTC
*** Bug 190458 has been marked as a duplicate of this bug. ***