From 76bfeb54e470cabb0dd24900bfc663981b3c3e32 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Mon, 10 Jul 2000 16:37:55 +0000 Subject: 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 --- mail/ChangeLog | 11 +++++++++++ mail/component-factory.c | 15 --------------- mail/folder-browser.c | 4 +++- 3 files changed, 14 insertions(+), 16 deletions(-) (limited to 'mail') 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 + + * 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 * 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; -- cgit v1.2.3