Re: GtkListStore flickers when updated
- From: "Eric M. Monsler" <emonsler beamreachnetworks com>
- To: Drew Parsons <dparsons emerall com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GtkListStore flickers when updated
- Date: Thu, 03 Oct 2002 11:23:33 -0700
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]