aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-04-07 09:45:08 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-04-07 09:45:08 +0800
commit1ade970722a1bb0608f0282f38df3c1efd3db4b6 (patch)
tree5ddfabae643a3ef7ccbfa6e28f6ce4702d6eeb36 /mail
parentcc0748768a7f1115590d627a92337fe657158bab (diff)
downloadgsoc2013-evolution-1ade970722a1bb0608f0282f38df3c1efd3db4b6.tar
gsoc2013-evolution-1ade970722a1bb0608f0282f38df3c1efd3db4b6.tar.gz
gsoc2013-evolution-1ade970722a1bb0608f0282f38df3c1efd3db4b6.tar.bz2
gsoc2013-evolution-1ade970722a1bb0608f0282f38df3c1efd3db4b6.tar.lz
gsoc2013-evolution-1ade970722a1bb0608f0282f38df3c1efd3db4b6.tar.xz
gsoc2013-evolution-1ade970722a1bb0608f0282f38df3c1efd3db4b6.tar.zst
gsoc2013-evolution-1ade970722a1bb0608f0282f38df3c1efd3db4b6.zip
** Bug 40536
2003-04-03 Not Zed <NotZed@Ximian.com> ** Bug 40536 * component-factory.c (send_receive_cb): run the warning dialogue asynchronously. Also, set the mail send/receive dialogue to transient for parent. * mail-send-recv.c (mail_send_receive): return the dialogue for send/receive. svn path=/trunk/; revision=20691
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/component-factory.c20
-rw-r--r--mail/mail-send-recv.c10
-rw-r--r--mail/mail-send-recv.h2
4 files changed, 28 insertions, 15 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d514588b69..0ef3ce1db2 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,14 @@
+2003-04-03 Not Zed <NotZed@Ximian.com>
+
+ ** Bug 40536
+
+ * component-factory.c (send_receive_cb): run the warning dialogue
+ asynchronously. Also, set the mail send/receive dialogue to
+ transient for parent.
+
+ * mail-send-recv.c (mail_send_receive): return the dialogue for
+ send/receive.
+
2003-04-02 Rodrigo Moya <rodrigo@ximian.com>
* importers/evolution-mbox-importer.c (load_file_fn):
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 66586893b6..a97926a03f 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -38,6 +38,8 @@
#include <gal/widgets/e-gui-utils.h>
+#include "e-util/e-dialog-utils.h"
+
#include "Evolution.h"
#include "evolution-storage.h"
#include "evolution-wizard.h"
@@ -981,7 +983,8 @@ send_receive_cb (EvolutionShellComponent *shell_component,
void *data)
{
EAccount *account;
-
+ GtkWidget *dialog;
+
/* FIXME: configure_mail() should be changed to work without a
FolderBrowser, and then we will be able to call configure_mail from
here properly. */
@@ -990,17 +993,14 @@ send_receive_cb (EvolutionShellComponent *shell_component,
account = mail_config_get_default_account ();
if (!account || !account->transport->url) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+ dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
_("You have not set a mail transport method"));
- gtk_dialog_run ((GtkDialog *) dialog);
- gtk_widget_destroy (dialog);
-
- return;
+ g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
+ gtk_widget_show (dialog);
+ } else {
+ dialog = mail_send_receive ();
+ e_dialog_set_transient_for_xid((GtkWindow *)dialog, evolution_shell_component_get_parent_view_xid(shell_component));
}
-
- mail_send_receive ();
}
static gboolean
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index b64064a8f8..7e13f99f51 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -669,7 +669,7 @@ receive_update_got_store (char *uri, CamelStore *store, void *data)
}
}
-void mail_send_receive (void)
+GtkWidget *mail_send_receive (void)
{
extern CamelFolder *outbox_folder;
struct _send_data *data;
@@ -682,15 +682,15 @@ void mail_send_receive (void)
gdk_window_show(send_recv_dialogue->window);
gdk_window_raise(send_recv_dialogue->window);
}
- return;
+ return send_recv_dialogue;
}
if (!camel_session_is_online (session))
- return;
+ return send_recv_dialogue;
account = mail_config_get_default_account ();
if (!account || !account->transport->url)
- return;
+ return send_recv_dialogue;
accounts = mail_config_get_accounts ();
@@ -726,6 +726,8 @@ void mail_send_receive (void)
}
scan = scan->next;
}
+
+ return send_recv_dialogue;
}
struct _auto_data {
diff --git a/mail/mail-send-recv.h b/mail/mail-send-recv.h
index a6db0e5eac..d97f06222e 100644
--- a/mail/mail-send-recv.h
+++ b/mail/mail-send-recv.h
@@ -31,7 +31,7 @@ extern "C" {
#include "mail-config.h"
/* send/receive all uri's */
-void mail_send_receive(void);
+GtkWidget *mail_send_receive(void);
/* receive a single uri */
void mail_receive_uri(const char *uri, int keep);
void mail_send (void);