mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-17 21:32:26 -05:00
Remove unused batch button settings
This commit is contained in:
parent
9c821d25e6
commit
eed64a37f8
@ -268,49 +268,6 @@
|
|||||||
android:positiveButtonText="@android:string/ok"
|
android:positiveButtonText="@android:string/ok"
|
||||||
android:negativeButtonText="@android:string/cancel" />
|
android:negativeButtonText="@android:string/cancel" />
|
||||||
|
|
||||||
<PreferenceScreen
|
|
||||||
android:title="@string/global_settings_batch_buttons"
|
|
||||||
android:summary="@string/global_settings_batch_buttons_summary"
|
|
||||||
android:key="batch_buttons_settings">
|
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:persistent="false"
|
|
||||||
android:key="batch_buttons_mark_read"
|
|
||||||
android:title="@string/global_settings_mark_read"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:persistent="false"
|
|
||||||
android:key="batch_buttons_delete"
|
|
||||||
android:title="@string/global_settings_delete"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:persistent="false"
|
|
||||||
android:key="batch_buttons_archive"
|
|
||||||
android:title="@string/global_settings_archive"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:persistent="false"
|
|
||||||
android:key="batch_buttons_move"
|
|
||||||
android:title="@string/global_settings_move"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:persistent="false"
|
|
||||||
android:key="batch_buttons_flag"
|
|
||||||
android:title="@string/global_settings_flag"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:persistent="false"
|
|
||||||
android:key="batch_buttons_unselect"
|
|
||||||
android:title="@string/global_settings_unselect"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
|
@ -245,13 +245,6 @@ public class K9 extends Application {
|
|||||||
private static String mAttachmentDefaultPath = "";
|
private static String mAttachmentDefaultPath = "";
|
||||||
private static boolean mWrapFolderNames = false;
|
private static boolean mWrapFolderNames = false;
|
||||||
|
|
||||||
private static boolean mBatchButtonsMarkRead = true;
|
|
||||||
private static boolean mBatchButtonsDelete = true;
|
|
||||||
private static boolean mBatchButtonsArchive = false;
|
|
||||||
private static boolean mBatchButtonsMove = false;
|
|
||||||
private static boolean mBatchButtonsFlag = true;
|
|
||||||
private static boolean mBatchButtonsUnselect = true;
|
|
||||||
|
|
||||||
private static boolean useGalleryBugWorkaround = false;
|
private static boolean useGalleryBugWorkaround = false;
|
||||||
private static boolean galleryBuggy;
|
private static boolean galleryBuggy;
|
||||||
|
|
||||||
@ -515,13 +508,6 @@ public class K9 extends Application {
|
|||||||
editor.putBoolean("messageViewShowNext", mMessageViewShowNext);
|
editor.putBoolean("messageViewShowNext", mMessageViewShowNext);
|
||||||
editor.putBoolean("wrapFolderNames", mWrapFolderNames);
|
editor.putBoolean("wrapFolderNames", mWrapFolderNames);
|
||||||
|
|
||||||
editor.putBoolean("batchButtonsMarkRead", mBatchButtonsMarkRead);
|
|
||||||
editor.putBoolean("batchButtonsDelete", mBatchButtonsDelete);
|
|
||||||
editor.putBoolean("batchButtonsArchive", mBatchButtonsArchive);
|
|
||||||
editor.putBoolean("batchButtonsMove", mBatchButtonsMove);
|
|
||||||
editor.putBoolean("batchButtonsFlag", mBatchButtonsFlag);
|
|
||||||
editor.putBoolean("batchButtonsUnselect", mBatchButtonsUnselect);
|
|
||||||
|
|
||||||
editor.putString("language", language);
|
editor.putString("language", language);
|
||||||
editor.putInt("theme", theme.ordinal());
|
editor.putInt("theme", theme.ordinal());
|
||||||
editor.putInt("messageViewTheme", messageViewTheme.ordinal());
|
editor.putInt("messageViewTheme", messageViewTheme.ordinal());
|
||||||
@ -713,13 +699,6 @@ public class K9 extends Application {
|
|||||||
mMessageViewShowNext = sprefs.getBoolean("messageViewShowNext", false);
|
mMessageViewShowNext = sprefs.getBoolean("messageViewShowNext", false);
|
||||||
mWrapFolderNames = sprefs.getBoolean("wrapFolderNames", false);
|
mWrapFolderNames = sprefs.getBoolean("wrapFolderNames", false);
|
||||||
|
|
||||||
mBatchButtonsMarkRead = sprefs.getBoolean("batchButtonsMarkRead", true);
|
|
||||||
mBatchButtonsDelete = sprefs.getBoolean("batchButtonsDelete", true);
|
|
||||||
mBatchButtonsArchive = sprefs.getBoolean("batchButtonsArchive", true);
|
|
||||||
mBatchButtonsMove = sprefs.getBoolean("batchButtonsMove", true);
|
|
||||||
mBatchButtonsFlag = sprefs.getBoolean("batchButtonsFlag", true);
|
|
||||||
mBatchButtonsUnselect = sprefs.getBoolean("batchButtonsUnselect", true);
|
|
||||||
|
|
||||||
useGalleryBugWorkaround = sprefs.getBoolean("useGalleryBugWorkaround", K9.isGalleryBuggy());
|
useGalleryBugWorkaround = sprefs.getBoolean("useGalleryBugWorkaround", K9.isGalleryBuggy());
|
||||||
|
|
||||||
mConfirmDelete = sprefs.getBoolean("confirmDelete", false);
|
mConfirmDelete = sprefs.getBoolean("confirmDelete", false);
|
||||||
@ -1220,48 +1199,6 @@ public class K9 extends Application {
|
|||||||
sNotificationQuickDelete = mode;
|
sNotificationQuickDelete = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean batchButtonsMarkRead() {
|
|
||||||
return mBatchButtonsMarkRead;
|
|
||||||
}
|
|
||||||
public static void setBatchButtonsMarkRead(final boolean state) {
|
|
||||||
mBatchButtonsMarkRead = state;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean batchButtonsDelete() {
|
|
||||||
return mBatchButtonsDelete;
|
|
||||||
}
|
|
||||||
public static void setBatchButtonsDelete(final boolean state) {
|
|
||||||
mBatchButtonsDelete = state;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean batchButtonsArchive() {
|
|
||||||
return mBatchButtonsArchive;
|
|
||||||
}
|
|
||||||
public static void setBatchButtonsArchive(final boolean state) {
|
|
||||||
mBatchButtonsArchive = state;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean batchButtonsMove() {
|
|
||||||
return mBatchButtonsMove;
|
|
||||||
}
|
|
||||||
public static void setBatchButtonsMove(final boolean state) {
|
|
||||||
mBatchButtonsMove = state;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean batchButtonsFlag() {
|
|
||||||
return mBatchButtonsFlag;
|
|
||||||
}
|
|
||||||
public static void setBatchButtonsFlag(final boolean state) {
|
|
||||||
mBatchButtonsFlag = state;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean batchButtonsUnselect() {
|
|
||||||
return mBatchButtonsUnselect;
|
|
||||||
}
|
|
||||||
public static void setBatchButtonsUnselect(final boolean state) {
|
|
||||||
mBatchButtonsUnselect = state;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if this system contains a buggy Gallery 3D package.
|
* Check if this system contains a buggy Gallery 3D package.
|
||||||
*
|
*
|
||||||
|
@ -21,7 +21,6 @@ import android.preference.PreferenceScreen;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.fsck.k9.Account;
|
|
||||||
import com.fsck.k9.K9;
|
import com.fsck.k9.K9;
|
||||||
import com.fsck.k9.K9.NotificationHideSubject;
|
import com.fsck.k9.K9.NotificationHideSubject;
|
||||||
import com.fsck.k9.K9.NotificationQuickDelete;
|
import com.fsck.k9.K9.NotificationQuickDelete;
|
||||||
@ -80,12 +79,6 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
private static final String PREFERENCE_QUIET_TIME_STARTS = "quiet_time_starts";
|
private static final String PREFERENCE_QUIET_TIME_STARTS = "quiet_time_starts";
|
||||||
private static final String PREFERENCE_QUIET_TIME_ENDS = "quiet_time_ends";
|
private static final String PREFERENCE_QUIET_TIME_ENDS = "quiet_time_ends";
|
||||||
private static final String PREFERENCE_NOTIF_QUICK_DELETE = "notification_quick_delete";
|
private static final String PREFERENCE_NOTIF_QUICK_DELETE = "notification_quick_delete";
|
||||||
private static final String PREFERENCE_BATCH_BUTTONS_MARK_READ = "batch_buttons_mark_read";
|
|
||||||
private static final String PREFERENCE_BATCH_BUTTONS_DELETE = "batch_buttons_delete";
|
|
||||||
private static final String PREFERENCE_BATCH_BUTTONS_ARCHIVE = "batch_buttons_archive";
|
|
||||||
private static final String PREFERENCE_BATCH_BUTTONS_MOVE = "batch_buttons_move";
|
|
||||||
private static final String PREFERENCE_BATCH_BUTTONS_FLAG = "batch_buttons_flag";
|
|
||||||
private static final String PREFERENCE_BATCH_BUTTONS_UNSELECT = "batch_buttons_unselect";
|
|
||||||
|
|
||||||
private static final String PREFERENCE_MESSAGEVIEW_MOBILE_LAYOUT = "messageview_mobile_layout";
|
private static final String PREFERENCE_MESSAGEVIEW_MOBILE_LAYOUT = "messageview_mobile_layout";
|
||||||
private static final String PREFERENCE_BACKGROUND_OPS = "background_ops";
|
private static final String PREFERENCE_BACKGROUND_OPS = "background_ops";
|
||||||
@ -139,12 +132,6 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
private ListPreference mNotificationQuickDelete;
|
private ListPreference mNotificationQuickDelete;
|
||||||
private Preference mAttachmentPathPreference;
|
private Preference mAttachmentPathPreference;
|
||||||
|
|
||||||
private CheckBoxPreference mBatchButtonsMarkRead;
|
|
||||||
private CheckBoxPreference mBatchButtonsDelete;
|
|
||||||
private CheckBoxPreference mBatchButtonsArchive;
|
|
||||||
private CheckBoxPreference mBatchButtonsMove;
|
|
||||||
private CheckBoxPreference mBatchButtonsFlag;
|
|
||||||
private CheckBoxPreference mBatchButtonsUnselect;
|
|
||||||
private CheckBoxPreference mBackgroundAsUnreadIndicator;
|
private CheckBoxPreference mBackgroundAsUnreadIndicator;
|
||||||
private CheckBoxPreference mThreadedView;
|
private CheckBoxPreference mThreadedView;
|
||||||
private ListPreference mSplitViewMode;
|
private ListPreference mSplitViewMode;
|
||||||
@ -406,32 +393,6 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
mWrapFolderNames = (CheckBoxPreference)findPreference(PREFERENCE_FOLDERLIST_WRAP_NAME);
|
mWrapFolderNames = (CheckBoxPreference)findPreference(PREFERENCE_FOLDERLIST_WRAP_NAME);
|
||||||
mWrapFolderNames.setChecked(K9.wrapFolderNames());
|
mWrapFolderNames.setChecked(K9.wrapFolderNames());
|
||||||
|
|
||||||
mBatchButtonsMarkRead = (CheckBoxPreference)findPreference(PREFERENCE_BATCH_BUTTONS_MARK_READ);
|
|
||||||
mBatchButtonsDelete = (CheckBoxPreference)findPreference(PREFERENCE_BATCH_BUTTONS_DELETE);
|
|
||||||
mBatchButtonsArchive = (CheckBoxPreference)findPreference(PREFERENCE_BATCH_BUTTONS_ARCHIVE);
|
|
||||||
mBatchButtonsMove = (CheckBoxPreference)findPreference(PREFERENCE_BATCH_BUTTONS_MOVE);
|
|
||||||
mBatchButtonsFlag = (CheckBoxPreference)findPreference(PREFERENCE_BATCH_BUTTONS_FLAG);
|
|
||||||
mBatchButtonsUnselect = (CheckBoxPreference)findPreference(PREFERENCE_BATCH_BUTTONS_UNSELECT);
|
|
||||||
mBatchButtonsMarkRead.setChecked(K9.batchButtonsMarkRead());
|
|
||||||
mBatchButtonsDelete.setChecked(K9.batchButtonsDelete());
|
|
||||||
mBatchButtonsArchive.setChecked(K9.batchButtonsArchive());
|
|
||||||
mBatchButtonsMove.setChecked(K9.batchButtonsMove());
|
|
||||||
mBatchButtonsFlag.setChecked(K9.batchButtonsFlag());
|
|
||||||
mBatchButtonsUnselect.setChecked(K9.batchButtonsUnselect());
|
|
||||||
|
|
||||||
// If we don't have any accounts with an archive folder, then don't enable the preference.
|
|
||||||
boolean hasArchiveFolder = false;
|
|
||||||
for (final Account acct : Preferences.getPreferences(this).getAccounts()) {
|
|
||||||
if (acct.hasArchiveFolder()) {
|
|
||||||
hasArchiveFolder = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!hasArchiveFolder) {
|
|
||||||
mBatchButtonsArchive.setEnabled(false);
|
|
||||||
mBatchButtonsArchive.setSummary(R.string.global_settings_archive_disabled_reason);
|
|
||||||
}
|
|
||||||
|
|
||||||
mSplitViewMode = (ListPreference) findPreference(PREFERENCE_SPLITVIEW_MODE);
|
mSplitViewMode = (ListPreference) findPreference(PREFERENCE_SPLITVIEW_MODE);
|
||||||
initListPreference(mSplitViewMode, K9.getSplitViewMode().name(),
|
initListPreference(mSplitViewMode, K9.getSplitViewMode().name(),
|
||||||
mSplitViewMode.getEntries(), mSplitViewMode.getEntryValues());
|
mSplitViewMode.getEntries(), mSplitViewMode.getEntryValues());
|
||||||
@ -507,13 +468,6 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
NotificationQuickDelete.valueOf(mNotificationQuickDelete.getValue()));
|
NotificationQuickDelete.valueOf(mNotificationQuickDelete.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
K9.setBatchButtonsMarkRead(mBatchButtonsMarkRead.isChecked());
|
|
||||||
K9.setBatchButtonsDelete(mBatchButtonsDelete.isChecked());
|
|
||||||
K9.setBatchButtonsArchive(mBatchButtonsArchive.isChecked());
|
|
||||||
K9.setBatchButtonsMove(mBatchButtonsMove.isChecked());
|
|
||||||
K9.setBatchButtonsFlag(mBatchButtonsFlag.isChecked());
|
|
||||||
K9.setBatchButtonsUnselect(mBatchButtonsUnselect.isChecked());
|
|
||||||
|
|
||||||
K9.setSplitViewMode(SplitViewMode.valueOf(mSplitViewMode.getValue()));
|
K9.setSplitViewMode(SplitViewMode.valueOf(mSplitViewMode.getValue()));
|
||||||
K9.setAttachmentDefaultPath(mAttachmentPathPreference.getSummary().toString());
|
K9.setAttachmentDefaultPath(mAttachmentPathPreference.getSummary().toString());
|
||||||
boolean needsRefresh = K9.setBackgroundOps(mBackgroundOps.getValue());
|
boolean needsRefresh = K9.setBackgroundOps(mBackgroundOps.getValue());
|
||||||
|
@ -199,24 +199,6 @@ public class GlobalSettings {
|
|||||||
s.put("wrapFolderNames", Settings.versions(
|
s.put("wrapFolderNames", Settings.versions(
|
||||||
new V(22, new BooleanSetting(false))
|
new V(22, new BooleanSetting(false))
|
||||||
));
|
));
|
||||||
s.put("batchButtonsMarkRead", Settings.versions(
|
|
||||||
new V(8, new BooleanSetting(true))
|
|
||||||
));
|
|
||||||
s.put("batchButtonsDelete", Settings.versions(
|
|
||||||
new V(8, new BooleanSetting(true))
|
|
||||||
));
|
|
||||||
s.put("batchButtonsArchive", Settings.versions(
|
|
||||||
new V(8, new BooleanSetting(false))
|
|
||||||
));
|
|
||||||
s.put("batchButtonsMove", Settings.versions(
|
|
||||||
new V(8, new BooleanSetting(false))
|
|
||||||
));
|
|
||||||
s.put("batchButtonsFlag", Settings.versions(
|
|
||||||
new V(8, new BooleanSetting(true))
|
|
||||||
));
|
|
||||||
s.put("batchButtonsUnselect", Settings.versions(
|
|
||||||
new V(8, new BooleanSetting(true))
|
|
||||||
));
|
|
||||||
s.put("notificationHideSubject", Settings.versions(
|
s.put("notificationHideSubject", Settings.versions(
|
||||||
new V(12, new EnumSetting<NotificationHideSubject>(
|
new V(12, new EnumSetting<NotificationHideSubject>(
|
||||||
NotificationHideSubject.class, NotificationHideSubject.NEVER))
|
NotificationHideSubject.class, NotificationHideSubject.NEVER))
|
||||||
|
@ -35,7 +35,7 @@ public class Settings {
|
|||||||
*
|
*
|
||||||
* @see SettingsExporter
|
* @see SettingsExporter
|
||||||
*/
|
*/
|
||||||
public static final int VERSION = 25;
|
public static final int VERSION = 26;
|
||||||
|
|
||||||
public static Map<String, Object> validate(int version, Map<String,
|
public static Map<String, Object> validate(int version, Map<String,
|
||||||
TreeMap<Integer, SettingsDescription>> settings,
|
TreeMap<Integer, SettingsDescription>> settings,
|
||||||
|
Loading…
Reference in New Issue
Block a user