summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java5
-rw-r--r--app/src/main/res/layout/encrypt_layout.xml10
-rw-r--r--app/src/main/res/values/strings.xml10
3 files changed, 17 insertions, 8 deletions
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 e55b2033..84c1642f 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
@@ -25,6 +25,7 @@ import android.widget.Toast;
import com.zeapo.pwdstore.R;
import com.zeapo.pwdstore.UserPreference;
+import com.zeapo.pwdstore.utils.PasswordRepository;
import org.apache.commons.io.FileUtils;
import org.openintents.openpgp.OpenPgpError;
@@ -70,6 +71,10 @@ public class PgpHandler extends Activity {
((TextView) findViewById(R.id.crypto_password_file)).setText(extra.getString("NAME"));
} else if (extra.getString("Operation").equals("ENCRYPT")) {
setContentView(R.layout.encrypt_layout);
+ String cat = extra.getString("FILE_PATH");
+ cat = cat.replace(PasswordRepository.getWorkTree().getAbsolutePath(), "");
+ cat = cat + "/";
+ ((TextView) findViewById(R.id.crypto_password_category)).setText(cat);
}
// some persistance
diff --git a/app/src/main/res/layout/encrypt_layout.xml b/app/src/main/res/layout/encrypt_layout.xml
index abc75fe5..3abfd7d6 100644
--- a/app/src/main/res/layout/encrypt_layout.xml
+++ b/app/src/main/res/layout/encrypt_layout.xml
@@ -25,17 +25,21 @@
android:layout_column="0">
<TextView
+ android:id="@+id/crypto_password_category"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
- android:text="Name: "/>
+ android:textColor="@android:color/holo_blue_dark"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:text="CATEGORY/"/>
<EditText
android:layout_gravity="center_vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/crypto_password_file_edit"
+ android:hint="@string/crypto_name_hint"
android:textColor="@android:color/holo_orange_dark"/>
</LinearLayout>
@@ -65,7 +69,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
- android:text="Password: "/>
+ android:text="@string/crypto_pass_label"/>
<EditText
android:id="@+id/crypto_password_edit"
android:layout_width="fill_parent"
@@ -78,7 +82,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textStyle="bold"
- android:text="Extra content: "/>
+ android:text="@string/crypto_extra_label"/>
<EditText
android:id="@+id/crypto_extra_edit"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index b12c8f01..51ebc463 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -20,11 +20,11 @@
<string name="initialize">Initialize a git repository</string>
<string name="hello_blank_fragment">Hello blank fragment</string>
- <!-- APG related -->
- <string name="error_activity_not_found">No suitable application for this action found.</string>
- <string name="error_apg_version_not_supported">The installed APG version is not supported.</string>
- <string name="insufficient_apg_permissions">Password Store doesn\'t have permission to access APG fully, please reinstall Password Store to fix that.</string>
- <string name="title_activity_agp_intents">AgpIntentsActivity</string>
+ <!-- PGP Handler -->
<string name="title_activity_pgp_handler">PgpHandler</string>
+ <string name="crypto_name_hint">name</string>
+ <string name="crypto_pass_label">Password</string>
+ <string name="crypto_extra_label">Extra</string>
+
</resources>