mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 10:22:15 -05:00
rename "hide buttons" to "scroll buttons" because that's what it does
This commit is contained in:
parent
dc5616c4b6
commit
91ab617807
@ -101,8 +101,8 @@ public class Account implements BaseAccount
|
||||
private boolean mSaveAllHeaders;
|
||||
private boolean mPushPollOnConnect;
|
||||
private boolean mNotifySync;
|
||||
private HideButtons mHideMessageViewButtons;
|
||||
private HideButtons mHideMessageViewMoveButtons;
|
||||
private ScrollButtons mScrollMessageViewButtons;
|
||||
private ScrollButtons mScrollMessageViewMoveButtons;
|
||||
private ShowPictures mShowPictures;
|
||||
private boolean mEnableMoveButtons;
|
||||
private boolean mIsSignatureBeforeQuotedText;
|
||||
@ -143,7 +143,7 @@ public class Account implements BaseAccount
|
||||
NONE, ALL, FIRST_CLASS, FIRST_AND_SECOND_CLASS, NOT_SECOND_CLASS
|
||||
}
|
||||
|
||||
public enum HideButtons
|
||||
public enum ScrollButtons
|
||||
{
|
||||
NEVER, ALWAYS, KEYBOARD_AVAILABLE
|
||||
}
|
||||
@ -175,8 +175,8 @@ public class Account implements BaseAccount
|
||||
mFolderSyncMode = FolderMode.FIRST_CLASS;
|
||||
mFolderPushMode = FolderMode.FIRST_CLASS;
|
||||
mFolderTargetMode = FolderMode.NOT_SECOND_CLASS;
|
||||
mHideMessageViewButtons = HideButtons.NEVER;
|
||||
mHideMessageViewMoveButtons = HideButtons.NEVER;
|
||||
mScrollMessageViewButtons = ScrollButtons.NEVER;
|
||||
mScrollMessageViewMoveButtons = ScrollButtons.NEVER;
|
||||
mShowPictures = ShowPictures.NEVER;
|
||||
mEnableMoveButtons = false;
|
||||
mIsSignatureBeforeQuotedText = false;
|
||||
@ -304,22 +304,22 @@ public class Account implements BaseAccount
|
||||
|
||||
try
|
||||
{
|
||||
mHideMessageViewButtons = HideButtons.valueOf(prefs.getString(mUuid + ".hideButtonsEnum",
|
||||
HideButtons.NEVER.name()));
|
||||
mScrollMessageViewButtons = ScrollButtons.valueOf(prefs.getString(mUuid + ".hideButtonsEnum",
|
||||
ScrollButtons.NEVER.name()));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
mHideMessageViewButtons = HideButtons.NEVER;
|
||||
mScrollMessageViewButtons = ScrollButtons.NEVER;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
mHideMessageViewMoveButtons = HideButtons.valueOf(prefs.getString(mUuid + ".hideMoveButtonsEnum",
|
||||
HideButtons.NEVER.name()));
|
||||
mScrollMessageViewMoveButtons = ScrollButtons.valueOf(prefs.getString(mUuid + ".hideMoveButtonsEnum",
|
||||
ScrollButtons.NEVER.name()));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
mHideMessageViewMoveButtons = HideButtons.NEVER;
|
||||
mScrollMessageViewMoveButtons = ScrollButtons.NEVER;
|
||||
}
|
||||
|
||||
try
|
||||
@ -543,8 +543,8 @@ public class Account implements BaseAccount
|
||||
editor.putString(mUuid + ".outboxFolderName", mOutboxFolderName);
|
||||
editor.putString(mUuid + ".autoExpandFolderName", mAutoExpandFolderName);
|
||||
editor.putInt(mUuid + ".accountNumber", mAccountNumber);
|
||||
editor.putString(mUuid + ".hideButtonsEnum", mHideMessageViewButtons.name());
|
||||
editor.putString(mUuid + ".hideMoveButtonsEnum", mHideMessageViewMoveButtons.name());
|
||||
editor.putString(mUuid + ".hideButtonsEnum", mScrollMessageViewButtons.name());
|
||||
editor.putString(mUuid + ".hideMoveButtonsEnum", mScrollMessageViewMoveButtons.name());
|
||||
editor.putString(mUuid + ".showPicturesEnum", mShowPictures.name());
|
||||
editor.putBoolean(mUuid + ".enableMoveButtons", mEnableMoveButtons);
|
||||
editor.putString(mUuid + ".folderDisplayMode", mFolderDisplayMode.name());
|
||||
@ -1034,24 +1034,24 @@ public class Account implements BaseAccount
|
||||
this.mNotifySync = showOngoing;
|
||||
}
|
||||
|
||||
public synchronized HideButtons getHideMessageViewButtons()
|
||||
public synchronized ScrollButtons getScrollMessageViewButtons()
|
||||
{
|
||||
return mHideMessageViewButtons;
|
||||
return mScrollMessageViewButtons;
|
||||
}
|
||||
|
||||
public synchronized void setHideMessageViewButtons(HideButtons hideMessageViewButtons)
|
||||
public synchronized void setScrollMessageViewButtons(ScrollButtons scrollMessageViewButtons)
|
||||
{
|
||||
mHideMessageViewButtons = hideMessageViewButtons;
|
||||
mScrollMessageViewButtons = scrollMessageViewButtons;
|
||||
}
|
||||
|
||||
public synchronized HideButtons getHideMessageViewMoveButtons()
|
||||
public synchronized ScrollButtons getScrollMessageViewMoveButtons()
|
||||
{
|
||||
return mHideMessageViewMoveButtons;
|
||||
return mScrollMessageViewMoveButtons;
|
||||
}
|
||||
|
||||
public synchronized void setHideMessageViewMoveButtons(HideButtons hideMessageViewButtons)
|
||||
public synchronized void setScrollMessageViewMoveButtons(ScrollButtons scrollMessageViewButtons)
|
||||
{
|
||||
mHideMessageViewMoveButtons = hideMessageViewButtons;
|
||||
mScrollMessageViewMoveButtons = scrollMessageViewButtons;
|
||||
}
|
||||
|
||||
public synchronized ShowPictures getShowPictures()
|
||||
|
@ -1047,51 +1047,51 @@ public class MessageView extends K9Activity implements OnClickListener
|
||||
{
|
||||
next.requestFocus();
|
||||
}
|
||||
// Perhaps the hideButtons should be global, instead of account-specific
|
||||
// Perhaps the ScrollButtons should be global, instead of account-specific
|
||||
mAccount = Preferences.getPreferences(this).getAccount(mMessageReference.accountUuid);
|
||||
Account.HideButtons hideButtons = mAccount.getHideMessageViewButtons();
|
||||
Account.ScrollButtons scrollButtons = mAccount.getScrollMessageViewButtons();
|
||||
|
||||
//MessagingController.getInstance(getApplication()).addListener(mListener);
|
||||
if (Account.HideButtons.ALWAYS == hideButtons)
|
||||
if (Account.ScrollButtons.ALWAYS == scrollButtons)
|
||||
{
|
||||
hideButtons();
|
||||
scrollButtons();
|
||||
}
|
||||
else if (Account.HideButtons.NEVER == hideButtons)
|
||||
else if (Account.ScrollButtons.NEVER == scrollButtons)
|
||||
{
|
||||
showButtons();
|
||||
staticButtons();
|
||||
}
|
||||
else // Account.HideButtons.KEYBOARD_AVAIL
|
||||
else // Account.ScrollButtons.KEYBOARD_AVAIL
|
||||
{
|
||||
final Configuration config = this.getResources().getConfiguration();
|
||||
if (config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO)
|
||||
{
|
||||
hideButtons();
|
||||
scrollButtons();
|
||||
}
|
||||
else
|
||||
{
|
||||
showButtons();
|
||||
staticButtons();
|
||||
}
|
||||
}
|
||||
|
||||
Account.HideButtons hideMoveButtons = mAccount.getHideMessageViewMoveButtons();
|
||||
if (Account.HideButtons.ALWAYS == hideMoveButtons)
|
||||
Account.ScrollButtons scrollMoveButtons = mAccount.getScrollMessageViewMoveButtons();
|
||||
if (Account.ScrollButtons.ALWAYS == scrollMoveButtons)
|
||||
{
|
||||
hideMoveButtons();
|
||||
scrollMoveButtons();
|
||||
}
|
||||
else if (Account.HideButtons.NEVER == hideMoveButtons)
|
||||
else if (Account.ScrollButtons.NEVER == scrollMoveButtons)
|
||||
{
|
||||
showMoveButtons();
|
||||
staticMoveButtons();
|
||||
}
|
||||
else // Account.HideButtons.KEYBOARD_AVAIL
|
||||
else // Account.ScrollButtons.KEYBOARD_AVAIL
|
||||
{
|
||||
final Configuration config = this.getResources().getConfiguration();
|
||||
if (config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO)
|
||||
{
|
||||
hideMoveButtons();
|
||||
scrollMoveButtons();
|
||||
}
|
||||
else
|
||||
{
|
||||
showMoveButtons();
|
||||
staticMoveButtons();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1246,7 +1246,7 @@ public class MessageView extends K9Activity implements OnClickListener
|
||||
|
||||
}
|
||||
|
||||
private void showButtons()
|
||||
private void staticButtons()
|
||||
{
|
||||
View buttons = findViewById(R.id.scrolling_buttons);
|
||||
if (buttons != null)
|
||||
@ -1255,7 +1255,7 @@ public class MessageView extends K9Activity implements OnClickListener
|
||||
}
|
||||
}
|
||||
|
||||
private void hideButtons()
|
||||
private void scrollButtons()
|
||||
{
|
||||
View buttons = findViewById(R.id.bottom_buttons);
|
||||
if (buttons != null)
|
||||
@ -1264,7 +1264,7 @@ public class MessageView extends K9Activity implements OnClickListener
|
||||
}
|
||||
}
|
||||
|
||||
private void showMoveButtons()
|
||||
private void staticMoveButtons()
|
||||
{
|
||||
View buttons = findViewById(R.id.scrolling_move_buttons);
|
||||
if (buttons != null)
|
||||
@ -1273,7 +1273,7 @@ public class MessageView extends K9Activity implements OnClickListener
|
||||
}
|
||||
}
|
||||
|
||||
private void hideMoveButtons()
|
||||
private void scrollMoveButtons()
|
||||
{
|
||||
View buttons = findViewById(R.id.move_buttons);
|
||||
if (buttons != null)
|
||||
|
@ -116,8 +116,8 @@ public class AccountSettings extends K9PreferenceActivity
|
||||
private CheckBoxPreference mAccountDefault;
|
||||
private CheckBoxPreference mAccountNotify;
|
||||
private CheckBoxPreference mAccountNotifySelf;
|
||||
private ListPreference mAccountHideButtons;
|
||||
private ListPreference mAccountHideMoveButtons;
|
||||
private ListPreference mAccountScrollButtons;
|
||||
private ListPreference mAccountScrollMoveButtons;
|
||||
private ListPreference mAccountShowPictures;
|
||||
private CheckBoxPreference mAccountEnableMoveButtons;
|
||||
private CheckBoxPreference mAccountNotifySync;
|
||||
@ -396,17 +396,17 @@ public class AccountSettings extends K9PreferenceActivity
|
||||
mAccountDefault.setChecked(
|
||||
mAccount.equals(Preferences.getPreferences(this).getDefaultAccount()));
|
||||
|
||||
mAccountHideButtons = (ListPreference) findPreference(PREFERENCE_HIDE_BUTTONS);
|
||||
mAccountHideButtons.setValue("" + mAccount.getHideMessageViewButtons());
|
||||
mAccountHideButtons.setSummary(mAccountHideButtons.getEntry());
|
||||
mAccountHideButtons.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
|
||||
mAccountScrollButtons = (ListPreference) findPreference(PREFERENCE_HIDE_BUTTONS);
|
||||
mAccountScrollButtons.setValue("" + mAccount.getScrollMessageViewButtons());
|
||||
mAccountScrollButtons.setSummary(mAccountScrollButtons.getEntry());
|
||||
mAccountScrollButtons.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
|
||||
{
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue)
|
||||
{
|
||||
final String summary = newValue.toString();
|
||||
int index = mAccountHideButtons.findIndexOfValue(summary);
|
||||
mAccountHideButtons.setSummary(mAccountHideButtons.getEntries()[index]);
|
||||
mAccountHideButtons.setValue(summary);
|
||||
int index = mAccountScrollButtons.findIndexOfValue(summary);
|
||||
mAccountScrollButtons.setSummary(mAccountScrollButtons.getEntries()[index]);
|
||||
mAccountScrollButtons.setValue(summary);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -414,17 +414,17 @@ public class AccountSettings extends K9PreferenceActivity
|
||||
mAccountEnableMoveButtons = (CheckBoxPreference) findPreference(PREFERENCE_ENABLE_MOVE_BUTTONS);
|
||||
mAccountEnableMoveButtons.setChecked(mAccount.getEnableMoveButtons());
|
||||
|
||||
mAccountHideMoveButtons = (ListPreference) findPreference(PREFERENCE_HIDE_MOVE_BUTTONS);
|
||||
mAccountHideMoveButtons.setValue("" + mAccount.getHideMessageViewMoveButtons());
|
||||
mAccountHideMoveButtons.setSummary(mAccountHideMoveButtons.getEntry());
|
||||
mAccountHideMoveButtons.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
|
||||
mAccountScrollMoveButtons = (ListPreference) findPreference(PREFERENCE_HIDE_MOVE_BUTTONS);
|
||||
mAccountScrollMoveButtons.setValue("" + mAccount.getScrollMessageViewMoveButtons());
|
||||
mAccountScrollMoveButtons.setSummary(mAccountScrollMoveButtons.getEntry());
|
||||
mAccountScrollMoveButtons.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
|
||||
{
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue)
|
||||
{
|
||||
final String summary = newValue.toString();
|
||||
int index = mAccountHideMoveButtons.findIndexOfValue(summary);
|
||||
mAccountHideMoveButtons.setSummary(mAccountHideMoveButtons.getEntries()[index]);
|
||||
mAccountHideMoveButtons.setValue(summary);
|
||||
int index = mAccountScrollMoveButtons.findIndexOfValue(summary);
|
||||
mAccountScrollMoveButtons.setSummary(mAccountScrollMoveButtons.getEntries()[index]);
|
||||
mAccountScrollMoveButtons.setValue(summary);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@ -765,8 +765,8 @@ public class AccountSettings extends K9PreferenceActivity
|
||||
}
|
||||
}
|
||||
|
||||
mAccount.setHideMessageViewButtons(Account.HideButtons.valueOf(mAccountHideButtons.getValue()));
|
||||
mAccount.setHideMessageViewMoveButtons(Account.HideButtons.valueOf(mAccountHideMoveButtons.getValue()));
|
||||
mAccount.setScrollMessageViewButtons(Account.ScrollButtons.valueOf(mAccountScrollButtons.getValue()));
|
||||
mAccount.setScrollMessageViewMoveButtons(Account.ScrollButtons.valueOf(mAccountScrollMoveButtons.getValue()));
|
||||
mAccount.setShowPictures(Account.ShowPictures.valueOf(mAccountShowPictures.getValue()));
|
||||
mAccount.setEnableMoveButtons(mAccountEnableMoveButtons.isChecked());
|
||||
mAccount.save(Preferences.getPreferences(this));
|
||||
|
Loading…
Reference in New Issue
Block a user