Bug 169348

Summary: Kwrite 'Save As' won't auto-fill existing filename if it is a remote file
Product: [Unmaintained] kio Reporter: Mark A. Taff <kde>
Component: kfileAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: normal CC: adawit, christoph
Priority: NOR    
Version: 4.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.1
Sentry Crash Report:
Attachments: proposed kate specific patch...

Description Mark A. Taff 2008-08-18 11:10:26 UTC
Version:            (using KDE 4.1.0)
OS:                Linux
Installed from:    SuSE RPMs

Kwrite 'SaveAs' will not auto-fill the existing filename in the save as dialog when opening a file from the Internet, e.g. (http://www.pierceive.com/filtersetg/2008-03-08a-MERGED.txt).  It should do so, so all I have to tell it is what folder to save the file to.  Save As is not always used to create a copy of an existing file with a new name, but sometimes used to save a local copy of a remote file where you want to keep the same name.

If the filename is auto-filled, *and* selected, then a quick <delete> or <backspace> can delete it in the cases where the user wants to start from scratch.

Thanks.
Comment 1 Christoph Cullmann 2008-08-18 22:58:09 UTC
We give the KEncodingFileDialog the full URL, it decides to not fill it...
Comment 2 Dawit Alemayehu 2012-01-30 02:15:04 UTC
(In reply to comment #1)
> We give the KEncodingFileDialog the full URL, it decides to not fill it...

But you are not doing it correctly. That is why it does not work. If you read the documentation for KEncodingFileDialog::getSaveUrlAndEncoding 's StartDir parameter, you will see how you have to specify it so that the filename will be used for non-local URLs. I have a review request, https://git.reviewboard.kde.org/r/103642/, to address this in a central location so it won't have to be done on per app basis, but no one has elected to review it so far.

In the alternative you can use the attached kate patch to make kate do the right thing.
Comment 3 Dawit Alemayehu 2012-01-30 02:15:52 UTC
Created attachment 68322 [details]
proposed kate specific patch...

This is only an alternate to the patch currently in reviewboard.
Comment 4 Dawit Alemayehu 2012-02-21 18:17:16 UTC
Git commit 37ff4f63f23b36e6025298ec31989475127aac79 by Dawit Alemayehu.
Committed on 21/02/2012 at 19:13.
Pushed by adawit into branch 'KDE/4.8'.

Make KFileWidget provide default filename even when the protocol does not
support listing.
FIXED-IN: 4.8.1
REVIEW: 103642

M  +3    -1    kfile/kfilewidget.cpp

http://commits.kde.org/kdelibs/37ff4f63f23b36e6025298ec31989475127aac79