Re: [gtk-list] external program




On Fri, 26 Feb 1999, Low Yoke Hean wrote:
> 
> 	static void run(GtkWidget *widget, gpointer data){
> 	  
> 	  pop a modal dialog box
> 	  execute an external program


I assume you're waiting for the external program to finish running? 
If you do that, there's no way for Gtk to run, so it can't update the
display.

If you don't care about the output of the external program, just fork(),
exec(), and forget it. (Gnome has some convenience functions to do this if
you use Gnome.)

If you do care about the output and you're reading it via pipes or
something, use gtk_input_add() to install a handler function to 
be called whenever there is data on the pipe. Or alternatively, install a
timeout function and periodically read from the pipe.

Havoc






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