{
GSList *tmp = NULL;
ModestMainWindowPrivate *priv;
- gboolean is_empty = FALSE;
+ gboolean is_empty = TRUE;
guint pending_ops = 0;
priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
tmp = priv->progress_widgets;
- if (tmp == NULL) return TRUE;
/* Check all observers */
- while (tmp && !is_empty) {
+ while (tmp && is_empty) {
pending_ops = modest_progress_object_num_pending_operations (MODEST_PROGRESS_OBJECT(tmp->data));
is_empty = pending_ops == 0;
GtkTreeIter iter;
guint clipboard_change_handler;
+ guint queue_change_handler;
};
#define MODEST_MSG_VIEW_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), \
priv->clipboard_change_handler = 0;
}
+ /* disconnet operations queue observer */
+ if (priv->queue_change_handler > 0) {
+ g_signal_handler_disconnect (G_OBJECT (modest_runtime_get_mail_operation_queue ()), priv->queue_change_handler);
+ priv->queue_change_handler = 0;
+ }
+
G_OBJECT_CLASS(parent_class)->finalize (obj);
}
NULL);
/* Mail Operation Queue */
- g_signal_connect (G_OBJECT (modest_runtime_get_mail_operation_queue ()),
- "queue-changed",
- G_CALLBACK (on_queue_changed),
- obj);
+ priv->queue_change_handler = g_signal_connect (G_OBJECT (modest_runtime_get_mail_operation_queue ()),
+ "queue-changed",
+ G_CALLBACK (on_queue_changed),
+ obj);
modest_window_set_active_account (MODEST_WINDOW(obj), account_name);
void
modest_tny_send_queue_flush (ModestTnySendQueue* self)
{
- tny_camel_send_queue_flush (TNY_CAMEL_SEND_QUEUE(self));
+/* tny_camel_send_queue_flush (TNY_CAMEL_SEND_QUEUE(self)); */
}
return FALSE;
}
- //modest_tny_send_queue_flush (send_queue);
+ modest_tny_send_queue_flush (send_queue);
g_object_unref (G_OBJECT(send_queue));
g_object_unref (G_OBJECT(tny_account));