mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-13 12:34:59 -05:00
final link in chain, fix compile
This commit is contained in:
parent
a5aae930e5
commit
e7ebbc5ef6
@ -96,6 +96,7 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
|||||||
private String mNewPassPhrase = null;
|
private String mNewPassPhrase = null;
|
||||||
private String mSavedNewPassPhrase = null;
|
private String mSavedNewPassPhrase = null;
|
||||||
private boolean mIsPassPhraseSet;
|
private boolean mIsPassPhraseSet;
|
||||||
|
private boolean mNeedsSaving;
|
||||||
|
|
||||||
private BootstrapButton mChangePassPhrase;
|
private BootstrapButton mChangePassPhrase;
|
||||||
|
|
||||||
@ -114,7 +115,9 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
|||||||
|
|
||||||
public void onEdited()
|
public void onEdited()
|
||||||
{
|
{
|
||||||
|
mNeedsSaving = mUserIdsView.needsSaving();
|
||||||
|
mNeedsSaving |= mKeysView.needsSaving();
|
||||||
|
Toast.makeText(this, "Needs saving: " + Boolean.toString(mNeedsSaving), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -437,11 +440,13 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
|||||||
mUserIdsView.setType(Id.type.user_id);
|
mUserIdsView.setType(Id.type.user_id);
|
||||||
mUserIdsView.setCanEdit(masterCanSign);
|
mUserIdsView.setCanEdit(masterCanSign);
|
||||||
mUserIdsView.setUserIds(mUserIds);
|
mUserIdsView.setUserIds(mUserIds);
|
||||||
|
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(masterCanSign);
|
mKeysView.setCanEdit(masterCanSign);
|
||||||
mKeysView.setKeys(mKeys, mKeysUsages);
|
mKeysView.setKeys(mKeys, mKeysUsages);
|
||||||
|
mKeysView.setEditorListener(this);
|
||||||
container.addView(mKeysView);
|
container.addView(mKeysView);
|
||||||
|
|
||||||
updatePassPhraseButtonText();
|
updatePassPhraseButtonText();
|
||||||
@ -597,11 +602,6 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
|
|||||||
String userId = null;
|
String userId = null;
|
||||||
try {
|
try {
|
||||||
userId = editor.getValue();
|
userId = editor.getValue();
|
||||||
} catch (UserIdEditor.NoNameException e) {
|
|
||||||
throw new PgpGeneralException(this.getString(R.string.error_user_id_needs_a_name));
|
|
||||||
} catch (UserIdEditor.NoEmailException e) {
|
|
||||||
throw new PgpGeneralException(
|
|
||||||
this.getString(R.string.error_user_id_needs_an_email_address));
|
|
||||||
} catch (UserIdEditor.InvalidEmailException e) {
|
} catch (UserIdEditor.InvalidEmailException e) {
|
||||||
throw new PgpGeneralException(e.getMessage());
|
throw new PgpGeneralException(e.getMessage());
|
||||||
}
|
}
|
||||||
|
@ -78,8 +78,7 @@ public class KeyEditor extends LinearLayout implements Editor, OnClickListener {
|
|||||||
mEditorListener.onEdited();
|
mEditorListener.onEdited();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private int mDatePickerResultCount = 0;
|
private int mDatePickerResultCount = 0;
|
||||||
|
@ -73,6 +73,11 @@ public class KeyServerEditor extends LinearLayout implements Editor, OnClickList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean needsSaving() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public void setEditorListener(EditorListener listener) {
|
public void setEditorListener(EditorListener listener) {
|
||||||
mEditorListener = listener;
|
mEditorListener = listener;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user