From 75b14a1d5c08d10b795b92e4f2b21035d773dc8c Mon Sep 17 00:00:00 2001 From: kruks23 Date: Thu, 29 May 2014 18:17:21 +0200 Subject: More harcoded translations + updated Spanish --- .../conversations/ui/ManageAccountActivity.java | 24 +++++++++++----------- .../siacs/conversations/ui/ShareWithActivity.java | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/eu/siacs') diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java index 70af44e0..d1c9c7f7 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; diff --git a/src/eu/siacs/conversations/ui/ShareWithActivity.java b/src/eu/siacs/conversations/ui/ShareWithActivity.java index 6dbb20c9..0a8ee1a7 100644 --- a/src/eu/siacs/conversations/ui/ShareWithActivity.java +++ b/src/eu/siacs/conversations/ui/ShareWithActivity.java @@ -34,7 +34,7 @@ public class ShareWithActivity extends XmppActivity { super.onCreate(savedInstanceState); setContentView(R.layout.share_with); - setTitle("Share with Conversation"); + setTitle(getString(R.string.title_activity_sharewith)); contacts = (LinearLayout) findViewById(R.id.contacts); conversations = (LinearLayout) findViewById(R.id.conversations); -- cgit v1.2.3 From 78686e9bce44d6279cb1475945309325888f0fc3 Mon Sep 17 00:00:00 2001 From: Alethea Butler Date: Fri, 30 May 2014 23:18:50 -0400 Subject: Disabled the Home button when it's not the Up button --- src/eu/siacs/conversations/ui/ConversationActivity.java | 2 ++ src/eu/siacs/conversations/ui/ConversationFragment.java | 1 + src/eu/siacs/conversations/ui/ManageAccountActivity.java | 2 ++ 3 files changed, 5 insertions(+) (limited to 'src/eu/siacs') diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index c696fa45..232d46f8 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -262,6 +262,7 @@ public class ConversationActivity extends XmppActivity { public void onPanelOpened(View arg0) { paneShouldBeOpen = true; getActionBar().setDisplayHomeAsUpEnabled(false); + getActionBar().setHomeButtonEnabled(false); getActionBar().setTitle(R.string.app_name); invalidateOptionsMenu(); hideKeyboard(); @@ -273,6 +274,7 @@ public class ConversationActivity extends XmppActivity { if ((conversationList.size() > 0) && (getSelectedConversation() != null)) { getActionBar().setDisplayHomeAsUpEnabled(true); + getActionBar().setHomeButtonEnabled(true); getActionBar().setTitle( getSelectedConversation().getName(useSubject)); invalidateOptionsMenu(); diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index a3cecfd4..3e1909d8 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -527,6 +527,7 @@ public class ConversationFragment extends Fragment { if (!activity.shouldPaneBeOpen()) { activity.getSlidingPaneLayout().closePane(); activity.getActionBar().setDisplayHomeAsUpEnabled(true); + activity.getActionBar().setHomeButtonEnabled(true); activity.getActionBar().setTitle( conversation.getName(useSubject)); activity.invalidateOptionsMenu(); diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java index d1c9c7f7..eae1196b 100644 --- a/src/eu/siacs/conversations/ui/ManageAccountActivity.java +++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java @@ -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; } @@ -429,6 +430,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"); -- cgit v1.2.3 From 0edfd3619530f3ded673746d252b766c3001134e Mon Sep 17 00:00:00 2001 From: Alethea Butler Date: Fri, 30 May 2014 23:41:44 -0400 Subject: Up button goes to contacts after initial setup --- src/eu/siacs/conversations/ui/ManageAccountActivity.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/eu/siacs') diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java index eae1196b..6fd87473 100644 --- a/src/eu/siacs/conversations/ui/ManageAccountActivity.java +++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java @@ -398,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; } -- cgit v1.2.3