diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-05-31 11:55:24 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-05-31 11:55:24 +0200 |
commit | 15096aa0dd07422bee1c02bb4a60d89bd96d07fc (patch) | |
tree | 911453d9fa7c07fb067f1115702724d36a2e4885 /src/eu/siacs/conversations/ui/ManageAccountActivity.java | |
parent | 57ded7ee588111a4cbe2a4481b56610aa913507a (diff) | |
parent | 1ffba8bd62d34e43611896b12c1cb6f3fa0542d8 (diff) |
Merge branch 'development' of github.com:siacs/Conversations into development
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/ui/ManageAccountActivity.java | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java index 70af44e0..6fd87473 100644 --- a/src/eu/siacs/conversations/ui/ManageAccountActivity.java +++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java @@ -317,36 +317,36 @@ public class ManageAccountActivity extends XmppActivity { pcks_received.setText(""+xmpp.getReceivedStanzas()); pcks_sent.setText(""+xmpp.getSentStanzas()); if (connectionAgeHours >= 2) { - connection.setText(connectionAgeHours+" hours"); + connection.setText(connectionAgeHours+" " + getString(R.string.hours)); } else { - connection.setText(connectionAge+" mins"); + connection.setText(connectionAge+" " + getString(R.string.mins)); } if (xmpp.hasFeatureStreamManagment()) { if (sessionAgeHours >= 2) { - session.setText(sessionAgeHours+" hours"); + session.setText(sessionAgeHours+" " + getString(R.string.hours)); } else { - session.setText(sessionAge+" mins"); + session.setText(sessionAge+" " + getString(R.string.mins)); } - stream.setText("Yes"); + stream.setText(getString(R.string.yes)); } else { - stream.setText("No"); + stream.setText(getString(R.string.no)); session.setText(connection.getText()); } if (xmpp.hasFeaturesCarbon()) { - carbon.setText("Yes"); + carbon.setText(getString(R.string.yes)); } else { - carbon.setText("No"); + carbon.setText(getString(R.string.no)); } if (xmpp.hasFeatureRosterManagment()) { - roster.setText("Yes"); + roster.setText(getString(R.string.yes)); } else { - roster.setText("No"); + roster.setText(getString(R.string.no)); } builder.setView(view); } else { - builder.setMessage("Account is offline"); + builder.setMessage(getString(R.string.mgmt_account_account_offline)); } - builder.setPositiveButton("Hide", null); + builder.setPositiveButton(getString(R.string.hide), null); builder.create().show(); } return true; @@ -380,6 +380,7 @@ public class ManageAccountActivity extends XmppActivity { accountListViewAdapter.notifyDataSetChanged(); if ((this.accountList.size() == 0)&&(this.firstrun)) { getActionBar().setDisplayHomeAsUpEnabled(false); + getActionBar().setHomeButtonEnabled(false); addAccount(); this.firstrun = false; } @@ -397,6 +398,12 @@ public class ManageAccountActivity extends XmppActivity { case R.id.action_add_account: addAccount(); break; + case android.R.id.home: + if (xmppConnectionService.getConversations().size() == 0) { + startActivity(new Intent(getApplicationContext(), + ContactsActivity.class)); + } + break; default: break; } @@ -429,6 +436,7 @@ public class ManageAccountActivity extends XmppActivity { public void onAccountEdited(Account account) { xmppConnectionService.createAccount(account); activity.getActionBar().setDisplayHomeAsUpEnabled(true); + activity.getActionBar().setHomeButtonEnabled(true); } }); dialog.show(getFragmentManager(), "add_account"); |