GNOME Bugzilla – Bug 113098
add specialised support for storing filenames in gconf
Last modified: 2018-08-17 13:59:47 UTC
I was thinking about your desktop-devel-list message about storing paths in gconf: http://mail.gnome.org/archives/desktop-devel-list/2003-May/msg00263.html Rather than making every app handle tilde expansion, maybe it would be easier to add some functions to the gconf client library for storing filenames. Something like gconf_client_get_filename and gconf_client_set_filename. The get_filename() version would expand tildes, and the set_filename would check to see if the filename was contained in the user's home directory, and replace part of the path with a ~ as needed. What do you think?
It seems pretty reasonable to me.
Of course, one problem with this is that if you use old versions of the new app which doesn't use get_filename(), it won't expand tilde ..
Created attachment 26642 [details] [review] the attachment gives the implementation of the two functions gconf_value_set_filename and gconf_value_get_filename Acc to the desc of the bug the functions should have been named as gconf_client_set_filename and get_filename. But from the observation it was evident that rather than using the these functions in gconf-client.c, it will be better to be used in gconf-value.c since it is required to update the key value rather than the key name itself. It was observed the there were no key names starting from the home directory name. Hence the funcions are very useful for setting the key values of string type which stores absolute path name starting from the home directory.
Created attachment 27260 [details] [review] The patch #26642 reworked The implementation of the two functions gconf_value_set_filename and gconf_value_get_filename are reworked so that all the functions and datatypes used are from glib. The string handling functions like strlen, strcmp, strcpy are avoided in the implementation.
Marking the first patch as obsoleted by the second.
GConf has been deprecated since 2011. GConf is not under active development anymore. Its codebase has been archived: https://gitlab.gnome.org/Archive/gconf/commits/master dconf and gsettings are its successors. See https://developer.gnome.org/gio/stable/ch34.html and https://developer.gnome.org/GSettings/ for porting info. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Feel free to open a task in GNOME Gitlab if the issue described in this task still applies to a recent + supported version of dconf/gsettings. Thanks!