# HG changeset patch # User Carl Byington # Date 1404349619 25200 # Node ID f0b9ea35711a259ca63ee3790734b64cae7dc82b # Parent 2e4ab8c338519434720133245aadd47c1e99dcf3 read deployment.connections on startup for global preferences also diff -r 2e4ab8c33851 -r f0b9ea35711a res/values/arrays.xml --- a/res/values/arrays.xml Wed Jul 02 16:32:28 2014 -0700 +++ b/res/values/arrays.xml Wed Jul 02 18:06:59 2014 -0700 @@ -57,6 +57,7 @@ @string/list_hwbutton_ctrla @string/list_hwbutton_esc_a @string/list_hwbutton_monitor + @string/list_hwbutton_soft_function_keys @string/list_hwbutton_none @@ -70,6 +71,7 @@ Ctrl+A Esc+A Monitor Key + Soft Function Keypad None diff -r 2e4ab8c33851 -r f0b9ea35711a res/values/strings.xml --- a/res/values/strings.xml Wed Jul 02 16:32:28 2014 -0700 +++ b/res/values/strings.xml Wed Jul 02 18:06:59 2014 -0700 @@ -478,6 +478,8 @@ "Esc+A" "Monitor Key" + + "Soft Function Keypad" "None" diff -r 2e4ab8c33851 -r f0b9ea35711a res/xml/preferences.xml --- a/res/xml/preferences.xml Wed Jul 02 16:32:28 2014 -0700 +++ b/res/xml/preferences.xml Wed Jul 02 18:06:59 2014 -0700 @@ -250,7 +250,7 @@ android:title="@string/pref_default_font_size" android:summary="@string/pref_default_font_size_summary" android:defaultValue="0" - android:numeric="integer" + android:numeric="decimal" /> types = new HashMap(); + types.put("memkeys", "boolean"); + types.put("update", "string"); + types.put("connPersist", "boolean"); + types.put("emulation", "string"); + types.put("scrollback", "integer"); + types.put("rotation", "string"); + types.put("shiftfkeys", "boolean"); + types.put("ctrlfkeys", "boolean"); + types.put("volumefont", "boolean"); + types.put("keymode", "string"); + types.put("camera", "string"); + types.put("volup", "string"); + types.put("voldn", "string"); + types.put("search", "string"); + types.put("ptt", "string"); + types.put("keepalive", "boolean"); + types.put("wifilock", "boolean"); + types.put("bumpyarrows", "boolean"); + types.put("extended_longpress", "boolean"); + types.put("ctrl_string", "string"); + types.put("picker_string", "string"); + types.put("picker_keep_open", "boolean"); + types.put("list_custom_keymap", "string"); + types.put("bell", "boolean"); + types.put("bellVolume", "float"); + types.put("bellVibrate", "boolean"); + types.put("bellNotification", "boolean"); + types.put("default_font_size", "float"); + types.put("default_fsize_width", "integer"); + types.put("default_fsize_height", "integer"); + types.put("screen_capture_folder", "string"); + types.put("screen_capture_popup", "boolean"); + types.put("file_dialog", "string"); + types.put("download_folder", "string"); + types.put("remote_upload_folder", "string"); + types.put("upload_dest_prompt", "boolean"); + types.put("background_file_transfer", "boolean"); + types.put("debug_keycodes", "boolean"); + for (String key : values.keySet()) { + if (types.containsKey(key)) { + Char stype = types.get(key)[0]; + switch (stype) { + case 'b': + editor.putBoolean(values.getAsBoolean(key); + break; + + case 'i': + editor.putInteger(values.getAsInteger(key)); + break; + + case 'f': + editor.putFloat(values.getAsFloat(key)); + break; + + case 's': + editor.putString(values.getAsString(key)) + break; + } + } + } + editor.commit(); } - host = TransportFactory.findHost(hostdb, uri); - if (host == null) continue; - if (values == null) continue; - SQLiteDatabase db = hostdb.getWritableDatabase(); - db.update(HostDatabase.TABLE_HOSTS, values, "_id = ?", new String[] { String.valueOf(host.getId()) }); - db.close(); + else { + HostBean host = TransportFactory.findHost(hostdb, uri); + if (host == null) { + host = TransportFactory.getTransport(uri.getScheme()).createHost(uri); + host.setColor(HostDatabase.COLOR_GRAY); + host.setPubkeyId(HostDatabase.PUBKEYID_ANY); + hostdb.saveHost(host); + } + host = TransportFactory.findHost(hostdb, uri); + if (host == null) continue; + if (values == null) continue; + SQLiteDatabase db = hostdb.getWritableDatabase(); + db.update(HostDatabase.TABLE_HOSTS, values, "_id = ?", new String[] { String.valueOf(host.getId()) }); + db.close(); + } } reader.close(); (new File(fn)).delete();