Re: Progress bar waiting too long?

* ( wrote:
> So here I am loading a bunch of images at and scaling them in one large
> cluster.  This, of course takes a while.  So I thought, 'hey I'll use a
> progress bar so that people will know something is going on'.  My problem is
> that the progress bar wont show up until the images are done loading rendering
> it pointless. Here is what I do:
> /* Make the window and the progress bar and add it to the window*/
> gtk_widget_show_all(window);
> displayimages(); /* This makes the images and puts them in a frame in the 
> window it also updates the progress bar everytime a pic is done */
> I've tried explicitly showing the bar with gtk_widget_show and
> gtk_widget_show_now but they dont help.
> Any thoughts on what I did wrong?
>                                         -Govind Salias

AFAIK, the changes to the status-bar value will not visually take
effect until the next time gtk_main is entered.

After updating the progress bar, try adding:


That should redraw everything for you.

(There are other solutions, including timers etc, but I am drawn to

    .^.     | Tom Gilbert, England | |
    /V\     |----------------------| |
   // \\    | Sites I recommend:   `--------------------------------|
  /(   )\   | |
   ^^-^^    `-------------------------------------------------------'

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