event_pending question?



Before you catch the list on fire, Id like to point out that I am a newb
to both perl and gtk-perl. I got bored one day, and started playing around
with making a front-end of sorts for MPlayer.. and it was going along
fairly well, until I came upon a problem. The problem is that when I
attempt to run mplayer, the gui will stop updating. Ive found that
appearantly Gtk->iteration() will keep it from doing this, but I haven't
found out exactly how I should use it... What Im guessing is making this
hard, is the fact that I have it gathering all console output from MPlayer
and inserting it into a text widget. Heres a little code snippet.. any
help would be appreciated.

sub playmovie
{
   open CON, "mplayer -dvd $variable{'DVDTITLE'} -aid $variable{'AUDIOID'}
2>&1 | tee test.log |";

   while ( $console_out = <CON> )
   {
      $console_txt_out->insert( $console_fnt, undef, undef, $console_out
);
   }

   close CON;
}





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