aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-06-03 02:46:50 +0800
committerDan Winship <danw@src.gnome.org>2000-06-03 02:46:50 +0800
commita1c7c6ef0e18fce583a215a9806208d4db43ccaa (patch)
tree485271053e40a995ed8b33edfa8dcd35c724763f
parenta9959a65c24cb76ee1d770b6a453486e80d55daf (diff)
downloadgsoc2013-evolution-a1c7c6ef0e18fce583a215a9806208d4db43ccaa.tar.gz
gsoc2013-evolution-a1c7c6ef0e18fce583a215a9806208d4db43ccaa.tar.zst
gsoc2013-evolution-a1c7c6ef0e18fce583a215a9806208d4db43ccaa.zip
keep a GList of folder browsers created (owner_unset_cb): Go through the
* component-factory.c (create_view): keep a GList of folder browsers created (owner_unset_cb): Go through the list and close each folder before exiting so they sync their summary state, etc to disk. svn path=/trunk/; revision=3393
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/component-factory.c17
2 files changed, 22 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index ce108b38b8..e7cd180fc1 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,10 @@
2000-06-02 Dan Winship <danw@helixcode.com>
+ * component-factory.c (create_view): keep a GList of folder
+ browsers created
+ (owner_unset_cb): Go through the list and close each folder before
+ exiting so they sync their summary state, etc to disk.
+
* mail-ops.c (fetch_mail): Use camel_service_connect, not
connect_with_url, since we already passed the URL into
camel_session_get_store.
diff --git a/mail/component-factory.c b/mail/component-factory.c
index cf67836827..adc8380754 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -33,6 +33,7 @@
#include "evolution-shell-component.h"
#include "folder-browser.h"
#include "mail.h" /* YUCK FIXME */
+#include "e-util/e-gui-utils.h"
#include "filter/filter-driver.h"
#include "component-factory.h"
@@ -53,6 +54,8 @@ static const EvolutionShellComponentFolderType folder_types[] = {
{ NULL, NULL }
};
+static GList *browsers;
+
/* EvolutionShellComponent methods and signals. */
@@ -71,6 +74,8 @@ create_view (EvolutionShellComponent *shell_component,
g_assert (folder_browser_widget != NULL);
g_assert (IS_FOLDER_BROWSER (folder_browser_widget));
+ browsers = g_list_prepend (browsers, folder_browser_widget);
+
/* dum de dum, hack to let the folder browser know the storage its in */
gtk_object_set_data((GtkObject *)folder_browser_widget, "e-storage",
gtk_object_get_data((GtkObject *)shell_component, "e-storage"));
@@ -94,6 +99,18 @@ owner_set_cb (EvolutionShellComponent *shell_component,
static void
owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data)
{
+ FolderBrowser *fb;
+
+ /* Close each open folder to make them sync their state to
+ * disk. We should do more cleanup than this, but then, we shouldn't
+ * be just exiting here either. FIXME.
+ */
+ while (browsers) {
+ fb = browsers->data;
+ camel_folder_close (fb->folder, FALSE, NULL);
+ browsers = browsers->next;
+ }
+
gtk_main_quit ();
}
>Mark ports not building with PHP 7.1.mat2017-02-071-1/+1 * - Update WWW: pear.php.net uses https://sunpoet2016-12-131-1/+1 * Pass maintainership of PEAR ports to the submitterjbeich2016-11-031-1/+1 * Reset miwi@'s ports, he stepped down from the Ports Team.rene2016-07-261-1/+1 * Remove ${PORTSDIR}/ from dependencies, categories d, e, f, and g.mat2016-04-011-4/+4 * - Ignore php70miwi2016-02-191-0/+2 * - Take Maintainershipmiwi2015-11-261-1/+1 * Reset miwi's maintainership per his demandbapt2014-11-181-1/+1 * Convert to USES=pearbapt2014-09-231-4/+2 * Stage support for non-IGNORED pear classesantoine2013-11-261-1/+0 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1