att_view = modest_attachment_view_new (part, detect_size);
if (!detect_size)
modest_attachment_view_set_size (MODEST_ATTACHMENT_VIEW (att_view), size);
- gtk_box_pack_end (GTK_BOX (priv->box), att_view, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (priv->box), att_view, FALSE, FALSE, 0);
gtk_widget_show_all (att_view);
gtk_widget_queue_resize (GTK_WIDGET (attachments_view));
}
box_children = gtk_container_get_children (GTK_CONTAINER (priv->box));
node = g_list_find (box_children, found_att_view);
- if (node->next)
+ if (node && node->next)
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) {
+ if (node) {
priv->selected = g_list_delete_link (priv->selected, node);
if ((priv->selected == NULL) && (next_widget != NULL))
set_selected (MODEST_ATTACHMENTS_VIEW (atts_view),