A first pass at letting users choose not to top-post their message

replies.  Code By achen.code@gmail.com

Fixes Issue 2262
This commit is contained in:
Jesse Vincent 2010-08-30 00:00:34 +00:00
parent 6e2c5be84c
commit be8ac83198
13 changed files with 49 additions and 17 deletions

View file

@ -243,7 +243,7 @@ Vítejte v nastavení pošty K-9 Mail. K-9 je open source poštovní klient pro
<string name="message_compose_subject_hint">Předmět</string>
<string name="message_compose_content_hint">Text zprávy</string>
<string name="message_compose_fwd_header_fmt">\n-------- Původní zpráva --------\nPředmět: <xliff:g id="subject">%s</xliff:g>\nOdesílatel: <xliff:g id="sender">%s</xliff:g>\nKomu: <xliff:g id="to">%s</xliff:g>\nKopie: <xliff:g id="cc">%s</xliff:g>\n\n</string>
<string name="message_compose_reply_header_fmt">\n<xliff:g id="sender">%s</xliff:g> napsal:\n\n</string>
<string name="message_compose_reply_header_fmt"><xliff:g id="sender">%s</xliff:g> napsal:\n\n</string>
<string name="message_compose_quoted_text_label">Citovaný text</string>
<string name="message_compose_error_no_recipients">Musíte přidat alespoň jednoho příjemce.</string>
<string name="message_compose_downloading_attachments_toast">Některé přílohy nebyly staženy. Budou staženy automaticky, než bude tato zpráva odeslána.</string>

View file

@ -237,7 +237,7 @@ Willkommen zum \"K-9 Mail\"-Setup. K-9 ist eine quelloffene E-Mail-Anwendung fü
<string name="message_compose_subject_hint">Betreff</string>
<string name="message_compose_content_hint">Nachrichtentext</string>
<string name="message_compose_fwd_header_fmt">\n\n-------- Original-Nachricht --------\nBetreff: <xliff:g id="subject">%s</xliff:g>\nVon: <xliff:g id="sender">%s</xliff:g>\nAn: <xliff:g id="to">%s</xliff:g>\nCC: <xliff:g id="cc">%s</xliff:g>\n\n</string>
<string name="message_compose_reply_header_fmt">\n\n<xliff:g id="sender">%s</xliff:g> schrieb:\n\n</string>
<string name="message_compose_reply_header_fmt">\n<xliff:g id="sender">%s</xliff:g> schrieb:\n\n</string>
<string name="message_compose_quoted_text_label">Zitierter Text</string>
<string name="message_compose_error_no_recipients">Sie müssen mindestens einen Empfänger wählen.</string>
<string name="message_compose_downloading_attachments_toast">Einige Anlagen wurden nicht heruntergeladen. Sie werden automatisch heruntergeladen, bevor diese Nachricht gesendet wird.</string>

View file

@ -128,7 +128,7 @@
<string name="message_compose_error_no_recipients">Debe agregar al menos un destinatario.</string>
<string name="message_compose_fwd_header_fmt">\n\n-------- Mensaje original --------\nAsunto: <xliff:g id="subject">%s</xliff:g>\nDe: <xliff:g id="sender">%s</xliff:g>\nPara: <xliff:g id="to">%s</xliff:g>\nCC: <xliff:g id="cc">%s</xliff:g>\n\n</string>
<string name="message_compose_quoted_text_label">Texto citado</string>
<string name="message_compose_reply_header_fmt">\n\n<xliff:g id="sender">%s</xliff:g> escribió:\n\n</string>
<string name="message_compose_reply_header_fmt">\n<xliff:g id="sender">%s</xliff:g> escribió:\n\n</string>
<string name="message_compose_subject_hint">Asunto</string>
<string name="message_compose_to_hint">Para</string>
<string name="message_copied_toast">Mensaje copiado.</string>
@ -189,9 +189,9 @@
<string name="status_loading_more_failed">Reintentar la carga de más mensajes</string>
<string name="status_network_error">Error de conexión</string>
<string name="status_sending">Enviando\u2026</string>
<string name="view_hide_details_action">Ver/ocultar detalles</string>
<string name="account_setup_failed_dlg_invalid_certificate_title">Unrecognized Certificate</string>
<string name="account_setup_failed_dlg_invalid_certificate_accept">Accept Key</string>
<string name="account_setup_failed_dlg_invalid_certificate_reject">Reject Key</string>
<string name="view_hide_details_action">Ver/ocultar detalles</string>
<string name="account_setup_failed_dlg_invalid_certificate_title">Unrecognized Certificate</string>
<string name="account_setup_failed_dlg_invalid_certificate_accept">Accept Key</string>
<string name="account_setup_failed_dlg_invalid_certificate_reject">Reject Key</string>
</resources>

View file

@ -240,7 +240,7 @@
<string name="message_compose_subject_hint">Objet</string>
<string name="message_compose_content_hint">Texte du message</string>
<string name="message_compose_fwd_header_fmt">\n\n-------- Message d\'origine --------\nObjet\u00A0: <xliff:g id="subject">%s</xliff:g>\nDe\u00A0: <xliff:g id="sender">%s</xliff:g>\nÀ\u00A0: <xliff:g id="to">%s</xliff:g>\nCc\u00A0: <xliff:g id="cc">%s</xliff:g>\n\n</string>
<string name="message_compose_reply_header_fmt">\n\n<xliff:g id="sender">%s</xliff:g> a écrit\u00A0:\n\n</string>
<string name="message_compose_reply_header_fmt">\n<xliff:g id="sender">%s</xliff:g> a écrit\u00A0:\n\n</string>
<string name="message_compose_quoted_text_label">Texte cité</string>
<string name="message_compose_error_no_recipients">Vous devez ajouter au moins un destinataire.</string>
<string name="message_compose_downloading_attachments_toast">Certaines pièces jointes n\'ont pas été téléchargées. Elles seront téléchargées automatiquement avant l\'envoi de ce message.</string>

View file

@ -322,7 +322,7 @@
<string name="message_compose_error_no_recipients">Aggiungere almeno un destinatario.</string>
<string name="message_compose_fwd_header_fmt">\n\n-------- Messaggio originale --------\nOggetto: <xliff:g id="subject">%s</xliff:g>\nDa: <xliff:g id="sender">%s</xliff:g>\nA: <xliff:g id="to">%s</xliff:g>\nCC: <xliff:g id="cc">%s</xliff:g>\n\n</string>
<string name="message_compose_quoted_text_label">Testo tra virgolette</string>
<string name="message_compose_reply_header_fmt">\n\n<xliff:g id="sender">%s</xliff:g> ha scritto:\n\n</string>
<string name="message_compose_reply_header_fmt">\n<xliff:g id="sender">%s</xliff:g> ha scritto:\n\n</string>
<string name="message_compose_subject_hint">Oggetto</string>
<string name="message_compose_to_hint">A</string>
<string name="message_copied_toast">Messaggio copiato.</string>

View file

@ -248,7 +248,7 @@ K-9 Mail セットアップにようこそ。\nK-9 はオープンソースで
<string name="message_compose_subject_hint">件名</string>
<string name="message_compose_content_hint">本文</string>
<string name="message_compose_fwd_header_fmt">\n-------- 元メール --------\n件名: <xliff:g id="subject">%s</xliff:g>\n送信者: <xliff:g id="sender">%s</xliff:g>\n宛先: <xliff:g id="to">%s</xliff:g>\nCC: <xliff:g id="cc">%s</xliff:g>\n\n</string>
<string name="message_compose_reply_header_fmt">\n<xliff:g id="sender">%s</xliff:g> wrote:\n\n</string>
<string name="message_compose_reply_header_fmt"><xliff:g id="sender">%s</xliff:g> wrote:\n\n</string>
<string name="message_compose_quoted_text_label">テキスト引用</string>
<string name="message_compose_error_no_recipients">少なくとも1つの受信者を追加する必要があります</string>
<string name="message_compose_downloading_attachments_toast">一部の添付ファイルをダウンロードしていません.このメールが送信される前に自動的にダウンロードされます.</string>

View file

@ -251,7 +251,7 @@ Witaj w K-9 Mail, darmowym programie pocztowym dla systemu Android. Najistotniej
<string name="message_compose_subject_hint">Temat</string>
<string name="message_compose_content_hint">Treść wiadomości</string>
<string name="message_compose_fwd_header_fmt">\n-------- Wiadomość oryginalna --------\nTemat: <xliff:g id="subject">%s</xliff:g>\nOd: <xliff:g id="sender">%s</xliff:g>\nDo: <xliff:g id="to">%s</xliff:g>\nDW: <xliff:g id="cc">%s</xliff:g>\n\n</string>
<string name="message_compose_reply_header_fmt">\n<xliff:g id="sender">%s</xliff:g> napisał:\n\n</string>
<string name="message_compose_reply_header_fmt"><xliff:g id="sender">%s</xliff:g> napisał:\n\n</string>
<string name="message_compose_quoted_text_label">Cytowany tekst</string>
<string name="message_compose_error_no_recipients">Musisz dodać co najmniej jednego odbiorcę.</string>
<string name="message_compose_downloading_attachments_toast">Niektóre załączniki nie zostały pobrane. Zostaną pobrane automatycznie przed wysłaniem tej wiadomości.</string>

View file

@ -230,7 +230,7 @@
<string name="message_compose_subject_hint">Тема</string>
<string name="message_compose_content_hint">Текст сообщения</string>
<string name="message_compose_fwd_header_fmt">\n-------- Исходное сообщение --------\nТема: <xliff:g id="subject">%s</xliff:g>\nОт: <xliff:g id="sender">%s</xliff:g>\nДля: <xliff:g id="to">%s</xliff:g>\nКопия: <xliff:g id="cc">%s</xliff:g>\n\n</string>
<string name="message_compose_reply_header_fmt">\n<xliff:g id="sender">%s</xliff:g> написал(а):\n\n</string>
<string name="message_compose_reply_header_fmt"><xliff:g id="sender">%s</xliff:g> написал(а):\n\n</string>
<string name="message_compose_quoted_text_label">Цитированный текст</string>
<string name="message_compose_error_no_recipients">Необходимо добавить хотя бы одного адресата.</string>
<string name="message_compose_downloading_attachments_toast">Некоторые вложения не были загружены. Они будут автоматически загружены перед отправкой этого сообщения.</string>

View file

@ -128,7 +128,7 @@
<string name="message_compose_error_no_recipients">必須新增至少一位收件者。</string>
<string name="message_compose_fwd_header_fmt">\n\n-------- 原始郵件 --------\n主旨<xliff:g id="subject">%s</xliff:g>\n寄件者<xliff:g id="sender">%s</xliff:g>\n收件者<xliff:g id="to">%s</xliff:g>\n副本<xliff:g id="cc">%s</xliff:g>\n\n</string>
<string name="message_compose_quoted_text_label">引用的文字</string>
<string name="message_compose_reply_header_fmt">\n\n<xliff:g id="sender">%s</xliff:g> 說:\n\n</string>
<string name="message_compose_reply_header_fmt">\n<xliff:g id="sender">%s</xliff:g> 說:\n\n</string>
<string name="message_compose_subject_hint">主旨</string>
<string name="message_compose_to_hint">收件者</string>
<string name="message_copied_toast">複製的訊息。</string>
@ -190,7 +190,7 @@
<string name="status_network_error">連線錯誤</string>
<string name="status_sending">正在傳送\u2026</string>
<string name="view_hide_details_action">檢視/隱藏詳細資料</string>
<string name="account_setup_failed_dlg_invalid_certificate_title">Unrecognized Certificate</string>
<string name="account_setup_failed_dlg_invalid_certificate_accept">Accept Key</string>
<string name="account_setup_failed_dlg_invalid_certificate_reject">Reject Key</string>
<string name="account_setup_failed_dlg_invalid_certificate_title">Unrecognized Certificate</string>
<string name="account_setup_failed_dlg_invalid_certificate_accept">Accept Key</string>
<string name="account_setup_failed_dlg_invalid_certificate_reject">Reject Key</string>
</resources>

View file

@ -253,7 +253,7 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
<string name="message_compose_subject_hint">Subject</string>
<string name="message_compose_content_hint">Message text</string>
<string name="message_compose_fwd_header_fmt">\n-------- Original Message --------\nSubject: <xliff:g id="subject">%s</xliff:g>\nFrom: <xliff:g id="sender">%s</xliff:g>\nTo: <xliff:g id="to">%s</xliff:g>\nCC: <xliff:g id="cc">%s</xliff:g>\n\n</string>
<string name="message_compose_reply_header_fmt">\n<xliff:g id="sender">%s</xliff:g> wrote:\n\n</string>
<string name="message_compose_reply_header_fmt"><xliff:g id="sender">%s</xliff:g> wrote:\n\n</string>
<string name="message_compose_quoted_text_label">Quoted text</string>
<string name="message_compose_error_no_recipients">You must add at least one recipient.</string>
<string name="message_compose_downloading_attachments_toast">Some attachments were not downloaded. They will be downloaded automatically before this message is sent.</string>
@ -515,6 +515,11 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
<string name="account_settings_show_pictures_always">Always</string>
<string name="account_settings_composition">Writing messages</string>
<string name="account_settings_reply_after_quote_label">Reply After Quote</string>
<string name="account_settings_reply_after_quote_summary">When replying to messages, the original message will be placed above your reply.</string>
<string name="account_settings_sync">Syncing folders</string>
<string name="account_settings_folders">Folders</string>
<string name="account_settings_message_lists">Listing messages</string>

View file

@ -208,6 +208,12 @@
android:summary=""
android:dialogTitle="@string/account_settings_quote_prefix_label" />
<CheckBoxPreference
android:key="reply_after_quote"
android:title="@string/account_settings_reply_after_quote_label"
android:defaultValue="false"
android:summary="@string/account_settings_reply_after_quote_summary" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/account_settings_crypto">

View file

@ -48,6 +48,8 @@ public class Account implements BaseAccount
private static final String DEFAULT_QUOTE_PREFIX = ">";
private static final boolean DEFAULT_REPLY_AFTER_QUOTE = false;
/**
* <pre>
* 0 - Never (DELETE_POLICY_NEVER)
@ -109,6 +111,7 @@ public class Account implements BaseAccount
// current set of fetched messages
private boolean mRingNotified;
private String mQuotePrefix;
private boolean mReplyAfterQuote;
private boolean mSyncRemoteDeletions;
private String mCryptoApp;
private boolean mCryptoAutoSignature;
@ -183,6 +186,7 @@ public class Account implements BaseAccount
maximumPolledMessageAge = -1;
maximumAutoDownloadMessageSize = 32768;
mQuotePrefix = DEFAULT_QUOTE_PREFIX;
mReplyAfterQuote = DEFAULT_REPLY_AFTER_QUOTE;
mSyncRemoteDeletions = true;
mCryptoApp = Apg.NAME;
mCryptoAutoSignature = false;
@ -266,6 +270,7 @@ public class Account implements BaseAccount
maximumAutoDownloadMessageSize = prefs.getInt(mUuid
+ ".maximumAutoDownloadMessageSize", 32768);
mQuotePrefix = prefs.getString(mUuid + ".quotePrefix", DEFAULT_QUOTE_PREFIX);
mReplyAfterQuote = prefs.getBoolean(mUuid + ".replyAfterQuote", DEFAULT_REPLY_AFTER_QUOTE);
for (String type : networkTypes)
{
Boolean useCompression = prefs.getBoolean(mUuid + ".useCompression." + type,
@ -1440,6 +1445,16 @@ public class Account implements BaseAccount
mQuotePrefix = quotePrefix;
}
public synchronized boolean isReplyAfterQuote()
{
return mReplyAfterQuote;
}
public synchronized void setReplyAfterQuote(boolean replyAfterQuote)
{
mReplyAfterQuote = replyAfterQuote;
}
public boolean getEnableMoveButtons()
{
return mEnableMoveButtons;

View file

@ -71,6 +71,7 @@ public class AccountSettings extends K9PreferenceActivity
private static final String PREFERENCE_MESSAGE_AGE = "account_message_age";
private static final String PREFERENCE_MESSAGE_SIZE = "account_autodownload_size";
private static final String PREFERENCE_QUOTE_PREFIX = "account_quote_prefix";
private static final String PREFERENCE_REPLY_AFTER_QUOTE = "reply_after_quote";
private static final String PREFERENCE_SYNC_REMOTE_DELETIONS = "account_sync_remote_deletetions";
private static final String PREFERENCE_CRYPTO_APP = "crypto_app";
private static final String PREFERENCE_CRYPTO_AUTO_SIGNATURE = "crypto_auto_signature";
@ -107,6 +108,7 @@ public class AccountSettings extends K9PreferenceActivity
private boolean mIncomingChanged = false;
private CheckBoxPreference mNotificationOpensUnread;
private EditTextPreference mAccountQuotePrefix;
private CheckBoxPreference mReplyAfterQuote;
private CheckBoxPreference mSyncRemoteDeletions;
private ListPreference mCryptoApp;
private CheckBoxPreference mCryptoAutoSignature;
@ -173,6 +175,9 @@ public class AccountSettings extends K9PreferenceActivity
}
});
mReplyAfterQuote = (CheckBoxPreference) findPreference(PREFERENCE_REPLY_AFTER_QUOTE);
mReplyAfterQuote.setChecked(mAccount.isReplyAfterQuote());
mCheckFrequency = (ListPreference) findPreference(PREFERENCE_FREQUENCY);
mCheckFrequency.setValue(String.valueOf(mAccount.getAutomaticCheckIntervalMinutes()));
mCheckFrequency.setSummary(mCheckFrequency.getEntry());
@ -621,6 +626,7 @@ public class AccountSettings extends K9PreferenceActivity
mAccount.setSyncRemoteDeletions(mSyncRemoteDeletions.isChecked());
mAccount.setSearchableFolders(Account.Searchable.valueOf(mSearchableFolders.getValue()));
mAccount.setQuotePrefix(mAccountQuotePrefix.getText());
mAccount.setReplyAfterQuote(mReplyAfterQuote.isChecked());
mAccount.setCryptoApp(mCryptoApp.getValue());
mAccount.setCryptoAutoSignature(mCryptoAutoSignature.isChecked());