g_object_set and threads



Hi,

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?

thanks in advance.





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