From 99ae73ebb951f6c6cd8ebe77a9791e3009726227 Mon Sep 17 00:00:00 2001 From: cketti Date: Sat, 8 Dec 2012 11:23:42 +0100 Subject: [PATCH] Remove the setting to hide the refile buttons With the introduction of the action bar there is no longer a separate button bar for refile actions. So it's no longer necessary to hide the buttons to save screen space. --- res/values-ca/strings.xml | 3 -- res/values-cs/strings.xml | 3 -- res/values-da/strings.xml | 3 -- res/values-de/strings.xml | 3 -- res/values-el/strings.xml | 3 -- res/values-es/strings.xml | 3 -- res/values-fi/strings.xml | 3 -- res/values-fr-rCA/strings.xml | 1 - res/values-fr/strings.xml | 3 -- res/values-gl/strings.xml | 3 -- res/values-hu/strings.xml | 3 -- res/values-it/strings.xml | 3 -- res/values-iw/strings.xml | 3 -- res/values-ja/strings.xml | 3 -- res/values-ko/strings.xml | 3 -- res/values-nl/strings.xml | 3 -- res/values-pl/strings.xml | 3 -- res/values-pt-rBR/strings.xml | 3 -- res/values-ru/strings.xml | 3 -- res/values-sv/strings.xml | 3 -- res/values-tr/strings.xml | 3 -- res/values-uk/strings.xml | 3 -- res/values-zh-rCN/strings.xml | 3 -- res/values-zh-rTW/strings.xml | 3 -- res/values/strings.xml | 3 -- res/xml/account_settings_preferences.xml | 7 ---- src/com/fsck/k9/Account.java | 14 ------- .../k9/activity/setup/AccountSettings.java | 12 ------ .../fsck/k9/fragment/MessageViewFragment.java | 41 ++++++++----------- .../fsck/k9/preferences/AccountSettings.java | 3 -- src/com/fsck/k9/preferences/Settings.java | 2 +- 31 files changed, 18 insertions(+), 134 deletions(-) diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml index e3b33557c..adf7d35ed 100644 --- a/res/values-ca/strings.xml +++ b/res/values-ca/strings.xml @@ -501,9 +501,6 @@ http://k9mail.googlecode.com/ - Habilita botons emplenat - Mostra els botons d’Arxiu, Mou, i Brossa. - Sempre mostra imatges No Dels contactes diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index 5d033b497..d46b6ba43 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -506,9 +506,6 @@ http://k9mail.googlecode.com/ - Povolit přesměrovací tlačítka - Zobrazit tlačítka Archív, Přesunout a Nevyžádaná. - Vždy zobrazovat obrázky Ne Jen od kontaktů diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml index 75c518d38..7a3b4278f 100644 --- a/res/values-da/strings.xml +++ b/res/values-da/strings.xml @@ -501,9 +501,6 @@ http://k9mail.googlecode.com/ - Aktiver Flyt knapper - Vis Arkiver, Flyt og Spam knapper. - Vis altid billeder Aldrig Kun når afsender findes i Kontakter diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index d5bd7a0d7..d4def8bbf 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -501,9 +501,6 @@ http://k9mail.googlecode.com/. Nachricht beim Öffnen als gelesen markieren Markiert eine Nachricht als gelesen, sobald sie zum Betrachten geöffnet wird. - Spam-Leiste - Zeige Archivieren-, Verschieben- und Spam-Schaltfläche. - Bilder automatisch anzeigen Niemals Nur von Kontakten diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml index bb2d42ff1..f06de698d 100644 --- a/res/values-el/strings.xml +++ b/res/values-el/strings.xml @@ -497,9 +497,6 @@ http://k9mail.googlecode.com/ Σημείωση ως αναγνωσμένου με την ανάγνωση Σημείωση ως αναγνωσμένου με την προβολή - Ενεργοποίηση πλήκτρων αρχειοθέτησης - Προβολή πλήκτρων Αρχειοθέτηση, Μετακίνηση και Σκουπίδια. - Προβολή εικόνων πάντα Όχι Από τις επαφές diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index c7207c6b1..6f127160c 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -500,9 +500,6 @@ http://k9mail.googlecode.com/ Marcar mensaje como leído tras abrirlo Marcar mensaje como leído cuando se abre para verlo - Habilitar botones de copia - Mostrar botones de archivar, mover y SPAM - Mostrar imágenes Nunca Sólo de mis contactos diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml index 06386a715..c0157571e 100755 --- a/res/values-fi/strings.xml +++ b/res/values-fi/strings.xml @@ -504,9 +504,6 @@ http://k9mail.googlecode.com/ Merkitse viesti luetuksi avattaessa Merkitse viesti luetuksi, kun se avataan katseltavaksi - Ota käyttöön Siirrä-painikkeet - Näytä Arkistoi-, Siirrä- ja Roskaposti-painikkeet. - Näytä kuvat automaattisesti Ei koskaan Vain yhteystiedoissa olevilta lähettäjiltä diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml index 23d3664e0..4ff5b3716 100644 --- a/res/values-fr-rCA/strings.xml +++ b/res/values-fr-rCA/strings.xml @@ -35,7 +35,6 @@ Pourriels %s (Pourriels) Nom du dossier des pourriels - Montrer les boutons Archiver, Déplacer ou Pourriel Maximum de dossiers poussés à vérifier Aucune adresse courriel trouvée Afficher le nom des correspondants plutôt que leurs adresses courriel diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index b8cdb772d..9e0a58972 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -524,9 +524,6 @@ de plus Message lu à l\'ouverture Marquer le message comme lu à l\'ouverture - Activer les boutons de déplacement - Afficher les boutons Archiver, Déplacer ou Spam - Afficher automatiquement les images Jamais Contacts uniquement diff --git a/res/values-gl/strings.xml b/res/values-gl/strings.xml index 5b5e43aca..ea65add97 100644 --- a/res/values-gl/strings.xml +++ b/res/values-gl/strings.xml @@ -500,9 +500,6 @@ http://k9mail.googlecode.com/ - Habilitar botóns de copia - Amosar botóns de arquivar, mover e SPAM - Amosar imaxes Nunca Só dos meuis contactos diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml index 044320be5..03184f583 100644 --- a/res/values-hu/strings.xml +++ b/res/values-hu/strings.xml @@ -500,9 +500,6 @@ Üzenet megjelölése olvasottnak megnyitáskor Olvasottnak jelöli az üzenetet, ha megnézik - Művelet gombok megjelenítése - Mutassa a Mozgatás, Archív és Levélszemét gombokat - Képek megjelenítése Soha Csak az ismerősökét diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 024824092..9d21a6874 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -501,9 +501,6 @@ http://k9mail.googlecode.com/ Segna messaggio come letto all\'apertura Segna messaggio come letto quando aperto - Abilita pulsanti archiviazione - Mostra i pulsanti Archivia, Sposta e Spam. - Mostra sempre le immagini No Dai contatti diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml index d37b9e47c..e3a29eff9 100644 --- a/res/values-iw/strings.xml +++ b/res/values-iw/strings.xml @@ -502,9 +502,6 @@ http://k9mail.googlecode.com/ - אפשר כפתורי תיוק מחדש - הצג כפתורי ארכיון, העבר ודואר זבל. - תמיד הצג תמונות לא מאנשי הקשר diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml index 6cc20adf0..e2c5ca381 100644 --- a/res/values-ja/strings.xml +++ b/res/values-ja/strings.xml @@ -501,9 +501,6 @@ K-9 Mail セットアップにようこそ。\nK-9 は標準のAndroidメール 開くと同時に既読にする メッセージを参照したときに既読にする - メール整理ボタンを有効にする - アーカイブ、移動、迷惑メールボタンを表示 - 画像を自動で表示 しない 連絡先に登録しているユーザからのメールのみ diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index fc6c8a5a5..623f4ce36 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -499,9 +499,6 @@ K-9 메일 설치를 환영합니다. K-9은 표준 안드로이드 메일 클 - 재정리(refile) 버튼 활성화 - 보관, 이동, 스팸 버튼을 보이기 - 항상 그림 보기 아니오 주소록에 등록된 경우 diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index 9d9a27616..a8e9447a1 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -500,9 +500,6 @@ http://k9mail.googlecode.com/ - Inschakelen verplaats knoppen - Laat de Archief, Verplaats, en Spam knoppen zien. - Laat afbeeldingen automatisch zien Nooit Alleen van contacten diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index 1a774843c..612ecb243 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -508,9 +508,6 @@ http://k9mail.googlecode.com/ Oznacz jako przeczytane Oznacz wiadomość jako przeczytaną przy otwieraniu - Użyj przycisków refile - Pokaż przyciski Archiwum, Przenieś, Spam. - Zawsze pokazuj obrazki Nie Od kontaktów diff --git a/res/values-pt-rBR/strings.xml b/res/values-pt-rBR/strings.xml index bef3e50d5..f6cb05213 100644 --- a/res/values-pt-rBR/strings.xml +++ b/res/values-pt-rBR/strings.xml @@ -497,9 +497,6 @@ http://k9mail.googlecode.com/ Marcar mensagem como lida ao abrir Marcar a mensagem como lida ao abrir e visualizar - Habilitar botão de ações - Mostrar botões de Arquivar, Mover e Span. - Sempre mostrar imagens Não Dos contatos diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index 3bb4c80c2..bc8ad9371 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -495,9 +495,6 @@ http://k9mail.googlecode.com/ Отметить сообщение как прочитанное при открытии Отметить сообщение как прочитанное при открытии для просмотра - Разрешить кнопки переноса сообщений - Показывает кнопки: Архив, Переместить и Спам. - Показывать изображения Никогда От контактов diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml index e85f27d10..4871d4465 100644 --- a/res/values-sv/strings.xml +++ b/res/values-sv/strings.xml @@ -501,9 +501,6 @@ http://k9mail.googlecode.com/ - Aktivera flyttknappar - Visa knappar för att arkivera, flytta och spam-markera e-post. - Visa bilder automatiskt Aldrig Bara från kontakter diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index 450a35750..447f014ba 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -501,9 +501,6 @@ http://k9mail.googlecode.com/ adresine gönderin. Mesaj açılırken okundu işaretle Mesaj okunmak üzere açıldığında okundu olarak işaretle - İşaretleme düğmelerini etkinleştir - Arşiv, Taşıma ve Spam düğmelerini göster. - Daima resimleri göster Hayır Kişilerden diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml index 896874e89..ad5246a24 100644 --- a/res/values-uk/strings.xml +++ b/res/values-uk/strings.xml @@ -501,9 +501,6 @@ http://k9mail.googlecode.com/ Відмічати повідомлення як прочитане під час відкриття Відмічати повідомлення як прочитане під час відкриття для перегляду - Дозволити кнопки переміщення повідомлень - Показувати кнопки: Архів, Перемістити, Спам. - Завжди показувати зображення Ні Від контактів diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 0633e3cc7..a5fe8e2c4 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -494,9 +494,6 @@ 邮件打开时标记为已读 当邮件打开时标记为已读 - 启用整理按钮 - 显示归档、移动和标记为垃圾按钮 - 显示图片 从不 来自您的联系人的邮件 diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml index 9a4c97ca9..cc9018e39 100644 --- a/res/values-zh-rTW/strings.xml +++ b/res/values-zh-rTW/strings.xml @@ -494,9 +494,6 @@ 開啟自動標記已讀 開啟檢視郵件內容時自動標記為已讀 - 啟用整理按鈕 - 顯示歸檔、移動和標記為垃圾按鈕 - 顯示圖片 不要 來自您的聯絡人的郵件 diff --git a/res/values/strings.xml b/res/values/strings.xml index 5b6862f40..24fc02df3 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -503,9 +503,6 @@ http://k9mail.googlecode.com/ Mark message as read when opening Mark a message as read when it is opened for viewing - Enable refile buttons - Show the Archive, Move, and Spam buttons. - Always show images No From contacts diff --git a/res/xml/account_settings_preferences.xml b/res/xml/account_settings_preferences.xml index 0328cc95e..bb2ec72a4 100644 --- a/res/xml/account_settings_preferences.xml +++ b/res/xml/account_settings_preferences.xml @@ -76,13 +76,6 @@ android:entryValues="@array/account_settings_show_pictures_values" android:dialogTitle="@string/account_settings_show_pictures_label" /> - - diff --git a/src/com/fsck/k9/Account.java b/src/com/fsck/k9/Account.java index 6987144b3..cf622c8cc 100644 --- a/src/com/fsck/k9/Account.java +++ b/src/com/fsck/k9/Account.java @@ -170,7 +170,6 @@ public class Account implements BaseAccount { private SortType mSortType; private HashMap mSortAscending = new HashMap(); private ShowPictures mShowPictures; - private boolean mEnableMoveButtons; private boolean mIsSignatureBeforeQuotedText; private String mExpungePolicy = EXPUNGE_IMMEDIATELY; private int mMaxPushFolders; @@ -279,7 +278,6 @@ public class Account implements BaseAccount { mSortType = DEFAULT_SORT_TYPE; mSortAscending.put(DEFAULT_SORT_TYPE, DEFAULT_SORT_ASCENDING); mShowPictures = ShowPictures.NEVER; - mEnableMoveButtons = false; mIsSignatureBeforeQuotedText = false; mExpungePolicy = EXPUNGE_IMMEDIATELY; mAutoExpandFolderName = INBOX; @@ -425,8 +423,6 @@ public class Account implements BaseAccount { mShowPictures = ShowPictures.NEVER; } - mEnableMoveButtons = prefs.getBoolean(mUuid + ".enableMoveButtons", false); - mNotificationSetting.setVibrate(prefs.getBoolean(mUuid + ".vibrate", false)); mNotificationSetting.setVibratePattern(prefs.getInt(mUuid + ".vibratePattern", 0)); mNotificationSetting.setVibrateTimes(prefs.getInt(mUuid + ".vibrateTimes", 5)); @@ -567,7 +563,6 @@ public class Account implements BaseAccount { editor.remove(mUuid + ".cryptoAutoSignature"); editor.remove(mUuid + ".cryptoAutoEncrypt"); editor.remove(mUuid + ".enabled"); - editor.remove(mUuid + ".enableMoveButtons"); editor.remove(mUuid + ".hideMoveButtonsEnum"); editor.remove(mUuid + ".markMessageAsReadOnView"); editor.remove(mUuid + ".alwaysShowCcBcc"); @@ -696,7 +691,6 @@ public class Account implements BaseAccount { editor.putString(mUuid + ".sortTypeEnum", mSortType.name()); editor.putBoolean(mUuid + ".sortAscending", mSortAscending.get(mSortType)); editor.putString(mUuid + ".showPicturesEnum", mShowPictures.name()); - editor.putBoolean(mUuid + ".enableMoveButtons", mEnableMoveButtons); editor.putString(mUuid + ".folderDisplayMode", mFolderDisplayMode.name()); editor.putString(mUuid + ".folderSyncMode", mFolderSyncMode.name()); editor.putString(mUuid + ".folderPushMode", mFolderPushMode.name()); @@ -1654,14 +1648,6 @@ public class Account implements BaseAccount { mStripSignature = stripSignature; } - public boolean getEnableMoveButtons() { - return mEnableMoveButtons; - } - - public void setEnableMoveButtons(boolean enableMoveButtons) { - mEnableMoveButtons = enableMoveButtons; - } - public String getCryptoApp() { return mCryptoApp; } diff --git a/src/com/fsck/k9/activity/setup/AccountSettings.java b/src/com/fsck/k9/activity/setup/AccountSettings.java index 8c29fc2e8..85cc932fb 100644 --- a/src/com/fsck/k9/activity/setup/AccountSettings.java +++ b/src/com/fsck/k9/activity/setup/AccountSettings.java @@ -73,7 +73,6 @@ public class AccountSettings extends K9PreferenceActivity { private static final String PREFERENCE_DISPLAY_COUNT = "account_display_count"; private static final String PREFERENCE_DEFAULT = "account_default"; private static final String PREFERENCE_SHOW_PICTURES = "show_pictures_enum"; - private static final String PREFERENCE_ENABLE_MOVE_BUTTONS = "enable_move_buttons"; private static final String PREFERENCE_NOTIFY = "account_notify"; private static final String PREFERENCE_NOTIFY_SELF = "account_notify_self"; private static final String PREFERENCE_NOTIFY_SYNC = "account_notify_sync"; @@ -144,7 +143,6 @@ public class AccountSettings extends K9PreferenceActivity { private CheckBoxPreference mAccountNotify; private CheckBoxPreference mAccountNotifySelf; private ListPreference mAccountShowPictures; - private CheckBoxPreference mAccountEnableMoveButtons; private CheckBoxPreference mAccountNotifySync; private CheckBoxPreference mAccountVibrate; private CheckBoxPreference mAccountLed; @@ -453,10 +451,6 @@ public class AccountSettings extends K9PreferenceActivity { mAccountDefault.setChecked( mAccount.equals(Preferences.getPreferences(this).getDefaultAccount())); - mAccountEnableMoveButtons = (CheckBoxPreference) findPreference(PREFERENCE_ENABLE_MOVE_BUTTONS); - mAccountEnableMoveButtons.setEnabled(mIsMoveCapable); - mAccountEnableMoveButtons.setChecked(mAccount.getEnableMoveButtons()); - mAccountShowPictures = (ListPreference) findPreference(PREFERENCE_SHOW_PICTURES); mAccountShowPictures.setValue("" + mAccount.getShowPictures()); mAccountShowPictures.setSummary(mAccountShowPictures.getEntry()); @@ -800,12 +794,6 @@ public class AccountSettings extends K9PreferenceActivity { mAccount.setRemoteSearchFullText(mRemoteSearchFullText.isChecked()); } - if (!mIsMoveCapable) { - mAccount.setEnableMoveButtons(false); - } else { - mAccount.setEnableMoveButtons(mAccountEnableMoveButtons.isChecked()); - } - boolean needsRefresh = mAccount.setAutomaticCheckIntervalMinutes(Integer.parseInt(mCheckFrequency.getValue())); needsRefresh |= mAccount.setFolderSyncMode(Account.FolderMode.valueOf(mSyncMode.getValue())); diff --git a/src/com/fsck/k9/fragment/MessageViewFragment.java b/src/com/fsck/k9/fragment/MessageViewFragment.java index d87307df5..a736165cf 100644 --- a/src/com/fsck/k9/fragment/MessageViewFragment.java +++ b/src/com/fsck/k9/fragment/MessageViewFragment.java @@ -563,33 +563,26 @@ public class MessageViewFragment extends SherlockFragment implements OnClickList updateUnreadToggleTitle(); - // comply with the setting - if (!mAccount.getEnableMoveButtons()) { + // check message, folder capability + if (!mController.isCopyCapable(mAccount)) { + menu.findItem(R.id.copy).setVisible(false); + } + + if (mController.isMoveCapable(mAccount)) { + menu.findItem(R.id.move).setVisible(true); + + menu.findItem(R.id.archive).setVisible( + !mMessageReference.folderName.equals(mAccount.getArchiveFolderName()) + && mAccount.hasArchiveFolder()); + + menu.findItem(R.id.spam).setVisible( + !mMessageReference.folderName.equals(mAccount.getSpamFolderName()) + && mAccount.hasSpamFolder()); + } else { + menu.findItem(R.id.copy).setVisible(false); menu.findItem(R.id.move).setVisible(false); menu.findItem(R.id.archive).setVisible(false); menu.findItem(R.id.spam).setVisible(false); - } else { - // check message, folder capability - if (!mController.isCopyCapable(mAccount)) { - menu.findItem(R.id.copy).setVisible(false); - } - - if (mController.isMoveCapable(mAccount)) { - menu.findItem(R.id.move).setVisible(true); - - menu.findItem(R.id.archive).setVisible( - !mMessageReference.folderName.equals(mAccount.getArchiveFolderName()) - && mAccount.hasArchiveFolder()); - - menu.findItem(R.id.spam).setVisible( - !mMessageReference.folderName.equals(mAccount.getSpamFolderName()) - && mAccount.hasSpamFolder()); - } else { - menu.findItem(R.id.copy).setVisible(false); - menu.findItem(R.id.move).setVisible(false); - menu.findItem(R.id.archive).setVisible(false); - menu.findItem(R.id.spam).setVisible(false); - } } } diff --git a/src/com/fsck/k9/preferences/AccountSettings.java b/src/com/fsck/k9/preferences/AccountSettings.java index ef84a1892..3a6c2be6e 100644 --- a/src/com/fsck/k9/preferences/AccountSettings.java +++ b/src/com/fsck/k9/preferences/AccountSettings.java @@ -71,9 +71,6 @@ public class AccountSettings { s.put("draftsFolderName", Settings.versions( new V(1, new StringSetting("Drafts")) )); - s.put("enableMoveButtons", Settings.versions( - new V(1, new BooleanSetting(false)) - )); s.put("expungePolicy", Settings.versions( new V(1, new StringResourceSetting(Account.EXPUNGE_IMMEDIATELY, R.array.account_setup_expunge_policy_values)) diff --git a/src/com/fsck/k9/preferences/Settings.java b/src/com/fsck/k9/preferences/Settings.java index 56a6646b9..d7f521d4b 100644 --- a/src/com/fsck/k9/preferences/Settings.java +++ b/src/com/fsck/k9/preferences/Settings.java @@ -35,7 +35,7 @@ public class Settings { * * @see SettingsExporter */ - public static final int VERSION = 20; + public static final int VERSION = 21; public static Map validate(int version, Map> settings,