From: Bjoern V. <bj...@cs...> - 2003-08-29 19:40:01
|
I wondered about the fact, that my buddy list window doesn't remember its size and position after restarting. It should remember the size and position because this values are stored in prefs.xml: /gaim/gtk/blist/x /gaim/gtk/blist/y /gaim/gtk/blist/width /gaim/gtk/blist/height (from src/gtkblist.c:static void gaim_gtk_blist_restore_position()) Now this function works, but the reason for the problem was interesting. My Gaim-cvs still used old values from .gaimrc instead from prefs.xml. I debugged this and found this code in src/main.c:main(): --------------------------------------------------------------------- =09/* we only read ~/.gaimrc (load_prefs()) if there is no accounts.xml =09 * since prefs.xml existed alongside ~/.gaim in 0.64 */ =09if (!gaim_accounts_load()) { =09=09load_prefs(); =09=09gaim_prefs_sync(); =09} --------------------------------------------------------------------- So, if gaim_accounts_load() (loads accounts.xml) returns an error, =2Egaimrc is used instead. The loading of my accounts.xml caused an error in src/account.c:gaim_accounts_load(): --------------------------------------------------------------------- =09if (!g_markup_parse_context_end_parse(context, NULL)) { =09=09gaim_debug(GAIM_DEBUG_ERROR, "accounts", "Error parsing %s\n", =09=09=09=09 filename); =09=09g_markup_parse_context_free(context); =09=09g_free(contents); =09=09g_free(filename); =09=09accounts_loaded =3D TRUE; =09=09return FALSE; =09} --------------------------------------------------------------------- I looked at my accounts.xml file, but I didn't found errors like unclosed XML-Tags. If someone is interested, I could send my accounts.xml file after deleting passwords etc. I think, the main problem is, that Gaim was unable to correct the problem in my accounts.xml file and my Gaim always used .gaimrc. I cleared my setup with deleting .gaimrc and re-creating all accounts in accounts.xml. But in general, I think, that Gaim should correct such problems itself. I suggest, that .gaimrc is only read, if accounts.xml doesn't exist. But .gaimrc should not be read, if accounts.xml has some errors. I changed my account.c in this way: --------------------------------------------------------------------- --- src/account.c.~1.60.~=092003-08-26 13:18:27.000000000 +0200 +++ src/account.c=092003-08-29 19:44:46.000000000 +0200 @@ -1065,7 +1065,7 @@ =09=09g_free(filename); =09=09accounts_loaded =3D TRUE; -=09=09return FALSE; +=09=09return TRUE; =09} =09if (!g_markup_parse_context_end_parse(context, NULL)) { @@ -1076,7 +1076,7 @@ =09=09g_free(filename); =09=09accounts_loaded =3D TRUE; -=09=09return FALSE; +=09=09return TRUE; =09} =09g_markup_parse_context_free(context); --------------------------------------------------------------------- This patch still uses a boolean return code, so it's not possible, to return the reason of an error. So, my solution may not be perfect. Can someone change the manual-page gaim(1)? The FILES-sections contains .gaimrc and blist.xml, but not the files accounts.xml, prefs.xml, pounces.xml and status.xml: --------------------------------------------------------------------- FILES /usr/local/bin/gaim: gaim's default location. /usr/local/lib/gaim/: gaim's plugins directory. ~/.gaimrc: gaim's configuration file. ~/.gaim/logs/SCREENNAME.log: a log of all conversation with SCREENNAME. ~/.gaim/blist.xml: the buddy list. --------------------------------------------------------------------- --=20 Bj=F6rn Voigt <bj...@cs...> Telephone: +49 (30) 6 36 66 27 Fax: +49-12125-10160793 WWW: http://user.cs.tu-berlin.de/~bjoern/ Chat:=09 bjoernv (Yahoo), bjoern001 (AOL), 122516697 (ICQ) |