When the button is clicked( to launch the new feature
i.e. a World Clock) a function is called that has this
if statement to launch a warning message using yaf-spash
Code:
CHECK_VERSION=`funcGTKDVGet | awk '{ print $3 }'`
if [ ${CHECK_VERSION:2:1} -gt 7 ] ; then
...
Here is a modification of Thunor's code that anyone can put at the
beginning of their script. Codewriters should modify it to meet their
needs.
Note that the variable GTKDV is initially an array with 3 elements
(numbered ----> 0,1,2 )
...but then GTKDV is changed to a different array
a couple of lines further. Thunar states " the following code does the trick
(on Puppy Linux you will get "5908" for gtkdialog2, "7020" for gtkdialog3
and "7021" and upwards for gtkdialog)."
The function then prints to terminal the version
(echo "Gtkdialog version: $GTKDV") which is how I get the
number 8 for recent puppies.
Code:
for P in gtkdialog4 gtkdialog3 gtkdialog; do
GTKDIALOG=$(which $P) && break
done
function funcGTKDVGet() {
GTKDV=( $($GTKDIALOG -v) )
GTKDV=${GTKDV[2]}
echo "Gtkdialog version: $GTKDV"
GTKDV=( ${GTKDV//./ } )
if [ ${GTKDV[1]} -lt 10 ]; then GTKDV[1]=${GTKDV[1]}0; fi
if [ ${GTKDV[2]} -lt 10 ]; then GTKDV[2]=0${GTKDV[2]}; fi
}; funcGTKDVGet
if [ ${GTKDV[1]}${GTKDV[2]} -lt "7021" ]; then
xmessage "This application requires at least gtkdialog-0.7.21"
exit
else
xmessage "This application is greater than gtkdialog-0.7.20
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum