mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-24 01:32: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 = "";
|
mCurrentPassphrase = "";
|
||||||
|
|
||||||
buildLayout();
|
|
||||||
mIsPassPhraseSet = PassphraseCacheService.hasPassphrase(this, masterKeyId);
|
mIsPassPhraseSet = PassphraseCacheService.hasPassphrase(this, masterKeyId);
|
||||||
|
buildLayout();
|
||||||
if (!mIsPassPhraseSet) {
|
if (!mIsPassPhraseSet) {
|
||||||
// check "no passphrase" checkbox and remove button
|
// check "no passphrase" checkbox and remove button
|
||||||
mNoPassphrase.setChecked(true);
|
mNoPassphrase.setChecked(true);
|
||||||
@ -427,11 +426,14 @@ public class EditKeyActivity extends ActionBarActivity {
|
|||||||
// find views
|
// find views
|
||||||
mChangePassphrase = (BootstrapButton) findViewById(R.id.edit_key_btn_change_passphrase);
|
mChangePassphrase = (BootstrapButton) findViewById(R.id.edit_key_btn_change_passphrase);
|
||||||
mNoPassphrase = (CheckBox) findViewById(R.id.edit_key_no_passphrase);
|
mNoPassphrase = (CheckBox) findViewById(R.id.edit_key_no_passphrase);
|
||||||
|
|
||||||
// Build layout based on given userIds and keys
|
// Build layout based on given userIds and keys
|
||||||
|
|
||||||
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
|
|
||||||
LinearLayout container = (LinearLayout) findViewById(R.id.edit_key_container);
|
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 = (SectionView) inflater.inflate(R.layout.edit_key_section, container, false);
|
||||||
mUserIdsView.setType(Id.type.user_id);
|
mUserIdsView.setType(Id.type.user_id);
|
||||||
mUserIdsView.setCanEdit(mMasterCanSign);
|
mUserIdsView.setCanEdit(mMasterCanSign);
|
||||||
|
Loading…
Reference in New Issue
Block a user