瀏覽代碼

Use zenity for visiting mesh sites

Bob Mottram 7 年之前
父節點
當前提交
dbed21ecd9
共有 1 個檔案被更改,包括 2 行新增6 行删除
  1. 2
    6
      src/freedombone-mesh-visit-site

+ 2
- 6
src/freedombone-mesh-visit-site 查看文件

@@ -49,15 +49,11 @@ if [ ! -f $USERS_FILE ]; then
49 49
     exit 0
50 50
 fi
51 51
 
52
-data=$(tempfile 2>/dev/null)
53
-trap "rm -f $data" 0 1 2 5 15
54
-dialog --title $"Visit IPFS site" \
55
-    --backtitle $"Freedombone mesh" \
56
-    --inputbox $"Enter the username or Tox ID for the site you wish to visit" 8 70 2>$data
52
+data=$(zenity --forms --title="Visit IPFS site" --text="Enter the username or Tox ID for the site you wish to visit" --separator="," --add-entry="")
57 53
 sel=$?
58 54
 case $sel in
59 55
     0)
60
-        TOX_USERNAME_OR_ID=$(<$data)
56
+        TOX_USERNAME_OR_ID="$data"
61 57
         if [ ${#TOX_USERNAME_OR_ID} -gt 0 ]; then
62 58
             if ! grep -q "$TOX_USERNAME_OR_ID" $USERS_FILE; then
63 59
                 TOX_ID="$TOX_USERNAME_OR_ID"