From 1fb03a45a0f5e458f9240b1cc4bfa86d5ae9d17a Mon Sep 17 00:00:00 2001 From: Daniel Applebaum Date: Sat, 6 Feb 2010 23:23:22 +0000 Subject: [PATCH] Fixes Issue 1059 Provides for menu items to quickly change the mode of displayed folders. Also, reorganizes the menu to have an Advanced sub-menu, like Accounts page has. Desparately needs a new icon for the Folders menu item. --- res/menu/folder_list_option.xml | 64 ++++++++++++++++++------ res/values/strings.xml | 13 ++++- src/com/fsck/k9/activity/FolderList.java | 21 +++++++- 3 files changed, 82 insertions(+), 16 deletions(-) diff --git a/res/menu/folder_list_option.xml b/res/menu/folder_list_option.xml index 34c73efa0..c610834f4 100644 --- a/res/menu/folder_list_option.xml +++ b/res/menu/folder_list_option.xml @@ -7,10 +7,39 @@ android:icon="@drawable/ic_menu_compose" /> + android:id="@+id/display_1st_class" + android:title="@string/folder_list_display_mode_label" + android:icon="@drawable/ic_menu_refresh" + > + + + + + + + + + - - + + + + + + + + diff --git a/res/values/strings.xml b/res/values/strings.xml index f87f9a4c9..dd3c523d0 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -67,6 +67,8 @@ Remove account Clear pending actions (danger!) + + Accounts @@ -596,12 +598,21 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin Move\u000AY - Copy\u000AG - Star\u000AO - Sort type\u000AI - Sort order\u000AQ - Return to Folders\u000AS - Select/deselect - 1 - Display only 1st Class folders\u000A + + 1 - Display only 1st Class folders\u000A 2 - Display 1st and 2nd Class folders\u000A 3 - Display all except 2nd Class folders\u000A 4 - Display all folders\u000A Q - Return to Accounts\u000A S - Edit Account Settings + + Folders + Display all folders + Display only 1st Class folders + Display 1st and 2nd Class folders + Display all except 2nd Class folders + + Signature position Before quoted messages diff --git a/src/com/fsck/k9/activity/FolderList.java b/src/com/fsck/k9/activity/FolderList.java index b28017eef..9f052c88c 100644 --- a/src/com/fsck/k9/activity/FolderList.java +++ b/src/com/fsck/k9/activity/FolderList.java @@ -516,7 +516,26 @@ public class FolderList extends K9ListActivity onClear(mAccount); return true; - + case R.id.display_1st_class: + { + setDisplayMode(FolderMode.FIRST_CLASS); + return true; + } + case R.id.display_1st_and_2nd_class: + { + setDisplayMode(FolderMode.FIRST_AND_SECOND_CLASS); + return true; + } + case R.id.display_not_second_class: + { + setDisplayMode(FolderMode.NOT_SECOND_CLASS); + return true; + } + case R.id.display_all: + { + setDisplayMode(FolderMode.ALL); + return true; + } default: return super.onOptionsItemSelected(item); }