1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

When no messages are selected yet, "Select all" is the only valid batch

option. Instead of forcing the user through a submenu, show "Select all"
instead of the submenu
This commit is contained in:
Jesse Vincent 2010-05-15 21:03:44 +00:00
parent ea6bb0000e
commit a59ade4fdd
3 changed files with 9 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -37,6 +37,10 @@
/>
</menu>
</item>
<item
android:id="@+id/select_all"
android:title="@string/batch_select_all"
android:icon="@drawable/ic_menu_select_all"/>
<item
android:id="@+id/batch_ops"
android:title="@string/batch_ops"

View File

@ -1153,6 +1153,7 @@ public class MessageList
return true;
case R.id.select_all:
case R.id.batch_select_all:
setAllSelected(true);
toggleBatchButtons();
@ -1271,6 +1272,10 @@ public class MessageList
public boolean onPrepareOptionsMenu(Menu menu)
{
boolean anySelected = anySelected();
menu.findItem(R.id.select_all).setVisible(! anySelected);
menu.findItem(R.id.batch_ops).setVisible(anySelected);
setOpsState(menu, true, anySelected);
if (mQueryString != null)