You are not logged in.
Hi,
could some help me to understand how to create my own FileFitler entry?
The documentation just mentions the prototype of the function :
void Gtk::FileFilter::add_custom ( FileFilterFlags needed, const SlotCustom& slot )But honestly, it doesn't help me much. Maybe there is some code sniplet out there demonstrating the application of this function. Unfortunatelly, I did not find anything on my way through the internet :-\
I would be glad, if someone could help me!!!
Cheers,
L-K
Last edited by linux-ka (2013-08-27 14:15:13)
Offline
Hey!
In advance: I am not very familiar with GTK and any of the smilarly named projects, but I felt like looking into it and found out a little that might just help you further ![]()
First of all, code that uses this function is indeed hard to find. But there seem to be a lot of wrappers for this UI toolkit in other languages.
Lots of sites show that the way for adding a custom FileFilter is just making an instance of one, assigning it a name and pattern
and passing that to the file selection dialog.
I have found the Vala gtkmm documentation to have a very good example for this.
Hopefully this helps ![]()
Offline
Thanks n0stradamus,
this somehow explains at least a bit what kind of parameter is expected, but it also lacks of examples....I guess I will ask on the Gtkmm page directly and post the solution later on (if there will be one)...
Offline
Alright, I hope that you'll find it out.
If you do so, why don't you post your findings here, so that at least one hit on google will be useful? ![]()
Offline
You are so right :-)
Since I was interested in setting a filter for specific file extensions (which are not covered by mime-types), I got the following repsonse via mailing-list; for the ease of application simply set the filter via
add_pattern("*.dat")or any extension you might need. This works pretty good :-)
Last edited by linux-ka (2013-08-27 15:55:36)
Offline