Re: repainting GtkTextView



On Wed, 2002-09-18 at 16:51, Harring Figueiredo wrote:
 Folks, I have the following while loop:

 while( (img_fp = fopen(settings->image_file, "r" )) == NULL)
    {
        g_print("Trying to open : %s on while loop.\n" , settings->image_file);
        log(WARN,"Image order file is locked ? %s\n", settings->image_file);
        sleep(1) ;
        if(++tries > 10) return;
    }

 log(...)
{
 /* get eh date and level and what not ... */
  /* print on the textview ... */
  ...
 gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, str, -1,
                                                           color_attr[level] ,
,NULL);
+ gtk_main_iteration ();
} 


You need to iterate the main loop to handle any pending events (such as
redraws, clicks, etc.).

--Shahms



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