Re: Dropdown menu on treeview



On Sun, 2006-09-10 at 23:48 +0200, Dieter Schicker wrote:
Thanks a lot, Emmanuele. It's really great two do GUIs with Glade and
Perl!! I appreciate GTK+ more and more. I'm an old java junky and I
therefore really know what it means to have a good GUI builder!! ;-)

Now I'm struggling with a progressbar which I want to popup now and
then. Is it recommended to do that in a separate thread?

As a rule, mixing GTK+ and threads usually tends to make things messier.
Also, you can't really access GTK+ widgets and objects from a thread
different than the one where you started the main loop using Gtk2->main.

Where Java uses threads, GTK+ uses the main loop and the source
functions: Glib::Idle->add() and Glib::Timeout->add() (see perldoc
Glib::MainLoop).  These functions guarantee that you're playing nice
with the main loop.  If you need to poll a file descriptor,
Glib::IO->add_watch() usually does what you want.

Ciao,
 Emmanuele.

-- 
Emmanuele Bassi,  E: ebassi gmail com
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]