aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-04-02 01:24:34 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-04-02 01:24:34 +0800
commite20f64823db5ccad8892121c22a7ee11fa75bbe9 (patch)
treedfd8403d4dc856417d0831424912bddb011dab9b /composer
parentc1ffcc4af4c9d2fa7c50efe0cf6dc239a5e8610a (diff)
downloadgsoc2013-evolution-e20f64823db5ccad8892121c22a7ee11fa75bbe9.tar
gsoc2013-evolution-e20f64823db5ccad8892121c22a7ee11fa75bbe9.tar.gz
gsoc2013-evolution-e20f64823db5ccad8892121c22a7ee11fa75bbe9.tar.bz2
gsoc2013-evolution-e20f64823db5ccad8892121c22a7ee11fa75bbe9.tar.lz
gsoc2013-evolution-e20f64823db5ccad8892121c22a7ee11fa75bbe9.tar.xz
gsoc2013-evolution-e20f64823db5ccad8892121c22a7ee11fa75bbe9.tar.zst
gsoc2013-evolution-e20f64823db5ccad8892121c22a7ee11fa75bbe9.zip
** See bug #40300 & probably others.
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. svn path=/trunk/; revision=20616
Diffstat (limited to 'composer')
-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
}