diff options
author | Iain Holmes <iain@src.gnome.org> | 2001-01-24 07:42:54 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2001-01-24 07:42:54 +0800 |
commit | 9d3fd8c92531b33d5974b790c092c06f914a6282 (patch) | |
tree | e07518050631c868d8ae7695f911c28298ec9976 /executive-summary/component/e-summary-prefs.c | |
parent | e441180783a0d5af0664b991bd99906f5bd993f5 (diff) | |
download | gsoc2013-evolution-9d3fd8c92531b33d5974b790c092c06f914a6282.tar.gz gsoc2013-evolution-9d3fd8c92531b33d5974b790c092c06f914a6282.tar.zst gsoc2013-evolution-9d3fd8c92531b33d5974b790c092c06f914a6282.zip |
Lots of stuff like memory leaks and things I forgot ages ago...
Enjoy.
svn path=/trunk/; revision=7763
Diffstat (limited to 'executive-summary/component/e-summary-prefs.c')
-rw-r--r-- | executive-summary/component/e-summary-prefs.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/executive-summary/component/e-summary-prefs.c b/executive-summary/component/e-summary-prefs.c index ffefdcd583..440c3837f4 100644 --- a/executive-summary/component/e-summary-prefs.c +++ b/executive-summary/component/e-summary-prefs.c @@ -56,10 +56,27 @@ e_summary_prefs_copy (ESummaryPrefs *prefs) copy = e_summary_prefs_new (); copy->page = g_strdup (prefs->page); + copy->columns = prefs->columns; return copy; } +gboolean +e_summary_prefs_compare (ESummaryPrefs *p1, + ESummaryPrefs *p2) +{ + if (p1 == p2) + return TRUE; + + if (strcmp (p1->page, p2->page) == 0) + return TRUE; + + if (p1->columns == p2->columns) + return TRUE; + + return FALSE; +} + ESummaryPrefs * e_summary_prefs_load (const char *path) { @@ -75,6 +92,9 @@ e_summary_prefs_load (const char *path) prefs->page = gnome_config_get_string (item); g_free (item); + item = g_strdup_printf ("=%s/e-summary=/executive-summary/columns=3", path); + prefs->columns = gnome_config_get_int (item); + g_free (item); return prefs; } @@ -92,6 +112,10 @@ e_summary_prefs_save (ESummaryPrefs *prefs, gnome_config_set_string (item, prefs->page); g_free (item); + item = g_strdup_printf ("=%s/e-summary=/executive-summary/columns", path); + gnome_config_set_int (item, prefs->columns); + g_free (item); + gnome_config_sync (); gnome_config_drop_all (); } |