On Tue, Feb 17, 2004 at 05:27:02PM +0000, JOSE PEDRO SERGIO ROMAO MACHADO wrote:
Hi all, I need you opinion on this problem: I have a Timer function in the main.c of my app, that
I guess you mean a timeout function here?
reads some dada from a text file at each second. I must update some widgets with this data, text boxes, progress bars, plot graphs, etc... As I see I have two solutions: 1) leave timer on main.c, use global variables and emmit acustom signal to those widgets tha must be updated... so they can go read global variables to update them selves.
No need to use special signals. You can update the widgets from within the timeout function. For an entry widget you use gtk_entry_set_text, for a progress bar gtk_progress_bar_set_fraction etc. This is what I'd do. Your second solution sounds very cumbersome to me. Roland -- R.F. Smith /"\ ASCII Ribbon Campaign r s m i t h @ x s 4 a l l . n l \ / No HTML/RTF in email http://www.xs4all.nl/~rsmith/ X No Word docs in email / \ Respect for open standards
Attachment:
pgp8X0BLqzgGa.pgp
Description: PGP signature