Bug 175085 - Icons view settings aren't saved
Summary: Icons view settings aren't saved
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 168546 171671 175147 182550 184315 186643 188484 188610 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-13 23:04 UTC by Jean-Philippe Fleury
Modified: 2009-07-28 20:41 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Philippe Fleury 2008-11-13 23:04:38 UTC
Version:            (using KDE 4.1.3)
OS:                Linux
Installed from:    Ubuntu Packages

To always reproduce the bug:

- In Konqueror, go to "Settings -> Configure Konqueror... -> File Management -> Views -> Icons".
- "Text width" is "Small". Set it to "Medium".
- Go to "Change Icon & Preview Size...".
- Change "Icon Size", for example set it a bit more large. Click on "OK". Click on "Apply".
- Close the config window.

Until we close Konqueror, the icons view is OK, so is like we've just set. But close Konqueror and reopen it, and the settings are lost. "Text width" is again "Small" and not "Medium". "Icon Size" is again a bit more small.
Comment 1 Jean-Philippe Fleury 2008-11-13 23:13:49 UTC
If I make these modifications using Dolphin instead of Konqueror, it's saved. So it seems that there's a bug only with the Konqueror file management.
Comment 2 FiNeX 2008-11-13 23:25:56 UTC
@Peter: sorry for the disturb, but you should know who could be added on CC in this report. Thanks :-)
Comment 3 Peter Penz 2008-11-13 23:48:16 UTC
Hmm, I was quite sure I fixed this issue for KDE 4.1.0 already. For sure David Faure could also have a look on this, but he is very busy with really tricky issues and I think I can take over this task :-)
Comment 4 FiNeX 2008-11-14 00:38:53 UTC
You're great Peter! Thanks!
Comment 5 Frank Reininghaus 2008-11-15 00:55:40 UTC
*** Bug 175147 has been marked as a duplicate of this bug. ***
Comment 6 Frank Reininghaus 2008-11-15 00:57:31 UTC
The reporter of bug 175147 noted that tooltip settings are not saved either (I can confirm in trunk).
Comment 7 JD 2008-11-26 22:19:50 UTC
I can confirm that the bug is still present in 4.12, and that the Dolphin workaround described above seems to work. (Mostly, I'm just commenting to get on the CC list, though)
Comment 8 Mirko Stocker 2009-02-09 09:52:31 UTC
(In reply to comment #7)
> I can confirm that the bug is still present in 4.12, and that the Dolphin
> workaround described above seems to work.

Still true for 4.2.0, and fortunately the workaround is still working as well :-)
Comment 9 Hannes Schniepp 2009-03-07 18:11:29 UTC
It appears that this was also reported as 181575 and 182550:

https://bugs.kde.org/show_bug.cgi?id=182550
https://bugs.kde.org/show_bug.cgi?id=181575

I have the same problem. 
The problem did not exist in vanilla intrepid. It still was ok after upgrading intrepid from kde 4.1 to 4.2. However, the bug is there in a freshly installed jaunty-alpha5 (4.2.0, still there after upgrading to 4.2.1). I also found the same bug in mint 6 kde-rc1.
Comment 10 Peter Penz 2009-03-07 19:30:08 UTC
*** Bug 182550 has been marked as a duplicate of this bug. ***
Comment 11 Peter Penz 2009-03-07 19:40:09 UTC
I just tried to reproduce this issue with KDE 4.2.1 and everything works fine. I did not commit any fix and comment #9 indicates that the issue is still there with KDE 4.2.1 - is a step missing in comment #1?
Comment 12 Jonathan Marten 2009-03-10 15:54:39 UTC
Still seems to be an problem with current trunk (r937775).  In my case, the following settings are not saved between invocations of Konqueror (started as 'konqueror ~' from a terminal window):

Show/Hide Navigation Panel (F9): always shown on startup
View Mode - Icons - Grid Spacing: reverts to "Small"
Navigation - Open archives as folder: reverts to "off"

The time of file ~/.kde/share/config/konquerorrc is updated when existing Konqueror, but its contents do not change.
Comment 13 Jonathan Marten 2009-03-10 16:08:08 UTC
*** Bug 186643 has been marked as a duplicate of this bug. ***
Comment 14 Jonathan Marten 2009-03-10 16:10:21 UTC
Unsaved setting from bug 186643:

View Modes - Details - Expandable folders: reverts to "off"
Comment 15 Peter Penz 2009-03-10 16:32:21 UTC
@Jonathan: Could you please check whether the file ~/.kde/share/config/dolphinrc is updated when you work with Konqueror only? The settings from the View Mode and the Navigation settings are stored in Dolphin. The Show/Hide Navigation Panel is Konqueror specific. Thanks!
Comment 16 Jonathan Marten 2009-03-10 17:27:39 UTC
Neither the file time nor the contents of ~/.kde/share/config/dolphinrc change when these settings are changed and then Konqueror is exited.  dolphinrc's file time is currently 5 days ago, possibly the last time that I ran dolphin explicitly.
Comment 17 Jonathan Marten 2009-03-10 18:06:41 UTC
Have added some debug output to kdebase-trunk/apps/dolphin/src/settings/dolphinsettings.cpp.

DolphinSettings::DolphinSettings() is called at konqueror startup, reading 'dolphinrc'.  However, DolphinSettings::save() is never called - either on OK/Apply of the settings dialogue, or when Konqueror is closed.
Comment 18 Frank Reininghaus 2009-03-11 00:02:19 UTC
I think I might have found a solution to this issue.

The storing of settings seems to be handled handled in a different way in Dolphin and Konqueror. Konqueror settings (like, e.g., Enabling Access Keys in the Web Browsing section) are written to disk already when the Configuration dialog is closed. The save() methods of Konqueror's KCModules indeed contain code to save the settings.

On the other hand, if I change, e.g., the "Expandable folders" setting in Dolphin, this is written to dolphinrc only when I quit Dolphin (apparently by the "settings.save();" instruction in DolphinMainWindow::closeEvent()).
 
Looking at the code shows that for example DolphinViewModesConfigModule::save() indeed only updates the DolphinSettings::instance() object and notifies Konqueror of the changes via a D-Bus message. But the changes never get written to disk if a DolphinPart is running inside Konqueror :-(

I think the easiest way to fix this is to save the settings in DolphinPartBrowserExtension::reparseConfiguration(), see patch below. I verified that dolphinrc gets updated immediately when Konqueror's "Configure" dialog is closed and that the changes persist when closing and reopening Konqueror.

Index: src/dolphinpart.cpp
===================================================================
--- src/dolphinpart.cpp (revision 937891)
+++ src/dolphinpart.cpp (working copy)
@@ -23,6 +23,7 @@
 #include "dolphinsortfilterproxymodel.h"
 #include "dolphinview.h"
 #include "dolphinmodel.h"
+#include "settings/dolphinsettings.h"

 #include <konq_fileitemcapabilities.h>
 #include <konq_operations.h>
@@ -464,6 +465,9 @@
 void DolphinPartBrowserExtension::reparseConfiguration()
 {
     m_part->view()->refresh();
+
+    DolphinSettings& settings = DolphinSettings::instance();
+    settings.save();
 }

 ////
Comment 19 Frank Reininghaus 2009-03-11 00:08:19 UTC
*** Bug 168546 has been marked as a duplicate of this bug. ***
Comment 20 Peter Penz 2009-03-11 08:01:52 UTC
Thanks Frank for the patch! Your analyzes sounds very reasonable and the patch looks good. I'm just wondering why I cannot reproduce this issue... Might this be related with preloaded Konqueror instances? However: If David (Faure) does not object (he is more familiar with the DolphinPart code), please commit :-)
Comment 21 David Faure 2009-03-21 02:46:48 UTC
Peter: to avoid preloaded konq instances, just start "konqueror" from a terminal.

Frank: thanks for the analysis and patch. It reads a bit strange though, saving stuff from a method that is usually about loading ;-)

IMHO the bug lies in the following behavior:
"On the other hand, if I change, e.g., the "Expandable folders" setting in
Dolphin, this is written to dolphinrc only when I quit Dolphin"
That's not great, because it means if you use dolphin for 20 hours and then
it crashes (or KDE does, or X does, or the kernel), you get to re-do all your customization. I believe the changes should be saved immediately or pseudo-immediately (a short timer to compress N consecutive changes and save only once is fine), even in the dolphin-standalone case.
Comment 22 Peter Penz 2009-03-21 12:49:14 UTC
SVN commit 942194 by ppenz:

- Write the settings to the disk as soon as "Apply" or "OK" has been pressed inside a settings dialog.
- Assure that the settings are saved in the DolphinPart destructor for settings that are changed outside the settings dialog (e. g. by using Ctrl + mouse wheel for adjusting the icon size).

Thanks to Frank Reininghaus and David Faure for the analyses.

CCBUG: 175085

 M  +3 -1      dolphinpart.cpp  
 M  +1 -0      settings/behaviorsettingspage.cpp  
 M  +2 -0      settings/columnviewsettingspage.cpp  
 M  +1 -0      settings/contextmenusettingspage.cpp  
 M  +2 -0      settings/detailsviewsettingspage.cpp  
 M  +2 -0      settings/iconsviewsettingspage.cpp  
 M  +2 -0      settings/navigationsettingspage.cpp  
 M  +2 -0      settings/servicessettingspage.cpp  
 M  +2 -0      settings/startupsettingspage.cpp  
 M  +1 -0      settings/statusbarsettingspage.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=942194
Comment 23 Peter Penz 2009-03-21 12:52:52 UTC
@David and Frank:I just committed a patch that seems to work fine and fixes the root cause mentioned by David (I could reproduce the issue by starting konqueror from konsole :-)). Still I did not set this issue to "resolved" yet -> it would be great if I could get at least a second confirmation that it works (it seems I'm a lousy tester for this issue). Thanks!
Comment 24 Frank Reininghaus 2009-03-21 14:39:43 UTC
I can confirm that the bug is now fixed in trunk :-) Still needs to be backported to the 4.2 branch though (4.2.2 tagging is on Wednesday).
Comment 25 Peter Penz 2009-03-21 15:00:19 UTC
SVN commit 942229 by ppenz:

Backport of SVN commit 942194:
- Write the settings to the disk as soon as "Apply" or "OK" has been pressed inside a settings dialog.
- Assure that the settings are saved in the DolphinPart destructor for settings that are changed outside the settings dialog (e. g. by using Ctrl + mouse wheel for adjusting the icon size).

Thanks to Frank Reininghaus and David Faure for the analyses.

BUG: 175085

 M  +2 -0      columnviewsettingspage.cpp  
 M  +2 -0      detailsviewsettingspage.cpp  
 M  +3 -0      dolphinpart.cpp  
 M  +2 -0      generalsettingspage.cpp  
 M  +2 -0      iconsviewsettingspage.cpp  
 M  +2 -0      startupsettingspage.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=942229
Comment 26 Frank Reininghaus 2009-03-25 23:48:08 UTC
*** Bug 171671 has been marked as a duplicate of this bug. ***
Comment 27 Frank Reininghaus 2009-03-30 22:07:47 UTC
*** Bug 188484 has been marked as a duplicate of this bug. ***
Comment 28 Frank Reininghaus 2009-04-01 21:47:26 UTC
*** Bug 188610 has been marked as a duplicate of this bug. ***
Comment 29 Frank Reininghaus 2009-04-28 22:36:31 UTC
*** Bug 184315 has been marked as a duplicate of this bug. ***
Comment 30 Tan Doodri 2009-07-28 20:41:08 UTC
In Konqueror (KDE 4.2.4 / Fedora 11) this bug still exists. Go to "Configure file manager settings", make a change, press "OK", save the view profile. When you open a new instance of konqueror the changes just made will be gone.

Only when all instances of konqueror are closed after saving the changes, the next start of konqueror will reflect the changes made.