Version: unspecified (using Devel)
If a custom folder view location is set in the "Location" configuration page, it is not saved over logout/login. The location reverts to $HOME/Desktop (for a folder view as the main desktop containment) every time.
The problem can also be reproduced with plasmoidviewer (see below).
Steps to Reproduce:
Start with a blank configuration (remove the files $HOME/.kde/share/config/plasmoidviewer-appletsrc and $HOME/.kde/share/config/plasmoidviewerrc), then run 'plasmoidviewer folderview'. It will show the contents of $HOME.
In "Folder View Settings - Location", set the location to "/tmp" and OK. The folder view will show the contents of that location as expected.
Close the plasmoidviewer and run it again. It will revert back to showing $HOME.
Would expect the configured location to be saved and used next time.
The specified location is not saved (with key "url") in either configuration file.
The problem seems to be the code in kde-baseapps/plasma/applets/folderview/folderview.cpp, function FolderView::configAccepted():
if (m_url != url || m_filterFiles != uiFilter.filterFilesPattern->text() ||
m_filterFilesMimeList != selectedItems || m_filterType != filterType)
At the start of this, 'url' is the new URL as entered by the user. The setUrl() unconditionally sets m_url to this, which means that the first term of the comparison below is always false and, if nothing else has changed, the cg.writeEntry("url", m_url) is not executed. Hence the changed URL is not written to the configuration file (unless something else has also changed).
Removing the setUrl() on the second line of the code above appears to solve the problem. This was added as part of revision 40f36dd3cdd7f6604c0b6f2179c42dc053190fbe, review 100750.
Git commit fc5cd12616238a7eac532401bc0d176470aa274c by Farhad Hedayati Fard.
Committed on 02/06/2011 at 09:24.
Pushed by hedayatifard into branch 'master'.
Fix folderview behaivior on saving custom locations and
default widget title in init() function.
M +36 -30 plasma/applets/folderview/folderview.cpp
M +1 -0 plasma/applets/folderview/folderview.h