Review Request: Only save HomeUrl config value when it actually changed (alias included)

Mark Gaiser markg85 at gmail.com
Wed Oct 31 00:10:04 GMT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107142/
-----------------------------------------------------------

Review request for Dolphin and Frank Reininghaus.


Description
-------

Check if the provided HomeUrl from dolphinrc is different from the url the location field in the dolphin settings window.
I'm simply putting both values in a KUrl and only updating HomeUrl if the value is actually different. KUrl translates ~ to the users home folder so "~" and "file:///home/user" will actually match. This allows the tilde sign to be used as HomeUrl in dolphinrc. Previously it would be translated to "file:///home/user" as soon as you opened the dolphin settings window.

What i wanted to do was a bit more complicated. I wanted make sure that only changed values where saved and written to the config file. However, that's not how dolphin currently works. For instance, if you change a setting (pick twin view as an example) and press the apply button it is actually written to the file and makes the cancel button completely useless! Then the dolphin components that need updating (the view container in this case) are updated on the fly based on the new config. I can't change this without changing a lot more files in dolphin that go way outside the scope of this bug. So i left it the way it is and just made an additional check to fix this bug.


This addresses bug 308569.
    http://bugs.kde.org/show_bug.cgi?id=308569


Diffs
-----

  dolphin/src/settings/startup/startupsettingspage.cpp 633cdac 

Diff: http://git.reviewboard.kde.org/r/107142/diff/


Testing
-------

Set the HomeUrl in dolphinrc to "~" and open the dolphin settings. Press OK. HomeUrl still has "~" which is as it should be.
Also tried other settings and they all applied just fine. The HomeUrl only gets changed when it really changed.


Thanks,

Mark Gaiser

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20121031/0212c612/attachment.htm>


More information about the kfm-devel mailing list