diff options
Diffstat (limited to 'mail/mail-component.c')
-rw-r--r-- | mail/mail-component.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/mail/mail-component.c b/mail/mail-component.c index c898c08e84..9bd59e06c2 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -501,6 +501,7 @@ view_on_url (GObject *emitter, const char *url, const char *nice_url, MailCompon static void view_changed(EMFolderView *emfv, EComponentView *component_view) { + MailComponent *mc = mail_component_peek (); EInfoLabel *el = g_object_get_data((GObject *)component_view, "info-label"); CORBA_Environment ev; @@ -622,14 +623,27 @@ view_changed_timeout(void *d) static void view_changed_cb(EMFolderView *emfv, EComponentView *component_view) { + MailComponent *mc = mail_component_peek (); void *v; EInfoLabel *el = g_object_get_data((GObject *)component_view, "info-label"); + v = g_object_get_data((GObject *)component_view, "view-changed-timeout"); + + if (mc->priv->quit_state != -1) { + if (v) { + g_source_remove(GPOINTER_TO_INT(v)); + g_object_set_data((GObject *)component_view, "view-changed-timeout", NULL); + g_object_unref (emfv); + g_object_unref (el); + } + + return; + + } /* This can get called 3 times every cursor move, so we don't need to/want to run it immediately */ /* NB: we should have a 'view' struct/object to manage this crap, but this'll do for now */ - v = g_object_get_data((GObject *)component_view, "view-changed-timeout"); if (v) { g_source_remove(GPOINTER_TO_INT(v)); } else { @@ -746,6 +760,7 @@ impl_createView (PortableServer_Servant servant, g_signal_connect(view_widget, "loaded", G_CALLBACK(view_changed_cb), component_view); g_object_set_data((GObject*)info, "folderview", view_widget); + g_object_set_data((GObject*)view_widget, "foldertree", tree_widget); return BONOBO_OBJREF(component_view); } @@ -809,6 +824,9 @@ impl_quit(PortableServer_Servant servant, CORBA_Environment *ev) { MailComponent *mc = MAIL_COMPONENT(bonobo_object_from_servant(servant)); + if (mc->priv->quit_state == -1) + mc->priv->quit_state = MC_QUIT_START; + mail_config_prune_proxies (); switch (mc->priv->quit_state) { case MC_QUIT_START: { @@ -1172,6 +1190,7 @@ mail_component_init (MailComponent *component) component->priv = priv; priv->lock = g_mutex_new(); + priv->quit_state = -1; priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL); #ifdef G_OS_WIN32 |