From 154ed49fd74a9e9a79d5bfcc4b1cdc56ff5cbdbf Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@robotics.uk.to>
Date: Tue, 2 Aug 2016 21:47:34 +0100
Subject: [PATCH] Set an initial qtox ini file

This allows the DHT list to be populated likely before the user opens the app
---
 src/freedombone-config-qtox     | 77 +++++++++++++++++++++++++++++++++
 src/freedombone-image-customise | 16 ++++---
 2 files changed, 86 insertions(+), 7 deletions(-)
 create mode 100644 src/freedombone-config-qtox

diff --git a/src/freedombone-config-qtox b/src/freedombone-config-qtox
new file mode 100644
index 000000000..b7c92ccd9
--- /dev/null
+++ b/src/freedombone-config-qtox
@@ -0,0 +1,77 @@
+[Advanced]
+dbSyncType=2
+
+[Audio]
+audioInDevEnabled=true
+audioOutDevEnabled=true
+inDev=
+inGain=0
+outDev=
+outVolume=100
+
+[Chat]
+chatMessageFont=@Variant(\0\0\0@\0\0\0\x16\0\x44\0\x65\0j\0\x61\0V\0u\0 \0S\0\x61\0n\0s\xbf\xf0\0\0\0\0\0\0\0\0\0\r\x5\x1\0\x32\x10)
+
+[DHT Server]
+dhtServerList\size=88
+useCustomList=true
+
+[GUI]
+dateFormat="dddd, MMMM d, yyyy"
+emojiFontPointSize=16
+firstColumnHandlePos=50
+lightTrayIcon=false
+minimizeOnClose=false
+minimizeToTray=false
+secondColumnHandlePosFromRight=50
+smileyPack=:/smileys/emojione/emoticons.xml
+statusChangeNotificationEnabled=false
+style=Fusion
+themeColor=0
+timestampFormat=hh:mm:ss
+useEmoticons=true
+
+[General]
+autoAwayTime=10
+autoSaveEnabled=false
+autostartInTray=false
+busySound=false
+checkUpdates=true
+closeToTray=false
+currentProfile=data
+dontGroupWindows=true
+enableIPv6=true
+fauxOfflineMessaging=true
+forceTCP=false
+globalAutoAcceptDir=/home/fbone/
+groupAlwaysNotify=false
+groupchatPosition=true
+makeToxPortable=false
+notifySound=true
+proxyAddr=
+proxyPort=0
+proxyType=0
+separateWindow=false
+showInFront=false
+showSystemTray=true
+showWindow=true
+stylePreference=1
+translation=en
+
+[Login]
+autoLogin=true
+
+[State]
+dialogGeometry=@ByteArray()
+dialogSettingsGeometry=@ByteArray()
+dialogSplitterState=@ByteArray()
+splitterState=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0\xff\0\0\x2\b\0\0\0\0\x6\x1\0\0\0\x1\0)
+windowGeometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0\x34\0\0\x3\b\0\0\x1\xf4\0\0\0\x1\0\0\0P\0\0\x3\a\0\0\x1\xf3\0\0\0\0\0\0)
+windowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\x3\a\0\0\x1\xa4\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0)
+
+[Video]
+camVideoFPS=0
+camVideoRes=@Rect(0 0 0 0)
+screenGrabbed=false
+screenRegion=@Rect(0 0 0 0)
+videoDev=
diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise
index 07034237b..78bc309c8 100755
--- a/src/freedombone-image-customise
+++ b/src/freedombone-image-customise
@@ -230,7 +230,7 @@ following commands, then enter your details.
  |    |   (.-' (.-' (   | (   )|  |  | |   )(   )|  | (.-'
  '    '     --'  --'  -' -  -' '  '   -' -'   -' '   -  --'
 
-                    Freedom in the Mesh
+					Freedom in the Mesh
 " > $rootdir/etc/motd
 	fi
 }
@@ -683,12 +683,14 @@ function configure_user_interface {
 	# browser
 	chroot "$rootdir" apt-get -y install $BROWSER
 
-	# NOTE: The Tox repo only supports a limited range of architectures
-	if [[ $ARCHITECTURE == 'amd64' || $ARCHITECTURE == 'i386' ]]; then
-		# Tox user interface
-		enable_tox_repo
-		mesh_tox_qtox
-		#chroot "$rootdir" apt-get -y --force-yes install qtox
+	# Tox user interface
+	enable_tox_repo
+	mesh_tox_qtox
+	# copy the default qtox ini file
+	if [ ! -d ${rootdir}/home/${MY_USERNAME}/.config/tox ]; then
+		mkdir ${rootdir}/home/${MY_USERNAME}/.config/tox
+		cp /usr/local/bin/freedombone-config-qtox ${rootdir}/home/${MY_USERNAME}/.config/tox/qtox.ini
+		chroot "$rootdir" chown -R ${MY_USERNAME}:${MY_USERNAME} /home/${MY_USERNAME}/.config
 	fi
 
 	# Syncthing
-- 
GitLab