aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-component.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-04-22 14:09:19 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-04-22 14:09:19 +0800
commitabb9648eb5ab7a4cceadbf5054a794a84c9fe3cb (patch)
tree7c2eac2e74771b8f9b7cc6f62d3f6b0e8ee9c19a /mail/mail-component.c
parentb44e6e4a87771e5348ca73f4f648c4083278c78a (diff)
downloadgsoc2013-evolution-abb9648eb5ab7a4cceadbf5054a794a84c9fe3cb.tar.gz
gsoc2013-evolution-abb9648eb5ab7a4cceadbf5054a794a84c9fe3cb.tar.zst
gsoc2013-evolution-abb9648eb5ab7a4cceadbf5054a794a84c9fe3cb.zip
force check of autosaved messages as soon as the mailer starts up (well,
2004-04-22 Not Zed <NotZed@Ximian.com> * mail-component.c (view_control_activate_cb): force check of autosaved messages as soon as the mailer starts up (well, after a delay, this seems wrong). #57093. svn path=/trunk/; revision=25576
Diffstat (limited to 'mail/mail-component.c')
-rw-r--r--mail/mail-component.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 0d83da9112..05ca8cfb5a 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -365,11 +365,20 @@ get_prop(BonoboPropertyBag *bag, BonoboArg *arg, guint arg_id, CORBA_Environment
}
}
+static int
+check_autosave(void *data)
+{
+ e_msg_composer_check_autosave(NULL);
+
+ return FALSE;
+}
+
static void
view_control_activate_cb (BonoboControl *control, gboolean activate, EMFolderView *view)
{
BonoboUIComponent *uic;
-
+ static int recover = 0;
+
uic = bonobo_control_get_ui_component (control);
g_assert (uic != NULL);
@@ -389,6 +398,14 @@ view_control_activate_cb (BonoboControl *control, gboolean activate, EMFolderVie
em_folder_view_activate (view, uic, activate);
bonobo_ui_component_unset_container (uic, NULL);
}
+
+ /* This is a weird place to put it, but createControls does it too early.
+ I also think we should wait to do it until we actually visit the mailer.
+ The delay is arbitrary - without it it shows up before the main window */
+ if (!recover) {
+ recover = 1;
+ g_timeout_add(1000, check_autosave, NULL);
+ }
}
/* GObject methods. */