Mercurial > 510Connectbot
comparison src/com/five_ten_sg/connectbot/HostEditorActivity.java @ 118:9c0aaf27ce28
host editor database values override summary text
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 18 Jun 2014 16:53:58 -0700 |
parents | 91f80da38f96 |
children | 446dbcf606eb |
comparison
equal
deleted
inserted
replaced
117:91f80da38f96 | 118:9c0aaf27ce28 |
---|---|
332 this.pubkeydb = null; | 332 this.pubkeydb = null; |
333 } | 333 } |
334 } | 334 } |
335 | 335 |
336 private void updateSummaries() { | 336 private void updateSummaries() { |
337 // for all text preferences, set hint as current database value if not empty | 337 // for all text preferences, set hint as current database value |
338 for (String key : this.pref.values.keySet()) { | 338 for (String key : this.pref.values.keySet()) { |
339 if (key.equals(HostDatabase.FIELD_HOST_POSTLOGIN)) continue; | |
340 if (key.equals(HostDatabase.FIELD_HOST_EMULATION)) continue; | |
341 if (key.equals(HostDatabase.FIELD_HOST_MONITOR)) continue; | |
342 | |
339 Preference pref = this.findPreference(key); | 343 Preference pref = this.findPreference(key); |
340 | 344 |
341 if (pref == null) continue; | 345 if (pref == null) continue; |
342 | 346 |
343 if (pref instanceof CheckBoxPreference) continue; | 347 if (pref instanceof CheckBoxPreference) continue; |
367 | 371 |
368 if (entryIndex >= 0) | 372 if (entryIndex >= 0) |
369 value = listPref.getEntries()[entryIndex]; | 373 value = listPref.getEntries()[entryIndex]; |
370 } | 374 } |
371 | 375 |
372 String v = (String)value; | 376 pref.setSummary(value); |
373 if ((v != null) && (v.length() > 0)) pref.setSummary(value); | |
374 } | 377 } |
375 } | 378 } |
376 | 379 |
377 private void initCharsetPref(final ListPreference charsetPref) { | 380 private void initCharsetPref(final ListPreference charsetPref) { |
378 charsetPref.setEntryValues(CharsetHolder.getCharsetIds()); | 381 charsetPref.setEntryValues(CharsetHolder.getCharsetIds()); |