* update the address icon to the newest UI spec; fixes NB#58872
[modest] / src / widgets / modest-attachments-view.c
index 12f85a7..e03795a 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <string.h>
 #include <gtk/gtk.h>
-
+#include <gdk/gdkkeysyms.h>
 #include <tny-list.h>
 #include <tny-simple-list.h>
 
@@ -79,17 +79,6 @@ static void own_clipboard (ModestAttachmentsView *atts_view);
 
 static guint signals[LAST_SIGNAL] = {0};
 
-static void
-activate_attachment (ModestAttachmentView *attachment_view,
-                    gpointer userdata)
-{
-       TnyMimePart *mime_part;
-      
-       mime_part = tny_mime_part_view_get_part (TNY_MIME_PART_VIEW (attachment_view));
-       g_signal_emit (G_OBJECT (userdata), signals[ACTIVATE_SIGNAL], 0, mime_part);
-       g_object_unref (mime_part);
-}
-
 /**
  * modest_attachments_view_new:
  * @msg: a #TnyMsg
@@ -126,6 +115,9 @@ modest_attachments_view_set_message (ModestAttachmentsView *attachments_view, Tn
        
        priv->msg = msg;
 
+       g_list_free (priv->selected);
+       priv->selected = NULL;
+
        gtk_container_foreach (GTK_CONTAINER (priv->box), (GtkCallback) gtk_widget_destroy, NULL);
        
        if (priv->msg == NULL) {
@@ -165,7 +157,6 @@ modest_attachments_view_add_attachment (ModestAttachmentsView *attachments_view,
        att_view = modest_attachment_view_new (part);
        gtk_box_pack_end (GTK_BOX (priv->box), att_view, FALSE, FALSE, 0);
        gtk_widget_show_all (att_view);
-       g_signal_connect (G_OBJECT (att_view), "activate", G_CALLBACK (activate_attachment), (gpointer) attachments_view);
 }
 
 void