aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/ChangeLog10
-rw-r--r--composer/e-msg-composer.c20
-rw-r--r--composer/e-msg-composer.h1
3 files changed, 27 insertions, 4 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index d3be02a563..9554b26bb3 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,13 @@
+2003-04-01 Not Zed <NotZed@Ximian.com>
+
+ ** See bug #40300 & probably others.
+
+ * e-msg-composer.c (autosave_manager_query_load_orphans): make the
+ composer arg a parent arg, its only used parent the dialogue.
+ Fix caller casts.
+ (e_msg_composer_check_autosave): new function, checks for
+ autosave files, and recovers them per user instructions.
+
2003-03-31 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-attachment.glade: Convert to libglade-2's format.
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 5c649e9a6c..7da1a5d453 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1338,7 +1338,7 @@ autosave_is_owned (AutosaveManager *am, const char *file)
}
static void
-autosave_manager_query_load_orphans (AutosaveManager *am, EMsgComposer *composer)
+autosave_manager_query_load_orphans (AutosaveManager *am, GtkWindow *parent)
{
DIR *dir;
struct dirent *d;
@@ -1376,7 +1376,7 @@ autosave_manager_query_load_orphans (AutosaveManager *am, EMsgComposer *composer
if (match != NULL) {
GtkWidget *dialog;
- dialog = gtk_message_dialog_new(GTK_WINDOW(composer),
+ dialog = gtk_message_dialog_new(parent,
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR, GTK_BUTTONS_YES_NO,
_("Ximian Evolution has found unsaved files from a previous session.\n"
@@ -1477,7 +1477,7 @@ autosave_manager_register (AutosaveManager *am, EMsgComposer *composer)
if (am->ask) {
/* keep recursion out of our bedrooms. */
am->ask = FALSE;
- autosave_manager_query_load_orphans (am, composer);
+ autosave_manager_query_load_orphans (am, (GtkWindow *)composer);
am->ask = TRUE;
}
}
@@ -2940,7 +2940,6 @@ e_msg_composer_new (void)
return new;
}
-
/**
* e_msg_composer_new_post:
*
@@ -4816,3 +4815,16 @@ e_msg_composer_request_close_all (void)
else
return FALSE;
}
+
+void
+e_msg_composer_check_autosave(GtkWindow *parent)
+{
+ if (am == NULL)
+ am = autosave_manager_new();
+
+ if (am->ask) {
+ am->ask = FALSE;
+ autosave_manager_query_load_orphans (am, parent);
+ am->ask = TRUE;
+ }
+}
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index 94be69a153..07fd96f1f8 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -205,6 +205,7 @@ void e_msg_composer_ignore (EMsgCo
void e_msg_composer_drop_editor_undo (EMsgComposer *composer);
gboolean e_msg_composer_request_close_all (void);
+void e_msg_composer_check_autosave (GtkWindow *parent);
#ifdef __cplusplus
}