aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-07-06 00:40:17 +0800
committerIain Holmes <iain@src.gnome.org>2001-07-06 00:40:17 +0800
commitfb6a190f0085747e1146bc2f9153753fb95dd94b (patch)
treefbb86f401c8e3b93260373d76310644d3e9fad6d /my-evolution
parentb0be7c3db2510c0d836c5cf1138588cb9810b974 (diff)
downloadgsoc2013-evolution-fb6a190f0085747e1146bc2f9153753fb95dd94b.tar.gz
gsoc2013-evolution-fb6a190f0085747e1146bc2f9153753fb95dd94b.tar.zst
gsoc2013-evolution-fb6a190f0085747e1146bc2f9153753fb95dd94b.zip
Fixed memory corruption, restoring settings reenabled.
svn path=/trunk/; revision=10810
Diffstat (limited to 'my-evolution')
-rw-r--r--my-evolution/ChangeLog5
-rw-r--r--my-evolution/e-summary-preferences.c91
2 files changed, 79 insertions, 17 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index 5be69260a0..470e13cb67 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,3 +1,8 @@
+2001-07-05 Iain Holmes <iain@ximian.com>
+
+ * e-summary-preferences.c (e_summary_preferences_restore): Re-enabled.
+ Bonobo-conf doesn't seem to like NULL for opt_ev.
+
2001-07-03 Iain Holmes <iain@ximian.com>
* e-summary-prefences.c (e_summary_preferences_restore): Disabled until
diff --git a/my-evolution/e-summary-preferences.c b/my-evolution/e-summary-preferences.c
index 44c5b49fdb..be460a1f75 100644
--- a/my-evolution/e-summary-preferences.c
+++ b/my-evolution/e-summary-preferences.c
@@ -114,7 +114,6 @@ str_list_from_vector (const char *vector)
gboolean
e_summary_preferences_restore (ESummaryPrefs *prefs)
{
-#if 0
Bonobo_ConfigDatabase db;
CORBA_Environment ev;
char *vector;
@@ -130,46 +129,104 @@ e_summary_preferences_restore (ESummaryPrefs *prefs)
}
CORBA_exception_free (&ev);
- vector = bonobo_config_get_string (db, "Mail/display_folders", NULL);
- if (vector == NULL) {
+ vector = bonobo_config_get_string (db, "Mail/display_folders", &ev);
+ if (BONOBO_EX (&ev) || vector == NULL) {
+ g_warning ("Error getting Mail/display_folders");
+ CORBA_exception_free (&ev);
bonobo_object_release_unref (db, NULL);
return FALSE;
}
prefs->display_folders = str_list_from_vector (vector);
g_free (vector);
- prefs->show_full_path = bonobo_config_get_boolean (db, "Mail/show_full_path", NULL);
+ prefs->show_full_path = bonobo_config_get_boolean (db, "Mail/show_full_path", &ev);
+ if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
+ g_warning ("Error getting Mail/show_full_path. Using defaults");
+ bonobo_object_release_unref (db, NULL);
+ CORBA_exception_free (&ev);
+ return FALSE;
+ }
+
- vector = bonobo_config_get_string (db, "RDF/rdf_urls", NULL);
- if (vector == NULL) {
+ vector = bonobo_config_get_string (db, "RDF/rdf_urls", &ev);
+ if (BONOBO_EX (&ev) || vector == NULL) {
+ g_warning ("Error getting RDF/rdf_urls");
+ CORBA_exception_free (&ev);
bonobo_object_release_unref (db, NULL);
return FALSE;
}
prefs->rdf_urls = str_list_from_vector (vector);
g_free (vector);
- prefs->rdf_refresh_time = bonobo_config_get_long_with_default (db, "RDF/rdf_refresh_time", 600, NULL);
- prefs->limit = bonobo_config_get_long_with_default (db, "RDF/limit", 10, NULL);
- prefs->wipe_trackers = bonobo_config_get_boolean_with_default (db, "RDF/wipe_trackers", FALSE, NULL);
+ prefs->rdf_refresh_time = bonobo_config_get_long_with_default (db, "RDF/rdf_refresh_time", 600, &ev);
+ if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
+ g_warning ("Error getting RDF/rdf_refresh_time. Using defaults");
+ bonobo_object_release_unref (db, NULL);
+ CORBA_exception_free (&ev);
+ return FALSE;
+ }
- vector = bonobo_config_get_string (db, "Weather/stations", NULL);
- if (vector == NULL) {
+ prefs->limit = bonobo_config_get_long_with_default (db, "RDF/limit", 10, &ev);
+ if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
+ g_warning ("Error getting RDF/limit. Using defaults");
+ bonobo_object_release_unref (db, NULL);
+ CORBA_exception_free (&ev);
+ return FALSE;
+ }
+
+ prefs->wipe_trackers = bonobo_config_get_boolean_with_default (db, "RDF/wipe_trackers", FALSE, &ev);
+ if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
+ g_warning ("Error getting RDF/wipe_trackers. Using defaults");
+ bonobo_object_release_unref (db, NULL);
+ CORBA_exception_free (&ev);
+ return FALSE;
+ }
+
+ vector = bonobo_config_get_string (db, "Weather/stations", &ev);
+ if (BONOBO_EX (&ev) || vector == NULL) {
+ g_warning ("Error getting Weather/stations");
+ CORBA_exception_free (&ev);
bonobo_object_release_unref (db, NULL);
return FALSE;
}
prefs->stations = str_list_from_vector (vector);
g_free (vector);
- prefs->units = bonobo_config_get_long (db, "Weather/units", NULL);
- prefs->weather_refresh_time = bonobo_config_get_long (db, "Weather/weather_refresh_time", NULL);
+ prefs->units = bonobo_config_get_long (db, "Weather/units", &ev);
+ if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
+ g_warning ("Error getting Weather/units. Using defaults");
+ bonobo_object_release_unref (db, NULL);
+ CORBA_exception_free (&ev);
+ return FALSE;
+ }
+
+ prefs->weather_refresh_time = bonobo_config_get_long (db, "Weather/weather_refresh_time", &ev);
+ if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
+ g_warning ("Error getting Weather/weather_refresh_time. Using defaults");
+ bonobo_object_release_unref (db, NULL);
+ CORBA_exception_free (&ev);
+ return FALSE;
+ }
+
- prefs->days = bonobo_config_get_long (db, "Schedule/days", NULL);
- prefs->show_tasks = bonobo_config_get_long (db, "Schedule/show_tasks", NULL);
+ prefs->days = bonobo_config_get_long (db, "Schedule/days", &ev);
+ if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
+ g_warning ("Error getting Schedule/days. Using defaults");
+ bonobo_object_release_unref (db, NULL);
+ CORBA_exception_free (&ev);
+ return FALSE;
+ }
+
+ prefs->show_tasks = bonobo_config_get_long (db, "Schedule/show_tasks", &ev);
+ if (BONOBO_EX (&ev) || db == CORBA_OBJECT_NIL) {
+ g_warning ("Error getting Schedule/show_tasks. Using defaults");
+ bonobo_object_release_unref (db, NULL);
+ CORBA_exception_free (&ev);
+ return FALSE;
+ }
bonobo_object_release_unref (db, NULL);
return TRUE;
-#endif
- return FALSE;
}
/* Write prefs to disk */
394039d576c60e03caf4f08306918e823445'>Update to 2.7.6jylefort2005-05-083-19/+8 * - Update to 2.7.5pav2005-04-133-6/+24 * - Update to 2.7.4pav2005-02-195-15/+46 * The py-xml package is no longer needed by zope.girgen2005-01-091-4/+0 * BROKEN: Broken dependencykris2005-01-021-0/+2 * Don't use Python 2.4 as the upstream maintainer say he will notperky2004-12-051-1/+1 * Fix build on Python 2.4.perky2004-12-031-2/+4 * - Update to 2.7.3pav2004-11-169-8/+119 * - Update to 2.7.2pav2004-07-246-13/+59 * Upgrade to 2.7.1.thierry2004-07-036-33/+58 * - Help compiling two testspav2004-06-202-0/+20 * Don't remove www/ now that it is created by the system.kris2004-06-091-1/+0 * Allow Python 2.3.4 to use for Zope.perky2004-05-291-0/+5 * Fix typos and outdated statements.perky2004-04-203-9/+4 * - Improve instance treatments and its startup scripts.perky2004-04-207-50/+130 * - Silently remove extra directorypav2004-04-171-0/+1 * Assign maintainership to Gerhard Schmidt who have sent previousperky2004-04-141-1/+1 * - Update to 2.7.0pav2004-04-0212-920/+1041 * SIZEify (maintainer timeout)trevor2004-03-311-0/+1 * Drop maintainership.nbm2004-03-261-1/+1 * Upgrade www/zope to version 2.6.2nbm2003-11-223-47/+39 * Don't list Data.fs, as it's precious and should not be overwritten whennbm2003-08-292-5/+7 * Port isn't broken, and claim maintainership.nbm2003-08-281-3/+1 * BROKEN: Does not buildkris2003-08-071-0/+2 * update www/zope: allow zope to build with other python versionsdaichi2003-07-091-1/+1 * Change python dependency to 2.1 as the documentation recommends.perky2003-06-161-1/+2 * Upgrade to 2.6.1perky2003-05-123-10/+30 * BROKEN: Does not compilekris2003-05-071-0/+2 * I just don't have the time to maintain this and all its issues.alane2003-04-111-1/+1 * Clear moonlight beckons.ade2003-03-072-1/+1 * restore python21 dependency that was lost in upgradealane2003-02-071-0/+2 * Updated to 2.6.0. Simon, you forgot to remove the temp files before makingalane2003-01-133-132/+307 * Create the cgi-bin dir for Zope's cgi scripts if it doesn't exist, ratheralane2002-11-031-15/+13 * Remove the StUdLyCaPs from maintainer name, 'cause some folks won't realizealane2002-11-011-1/+1 * Changed MAINTAINER to my FreeBSD address.alane2002-11-011-1/+1 * 1. Use the link /usr/local/www/cgi-bin for installing the cgi scripts.alane2002-07-273-6/+20 * 1. Redirect stderr to /dev/null as well as stdout in rc.d/zope.sh, so thatalane2002-06-202-2/+3 * Upgrade to Zope 2.5.1nbm2002-05-094-25/+27 * Implement the HotFix described atnbm2002-03-233-3/+11 * Add install and deinstall scripts I forgot to commit last time.nbm2002-02-092-0/+49 * Upgrade to 2.5.0 plus the security fix.nbm2002-02-064-145/+575 * Use ${ECHO_CMD} instead of ${ECHO} where you mean the echo command;knu2002-01-291-1/+1 * Upgrade to 2.4.2nbm2001-10-203-4/+14 * Upgrade to Zope 2.4.1.nbm2001-09-103-211/+220 * Acqusition context checking hotfixnbm2001-08-053-5/+12 * Upgrade to 2.4.0.vanilla2001-07-263-110/+431 * Update port to version 2.3.3.olgeni2001-07-053-12/+5 * Add missing @dirrm for Hotfix_2001_05_01.olgeni2001-05-281-0/+1 * Actually install the 2001-05-01 Hotfix.nbm2001-05-032-2/+4 * Update to Zope 2.3.2 + Hotfix 2001-05-01nbm2001-05-033-4/+25 * Upgrade to Zope 2.3.1!nbm2001-03-313-65/+159 * Apply Zope hotfix: Hotfix_2001-03-08olgeni2001-03-103-3/+10 * More plist and Makefile fixes.olgeni2001-03-082-22/+18 * Miscellaneous fixes.olgeni2001-03-072-25/+42 * Apply a Zope hotfix, fixing a potential security problem.nbm2001-03-043-3/+10 * Upgrade to Zope 2.3.0. It requires the recent change to python15 fornbm2001-01-293-131/+381 * Update to Zope 2.2.5nbm2001-01-183-103/+74 * Upgrade to Zope 2.2.4, with 2000-12-08, 2000-12-15a, and 2000-12-18nbm2000-12-203-17/+46 * Add __init__.pyc's for the Hotfixes, since they seem to be created.nbm2000-11-041-0/+2 * Fix up my silly mistake of adding DIST_SUBDIR=zope at the last secondnbm2000-10-181-3/+3 * Add two security hotfixes for Zope - more complex Zope internals stuffnbm2000-10-153-2/+19 * Upgrade to Zope 2.2.2nbm2000-09-193-17/+28 * Make Zope management work with non-SSL connections, but give an examplenbm2000-09-191-22/+28 * Zope depends on python 1.5.2, and that is installed from lang/python15nbm2000-09-151-1/+1 * Remove the zope data file if it is the same as installed.nbm2000-09-071-0/+1 * Fix numerous bugs in my upgrading to 2.2.1.nbm2000-09-071-8/+17 * Update to Zope 2.2.1.nbm2000-09-074-43/+55 * Update to 2.2.1b1, since there is a minor security problem in anythingnbm2000-08-153-32/+270 * Take over maintainership from Thomas for a while.nbm2000-08-091-1/+1 * Fix a type in the installation targetnbm2000-08-091-1/+1