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 310354 - plain gtk version of gnumeric should remember config preferences
plain gtk version of gnumeric should remember config preferences
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
1.5.x
Other All
: Normal enhancement
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2005-07-14 12:56 UTC by Allin Cottrell
Modified: 2005-10-31 16:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to gnumeric 1.5.2 (11.33 KB, patch)
2005-07-14 13:02 UTC, Allin Cottrell
none Details | Review
updated patch, for gnumeric 1.5.3 (11.30 KB, patch)
2005-08-18 13:19 UTC, Allin Cottrell
none Details | Review
new patch, using g_key_file (9.16 KB, patch)
2005-09-27 21:10 UTC, Allin Cottrell
none Details | Review
revised patch with warning if config file can;t be written (9.38 KB, patch)
2005-10-04 14:29 UTC, Allin Cottrell
none Details | Review

Description Allin Cottrell 2005-07-14 12:56:43 UTC
Distribution/Version: unknown/2.6.12.2

When you select configuration options in a plain gtk build of gnumeric,
these are not saved and remembered for the next session.  The "goconf"
apparatus in this case is just a bunch of dummy stubs that do nothing.
Comment 1 Allin Cottrell 2005-07-14 13:02:21 UTC
Created attachment 49166 [details] [review]
patch to gnumeric 1.5.2

The attached diff to gnumeric-gconf.c implements the functionality
I desire, using the traditional method of a plain text .rc file
in the user's home directory.
Comment 2 Allin Cottrell 2005-08-18 13:19:20 UTC
Created attachment 50912 [details] [review]
updated patch, for gnumeric 1.5.3

I'm trying again, with a patch that is updated for the recently released
gnumeric 1.5.3.
Comment 3 Morten Welinder 2005-08-18 15:04:56 UTC
I don't quite understand why we want to do all this by hand when glib
supplies gkeyfile.h
Comment 4 Allin Cottrell 2005-08-18 23:48:50 UTC
If using the gkeyfile apparatus will enhance the probability of getting this
patch accepted, I'm willing to go that way (re-jig my patch accordingly).

However, I'm not sure of the force of Morten's "do all this by hand." By my
count, the patch includes 32 functions, maybe 3 of which could be replaced by
constructions using gkeyfile functionality (i.e. the functions that directly
read and write the per-user plain text config file).  The replacement would
surely burn more CPU cycles then the original, since gkeyfile is just a wrapper
(with some redundancy, in context) for what I do using ISO C in the few
replaceable functions.
Comment 5 Allin Cottrell 2005-09-25 15:41:29 UTC
I'm thinking of redoing this using gkeyfile.  Would that make it acceptable?  (I
mean, with reasonable probability; I realize nobody's going to commit to
accepting code sight unseen.)
Comment 6 Andreas J. Guelzow 2005-09-27 01:41:33 UTC
I would think that it would make it acceptable.
Comment 7 Morten Welinder 2005-09-27 03:59:18 UTC
Seconded.
Comment 8 Allin Cottrell 2005-09-27 21:10:51 UTC
Created attachment 52748 [details] [review]
new patch, using g_key_file
Comment 9 Andreas J. Guelzow 2005-09-27 22:17:41 UTC
In general I hate a noisy program that prints unnecessary info to stdout, but I
think we should print some warning if the configuration info cannot be written
to the file.
Comment 10 Allin Cottrell 2005-10-04 14:29:02 UTC
Created attachment 53018 [details] [review]
revised patch with warning if config file can;t be written
Comment 11 Morten Welinder 2005-10-04 21:16:48 UTC
I'll dump this in after 1.6.1.  There are a few more issues -- such as not
using g_build_filename -- that we can deal with afterwards.
Comment 12 Morten Welinder 2005-10-31 16:33:16 UTC
Patch is in with a few fixes:

use g_fopen, not fopen.
use g_build_filename.
let g_strdup handle NULLs.