aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-09-11 03:44:43 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-09-11 03:44:43 +0800
commitc738d4534492ed235d3f555f64e5a9fa9b62bd48 (patch)
tree53c51068f6f4daa264cbba31b9867d2037c8eea4 /mail
parentef98946d2bc8c5afe83c3468b19b5470a4157830 (diff)
downloadgsoc2013-evolution-c738d4534492ed235d3f555f64e5a9fa9b62bd48.tar
gsoc2013-evolution-c738d4534492ed235d3f555f64e5a9fa9b62bd48.tar.gz
gsoc2013-evolution-c738d4534492ed235d3f555f64e5a9fa9b62bd48.tar.bz2
gsoc2013-evolution-c738d4534492ed235d3f555f64e5a9fa9b62bd48.tar.lz
gsoc2013-evolution-c738d4534492ed235d3f555f64e5a9fa9b62bd48.tar.xz
gsoc2013-evolution-c738d4534492ed235d3f555f64e5a9fa9b62bd48.tar.zst
gsoc2013-evolution-c738d4534492ed235d3f555f64e5a9fa9b62bd48.zip
Attach to the destroy event for each progressbar using bar_destroyed as
2001-09-10 Jeffrey Stedfast <fejj@ximian.com> * mail-send-recv.c (build_dialogue): Attach to the destroy event for each progressbar using bar_destroyed as the callback. (bar_destroyed): New callback to unregister the timeout and set the send-info's bar member to NULL so we don't try to update a destroyed progressbar. * mail-callbacks.c (mail_generate_reply): Pass along the right string, this fixes bug #9518. svn path=/trunk/; revision=12738
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-send-recv.c17
2 files changed, 21 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3cff3a2b5b..709b160da4 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,11 @@
2001-09-10 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-send-recv.c (build_dialogue): Attach to the destroy event
+ for each progressbar using bar_destroyed as the callback.
+ (bar_destroyed): New callback to unregister the timeout and set
+ the send-info's bar member to NULL so we don't try to update a
+ destroyed progressbar.
+
* mail-callbacks.c (mail_generate_reply): Pass along the right
string, this fixes bug #9518.
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 1f2add6467..cdbb49b160 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -194,6 +194,17 @@ static void hide_send_info(void *key, struct _send_info *info, void *data)
info->stop = NULL;
info->bar = NULL;
info->status = NULL;
+
+ if (info->timeout_id != 0) {
+ gtk_timeout_remove (info->timeout_id);
+ info->timeout_id = 0;
+ }
+}
+
+static void
+bar_destroyed (GtkProgressBar *bar, struct _send_info *info)
+{
+ hide_send_info (NULL, info, NULL);
}
static void
@@ -211,6 +222,7 @@ dialogue_clicked(GnomeDialog *gd, int button, struct _send_data *data)
case -1: /* dialogue vanished, so make out its just hidden */
d(printf("hiding dialogue\n"));
g_hash_table_foreach(data->active, (GHFunc)hide_send_info, NULL);
+ data->gd = NULL;
break;
}
}
@@ -268,8 +280,7 @@ build_dialogue (GSList *sources, CamelFolder *outbox, const char *destination)
while (sources) {
MailConfigService *source = sources->data;
- if (!source->url
- || !source->enabled) {
+ if (!source->url || !source->enabled) {
sources = sources->next;
continue;
}
@@ -308,6 +319,8 @@ build_dialogue (GSList *sources, CamelFolder *outbox, const char *destination)
bar = (GtkProgressBar *)gtk_progress_bar_new ();
gtk_progress_set_show_text (GTK_PROGRESS (bar), FALSE);
+ gtk_signal_connect (GTK_OBJECT (bar), "destroy", bar_destroyed, info);
+
stop = (GtkButton *)gnome_stock_button (GNOME_STOCK_BUTTON_CANCEL);
status_label = (GtkLabel *)gtk_label_new ((info->type == SEND_UPDATE) ? _("Updating...") :
_("Waiting..."));