Rename "canEdit" to "canBeEdited"

This commit is contained in:
Thialfihar 2014-04-02 15:43:29 +02:00
parent c4c9713da4
commit 7a66ccb5ee
4 changed files with 13 additions and 13 deletions

View File

@ -471,13 +471,13 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
} }
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.setCanBeEdited(mMasterCanSign);
mUserIdsView.setUserIds(mUserIds); mUserIdsView.setUserIds(mUserIds);
mUserIdsView.setEditorListener(this); mUserIdsView.setEditorListener(this);
container.addView(mUserIdsView); container.addView(mUserIdsView);
mKeysView = (SectionView) inflater.inflate(R.layout.edit_key_section, container, false); mKeysView = (SectionView) inflater.inflate(R.layout.edit_key_section, container, false);
mKeysView.setType(Id.type.key); mKeysView.setType(Id.type.key);
mKeysView.setCanEdit(mMasterCanSign); mKeysView.setCanBeEdited(mMasterCanSign);
mKeysView.setKeys(mKeys, mKeysUsages, newKeys); mKeysView.setKeys(mKeys, mKeysUsages, newKeys);
mKeysView.setEditorListener(this); mKeysView.setEditorListener(this);
container.addView(mKeysView); container.addView(mKeysView);

View File

@ -196,8 +196,8 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
super.onFinishInflate(); super.onFinishInflate();
} }
public void setCanEdit(boolean bCanEdit) { public void setCanBeEdited(boolean canBeEdited) {
if (!bCanEdit) { if (!canBeEdited) {
mDeleteButton.setVisibility(View.INVISIBLE); mDeleteButton.setVisibility(View.INVISIBLE);
mExpiryDateButton.setEnabled(false); mExpiryDateButton.setEnabled(false);
mChkSign.setEnabled(false); //certify is always disabled mChkSign.setEnabled(false); //certify is always disabled

View File

@ -64,7 +64,7 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
private boolean mOldItemDeleted = false; private boolean mOldItemDeleted = false;
private ArrayList<String> mDeletedIDs = new ArrayList<String>(); private ArrayList<String> mDeletedIDs = new ArrayList<String>();
private ArrayList<PGPSecretKey> mDeletedKeys = new ArrayList<PGPSecretKey>(); private ArrayList<PGPSecretKey> mDeletedKeys = new ArrayList<PGPSecretKey>();
private boolean mCanEdit = true; private boolean mCanBeEdited = true;
private ActionBarActivity mActivity; private ActionBarActivity mActivity;
@ -107,9 +107,9 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
} }
} }
public void setCanEdit(boolean bCanEdit) { public void setCanBeEdited(boolean canBeEdited) {
mCanEdit = bCanEdit; mCanBeEdited = canBeEdited;
if (!mCanEdit) { if (!mCanBeEdited) {
mPlusButton.setVisibility(View.INVISIBLE); mPlusButton.setVisibility(View.INVISIBLE);
} }
} }
@ -265,7 +265,7 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
* {@inheritDoc} * {@inheritDoc}
*/ */
public void onClick(View v) { public void onClick(View v) {
if (mCanEdit) { if (mCanBeEdited) {
switch (mType) { switch (mType) {
case Id.type.user_id: { case Id.type.user_id: {
UserIdEditor view = (UserIdEditor) mInflater.inflate( UserIdEditor view = (UserIdEditor) mInflater.inflate(
@ -315,7 +315,7 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
mEditors, false); mEditors, false);
view.setEditorListener(this); view.setEditorListener(this);
view.setValue(userId, mEditors.getChildCount() == 0, false); view.setValue(userId, mEditors.getChildCount() == 0, false);
view.setCanEdit(mCanEdit); view.setCanBeEdited(mCanBeEdited);
mEditors.addView(view); mEditors.addView(view);
} }
@ -336,7 +336,7 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
view.setEditorListener(this); view.setEditorListener(this);
boolean isMasterKey = (mEditors.getChildCount() == 0); boolean isMasterKey = (mEditors.getChildCount() == 0);
view.setValue(list.get(i), isMasterKey, usages.get(i), newKeys); view.setValue(list.get(i), isMasterKey, usages.get(i), newKeys);
view.setCanEdit(mCanEdit); view.setCanBeEdited(mCanBeEdited);
mEditors.addView(view); mEditors.addView(view);
} }

View File

@ -52,8 +52,8 @@ public class UserIdEditor extends LinearLayout implements Editor, OnClickListene
private boolean mOriginallyMainUserID; private boolean mOriginallyMainUserID;
private boolean mIsNewId; private boolean mIsNewId;
public void setCanEdit(boolean bCanEdit) { public void setCanBeEdited(boolean canBeEdited) {
if (!bCanEdit) { if (!canBeEdited) {
mDeleteButton.setVisibility(View.INVISIBLE); mDeleteButton.setVisibility(View.INVISIBLE);
mName.setEnabled(false); mName.setEnabled(false);
mIsMainUserId.setEnabled(false); mIsMainUserId.setEnabled(false);