From b8e096f75c9a2fb3a5f02146f0e52ccae796aa87 Mon Sep 17 00:00:00 2001 From: hasufell 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