GNOME Bugzilla – Bug 163277
gdict applet forgets dictionary host setting between sessions
Last modified: 2005-07-05 16:02:23 UTC
This bug has been opened here: https://bugzilla.ubuntu.com/5317 "I keep having to reset the gnome dictionary applet to use localhost rather than dict.org every time I log back on to a new gnome session. It used to save it, but now it does not. There are no strings matching "gconf" in ~/.xsession-errors, so I assume it's not an error with that, unless they would not go there. I wonder if there are recent (last month or so) changes to that applet / gnome-dictionary that might cause this? It used to work fine, once upon a time."
I am able to save the host settings between sessions. The version of gnome-dictionary i am using is 2.9.4.
still bugged with 2.9.4 here
It's bugging me too
Bug is still there in 2.10. One half of the bug is a simple typo, patch attached. This fixes the settings for the standalone gdict and apparently also works for the applet. However, that's the second half of the bug: the applet shouldn't get its preferences from /apps/gnome-dictionary, but from /apps/panel/applet#/prefs. The code for that is there (see gdict-pref.c) but it's called to early: - it will read from one of the above locations based whether the field "applet" in the GdictWindow struct is non-NULL - the pref setting code (gdict_pref_load() called from gdict_pref_new()) is called from the GObject constructor gdict_window_init - but at that time field "applet" hasn't been set up yet
Created attachment 39374 [details] [review] Patch for typo in gconf key for gdict
Thanks so much for tracking this down. You can commit the last patch - extra points if you fix the second part of the bug ;-)
I just committed this to the stable (2-10) branch and HEAD. Thanks again !
Marking attachment 39374 [details] [review] committed based on comment 7.
Created attachment 48605 [details] [review] gnome-utils-HEAD-gdict_prefs_leaks.patch Thanks to the nice pointers in the previous comments, I crafted a patch for the second half of the bug, i.e. load the right gconf settings when gdict is running as an applet. It basically comes down to running gdict_pref_load() in gdict_applet_new(). After testing that it actually worked as intended, I tried running gdict-applet through valgrind and found a number of memory leaks that were somewhat easy to fix. This unified patch includes the original fix plus the memory leaks corrections I added, all against CVS' HEAD (I originally made my patch against gnome-utils-2.10.1 sources, in case you want me to post that instead). Also, I wasn't sure if the fixes for those memory leaks should've gone to a new bug report, so if you want me to open another bug for that and modify the patch here to only include the fix regarding the panel settings, let me know :). Thanks.
Ok, I committed your patch ! Thanks a lot.