diff options
author | Jeffrey Sharkey <jsharkey@jsharkey.org> | 2008-10-22 14:07:07 +0000 |
---|---|---|
committer | Jeffrey Sharkey <jsharkey@jsharkey.org> | 2008-10-22 14:07:07 +0000 |
commit | 23df08aaeaa5bdf0519442072aad7e5521939407 (patch) | |
tree | 7c1d8b03160c5b368665a8fcdf3251a269a3b7ad /src/org | |
parent | 821511ea7e1a3137ae57a75068e7676bb2f22d1b (diff) | |
download | connectbot-23df08aaeaa5bdf0519442072aad7e5521939407.tar.gz connectbot-23df08aaeaa5bdf0519442072aad7e5521939407.tar.bz2 connectbot-23df08aaeaa5bdf0519442072aad7e5521939407.zip |
* now updating cursor once we delete host
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/connectbot/HostList.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/org/connectbot/HostList.java b/src/org/connectbot/HostList.java index d1d1f13..393fdaa 100644 --- a/src/org/connectbot/HostList.java +++ b/src/org/connectbot/HostList.java @@ -90,6 +90,13 @@ public class HostList extends Activity { }; + public Handler updateHandler = new Handler() { + @Override + public void handleMessage(Message msg) { + HostList.this.updateCursor(); + } + }; + public TerminalManager bound = null; private ServiceConnection connection = new ServiceConnection() { @@ -413,14 +420,14 @@ public class HostList extends Activity { // edit, disconnect, delete // TODO: change disconnect/connect based on status - MenuItem connect = menu.add(0, 0, Menu.NONE, "Disconnect"); + MenuItem connect = menu.add("Disconnect"); connect.setOnMenuItemClickListener(new OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { return false; } }); - MenuItem edit = menu.add(0, 0, Menu.NONE, "Edit host"); + MenuItem edit = menu.add("Edit host"); edit.setOnMenuItemClickListener(new OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { Intent intent = new Intent(HostList.this, HostEditor.class); @@ -430,10 +437,11 @@ public class HostList extends Activity { } }); - MenuItem delete = menu.add(0, 0, Menu.NONE, "Delete host"); + MenuItem delete = menu.add("Delete host"); delete.setOnMenuItemClickListener(new OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { hostdb.deleteHost(id); + updateHandler.sendEmptyMessage(-1); return false; } }); |