RE: [gtk-list] Re: GtkProgressBar && RE: updating a progress



On 05-Mar-98 raster@redhat.com wrote:
> ->  Eek. That rather breaks the model [of GTK and other widget
> sets].
> 
> No - gtk currently breaks logic by not updating somehting that
> shoudl
> be re-drawn when updated.

I said it breaks the model, not logic. I was really referring to the
fact that Motif uses a similar model for it's updating, and also
requires an (events ? redraw) type mechanism. 

> 
> If I - as a programmer am programming so I have a loop ant lest say
> scans a directory - and as I read I update the progress bar - I
> expect
> that progress bar to redraw and update when I update it 

I always like to think that it is upto me - as a programmer - to
decide and not have this sort of thing thrust upon me. For example,
as you have already pointed out, using

 while (gtk_events_pending())
        gtk_main_iteration();

updates every widget, whereas using gtk_widget_draw()
updates a specific widget - so which do you use?

For progressbars, doing the latter is likely to
result in the programmer needing to also do the former in many
situations, and doing the former may not result in the desired
behaviour.

Having said all that, as has been pointed out, a couple of the
widgets already do their own redraws, resulting in the need to do
a freeze/thaw to prevent this [hmm... I seem to quite often put
freeze/thaw around text widget updates as a matter of course -
perhaps this is an indicator].

You pays your money and takes your choice.

Tony
--
E-Mail: Tony Gale <gale@daedalus.dera.gov.uk>
"I'm a mean green mother from outer space"
 -- Audrey II, The Little Shop of Horrors

The views expressed above are entirely those of the writer
and do not represent the views, policy or understanding of
any other person or official body.



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