aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-send-recv.c
diff options
context:
space:
mode:
author8 <NotZed@Ximian.com>2001-10-19 03:55:02 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-19 03:55:02 +0800
commit02f36a07f6fb2f6fe341d9f8817628c629871635 (patch)
tree1e0620c033de5794f45147c5f2f0b7533e1aef32 /mail/mail-send-recv.c
parentd21e6e4dc143f1b077da4d9c9375947e63321d7a (diff)
downloadgsoc2013-evolution-02f36a07f6fb2f6fe341d9f8817628c629871635.tar.gz
gsoc2013-evolution-02f36a07f6fb2f6fe341d9f8817628c629871635.tar.zst
gsoc2013-evolution-02f36a07f6fb2f6fe341d9f8817628c629871635.zip
call setup_send_data *after* we've setup the global dialogue thingy.
2001-10-18 <NotZed@Ximian.com> * mail-send-recv.c (build_dialogue): call setup_send_data *after* we've setup the global dialogue thingy. (mail_send_receive): Instead of using static local to check for re-running of dialogue, use a global, setup by build_dialogue. These fix #12335. (mail_send_receive): Dont assert dialogue is realized, it might still be being built, so only show if it is realized. svn path=/trunk/; revision=13764
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r--mail/mail-send-recv.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 62f9c789c6..2945c9e109 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -115,6 +115,7 @@ struct _send_info {
};
static struct _send_data *send_data = NULL;
+static GtkWidget *send_recv_dialogue = NULL;
static struct _send_data *setup_send_data(void)
{
@@ -277,10 +278,9 @@ build_dialogue (GSList *sources, CamelFolder *outbox, const char *destination)
GtkHSeparator *line;
struct _send_info *info;
char *pretty_url;
-
- data = setup_send_data ();
-
- gd = (GnomeDialog *)gnome_dialog_new (_("Send & Receive Mail"), NULL);
+
+ gd = (GnomeDialog *)send_recv_dialogue = gnome_dialog_new (_("Send & Receive Mail"), NULL);
+ gtk_signal_connect((GtkObject *)gd, "destroy", gtk_widget_destroyed, &send_recv_dialogue);
gnome_dialog_append_button_with_pixmap (gd, _("Cancel All"), GNOME_STOCK_BUTTON_CANCEL);
gtk_window_set_policy (GTK_WINDOW (gd), FALSE, FALSE, FALSE);
@@ -288,6 +288,9 @@ build_dialogue (GSList *sources, CamelFolder *outbox, const char *destination)
table = (GtkTable *)gtk_table_new (g_slist_length (sources), 4, FALSE);
gtk_box_pack_start (GTK_BOX (gd->vbox), GTK_WIDGET (table), TRUE, TRUE, 0);
+
+ /* must bet setup after send_recv_dialogue as it may re-trigger send-recv button */
+ data = setup_send_data ();
row = 0;
while (sources) {
@@ -615,15 +618,15 @@ void mail_send_receive (void)
{
GSList *sources;
GList *scan;
- static GtkWidget *gd = NULL;
struct _send_data *data;
extern CamelFolder *outbox_folder;
const MailConfigAccount *account;
- if (gd != NULL) {
- g_assert(GTK_WIDGET_REALIZED(gd));
- gdk_window_show(gd->window);
- gdk_window_raise(gd->window);
+ if (send_recv_dialogue != NULL) {
+ if (GTK_WIDGET_REALIZED(send_recv_dialogue)) {
+ gdk_window_show(send_recv_dialogue->window);
+ gdk_window_raise(send_recv_dialogue->window);
+ }
return;
}
@@ -640,8 +643,6 @@ void mail_send_receive (void)
smtp one. */
data = build_dialogue(sources, outbox_folder, account->transport->url);
scan = data->infos;
- gd = GTK_WIDGET(data->gd);
- gtk_signal_connect((GtkObject *)gd, "destroy", gtk_widget_destroyed, &gd);
while (scan) {
struct _send_info *info = scan->data;