Menu cleanup

This commit is contained in:
Dominik Schürmann 2014-04-01 19:31:36 +02:00
parent c414dd2fe9
commit d8001f9bbd
4 changed files with 47 additions and 28 deletions

View File

@ -21,6 +21,7 @@ import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.Id;
import org.sufficientlysecure.keychain.R;
@ -55,10 +56,6 @@ public class KeyListActivity extends DrawerActivity {
case R.id.menu_key_list_import:
callIntentForDrawerItem(Constants.DrawerItems.IMPORT_KEYS);
return true;
case R.id.menu_key_list_export:
mExportHelper.showExportKeysDialog(null, Id.type.public_key, Constants.Path.APP_DIR_FILE_PUB, null);
return true;
case R.id.menu_key_list_create:
createKey();
@ -67,6 +64,10 @@ public class KeyListActivity extends DrawerActivity {
case R.id.menu_key_list_create_expert:
createKeyExpert();
return true;
case R.id.menu_key_list_export_public:
mExportHelper.showExportKeysDialog(null, Id.type.public_key, Constants.Path.APP_DIR_FILE_PUB, null);
return true;
case R.id.menu_key_list_secret_export:
mExportHelper.showExportKeysDialog(null, Id.type.secret_key, Constants.Path.APP_DIR_FILE_SEC, null);

View File

@ -2,11 +2,6 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_key_list_import"
app:showAsAction="ifRoom|withText"
android:icon="@drawable/ic_action_add_person"
android:title="@string/menu_import" />
<item
android:id="@+id/menu_key_list_search"
@ -15,6 +10,17 @@
app:actionViewClass="android.support.v7.widget.SearchView"
app:showAsAction="collapseActionView|ifRoom" />
<item
android:id="@+id/menu_key_list_add"
app:showAsAction="ifRoom|withText"
android:icon="@drawable/ic_action_add_person"
android:title="@string/menu_add_keys">
<menu>
<item
android:id="@+id/menu_key_list_import"
app:showAsAction="never"
android:title="@string/menu_import" />
<item
android:id="@+id/menu_key_list_create"
app:showAsAction="never"
@ -24,15 +30,25 @@
android:id="@+id/menu_key_list_create_expert"
app:showAsAction="never"
android:title="@string/menu_create_key_expert" />
</menu>
</item>
<item
android:id="@+id/menu_key_list_export"
app:showAsAction="ifRoom|withText"
android:icon="@drawable/ic_action_import_export"
android:title="@string/menu_export_keys">
<menu>
<item
android:id="@+id/menu_key_list_export_public"
app:showAsAction="never"
android:title="@string/menu_export_keys" />
android:title="@string/menu_export_public_keys" />
<item
android:id="@+id/menu_key_list_secret_export"
app:showAsAction="never"
android:title="@string/menu_export_secret_keys" />
</menu>
</item>
</menu>

View File

@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_key_list_multi_select_all"
android:icon="@drawable/ic_action_select_all"
android:title="@string/menu_select_all" />
<item
android:id="@+id/menu_key_list_multi_export"
android:icon="@drawable/ic_action_import_export"
@ -17,5 +13,9 @@
android:id="@+id/menu_key_list_multi_delete"
android:icon="@drawable/ic_action_discard"
android:title="@string/menu_delete_key" />
<item
android:id="@+id/menu_key_list_multi_select_all"
android:icon="@drawable/ic_action_select_all"
android:title="@string/menu_select_all" />
</menu>

View File

@ -78,7 +78,7 @@
<string name="menu_import_from_qr_code">Import from QR Code</string>
<string name="menu_import">Import</string>
<string name="menu_import_from_nfc">Import from NFC</string>
<string name="menu_export_keys">Export all keys</string>
<string name="menu_export_public_keys">Export all public keys</string>
<string name="menu_export_secret_keys">Export all secret keys</string>
<string name="menu_export_key">Export to file</string>
<string name="menu_delete_key">Delete key</string>
@ -103,6 +103,8 @@
<string name="menu_key_edit_cancel">Cancel</string>
<string name="menu_encrypt_to">Encrypt to…</string>
<string name="menu_select_all">Select all</string>
<string name="menu_add_keys">Add keys</string>
<string name="menu_export_keys">Export keys</string>
<!-- label -->
<string name="label_sign">Sign</string>
@ -469,7 +471,7 @@
<string name="key_view_tab_certs">Certifications</string>
<!-- Navigation Drawer -->
<string name="nav_contacts">Contacts</string>
<string name="nav_contacts">Keys</string>
<string name="nav_encrypt">Sign and Encrypt</string>
<string name="nav_decrypt">Decrypt and Verify</string>
<string name="nav_import">Import Keys</string>