Mercurial > 510Connectbot
comparison src/com/five_ten_sg/connectbot/HostListActivity.java @ 364:fe0fbcf55ed9
allow eula agreement to be set from deployment.connections
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 04 Aug 2014 09:29:54 -0700 |
parents | 5b0636e6a910 |
children |
comparison
equal
deleted
inserted
replaced
363:5b0636e6a910 | 364:fe0fbcf55ed9 |
---|---|
430 Editor editor = prefs.edit(); | 430 Editor editor = prefs.edit(); |
431 HashMap<String, String> types = new HashMap<String, String>(); | 431 HashMap<String, String> types = new HashMap<String, String>(); |
432 types.put("memkeys", "boolean"); | 432 types.put("memkeys", "boolean"); |
433 types.put("connPersist", "boolean"); | 433 types.put("connPersist", "boolean"); |
434 types.put("emulation", "string"); | 434 types.put("emulation", "string"); |
435 types.put("scrollback", "integer"); | 435 types.put("scrollback", "string"); |
436 types.put("rotation", "string"); | 436 types.put("rotation", "string"); |
437 types.put("shiftfkeys", "boolean"); | 437 types.put("shiftfkeys", "boolean"); |
438 types.put("ctrlfkeys", "boolean"); | 438 types.put("ctrlfkeys", "boolean"); |
439 types.put("keymode", "string"); | 439 types.put("keymode", "string"); |
440 types.put("camera", "string"); | 440 types.put("camera", "string"); |
464 types.put("background_file_transfer", "boolean"); | 464 types.put("background_file_transfer", "boolean"); |
465 types.put("debug_keycodes", "boolean"); | 465 types.put("debug_keycodes", "boolean"); |
466 | 466 |
467 for (String key : values.keySet()) { | 467 for (String key : values.keySet()) { |
468 if (types.containsKey(key)) { | 468 if (types.containsKey(key)) { |
469 String t = types.get(key); | |
469 String sv = values.getAsString(key); | 470 String sv = values.getAsString(key); |
470 editor.putString(key, sv); | 471 if (t.equals("float")) { |
472 editor.putFloat(key, Float.parseFloat(sv)); | |
473 } | |
474 else if (t.equals("boolean")) { | |
475 editor.putBoolean(key, Boolean.parseBoolean(sv)); | |
476 } | |
477 else if (t.equals("string")) { | |
478 editor.putString(key, sv); | |
479 } | |
471 } | 480 } |
472 } | 481 } |
473 | 482 |
474 editor.commit(); | 483 editor.commit(); |
475 } | 484 } |