Summary: | Renaming a newly-created file on the desktop causes it to lose position | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Eike Hein <hein> |
Component: | Folder | Assignee: | Eike Hein <hein> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | painless.roaster, plasma-bugs |
Priority: | NOR | ||
Version: | master | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/plasma-workspace/49a979d0bf90ac77f2117b2490ee1baeff469620 | Version Fixed In: |
Description
Eike Hein
2016-02-20 07:50:08 UTC
Based on bug 359457. CC'ing original reporter. Git commit cf8906a4ddac2472c35915f2c7820195e4562b3d by Eike Hein. Committed on 23/02/2016 at 13:32. Pushed by hein into branch 'master'. A series of changes to avoid a directory relist after a file rename in more cases. * Extend KProtocolInfo to allow a slave's .protocol file to declare the slave will handle producing certain notifications (here: Rename) by itself. * Make SimpleJob skip a call to the file rename notification interface when a slave declares it will handle the file rename notification itself. * Introduce a new version of the file rename notification interface in KDirNotify that can cary an optional local destination path, for special cases where we have a non-local URL that is actually a local file anyway that needs its UDS_LOCAL_PATH updated (example: desktop:/). * Extend KFileItem to allow updating its internal UDS_LOCAL_PATH. * Use the new expanded file rename notification interface and KFileItem API to update existing file items in KCoreDirLister also when they have a non- local URL but a local path, instead of resorting to a directory re-list. kio_desktop will be updated to implement rename() by itself and use the KDirNotify interface. Reviewed-by: faure@kde.org M +8 -3 src/core/kcoredirlister.cpp M +1 -1 src/core/kcoredirlister_p.h M +7 -0 src/core/kdirnotify.cpp M +10 -1 src/core/kdirnotify.h M +10 -0 src/core/kfileitem.cpp M +9 -0 src/core/kfileitem.h M +15 -0 src/core/kprotocolinfo.cpp M +13 -0 src/core/kprotocolinfo.h M +1 -0 src/core/kprotocolinfo_p.h M +5 -0 src/core/org.kde.KDirNotify.xml M +3 -1 src/core/simplejob.cpp http://commits.kde.org/kio/cf8906a4ddac2472c35915f2c7820195e4562b3d Git commit 49a979d0bf90ac77f2117b2490ee1baeff469620 by Eike Hein. Committed on 23/02/2016 at 13:48. Pushed by hein into branch 'master'. Implement rename() in a way that avoids losing custom icon positions. If built against KIO v5.20+ we use a new version of the KDirNotify file rename notification interface that allows providing enough information to allow KCoreDirLister to announce a file change instead of relisting the affected file(s) and causing position data to be lost. We also make use of a new mechanism for informing KIO that kio_desktop will in fact take care of producing the rename notification by itself, avoiding KIO::SimpleJob doing it as well (and losing the old, lossy interface since it doesn't have the same information we have available in kio_desktop). Reviewed-by: faure@kde.org M +1 -0 kioslave/desktop/desktop.protocol M +38 -25 kioslave/desktop/kio_desktop.cpp http://commits.kde.org/plasma-workspace/49a979d0bf90ac77f2117b2490ee1baeff469620 |