diff options
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/component-factory.c | 17 |
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 (); } |