After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 399592 - file chooser settings code is excessive
file chooser settings code is excessive
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2007-01-22 22:57 UTC by Christian Persch
Modified: 2007-02-02 19:09 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
use a simple key file (16.17 KB, patch)
2007-01-22 23:32 UTC, Christian Persch
committed Details | Review

Description Christian Persch 2007-01-22 22:57:20 UTC
The gtkfilechoosersettings.c code to store currently 3 settings of gtkfilechooser (location bar mode, show-hidden and expanded-folder) is implemented as a ~400 LOC GMarkup parser. Rewriting it to use a GKeyFile would greatly simplify and slim down the code.

The only draw-back would be that the settings would be reset when the users upgrades from an earlier gtk version; but that would be tolerable IMHO.
Comment 1 Christian Persch 2007-01-22 23:32:03 UTC
Created attachment 80941 [details] [review]
use a simple key file
Comment 2 Federico Mena Quintero 2007-01-26 22:10:04 UTC
Awesome!  I hope that GKeyFile doesn't constrain us later.

Please go ahead and commit to trunk.
Comment 3 Christian Persch 2007-02-02 19:09:43 UTC
        * gtk/gtkfilechoosersettings.c: (get_config_filename),
        (ensure_settings_read), (_gtk_file_chooser_settings_init),
        (_gtk_file_chooser_settings_set_show_hidden),
        (_gtk_file_chooser_settings_set_expand_folders),
        (_gtk_file_chooser_settings_save): Use a simple key file instead of a
        markup file. Bug #399592.