aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java29
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java11
-rw-r--r--src/main/res/layout/account_row.xml14
-rw-r--r--src/main/res/menu/manageaccounts.xml6
-rw-r--r--src/main/res/menu/manageaccounts_context.xml9
-rw-r--r--src/main/res/values-de/strings.xml3
-rw-r--r--src/main/res/values/strings.xml1
7 files changed, 10 insertions, 63 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
index 82bce31c0..800d84c48 100644
--- a/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
@@ -118,11 +118,10 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
AdapterContextMenuInfo acmi = (AdapterContextMenuInfo) menuInfo;
this.selectedAccount = accountList.get(acmi.position);
if (this.selectedAccount.isOptionSet(Account.OPTION_DISABLED)) {
- menu.findItem(R.id.mgmt_account_disable).setVisible(false);
+ menu.findItem(R.id.mgmt_account_reconnect).setVisible(false);
menu.findItem(R.id.mgmt_account_announce_pgp).setVisible(false);
menu.findItem(R.id.mgmt_account_publish_avatar).setVisible(false);
} else {
- menu.findItem(R.id.mgmt_account_enable).setVisible(false);
menu.findItem(R.id.mgmt_account_announce_pgp).setVisible(Config.supportOpenPgp());
}
menu.setHeaderTitle(this.selectedAccount.getJid().toBareJid().toString());
@@ -147,7 +146,6 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.manageaccounts, menu);
- MenuItem enableAll = menu.findItem(R.id.action_enable_all);
MenuItem addAccount = menu.findItem(R.id.action_add_account);
MenuItem addAccountWithCertificate = menu.findItem(R.id.action_add_account_with_cert);
@@ -159,13 +157,6 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
}
addAccountWithCertificate.setVisible(!(Config.LOCK_SETTINGS || Config.SINGLE_ACCOUNT));
- if (!accountsLeftToEnable()) {
- enableAll.setVisible(false);
- }
- MenuItem disableAll = menu.findItem(R.id.action_disable_all);
- if (!accountsLeftToDisable()) {
- disableAll.setVisible(false);
- }
return true;
}
@@ -175,10 +166,8 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
case R.id.mgmt_account_publish_avatar:
publishAvatar(selectedAccount);
return true;
- case R.id.mgmt_account_disable:
+ case R.id.mgmt_account_reconnect:
disableAccount(selectedAccount);
- return true;
- case R.id.mgmt_account_enable:
enableAccount(selectedAccount);
return true;
case R.id.mgmt_account_delete:
@@ -199,12 +188,6 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
startActivity(new Intent(getApplicationContext(),
EditAccountActivity.class));
break;
- case R.id.action_disable_all:
- disableAllAccounts();
- break;
- case R.id.action_enable_all:
- enableAllAccounts();
- break;
case R.id.action_add_account_with_cert:
addAccountFromKey();
break;
@@ -235,14 +218,6 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
}
}
- public void onClickTglAccountState(Account account, boolean enable) {
- if (enable) {
- enableAccount(account);
- } else {
- disableAccount(account);
- }
- }
-
private void addAccountFromKey() {
try {
KeyChain.choosePrivateKeyAlias(this, this, null, null, null, -1, null);
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java
index c1b9cbdf6..1a7795a77 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/AccountAdapter.java
@@ -57,17 +57,6 @@ public class AccountAdapter extends ArrayAdapter<Account> {
statusView.setTextColor(activity.getWarningTextColor());
break;
}
- final Switch tglAccountState = (Switch) view.findViewById(R.id.tgl_account_status);
- final boolean isDisabled = (account.getStatus() == Account.State.DISABLED);
- tglAccountState.setChecked(!isDisabled,false);
- tglAccountState.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
- if (b == isDisabled && activity instanceof ManageAccountActivity) {
- ((ManageAccountActivity) activity).onClickTglAccountState(account,b);
- }
- }
- });
return view;
}
}
diff --git a/src/main/res/layout/account_row.xml b/src/main/res/layout/account_row.xml
index f0d0c903d..6540793f9 100644
--- a/src/main/res/layout/account_row.xml
+++ b/src/main/res/layout/account_row.xml
@@ -25,9 +25,7 @@
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/account_image"
android:orientation="vertical"
- android:paddingLeft="8dp"
- android:layout_toLeftOf="@+id/tgl_account_status"
- android:layout_toStartOf="@+id/tgl_account_status">
+ android:paddingLeft="8dp">
<TextView
android:id="@+id/account_jid"
@@ -48,14 +46,4 @@
android:textStyle="bold" />
</LinearLayout>
- <eu.siacs.conversations.ui.widget.Switch
- style="@style/MD"
- android:id="@+id/tgl_account_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:padding="16dp"
- android:focusable="false"/>
-
</RelativeLayout> \ No newline at end of file
diff --git a/src/main/res/menu/manageaccounts.xml b/src/main/res/menu/manageaccounts.xml
index ffa692a0b..2ce422a7b 100644
--- a/src/main/res/menu/manageaccounts.xml
+++ b/src/main/res/menu/manageaccounts.xml
@@ -13,12 +13,6 @@
android:title="@string/action_add_account_with_certificate"
android:visible="true"/>
<item
- android:id="@+id/action_enable_all"
- android:title="@string/enable_all_accounts"/>
- <item
- android:id="@+id/action_disable_all"
- android:title="@string/disable_all_accounts"/>
- <item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
diff --git a/src/main/res/menu/manageaccounts_context.xml b/src/main/res/menu/manageaccounts_context.xml
index 7a7cc0a22..ddfcb5535 100644
--- a/src/main/res/menu/manageaccounts_context.xml
+++ b/src/main/res/menu/manageaccounts_context.xml
@@ -2,18 +2,15 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
- android:id="@+id/mgmt_account_enable"
- android:title="@string/mgmt_account_enable"/>
- <item
android:id="@+id/mgmt_account_publish_avatar"
android:title="@string/mgmt_account_publish_avatar"/>
<item
android:id="@+id/mgmt_account_announce_pgp"
android:title="@string/mgmt_account_publish_pgp"/>
<item
- android:id="@+id/mgmt_account_disable"
- android:showAsAction="never"
- android:title="@string/mgmt_account_disable"/>
+ android:id="@+id/mgmt_account_reconnect"
+ android:showAsAction="always"
+ android:title="@string/mgmt_account_reconnect"/>
<item
android:id="@+id/mgmt_account_delete"
android:title="@string/mgmt_account_delete"/>
diff --git a/src/main/res/values-de/strings.xml b/src/main/res/values-de/strings.xml
index 8fd8cd6ee..4cbf17319 100644
--- a/src/main/res/values-de/strings.xml
+++ b/src/main/res/values-de/strings.xml
@@ -610,4 +610,7 @@
<string name="sharing_files_please_wait">Teile Dateien. Bitte warten…</string>
<string name="delete_x_file">%s löschen</string>
<string name="security_error_invalid_file_access">Sicherheitsfehler: Dateizugriff nicht erlaubt</string>
+ <string name="mgmt_account_reconnect">neu verbinden</string>
+ <string name="no_application_to_share_uri">Keine Anwendung zu Teilen der URI</string>
+ <string name="share_uri_with">Teile URI mit…</string>
</resources>
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index b12f8b59d..49ecbf89e 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -642,4 +642,5 @@
<string name="security_error_invalid_file_access">Security error: Invalid file access</string>
<string name="no_application_to_share_uri">No application found to share URI</string>
<string name="share_uri_with">Share URI with…</string>
+ <string name="mgmt_account_reconnect">reconnect</string>
</resources>