From 2c929441a791889b9fdd2342702118563442ef7d Mon Sep 17 00:00:00 2001 From: knuthy Date: Mon, 29 Sep 2014 21:47:29 +0200 Subject: a simple solution to resolve #13 --- app/src/main/res/menu/pwdstore.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src/main/res') diff --git a/app/src/main/res/menu/pwdstore.xml b/app/src/main/res/menu/pwdstore.xml index 65bc0272..a3f44f73 100644 --- a/app/src/main/res/menu/pwdstore.xml +++ b/app/src/main/res/menu/pwdstore.xml @@ -17,7 +17,7 @@ Date: Mon, 29 Sep 2014 22:04:47 +0200 Subject: show toast on copy and dismiss dialog if error on openkeychain --- app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 12 ++++++++++++ app/src/main/res/layout/decrypt_layout.xml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'app/src/main/res') diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java index 78902d8a..efeabc3e 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -147,6 +147,9 @@ public class PgpHandler extends Activity implements OpenPgpServiceConnection.OnB case R.id.copy_password: ClipData clip = ClipData.newPlainText("pgp_handler_result_pm", ((TextView) findViewById(R.id.crypto_password_show)).getText()); clipboard.setPrimaryClip(clip); + showToast("Password copied to clipboard, you have " + + Integer.parseInt(settings.getString("general_show_time", "45")) + + " seconds to paste it somewhere."); } return super.onOptionsItemSelected(item); } @@ -387,10 +390,19 @@ public class PgpHandler extends Activity implements OpenPgpServiceConnection.OnB break; } case OpenPgpApi.RESULT_CODE_ERROR: { + // TODO show what kind of error it is + /* For example: + * No suitable key found -> no key in OpenKeyChain + * + * Check in open-pgp-lib how their definitions and error code + */ showToast("ERROR"); OpenPgpError error = result.getParcelableExtra(OpenPgpApi.RESULT_ERROR); handleError(error); + + // close the dialog + bindingDialog.dismiss(); break; } diff --git a/app/src/main/res/layout/decrypt_layout.xml b/app/src/main/res/layout/decrypt_layout.xml index 300e1d49..6169dd19 100644 --- a/app/src/main/res/layout/decrypt_layout.xml +++ b/app/src/main/res/layout/decrypt_layout.xml @@ -77,7 +77,7 @@ Date: Tue, 30 Sep 2014 00:46:58 +0200 Subject: a first draft, not complete yet --- app/src/main/res/drawable/bottom_line.xml | 14 ++ app/src/main/res/layout/activity_git_clone.xml | 185 +++++++++++++++++++++---- app/src/main/res/values/strings.xml | 13 +- 3 files changed, 183 insertions(+), 29 deletions(-) create mode 100644 app/src/main/res/drawable/bottom_line.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/drawable/bottom_line.xml b/app/src/main/res/drawable/bottom_line.xml new file mode 100644 index 00000000..c24a04df --- /dev/null +++ b/app/src/main/res/drawable/bottom_line.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_git_clone.xml b/app/src/main/res/layout/activity_git_clone.xml index b427ac8d..7aa9eea9 100644 --- a/app/src/main/res/layout/activity_git_clone.xml +++ b/app/src/main/res/layout/activity_git_clone.xml @@ -1,46 +1,175 @@ - + tools:context="com.zeapo.pwdstore.GitHandler" + android:orientation="vertical"> - - + + + + + - - - + android:text="@string/server_protocol" + android:id="@+id/label_server_protocol" + android:layout_centerVertical="true" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" /> + + + + + + + + + + + + + + + + + + + android:hint="@string/server_path_hint" + android:layout_toEndOf="@+id/label_server_path" + android:layout_toRightOf="@+id/label_server_path" + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true"/> + + + + -