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 163277 - gdict applet forgets dictionary host setting between sessions
gdict applet forgets dictionary host setting between sessions
Status: RESOLVED FIXED
Product: gnome-utils
Classification: Deprecated
Component: gdict
2.9.x
Other Linux
: High normal
: ---
Assigned To: gnome-utils Maintainers
John Fleck
Depends on:
Blocks:
 
 
Reported: 2005-01-07 21:35 UTC by Sebastien Bacher
Modified: 2005-07-05 16:02 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Patch for typo in gconf key for gdict (390 bytes, patch)
2005-03-29 09:14 UTC, Roderich Schupp
committed Details | Review
gnome-utils-HEAD-gdict_prefs_leaks.patch (6.54 KB, patch)
2005-07-04 01:36 UTC, Leonardo Boshell
committed Details | Review

Description Sebastien Bacher 2005-01-07 21:35:06 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."
Comment 1 Khasim Shaheed 2005-01-12 12:41:11 UTC
I am able to save the host settings between sessions. The version of
gnome-dictionary i am using is 2.9.4.
Comment 2 Sebastien Bacher 2005-01-12 13:05:19 UTC
still bugged with 2.9.4 here
Comment 3 Simon 2005-01-19 22:26:45 UTC
It's bugging me too
Comment 4 Roderich Schupp 2005-03-29 09:13:36 UTC
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
Comment 5 Roderich Schupp 2005-03-29 09:14:46 UTC
Created attachment 39374 [details] [review]
Patch for typo in gconf key for gdict
Comment 6 Vincent Noel 2005-03-29 14:29:19 UTC
Thanks so much for tracking this down.
You can commit the last patch - extra points if you fix the second part of the
bug ;-)
Comment 7 Vincent Noel 2005-04-06 13:30:19 UTC
I just committed this to the stable (2-10) branch and HEAD. Thanks again !
Comment 8 Olav Vitters 2005-05-16 19:56:38 UTC
Marking attachment 39374 [details] [review] committed based on comment 7.
Comment 9 Leonardo Boshell 2005-07-04 01:36:44 UTC
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.
Comment 10 Vincent Noel 2005-07-05 16:02:23 UTC
Ok, I committed your patch !
Thanks a lot.