mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-30 23:00:09 -05:00
Merge pull request #224 from maniac103/extend-folder-menu
Add Refresh' and Settings to folder context menu. Also add Account Settings to the account context menu.
This commit is contained in:
commit
076650f3a3
@ -4,6 +4,8 @@
|
||||
android:title="@string/manage_accounts_move_up_action" />
|
||||
<item android:id="@+id/move_down"
|
||||
android:title="@string/manage_accounts_move_down_action" />
|
||||
<item android:id="@+id/account_settings"
|
||||
android:title="@string/account_settings_action" />
|
||||
<item android:id="@+id/advanced"
|
||||
android:title="@string/advanced">
|
||||
<menu>
|
||||
|
@ -1,9 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/refresh_folder"
|
||||
android:title="@string/check_mail_action"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/clear_local_folder"
|
||||
android:title="@string/clear_local_folder_action"
|
||||
/>
|
||||
|
||||
<item
|
||||
android:id="@+id/folder_settings"
|
||||
android:title="@string/folder_settings_action"
|
||||
/>
|
||||
</menu>
|
||||
|
@ -64,6 +64,7 @@ import com.fsck.k9.Preferences;
|
||||
import com.fsck.k9.R;
|
||||
import com.fsck.k9.activity.misc.ExtendedAsyncTask;
|
||||
import com.fsck.k9.activity.misc.NonConfigurationInstance;
|
||||
import com.fsck.k9.activity.setup.AccountSettings;
|
||||
import com.fsck.k9.activity.setup.AccountSetupBasics;
|
||||
import com.fsck.k9.activity.setup.Prefs;
|
||||
import com.fsck.k9.activity.setup.WelcomeMessage;
|
||||
@ -961,6 +962,10 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
|
||||
showDialog(DIALOG_REMOVE_ACCOUNT);
|
||||
}
|
||||
|
||||
private void onEditAccount(Account account) {
|
||||
AccountSettings.actionSettings(this, account);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(int id) {
|
||||
// Android recreates our dialogs on configuration changes even when they have been
|
||||
@ -1106,6 +1111,9 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
|
||||
case R.id.delete_account:
|
||||
onDeleteAccount(realAccount);
|
||||
break;
|
||||
case R.id.account_settings:
|
||||
onEditAccount(realAccount);
|
||||
break;
|
||||
case R.id.activate:
|
||||
onActivateAccount(realAccount);
|
||||
break;
|
||||
|
@ -654,6 +654,12 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
|
||||
case R.id.clear_local_folder:
|
||||
onClearFolder(mAccount, folder.name);
|
||||
break;
|
||||
case R.id.refresh_folder:
|
||||
checkMail(folder);
|
||||
break;
|
||||
case R.id.folder_settings:
|
||||
FolderSettings.actionSettings(this, mAccount, folder.name);
|
||||
break;
|
||||
}
|
||||
|
||||
return super.onContextItemSelected(item);
|
||||
|
Loading…
Reference in New Issue
Block a user