diff options
author | Not Zed <NotZed@Ximian.com> | 2003-04-02 01:24:34 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2003-04-02 01:24:34 +0800 |
commit | e20f64823db5ccad8892121c22a7ee11fa75bbe9 (patch) | |
tree | dfd8403d4dc856417d0831424912bddb011dab9b /composer/e-msg-composer.c | |
parent | c1ffcc4af4c9d2fa7c50efe0cf6dc239a5e8610a (diff) | |
download | gsoc2013-evolution-e20f64823db5ccad8892121c22a7ee11fa75bbe9.tar.gz 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/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 20 |
1 files changed, 16 insertions, 4 deletions
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; + } +} |