changeset 88:1c22e6a7efff

convert ctrl keys to virtual keys; use proper android home directory
author Carl Byington <carl@five-ten-sg.com>
date Mon, 16 Jun 2014 12:26:51 -0700
parents 1bc2229562f8
children bb27518ac2e9
files src/com/five_ten_sg/connectbot/HostEditorActivity.java src/com/five_ten_sg/connectbot/bean/HostBean.java
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/HostEditorActivity.java	Mon Jun 16 12:02:26 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/HostEditorActivity.java	Mon Jun 16 12:26:51 2014 -0700
@@ -263,7 +263,7 @@
         this.addPreferencesFromResource(R.xml.host_prefs);
 
         // disable all preferences that are not applicable to this host
-        findPreference(HostDatabase.FIELD_HOST_USEKEYS).setEnabled(enableSSHFeatures);
+        findPreference(HostDatabase.FIELD_HOST_PUBKEYID).setEnabled(enableSSHFeatures);
         findPreference(HostDatabase.FIELD_HOST_USEAUTHAGENT).setEnabled(enableSSHFeatures);
         findPreference(HostDatabase.FIELD_HOST_COMPRESSION).setEnabled(enableSSHFeatures);
         findPreference(HostDatabase.FIELD_HOST_HTTPPROXY).setEnabled(enableAsyncFeatures);
@@ -278,7 +278,7 @@
         // add all existing pubkeys to our listpreference for user to choose from
         // TODO: may be an issue here when this activity is recycled after adding a new pubkey
         // TODO: should consider moving into onStart, but we dont have a good way of resetting the listpref after filling once
-        ListPreference pubkeyPref = (ListPreference)this.findPreference(HostDatabase.FIELD_HOST_PUBKEYID);
+        ListPreference pubkeyPref = (ListPreference)findPreference(HostDatabase.FIELD_HOST_PUBKEYID);
         List<CharSequence> pubkeyNicks = new LinkedList<CharSequence> (Arrays.asList(pubkeyPref.getEntries()));
         pubkeyNicks.addAll(pubkeydb.allValues(PubkeyDatabase.FIELD_PUBKEY_NICKNAME));
         pubkeyPref.setEntries(pubkeyNicks.toArray(new CharSequence[pubkeyNicks.size()]));
@@ -286,7 +286,7 @@
         pubkeyIds.addAll(pubkeydb.allValues("_id"));
         pubkeyPref.setEntryValues(pubkeyIds.toArray(new CharSequence[pubkeyIds.size()]));
         // Populate the character set encoding list with all available
-        final ListPreference charsetPref = (ListPreference) findPreference(HostDatabase.FIELD_HOST_ENCODING);
+        final ListPreference charsetPref = (ListPreference)findPreference(HostDatabase.FIELD_HOST_ENCODING);
 
         if (CharsetHolder.isInitialized()) {
             initCharsetPref(charsetPref);
--- a/src/com/five_ten_sg/connectbot/bean/HostBean.java	Mon Jun 16 12:02:26 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/bean/HostBean.java	Mon Jun 16 12:26:51 2014 -0700
@@ -74,15 +74,15 @@
     }
 
     public boolean isSSH() {
-        return (protocol == "ssh");
+        return protocol.equals("ssh");
     }
 
     public boolean is5250() {
-        return (protocol == "tn5250");
+        return protocol.equals("tn5250");
     }
 
     public boolean isTelnet() {
-        return (protocol == "telnet");
+        return protocol.equals("telnet");
     }
 
     public boolean isAsync() {