How to refresh an entry in GTK? (Solved)

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
arivas_2005
Posts: 212
Joined: Sun 25 Feb 2007, 14:39

How to refresh an entry in GTK? (Solved)

#1 Post by arivas_2005 »

Greetings

I found this script online

Code: Select all

#! /bin/bash
[ -z $GTKDIALOG ] && GTKDIALOG=gtkdialog

MAIN_DIALOG='
<window>
	<vbox>
		<edit>
			<variable>EDITOR</variable>
			<height>150</height>
			<width>350</width>
			<sensitive>true</sensitive>			
			<input file>/opt/read.txt</input>			
			<action signal="refresh">/opt/read.txt</action>			
		</edit>
		<hbox>
			<button cancel></button>
			<button ok></button>
		</hbox>
	</vbox>
</window>
'
export MAIN_DIALOG

case $1 in
	-d | --dump) echo "$MAIN_DIALOG" ;;
	*) $GTKDIALOG --program=MAIN_DIALOG ;;
esac
I neer to see:

If the file opt/read.txt changes, it also changes in box "edit" too
Example

I am doing this console
# echo " now is Friday---" >>opt/read.txt

then,, I want to see the line automatically inserted "now is Friday---", in box "edit" too (( As with Xdialog --tailbox ))

the line
<action signal="refresh">/opt/read.txt</action>
not working

I use Puppy Slacko, and learn very little programming

excuseme my english

Thanks
Last edited by arivas_2005 on Fri 11 Oct 2013, 20:57, edited 1 time in total.

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#2 Post by zigbert »

This should do it

Code: Select all

<edit file-monitor="true" auto-refresh="true">

arivas_2005
Posts: 212
Joined: Sun 25 Feb 2007, 14:39

#3 Post by arivas_2005 »

great ... thanks

Post Reply