Comment 84 for bug 1439288

Revision history for this message
In , Aliakc (aliakc) wrote :

Trying to get this together. I deal with Thunar sources for the first time today. So please apologizes. Here my thoughts.

1) Thunar has an own preferences class which becomes an object. The constructor
   fills in the properties with default values and keeps it in memory.
2) Nothing is written to xfconf.
3) The preferences object has getter and setter methods that triggers the xfconf
   backend. In case something changes, the changes are written.
4) Because of 1-3 everything is right. Thunar has no uninitialized values,
   because the preferences object already keeps track of default values. So the
   condition of Thunar is always right.
5) Where needed in the code, the code references a preferences object and
   accesses it's values with g_object_get. This triggers the object and gives the
   method the correct values.
6) Accessing the preferences object also triggers xfconf to see whether changed
   values have been written in the XML file.
7) Because of 6) we get the above error messages in Comment
   https://bugzilla.xfce.org/show_bug.cgi?id=11450#c74 that xfconf wasn't able to
   get "the misc-full-path-in-title" and "misc-file-size-binary" properties
   (possible more).
8) I will remove the setters and getters from the preferences class to avoid
   triggering xfconf. This - so my theory - will make Thunar operate with
   internal values. Copying, Moving etc. should't cause any crashes because
   xfconf is not being triggered at all.
9) If 8) is the case then I may continue search with dbus and xfconf.