X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-attachments-view.c;h=e0b6501b4c509009935033a3c6717fea2f57444f;hb=a8712a6b492bdc754ef169452802773ec89376cd;hp=bc5f82350636149ce502a93c2b618120657071c8;hpb=6d6bda6e1b5178fa4894245c2b5dc573d9a15f8c;p=modest diff --git a/src/widgets/modest-attachments-view.c b/src/widgets/modest-attachments-view.c index bc5f823..e0b6501 100644 --- a/src/widgets/modest-attachments-view.c +++ b/src/widgets/modest-attachments-view.c @@ -186,7 +186,9 @@ modest_attachments_view_remove_attachment (ModestAttachmentsView *atts_view, Tny } if (found_att_view) { + priv->selected = g_list_remove (priv->selected, found_att_view); gtk_widget_destroy (GTK_WIDGET (found_att_view)); + own_clipboard (atts_view); } } @@ -209,12 +211,16 @@ modest_attachments_view_remove_attachment_by_id (ModestAttachmentsView *atts_vie const gchar *mime_part_id = NULL; mime_part_id = tny_mime_part_get_content_id (cur_mime_part); - if ((mime_part_id != NULL) && (strcmp (mime_part_id, att_id) == 0)) + if ((mime_part_id != NULL) && (strcmp (mime_part_id, att_id) == 0)) { gtk_widget_destroy (GTK_WIDGET (att_view)); + priv->selected = g_list_remove (priv->selected, att_view); + } g_object_unref (cur_mime_part); } + own_clipboard (atts_view); + } static void @@ -615,7 +621,11 @@ static void clipboard_get (GtkClipboard *clipboard, GtkSelectionData *selection_ if (TNY_IS_MSG (mime_part)) { TnyHeader *header = tny_msg_get_header (TNY_MSG (mime_part)); if (TNY_IS_HEADER (header)) { - gtk_selection_data_set_text (selection_data, tny_header_get_subject (header), -1); + const gchar *subject = NULL; + subject = tny_header_get_subject (header); + if ((subject == NULL) || (subject[0] == '\0')) + subject = _("mail_va_no_subject"); + gtk_selection_data_set_text (selection_data, subject, -1); g_object_unref (header); } } else {