Re: g_object_set and threads
- From: Paul Pogonyshev <pogonyshev gmx net>
- To: "abel schie" <abelschie hotmail com>, gtk-app-devel-list gnome org
- Cc:
- Subject: Re: g_object_set and threads
- Date: Tue, 5 Jul 2005 21:00:36 +0300
abel schie wrote:
I've made a gtktreeviewcolumn with a custom GtkTreeCellDataFunc,
called cell_func(). This custom function uses the underlying
GtkListStore to render the cells: it uses gtk_tree_model_get() to
fetch some values, and then g_object_set(renderer,...) to update the
cell renderer.
Now, there are some time out functions running, which update the
GtkListStore. These functions are all surrounded by
gdk_threads_enter() and gdk_threads_leave(). However, the treeview
isn't refreshed automatically. Only when I hover it with the mouse it
gets really updated. Everytime these timeouts are running, cell_func()
is actually called.
My question is: how can I force g_object_set() to instantly redraw the
cell renderer? My first thought was: use gdk_threads_enter() and
gdk_threads_leave() also within cell_func(). But when I do that, I get
a lock while constructing the treeview, therefore the app
hangs. Putting the routine creating the treeview in a separate thread
as well didn't result in anything good.
Any ideas?
My guess would be gtk_tree_model_row_changed().
Paul
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]