in reply to GUI (Gtk2) Programming problem

I haven't done any plain Perl Gtk programming, but I've used Gtk with POE. I'm not sure how applicable it is to plain Gtk, but here goes.

I wrote a CD ripping program, and had a similar problem. I wanted to update the progress bar each time a track was finished, but my loop was hogging the whole program. Since POE doesn't use threads, any event that runs has the whole program. What I ended up doing was breaking the loop up into several separate events. Each time a track finishes, it does two things: update the progress bar, then trigger the event that rips the next track.

I don't know if Gtk's main loop exposes the events to you so explicitly, and I don't know if you'll be able to realistically trigger an update each time a frame of the mp3 plays, or whatever. Perhaps adding a UI thread and a player thread is the best idea, but it's just some food for thought.