Re: GtkListStore flickers when updated



Drew,

Don't know anything about GtkListStore in specific, but in general the problem is addressed by freezing/thawing the widget. I do so for tables, text, etc.

So, something like:

1) set up the timer with gtk_timeout_add() to run every 1000ms, calling
my function SetTime()


2.0) SetTime freezes the GtkListStore, so that no updating is done.

2.1) SetTime() iterates over the GtkListStore's rows using
gtk_tree_model_foreach(), calling my function SetToGivenTime() for each
row.

3) SetToGivenTime() forms the new display string, and sets it to the
given row (identified through a GtkTreeIter) using gtk_list_store_set().

4) SetTime thaws the GtkListStore before exiting.

4.1)  SetTime may need to do something to force a redraw, I forget.

5) Gtk main loop now processes all the redraws.


HTH,


Eric




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