mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-06 17:25:05 -05:00
default import is from keyserver
This commit is contained in:
parent
5b5f66f514
commit
f3638d5b44
@ -50,8 +50,8 @@
|
||||
<item>@string/key_size_4096</item>
|
||||
</string-array>
|
||||
<string-array name="import_action_list">
|
||||
<item>@string/menu_import_from_file</item>
|
||||
<item>@string/menu_key_server</item>
|
||||
<item>@string/menu_import_from_file</item>
|
||||
<item>@string/menu_import_from_qr_code</item>
|
||||
<item>@string/import_from_clipboard</item>
|
||||
<item>@string/menu_import_from_nfc</item>
|
||||
|
@ -310,7 +310,7 @@
|
||||
<!-- Import -->
|
||||
<string name="import_import">Import selected keys</string>
|
||||
<string name="import_sign_and_upload">Import, Sign, and upload selected keys</string>
|
||||
<string name="import_from_clipboard">Import from Clipboard</string>
|
||||
<string name="import_from_clipboard">Import from clipboard</string>
|
||||
|
||||
<plurals name="import_qr_code_missing">
|
||||
<item quantity="one">Missing QR Code with ID %1$s</item>
|
||||
|
@ -146,10 +146,10 @@ public class ImportKeysActivity extends DrawerActivity implements OnNavigationLi
|
||||
String importFilename = intent.getData().getPath();
|
||||
|
||||
// display selected filename
|
||||
getSupportActionBar().setSelectedNavigationItem(0);
|
||||
getSupportActionBar().setSelectedNavigationItem(1);
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ImportKeysFileFragment.ARG_PATH, importFilename);
|
||||
loadFragment(ImportKeysFileFragment.class, args, mNavigationStrings[0]);
|
||||
loadFragment(ImportKeysFileFragment.class, args, mNavigationStrings[1]);
|
||||
|
||||
// directly load data
|
||||
startListFragment(savedInstanceState, null, importFilename);
|
||||
@ -164,8 +164,8 @@ public class ImportKeysActivity extends DrawerActivity implements OnNavigationLi
|
||||
startListFragment(savedInstanceState, null, null);
|
||||
|
||||
if (ACTION_IMPORT_KEY_FROM_FILE.equals(action)) {
|
||||
getSupportActionBar().setSelectedNavigationItem(0);
|
||||
loadFragment(ImportKeysFileFragment.class, null, mNavigationStrings[0]);
|
||||
getSupportActionBar().setSelectedNavigationItem(1);
|
||||
loadFragment(ImportKeysFileFragment.class, null, mNavigationStrings[1]);
|
||||
} else if (ACTION_IMPORT_KEY_FROM_QR_CODE.equals(action)) {
|
||||
getSupportActionBar().setSelectedNavigationItem(2);
|
||||
loadFragment(ImportKeysQrCodeFragment.class, null, mNavigationStrings[2]);
|
||||
@ -206,10 +206,10 @@ public class ImportKeysActivity extends DrawerActivity implements OnNavigationLi
|
||||
// Create new fragment from our own Fragment class
|
||||
switch (itemPosition) {
|
||||
case 0:
|
||||
loadFragment(ImportKeysFileFragment.class, null, mNavigationStrings[itemPosition]);
|
||||
loadFragment(ImportKeysServerFragment.class, null, mNavigationStrings[itemPosition]);
|
||||
break;
|
||||
case 1:
|
||||
loadFragment(ImportKeysServerFragment.class, null, mNavigationStrings[itemPosition]);
|
||||
loadFragment(ImportKeysFileFragment.class, null, mNavigationStrings[itemPosition]);
|
||||
break;
|
||||
case 2:
|
||||
loadFragment(ImportKeysQrCodeFragment.class, null, mNavigationStrings[itemPosition]);
|
||||
|
@ -93,6 +93,7 @@ public class KeyListPublicFragment extends Fragment implements AdapterView.OnIte
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intentImportFromFile = new Intent(getActivity(), ImportKeysActivity.class);
|
||||
intentImportFromFile.setAction(ImportKeysActivity.ACTION_IMPORT_KEY_FROM_FILE);
|
||||
startActivityForResult(intentImportFromFile, Id.request.import_from_qr_code);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user