aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main
diff options
context:
space:
mode:
authorJohn Heroy <johnheroy@gmail.com>2015-10-21 14:00:15 -0700
committerJohn Heroy <johnheroy@gmail.com>2015-10-21 14:00:15 -0700
commitb7f00efd50a7f13156525807a0925e26997bc541 (patch)
tree51818f5ba6e5f8cf0796fd911008fa7f70a40358 /app/src/main
parent451518ff9f375cd3e44926fc2027d2fc36c93833 (diff)
parent995a77438cdbd66fd27087144f856c7d0bbb2dfa (diff)
downloadconnectbot-b7f00efd50a7f13156525807a0925e26997bc541.tar.gz
connectbot-b7f00efd50a7f13156525807a0925e26997bc541.tar.bz2
connectbot-b7f00efd50a7f13156525807a0925e26997bc541.zip
Merge branch 'master' of https://github.com/connectbot/connectbot
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/org/connectbot/EditHostActivity.java69
-rw-r--r--app/src/main/java/org/connectbot/HostEditorFragment.java584
-rw-r--r--app/src/main/java/org/connectbot/bean/HostBean.java2
-rw-r--r--app/src/main/res/drawable-hdpi/ic_save.pngbin0 -> 247 bytes
-rw-r--r--app/src/main/res/drawable-mdpi/ic_save.pngbin0 -> 168 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/ic_save.pngbin0 -> 273 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/ic_save.pngbin0 -> 391 bytes
-rw-r--r--app/src/main/res/drawable-xxxhdpi/ic_save.pngbin0 -> 504 bytes
-rw-r--r--app/src/main/res/layout/fragment_host_editor.xml461
-rw-r--r--app/src/main/res/menu/edit_host_activity_edit_menu.xml2
-rw-r--r--app/src/main/res/values-ca/strings.xml1
-rw-r--r--app/src/main/res/values-cs/strings.xml1
-rw-r--r--app/src/main/res/values-da/strings.xml1
-rw-r--r--app/src/main/res/values-de/strings.xml1
-rw-r--r--app/src/main/res/values-es/strings.xml42
-rw-r--r--app/src/main/res/values-eu/strings.xml15
-rw-r--r--app/src/main/res/values-fi/strings.xml1
-rw-r--r--app/src/main/res/values-fr/strings.xml1
-rw-r--r--app/src/main/res/values-gl/strings.xml1
-rw-r--r--app/src/main/res/values-he/strings.xml1
-rw-r--r--app/src/main/res/values-hu/strings.xml1
-rw-r--r--app/src/main/res/values-id/strings.xml1
-rw-r--r--app/src/main/res/values-is/strings.xml7
-rw-r--r--app/src/main/res/values-it/strings.xml1
-rw-r--r--app/src/main/res/values-ja/strings.xml35
-rw-r--r--app/src/main/res/values-ko/strings.xml1
-rw-r--r--app/src/main/res/values-nb/strings.xml1
-rw-r--r--app/src/main/res/values-nl/strings.xml1
-rw-r--r--app/src/main/res/values-pl/strings.xml1
-rw-r--r--app/src/main/res/values-pt-rBR/strings.xml1
-rw-r--r--app/src/main/res/values-pt/strings.xml1
-rw-r--r--app/src/main/res/values-ru/strings.xml1
-rw-r--r--app/src/main/res/values-sk/strings.xml1
-rw-r--r--app/src/main/res/values-sr/strings.xml1
-rw-r--r--app/src/main/res/values-sv/strings.xml1
-rw-r--r--app/src/main/res/values-tr/strings.xml1
-rw-r--r--app/src/main/res/values-v11/styles.xml13
-rw-r--r--app/src/main/res/values-zh-rCN/strings.xml34
-rw-r--r--app/src/main/res/values-zh-rTW/strings.xml1
-rw-r--r--app/src/main/res/values/dimens.xml25
-rw-r--r--app/src/main/res/values/strings.xml6
-rw-r--r--app/src/main/res/values/styles.xml36
42 files changed, 951 insertions, 403 deletions
diff --git a/app/src/main/java/org/connectbot/EditHostActivity.java b/app/src/main/java/org/connectbot/EditHostActivity.java
index f61924f..d5e2458 100644
--- a/app/src/main/java/org/connectbot/EditHostActivity.java
+++ b/app/src/main/java/org/connectbot/EditHostActivity.java
@@ -24,6 +24,7 @@ import java.util.Map;
import android.content.ComponentName;
import android.content.Context;
+import android.content.DialogInterface;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.res.TypedArray;
@@ -46,6 +47,8 @@ public class EditHostActivity extends AppCompatActivity implements HostEditorFra
private static final String EXTRA_EXISTING_HOST_ID = "org.connectbot.existing_host_id";
private static final long NO_HOST_ID = -1;
+ private static final int ENABLED_ALPHA = 255;
+ private static final int DISABLED_ALPHA = 130;
private HostDatabase mHostDb;
private PubkeyDatabase mPubkeyDb;
@@ -135,7 +138,7 @@ public class EditHostActivity extends AppCompatActivity implements HostEditorFra
mSaveHostButton = menu.getItem(0);
// If the new host is being created, it can't be added until modifications have been made.
- mSaveHostButton.setEnabled(!mIsCreating);
+ setAddSaveButtonEnabled(!mIsCreating);
return super.onCreateOptionsMenu(menu);
}
@@ -144,14 +147,8 @@ public class EditHostActivity extends AppCompatActivity implements HostEditorFra
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.save:
- mHostDb.saveHost(mHost);
-
- if (mBridge != null) {
- // If the console is already open, apply the new encoding now. If the console
- // was not yet opened, this will be applied automatically when it is opened.
- mBridge.setCharset(mHost.getEncoding());
- }
- finish();
+ case android.R.id.home:
+ attemptSaveAndExit();
return true;
default:
return super.onOptionsItemSelected(item);
@@ -200,14 +197,64 @@ public class EditHostActivity extends AppCompatActivity implements HostEditorFra
public void onValidHostConfigured(HostBean host) {
mHost = host;
if (mSaveHostButton != null)
- mSaveHostButton.setEnabled(true);
+ setAddSaveButtonEnabled(true);
}
@Override
public void onHostInvalidated() {
mHost = null;
if (mSaveHostButton != null)
- mSaveHostButton.setEnabled(false);
+ setAddSaveButtonEnabled(false);
+ }
+
+ @Override
+ public void onBackPressed() {
+ attemptSaveAndExit();
+ }
+
+ /**
+ * If the host represents a valid URI, save it and exit; otherwise, pop up a dialog asking
+ * the user if he/she wants to discard the changes.
+ */
+ private void attemptSaveAndExit() {
+ if (mHost == null) {
+ showDiscardDialog();
+ return;
+ }
+
+ mHostDb.saveHost(mHost);
+
+ if (mBridge != null) {
+ // If the console is already open, apply the new encoding now. If the console
+ // was not yet opened, this will be applied automatically when it is opened.
+ mBridge.setCharset(mHost.getEncoding());
+ }
+ finish();
+ }
+
+ private void showDiscardDialog() {
+ android.support.v7.app.AlertDialog.Builder builder =
+ new android.support.v7.app.AlertDialog.Builder(this);
+ builder.setMessage(R.string.discard_host_changes_message)
+ .setPositiveButton(R.string.discard_host_button, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ // Do not save to the database - just exit.
+ finish();
+ }
+ })
+ .setNegativeButton(R.string.discard_host_cancel_button, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ // Do nothing.
+ }
+ });
+ builder.show();
+ }
+
+ private void setAddSaveButtonEnabled(boolean enabled) {
+ mSaveHostButton.setEnabled(enabled);
+ mSaveHostButton.getIcon().setAlpha(enabled ? ENABLED_ALPHA : DISABLED_ALPHA);
}
// Private static class used to generate a list of available Charsets. Note that this class
diff --git a/app/src/main/java/org/connectbot/HostEditorFragment.java b/app/src/main/java/org/connectbot/HostEditorFragment.java
index 56022d7..fe6f838 100644
--- a/app/src/main/java/org/connectbot/HostEditorFragment.java
+++ b/app/src/main/java/org/connectbot/HostEditorFragment.java
@@ -18,6 +18,7 @@
package org.connectbot;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.Map;
import android.content.ContentValues;
@@ -29,19 +30,18 @@ import android.os.Parcelable;
import android.support.design.widget.TextInputLayout;
import android.support.v4.app.Fragment;
import android.support.v7.widget.AppCompatCheckBox;
+import android.support.v7.widget.PopupMenu;
import android.support.v7.widget.SwitchCompat;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
+import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.SeekBar;
-import android.widget.Spinner;
import android.widget.TextView;
import org.connectbot.bean.HostBean;
@@ -59,7 +59,10 @@ public class HostEditorFragment extends Fragment {
private static final String ARG_PUBKEY_VALUES = "pubkeyValues";
private static final String ARG_QUICKCONNECT_STRING = "quickConnectString";
+ // Note: The "max" value for mFontSizeSeekBar is 32. If these font values change, this value
+ // must be changed in the SeekBar's XML.
private static final int MINIMUM_FONT_SIZE = 8;
+ private static final int MAXIMUM_FONT_SIZE = 40;
// The host being edited.
private HostBean mHost;
@@ -68,10 +71,6 @@ public class HostEditorFragment extends Fragment {
// Lists because Bundles can only contain ArrayLists, not general Lists.
private ArrayList<String> mPubkeyNames;
private ArrayList<String> mPubkeyValues;
-
- // Whether the host is being created for the first time (as opposed to an existing one being
- // edited).
- private boolean mIsCreating;
// The listener for changes to this host.
private Listener mListener;
@@ -86,17 +85,24 @@ public class HostEditorFragment extends Fragment {
// first field, etc.
private boolean mUriFieldEditInProgress = false;
- // Values for the colors displayed in the color Spinner. These are not necessarily the same as
- // the text in the Spinner because the text is localized while these values are not.
+ // Names and values for the colors displayed in the color Spinner. Names are localized, while
+ // values are the same across languages, so the values are the ones saved to the database.
+ private TypedArray mColorNames;
private TypedArray mColorValues;
- // Likewise, but for SSH auth agent values.
+ // Likewise, but for SSH auth agent.
+ private TypedArray mSshAuthNames;
private TypedArray mSshAuthValues;
- // Likewise, but for DEL key values.
+ // Likewise, but for DEL key.
+ private TypedArray mDelKeyNames;
private TypedArray mDelKeyValues;
- private Spinner mTransportSpinner;
+ // A map from Charset display name to Charset value (i.e., unique ID for the Charset).
+ private Map<String, String> mCharsetData;
+
+ private View mTransportItem;
+ private TextView mTransportText;
private TextInputLayout mQuickConnectContainer;
private EditText mQuickConnectField;
private ImageButton mExpandCollapseButton;
@@ -108,20 +114,29 @@ public class HostEditorFragment extends Fragment {
private View mPortContainer;
private EditText mPortField;
private EditText mNicknameField;
- private Spinner mColorSelector;
- private TextView mFontSizeText;
+ private View mColorItem;
+ private TextView mColorText;
+ private EditText mFontSizeText;
private SeekBar mFontSizeSeekBar;
- private Spinner mPubkeySpinner;
- private View mUseSshConfirmationContainer;
+ private View mPubkeyItem;
+ private TextView mPubkeyText;
+ private View mDelKeyItem;
+ private TextView mDelKeyText;
+ private View mEncodingItem;
+ private TextView mEncodingText;
+ private View mUseSshAuthItem;
private SwitchCompat mUseSshAuthSwitch;
- private AppCompatCheckBox mSshAuthConfirmationCheckbox;
+ private View mUseSshConfirmationItem;
+ private AppCompatCheckBox mUseSshConfirmationCheckbox;
+ private View mCompressionItem;
private SwitchCompat mCompressionSwitch;
+ private View mStartShellItem;
private SwitchCompat mStartShellSwitch;
+ private View mStayConnectedItem;
private SwitchCompat mStayConnectedSwitch;
+ private View mCloseOnDisconnectItem;
private SwitchCompat mCloseOnDisconnectSwitch;
private EditText mPostLoginAutomationField;
- private Spinner mDelKeySpinner;
- private Spinner mEncodingSpinner;
public static HostEditorFragment newInstance(
HostBean existingHost, ArrayList<String> pubkeyNames, ArrayList<String> pubkeyValues) {
@@ -147,7 +162,6 @@ public class HostEditorFragment extends Fragment {
Bundle bundle = savedInstanceState == null ? getArguments() : savedInstanceState;
Parcelable existingHostParcelable = bundle.getParcelable(ARG_EXISTING_HOST);
- mIsCreating = existingHostParcelable == null;
if (existingHostParcelable != null) {
mHost = HostBean.fromContentValues((ContentValues) existingHostParcelable);
mHost.setId(bundle.getLong(ARG_EXISTING_HOST_ID));
@@ -166,59 +180,28 @@ public class HostEditorFragment extends Fragment {
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_host_editor, container, false);
- mTransportSpinner = (Spinner) view.findViewById(R.id.transport_selector);
- String[] transportNames = TransportFactory.getTransportNames();
- ArrayAdapter<String> transportSelection = new ArrayAdapter<>(
- getActivity(), android.R.layout.simple_spinner_item, transportNames);
- transportSelection.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
- mTransportSpinner.setAdapter(transportSelection);
- for (int i = 0; i < transportNames.length; i++) {
- if (transportNames[i].equals(mHost.getProtocol())) {
- mTransportSpinner.setSelection(i);
- break;
- }
- }
- mTransportSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+ mTransportItem = view.findViewById(R.id.protocol_item);
+ mTransportItem.setOnClickListener(new View.OnClickListener() {
@Override
- public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
- String protocol = (String) mTransportSpinner.getSelectedItem();
- if (protocol == null) {
- // During initialization, protocol can be null before the list of dropdown items
- // has been generated. Return early in that case.
- return;
- }
-
- mHost.setProtocol(protocol);
- mHost.setPort(TransportFactory.getTransport(protocol).getDefaultPort());
- handleHostChange();
-
- mQuickConnectContainer.setHint(
- TransportFactory.getFormatHint(protocol, getActivity()));
-
- // Different protocols have different field types, so show only the fields needed.
- if (SSH.getProtocolName().equals(protocol)) {
- mUsernameContainer.setVisibility(View.VISIBLE);
- mHostnameContainer.setVisibility(View.VISIBLE);
- mPortContainer.setVisibility(View.VISIBLE);
- mExpandCollapseButton.setVisibility(View.VISIBLE);
- } else if (Telnet.getProtocolName().equals(protocol)) {
- mUsernameContainer.setVisibility(View.GONE);
- mHostnameContainer.setVisibility(View.VISIBLE);
- mPortContainer.setVisibility(View.VISIBLE);
- mExpandCollapseButton.setVisibility(View.VISIBLE);
- } else {
- // Local protocol has only one field, so no need to show the URI parts
- // container.
- setUriPartsContainerExpanded(false);
- mExpandCollapseButton.setVisibility(View.INVISIBLE);
+ public void onClick(View v) {
+ PopupMenu menu = new PopupMenu(getActivity(), v);
+ for (String name : TransportFactory.getTransportNames()) {
+ menu.getMenu().add(name);
}
- }
-
- @Override
- public void onNothingSelected(AdapterView<?> parent) {
+ menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
+ @Override
+ public boolean onMenuItemClick(MenuItem item) {
+ setTransportType(
+ item.getTitle().toString(), /* setDefaultPortInModel */ true);
+ return true;
+ }
+ });
+ menu.show();
}
});
+ mTransportText = (TextView) view.findViewById(R.id.protocol_text);
+
mQuickConnectContainer =
(TextInputLayout) view.findViewById(R.id.quickconnect_field_container);
@@ -237,15 +220,8 @@ public class HostEditorFragment extends Fragment {
@Override
public void afterTextChanged(Editable s) {
- if (mTransportSpinner.getSelectedItem() == null) {
- // During initialization, protocol can be null before the list of dropdown items
- // has been generated. Return early in that case.
- return;
- }
-
if (!mUriFieldEditInProgress) {
- applyQuickConnectString(
- s.toString(), (String) mTransportSpinner.getSelectedItem());
+ applyQuickConnectString(s.toString(), mHost.getProtocol());
mUriFieldEditInProgress = true;
mUsernameField.setText(mHost.getUsername());
@@ -281,39 +257,63 @@ public class HostEditorFragment extends Fragment {
mPortField.setText(Integer.toString(mHost.getPort()));
mPortField.addTextChangedListener(new HostTextFieldWatcher(HostDatabase.FIELD_HOST_PORT));
+ setTransportType(mHost.getProtocol(), /* setDefaultPortInModel */ false);
+
mNicknameField = (EditText) view.findViewById(R.id.nickname_field);
mNicknameField.setText(mHost.getNickname());
mNicknameField.addTextChangedListener(
new HostTextFieldWatcher(HostDatabase.FIELD_HOST_NICKNAME));
- mColorSelector = (Spinner) view.findViewById(R.id.color_selector);
+ mColorItem = view.findViewById(R.id.color_item);
+ mColorItem.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ PopupMenu menu = new PopupMenu(getActivity(), v);
+ for (int i = 0; i < mColorNames.length(); i++) {
+ menu.getMenu().add(mColorNames.getText(i));
+ }
+ menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
+ @Override
+ public boolean onMenuItemClick(MenuItem item) {
+ for (int i = 0; i < mColorNames.length(); i++) {
+ if (item.getTitle().toString().equals(mColorNames.getText(i).toString())) {
+ mHost.setColor(mColorValues.getText(i).toString());
+ mColorText.setText(mColorNames.getText(i));
+ return true;
+ }
+ }
+ return false;
+ }
+ });
+ menu.show();
+ }
+ });
+
+ mColorText = (TextView) view.findViewById(R.id.color_text);
for (int i = 0; i < mColorValues.length(); i++) {
- if (mColorValues.getString(i).equals(mHost.getColor())) {
- mColorSelector.setSelection(i);
+ if (mColorValues.getText(i).toString().equals(mHost.getColor())) {
+ mColorText.setText(mColorNames.getText(i));
break;
}
}
- mColorSelector.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
- @Override
- public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
- mHost.setColor(mColorValues.getString(position));
- handleHostChange();
- }
+ mFontSizeText = (EditText) view.findViewById(R.id.font_size_text);
+ mFontSizeText.setText(Integer.toString(mHost.getFontSize()));
+ mFontSizeText.addTextChangedListener(
+ new HostTextFieldWatcher(HostDatabase.FIELD_HOST_FONTSIZE));
+ mFontSizeText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
- public void onNothingSelected(AdapterView<?> parent) {
+ public void onFocusChange(View v, boolean hasFocus) {
+ if (!hasFocus)
+ mFontSizeText.setText(Integer.toString(mHost.getFontSize()));
}
});
- mFontSizeText = (TextView) view.findViewById(R.id.font_size_text);
mFontSizeSeekBar = (SeekBar) view.findViewById(R.id.font_size_bar);
mFontSizeSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
- int fontSize = MINIMUM_FONT_SIZE + progress;
- mHost.setFontSize(fontSize);
- handleHostChange();
- mFontSizeText.setText(Integer.toString(fontSize));
+ setFontSize(MINIMUM_FONT_SIZE + progress);
}
@Override
@@ -326,116 +326,292 @@ public class HostEditorFragment extends Fragment {
});
mFontSizeSeekBar.setProgress(mHost.getFontSize() - MINIMUM_FONT_SIZE);
- mPubkeySpinner = (Spinner) view.findViewById(R.id.pubkey_spinner);
- final String[] pubkeyNames = new String[mPubkeyNames.size()];
- mPubkeyNames.toArray(pubkeyNames);
- ArrayAdapter<String> pubkeySelection = new ArrayAdapter<String>(
- getActivity(), android.R.layout.simple_spinner_item, pubkeyNames);
- pubkeySelection.setDropDownViewResource(
- android.R.layout.simple_spinner_dropdown_item);
- mPubkeySpinner.setAdapter(pubkeySelection);
- for (int i = 0; i < pubkeyNames.length; i++) {
- if (mHost.getPubkeyId() == Integer.parseInt(mPubkeyValues.get(i))) {
- mPubkeySpinner.setSelection(i);
+ mPubkeyItem = view.findViewById(R.id.pubkey_item);
+ mPubkeyItem.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ PopupMenu menu = new PopupMenu(getActivity(), v);
+ for (String name : mPubkeyNames) {
+ menu.getMenu().add(name);
+ }
+ menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
+ @Override
+ public boolean onMenuItemClick(MenuItem item) {
+ for (int i = 0; i < mPubkeyNames.size(); i++) {
+ if (mPubkeyNames.get(i).equals(item.getTitle())) {
+ mHost.setPubkeyId(Long.parseLong(mPubkeyValues.get(i)));
+ mPubkeyText.setText(mPubkeyNames.get(i));
+ return true;
+ }
+ }
+ return false;
+ }
+ });
+ menu.show();
+ }
+ });
+
+ mPubkeyText = (TextView) view.findViewById(R.id.pubkey_text);
+ for (int i = 0; i < mPubkeyValues.size(); i++) {
+ if (mHost.getPubkeyId() == Long.parseLong(mPubkeyValues.get(i))) {
+ mPubkeyText.setText(mPubkeyNames.get(i));
break;
}
}
- mPubkeySpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+
+ mDelKeyItem = view.findViewById(R.id.delkey_item);
+ mDelKeyItem.setOnClickListener(new View.OnClickListener() {
@Override
- public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
- mHost.setPubkeyId(Integer.parseInt(mPubkeyValues.get(position)));
- handleHostChange();
+ public void onClick(View v) {
+ PopupMenu menu = new PopupMenu(getActivity(), v);
+ for (int i = 0; i < mDelKeyNames.length(); i++) {
+ menu.getMenu().add(mDelKeyNames.getText(i));
+ }
+ menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
+ @Override
+ public boolean onMenuItemClick(MenuItem item) {
+ for (int i = 0; i < mDelKeyNames.length(); i++) {
+ if (mDelKeyNames.getText(i).equals(item.getTitle())) {
+ mHost.setDelKey(mDelKeyValues.getText(i).toString());
+ mDelKeyText.setText(mDelKeyNames.getText(i));
+ return true;
+ }
+ }
+ return false;
+ }
+ });
+ menu.show();
+ }
+ });
+
+ mDelKeyText = (TextView) view.findViewById(R.id.delkey_text);
+ for (int i = 0; i < mDelKeyValues.length(); i++) {
+ if (mDelKeyValues.getText(i).toString().equals(mHost.getDelKey())) {
+ mDelKeyText.setText(mDelKeyNames.getText(i));
+ break;
+ }
+ }
+
+ mEncodingItem = view.findViewById(R.id.encoding_item);
+ mEncodingItem.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ PopupMenu menu = new PopupMenu(getActivity(), v);
+ for (String displayName : mCharsetData.keySet()) {
+ menu.getMenu().add(displayName);
+ }
+ menu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
+ @Override
+ public boolean onMenuItemClick(MenuItem item) {
+ for (String displayName : mCharsetData.keySet()) {
+ if (displayName.equals(item.getTitle())) {
+ mHost.setEncoding(mCharsetData.get(displayName));
+ mEncodingText.setText(displayName);
+ return true;
+ }
+ }
+ return false;
+ }
+ });
+ menu.show();
}
+ });
+
+ // The encoding text is initialized in setCharsetData() because Charset data is not always
+ // available when this fragment is created.
+ mEncodingText = (TextView) view.findViewById(R.id.encoding_text);
+ mUseSshAuthItem = view.findViewById(R.id.use_ssh_auth_item);
+ mUseSshAuthItem.setOnClickListener(new View.OnClickListener() {
@Override
- public void onNothingSelected(AdapterView<?> parent) {
+ public void onClick(View v) {
+ mUseSshAuthSwitch.toggle();
}
});
- mUseSshConfirmationContainer = view.findViewById(R.id.ssh_confirmation_container);
mUseSshAuthSwitch = (SwitchCompat) view.findViewById(R.id.use_ssh_auth_switch);
- mSshAuthConfirmationCheckbox =
+ mUseSshAuthSwitch.setChecked(mHost.getUseAuthAgent() != null &&
+ !mHost.getUseAuthAgent().equals(mSshAuthValues.getString(0)));
+ mUseSshAuthSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ processSshAuthChange();
+ }
+ });
+
+ mUseSshConfirmationItem = view.findViewById(R.id.ssh_auth_confirmation_item);
+ mUseSshConfirmationItem.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ mUseSshConfirmationCheckbox.toggle();
+ }
+ });
+
+ mUseSshConfirmationCheckbox =
(AppCompatCheckBox) view.findViewById(R.id.ssh_auth_confirmation_checkbox);
- CompoundButton.OnCheckedChangeListener authSwitchListener = new CompoundButton.OnCheckedChangeListener() {
+ mUseSshConfirmationCheckbox.setChecked(mHost.getUseAuthAgent() != null &&
+ mHost.getUseAuthAgent().equals(mSshAuthValues.getString(1)));
+ mUseSshConfirmationCheckbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- mUseSshConfirmationContainer.setVisibility(
- mUseSshAuthSwitch.isChecked() ? View.VISIBLE : View.GONE);
- if (mUseSshAuthSwitch.isChecked()) {
- mHost.setUseAuthAgent(
- mSshAuthConfirmationCheckbox.isChecked() ?
- /* require confirmation */ mSshAuthValues.getString(1) :
- /* don't require confirmation */ mSshAuthValues.getString(2));
- } else {
- mHost.setUseAuthAgent(/* don't use */ mSshAuthValues.getString(0));
- }
- handleHostChange();
+ processSshAuthChange();
}
- };
- if (mHost.getUseAuthAgent() == null ||
- mHost.getUseAuthAgent().equals(mSshAuthValues.getString(0))) {
- mUseSshAuthSwitch.setChecked(false);
- mSshAuthConfirmationCheckbox.setChecked(false);
- } else {
- mUseSshAuthSwitch.setChecked(true);
- mUseSshConfirmationContainer.setVisibility(View.VISIBLE);
- mSshAuthConfirmationCheckbox.setChecked(
- mHost.getUseAuthAgent().equals(mSshAuthValues.getString(1)));
- }
- mUseSshAuthSwitch.setOnCheckedChangeListener(authSwitchListener);
- mSshAuthConfirmationCheckbox.setOnCheckedChangeListener(authSwitchListener);
+ });
+
+ processSshAuthChange();
+
+ mCompressionItem = view.findViewById(R.id.compression_item);
+ mCompressionItem.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ mCompressionSwitch.toggle();
+ }
+ });
mCompressionSwitch = (SwitchCompat) view.findViewById(R.id.compression_switch);
mCompressionSwitch.setChecked(mHost.getCompression());
- mCompressionSwitch.setOnCheckedChangeListener(
- new HostSwitchWatcher(HostDatabase.FIELD_HOST_COMPRESSION));
+ mCompressionSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ mHost.setCompression(isChecked);
+ handleHostChange();
+ }
+ });
+
+ mStartShellItem = view.findViewById(R.id.start_shell_item);
+ mStartShellItem.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ mStartShellSwitch.toggle();
+ }
+ });
mStartShellSwitch = (SwitchCompat) view.findViewById(R.id.start_shell_switch);
mStartShellSwitch.setChecked(mHost.getWantSession());
- mStartShellSwitch.setOnCheckedChangeListener(
- new HostSwitchWatcher(HostDatabase.FIELD_HOST_WANTSESSION));
+ mStartShellSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ mHost.setWantSession(isChecked);
+ handleHostChange();
+ }
+ });
+
+ mStayConnectedItem = view.findViewById(R.id.stay_connected_item);
+ mStayConnectedItem.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ mStayConnectedSwitch.toggle();
+ }
+ });
mStayConnectedSwitch = (SwitchCompat) view.findViewById(R.id.stay_connected_switch);
mStayConnectedSwitch.setChecked(mHost.getStayConnected());
- mStayConnectedSwitch.setOnCheckedChangeListener(
- new HostSwitchWatcher(HostDatabase.FIELD_HOST_STAYCONNECTED));
+ mStayConnectedSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ mHost.setStayConnected(isChecked);
+ handleHostChange();
+ }
+ });
+
+ mCloseOnDisconnectItem = view.findViewById(R.id.close_on_disconnect_item);
+ mCloseOnDisconnectItem.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ mCloseOnDisconnectSwitch.toggle();
+ }
+ });
mCloseOnDisconnectSwitch = (SwitchCompat) view.findViewById(R.id.close_on_disconnect_switch);
mCloseOnDisconnectSwitch.setChecked(mHost.getQuickDisconnect());
- mCloseOnDisconnectSwitch.setOnCheckedChangeListener(
- new HostSwitchWatcher(HostDatabase.FIELD_HOST_QUICKDISCONNECT));
+ mCloseOnDisconnectSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ mHost.setQuickDisconnect(isChecked);
+ handleHostChange();
+ }
+ });
mPostLoginAutomationField = (EditText) view.findViewById(R.id.post_login_automation_field);
mPostLoginAutomationField.setText(mHost.getPostLogin());
mPostLoginAutomationField.addTextChangedListener(
new HostTextFieldWatcher(HostDatabase.FIELD_HOST_POSTLOGIN));
- mDelKeySpinner = (Spinner) view.findViewById(R.id.del_key_spinner);
- for (int i = 0; i < mDelKeyValues.length(); i++) {
- if (mHost.getDelKey().equals(mDelKeyValues.getString(i))) {
- mDelKeySpinner.setSelection(i);
- break;
- }
+ setUriPartsContainerExpanded(mIsUriEditorExpanded);
+
+ return view;
+ }
+
+ /**
+ * @param protocol The protocol to set.
+ * @param setDefaultPortInModel True if the model's port should be updated to the default port
+ * for the given protocol.
+ */
+ private void setTransportType(String protocol, boolean setDefaultPortInModel) {
+ mHost.setProtocol(protocol);
+ if (setDefaultPortInModel)
+ mHost.setPort(TransportFactory.getTransport(protocol).getDefaultPort());
+ handleHostChange();
+
+ mTransportText.setText(protocol);
+
+ mQuickConnectContainer.setHint(
+ TransportFactory.getFormatHint(protocol, getActivity()));
+
+ // Different protocols have different field types, so show only the fields needed.
+ if (SSH.getProtocolName().equals(protocol)) {
+ mUsernameContainer.setVisibility(View.VISIBLE);
+ mHostnameContainer.setVisibility(View.VISIBLE);
+ mPortContainer.setVisibility(View.VISIBLE);
+ mExpandCollapseButton.setVisibility(View.VISIBLE);
+ } else if (Telnet.getProtocolName().equals(protocol)) {
+ mUsernameContainer.setVisibility(View.GONE);
+ mHostnameContainer.setVisibility(View.VISIBLE);
+ mPortContainer.setVisibility(View.VISIBLE);
+ mExpandCollapseButton.setVisibility(View.VISIBLE);
+ } else {
+ // Local protocol has only one field, so no need to show the URI parts
+ // container.
+ setUriPartsContainerExpanded(false);
+ mExpandCollapseButton.setVisibility(View.INVISIBLE);
}
- mDelKeySpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
- @Override
- public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
- mHost.setDelKey(mDelKeyValues.getString(position));
- handleHostChange();
- }
+ }
- @Override
- public void onNothingSelected(AdapterView<?> parent) {
- }
- });
+ private void setFontSize(int fontSize) {
+ if (fontSize < MINIMUM_FONT_SIZE)
+ fontSize = MINIMUM_FONT_SIZE;
- mEncodingSpinner = (Spinner) view.findViewById(R.id.encoding_spinner);
- // The spinner is initialized in setCharsetData() because Charset data is not always
- // available when this fragment is created.
+ if (fontSize > MAXIMUM_FONT_SIZE)
+ fontSize = MAXIMUM_FONT_SIZE;
- setUriPartsContainerExpanded(mIsUriEditorExpanded);
+ mHost.setFontSize(fontSize);
- return view;
+ if (mFontSizeSeekBar.getProgress() + MINIMUM_FONT_SIZE != fontSize) {
+ mFontSizeSeekBar.setProgress(fontSize - MINIMUM_FONT_SIZE);
+ }
+
+ if (!mFontSizeText.isFocused() &&
+ Integer.parseInt(mFontSizeText.getText().toString()) != fontSize) {
+ mFontSizeText.setText(Integer.toString(fontSize));
+ }
+
+ handleHostChange();
+ }
+
+ private void processSshAuthChange() {
+ mUseSshConfirmationItem.setVisibility(
+ mUseSshAuthSwitch.isChecked() ? View.VISIBLE : View.GONE);
+
+ if (mUseSshAuthSwitch.isChecked()) {
+ mHost.setUseAuthAgent(
+ mUseSshConfirmationCheckbox.isChecked() ?
+ /* require confirmation */ mSshAuthValues.getString(1) :
+ /* don't require confirmation */ mSshAuthValues.getString(2));
+ } else {
+ mHost.setUseAuthAgent(/* don't use */ mSshAuthValues.getString(0));
+ }
+
+ handleHostChange();
}
@Override
@@ -449,8 +625,11 @@ public class HostEditorFragment extends Fragment {
// Now that the fragment is attached to an Activity, fetch the arrays from the attached
// Activity's resources.
+ mColorNames = getResources().obtainTypedArray(R.array.list_colors);
mColorValues = getResources().obtainTypedArray(R.array.list_color_values);
+ mSshAuthNames = getResources().obtainTypedArray(R.array.list_authagent);
mSshAuthValues = getResources().obtainTypedArray(R.array.list_authagent_values);
+ mDelKeyNames = getResources().obtainTypedArray(R.array.list_delkey);
mDelKeyValues = getResources().obtainTypedArray(R.array.list_delkey_values);
}
@@ -458,8 +637,11 @@ public class HostEditorFragment extends Fragment {
public void onDetach() {
super.onDetach();
mListener = null;
+ mColorNames.recycle();
mColorValues.recycle();
+ mSshAuthNames.recycle();
mSshAuthValues.recycle();
+ mDelKeyNames.recycle();
mDelKeyValues.recycle();
}
@@ -482,32 +664,17 @@ public class HostEditorFragment extends Fragment {
* Charset).
*/
public void setCharsetData(final Map<String, String> data) {
- if (mEncodingSpinner != null) {
- final String[] encodingNames = new String[data.keySet().size()];
- data.keySet().toArray(encodingNames);
- ArrayAdapter<String> encodingSelection = new ArrayAdapter<String>(
- getActivity(), android.R.layout.simple_spinner_item, encodingNames);
- encodingSelection.setDropDownViewResource(
- android.R.layout.simple_spinner_dropdown_item);
- mEncodingSpinner.setAdapter(encodingSelection);
- for (int i = 0; i < encodingNames.length; i++) {
- if (mHost.getEncoding() != null &&
- mHost.getEncoding().equals(data.get(encodingNames[i]))) {
- mEncodingSpinner.setSelection(i);
- break;
+ mCharsetData = data;
+
+ if (mEncodingText != null) {
+ Iterator it = data.entrySet().iterator();
+ while (it.hasNext()) {
+ Map.Entry<String, String> pair = (Map.Entry) it.next();
+ if (pair.getValue().equals(mHost.getEncoding())) {
+ mEncodingText.setText(pair.getKey());
+ return;
}
}
- mEncodingSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
- @Override
- public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
- mHost.setEncoding(data.get(encodingNames[position]));
- handleHostChange();
- }
-
- @Override
- public void onNothingSelected(AdapterView<?> parent) {
- }
- });
}
}
@@ -560,16 +727,14 @@ public class HostEditorFragment extends Fragment {
* notified.
*/
private void handleHostChange() {
- String protocol = (String) mTransportSpinner.getSelectedItem();
String quickConnectString = mQuickConnectField.getText().toString();
- if (protocol == null || protocol.equals("") ||
- quickConnectString == null || quickConnectString.equals("")) {
+ if (quickConnectString == null || quickConnectString.equals("")) {
// Invalid protocol and/or string, so don't do anything.
mListener.onHostInvalidated();
return;
}
- Uri uri = TransportFactory.getUri(protocol, quickConnectString);
+ Uri uri = TransportFactory.getUri(mHost.getProtocol(), quickConnectString);
if (uri == null) {
// Valid string, but does not accurately describe a URI.
mListener.onHostInvalidated();
@@ -581,8 +746,8 @@ public class HostEditorFragment extends Fragment {
}
public interface Listener {
- public void onValidHostConfigured(HostBean host);
- public void onHostInvalidated();
+ void onValidHostConfigured(HostBean host);
+ void onHostInvalidated();
}
private class HostTextFieldWatcher implements TextWatcher {
@@ -617,6 +782,14 @@ public class HostEditorFragment extends Fragment {
mHost.setNickname(text);
} else if (HostDatabase.FIELD_HOST_POSTLOGIN.equals(mFieldType)) {
mHost.setPostLogin(text);
+ } else if (HostDatabase.FIELD_HOST_FONTSIZE.equals(mFieldType)) {
+ int fontSize = HostBean.DEFAULT_FONT_SIZE;
+ try {
+ fontSize = Integer.parseInt(text);
+ } catch (NumberFormatException e) {
+ } finally {
+ setFontSize(fontSize);
+ }
} else {
throw new RuntimeException("Invalid field type.");
}
@@ -640,29 +813,4 @@ public class HostEditorFragment extends Fragment {
HostDatabase.FIELD_HOST_PORT.equals(fieldType);
}
}
-
- private class HostSwitchWatcher implements CompoundButton.OnCheckedChangeListener {
-
- private final String mFieldType;
-
- public HostSwitchWatcher(String fieldType) {
- mFieldType = fieldType;
- }
-
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- if (HostDatabase.FIELD_HOST_COMPRESSION.equals(mFieldType)) {
- mHost.setCompression(isChecked);
- } else if (HostDatabase.FIELD_HOST_WANTSESSION.equals(mFieldType)) {
- mHost.setWantSession(isChecked);
- } else if (HostDatabase.FIELD_HOST_STAYCONNECTED.equals(mFieldType)) {
- mHost.setStayConnected(isChecked);
- } else if (HostDatabase.FIELD_HOST_QUICKDISCONNECT.equals(mFieldType)) {
- mHost.setQuickDisconnect(isChecked);
- } else {
- throw new RuntimeException("Invalid field type.");
- }
- handleHostChange();
- }
- }
}
diff --git a/app/src/main/java/org/connectbot/bean/HostBean.java b/app/src/main/java/org/connectbot/bean/HostBean.java
index 438713e..a31f9ec 100644
--- a/app/src/main/java/org/connectbot/bean/HostBean.java
+++ b/app/src/main/java/org/connectbot/bean/HostBean.java
@@ -33,7 +33,7 @@ import android.net.Uri;
public class HostBean extends AbstractBean {
public static final String BEAN_NAME = "host";
- private static final int DEFAULT_FONT_SIZE = 10;
+ public static final int DEFAULT_FONT_SIZE = 10;
/* Database fields */
private long id = -1;
diff --git a/app/src/main/res/drawable-hdpi/ic_save.png b/app/src/main/res/drawable-hdpi/ic_save.png
new file mode 100644
index 0000000..dd3f106
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/ic_save.png
Binary files differ
diff --git a/app/src/main/res/drawable-mdpi/ic_save.png b/app/src/main/res/drawable-mdpi/ic_save.png
new file mode 100644
index 0000000..015062e
--- /dev/null
+++ b/app/src/main/res/drawable-mdpi/ic_save.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_save.png b/app/src/main/res/drawable-xhdpi/ic_save.png
new file mode 100644
index 0000000..adda095
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/ic_save.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_save.png b/app/src/main/res/drawable-xxhdpi/ic_save.png
new file mode 100644
index 0000000..3e0ce1a
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/ic_save.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_save.png b/app/src/main/res/drawable-xxxhdpi/ic_save.png
new file mode 100644
index 0000000..bd80bf1
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/ic_save.png
Binary files differ
diff --git a/app/src/main/res/layout/fragment_host_editor.xml b/app/src/main/res/layout/fragment_host_editor.xml
index 5e809d8..e4a2094 100644
--- a/app/src/main/res/layout/fragment_host_editor.xml
+++ b/app/src/main/res/layout/fragment_host_editor.xml
@@ -19,7 +19,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
+ android:fillViewport="true"
tools:context="org.connectbot.HostEditorFragment"
>
@@ -29,31 +30,42 @@
android:orientation="vertical"
>
- <LinearLayout
- android:layout_width="wrap_content"
+ <RelativeLayout
+ android:id="@+id/protocol_item"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_marginStart="4dp"
- android:layout_marginLeft="4dp"
- android:layout_marginBottom="4dp"
>
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:src="@drawable/icon"
+ android:contentDescription="@string/protocol_spinner_label"
+ style="@style/ListItemIcon"
+ />
+
<TextView
+ android:id="@+id/protocol_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/protocol_spinner_label"
- android:textSize="12sp"
+ style="@style/ListItemFirstLineText.WithIcon"
/>
- <Spinner
- android:id="@+id/transport_selector"
+ <TextView
+ android:id="@+id/protocol_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_below="@id/protocol_title"
+ tools:text="ssh"
+ style="@style/ListItemSecondLineText.WithIcon"
/>
- </LinearLayout>
+ </RelativeLayout>
<LinearLayout
+ android:layout_marginLeft="68dp"
+ android:layout_marginStart="68dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
@@ -96,8 +108,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:layout_marginLeft="56dp"
- android:layout_marginStart="56dp"
+ android:layout_marginLeft="68dp"
+ android:layout_marginStart="68dp"
+ android:layout_marginRight="48dp"
+ android:layout_marginEnd="48dp"
android:visibility="gone"
android:animateLayoutChanges="true"
tools:ignore="UnusedAttribute"
@@ -156,118 +170,219 @@
</LinearLayout>
- <View style="@style/Divider"
- />
-
- <android.support.design.widget.TextInputLayout
+ <RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
- <EditText
- android:id="@+id/nickname_field"
+ <android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:maxLines="1"
- android:inputType="text"
- android:hint="@string/hostpref_nickname_title"
- />
+ android:layout_marginLeft="68dp"
+ android:layout_marginStart="68dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginEnd="16dp"
+ >
+
+ <EditText
+ android:id="@+id/nickname_field"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:maxLines="1"
+ android:inputType="text"
+ android:hint="@string/hostpref_nickname_title"
+ />
- </android.support.design.widget.TextInputLayout>
+ </android.support.design.widget.TextInputLayout>
- <LinearLayout
+ </RelativeLayout>
+
+ <RelativeLayout
+ android:id="@+id/color_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_marginStart="4dp"
- android:layout_marginLeft="4dp"
- android:layout_marginBottom="4dp"
>
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:src="@drawable/icon"
+ android:contentDescription="@string/hostpref_color_title"
+ style="@style/ListItemIcon"
+ />
+
<TextView
+ android:id="@+id/color_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hostpref_color_title"
- android:textSize="12sp"
+ style="@style/ListItemFirstLineText.WithIcon"
/>
- <Spinner
- android:id="@+id/color_selector"
+ <TextView
+ android:id="@+id/color_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:entries="@array/list_colors"
- android:entryValues="@array/list_color_values"
+ android:layout_below="@id/color_title"
+ tools:text="gray"
+ style="@style/ListItemSecondLineText.WithIcon"
/>
- </LinearLayout>
+ </RelativeLayout>
- <LinearLayout
+ <RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_marginStart="4dp"
- android:layout_marginLeft="4dp"
- android:layout_marginBottom="4dp"
>
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:src="@drawable/icon"
+ android:contentDescription="@string/hostpref_fontsize_title"
+ style="@style/ListItemIcon"
+ />
+
+ <TextView
+ android:id="@+id/font_size_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_fontsize_title"
+ style="@style/ListItemFirstLineText.WithIcon"
+ />
+
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginLeft="62dp"
+ android:layout_marginStart="62dp"
+ android:paddingBottom="8dp"
+ android:layout_below="@id/font_size_title"
>
- <TextView
- android:layout_width="wrap_content"
+ <SeekBar
+ android:id="@+id/font_size_bar"
+ android:layout_width="0dp"
+ android:layout_weight="1"
android:layout_height="wrap_content"
- android:text="@string/hostpref_fontsize_title"
- android:textSize="12sp"
+ android:layout_gravity="center"
+ android:max="32"
/>
- <TextView
+ <EditText
android:id="@+id/font_size_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="12sp"
+ android:layout_gravity="center_vertical"
+ android:layout_marginRight="16dp"
+ android:layout_marginEnd="16dp"
+ android:inputType="number"
+ android:maxLines="1"
+ tools:text="10"
/>
</LinearLayout>
- <SeekBar
- android:id="@+id/font_size_bar"
- android:layout_width="match_parent"
+ </RelativeLayout>
+
+ <RelativeLayout
+ android:id="@+id/pubkey_item"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ >
+
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:src="@drawable/icon"
+ android:contentDescription="@string/hostpref_pubkeyid_title"
+ style="@style/ListItemIcon"
+ />
+
+ <TextView
+ android:id="@+id/pubkey_title"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:max="32"
+ android:text="@string/hostpref_pubkeyid_title"
+ style="@style/ListItemFirstLineText.WithIcon"
/>
- </LinearLayout>
+ <TextView
+ android:id="@+id/pubkey_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/pubkey_title"
+ tools:text="Use any key"
+ style="@style/ListItemSecondLineText.WithIcon"
+ />
- <View style="@style/Divider"
- />
+ </RelativeLayout>
- <LinearLayout
- android:layout_width="wrap_content"
+ <RelativeLayout
+ android:id="@+id/delkey_item"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_marginStart="4dp"
- android:layout_marginLeft="4dp"
- android:layout_marginBottom="4dp"
>
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:src="@drawable/icon"
+ android:contentDescription="@string/hostpref_delkey_title"
+ style="@style/ListItemIcon"
+ />
+
<TextView
+ android:id="@+id/delkey_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/hostpref_pubkeyid_title"
- android:textSize="12sp"
+ android:text="@string/hostpref_delkey_title"
+ style="@style/ListItemFirstLineText.WithIcon"
/>
- <Spinner
- android:id="@+id/pubkey_spinner"
+ <TextView
+ android:id="@+id/delkey_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:entries="@array/list_pubkeyids"
- android:entryValues="@array/list_pubkeyids_value"
+ android:layout_below="@id/delkey_title"
+ tools:text="Delete"
+ style="@style/ListItemSecondLineText.WithIcon"
/>
- </LinearLayout>
+ </RelativeLayout>
+
+ <RelativeLayout
+ android:id="@+id/encoding_item"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ >
+
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:src="@drawable/icon"
+ android:contentDescription="@string/hostpref_encoding_title"
+ style="@style/ListItemIcon"
+ />
+
+ <TextView
+ android:id="@+id/encoding_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_encoding_title"
+ style="@style/ListItemFirstLineText.WithIcon"
+ />
+
+ <TextView
+ android:id="@+id/encoding_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/encoding_title"
+ tools:text="UTF-8"
+ style="@style/ListItemSecondLineText.WithIcon"
+ />
+
+ </RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
@@ -276,14 +391,17 @@
>
<RelativeLayout
+ android:id="@+id/use_ssh_auth_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/hostpref_authagent_title"
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:src="@drawable/icon"
+ android:contentDescription="@string/hostpref_authagent_title"
+ style="@style/ListItemIcon"
/>
<android.support.v7.widget.SwitchCompat
@@ -292,14 +410,28 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
+ android:layout_marginRight="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_centerVertical="true"
+ />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/use_ssh_auth_switch"
+ android:layout_toStartOf="@id/use_ssh_auth_switch"
+ android:text="@string/hostpref_authagent_title"
+ android:paddingBottom="24dp"
+ style="@style/ListItemFirstLineText.WithIcon"
+ tools:ignore="RelativeOverlap"
/>
</RelativeLayout>
<RelativeLayout
- android:id="@+id/ssh_confirmation_container"
+ android:id="@+id/ssh_auth_confirmation_item"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="32dp"
android:visibility="gone"
>
@@ -307,6 +439,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hostpref_authagent_with_confirmation"
+ android:textSize="14sp"
+ android:layout_marginTop="8dp"
+ android:layout_marginLeft="72dp"
+ android:layout_marginStart="72dp"
/>
<android.support.v7.widget.AppCompatCheckBox
@@ -315,6 +451,7 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
+ android:padding="16dp"
/>
</RelativeLayout>
@@ -322,14 +459,25 @@
</LinearLayout>
<RelativeLayout
+ android:id="@+id/compression_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:src="@drawable/icon"
+ android:contentDescription="@string/hostpref_compression_title"
+ style="@style/ListItemIcon"
+ />
+
<TextView
- android:layout_width="match_parent"
+ android:id="@+id/compression_title"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hostpref_compression_title"
+ style="@style/ListItemFirstLineText.WithIcon"
/>
<android.support.v7.widget.SwitchCompat
@@ -338,19 +486,43 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
+ android:layout_marginRight="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_centerVertical="true"
+ />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toLeftOf="@id/compression_switch"
+ android:layout_toStartOf="@id/compression_switch"
+ android:layout_below="@id/compression_title"
+ android:text="@string/hostpref_compression_summary"
+ style="@style/ListItemSecondLineText.WithIcon"
/>
</RelativeLayout>
<RelativeLayout
+ android:id="@+id/start_shell_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:src="@drawable/icon"
+ android:contentDescription="@string/hostpref_wantsession_title"
+ style="@style/ListItemIcon"
+ />
+
<TextView
- android:layout_width="match_parent"
+ android:id="@+id/shell_session_title"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hostpref_wantsession_title"
+ style="@style/ListItemFirstLineText.WithIcon"
/>
<android.support.v7.widget.SwitchCompat
@@ -359,19 +531,43 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
+ android:layout_marginRight="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_centerVertical="true"
+ />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_wantsession_summary"
+ android:layout_toLeftOf="@id/start_shell_switch"
+ android:layout_toStartOf="@id/start_shell_switch"
+ android:layout_below="@id/shell_session_title"
+ style="@style/ListItemSecondLineText.WithIcon"
/>
</RelativeLayout>
<RelativeLayout
+ android:id="@+id/stay_connected_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:src="@drawable/icon"
+ android:contentDescription="@string/hostpref_stayconnected_title"
+ style="@style/ListItemIcon"
+ />
+
<TextView
- android:layout_width="match_parent"
+ android:id="@+id/stay_connected_title"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hostpref_stayconnected_title"
+ style="@style/ListItemFirstLineText.WithIcon"
/>
<android.support.v7.widget.SwitchCompat
@@ -380,19 +576,43 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
+ android:layout_marginRight="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_centerVertical="true"
+ />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/hostpref_stayconnected_summary"
+ android:layout_toLeftOf="@id/stay_connected_switch"
+ android:layout_toStartOf="@id/stay_connected_switch"
+ android:layout_below="@id/stay_connected_title"
+ style="@style/ListItemSecondLineText.WithIcon"
/>
</RelativeLayout>
<RelativeLayout
+ android:id="@+id/close_on_disconnect_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:src="@drawable/icon"
+ android:contentDescription="@string/hostpref_quickdisconnect_title"
+ style="@style/ListItemIcon"
+ />
+
<TextView
- android:layout_width="match_parent"
+ android:id="@+id/close_on_disconnect_title"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hostpref_quickdisconnect_title"
+ style="@style/ListItemFirstLineText.WithIcon"
/>
<android.support.v7.widget.SwitchCompat
@@ -401,81 +621,70 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
+ android:layout_marginRight="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_centerVertical="true"
/>
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- >
-
<TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/hostpref_postlogin_title"
- />
-
- <EditText
- android:id="@+id/post_login_automation_field"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_width="fill_parent"
- android:inputType="textMultiLine"
- android:lines="8"
- android:minLines="2"
+ android:text="@string/hostpref_quickdisconnect_summary"
+ android:layout_toLeftOf="@id/close_on_disconnect_switch"
+ android:layout_toStartOf="@id/close_on_disconnect_switch"
+ android:layout_below="@id/close_on_disconnect_title"
+ style="@style/ListItemSecondLineText.WithIcon"
/>
</RelativeLayout>
- <LinearLayout
- android:layout_width="wrap_content"
+ <RelativeLayout
+ android:id="@+id/postlogin_item"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_marginStart="4dp"
- android:layout_marginLeft="4dp"
- android:layout_marginBottom="4dp"
>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/hostpref_delkey_title"
- android:textSize="12sp"
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:src="@drawable/icon"
+ android:contentDescription="@string/hostpref_postlogin_title"
+ style="@style/ListItemIcon"
/>
- <Spinner
- android:id="@+id/del_key_spinner"
+ <TextView
+ android:id="@+id/postlogin_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:entries="@array/list_delkey"
- android:entryValues="@array/list_delkey_values"
+ android:text="@string/hostpref_postlogin_title"
+ style="@style/ListItemFirstLineText.WithIcon"
/>
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_marginStart="4dp"
- android:layout_marginLeft="4dp"
- android:layout_marginBottom="4dp"
- >
-
<TextView
+ android:id="@+id/postlogin_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/hostpref_encoding_title"
- android:textSize="12sp"
+ android:text="@string/hostpref_postlogin_summary"
+ android:layout_below="@id/postlogin_title"
+ android:layout_alignParentBottom="false"
+ android:paddingBottom="2dp"
+ style="@style/ListItemSecondLineText.WithIcon"
/>
- <Spinner
- android:id="@+id/encoding_spinner"
- android:layout_width="wrap_content"
+ <EditText
+ android:id="@+id/post_login_automation_field"
android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginLeft="72dp"
+ android:layout_marginStart="72dp"
+ android:layout_below="@id/postlogin_summary"
+ android:inputType="textMultiLine"
+ android:lines="8"
+ android:minLines="2"
/>
- </LinearLayout>
+
+ </RelativeLayout>
</LinearLayout>
diff --git a/app/src/main/res/menu/edit_host_activity_edit_menu.xml b/app/src/main/res/menu/edit_host_activity_edit_menu.xml
index 564e211..ecc8171 100644
--- a/app/src/main/res/menu/edit_host_activity_edit_menu.xml
+++ b/app/src/main/res/menu/edit_host_activity_edit_menu.xml
@@ -22,7 +22,7 @@
>
<item android:id="@+id/save"
- android:icon="@drawable/ic_add"
+ android:icon="@drawable/ic_save"
android:title="@string/hostpref_edit_host"
connectbot:showAsAction="always|withText"
/>
diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml
index 2c166e2..1d55856 100644
--- a/app/src/main/res/values-ca/strings.xml
+++ b/app/src/main/res/values-ca/strings.xml
@@ -91,7 +91,6 @@
<string name="pref_wifilock_title">Manté activa la Wi-Fi</string>
<string name="pref_wifilock_summary">Evita que la Wi-Fi s\'apagui mentre hi ha una sessió activa</string>
<string name="pref_bumpyarrows_title">Cursors vibrants</string>
- <string name="pref_bumpyarrows_summary">Vibra quan s\'envien els cursors de direcció amb la rodeta; útil per connexions lentes</string>
<string name="pref_bell_category">So del Terminal</string>
<string name="pref_bell_title">So activat</string>
<string name="pref_bell_volume_title">Volum del so</string>
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index ddfb44f..42ee1f7 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -89,7 +89,6 @@
<string name="pref_wifilock_title">Ponechat Wi-Fi aktivní</string>
<string name="pref_wifilock_summary">Zabránit Wi-Fi ve vypnutí když je sezení aktivní</string>
<string name="pref_bumpyarrows_title">Hmatová odezva šipek</string>
- <string name="pref_bumpyarrows_summary">Vibrovat při posílání kurzorových kláves z trackballu; užitečná pro špatná spojení</string>
<string name="pref_bell_category">Zvonek terminálu</string>
<string name="pref_bell_title">Zvukové upozornění</string>
<string name="pref_bell_volume_title">Hlasitost zvonku</string>
diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml
index 1f6b466..9163a54 100644
--- a/app/src/main/res/values-da/strings.xml
+++ b/app/src/main/res/values-da/strings.xml
@@ -89,7 +89,6 @@
<string name="pref_wifilock_title">Hold Wi-Fi aktiv</string>
<string name="pref_wifilock_summary">Undgå at Wi-Fi slår fra imens en session er aktiv</string>
<string name="pref_bumpyarrows_title">Vibrerende pile</string>
- <string name="pref_bumpyarrows_summary">Vibrér når der afsendes piletaster fra trackballen; nyttig ved langsomme forbindelser</string>
<string name="pref_bell_category">Terminalklokke</string>
<string name="pref_bell_title">Hørbar klokke</string>
<string name="pref_bell_volume_title">Klokke volume</string>
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 2fd8715..14ed4c7 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -91,7 +91,6 @@
<string name="pref_wifilock_title">WLAN aktiviert lassen</string>
<string name="pref_wifilock_summary">Verhindern, dass während einer aktiven Sitzung WLAN deaktiviert wird</string>
<string name="pref_bumpyarrows_title">Vibrierende Pfeiltasten</string>
- <string name="pref_bumpyarrows_summary">Vibirieren, wenn Pfeiltasten vom Trackball gesendet werden; nützlich bei laggenden Verbindungen</string>
<string name="pref_bell_category">Terminalglocke</string>
<string name="pref_bell_title">Hörbare Glocke</string>
<string name="pref_bell_volume_title">Glockenlautstärke</string>
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index ccd0327..6ed169b 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -1,14 +1,16 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
- <string name="app_desc">Cliente de SSH sencillo, potente y open-source</string>
- <string name="service_desc">Mantiene conexiones SSH y las claves públicas guardadas</string>
- <string name="title_hosts_list">Máquinas</string>
+ <string name="app_desc">Cliente de SSH sencillo, potente y de código abierto.</string>
+ <string name="service_desc">Mantiene las conexiones SSH y las claves públicas cargadas</string>
+ <string name="title_hosts_list">Servidores</string>
<string name="title_pubkey_list">Claves Publicas</string>
<string name="title_port_forwards_list">Traducciones de puerto</string>
<string name="title_host_editor">Editar equipo remoto</string>
<string name="title_help">Ayuda</string>
<string name="title_colors">Colores</string>
<string name="title_color_picker">Escoger un color</string>
+ <string name="title_settings">Ajustes</string>
+ <string name="title_pubkey_generate">Generar</string>
<string name="resolve_connect">Conectar</string>
<string name="resolve_entropy">Recolectar entropía</string>
<string name="menu_insert">Añadir equipo remoto</string>
@@ -17,6 +19,10 @@
<string name="help_intro">Por favor seleccione un tema a continuación para más información sobre una materia en particular.</string>
<string name="help_about">Acerca de ConnectBot</string>
<string name="help_keyboard">Teclado</string>
+ <string name="terms_and_conditions">Términos y condiciones</string>
+ <string name="keyboard_shortcuts">Atajos de teclado</string>
+ <string name="increase_font_size">Aumentar el tamaño de letra</string>
+ <string name="decrease_font_size">Disminuir el tamaño de letra</string>
<string name="pubkey_generate">Generar</string>
<string name="pubkey_delete">Eliminar clave</string>
<string name="pubkey_gather_entropy">Haciendo acopio de entropía</string>
@@ -62,6 +68,7 @@
<string name="alert_key_corrupted_msg">¡La clave privada parece corrupta!</string>
<string name="alert_sdcard_absent">¡Tarjeta SD no insertada!</string>
<string name="button_add">Añadir</string>
+ <string name="button_cancel">Cancelar</string>
<string name="button_change">Modificar</string>
<string name="button_generate">Generar clave</string>
<string name="button_resize">Redimensionar</string>
@@ -93,6 +100,7 @@
<string name="pref_keymode_title">Secuencia de teclas para directorios</string>
<string name="pref_keymode_summary">Especifique como usar Alt para \'/\' y Shit para Tab</string>
<string name="pref_stickymodifiers_title">Corrección de errores al teclear</string>
+ <string name="pref_stickymodifiers_summary">Los atajos combinados de tecla permanecen activos hasta que otra tecla sea pulsada</string>
<string name="only_alt">Detener solamente</string>
<string name="pref_camera_title">Boton de la Cámara</string>
<string name="pref_camera_summary">Especifique que secuencia de teclas activar cuando presione el botón de la cámara</string>
@@ -101,7 +109,6 @@
<string name="pref_wifilock_title">Mantener la red inálambrica activa</string>
<string name="pref_wifilock_summary">Prevenir que la red inálambrica se apague mientras haya una conexión activa</string>
<string name="pref_bumpyarrows_title">Cursor con vibración</string>
- <string name="pref_bumpyarrows_summary">Vibrar al recibir las teclas del cursor desde el trackball; útil para conexiones con retardos</string>
<string name="pref_bell_category">Timbre del terminal</string>
<string name="pref_bell_title">Timbre audible</string>
<string name="pref_bell_volume_title">Volúmen del timbre</string>
@@ -181,6 +188,9 @@
<string name="delete_message">¿Está seguro de que quiere eliminar \'%1$s\'?</string>
<string name="delete_pos">Sí, eliminar</string>
<string name="delete_neg">Cancelar</string>
+ <string name="disconnect_all_message">¿Está seguro de que quiere desconectarse de todos los equipos host?</string>
+ <string name="disconnect_all_pos">Sí, desconectar</string>
+ <string name="disconnect_all_neg">Cancelar</string>
<string name="terminal_no_hosts_connected">No hay equipos conectados ahora</string>
<string name="terminal_connecting">Conectando a %1$s:%2$d via %3$s</string>
<string name="terminal_sucess">Host (equipo anfitrion) \'%1$s\' clave: %2$s verifiado.</string>
@@ -219,5 +229,29 @@
<string name="image_description_key_is_locked">Clave pública bloqueada.</string>
<string name="image_description_toggle_control_character">Activar el envío de la pulsación de tecla Control.</string>
<string name="image_description_send_escape_character">Enviar una pulsación de la tecla Escape.</string>
+ <string name="image_description_send_tab_character">Enviar una pulsación de la tecla TAB (Tabulador).</string>
<string name="image_description_show_keyboard">Mostrar teclado.</string>
+ <string name="image_description_up">Tecla cursor arriba</string>
+ <string name="image_description_down">Tecla cursor abajo</string>
+ <string name="image_description_left">Tecla cursor a la izquierda</string>
+ <string name="image_description_right">Tecla cursor a la derecha</string>
+ <string name="button_key_esc">Escape</string>
+ <string name="button_key_ctrl">Ctrl</string>
+ <string name="button_key_tab">TAB (Tabulador)</string>
+ <string name="button_key_home">Inicio</string>
+ <string name="button_key_end">Finalizar</string>
+ <string name="button_key_pgup">Re Pág</string>
+ <string name="button_key_pgdn">Av Pág</string>
+ <string name="button_key_f1">F1</string>
+ <string name="button_key_f2">F2</string>
+ <string name="button_key_f3">F3</string>
+ <string name="button_key_f4">F4</string>
+ <string name="button_key_f5">F5</string>
+ <string name="button_key_f6">F6</string>
+ <string name="button_key_f7">F7</string>
+ <string name="button_key_f8">F8</string>
+ <string name="button_key_f9">F9</string>
+ <string name="button_key_f10">F10</string>
+ <string name="button_key_f11">F11</string>
+ <string name="button_key_f12">F12</string>
</resources>
diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml
index 52eedc7..edb4915 100644
--- a/app/src/main/res/values-eu/strings.xml
+++ b/app/src/main/res/values-eu/strings.xml
@@ -17,6 +17,10 @@
<string name="help_intro">Mesedez, hautatu beheko gaietako bat informazio gehiago nahi izanez gero.</string>
<string name="help_about">ConnectBot-i buruz</string>
<string name="help_keyboard">Teklatua</string>
+ <string name="terms_and_conditions">Baldintzak</string>
+ <string name="keyboard_shortcuts">Laster-teklak</string>
+ <string name="increase_font_size">Handiagotu letra-tamaina</string>
+ <string name="decrease_font_size">Txikiagotu letra-tamaina</string>
<string name="pubkey_generate">Sortu</string>
<string name="pubkey_delete">Ezabatu gakoa</string>
<string name="pubkey_gather_entropy">Entropia biltzen</string>
@@ -96,7 +100,6 @@
<string name="pref_wifilock_title">Mantendu WiFi-a aktibo</string>
<string name="pref_wifilock_summary">Galarazi WiFi-a itzaltzea saio aktibo bat dagoen bitartean</string>
<string name="pref_bumpyarrows_title">Bibraziodun geziak</string>
- <string name="pref_bumpyarrows_summary">Bibratu trackball bidez erakusle-geziak bidaltzean; atzerapendun konexioentzat egokia</string>
<string name="pref_bell_category">Terminalaren txirrina</string>
<string name="pref_bell_title">Txirrin entzungarria</string>
<string name="pref_bell_volume_title">Txirrinaren bolumena</string>
@@ -175,6 +178,8 @@
<string name="delete_message">Ziur zaude \'%1$s\' ezabatu nahi duzula?</string>
<string name="delete_pos">Bai, ezabatu</string>
<string name="delete_neg">Utzi</string>
+ <string name="disconnect_all_pos">Bai, deskonektatu</string>
+ <string name="disconnect_all_neg">Utzi</string>
<string name="terminal_no_hosts_connected">Ez dago ostalaririk konektatuta une honetan</string>
<string name="terminal_connecting">%1$s:%2$d-ra konektatzen %3$s bidez</string>
<string name="terminal_sucess">Egiaztatutako ostalaria \'%1$s\' gakoa: %2$s</string>
@@ -211,5 +216,13 @@
<string name="image_description_key_is_locked">Gakoa blokeatuta dago.</string>
<string name="image_description_toggle_control_character">Txandakatu kontrol karakterea.</string>
<string name="image_description_send_escape_character">Bidali ihes karakterea.</string>
+ <string name="image_description_send_tab_character">Bidali TAB karakterea.</string>
<string name="image_description_show_keyboard">Erakutsi teklatua.</string>
+ <string name="image_description_up">Gora gezia</string>
+ <string name="image_description_down">Behera gezia</string>
+ <string name="image_description_left">Ezkerra gezia</string>
+ <string name="image_description_right">Eskuina gezia</string>
+ <string name="button_key_esc">Esc</string>
+ <string name="button_key_ctrl">Ktrl</string>
+ <string name="button_key_tab">Tab</string>
</resources>
diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml
index b50add6..e67da3d 100644
--- a/app/src/main/res/values-fi/strings.xml
+++ b/app/src/main/res/values-fi/strings.xml
@@ -88,7 +88,6 @@
<string name="pref_wifilock_title">Pidä Wi-Fi-yhteys päällä</string>
<string name="pref_wifilock_summary">Estää Wi-Fi-yhteyden katkaisemisen kun istunto on aktiivinen</string>
<string name="pref_bumpyarrows_title">Värinä nuolista</string>
- <string name="pref_bumpyarrows_summary">Värinäefekti aina kun nuolinäppäinten painalluksia lähetetään palvelimelle. Kätevä hitaille yhteyksille.</string>
<string name="pref_bell_category">Päätteen kello</string>
<string name="pref_bell_title">Kellon äänet käytössä</string>
<string name="pref_bell_volume_title">Kellon äänenvoimakkuus</string>
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index bb0dee8..7acc678 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -99,7 +99,6 @@
<string name="pref_wifilock_title">Garder le Wi-Fi actif</string>
<string name="pref_wifilock_summary">Empêcher la désactivation du Wi-Fi quand une session est active</string>
<string name="pref_bumpyarrows_title">Flêches vibrantes</string>
- <string name="pref_bumpyarrows_summary">Vibrer lors de l\'envoi d\'une touche directionnelle à partir du trackball ; intéressant pour les connexions lentes</string>
<string name="pref_bell_category">Cloche du terminal</string>
<string name="pref_bell_title">Alerte sonore</string>
<string name="pref_bell_volume_title">Volume de l\'alerte</string>
diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml
index 3bc8b23..8e3758d 100644
--- a/app/src/main/res/values-gl/strings.xml
+++ b/app/src/main/res/values-gl/strings.xml
@@ -79,7 +79,6 @@
<string name="pref_keepalive_summary">Evitar que a pantalla se apague ao traballar nunha consola</string>
<string name="pref_wifilock_title">Manter a Wi-Fi activa</string>
<string name="pref_wifilock_summary">Evitar que a Wi-Fi se apague mentres a sesión está activa</string>
- <string name="pref_bumpyarrows_summary">Vibrar ao enviar teclas de dirección dende o trackball; útil para conexións con retardos</string>
<string name="pref_bell_category">Timbre do terminal</string>
<string name="pref_bell_title">Timbre audible</string>
<string name="pref_bell_volume_title">Volume do timbre</string>
diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml
index b3cba42..b40db2a 100644
--- a/app/src/main/res/values-he/strings.xml
+++ b/app/src/main/res/values-he/strings.xml
@@ -90,7 +90,6 @@
<string name="pref_wifilock_title">להשאיר את הרשת האלחוטית פעילה</string>
<string name="pref_wifilock_summary">למנוע את כיבוי מתאם הרשת האלחוטית כאשר ישנו חלון פעיל</string>
<string name="pref_bumpyarrows_title">חצים עם רטט</string>
- <string name="pref_bumpyarrows_summary">המכשיר ירטוט בעת שליחת מקשי חצים מכדור הגלילה; שימוש לחיבורים אטיים</string>
<string name="pref_bell_category">פעמון מסוף</string>
<string name="pref_bell_title">פעמון עם צליל</string>
<string name="pref_bell_volume_title">עצמת הפעמון</string>
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 5a102c7..d1c0f7c 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -89,7 +89,6 @@
<string name="pref_wifilock_title">Tartsa fenn a Wi-Fi kapcsolatot</string>
<string name="pref_wifilock_summary">Akadályozza meg a Wi-Fi kikapcsolását amíg a munka zajlik</string>
<string name="pref_bumpyarrows_title">Ugráló nyilak</string>
- <string name="pref_bumpyarrows_summary">Vibráljon amikor a hanyattegérrel mozgatjuk a kurzort; hasznos lehet lassú kapcsolatoknál</string>
<string name="pref_bell_category">Terminál csengő</string>
<string name="pref_bell_title">Hallható csengő</string>
<string name="pref_bell_volume_title">Csengő hangereje</string>
diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml
index d0bd68f..3f65a82 100644
--- a/app/src/main/res/values-id/strings.xml
+++ b/app/src/main/res/values-id/strings.xml
@@ -90,7 +90,6 @@
<string name="pref_wifilock_title">Wi-Fi selalu aktif</string>
<string name="pref_wifilock_summary">Jaga Wi-Fi agar tidak padam ketika sesi aktif</string>
<string name="pref_bumpyarrows_title">Panah belok</string>
- <string name="pref_bumpyarrows_summary">Getarkan saat mengirim tombol panah dari trackball, berguna untuk koneksi lambat</string>
<string name="pref_bell_category">Bel terminal</string>
<string name="pref_bell_title">Bel berdering</string>
<string name="pref_bell_volume_title">Volume dering</string>
diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml
index 1ae4b42..f2f2b76 100644
--- a/app/src/main/res/values-is/strings.xml
+++ b/app/src/main/res/values-is/strings.xml
@@ -68,7 +68,7 @@
<string name="pref_ui_category">Notenda viðmót</string>
<string name="pref_rotation_title">Snúnings hamur</string>
<string name="pref_rotation_summary">Hvernig breyta skal snúningnum þegar lyklaborðið er sýnilegt/falið</string>
- <string name="pref_fullscreen_title">Fylla skjáinn</string>
+ <string name="pref_fullscreen_title">Fullskjáhamur</string>
<string name="pref_fullscreen_summary">Fela stöðustiku þegar tenging er virk</string>
<string name="pref_memkeys_title">Geyma lykla í minni</string>
<string name="pref_memkeys_summary">Geyma ólæsta lykla í minni þangað til forritinu er lokað</string>
@@ -82,7 +82,6 @@
<string name="pref_keepalive_summary">Banna skjánum að slokkna þegar tenging er virk</string>
<string name="pref_wifilock_title">Halda þráðlausu neti í gangi</string>
<string name="pref_wifilock_summary">Halda þráðlausu neti í gangi þegar tenging er virk</string>
- <string name="pref_bumpyarrows_summary">Titra þegar örvar eru sendar með trackball; sniðugt fyrir óstöðugar tengingar</string>
<string name="pref_bell_category">Terminal bjalla</string>
<string name="pref_bell_title">Bjalla með hljóði</string>
<string name="pref_bell_volume_title">Hljóðstyrkur bjöllu</string>
@@ -106,7 +105,7 @@
<string name="hostpref_encoding_title">Kóðun</string>
<string name="hostpref_connection_category">Stillingar fyrir tengingu</string>
<string name="hostpref_username_title">Notendanafn</string>
- <string name="hostpref_hostname_title">Þjónn</string>
+ <string name="hostpref_hostname_title">Hýsill</string>
<string name="hostpref_port_title">Port</string>
<string name="bind_never">Aldrei tengt</string>
<string name="console_copy_done">Afritaði %1$d bæti</string>
@@ -159,7 +158,7 @@
<string name="with_confirmation">Með staðfestingu</string>
<string name="yes">Já</string>
<string name="exceptions_submit_message">Það lítur út fyrir að ConnectBot hafi verið í vandræðum síðast þegar það keyrði. Viltu senda villu greiningu á höfunda forritsins?</string>
- <string name="menu_colors_reset">Endurstilla</string>
+ <string name="menu_colors_reset">Frumstilla</string>
<string name="app_is_running">ConnectBot er í gangi</string>
<string name="color_red">rauður</string>
<string name="color_green">grænn</string>
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 33144e5..53824b7 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -91,7 +91,6 @@
<string name="pref_wifilock_title">Mantieni Wi-Fi attivo</string>
<string name="pref_wifilock_summary">Non spegne la connessione Wi-Fi quando una sessione è attiva</string>
<string name="pref_bumpyarrows_title">Vibrazione frecce</string>
- <string name="pref_bumpyarrows_summary">Vibra quando si inviano movimenti con la trackball; utile per connessioni lente</string>
<string name="pref_bell_category">Campanella del terminale</string>
<string name="pref_bell_title">Campanella udibile</string>
<string name="pref_bell_volume_title">Volume della campanella</string>
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index ffe5bfd..2c2bdbb 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -9,6 +9,8 @@
<string name="title_help">ヘルプ</string>
<string name="title_colors">配色</string>
<string name="title_color_picker">色の取得</string>
+ <string name="title_settings">設定</string>
+ <string name="title_pubkey_generate">生成</string>
<string name="resolve_connect">接続</string>
<string name="resolve_entropy">エントロピーの取得</string>
<string name="menu_insert">ホストを追加</string>
@@ -17,6 +19,10 @@
<string name="help_intro">特定の情報について知りたいときは、以下のトピックを選択してください。</string>
<string name="help_about">ConnectBotについて</string>
<string name="help_keyboard">キーボード</string>
+ <string name="terms_and_conditions">利用規約</string>
+ <string name="keyboard_shortcuts">キーボードショートカット</string>
+ <string name="increase_font_size">フォントサイズを大きくする</string>
+ <string name="decrease_font_size">フォントサイズを小さくする</string>
<string name="pubkey_generate">生成</string>
<string name="pubkey_delete">鍵を削除</string>
<string name="pubkey_gather_entropy">エントロピー収集中</string>
@@ -62,6 +68,7 @@
<string name="alert_key_corrupted_msg">秘密鍵が壊れています!</string>
<string name="alert_sdcard_absent">SD カードが挿入されていません.</string>
<string name="button_add">追加</string>
+ <string name="button_cancel">キャンセル</string>
<string name="button_change">変更</string>
<string name="button_generate">鍵生成</string>
<string name="button_resize">リサイズ</string>
@@ -102,7 +109,6 @@
<string name="pref_wifilock_title">Wi-Fiをスリープしない</string>
<string name="pref_wifilock_summary">セッションが有効な間Wi-FiがOFFになるのを防ぎます</string>
<string name="pref_bumpyarrows_title">矢印で振動</string>
- <string name="pref_bumpyarrows_summary">トラックボールで矢印キーを送信するときに振動します; ラグがある接続時に便利</string>
<string name="pref_bell_category">端末音設定</string>
<string name="pref_bell_title">ベル音</string>
<string name="pref_bell_volume_title">ボリューム設定</string>
@@ -182,6 +188,9 @@
<string name="delete_message">\'%1$s\'を削除してよろしいですか?</string>
<string name="delete_pos">はい、削除します</string>
<string name="delete_neg">キャンセル</string>
+ <string name="disconnect_all_message">接続されたホストをすべて切断してもよろしいですか?</string>
+ <string name="disconnect_all_pos">はい、切断します</string>
+ <string name="disconnect_all_neg">キャンセル</string>
<string name="terminal_no_hosts_connected">接続済みのホストはありません.</string>
<string name="terminal_connecting">%1$s:%2$dに%3$sで接続しています</string>
<string name="terminal_sucess">ホスト\'%1$s\' キー%2$s を検証しました</string>
@@ -220,5 +229,29 @@
<string name="image_description_key_is_locked">キーがロックされました。</string>
<string name="image_description_toggle_control_character">コントロール文字を切り替えます。</string>
<string name="image_description_send_escape_character">エスケープ文字を送信します。</string>
+ <string name="image_description_send_tab_character">Tabキーを送信します。</string>
<string name="image_description_show_keyboard">キーボードを表示します。</string>
+ <string name="image_description_up">上矢印</string>
+ <string name="image_description_down">下矢印</string>
+ <string name="image_description_left">左矢印</string>
+ <string name="image_description_right">右矢印</string>
+ <string name="button_key_esc">Esc</string>
+ <string name="button_key_ctrl">Ctrl</string>
+ <string name="button_key_tab">Tab</string>
+ <string name="button_key_home">Home</string>
+ <string name="button_key_end">End</string>
+ <string name="button_key_pgup">PgUp</string>
+ <string name="button_key_pgdn">PgDn</string>
+ <string name="button_key_f1">F1</string>
+ <string name="button_key_f2">F2</string>
+ <string name="button_key_f3">F3</string>
+ <string name="button_key_f4">F4</string>
+ <string name="button_key_f5">F5</string>
+ <string name="button_key_f6">F6</string>
+ <string name="button_key_f7">F7</string>
+ <string name="button_key_f8">F8</string>
+ <string name="button_key_f9">F9</string>
+ <string name="button_key_f10">F10</string>
+ <string name="button_key_f11">F11</string>
+ <string name="button_key_f12">F12</string>
</resources>
diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml
index bd33a12..6305e9f 100644
--- a/app/src/main/res/values-ko/strings.xml
+++ b/app/src/main/res/values-ko/strings.xml
@@ -82,7 +82,6 @@
<string name="pref_wifilock_title">Wi-Fi 켜짐 유지</string>
<string name="pref_wifilock_summary">세션이 유효한 동안 Wi-Fi가 꺼지지 않도록 함</string>
<string name="pref_bumpyarrows_title">방향키 진동</string>
- <string name="pref_bumpyarrows_summary">트랙볼로 방향키를 보낼 때 진동합니다; 연결이 느린 경우 유용</string>
<string name="pref_bell_category">터미널 벨</string>
<string name="pref_bell_title">벨소리</string>
<string name="pref_bell_volume_title">벨 볼륨</string>
diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml
index c7351e5..78b3c49 100644
--- a/app/src/main/res/values-nb/strings.xml
+++ b/app/src/main/res/values-nb/strings.xml
@@ -89,7 +89,6 @@
<string name="pref_wifilock_title">Hold Wi-Fi aktiv</string>
<string name="pref_wifilock_summary">Hindre Wi-Fi å koble fra når en økt er aktiv</string>
<string name="pref_bumpyarrows_title">Vibrerende piler</string>
- <string name="pref_bumpyarrows_summary">Vibrer når pilkommandoer sendes med styrekule; nyttig for trege forbindelser</string>
<string name="pref_bell_category">Terminalklokke</string>
<string name="pref_bell_title">Varselklokke</string>
<string name="pref_bell_volume_title">Klokkevolum</string>
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index 01a64ae..251cdc0 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -89,7 +89,6 @@
<string name="pref_wifilock_title">Houd Wi-Fi actief</string>
<string name="pref_wifilock_summary">Voorkom Wi-Fi van uitgaan wanneer er een sessie actief is</string>
<string name="pref_bumpyarrows_title">Hobbelige pijlen</string>
- <string name="pref_bumpyarrows_summary">Tril als pijl knoppen worden gestuurd van trackball; handig voor langzame verbindingen</string>
<string name="pref_bell_category">Terminal bel</string>
<string name="pref_bell_title">Hoorbare bel</string>
<string name="pref_bell_volume_title">Bel volume</string>
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index 8775a89..e2e0c9d 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -91,7 +91,6 @@
<string name="pref_wifilock_title">Wstrzymaj usypianie Wi-Fi</string>
<string name="pref_wifilock_summary">Wstrzymaj usypianie Wi-Fi gdy sesja jest aktywna</string>
<string name="pref_bumpyarrows_title">Podskakujące strzałki</string>
- <string name="pref_bumpyarrows_summary">Wibruj kiedy emulowane są klawisze strzałek; użyteczne dla wolnych połączeń</string>
<string name="pref_bell_category">Brzęczyk terminalu</string>
<string name="pref_bell_title">Brzęczyk słyszalny</string>
<string name="pref_bell_volume_title">Głośność brzęczyka</string>
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index bfdeb96..ae2477f 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -91,7 +91,6 @@
<string name="pref_wifilock_title">Manter a rede Wi-Fi ativo</string>
<string name="pref_wifilock_summary">Evitar que a rede Wi-Fi seja desligada quando alguma sesão está ativa</string>
<string name="pref_bumpyarrows_title">Feedback de rolagem</string>
- <string name="pref_bumpyarrows_summary">Vibrar quando pressionar o botão principal (trackball)</string>
<string name="pref_bell_category">Alerta do terminal</string>
<string name="pref_bell_title">Alerta audível</string>
<string name="pref_bell_volume_title">Volume dos alerta</string>
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index eddd87b..d8c0c91 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -89,7 +89,6 @@
<string name="pref_wifilock_title">Manter Wi-Fi activo</string>
<string name="pref_wifilock_summary">Evitar que o Wi-Fi desligue quando uma sessão está activa</string>
<string name="pref_bumpyarrows_title">Cursores com vibração</string>
- <string name="pref_bumpyarrows_summary">Vibrar quando enviar teclas de cursor com a trackball; útil para ligações com atraso</string>
<string name="pref_bell_category">Aviso sonoro do terminal</string>
<string name="pref_bell_title">Aviso sonoro audível</string>
<string name="pref_bell_volume_title">Volume do aviso sonoro</string>
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 52ac1d1..1b14ad7 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -92,7 +92,6 @@
<string name="pref_wifilock_title">Держать Wi-Fi включенным</string>
<string name="pref_wifilock_summary">Препятствовать отключению Wi-Fi при активном сеансе</string>
<string name="pref_bumpyarrows_title">Настройки обратной связи при нажатии</string>
- <string name="pref_bumpyarrows_summary">Вибросигнал при передаче клавиш управления курсором с трекбола; полезно при медленном соединении</string>
<string name="pref_bell_category">Настройки звукового сигнала в терминале</string>
<string name="pref_bell_title">Включить звонок</string>
<string name="pref_bell_volume_title">Громкость сигнала</string>
diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml
index a0c0f2c..dd321d1 100644
--- a/app/src/main/res/values-sk/strings.xml
+++ b/app/src/main/res/values-sk/strings.xml
@@ -89,7 +89,6 @@
<string name="pref_wifilock_title">Ponechať Wi-Fi aktívne</string>
<string name="pref_wifilock_summary">Ponechať Wi-Fi aktívne pokiaľ je otvorené spojenie</string>
<string name="pref_bumpyarrows_title">Hrboľaté šípky</string>
- <string name="pref_bumpyarrows_summary">Vibrovať pri posielaní kurzorových tlačidiel z trackballu; užitočné pre chybové spojenia</string>
<string name="pref_bell_category">Zvonček terminálu</string>
<string name="pref_bell_title">Akustický zvonček</string>
<string name="pref_bell_volume_title">Hlasitosť zvončeka</string>
diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml
index 669610a..2504470 100644
--- a/app/src/main/res/values-sr/strings.xml
+++ b/app/src/main/res/values-sr/strings.xml
@@ -102,7 +102,6 @@
<string name="pref_wifilock_title">Држи бежични активним</string>
<string name="pref_wifilock_summary">Спречи искључивање бежичног кад је сесија активна</string>
<string name="pref_bumpyarrows_title">Џомбасте стрелице</string>
- <string name="pref_bumpyarrows_summary">Вибрирај по слању тастера стрелице са трекбола; корисно при спорим везама</string>
<string name="pref_bell_category">Звоно терминала</string>
<string name="pref_bell_title">Звучно звоно</string>
<string name="pref_bell_volume_title">Јачина звука звона</string>
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index e924523..d68673d 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -89,7 +89,6 @@
<string name="pref_wifilock_title">Håll trådlöst nätverk aktivt</string>
<string name="pref_wifilock_summary">Hindra att trådlöst nätverk slås av under en aktiv session</string>
<string name="pref_bumpyarrows_title">Aktiva piltangenter</string>
- <string name="pref_bumpyarrows_summary">Vibrera när piltangenter sänds från pekdon; bra för långsamma anslutningar</string>
<string name="pref_bell_category">Terminal-ljud</string>
<string name="pref_bell_title">Aktivt</string>
<string name="pref_bell_volume_title">Ljudvolym</string>
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index 4177a14..d4db960 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -91,7 +91,6 @@
<string name="pref_wifilock_title">Wi-Fi etkin tut</string>
<string name="pref_wifilock_summary">Bir oturum etkinken Wi-Fi kapanmasını engelle</string>
<string name="pref_bumpyarrows_title">dalgalı oklar</string>
- <string name="pref_bumpyarrows_summary">Okları izotop ile kullanırken titret; düşük bağlantılar için kullanışlıdır</string>
<string name="pref_bell_category">Terminal zili</string>
<string name="pref_bell_title">Sesli zil</string>
<string name="pref_bell_volume_title">Zil ses düzeyi</string>
diff --git a/app/src/main/res/values-v11/styles.xml b/app/src/main/res/values-v11/styles.xml
index 79f9633..37c3f6e 100644
--- a/app/src/main/res/values-v11/styles.xml
+++ b/app/src/main/res/values-v11/styles.xml
@@ -25,16 +25,23 @@
</style>
<style name="ListItemFirstLineText" parent="TextAppearance.AppCompat">
+ <item name="android:layout_alignParentTop">true</item>
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:textSize">16sp</item>
+ <item name="android:paddingTop">20dp</item>
+ <item name="android:layout_alignParentLeft">true</item>
</style>
<style name="ListItemSecondLineText" parent="TextAppearance.AppCompat">
+ <item name="android:layout_alignParentBottom">true</item>
<item name="android:textColor">?android:textColorSecondary</item>
<item name="android:textSize">14sp</item>
+ <item name="android:paddingBottom">20dp</item>
+ <item name="android:layout_alignParentLeft">true</item>
</style>
- <style name="SelectableItem">
- <item name="android:background">?android:attr/selectableItemBackground</item>
- </style>
+ <style name="SelectableItem">
+ <item name="android:background">?android:attr/selectableItemBackground</item>
+ </style>
+
</resources>
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 8a984e6..32be755 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -9,6 +9,8 @@
<string name="title_help">帮助</string>
<string name="title_colors">颜色</string>
<string name="title_color_picker">选取一种颜色</string>
+ <string name="title_settings">设置</string>
+ <string name="title_pubkey_generate">生成</string>
<string name="resolve_connect">连接</string>
<string name="resolve_entropy">收集熵</string>
<string name="menu_insert">添加主机</string>
@@ -17,6 +19,10 @@
<string name="help_intro">请在下面主题中选择一个以查看更多内容</string>
<string name="help_about">关于ConnectBot</string>
<string name="help_keyboard">键盘</string>
+ <string name="terms_and_conditions">条款与条件</string>
+ <string name="keyboard_shortcuts">键盘快捷键</string>
+ <string name="increase_font_size">增加字体大小</string>
+ <string name="decrease_font_size">减少字体大小</string>
<string name="pubkey_generate">生成</string>
<string name="pubkey_delete">删除密钥</string>
<string name="pubkey_gather_entropy">正在收集熵</string>
@@ -62,6 +68,7 @@
<string name="alert_key_corrupted_msg">私钥似乎已损坏!</string>
<string name="alert_sdcard_absent">没有插入SD卡!</string>
<string name="button_add">添加</string>
+ <string name="button_cancel">取消</string>
<string name="button_change">修改</string>
<string name="button_generate">生成密钥</string>
<string name="button_resize">改变窗口大小</string>
@@ -102,7 +109,6 @@
<string name="pref_wifilock_title">保持WI-FI激活</string>
<string name="pref_wifilock_summary">会话运行时禁止Wi-Fi关闭</string>
<string name="pref_bumpyarrows_title">触摸反馈</string>
- <string name="pref_bumpyarrows_summary">轨迹球发出模拟方向键时振动; (对滞后连接特别有用)</string>
<string name="pref_bell_category">终端响铃</string>
<string name="pref_bell_title">响铃</string>
<string name="pref_bell_volume_title">铃声音量</string>
@@ -182,6 +188,9 @@
<string name="delete_message">确定要删除\'%1$s\'吗?</string>
<string name="delete_pos">是,删除</string>
<string name="delete_neg">取消</string>
+ <string name="disconnect_all_message">你确定你要断开所有连接的主机?</string>
+ <string name="disconnect_all_pos">是的,断开</string>
+ <string name="disconnect_all_neg">取消</string>
<string name="terminal_no_hosts_connected">当前没有连接主机</string>
<string name="terminal_connecting">正在通过%3$s连接到 %1$s:%2$d</string>
<string name="terminal_sucess">验证主机 %1$s 键值: %2$s</string>
@@ -222,4 +231,27 @@
<string name="image_description_send_escape_character">发送转义字符。</string>
<string name="image_description_send_tab_character">发送TAB键。</string>
<string name="image_description_show_keyboard">显示键盘。</string>
+ <string name="image_description_up">向上的箭头</string>
+ <string name="image_description_down">向下的箭头</string>
+ <string name="image_description_left">向左的箭头</string>
+ <string name="image_description_right">向右的箭头</string>
+ <string name="button_key_esc">Esc</string>
+ <string name="button_key_ctrl">Ctrl</string>
+ <string name="button_key_tab">Tab</string>
+ <string name="button_key_home">Home</string>
+ <string name="button_key_end">End</string>
+ <string name="button_key_pgup">PgUp</string>
+ <string name="button_key_pgdn">PgDn</string>
+ <string name="button_key_f1">F1</string>
+ <string name="button_key_f2">F2</string>
+ <string name="button_key_f3">F3</string>
+ <string name="button_key_f4">F4</string>
+ <string name="button_key_f5">F5</string>
+ <string name="button_key_f6">F6</string>
+ <string name="button_key_f7">F7</string>
+ <string name="button_key_f8">F8</string>
+ <string name="button_key_f9">F9</string>
+ <string name="button_key_f10">F10</string>
+ <string name="button_key_f11">F11</string>
+ <string name="button_key_f12">F12</string>
</resources>
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index ee92ad7..9632700 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -102,7 +102,6 @@
<string name="pref_wifilock_title">保持 Wi-Fi 連線</string>
<string name="pref_wifilock_summary">連線階段未結束前,避免 Wi-Fi 關閉</string>
<string name="pref_bumpyarrows_title">觸覺方向鍵</string>
- <string name="pref_bumpyarrows_summary">當用軌跡球發出模擬方向鍵時振動; 對延遲連線特別有用</string>
<string name="pref_bell_category">終端鈴聲</string>
<string name="pref_bell_title">響鈴</string>
<string name="pref_bell_volume_title">鈴聲音量</string>
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..1698002
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ ConnectBot: simple, powerful, open-source SSH client for Android
+ ~ Copyright 2015 Kenny Root, Jeffrey Sharkey
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources>
+ <dimen name="list_item_text_margin_left">72dp</dimen>
+ <dimen name="list_item_left_right_padding">16dp</dimen>
+ <dimen name="list_item_top_bottom_padding">20dp</dimen>
+ <dimen name="list_item_first_line_text_size">16sp</dimen>
+ <dimen name="list_item_second_line_text_size">14sp</dimen>
+</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 445d894..b087bfd 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -655,5 +655,11 @@
<string name="pubkey_add_new">Add new pubkey</string>
<!-- Text for button which, when clicked, brings up picker to import an existing pubkey. -->
<string name="pubkey_import_existing">Import existing pubkey</string>
+ <!-- Text for dialog which explains that the host URI is invalid and asks to discard. -->
+ <string name="discard_host_changes_message">Host URI is invalid. Would you like to discard changes?</string>
+ <!-- Text for button which discards changes to the host. -->
+ <string name="discard_host_button">Discard</string>
+ <!-- Text for button which does not discard changes and keeps editing. -->
+ <string name="discard_host_cancel_button">Keep editing</string>
</resources>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index af3bd79..f782fb4 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -16,7 +16,7 @@
~ limitations under the License.
*/
-->
-<resources>
+<resources xmlns:tools="http://schemas.android.com/tools">
<style name="AppTheme" parent="Theme.AppCompat">
<item name="colorPrimary">@color/primary</item>
@@ -36,14 +36,38 @@
<item name="android:background">@drawable/keyboard_button_selector</item>
</style>
+ <style name="ListItemIcon">
+ <item name="android:layout_marginLeft">@dimen/list_item_left_right_padding</item>
+ <item name="android:layout_marginStart" tools:ignore="NewApi">@dimen/list_item_left_right_padding</item>
+ <item name="android:layout_centerVertical">true</item>
+ <item name="android:layout_alignParentLeft">true</item>
+ <item name="android:layout_alignParentStart" tools:ignore="NewApi">true</item>
+ </style>
+
<style name="ListItemFirstLineText">
+ <item name="android:layout_alignParentTop">true</item>
<item name="android:textColor">?android:textColorPrimary</item>
- <item name="android:textSize">16sp</item>
+ <item name="android:textSize">@dimen/list_item_first_line_text_size</item>
+ <item name="android:paddingTop">@dimen/list_item_top_bottom_padding</item>
+ <item name="android:layout_alignParentLeft">true</item>
+ </style>
+
+ <style name="ListItemFirstLineText.WithIcon" parent="ListItemFirstLineText">
+ <item name="android:layout_marginLeft">@dimen/list_item_text_margin_left</item>
+ <item name="android:layout_marginStart" tools:ignore="NewApi">@dimen/list_item_text_margin_left</item>
</style>
<style name="ListItemSecondLineText">
+ <item name="android:layout_alignParentBottom">true</item>
<item name="android:textColor">?android:textColorSecondary</item>
- <item name="android:textSize">14sp</item>
+ <item name="android:textSize">@dimen/list_item_second_line_text_size</item>
+ <item name="android:paddingBottom">@dimen/list_item_top_bottom_padding</item>
+ <item name="android:layout_alignParentLeft">true</item>
+ </style>
+
+ <style name="ListItemSecondLineText.WithIcon" parent="ListItemSecondLineText">
+ <item name="android:layout_marginLeft">@dimen/list_item_text_margin_left</item>
+ <item name="android:layout_marginStart" tools:ignore="NewApi">@dimen/list_item_text_margin_left</item>
</style>
<style name="ListItemFirstLineText.Red" parent="ListItemFirstLineText">
@@ -77,10 +101,4 @@
<item name="colorAccent">@color/accent</item>
</style>
- <style name="Divider">
- <item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">1dp</item>
- <item name="android:background">?android:attr/listDivider</item>
- </style>
-
</resources>