Re: Refreshing of the text

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

 



John Cupitt wrote:

You have two solutions, I think:


- Every time a packet comes in, update your widgets and call

   while( g_main_context_iteration( NULL, FALSE ) )
     ;

this will make the screen repaint.


This is not a good idea. What if there are no packets coming in? Then your GUI would not be responding at all.


If you don't opt for a multithreaded aproach, I think you can have the main loop watch the libpcap file descriptor for you by using g_io_add_watch() or something.

--
Christer

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux