diff --git a/res/menu/accounts_context.xml b/res/menu/accounts_context.xml index 9eb952915..9b7c32b90 100644 --- a/res/menu/accounts_context.xml +++ b/res/menu/accounts_context.xml @@ -1,18 +1,12 @@ - - - - + + - - - diff --git a/res/menu/folder_context.xml b/res/menu/folder_context.xml index cad9b6c04..f3194db91 100644 --- a/res/menu/folder_context.xml +++ b/res/menu/folder_context.xml @@ -1,32 +1,9 @@ - - - - - - diff --git a/src/com/fsck/k9/activity/Accounts.java b/src/com/fsck/k9/activity/Accounts.java index d11381ceb..099558e4c 100644 --- a/src/com/fsck/k9/activity/Accounts.java +++ b/src/com/fsck/k9/activity/Accounts.java @@ -565,10 +565,6 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { AccountSetupBasics.actionNewAccount(this); } - private void onEditAccount(Account account) { - AccountSettings.actionSettings(this, account); - } - private void onEditPrefs() { Prefs.actionPrefs(this); } @@ -593,11 +589,6 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { MessagingController.getInstance(getApplication()).clearAllPending(account); } - private void onEmptyTrash(Account account) { - MessagingController.getInstance(getApplication()).emptyTrash(account, null); - } - - private void onCompose() { Account defaultAccount = Preferences.getPreferences(this).getDefaultAccount(); if (defaultAccount != null) { @@ -1102,27 +1093,12 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { case R.id.delete_account: onDeleteAccount(realAccount); break; - case R.id.edit_account: - onEditAccount(realAccount); - break; - case R.id.open: - onOpenAccount(mSelectedContextAccount); - break; case R.id.activate: onActivateAccount(realAccount); break; - case R.id.check_mail: - onCheckMail(realAccount); - break; case R.id.clear_pending: onClearCommands(realAccount); break; - case R.id.empty_trash: - onEmptyTrash(realAccount); - break; - case R.id.compact: - onCompact(realAccount); - break; case R.id.clear: onClear(realAccount); break; @@ -1144,11 +1120,6 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { - private void onCompact(Account account) { - mHandler.workingAccount(account, R.string.compacting_account); - MessagingController.getInstance(getApplication()).compact(account, null); - } - private void onClear(Account account) { showDialog(DIALOG_CLEAR_ACCOUNT); @@ -1313,9 +1284,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { if (account instanceof SearchAccount) { for (int i = 0; i < menu.size(); i++) { android.view.MenuItem item = menu.getItem(i); - if (item.getItemId() != R.id.open) { item.setVisible(false); - } } } else { diff --git a/src/com/fsck/k9/activity/FolderList.java b/src/com/fsck/k9/activity/FolderList.java index e37736905..e09c831e5 100644 --- a/src/com/fsck/k9/activity/FolderList.java +++ b/src/com/fsck/k9/activity/FolderList.java @@ -500,10 +500,6 @@ public class FolderList extends K9ListActivity implements OnNavigationListener { AccountSettings.actionSettings(this, mAccount); } - private void onEditFolder(Account account, String folderName) { - FolderSettings.actionSettings(this, account, folderName); - } - private void onAccounts() { Accounts.listAccounts(this); finish(); @@ -644,34 +640,6 @@ public class FolderList extends K9ListActivity implements OnNavigationListener { FolderInfoHolder folder = (FolderInfoHolder) mAdapter.getItem(info.position); switch (item.getItemId()) { - case R.id.open_folder: - onOpenFolder(folder.name); - break; - - case R.id.send_messages: - sendMail(mAccount); - - break; - - case R.id.check_mail: - checkMail(folder); - - break; - - case R.id.folder_settings: - onEditFolder(mAccount, folder.name); - - break; - - case R.id.empty_trash: - onEmptyTrash(mAccount); - - break; - case R.id.expunge: - onExpunge(mAccount, folder.name); - - break; - case R.id.clear_local_folder: onClearFolder(mAccount, folder.name); break; @@ -765,29 +733,6 @@ public class FolderList extends K9ListActivity implements OnNavigationListener { FolderInfoHolder folder = (FolderInfoHolder) mAdapter.getItem(info.position); menu.setHeaderTitle(folder.displayName); - - if (!folder.name.equals(mAccount.getTrashFolderName())) - menu.findItem(R.id.empty_trash).setVisible(false); - - if (folder.name.equals(mAccount.getOutboxFolderName())) { - menu.findItem(R.id.check_mail).setVisible(false); - } else { - menu.findItem(R.id.send_messages).setVisible(false); - } - if (K9.ERROR_FOLDER_NAME.equals(folder.name)) { - menu.findItem(R.id.expunge).setVisible(false); - } - - if (!MessagingController.getInstance(getApplication()).isMoveCapable(mAccount)) { - // FIXME: Really we want to do this for all local-only folders - if (!mAccount.getInboxFolderName().equals(folder.name)) { - menu.findItem(R.id.check_mail).setVisible(false); - } - - menu.findItem(R.id.expunge).setVisible(false); - } - - menu.setHeaderTitle(folder.displayName); } class FolderListAdapter extends BaseAdapter implements Filterable {