Mercurial > 510Connectbot
comparison src/com/five_ten_sg/connectbot/HostEditorActivity.java @ 114:5eda34fb607f
host editor database values override summary text only if non-empty
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 18 Jun 2014 14:34:02 -0700 |
parents | 77ac18bc1b2f |
children | 91f80da38f96 |
comparison
equal
deleted
inserted
replaced
113:cb3b9b660b3d | 114:5eda34fb607f |
---|---|
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 | 337 // for all text preferences, set hint as current database value if not empty |
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 | |
341 if (key.equals(HostDatabase.FIELD_HOST_EMULATION)) continue; | |
342 | |
343 if (key.equals(HostDatabase.FIELD_HOST_MONITOR)) continue; | |
344 | |
345 Preference pref = this.findPreference(key); | 339 Preference pref = this.findPreference(key); |
346 | 340 |
347 if (pref == null) continue; | 341 if (pref == null) continue; |
348 | 342 |
349 if (pref instanceof CheckBoxPreference) continue; | 343 if (pref instanceof CheckBoxPreference) continue; |
373 | 367 |
374 if (entryIndex >= 0) | 368 if (entryIndex >= 0) |
375 value = listPref.getEntries()[entryIndex]; | 369 value = listPref.getEntries()[entryIndex]; |
376 } | 370 } |
377 | 371 |
378 pref.setSummary(value); | 372 String v = (String)value; |
373 if (v.length() == 0) pref.setSummary(value); | |
379 } | 374 } |
380 } | 375 } |
381 | 376 |
382 private void initCharsetPref(final ListPreference charsetPref) { | 377 private void initCharsetPref(final ListPreference charsetPref) { |
383 charsetPref.setEntryValues(CharsetHolder.getCharsetIds()); | 378 charsetPref.setEntryValues(CharsetHolder.getCharsetIds()); |