* Properly remove attachments from attachments container
authorSergio Villar Senin <svillar@igalia.com>
Fri, 13 Feb 2009 17:48:31 +0000 (17:48 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Fri, 13 Feb 2009 17:48:31 +0000 (17:48 +0000)
pmo-trunk-r7491

src/widgets/modest-attachments-view.c

index 0201ec4..39babdf 100644 (file)
@@ -247,16 +247,17 @@ modest_attachments_view_remove_attachment (ModestAttachmentsView *atts_view, Tny
                        next_widget = node->next->data;
 
                g_list_free (box_children);
+               gtk_widget_destroy (GTK_WIDGET (found_att_view));
 
                node = g_list_find (priv->selected, found_att_view);
                if (node != NULL) {
                        priv->selected = g_list_delete_link (priv->selected, node);
-                       gtk_widget_destroy (GTK_WIDGET (found_att_view));
                        if ((priv->selected == NULL) && (next_widget != NULL))
                                set_selected (MODEST_ATTACHMENTS_VIEW (atts_view), 
                                              MODEST_ATTACHMENT_VIEW (next_widget));
                }
                own_clipboard (atts_view);
+
        }
 
        gtk_widget_queue_resize (GTK_WIDGET (atts_view));