[PATCH] List view renaming
David Faure
david at mandrakesoft.com
Mon Oct 7 10:09:21 BST 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 07 October 2002 00:01, John Firebaugh wrote:
> Attached patch fixes two bugs with renaming items.
>
> http://bugs.kde.org/show_bug.cgi?id=38166
> http://bugs.kde.org/show_bug.cgi?id=46501
>
> Seems to me that a better behavior on renaming is not to actually change the
> item text until the (asynchronous) rename operation sucessfully completes.[1]
Hmm. In the iconview I chose to show the new name (assume success), and only revert
if it failed.
> KListView doesn't make this easy, and much as I would like to fix it there, I
> don't think it can be done in a BC way (would need to add a virtual
> slotItemRenamed). So I hacked around it in KonqBaseListViewWidget.
Is there no way of implementing the same behaviour as the one in the iconview?
KonqIconViewWidget::renamingFinished reverts to the old text in case of failure.
Hmmm. Does this mean bug 38166 happens in the iconview too?
> While I
> was at it, I forbid renames to blank text to do anything, which is what MacOS
> does. The behavior before was very confusing.
Ouch, indeed.
> [1] Even better, a) don't allow renames if we detect that permissions will
> forbid it
Permissions sometime lie, e.g. on broken FTP servers...
Would make sense for local files though.
> and b) detect a rename to an already existing file and warn
> _before_ even hiding the edit box. I'll leave these as exercises for the
> reader. :)
;)
- --
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9oU9C72KcVAmwbhARAsT3AJ46KLDLdBCBcO1r9aX2PQoFR+37hQCePEVX
w7HSi53dYs6KPbaPf/WtUBc=
=c9pW
-----END PGP SIGNATURE-----
More information about the kfm-devel
mailing list