Re: [anjuta-devel] Search Dialog in Anjuta 3.2?



Hi Johannes,


Le 11/02/2012 19:01, Johannes Schmid a écrit :
Yes, two points:
* get the children recursively (or add an additional argument to
disable/enable recursion)

Ok.

* Be able to filter the returned node. Most plugins are likely
interested just in the source files and not in any other files. Source
file here might mean all text/xml files, not just classic source files.

I will add a argument like ianjuta_project_manager_get_elements, so ianjuta_project_manager_get_children will be quite similar except that you can specify a parent. It would be probably better to remove of of these function but we can do it later.

I am not even sure how I could filter the files with the API available
at the moment. You can have a look at my experimental branch:
http://git.gnome.org/browse/anjuta/tree/plugins/document-manager/search-files.c?h=search-files#n109

You can use ianjuta_project_manager_get_target_type, with the new project manager it works for any node. By example to check if the node is a source file you can use the following check:

(ianjuta_project_manager_get_target_type (file) & ANJUTA_PROJECT_TYPE_MASK) == ANJUTA_PROJECT_SOURCE

By the way you get all sources, including pictures and icons which are not text file but you can use mime_type to make the distinction.


Regards,

Sébastien



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