It`s a PATH selector button and entry box.
Full GUI has inPATH, inFILE, outPATH, outFILE buttons and entry boxes.
If there`s a better way to get path and file dialogs... Please!
Code: Select all
#!/bin/sh
appNAME=`basename $0`
appDIR=/root/my-applications/$appNAME
mkdir -p $appDIR
if [ ! -s $appDIR/input.path ];then echo '/mnt' > $appDIR/input.path ;fi
inPATH() {
SEL=`Xdialog --stdout --title " Input Path" --dselect $(<$appDIR/input.path) 0 0`
if [ $? -eq 0 ];then echo $SEL > $appDIR/input.path ;fi
}
Encode() {
export -f inPATH
export appDIR
export Encode="<window><hbox>
<vbox>
<frame Input File><vbox>
<button><label>Input Path</label>
<action>inPATH</action>
<action>refresh:INPATH</action>
</button>
<entry><variable>INPATH</variable><input>cat $appDIR/input.path</input></entry>
</vbox></frame>
</vbox>
</hbox></window>"
gtkdialog3 -p Encode > $appDIR/vob-avi.encode
}