1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

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.
This commit is contained in:
Daniel Applebaum 2010-02-06 23:23:22 +00:00
parent 4fa4f22f2c
commit 1fb03a45a0
3 changed files with 82 additions and 16 deletions

View File

@ -7,10 +7,39 @@
android:icon="@drawable/ic_menu_compose"
/>
<item
android:id="@+id/list_folders"
android:title="@string/refresh_folders_action"
android:icon="@drawable/ic_menu_refresh"
/>
android:id="@+id/display_1st_class"
android:title="@string/folder_list_display_mode_label"
android:icon="@drawable/ic_menu_refresh"
>
<menu>
<item
android:id="@+id/display_all"
android:title="@string/folder_list_display_mode_all"
android:icon="@drawable/ic_menu_clear"
/>
<item
android:id="@+id/display_1st_class"
android:title="@string/folder_list_display_mode_first_class"
android:icon="@drawable/ic_menu_clear"
/>
<item
android:id="@+id/display_1st_and_2nd_class"
android:title="@string/folder_list_display_mode_first_and_second_class"
android:icon="@drawable/ic_menu_clear"
/>
<item
android:id="@+id/display_not_second_class"
android:title="@string/folder_list_display_mode_not_second_class"
android:icon="@drawable/ic_menu_clear"
/>
<item
android:id="@+id/list_folders"
android:title="@string/refresh_folders_action"
android:icon="@drawable/ic_menu_refresh"
/>
</menu>
</item>
<item
android:id="@+id/empty_trash"
android:alphabeticShortcut="e"
@ -38,14 +67,21 @@
android:title="@string/send_messages_action"
android:icon="@drawable/ic_menu_refresh"
/>
<item
android:id="@+id/compact"
android:title="@string/compact_action"
android:icon="@drawable/ic_menu_compact"
/>
<item
android:id="@+id/clear"
android:title="@string/clear_action"
android:icon="@drawable/ic_menu_clear"
/>
<item android:id="@+id/advanced"
android:title="@string/advanced">
<menu>
<item
android:id="@+id/compact"
android:title="@string/compact_action"
android:icon="@drawable/ic_menu_compact"
/>
<item
android:id="@+id/clear"
android:title="@string/clear_action"
android:icon="@drawable/ic_menu_clear"
/>
</menu>
</item>
</menu>

View File

@ -67,6 +67,8 @@
<string name="remove_account_action">Remove account</string>
<string name="clear_pending_action">Clear pending actions (danger!)</string>
<string name="accounts_action">Accounts</string>
<string name="back_to_accounts_action"></string>
<string name="back_to_folder_list_action"></string>
@ -596,13 +598,22 @@ 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</string>
<string name="folder_list_help_key">1 - Display only 1st Class folders\u000A
<string name="folder_list_help_key">
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</string>
<string name="folder_list_display_mode_label">Folders</string>
<string name="folder_list_display_mode_all">Display all folders</string>
<string name="folder_list_display_mode_first_class">Display only 1st Class folders</string>
<string name="folder_list_display_mode_first_and_second_class">Display 1st and 2nd Class folders</string>
<string name="folder_list_display_mode_not_second_class">Display all except 2nd Class folders</string>
<string name="account_settings_signature__location_label">Signature position</string>
<string name="account_settings_signature__location_before_quoted_text">Before quoted messages</string>
<string name="account_settings_signature__location_after_quoted_text">After quoted messages</string>

View File

@ -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);
}