1
0
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:
Jesse Vincent 2010-12-25 19:28:54 +00:00
parent dc5616c4b6
commit 91ab617807
3 changed files with 60 additions and 60 deletions

View File

@ -101,8 +101,8 @@ public class Account implements BaseAccount
private boolean mSaveAllHeaders; private boolean mSaveAllHeaders;
private boolean mPushPollOnConnect; private boolean mPushPollOnConnect;
private boolean mNotifySync; private boolean mNotifySync;
private HideButtons mHideMessageViewButtons; private ScrollButtons mScrollMessageViewButtons;
private HideButtons mHideMessageViewMoveButtons; private ScrollButtons mScrollMessageViewMoveButtons;
private ShowPictures mShowPictures; private ShowPictures mShowPictures;
private boolean mEnableMoveButtons; private boolean mEnableMoveButtons;
private boolean mIsSignatureBeforeQuotedText; private boolean mIsSignatureBeforeQuotedText;
@ -143,7 +143,7 @@ public class Account implements BaseAccount
NONE, ALL, FIRST_CLASS, FIRST_AND_SECOND_CLASS, NOT_SECOND_CLASS NONE, ALL, FIRST_CLASS, FIRST_AND_SECOND_CLASS, NOT_SECOND_CLASS
} }
public enum HideButtons public enum ScrollButtons
{ {
NEVER, ALWAYS, KEYBOARD_AVAILABLE NEVER, ALWAYS, KEYBOARD_AVAILABLE
} }
@ -175,8 +175,8 @@ public class Account implements BaseAccount
mFolderSyncMode = FolderMode.FIRST_CLASS; mFolderSyncMode = FolderMode.FIRST_CLASS;
mFolderPushMode = FolderMode.FIRST_CLASS; mFolderPushMode = FolderMode.FIRST_CLASS;
mFolderTargetMode = FolderMode.NOT_SECOND_CLASS; mFolderTargetMode = FolderMode.NOT_SECOND_CLASS;
mHideMessageViewButtons = HideButtons.NEVER; mScrollMessageViewButtons = ScrollButtons.NEVER;
mHideMessageViewMoveButtons = HideButtons.NEVER; mScrollMessageViewMoveButtons = ScrollButtons.NEVER;
mShowPictures = ShowPictures.NEVER; mShowPictures = ShowPictures.NEVER;
mEnableMoveButtons = false; mEnableMoveButtons = false;
mIsSignatureBeforeQuotedText = false; mIsSignatureBeforeQuotedText = false;
@ -304,22 +304,22 @@ public class Account implements BaseAccount
try try
{ {
mHideMessageViewButtons = HideButtons.valueOf(prefs.getString(mUuid + ".hideButtonsEnum", mScrollMessageViewButtons = ScrollButtons.valueOf(prefs.getString(mUuid + ".hideButtonsEnum",
HideButtons.NEVER.name())); ScrollButtons.NEVER.name()));
} }
catch (Exception e) catch (Exception e)
{ {
mHideMessageViewButtons = HideButtons.NEVER; mScrollMessageViewButtons = ScrollButtons.NEVER;
} }
try try
{ {
mHideMessageViewMoveButtons = HideButtons.valueOf(prefs.getString(mUuid + ".hideMoveButtonsEnum", mScrollMessageViewMoveButtons = ScrollButtons.valueOf(prefs.getString(mUuid + ".hideMoveButtonsEnum",
HideButtons.NEVER.name())); ScrollButtons.NEVER.name()));
} }
catch (Exception e) catch (Exception e)
{ {
mHideMessageViewMoveButtons = HideButtons.NEVER; mScrollMessageViewMoveButtons = ScrollButtons.NEVER;
} }
try try
@ -543,8 +543,8 @@ public class Account implements BaseAccount
editor.putString(mUuid + ".outboxFolderName", mOutboxFolderName); editor.putString(mUuid + ".outboxFolderName", mOutboxFolderName);
editor.putString(mUuid + ".autoExpandFolderName", mAutoExpandFolderName); editor.putString(mUuid + ".autoExpandFolderName", mAutoExpandFolderName);
editor.putInt(mUuid + ".accountNumber", mAccountNumber); editor.putInt(mUuid + ".accountNumber", mAccountNumber);
editor.putString(mUuid + ".hideButtonsEnum", mHideMessageViewButtons.name()); editor.putString(mUuid + ".hideButtonsEnum", mScrollMessageViewButtons.name());
editor.putString(mUuid + ".hideMoveButtonsEnum", mHideMessageViewMoveButtons.name()); editor.putString(mUuid + ".hideMoveButtonsEnum", mScrollMessageViewMoveButtons.name());
editor.putString(mUuid + ".showPicturesEnum", mShowPictures.name()); editor.putString(mUuid + ".showPicturesEnum", mShowPictures.name());
editor.putBoolean(mUuid + ".enableMoveButtons", mEnableMoveButtons); editor.putBoolean(mUuid + ".enableMoveButtons", mEnableMoveButtons);
editor.putString(mUuid + ".folderDisplayMode", mFolderDisplayMode.name()); editor.putString(mUuid + ".folderDisplayMode", mFolderDisplayMode.name());
@ -1034,24 +1034,24 @@ public class Account implements BaseAccount
this.mNotifySync = showOngoing; 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() public synchronized ShowPictures getShowPictures()

View File

@ -1047,51 +1047,51 @@ public class MessageView extends K9Activity implements OnClickListener
{ {
next.requestFocus(); 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); mAccount = Preferences.getPreferences(this).getAccount(mMessageReference.accountUuid);
Account.HideButtons hideButtons = mAccount.getHideMessageViewButtons(); Account.ScrollButtons scrollButtons = mAccount.getScrollMessageViewButtons();
//MessagingController.getInstance(getApplication()).addListener(mListener); //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(); final Configuration config = this.getResources().getConfiguration();
if (config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO) if (config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO)
{ {
hideButtons(); scrollButtons();
} }
else else
{ {
showButtons(); staticButtons();
} }
} }
Account.HideButtons hideMoveButtons = mAccount.getHideMessageViewMoveButtons(); Account.ScrollButtons scrollMoveButtons = mAccount.getScrollMessageViewMoveButtons();
if (Account.HideButtons.ALWAYS == hideMoveButtons) 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(); final Configuration config = this.getResources().getConfiguration();
if (config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO) if (config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO)
{ {
hideMoveButtons(); scrollMoveButtons();
} }
else 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); View buttons = findViewById(R.id.scrolling_buttons);
if (buttons != null) 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); View buttons = findViewById(R.id.bottom_buttons);
if (buttons != null) 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); View buttons = findViewById(R.id.scrolling_move_buttons);
if (buttons != null) 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); View buttons = findViewById(R.id.move_buttons);
if (buttons != null) if (buttons != null)

View File

@ -116,8 +116,8 @@ public class AccountSettings extends K9PreferenceActivity
private CheckBoxPreference mAccountDefault; private CheckBoxPreference mAccountDefault;
private CheckBoxPreference mAccountNotify; private CheckBoxPreference mAccountNotify;
private CheckBoxPreference mAccountNotifySelf; private CheckBoxPreference mAccountNotifySelf;
private ListPreference mAccountHideButtons; private ListPreference mAccountScrollButtons;
private ListPreference mAccountHideMoveButtons; private ListPreference mAccountScrollMoveButtons;
private ListPreference mAccountShowPictures; private ListPreference mAccountShowPictures;
private CheckBoxPreference mAccountEnableMoveButtons; private CheckBoxPreference mAccountEnableMoveButtons;
private CheckBoxPreference mAccountNotifySync; private CheckBoxPreference mAccountNotifySync;
@ -396,17 +396,17 @@ public class AccountSettings extends K9PreferenceActivity
mAccountDefault.setChecked( mAccountDefault.setChecked(
mAccount.equals(Preferences.getPreferences(this).getDefaultAccount())); mAccount.equals(Preferences.getPreferences(this).getDefaultAccount()));
mAccountHideButtons = (ListPreference) findPreference(PREFERENCE_HIDE_BUTTONS); mAccountScrollButtons = (ListPreference) findPreference(PREFERENCE_HIDE_BUTTONS);
mAccountHideButtons.setValue("" + mAccount.getHideMessageViewButtons()); mAccountScrollButtons.setValue("" + mAccount.getScrollMessageViewButtons());
mAccountHideButtons.setSummary(mAccountHideButtons.getEntry()); mAccountScrollButtons.setSummary(mAccountScrollButtons.getEntry());
mAccountHideButtons.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() mAccountScrollButtons.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
{ {
public boolean onPreferenceChange(Preference preference, Object newValue) public boolean onPreferenceChange(Preference preference, Object newValue)
{ {
final String summary = newValue.toString(); final String summary = newValue.toString();
int index = mAccountHideButtons.findIndexOfValue(summary); int index = mAccountScrollButtons.findIndexOfValue(summary);
mAccountHideButtons.setSummary(mAccountHideButtons.getEntries()[index]); mAccountScrollButtons.setSummary(mAccountScrollButtons.getEntries()[index]);
mAccountHideButtons.setValue(summary); mAccountScrollButtons.setValue(summary);
return false; return false;
} }
}); });
@ -414,17 +414,17 @@ public class AccountSettings extends K9PreferenceActivity
mAccountEnableMoveButtons = (CheckBoxPreference) findPreference(PREFERENCE_ENABLE_MOVE_BUTTONS); mAccountEnableMoveButtons = (CheckBoxPreference) findPreference(PREFERENCE_ENABLE_MOVE_BUTTONS);
mAccountEnableMoveButtons.setChecked(mAccount.getEnableMoveButtons()); mAccountEnableMoveButtons.setChecked(mAccount.getEnableMoveButtons());
mAccountHideMoveButtons = (ListPreference) findPreference(PREFERENCE_HIDE_MOVE_BUTTONS); mAccountScrollMoveButtons = (ListPreference) findPreference(PREFERENCE_HIDE_MOVE_BUTTONS);
mAccountHideMoveButtons.setValue("" + mAccount.getHideMessageViewMoveButtons()); mAccountScrollMoveButtons.setValue("" + mAccount.getScrollMessageViewMoveButtons());
mAccountHideMoveButtons.setSummary(mAccountHideMoveButtons.getEntry()); mAccountScrollMoveButtons.setSummary(mAccountScrollMoveButtons.getEntry());
mAccountHideMoveButtons.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() mAccountScrollMoveButtons.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
{ {
public boolean onPreferenceChange(Preference preference, Object newValue) public boolean onPreferenceChange(Preference preference, Object newValue)
{ {
final String summary = newValue.toString(); final String summary = newValue.toString();
int index = mAccountHideMoveButtons.findIndexOfValue(summary); int index = mAccountScrollMoveButtons.findIndexOfValue(summary);
mAccountHideMoveButtons.setSummary(mAccountHideMoveButtons.getEntries()[index]); mAccountScrollMoveButtons.setSummary(mAccountScrollMoveButtons.getEntries()[index]);
mAccountHideMoveButtons.setValue(summary); mAccountScrollMoveButtons.setValue(summary);
return false; return false;
} }
}); });
@ -765,8 +765,8 @@ public class AccountSettings extends K9PreferenceActivity
} }
} }
mAccount.setHideMessageViewButtons(Account.HideButtons.valueOf(mAccountHideButtons.getValue())); mAccount.setScrollMessageViewButtons(Account.ScrollButtons.valueOf(mAccountScrollButtons.getValue()));
mAccount.setHideMessageViewMoveButtons(Account.HideButtons.valueOf(mAccountHideMoveButtons.getValue())); mAccount.setScrollMessageViewMoveButtons(Account.ScrollButtons.valueOf(mAccountScrollMoveButtons.getValue()));
mAccount.setShowPictures(Account.ShowPictures.valueOf(mAccountShowPictures.getValue())); mAccount.setShowPictures(Account.ShowPictures.valueOf(mAccountShowPictures.getValue()));
mAccount.setEnableMoveButtons(mAccountEnableMoveButtons.isChecked()); mAccount.setEnableMoveButtons(mAccountEnableMoveButtons.isChecked());
mAccount.save(Preferences.getPreferences(this)); mAccount.save(Preferences.getPreferences(this));