summaryrefslogtreecommitdiff
blob: d827184ff9a4d03324d8210fa3703cd116649363 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
From b8e096f75c9a2fb3a5f02146f0e52ccae796aa87 Mon Sep 17 00:00:00 2001
From: hasufell <hasufell@gentoo.org>
Date: Sun, 6 Oct 2013 14:39:02 +0200
Subject: [PATCH] use stdout to avoid broken tmp files

e.g. fontconfig errors will break parsing
---
 idesktool | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/idesktool b/idesktool
index 931ad6f..90e5ceb 100755
--- a/idesktool
+++ b/idesktool
@@ -88,10 +88,10 @@ end" > ~/.ideskrc
 newcaption()
 {
 
-$DIALOG --wizard --title "idesktool 1.36" \
+$DIALOG --stdout --wizard --title "idesktool 1.36" \
         --inputbox "Icon Caption:\n
 		(Leave blank for no caption)"\
-		 8 40 "$cap" 2> ~/.idesktop/inputbox.tmp.$$
+		 8 40 "$cap" 1> ~/.idesktop/inputbox.tmp.$$
 retval=$?
 case $retval in
      0) cap=$(cat ~/.idesktop/inputbox.tmp.$$)
@@ -132,10 +132,10 @@ modcaption=NoCaption$$
 fi
 
 
-$DIALOG --wizard --title "idesktool 1.36" \
+$DIALOG --stdout --wizard --title "idesktool 1.36" \
    --separate-output --2inputsbox "NOTE: The default right-click command \n
    runs this configuration tool (recommended)."\
-	18 40 "Left-Click Command:" "$command" "Right-Click Command:" "idesktool $modcaption.lnk" 2> ~/.idesktop/inputbox.tmp.$$
+	18 40 "Left-Click Command:" "$command" "Right-Click Command:" "idesktool $modcaption.lnk" 1> ~/.idesktop/inputbox.tmp.$$
 retval=$?
 
 case $retval in
@@ -187,10 +187,10 @@ modifycaption()
 
 {
 
-$DIALOG --wizard --title "idesktool 1.36" \
+$DIALOG --stdout --wizard --title "idesktool 1.36" \
         --inputbox "Icon Caption:\n
 		   (Leave blank for no caption)"\
-		 8 40 "$currentcaption" 2> ~/.idesktop/inputbox.tmp.$$
+		 8 40 "$currentcaption" 1> ~/.idesktop/inputbox.tmp.$$
 retval=$?
 case $retval in
      0) cap=$(cat ~/.idesktop/inputbox.tmp.$$)
@@ -235,10 +235,10 @@ modcaption=NoCaption$$
 fi
 
 
-$DIALOG --wizard --title "idesktool 1.36" \
+$DIALOG --stdout --wizard --title "idesktool 1.36" \
    --separate-output --2inputsbox  "NOTE: The default right-click command \n
    runs this configuration tool (recommended)."\
-	18 40 "Left-Click Command:" "$command" "Right-Click Command:" "idesktool $modcaption.lnk" 2> ~/.idesktop/inputbox.tmp.$$
+	18 40 "Left-Click Command:" "$command" "Right-Click Command:" "idesktool $modcaption.lnk" 1> ~/.idesktop/inputbox.tmp.$$
 retval=$?
 case $retval in 
 1) rm -f ~/.idesktop/inputbox.tmp.$$
@@ -423,13 +423,13 @@ argyyep()
 
 firstwindow=argyyep
 
-$DIALOG --title "idesktool 1.36" \
+$DIALOG --stdout --title "idesktool 1.36" \
         --radiolist "Desktop Icon Manager" 18 40 0 \
         "Properties" "View or Edit This Icon" off \
         "Delete" "    Remove This Icon" off \
         "New" "       Add a New Icon" off \
         "Refresh" "   Reload the Desktop" off \
-	"Configure" " Edit iDesk's conf. file" off 2> ~/.idesktop/checklist.tmp.$$
+	"Configure" " Edit iDesk's conf. file" off 1> ~/.idesktop/checklist.tmp.$$
 
 retval=$?
 
@@ -469,13 +469,13 @@ argynope()
 
 firstwindow=argynope
 
-$DIALOG --title "idesktool 1.36" \
+$DIALOG --stdout --title "idesktool 1.36" \
         --radiolist "Desktop Icon Manager" 18 40 0 \
         "Properties" "View or Edit an Icon" off \
         "Delete" "    Remove an Icon" off \
         "New" "       Add a new Icon" off \
         "Refresh" "   Reload the Desktop" off \
-	"Configure" " Edit iDesk's conf. file" off 2> ~/.idesktop/checklist.tmp.$$	
+	"Configure" " Edit iDesk's conf. file" off 1> ~/.idesktop/checklist.tmp.$$
 retval=$?
 
 case $retval in
@@ -511,8 +511,8 @@ esac
 ##########################################################
 editconfig()
 {
-Xdialog --title "iDesk Configuration" --fixed-font  "" \
-	--editbox ~/.ideskrc 0 0 2> ~/.idesktop/editbox.txt.$$
+Xdialog --stdout --title "iDesk Configuration" --fixed-font  "" \
+	--editbox ~/.ideskrc 0 0 1> ~/.idesktop/editbox.txt.$$
 
 case $? in
   0) cat ~/.idesktop/editbox.txt.$$ > ~/.ideskrc
-- 
1.8.3.2