diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java index db0fae9b3..9df84065f 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/EditKeyActivity.java @@ -42,6 +42,8 @@ import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.LinearLayout; import android.widget.Toast; import com.beardedhen.androidbootstrap.BootstrapButton; +import com.devspark.appmsg.AppMsg; + import org.spongycastle.openpgp.PGPSecretKey; import org.spongycastle.openpgp.PGPSecretKeyRing; import org.sufficientlysecure.keychain.Constants; @@ -105,7 +107,6 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener private boolean mIsPassPhraseSet; private boolean mNeedsSaving; private boolean mIsBrandNewKeyring = false; - private MenuItem mSaveButton; private BootstrapButton mChangePassphrase; @@ -323,8 +324,6 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); getMenuInflater().inflate(R.menu.key_edit, menu); - mSaveButton = menu.findItem(R.id.menu_key_edit_save); - mSaveButton.setEnabled(needsSaving()); //totally get rid of some actions for new keys if (mDataUri == null) { MenuItem mButton = menu.findItem(R.id.menu_key_edit_export_file); @@ -569,6 +568,8 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener Toast.makeText(this, getString(R.string.error_message, e.getMessage()), Toast.LENGTH_SHORT).show(); } + } else { + AppMsg.makeText(this, R.string.error_change_something_first, AppMsg.STYLE_ALERT).show(); } } diff --git a/OpenPGP-Keychain/src/main/res/values/strings.xml b/OpenPGP-Keychain/src/main/res/values/strings.xml index 5d325d5ec..cbfd0a194 100644 --- a/OpenPGP-Keychain/src/main/res/values/strings.xml +++ b/OpenPGP-Keychain/src/main/res/values/strings.xml @@ -327,6 +327,7 @@ part of the loaded file is a valid OpenPGP object but not a OpenPGP key parts of the loaded file are valid OpenPGP objects but not OpenPGP keys + You must make changes to the keyring before you can save it Done.