Bug 172647 - Cannot edit the bookmark address of a kate "yellow star" bookmark
Summary: Cannot edit the bookmark address of a kate "yellow star" bookmark
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Daniel Teske
URL:
Keywords:
: 171193 179061 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-12 11:49 UTC by tjabo kloppenburg
Modified: 2008-12-29 19:00 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Line edits in the bookmark dialog are messed up. (44.35 KB, image/png)
2008-11-01 12:55 UTC, Simon St James
Details
Candidate patch for this issue. (1.31 KB, patch)
2008-12-27 19:48 UTC, Simon St James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tjabo kloppenburg 2008-10-12 11:49:43 UTC
Version:           3.1.2 (using KDE 4.1.2)
OS:                Linux
Installed from:    Ubuntu Packages

1. Open kate
2. Menu: "File"/"Open..."
3. Enter a "sftp://" url in address field (ssh key in agent) and press ENTER: example: "sftp://myuser@myhost.de/var/www/vhosts"
4. Click on a subfolder
5. Click on yellow star and "add bookmark" (de: "Lesezeichen hinzufügen")
6. Click on yellow star and manage bookmarks (de: "Lesezeichen bearbeiten...")
7. Select the bookmark with the sftp:// address

Now try to change the bookmark address:
  - when pressing DEL somewhere in the text the char is deleted but the cursor jumps to the end of the text field
  - I cannot enter two slashes as need for every remote protocol
  - This is the same for adding a "new bookmark" within this dialog

So the editing functionality is not usable in this dialog.
Comment 1 Simon St James 2008-11-01 12:44:52 UTC
I can't reproduce the "DEL" behaviour using trunk - I suspect it is related to http://bugs.kde.org/show_bug.cgi?id=167637, which is fixed.

The inability to type "//" is there and this aspect is a dupe of https://bugs.kde.org/show_bug.cgi?id=171193.

In general, the KLineEdits in the dialog behave very oddly - for example, the "clear" button appears roughly a 1/4 of the way in to the text field (I'll attach a screenshot in a sec).

Assigning to Daniel, as I think he created the dialog class (this has nothing to do with Kate/ KWrite).
Comment 2 Simon St James 2008-11-01 12:55:46 UTC
Created attachment 28260 [details]
Line edits in the bookmark dialog are messed up.

The KLineEdits have the "clear" button in the wrong place (except for the Search box).
Comment 3 Simon St James 2008-12-27 19:05:09 UTC
*** Bug 171193 has been marked as a duplicate of this bug. ***
Comment 4 Simon St James 2008-12-27 19:40:23 UTC
"I cannot enter two slashes as need for every remote protocol"

This is because 

KUrl url("http://");
QString urlAsString = url.pathOrUrl();

gives urlAsString as "http:" (note the missing "//"), and the logic in BookmarkInfoWidget::showBookmark(...) will overwrite the text you have typed with this string.

I investigated a means to work around this precise situation and it worked, but then I ran into an additional problem: attempting to type the "." after http://kde wouldn't work :/

So I changed tack: what we really want to do is update the text box when the URL it represents does not match that of the bookmark, hence the patch below.  I've not found any regressions caused by this patch, but it would be nice if people could test thoroughly :)

Comment 5 Simon St James 2008-12-27 19:48:28 UTC
Created attachment 29676 [details]
Candidate patch for this issue.
Comment 6 Simon St James 2008-12-27 22:07:09 UTC
CC'ing uwolfer, as it looks like I might be trampling all over his code ;)
Comment 7 Aaron J. Seigo 2008-12-28 01:06:10 UTC
SVN commit 902291 by aseigo:

call updateClearButton in setReadOnly(false) instead of having some (buggy) clear icon management code in setReadOnly
CCBUG:172647


 M  +9 -17     klineedit.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=902291
Comment 8 Urs Wolfer 2008-12-28 14:54:41 UTC
Simon, I think you patch looks good.
Comment 9 Simon St James 2008-12-28 19:58:46 UTC
SVN commit 902594 by sstjames:

Update the text in the Location KLineEdit only when the actual URL it represents conflicts with that of the current bookmark, not when the textual representations of the URLs differ.

BUG:172647

 M  +12 -5     bookmarkinfo.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=902594
Comment 10 Urs Wolfer 2008-12-29 19:00:52 UTC
*** Bug 179061 has been marked as a duplicate of this bug. ***