1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-24 08:38:51 -05:00

Fix code style/formatting

This commit is contained in:
cketti 2013-08-29 17:32:35 +02:00
parent 8464a432e2
commit ee9246b4f9
3 changed files with 38 additions and 46 deletions

View File

@ -262,13 +262,13 @@ public class K9 extends Application {
private static boolean sThreadedViewEnabled = true;
private static SplitViewMode sSplitViewMode = SplitViewMode.NEVER;
private static boolean sColorizeMissingContactPictures = true;
private static boolean sMessageViewArchiveActionVisible = false;
private static boolean sMessageViewDeleteActionVisible = true;
private static boolean sMessageViewMoveActionVisible = false;
private static boolean sMessageViewCopyActionVisible = false;
private static boolean sMessageViewSpamActionVisible = false;
/**
* @see #areDatabasesUpToDate()
@ -548,13 +548,13 @@ public class K9 extends Application {
editor.putBoolean("threadedView", sThreadedViewEnabled);
editor.putString("splitViewMode", sSplitViewMode.name());
editor.putBoolean("colorizeMissingContactPictures", sColorizeMissingContactPictures);
editor.putBoolean("messageViewArchiveActionVisible", sMessageViewArchiveActionVisible);
editor.putBoolean("messageViewDeleteActionVisible", sMessageViewDeleteActionVisible);
editor.putBoolean("messageViewMoveActionVisible", sMessageViewMoveActionVisible);
editor.putBoolean("messageViewCopyActionVisible", sMessageViewCopyActionVisible);
editor.putBoolean("messageViewSpamActionVisible", sMessageViewSpamActionVisible);
fontSizes.save(editor);
}
@ -779,13 +779,13 @@ public class K9 extends Application {
}
sColorizeMissingContactPictures = sprefs.getBoolean("colorizeMissingContactPictures", true);
sMessageViewArchiveActionVisible = sprefs.getBoolean("messageViewArchiveActionVisible", false);
sMessageViewDeleteActionVisible = sprefs.getBoolean("messageViewDeleteActionVisible", true);
sMessageViewMoveActionVisible = sprefs.getBoolean("messageViewMoveActionVisible", false);
sMessageViewCopyActionVisible = sprefs.getBoolean("messageViewCopyActionVisible", false);
sMessageViewSpamActionVisible = sprefs.getBoolean("messageViewSpamActionVisible", false);
K9.setK9Language(sprefs.getString("language", ""));
@ -1348,47 +1348,43 @@ public class K9 extends Application {
}
public static boolean isMessageViewArchiveActionVisible() {
return sMessageViewArchiveActionVisible;
return sMessageViewArchiveActionVisible;
}
public static void setMessageViewArchiveActionVisible(boolean messageViewArchiveActionVisible) {
sMessageViewArchiveActionVisible = messageViewArchiveActionVisible;
public static void setMessageViewArchiveActionVisible(boolean visible) {
sMessageViewArchiveActionVisible = visible;
}
public static boolean isMessageViewDeleteActionVisible() {
return sMessageViewDeleteActionVisible;
return sMessageViewDeleteActionVisible;
}
public static void setMessageViewDeleteActionVisible(
boolean messageViewDeleteActionVisible) {
sMessageViewDeleteActionVisible = messageViewDeleteActionVisible;
public static void setMessageViewDeleteActionVisible(boolean visible) {
sMessageViewDeleteActionVisible = visible;
}
public static boolean isMessageViewMoveActionVisible() {
return sMessageViewMoveActionVisible;
return sMessageViewMoveActionVisible;
}
public static void setMessageViewMoveActionVisible(
boolean messageViewMoveActionVisible) {
sMessageViewMoveActionVisible = messageViewMoveActionVisible;
public static void setMessageViewMoveActionVisible(boolean visible) {
sMessageViewMoveActionVisible = visible;
}
public static boolean isMessageViewCopyActionVisible() {
return sMessageViewCopyActionVisible;
return sMessageViewCopyActionVisible;
}
public static void setMessageViewCopyActionVisible(
boolean messageViewCopyActionVisible) {
sMessageViewCopyActionVisible = messageViewCopyActionVisible;
public static void setMessageViewCopyActionVisible(boolean visible) {
sMessageViewCopyActionVisible = visible;
}
public static boolean isMessageViewSpamActionVisible() {
return sMessageViewSpamActionVisible;
return sMessageViewSpamActionVisible;
}
public static void setMessageViewSpamActionVisible(
boolean messageViewSpamActionVisible) {
sMessageViewSpamActionVisible = messageViewSpamActionVisible;
public static void setMessageViewSpamActionVisible(boolean visible) {
sMessageViewSpamActionVisible = visible;
}
/**

View File

@ -1031,23 +1031,23 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
menu.findItem(R.id.delete).setVisible(K9.isMessageViewDeleteActionVisible());
menu.findItem(R.id.copy).setVisible(mMessageViewFragment.isCopyCapable()
&& K9.isMessageViewCopyActionVisible());
&& K9.isMessageViewCopyActionVisible());
menu.findItem(R.id.move).setVisible(mMessageViewFragment.isMoveCapable()
&& K9.isMessageViewMoveActionVisible());
&& K9.isMessageViewMoveActionVisible());
menu.findItem(R.id.archive).setVisible(mMessageViewFragment.isMoveCapable()
&& mMessageViewFragment.canMessageBeArchived()
&& K9.isMessageViewArchiveActionVisible());
&& mMessageViewFragment.canMessageBeArchived()
&& K9.isMessageViewArchiveActionVisible());
menu.findItem(R.id.spam).setVisible(mMessageViewFragment.isMoveCapable()
&& mMessageViewFragment.canMessageBeMovedToSpam()
&& K9.isMessageViewSpamActionVisible());
&& mMessageViewFragment.canMessageBeMovedToSpam()
&& K9.isMessageViewSpamActionVisible());
Menu refileSubmenu = menu.findItem(R.id.refile).getSubMenu();
refileSubmenu.findItem(R.id.copy).setVisible(mMessageViewFragment.isCopyCapable());
refileSubmenu.findItem(R.id.move).setVisible(mMessageViewFragment.isMoveCapable());
refileSubmenu.findItem(R.id.archive).setVisible(mMessageViewFragment.isMoveCapable()
&& mMessageViewFragment.canMessageBeArchived());
&& mMessageViewFragment.canMessageBeArchived());
refileSubmenu.findItem(R.id.spam).setVisible(mMessageViewFragment.isMoveCapable()
&& mMessageViewFragment.canMessageBeMovedToSpam());
&& mMessageViewFragment.canMessageBeMovedToSpam());
if (mMessageViewFragment.allHeadersVisible()) {
menu.findItem(R.id.show_headers).setVisible(false);

View File

@ -435,8 +435,7 @@ public class Prefs extends K9PreferenceActivity {
mVisibleRefileActions.setItems(visibleRefileActionsEntries);
mVisibleRefileActions.setCheckedItems(visibleRefileActionsValues);
mSplitViewMode = (ListPreference) findPreference(PREFERENCE_SPLITVIEW_MODE);
initListPreference(mSplitViewMode, K9.getSplitViewMode().name(),
mSplitViewMode.getEntries(), mSplitViewMode.getEntryValues());
@ -505,16 +504,13 @@ public class Prefs extends K9PreferenceActivity {
K9.setMobileOptimizedLayout(mMobileOptimizedLayout.isChecked());
K9.setAutofitWidth(mAutofitWidth.isChecked());
K9.setQuietTimeEnabled(mQuietTimeEnabled.isChecked());
K9.setMessageViewDeleteActionVisible(
mVisibleRefileActions.getCheckedItems()[VISIBLE_REFILE_ACTIONS_DELETE]);
K9.setMessageViewArchiveActionVisible(
mVisibleRefileActions.getCheckedItems()[VISIBLE_REFILE_ACTIONS_ARCHIVE]);
K9.setMessageViewMoveActionVisible(
mVisibleRefileActions.getCheckedItems()[VISIBLE_REFILE_ACTIONS_MOVE]);
K9.setMessageViewCopyActionVisible(
mVisibleRefileActions.getCheckedItems()[VISIBLE_REFILE_ACTIONS_COPY]);
K9.setMessageViewSpamActionVisible(
mVisibleRefileActions.getCheckedItems()[VISIBLE_REFILE_ACTIONS_SPAM]);
boolean[] enabledRefileActions = mVisibleRefileActions.getCheckedItems();
K9.setMessageViewDeleteActionVisible(enabledRefileActions[VISIBLE_REFILE_ACTIONS_DELETE]);
K9.setMessageViewArchiveActionVisible(enabledRefileActions[VISIBLE_REFILE_ACTIONS_ARCHIVE]);
K9.setMessageViewMoveActionVisible(enabledRefileActions[VISIBLE_REFILE_ACTIONS_MOVE]);
K9.setMessageViewCopyActionVisible(enabledRefileActions[VISIBLE_REFILE_ACTIONS_COPY]);
K9.setMessageViewSpamActionVisible(enabledRefileActions[VISIBLE_REFILE_ACTIONS_SPAM]);
K9.setQuietTimeStarts(mQuietTimeStarts.getTime());
K9.setQuietTimeEnds(mQuietTimeEnds.getTime());