Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 17 Apr 2014, 02:30
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
How to refresh an entry in GTK? (Solved)
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
arivas_2005

Joined: 25 Feb 2007
Posts: 89

PostPosted: Fri 11 Oct 2013, 15:37    Post subject:  How to refresh an entry in GTK? (Solved)  

Greetings

I found this script online


Code:
#! /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, 16:57; edited 1 time in total
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5561
Location: Valåmoen, Norway

PostPosted: Fri 11 Oct 2013, 16:37    Post subject:  

This should do it
Code:
<edit file-monitor="true" auto-refresh="true">

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
arivas_2005

Joined: 25 Feb 2007
Posts: 89

PostPosted: Fri 11 Oct 2013, 16:57    Post subject:  

great ... thanks
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

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


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0437s ][ Queries: 11 (0.0042s) ][ GZIP on ]