To destroy a window you can use the technique from my previous post:
Of course instead of 'sleep 5' you need to put a condition, like:gtkdialog -G 256x48+400+400 -p MAIN & WINDOW_PID=$!
sleep 5
kill $WINDOW_PID # kill window
Code: Select all
if [ something ]; then
kill $WINDOW_PID
fi
Code: Select all
#! /bin/bash
touch /tmp/temp_text.txt
echo "initial msg" > /tmp/temp_text.txt
export MAIN='
<window width-request="300">
<text><variable>MESSAGE</variable><input file>/tmp/temp_text.txt</input></text>
<timer interval="1" visible="false">
<action>refresh:MESSAGE</action>
</timer>
</window>
'
gtkdialog -p MAIN
But like I said, I'm not sure if I fully understand your design plan.
Greetings!