mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 17:22:16 -05:00
Rename "canEdit" to "canBeEdited"
This commit is contained in:
parent
c4c9713da4
commit
7a66ccb5ee
@ -471,13 +471,13 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
||||
}
|
||||
mUserIdsView = (SectionView) inflater.inflate(R.layout.edit_key_section, container, false);
|
||||
mUserIdsView.setType(Id.type.user_id);
|
||||
mUserIdsView.setCanEdit(mMasterCanSign);
|
||||
mUserIdsView.setCanBeEdited(mMasterCanSign);
|
||||
mUserIdsView.setUserIds(mUserIds);
|
||||
mUserIdsView.setEditorListener(this);
|
||||
container.addView(mUserIdsView);
|
||||
mKeysView = (SectionView) inflater.inflate(R.layout.edit_key_section, container, false);
|
||||
mKeysView.setType(Id.type.key);
|
||||
mKeysView.setCanEdit(mMasterCanSign);
|
||||
mKeysView.setCanBeEdited(mMasterCanSign);
|
||||
mKeysView.setKeys(mKeys, mKeysUsages, newKeys);
|
||||
mKeysView.setEditorListener(this);
|
||||
container.addView(mKeysView);
|
||||
|
@ -196,8 +196,8 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
|
||||
super.onFinishInflate();
|
||||
}
|
||||
|
||||
public void setCanEdit(boolean bCanEdit) {
|
||||
if (!bCanEdit) {
|
||||
public void setCanBeEdited(boolean canBeEdited) {
|
||||
if (!canBeEdited) {
|
||||
mDeleteButton.setVisibility(View.INVISIBLE);
|
||||
mExpiryDateButton.setEnabled(false);
|
||||
mChkSign.setEnabled(false); //certify is always disabled
|
||||
|
@ -64,7 +64,7 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
|
||||
private boolean mOldItemDeleted = false;
|
||||
private ArrayList<String> mDeletedIDs = new ArrayList<String>();
|
||||
private ArrayList<PGPSecretKey> mDeletedKeys = new ArrayList<PGPSecretKey>();
|
||||
private boolean mCanEdit = true;
|
||||
private boolean mCanBeEdited = true;
|
||||
|
||||
private ActionBarActivity mActivity;
|
||||
|
||||
@ -107,9 +107,9 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
|
||||
}
|
||||
}
|
||||
|
||||
public void setCanEdit(boolean bCanEdit) {
|
||||
mCanEdit = bCanEdit;
|
||||
if (!mCanEdit) {
|
||||
public void setCanBeEdited(boolean canBeEdited) {
|
||||
mCanBeEdited = canBeEdited;
|
||||
if (!mCanBeEdited) {
|
||||
mPlusButton.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
@ -265,7 +265,7 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void onClick(View v) {
|
||||
if (mCanEdit) {
|
||||
if (mCanBeEdited) {
|
||||
switch (mType) {
|
||||
case Id.type.user_id: {
|
||||
UserIdEditor view = (UserIdEditor) mInflater.inflate(
|
||||
@ -315,7 +315,7 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
|
||||
mEditors, false);
|
||||
view.setEditorListener(this);
|
||||
view.setValue(userId, mEditors.getChildCount() == 0, false);
|
||||
view.setCanEdit(mCanEdit);
|
||||
view.setCanBeEdited(mCanBeEdited);
|
||||
mEditors.addView(view);
|
||||
}
|
||||
|
||||
@ -336,7 +336,7 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
|
||||
view.setEditorListener(this);
|
||||
boolean isMasterKey = (mEditors.getChildCount() == 0);
|
||||
view.setValue(list.get(i), isMasterKey, usages.get(i), newKeys);
|
||||
view.setCanEdit(mCanEdit);
|
||||
view.setCanBeEdited(mCanBeEdited);
|
||||
mEditors.addView(view);
|
||||
}
|
||||
|
||||
|
@ -52,8 +52,8 @@ public class UserIdEditor extends LinearLayout implements Editor, OnClickListene
|
||||
private boolean mOriginallyMainUserID;
|
||||
private boolean mIsNewId;
|
||||
|
||||
public void setCanEdit(boolean bCanEdit) {
|
||||
if (!bCanEdit) {
|
||||
public void setCanBeEdited(boolean canBeEdited) {
|
||||
if (!canBeEdited) {
|
||||
mDeleteButton.setVisibility(View.INVISIBLE);
|
||||
mName.setEnabled(false);
|
||||
mIsMainUserId.setEnabled(false);
|
||||
|
Loading…
Reference in New Issue
Block a user