From 90dc1ecd26baafe84633e5cf7afd1ff6c9a3d1e0 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Wed, 29 Oct 2008 18:41:18 +0000 Subject: * Add ports to the end of nicknames created for hosts added by quick-connect with non-default ports. --- src/org/connectbot/HostListActivity.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/org/connectbot/HostListActivity.java b/src/org/connectbot/HostListActivity.java index fc1ef6b..0727230 100644 --- a/src/org/connectbot/HostListActivity.java +++ b/src/org/connectbot/HostListActivity.java @@ -261,9 +261,15 @@ public class HostListActivity extends ListActivity { String username = uri.getUserInfo(); String hostname = uri.getHost(); int port = uri.getPort(); - if(port == -1) port = 22; - String nickname = String.format("%s@%s", username, hostname); + String nickname; + if(port == -1) { + port = 22; + nickname = String.format("%s@%s", username, hostname); + } else { + nickname = String.format("%s@%s:%d", username, hostname, port); + } + hostdb.createHost(null, nickname, username, hostname, port, HostDatabase.COLOR_GRAY); Intent intent = new Intent(HostListActivity.this, ConsoleActivity.class); -- cgit v1.2.3