Re: List of files matching a filter expression.

"Adrian E. Feiguin" <[email protected]>
Newsgroups gmane.comp.scigraphica.gtkextra
Message-ID <[email protected]>
Oi Fabio, take a look at gtk_file_list_open_dir, you'll find a piece of 
code that looks like this:

list = icon_list->icons;
while(list){
    item = (GtkIconListItem *)list->data;
    file_item = (GtkFileListItem *)item->link;
    .... (do something);
    list = list->next;
}

GtkFileListItem is defined in gtkfilelist.h and has all the info you need.
I hope this helps.
Saludos,
<ADRIAN>

Fabio C.S. da Silva wrote: 

>Adrian,
>
>thank you for the prompt answer. I used the functions you mentioned in the 
>example. In fact I could only build my example because of that. But I can 
>only access one file of a certain selection at a time. Is there a pointer to 
>the whole list of files? Say I want to get a pointer to all the files that 
>match the pattern *.dat and do the analysis on each one separately. Can I 
>have access to that data or should I do it one by one?
>
>Thank you again and sorry for the naive questions.
>
>	Un abrazo,
>
>		Fabio.
>
>On Friday 26 March 2004 15:50, Adrian E. Feiguin wrote:
>  
>
>>Hi Fabio, there are two functions that you can use:
>>
>>path = gtk_file_list_get_path(GTK_FILE_LIST(filesel->file_list));
>>file = gtk_file_list_get_filename(GTK_FILE_LIST(filesel->file_list));
>>
>>As an example, take a look a testgtkfilesel.c in the distro. If you run
>>the program, select a file, click "OK" and see the results.
>>Enjoy! saludos,
>><ADRIAN>
>>
>>Fabio C.S. da Silva wrote:
>>    
>>
>>>Hello!
>>>
>>>I am trying to make a small program that reads files with a certain
>>>extension and does some data extraction using GTK Extra. I noticed that
>>>there is a very powerful widget, "gtkfilelist",  that adds a lot of
>>>functionality to the "file selection dialog" widget of GTK. Normally, I
>>>can extract the path and the file name selected by the user, but I didn't
>>>see in the wdiget's definition on gtkfilelist.h, a field in the structure
>>>GtkFileList where I could acess all the files matching a certain filter
>>>expression. Is there a simple way to do that?
>>>
>>>	Thanks,
>>>
>>>		Fabio.
>>>      
>>>
>
>  
>



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.