changeset 473:ece82b571900

add fg/bg color setting to global:// section of deployment.connections file
author Carl Byington <carl@five-ten-sg.com>
date Sun, 20 Oct 2019 14:05:29 -0700
parents 9ff443085f00
children e5f8d879543f
files app/src/main/AndroidManifest.xml app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java deployment.connections xml/510connectbot.in
diffstat 4 files changed, 28 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/src/main/AndroidManifest.xml	Sat Oct 05 08:24:18 2019 -0700
+++ b/app/src/main/AndroidManifest.xml	Sun Oct 20 14:05:29 2019 -0700
@@ -17,8 +17,8 @@
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 	package="com.five_ten_sg.connectbot"
-	android:versionName="1.9.3-8"
-	android:versionCode="1938"
+	android:versionName="1.9.3-9"
+	android:versionCode="1939"
 	android:installLocation="auto">
 
     <!--  permissions must match HostListActivity.java -->
--- a/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java	Sat Oct 05 08:24:18 2019 -0700
+++ b/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java	Sun Oct 20 14:05:29 2019 -0700
@@ -434,6 +434,9 @@
         Uri launch = null;
         try {
             boolean del = true;
+            int[] c = hostdb.getGlobalDefaultColors();
+            int fg = c[0];
+            int bg = c[1];
             String fn = Environment.getExternalStorageDirectory().getAbsolutePath() +
                         File.separator + "deployment.connections";
             BufferedReader reader = new BufferedReader(new FileReader(fn));
@@ -470,8 +473,19 @@
                         String sv = values.getAsString(dd);
                         del = Boolean.parseBoolean(sv);
                     }
+                    dd = "fg_color"
+                    if (values.containsKey(dd) {
+                        String sv = values.getAsString(dd);
+                        fg = Integer.parseInt(sv);
+                    }
+                    dd = "bg_color";
+                    if (values.containsKey(dd) {
+                        String sv = values.getAsString(dd);
+                        bg = Integer.parseInt(sv);
+                    }
                     Editor editor = prefs.edit();
                     HashMap<String, String> types = new HashMap<String, String>();
+                    HashMap<String, String> types2 = new HashMap<String, String>();
                     types.put("memkeys", "boolean");
                     types.put("connPersist", "boolean");
                     types.put("emulation", "string");
@@ -556,6 +570,7 @@
 
             reader.close();
             if (del) (new File(fn)).delete();
+            hostdb.setDefaultColorsForScheme(hostdb.DEFAULT_COLOR_SCHEME, fg, bg);
         }
         catch (Exception e) {
             Log.d(TAG, "Deployment scan failed.");
--- a/deployment.connections	Sat Oct 05 08:24:18 2019 -0700
+++ b/deployment.connections	Sun Oct 20 14:05:29 2019 -0700
@@ -28,9 +28,10 @@
 # wantx11forward    (boolean)
 # x11host           (string)
 # x11port           (integer)
+# autolaunch        (boolean)
 
 
-tn5250://pub1.rzkh.de:23#battleship
+tn5250://pub400.com:23#battleship
     encryption5250=NONE
     fontsize=20
     fixed_size=true
@@ -77,6 +78,9 @@
 #   upload_dest_prompt          (boolean)
 #   background_file_transfer    (boolean)
 #   debug_keycodes              (boolean)
+#   delete_deployment           (boolean)
+#   fg_color                    (integer)   (1 based just as shown by color activity)
+#   bg_color                    (integer)   (1 based just as shown by color activity)
 #
 
 global://
@@ -89,6 +93,8 @@
     search=None
     ptt=Monitor Key
     eula=true
+    fg_color=11
+    bg_color=1
 
 #
 # end
--- a/xml/510connectbot.in	Sat Oct 05 08:24:18 2019 -0700
+++ b/xml/510connectbot.in	Sun Oct 20 14:05:29 2019 -0700
@@ -479,6 +479,8 @@
 #   background_file_transfer    (boolean)
 #   debug_keycodes              (boolean)
 #   delete_deployment           (boolean)
+#   fg_color                    (integer)   (1 based just as shown by color activity)
+#   bg_color                    (integer)   (1 based just as shown by color activity)
 #
 
 global://
@@ -491,6 +493,8 @@
     search=None
     ptt=Monitor Key
     eula=true
+    fg_color=11
+    bg_color=1
 
 #
 # end