aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/EditAccount.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-13 03:52:41 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-13 03:52:41 +0100
commita80e3131be975e35c85b3f746cef233fafebaae0 (patch)
treec5997e923a0d32527719546067429e78af7f33e2 /src/eu/siacs/conversations/ui/EditAccount.java
parenteadebeb77cbc4f5b49d484b8a64058630385afe6 (diff)
contact picture generation centralized + basic registry stuff
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/ui/EditAccount.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/ui/EditAccount.java b/src/eu/siacs/conversations/ui/EditAccount.java
index 3ec74174..b6311238 100644
--- a/src/eu/siacs/conversations/ui/EditAccount.java
+++ b/src/eu/siacs/conversations/ui/EditAccount.java
@@ -54,16 +54,22 @@ public class EditAccount extends DialogFragment {
final String okButtonDesc;
if (account != null) {
- builder.setTitle("Edit account");
- registerAccount.setVisibility(View.GONE);
jidText.setText(account.getJid());
password.setText(account.getPassword());
- okButtonDesc = "Edit";
if (account.isOptionSet(Account.OPTION_USETLS)) {
useTLS.setChecked(true);
} else {
useTLS.setChecked(false);
}
+ if (account.isOptionSet(Account.OPTION_REGISTER)) {
+ registerAccount.setChecked(true);
+ builder.setTitle("Add account");
+ okButtonDesc = "Register";
+ } else {
+ registerAccount.setVisibility(View.GONE);
+ builder.setTitle("Edit account");
+ okButtonDesc = "Edit";
+ }
} else {
builder.setTitle("Add account");
okButtonDesc = "Add";
@@ -110,6 +116,7 @@ public class EditAccount extends DialogFragment {
.findViewById(R.id.account_password);
String password = passwordEdit.getText().toString();
CheckBox useTLS = (CheckBox) d.findViewById(R.id.account_usetls);
+ CheckBox register = (CheckBox) d.findViewById(R.id.edit_account_register_new);
String username;
String server;
if (Validator.isValidJid(jid)) {
@@ -128,6 +135,7 @@ public class EditAccount extends DialogFragment {
account = new Account(username, server, password);
}
account.setOption(Account.OPTION_USETLS, useTLS.isChecked());
+ account.setOption(Account.OPTION_REGISTER, register.isChecked());
if (listener != null) {
listener.onAccountEdited(account);
d.dismiss();