mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 17:22:16 -05:00
Merge pull request #435 from sreeram-boyapati/change_passphrase
Button Text changes to Change Passphrase if Passphrase is set
This commit is contained in:
commit
fe3d6bafc3
@ -370,9 +370,8 @@ public class EditKeyActivity extends ActionBarActivity {
|
||||
}
|
||||
|
||||
mCurrentPassphrase = "";
|
||||
|
||||
buildLayout();
|
||||
mIsPassPhraseSet = PassphraseCacheService.hasPassphrase(this, masterKeyId);
|
||||
buildLayout();
|
||||
if (!mIsPassPhraseSet) {
|
||||
// check "no passphrase" checkbox and remove button
|
||||
mNoPassphrase.setChecked(true);
|
||||
@ -427,11 +426,14 @@ public class EditKeyActivity extends ActionBarActivity {
|
||||
// find views
|
||||
mChangePassphrase = (BootstrapButton) findViewById(R.id.edit_key_btn_change_passphrase);
|
||||
mNoPassphrase = (CheckBox) findViewById(R.id.edit_key_no_passphrase);
|
||||
|
||||
// Build layout based on given userIds and keys
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
|
||||
LinearLayout container = (LinearLayout) findViewById(R.id.edit_key_container);
|
||||
if(mIsPassPhraseSet){
|
||||
mChangePassphrase.setText(getString(R.string.btn_change_passphrase));
|
||||
}
|
||||
mUserIdsView = (SectionView) inflater.inflate(R.layout.edit_key_section, container, false);
|
||||
mUserIdsView.setType(Id.type.user_id);
|
||||
mUserIdsView.setCanEdit(mMasterCanSign);
|
||||
|
Loading…
Reference in New Issue
Block a user