* Fix bug: 55370
authorJavier Fernandez Garcia-Boente <jfernandez@igalia.com>
Thu, 3 May 2007 14:11:19 +0000 (14:11 +0000)
committerJavier Fernandez Garcia-Boente <jfernandez@igalia.com>
Thu, 3 May 2007 14:11:19 +0000 (14:11 +0000)
* Call tny-send-queue_flush, but comment its implementation
because this tinymail operation is not implemented.

pmo-trunk-r1745

src/maemo/modest-main-window.c
src/maemo/modest-msg-view-window.c
src/modest-mail-operation.c
src/modest-tny-send-queue.c
src/modest-ui-actions.c

index 5c4f490..8cc493a 100644 (file)
@@ -1130,15 +1130,14 @@ observers_empty (ModestMainWindow *self)
 {
        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;
                
index 9afa8c4..c09c79a 100644 (file)
@@ -136,6 +136,7 @@ struct _ModestMsgViewWindowPrivate {
        GtkTreeIter   iter;
 
        guint clipboard_change_handler;
+       guint queue_change_handler;
 };
 
 #define MODEST_MSG_VIEW_WINDOW_GET_PRIVATE(o)      (G_TYPE_INSTANCE_GET_PRIVATE((o), \
@@ -395,6 +396,12 @@ modest_msg_view_window_finalize (GObject *obj)
                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);
 }
 
@@ -514,10 +521,10 @@ modest_msg_view_window_new (TnyMsg *msg, const gchar *account_name)
                          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);
 
index 5454f4e..940f96b 100644 (file)
@@ -1057,7 +1057,6 @@ modest_mail_operation_refresh_folder  (ModestMailOperation *self,
        tny_folder_refresh_async (folder,
                                  on_refresh_folder,
                                  on_refresh_folder_status_update,
-/*                               NULL, */
                                  self);
 }
 
index dee8127..8d0acaa 100644 (file)
@@ -205,5 +205,5 @@ modest_tny_send_queue_new (TnyCamelTransportAccount *account)
 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)); */
 }
index 3946ef1..c2fb665 100644 (file)
@@ -665,7 +665,7 @@ action_send (const gchar* account_name)
                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));