Re: [anjuta-devel] New project interface and introspection

Hi Abderrahim,

I have changed the interface to use GObject but I have an issue with the proxies.

In the project manager plugin the node are loaded in a different thread. Before calling the ianjuta_project_load_node function, I create a proxy node, this node copy only the common data of the node (file, name, properties, state and type). Then, I remove the real node from the project tree and and replace it with the proxy. With GNode, it is easy to do, I just need to exchange the data pointer.

The tree now contains a node (the proxy) where all anjuta_project_node function are still valid and I have a backend node not used by anybody. I can use it in the thread that will reload it.

When The loading thread is completed, I remove the proxy node with all its children and replace it with the backend node which has been reloaded.

I cannot do the same with a GObject. Do you have an idea to handle this ?

I can make a full copy of the node but I'm a bit annoyed to have to define a copy function for all node objects while it's not really needed because only the backend thread will access to these data.



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