aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-07-11 00:37:55 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-07-11 00:37:55 +0800
commit76bfeb54e470cabb0dd24900bfc663981b3c3e32 (patch)
treeedbb7e467714317a5dc5e555139902720d167349
parent2e13a6556500098fe1930c33d69a16803e04eb99 (diff)
downloadgsoc2013-evolution-76bfeb54e470cabb0dd24900bfc663981b3c3e32.tar.gz
gsoc2013-evolution-76bfeb54e470cabb0dd24900bfc663981b3c3e32.tar.zst
gsoc2013-evolution-76bfeb54e470cabb0dd24900bfc663981b3c3e32.zip
Fix syncing of the mailbox on exit so that it's done on destruction of
the corresponding FolderBrowser instead of using the "owner_unset" signel (the latter was broken, because the FolderBrowser is destroyed before "owner_unset" is emitted, so we have no chance to sync at that point). svn path=/trunk/; revision=4038
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/component-factory.c15
-rw-r--r--mail/folder-browser.c4
3 files changed, 14 insertions, 16 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 81f3c104f4..6539dc7221 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,14 @@
+2000-07-10 Ettore Perazzoli <ettore@helixcode.com>
+
+ * component-factory.c: Removed variable `browsers'.
+ (create_view): Don't update it.
+ (owner_unset_cb): Don't sync the folders here anymore, because at
+ this point the folder browser is dead already so we cannot get a
+ valid list of folders from it anymore.
+
+ * folder-browser.c (folder_browser_destroy): Sync the associated
+ mailbox first.
+
2000-07-10 Christopher James Lahey <clahey@helixcode.com>
* message-list.c, message-list.h: Switched from ETable to
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 1237b1f638..b9c0b7d480 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -61,8 +61,6 @@ static const EvolutionShellComponentFolderType folder_types[] = {
{ NULL, NULL }
};
-static GList *browsers;
-
/* GROSS HACK: for passing to other parts of the program */
EvolutionShellClient *global_shell_client = NULL;
@@ -90,8 +88,6 @@ 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 (GTK_OBJECT (folder_browser_widget), "e-storage",
gtk_object_get_data(GTK_OBJECT (shell_component), "e-storage"));
@@ -163,17 +159,6 @@ owner_set_cb (EvolutionShellComponent *shell_component,
static void
owner_unset_cb (EvolutionShellComponent *shell_component, gpointer user_data)
{
- FolderBrowser *fb;
-
- /* Sync each open folder. 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_sync (fb->folder, FALSE, NULL);
- browsers = browsers->next;
- }
-
gtk_main_quit ();
}
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index f4ec07f9ff..201a7d9252 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -25,7 +25,9 @@ static void
folder_browser_destroy (GtkObject *object)
{
FolderBrowser *folder_browser = FOLDER_BROWSER (object);
-
+
+ camel_folder_sync (folder_browser->folder, FALSE, NULL);
+
if (folder_browser->shell) {
CORBA_Environment ev;