1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-08 04:08:15 -05:00

Merge commit '4.302' into issue-162-new

This commit is contained in:
ashley willis 2012-09-11 02:00:39 -05:00
commit 1e898da2f9
21 changed files with 177 additions and 120 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="17001"
android:versionName="4.301" package="com.fsck.k9"
android:versionCode="17002"
android:versionName="4.302" package="com.fsck.k9"
>
<uses-sdk
android:minSdkVersion="7"

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 900 B

View File

@ -148,7 +148,12 @@
android:layout_height="22sp"
android:paddingRight="4dip"
android:background="@drawable/ic_email_answered_small"/>
<View
android:id="@+id/forwarded"
android:layout_width="22sp"
android:layout_height="22sp"
android:paddingRight="4dip"
android:background="@drawable/ic_email_forwarded_small"/>
<CheckBox
android:id="@+id/flagged"
android:layout_width="wrap_content"

View File

@ -339,7 +339,7 @@ http://k9mail.googlecode.com/.
<string name="global_settings_unselect">Alle deselektieren</string>
<string name="quiet_time">Ruhezeit</string>
<string name="quiet_time_description">Deaktivere Klingeln, Vibrieren und Leuchten in der Nacht</string>
<string name="quiet_time_description">Deaktiviere Klingeln, Vibrieren und Leuchten in der Nacht</string>
<string name="quiet_time_starts">Ruhezeit startet</string>
<string name="quiet_time_ends">Ruhezeit endet</string>
@ -699,7 +699,7 @@ http://k9mail.googlecode.com/.
<string name="manage_identities_title">Identitäten verwalten</string>
<string name="manage_identities_context_menu_title">Identität berarbeiten</string>
<string name="manage_identities_context_menu_title">Identität bearbeiten</string>
<string name="edit_identity_title">Identität bearbeiten</string>
<string name="new_identity_action">Neue Identität erstellen</string>
@ -910,7 +910,7 @@ http://k9mail.googlecode.com/.
<string name="folder_settings_include_in_integrated_inbox_label">Integration in gemeinsamen Posteingang</string>
<string name="folder_settings_include_in_integrated_inbox_summary">Ungelesene Nachrichten im gemeinsamen Posteingang anzeigen</string>
<string name="account_settings_searchable_label">Ordner duchsuchen</string>
<string name="account_settings_searchable_label">Ordner durchsuchen</string>
<string name="account_settings_searchable_all">Alle</string>
<string name="account_settings_searchable_displayable">Angezeigte</string>
<string name="account_settings_searchable_none">Keine</string>

View File

@ -33,7 +33,7 @@ Android Localizer (aiLocalizer)
<string name="beta_app_name">K-9 Mail BETA</string>
<string name="shortcuts_title">Comptes K-9</string>
<!-- NEW: <string name="unread_widget_label">K-9 Unread</string>-->
<string name="unread_widget_label">K-9 non lus</string>
<string name="remote_control_label">Contrôle à distance de K-9 Mail</string>
<string name="remote_control_desc">Permettre à cette application de contrôler les paramètres et activités de K-9 Mail</string>
@ -77,8 +77,8 @@ http://k9mail.googlecode.com/ (en anglais)
<!-- === App Store-specific strings ======================================================= -->
<!-- NEW: <string name="import_dialog_error_message">There is no suitable application to handle the import operation. Please install a file manager application from Google Play Store.</string>-->
<!-- NEW: <string name="open_market">Open Play Store</string>-->
<string name="import_dialog_error_message">Aucune application trouvée pour réaliser l\'importation. Veuillez installer un gestionnaire de fichiers depuis le Google Play Store.</string>
<string name="open_market">Ouvrir le Google Play Store</string>
@ -115,7 +115,7 @@ http://k9mail.googlecode.com/ (en anglais)
<string name="status_processing_account">\u0020(Prép <xliff:g id="account">%s</xliff:g>:<xliff:g id="command">%s</xliff:g><xliff:g id="progress">%s</xliff:g>)</string>
<string name="folder_progress">\u0020<xliff:g id="completed">%s</xliff:g>/<xliff:g id="total">%s</xliff:g></string>
<string name="status_next_poll">\u0020(Prochaine récupération à <xliff:g id="nexttime">%s</xliff:g>)</string>
<string name="status_next_poll">\u0020(Prochaine récup. à <xliff:g id="nexttime">%s</xliff:g>)</string>
<string name="status_syncing_off">\u0020(synchronisation désactivée)</string>
<!-- Actions will be used as buttons and in menu items -->
@ -264,7 +264,7 @@ de plus</string>
<string name="message_compose_bcc_hint">Cci</string>
<string name="message_compose_subject_hint">Objet</string>
<string name="message_compose_content_hint">Texte du message</string>
<!-- NEW: <string name="message_compose_signature_hint">Signature</string>-->
<string name="message_compose_signature_hint">Signature</string>
<string name="message_compose_quote_header_separator">-------- Message d\'origine --------</string>
<string name="message_compose_quote_header_subject">Objet\u00A0:</string>
<string name="message_compose_quote_header_send_date">Envoyé:</string>
@ -276,11 +276,11 @@ de plus</string>
<string name="error_contact_address_not_found">Aucune adresse e-mail trouvée</string>
<string name="message_compose_attachments_skipped_toast">Certaines pièces jointes ne peuvent pas être transmises car elles n\'ont pas été téléchargées.</string>
<string name="message_compose_show_quoted_text_action">Citer le message</string>
<!-- NEW: <string name="message_compose_description_add_to">Add recipient (To)</string>-->
<!-- NEW: <string name="message_compose_description_add_cc">Add recipient (CC)</string>-->
<!-- NEW: <string name="message_compose_description_add_bcc">Add recipient (BCC)</string>-->
<!-- NEW: <string name="message_compose_description_delete_quoted_text">Remove quoted text</string>-->
<!-- NEW: <string name="message_compose_description_edit_quoted_text">Edit quoted text</string>-->
<string name="message_compose_description_add_to">Ajouter un destinataire (Pour)</string>
<string name="message_compose_description_add_cc">Ajouter un destinataire en copie (Cc)</string>
<string name="message_compose_description_add_bcc">Ajouter un destinataire en copie cachée (Cci)</string>
<string name="message_compose_description_delete_quoted_text">Supprimer la citation</string>
<string name="message_compose_description_edit_quoted_text">Modifier la citation</string>
<string name="message_view_from_format">De\u00A0: <xliff:g id="name">%s</xliff:g> &lt;<xliff:g id="email">%s</xliff:g>&gt;</string>
<string name="message_to_label">Pour\u00A0:</string>
@ -295,13 +295,13 @@ de plus</string>
<string name="message_view_status_attachment_saved">Pièce jointe enregistrée sur la carte SD en tant que <xliff:g id="filename">%s</xliff:g>.</string>
<string name="message_view_status_attachment_not_saved">Impossible d\'enregistrer la pièce jointe sur la carte SD.</string>
<string name="message_view_show_pictures_action">Afficher les images</string>
<!-- NEW: <string name="message_view_show_message_action">Show message</string>-->
<!-- NEW: <string name="message_view_show_attachments_action">Show attachments</string>-->
<!-- NEW: <string name="message_view_show_more_attachments_action">More&#8230;</string>-->
<string name="message_view_fetching_attachment_toast">Récupération de la pièce jointe.</string>
<string name="message_view_show_message_action">Message</string>
<string name="message_view_show_attachments_action">Pièces jointes</string>
<string name="message_view_show_more_attachments_action">Afficher plus…</string>
<string name="message_view_fetching_attachment_toast">Récupération de la pièce jointe</string>
<string name="message_view_no_viewer">Impossible de trouver un visualisateur pour <xliff:g id="mimetype">%s</xliff:g>.</string>
<string name="message_view_download_remainder">Télécharger le message complet</string>
<!-- NEW: <string name="message_view_downloading">Downloading…</string>-->
<string name="message_view_downloading">Téléchargement…</string>
<!-- NOTE: The following message refers to strings with id 'account_setup_incoming_save_all_headers_label' and 'account_setup_incoming_title' -->
<string name="message_additional_headers_not_downloaded">Les entêtes n\'ont pas toutes été téléchargées ou enregistrées. Sélectionnez «\u00A0Enregistrer toutes les entêtes localement\u00A0» dans les paramètres du serveur entrant pour activer cette fonction.</string>
@ -346,20 +346,20 @@ de plus</string>
<string name="global_settings_confirm_action_mark_all_as_read">Marquer tout comme lu</string>
<string name="global_settings_confirm_action_send">Envoyer</string>
<!-- NEW: <string name="global_settings_notification_hide_subject_title">Hide subject in notifications</string>-->
<!-- NEW: <string name="global_settings_notification_hide_subject_never">Never</string>-->
<!-- NEW: <string name="global_settings_notification_hide_subject_when_locked">When phone is locked</string>-->
<!-- NEW: <string name="global_settings_notification_hide_subject_always">Always</string>-->
<string name="global_settings_notification_hide_subject_title">Masquer le sujet du message lors de la nofication</string>
<string name="global_settings_notification_hide_subject_never">Jamais</string>
<string name="global_settings_notification_hide_subject_when_locked">Lorsque le téléphone est verouillé</string>
<string name="global_settings_notification_hide_subject_always">Toujours</string>
<!-- NEW: <string name="global_settings_batch_buttons">Batch buttons</string>-->
<!-- NEW: <string name="global_settings_batch_buttons_summary">Configure message list batch buttons</string>-->
<!-- NEW: <string name="global_settings_mark_read">Mark read/unread</string>-->
<!-- NEW: <string name="global_settings_delete">Delete</string>-->
<!-- NEW: <string name="global_settings_archive">Move to archive</string>-->
<!-- NEW: <string name="global_settings_archive_disabled_reason">No archive folders.</string>-->
<!-- NEW: <string name="global_settings_move">Move</string>-->
<!-- NEW: <string name="global_settings_flag">Flag</string>-->
<!-- NEW: <string name="global_settings_unselect">Unselect</string>-->
<string name="global_settings_batch_buttons">Boutons batch</string>
<string name="global_settings_batch_buttons_summary">Configurer les boutons batch de la liste des messages</string>
<string name="global_settings_mark_read">Marquer comme lu/non lu</string>
<string name="global_settings_delete">Supprimer</string>
<string name="global_settings_archive">Archiver</string>
<string name="global_settings_archive_disabled_reason">Aucun dosssier d\'archivage</string>
<string name="global_settings_move">Déplacer</string>
<string name="global_settings_flag">Marquer</string>
<string name="global_settings_unselect">Déselectionner</string>
<string name="quiet_time">Heures silencieuses</string>
<string name="quiet_time_description">Désactiver les sons, vibrations et éclairage DEL aux heures programmées</string>
@ -545,8 +545,8 @@ de plus</string>
<string name="account_settings_notification_opens_unread_summary">Recherche des messages non lus après un accès à partir des notifications</string>
<string name="account_settings_notification_unread_count_label">Afficher le nombre de messages non lus</string>
<string name="account_settings_notification_unread_count_summary">Afficher le nombre de messages non lus dans la barre de notification</string>
<!-- NEW: <string name="account_settings_mark_message_as_read_on_view_label">Mark message as read when opening</string>-->
<!-- NEW: <string name="account_settings_mark_message_as_read_on_view_summary">Mark a message as read when it is opened for viewing</string>-->
<string name="account_settings_mark_message_as_read_on_view_label">Message lu à l\'ouverture</string>
<string name="account_settings_mark_message_as_read_on_view_summary">Marquer le message comme lu à l\'ouverture</string>
<string name="account_settings_enable_move_buttons_label">Activer les boutons de déplacement</string>
<string name="account_settings_enable_move_buttons_summary">Afficher les boutons Archiver, Déplacer ou Spam</string>
@ -572,8 +572,8 @@ de plus</string>
<string name="account_settings_message_format_text">Text brut (formattage et images omis)</string>
<string name="account_settings_message_format_auto">Automatique (Text brut à moins de répondre à un message HTML)</string>
<!-- NEW: <string name="account_settings_always_show_cc_bcc_label">Always show CC/BCC</string>-->
<!-- NEW: <string name="account_settings_always_show_cc_bcc_summary">Always show the CC/BCC text input fields</string>-->
<string name="account_settings_always_show_cc_bcc_label">Toujours afficher Cc/Cci</string>
<string name="account_settings_always_show_cc_bcc_summary">Toujours afficher les champs Copie et Copie cachée</string>
<string name="account_settings_message_read_receipt_label">Accusé de réception</string>
<string name="account_settings_message_read_receipt_summary">Toujours demander un accusé de réception</string>
@ -772,7 +772,7 @@ de plus</string>
<string name="sort_by">Trier…</string>
<string name="sort_by_date">Date</string>
<!-- NEW: <string name="sort_by_arrival">Arrival</string>-->
<string name="sort_by_arrival">Date de réception</string>
<string name="sort_by_sender">Expéditeur</string>
<string name="sort_by_subject">Sujet</string>
<string name="sort_by_flag">Étoile</string>
@ -794,7 +794,7 @@ de plus</string>
il est possible que vous n\'ayez pas payé un compte «\u00A0Plus\u00A0». Veuillez
lancer le navigateur Web pour accéder à ces comptes de messagerie.</string>
<string name="provider_note_yahoojp">Pour utiliser POP3 avec ce fournisseur, vous devez activer POP3 dans les paramètres Yahoo Mail.</string>
<!-- NEW: <string name="provider_note_auonejp">If you would like to use IMAP or POP3 for this provider, You should permit to use IMAP or POP3 on au one mail settings page.</string>-->
<string name="provider_note_auonejp">Pour utiliser IMAP ou POP3 avec ce fournisseur, veuillez vous assurer que les options IMAP ou POP3 soient activées dans les paramètres de Au One.</string>
<string name="provider_note_naver">Pour utiliser IMAP ou POP3 avec ce fournisseur, veuillez vous assurer que les options IMAP ou POP3 soient activées dans les paramètres de Naver Mail.</string>
<string name="provider_note_hanmail">Pour utiliser IMAP ou POP3 avec ce fournisseur, veuillez vous assurer que les options IMAP ou POP3 soient activées dans les paramètres de Hanmail(Daum) mail.</string>
<string name="provider_note_paran">Pour utiliser IMAP ou POP3 avec ce fournisseur, veuillez vous assurer que les options IMAP ou POP3 soient activées dans les paramètres de Paran mail.</string>
@ -821,7 +821,7 @@ de plus</string>
Q - Retourner au comptes\u000A
S - Éditer les paramètres du compte</string>
<!-- NEW: <string name="folder_list_filter_hint">folder name contains</string>-->
<string name="folder_list_filter_hint">Nom des dossiers contenant</string>
<string name="folder_list_display_mode_label">Dossiers</string>
<string name="folder_list_display_mode_all">Afficher tous les dossiers</string>
@ -856,7 +856,7 @@ de plus</string>
<string name="background_ops_always">Toujours</string>
<string name="background_ops_enabled">Lorsque «\u00A0Données en arrière-plan\u00A0» est activé</string>
<string name="background_ops_auto_sync">Lorsque «\u00A0Données en arrière-plan\u00A0» et «\u00A0Synchronisation auto\u00A0» sont activés</string>
<!-- NEW: <string name="background_ops_auto_sync_only">When \'Auto-sync\' is checked</string>-->
<string name="background_ops_auto_sync_only">Lorsque «\u00A0Synchronisation auto\u00A0» est activée</string>
<string name="no_message_seletected_toast">Aucun message sélectionné</string>
@ -966,8 +966,8 @@ de plus</string>
<string name="font_size_message_view_date">Date du message</string>
<string name="font_size_message_view_content">Contenu du message</string>
<!-- NEW: <string name="font_size_message_compose">Message composition</string>-->
<!-- NEW: <string name="font_size_message_compose_input">Text input fields</string>-->
<string name="font_size_message_compose">Taille de police des message</string>
<string name="font_size_message_compose_input">Champ texte</string>
<string name="font_size_tiniest">Plus minuscule</string>
<string name="font_size_tiny">Minuscule</string>
@ -1010,8 +1010,8 @@ de plus</string>
<string name="save_or_discard_draft_message_dlg_title">Enregistrer le brouillon\u00A0?</string>
<string name="save_or_discard_draft_message_instructions_fmt">Enregistrer ou abandonner ce message\u00A0?</string>
<!-- NEW: <string name="confirm_discard_draft_message_title">Discard message?</string>-->
<!-- NEW: <string name="confirm_discard_draft_message">Are you sure you want to discard this message?</string>-->
<string name="confirm_discard_draft_message_title">Abandonner le message?</string>
<string name="confirm_discard_draft_message">Etes-vous sûr de vouloir abandonner l\'écriture du message?</string>
<string name="refuse_to_save_draft_marked_encrypted_dlg_title">Refuser d\'enregistrer des brouillons.</string>
<string name="refuse_to_save_draft_marked_encrypted_instructions_fmt">Refuser d\'enregistrer un message marqué comme crypté.</string>
@ -1093,35 +1093,35 @@ de plus</string>
<string name="manage_accounts_move_down_action">Déplacer bas</string>
<string name="manage_accounts_moving_message">Déplacer compte…</string>
<!-- NEW: <string name="unread_widget_select_account">Show unread count for…</string>-->
<string name="unread_widget_select_account">Afficher le nombre de messages non lus pour le compte…</string>
<!-- NEW: <string name="import_dialog_error_title">Missing File Manager Application</string>-->
<!-- NEW: <string name="close">Close</string>-->
<string name="import_dialog_error_title">Gestionnaire de fichiers manquant</string>
<string name="close">Fermer</string>
<!-- NEW: <string name="webview_empty_message">No text</string>-->
<string name="webview_empty_message">Vide</string>
<!-- NEW: <string name="webview_contextmenu_link_view_action">Open for viewing</string>-->
<!-- NEW: <string name="webview_contextmenu_link_share_action">Share link</string>-->
<!-- NEW: <string name="webview_contextmenu_link_copy_action">Copy link to clipboard</string>-->
<!-- NEW: <string name="webview_contextmenu_link_clipboard_label">Link</string>-->
<string name="webview_contextmenu_link_view_action">Afficher</string>
<string name="webview_contextmenu_link_share_action">Partager le lien</string>
<string name="webview_contextmenu_link_copy_action">Copier le lien dans le presse-papier</string>
<string name="webview_contextmenu_link_clipboard_label">Lien</string>
<!-- NEW: <string name="webview_contextmenu_image_title">Image</string>-->
<!-- NEW: <string name="webview_contextmenu_image_view_action">View image</string>-->
<!-- NEW: <string name="webview_contextmenu_image_save_action">Save image</string>-->
<!-- NEW: <string name="webview_contextmenu_image_download_action">Download image</string>-->
<!-- NEW: <string name="webview_contextmenu_image_copy_action">Copy image URL to clipboard</string>-->
<!-- NEW: <string name="webview_contextmenu_image_clipboard_label">Image URL</string>-->
<string name="webview_contextmenu_image_title">Image</string>
<string name="webview_contextmenu_image_view_action">Afficher l\'image</string>
<string name="webview_contextmenu_image_save_action">Sauvegarder l\'image</string>
<string name="webview_contextmenu_image_download_action">Télécharger l\'image</string>
<string name="webview_contextmenu_image_copy_action">Copier l\'URL de l\'image dans le presse-papier</string>
<string name="webview_contextmenu_image_clipboard_label">URL de l\'image</string>
<!-- NEW: <string name="webview_contextmenu_phone_call_action">Call number</string>-->
<!-- NEW: <string name="webview_contextmenu_phone_save_action">Save to Contacts</string>-->
<!-- NEW: <string name="webview_contextmenu_phone_copy_action">Copy phone number to clipboard</string>-->
<!-- NEW: <string name="webview_contextmenu_phone_clipboard_label">Phone number</string>-->
<string name="webview_contextmenu_phone_call_action">Appeler le numéro</string>
<string name="webview_contextmenu_phone_save_action">Sauvegarder dans mes contacts</string>
<string name="webview_contextmenu_phone_copy_action">Copier le numéro de téléphone dans le presse-papier</string>
<string name="webview_contextmenu_phone_clipboard_label">Numéro de téléphone</string>
<!-- NEW: <string name="webview_contextmenu_email_send_action">Send mail</string>-->
<!-- NEW: <string name="webview_contextmenu_email_save_action">Save to Contacts</string>-->
<!-- NEW: <string name="webview_contextmenu_email_copy_action">Copy email address to clipboard</string>-->
<!-- NEW: <string name="webview_contextmenu_email_clipboard_label">Email address</string>-->
<string name="webview_contextmenu_email_send_action">Envoyer un e-mail</string>
<string name="webview_contextmenu_email_save_action">Sauvegarder dans mes contacts</string>
<string name="webview_contextmenu_email_copy_action">Copier l\'adresse e-mail dans le presse-papier</string>
<string name="webview_contextmenu_email_clipboard_label">Adresse e-mail</string>
<!-- NEW: <string name="image_saved_as">Saved image as \"<xliff:g id="filename">%s</xliff:g>\"</string>-->
<!-- NEW: <string name="image_saving_failed">Saving the image failed.</string>-->
<string name="image_saved_as">Sauvegarder l\'image en tant que \"<xliff:g id="filename">%s</xliff:g>\"</string>
<string name="image_saving_failed">Echec de la sauvegarde de l\'image.</string>
</resources>

View File

@ -274,7 +274,7 @@ http://k9mail.googlecode.com/
<string name="message_view_status_attachment_not_saved">Impossibile salvare l\'allegato sulla scheda SD.</string>
<string name="message_view_show_pictures_action">Mostra immagini</string>
<string name="message_view_show_message_action">Mostra messaggio</string>
<string name="message_view_show_attachments_action">Mostra allecato</string>
<string name="message_view_show_attachments_action">Mostra allegato</string>
<string name="message_view_show_more_attachments_action">Altro&#8230;</string>
<string name="message_view_fetching_attachment_toast">Recupero allegato in corso.</string>
<string name="message_view_no_viewer">Impossibile trovare un visualizzatore per <xliff:g id="mimetype">%s</xliff:g>.</string>

View File

@ -753,6 +753,9 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
mToView.requestFocus();
}
if (mAction == Action.FORWARD) {
mMessageReference.flag = Flag.FORWARDED;
}
mEncryptLayout = findViewById(R.id.layout_encrypt);
mCryptoSignatureCheckbox = (CheckBox)findViewById(R.id.cb_crypto_signature);

View File

@ -16,6 +16,7 @@ public class MessageInfoHolder {
public String uid;
public boolean read;
public boolean answered;
public boolean forwarded;
public boolean flagged;
public boolean dirty;
public LocalMessage message;

View File

@ -2064,11 +2064,15 @@ public class MessageList
}
private Drawable mAttachmentIcon;
private Drawable mForwardedIcon;
private Drawable mAnsweredIcon;
private Drawable mForwardedAnsweredIcon;
MessageListAdapter() {
mAttachmentIcon = getResources().getDrawable(R.drawable.ic_email_attachment_small);
mAnsweredIcon = getResources().getDrawable(R.drawable.ic_email_answered_small);
mForwardedIcon = getResources().getDrawable(R.drawable.ic_email_forwarded_small);
mForwardedAnsweredIcon = getResources().getDrawable(R.drawable.ic_email_forwarded_answered_small);
}
public void markAllMessagesAsDirty() {
@ -2451,11 +2455,19 @@ public class MessageList
}
holder.date.setText(message.getDate(mMessageHelper));
holder.subject.setCompoundDrawablesWithIntrinsicBounds(
message.answered ? mAnsweredIcon : null, // left
null, // top
message.message.hasAttachments() ? mAttachmentIcon : null, // right
null); // bottom
Drawable statusHolder = null;
if (message.forwarded && message.answered) {
statusHolder = mForwardedAnsweredIcon;
} else if (message.answered) {
statusHolder = mAnsweredIcon;
} else if (message.forwarded) {
statusHolder = mForwardedIcon;
}
holder.subject.setCompoundDrawablesWithIntrinsicBounds(statusHolder, // left
null, // top
message.message.hasAttachments() ? mAttachmentIcon : null, // right
null); // bottom
holder.position = position;
}

View File

@ -156,6 +156,8 @@ public class MessagingController implements Runnable {
// Key is accountUuid:folderName:messageUid , value is unimportant
private ConcurrentHashMap<String, String> deletedUids = new ConcurrentHashMap<String, String>();
private static final Flag[] SYNC_FLAGS = new Flag[] { Flag.SEEN, Flag.FLAGGED, Flag.ANSWERED, Flag.FORWARDED };
private String createMessageKey(Account account, String folder, Message message) {
return createMessageKey(account, folder, message.getUid());
}
@ -1799,7 +1801,7 @@ public class MessagingController implements Runnable {
messageChanged = true;
}
} else {
for (Flag flag : new Flag[] { Flag.SEEN, Flag.FLAGGED, Flag.ANSWERED }) {
for (Flag flag : MessagingController.SYNC_FLAGS) {
if (remoteMessage.isSet(flag) != localMessage.isSet(flag)) {
localMessage.setFlag(flag, remoteMessage.isSet(flag));
messageChanged = true;

View File

@ -59,6 +59,7 @@ public class MessageHelper {
target.read = message.isSet(Flag.SEEN);
target.answered = message.isSet(Flag.ANSWERED);
target.forwarded = message.isSet(Flag.FORWARDED);
target.flagged = message.isSet(Flag.FLAGGED);
Address[] addrs = message.getFrom();

View File

@ -11,6 +11,7 @@ public enum Flag {
FLAGGED,
DRAFT,
RECENT,
FORWARDED,
/*
* The following flags are for internal library use only.

View File

@ -137,10 +137,15 @@ public abstract class Folder {
public abstract String getName();
public abstract Flag[] getPermanentFlags();
/**
*
* Indicated by the server "\*" ( * OK [PERMANENTFLAGS (\Answered .. \*)] Flags permitted). that
* new keywords may be created
*/
protected boolean mCanCreateKeywords = false;
/**
*
* @param oldPushState
* @param message
* @return empty string to clear the pushState, null to leave the state as-is

View File

@ -122,7 +122,7 @@ public class ImapStore extends Store {
private static int FETCH_WINDOW_SIZE = 100;
private static final Flag[] PERMANENT_FLAGS = { Flag.DELETED, Flag.SEEN };
private Set<Flag> mPermanentFlagsIndex = new HashSet<Flag>();
private static final String CAPABILITY_IDLE = "IDLE";
private static final String COMMAND_IDLE = "IDLE";
@ -929,27 +929,38 @@ public class ImapStore extends Store {
// 2 OK [READ-WRITE] Select completed.
try {
msgSeqUidMap.clear();
String command = String.format("%s %s", mode == OpenMode.READ_WRITE ? "SELECT" : "EXAMINE",
encodeString(encodeFolderName(getPrefixedName())));
String command = String.format("%s %s", mode == OpenMode.READ_WRITE ? "SELECT"
: "EXAMINE", encodeString(encodeFolderName(getPrefixedName())));
List<ImapResponse> responses = executeSimpleCommand(command);
/*
* If the command succeeds we expect the folder has been opened read-write
* unless we are notified otherwise in the responses.
* If the command succeeds we expect the folder has been opened read-write unless we
* are notified otherwise in the responses.
*/
mMode = mode;
for (ImapResponse response : responses) {
if (response.mTag != null && response.size() >= 2) {
if (response.size() >= 2) {
Object bracketedObj = response.get(1);
if (bracketedObj instanceof ImapList) {
ImapList bracketed = (ImapList)bracketedObj;
if (!(bracketedObj instanceof ImapList)) {
continue;
}
ImapList bracketed = (ImapList) bracketedObj;
if (bracketed.isEmpty()) {
continue;
}
if (!bracketed.isEmpty()) {
Object keyObj = bracketed.get(0);
if (keyObj instanceof String) {
String key = (String)keyObj;
ImapList flags = bracketed.getKeyedList("PERMANENTFLAGS");
if (flags != null) {
// parse: * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted
// \Seen \Draft NonJunk $label1 \*)] Flags permitted.
parseFlags(flags);
} else {
Object keyObj = bracketed.get(0);
if (keyObj instanceof String) {
String key = (String) keyObj;
if (response.mTag != null) {
if ("READ-ONLY".equalsIgnoreCase(key)) {
mMode = OpenMode.READ_ONLY;
@ -959,10 +970,8 @@ public class ImapStore extends Store {
}
}
}
}
}
mExists = true;
return responses;
} catch (IOException ioe) {
@ -971,7 +980,33 @@ public class ImapStore extends Store {
Log.e(K9.LOG_TAG, "Unable to open connection for " + getLogId(), me);
throw me;
}
}
/**
* Parses an string like PERMANENTFLAGS (\Answered \Flagged \Deleted // \Seen \Draft NonJunk
* $label1 \*)
*
* the parsed flags are stored in the mPermanentFlagsIndex
* @param flags
* the imapflags as strings
*/
private void parseFlags(ImapList flags) {
for (Object flag : flags) {
flag = flag.toString().toLowerCase();
if (flag.equals("\\deleted")) {
mPermanentFlagsIndex.add(Flag.DELETED);
} else if (flag.equals("\\answered")) {
mPermanentFlagsIndex.add(Flag.ANSWERED);
} else if (flag.equals("\\seen")) {
mPermanentFlagsIndex.add(Flag.SEEN);
} else if (flag.equals("\\flagged")) {
mPermanentFlagsIndex.add(Flag.FLAGGED);
} else if (flag.equals("$forwarded")) {
mPermanentFlagsIndex.add(Flag.FORWARDED);
} else if (flag.equals("\\*")) {
mCanCreateKeywords = true;
}
}
}
@Override
@ -1725,6 +1760,10 @@ public class ImapStore extends Store {
message.setFlagInternal(Flag.SEEN, true);
} else if (flag.equalsIgnoreCase("\\Flagged")) {
message.setFlagInternal(Flag.FLAGGED, true);
} else if (flag.equalsIgnoreCase("$Forwarded")) {
message.setFlagInternal(Flag.FORWARDED, true);
/* a message contains FORWARDED FLAG -> so we can also create them */
mPermanentFlagsIndex.add(Flag.FORWARDED);
}
}
}
@ -1772,11 +1811,6 @@ public class ImapStore extends Store {
return result;
}
@Override
public Flag[] getPermanentFlags() {
return PERMANENT_FLAGS;
}
/**
* Handle any untagged responses that the caller doesn't care to handle themselves.
* @param responses
@ -2166,6 +2200,9 @@ public class ImapStore extends Store {
flagNames.add("\\Answered");
} else if (flag == Flag.FLAGGED) {
flagNames.add("\\Flagged");
} else if (flag == Flag.FORWARDED
&& (mCanCreateKeywords || mPermanentFlagsIndex.contains(Flag.FORWARDED))) {
flagNames.add("$Forwarded");
}
}

View File

@ -2881,12 +2881,6 @@ Log.v("ASH", mAccount.getDescription() + ":" + name + " is " + (localOnly == 1 ?
return mName.hashCode();
}
@Override
public Flag[] getPermanentFlags() {
return PERMANENT_FLAGS;
}
private void deleteAttachments(final long messageId) throws MessagingException {
open(OpenMode.READ_WRITE);
database.execute(false, new DbCallback<Void>() {

View File

@ -19,6 +19,7 @@ import java.net.*;
import java.security.GeneralSecurityException;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.LinkedList;
import java.util.HashMap;
@ -884,11 +885,6 @@ public class Pop3Store extends Store {
}
}
@Override
public Flag[] getPermanentFlags() {
return PERMANENT_FLAGS;
}
@Override
public Map<String, String> appendMessages(Message[] messages) throws MessagingException {
return null;

View File

@ -70,8 +70,6 @@ public class WebDavStore extends Store {
private static final short AUTH_TYPE_BASIC = 1;
private static final short AUTH_TYPE_FORM_BASED = 2;
private static final Flag[] PERMANENT_FLAGS = { Flag.DELETED, Flag.SEEN, Flag.ANSWERED };
private static final String[] EMPTY_STRING_ARRAY = new String[0];
private static final Message[] EMPTY_MESSAGE_ARRAY = new Message[0];
@ -1851,11 +1849,6 @@ public class WebDavStore extends Store {
}
}
@Override
public Flag[] getPermanentFlags() {
return PERMANENT_FLAGS;
}
@Override
public void setFlags(Message[] messages, Flag[] flags, boolean value)
throws MessagingException {

View File

@ -56,6 +56,7 @@ public class MessageHeader extends ScrollView implements OnClickListener {
private LinearLayout mCcContainerView;
private TextView mAdditionalHeadersView;
private View mAnsweredIcon;
private View mForwardedIcon;
private Message mMessage;
private Account mAccount;
private FontSizes mFontSizes = K9.getFontSizes();
@ -89,6 +90,7 @@ public class MessageHeader extends ScrollView implements OnClickListener {
private void initializeLayout() {
mAnsweredIcon = findViewById(R.id.answered);
mForwardedIcon= findViewById(R.id.forwarded);
mFromView = (TextView) findViewById(R.id.from);
mToView = (TextView) findViewById(R.id.to);
mCcView = (TextView) findViewById(R.id.cc);
@ -112,6 +114,8 @@ public class MessageHeader extends ScrollView implements OnClickListener {
hideAdditionalHeaders();
mAnsweredIcon.setVisibility(View.GONE);
mForwardedIcon.setVisibility(View.GONE);
mFromView.setTextSize(TypedValue.COMPLEX_UNIT_SP, mFontSizes.getMessageViewSender());
mToView.setTextSize(TypedValue.COMPLEX_UNIT_SP, mFontSizes.getMessageViewTo());
mCcView.setTextSize(TypedValue.COMPLEX_UNIT_SP, mFontSizes.getMessageViewCC());
@ -259,6 +263,7 @@ public class MessageHeader extends ScrollView implements OnClickListener {
mCcContainerView.setVisibility((cc != null && cc.length() > 0) ? View.VISIBLE : View.GONE);
mCcView.setText(cc);
mAnsweredIcon.setVisibility(message.isSet(Flag.ANSWERED) ? View.VISIBLE : View.GONE);
mForwardedIcon.setVisibility(message.isSet(Flag.FORWARDED) ? View.VISIBLE : View.GONE);
mFlagged.setChecked(message.isSet(Flag.FLAGGED));
int chipColor = mAccount.getChipColor();

View File

@ -38,6 +38,7 @@ import com.fsck.k9.crypto.CryptoProvider;
import com.fsck.k9.crypto.PgpData;
import com.fsck.k9.helper.ClipboardManager;
import com.fsck.k9.helper.Contacts;
import com.fsck.k9.helper.HtmlConverter;
import com.fsck.k9.helper.Utility;
import com.fsck.k9.mail.*;
import com.fsck.k9.mail.internet.MimeUtility;
@ -533,11 +534,12 @@ public class SingleMessageView extends LinearLayout implements OnClickListener,
String text = null;
if (pgpData != null) {
text = pgpData.getDecryptedData();
if (text != null) {
text = HtmlConverter.textToHtml(text, true);
}
}
if (text != null) {
text = "<html><body><pre>" + text + "</pre></body></html>";
} else {
// getTextForDisplay() always returns HTML-ified content.
if (text == null) {
text = message.getTextForDisplay();
}