Hi Ritesh,
I'appreciate your answer because it gives me some clues, but to be
honest I'm totally lost.
I just started programming in python and using Gtk, so your C code is
kinda like Chinese to me.
Any extra help / detailed information would be highly appreciated!
I was searching over the Internet "gtk implement property" but i haven't
find anything to help me.
So far my biggest question is if the property has to be added inside my
program, or if i have to modify
the /GTK scripts?/ and then call the property from my program like a
normal property.
On 09/01/2014 11:57 AM, Ritesh Khadgaray wrote:
Hi
GtkFileChooser(Widget) does not allow user to filter by folder. One
would need to implement this property
gboolean filter-folder Write
Interface GtkFileChooser lists filter-folder
GtkFileChooserWidget implements filter-folder
set_filter-folder (gboolean val)
{
...
_gtk_file_system_model_set_filter_folders (model, true);
}
Cheers
On Sat, Aug 30, 2014 at 2:45 PM, <rsm.mailing_li...@sent.as
<mailto:rsm.mailing_li...@sent.as>> wrote:
Hi,
I decided to post this message on the Gtk mailing list because I'm
almost sure that the feature that I'm requesting does not exists.
I have a program where users can select files or folders, and once
they have selected them once, is not necessary to select them again,
so i want to create a filter to remove the files or folders from
the FileChooserDialog.
Creating the filter for the files it wasn't so hard, i used the
add_custom
<?ui=2&ik=5bc34a30ec&view=att&th=148263366edd50a5&attid=0.0.1.1&disp=emb&zw&atsh=0>
function with the Gtk.FileFilterFlags.FILENAME
<?ui=2&ik=5bc34a30ec&view=att&th=148263366edd50a5&attid=0.0.1.2&disp=emb&zw&atsh=0>
and i returned False/True with my custom function.
But it seems that the Gtk.FileFilter
<?ui=2&ik=5bc34a30ec&view=att&th=148263366edd50a5&attid=0.0.1.3&disp=emb&zw&atsh=0>
function only works for files. I realized (by printing) that it
only takes in mind the files of a folder and it ignores the folders.
/*Is there anyway of hiding folders from the*/ Gtk.FileChooser
<?ui=2&ik=5bc34a30ec&view=att&th=148263366edd50a5&attid=0.0.1.4&disp=emb&zw&atsh=0>
? I was quite surprised of discovering this because the
Gtk.FileChooser
<?ui=2&ik=5bc34a30ec&view=att&th=148263366edd50a5&attid=0.0.1.4&disp=emb&zw&atsh=0>
works for selecting folders, and the way of retrieving the folders
path is by using get_filename
<?ui=2&ik=5bc34a30ec&view=att&th=148263366edd50a5&attid=0.0.1.5&disp=emb&zw&atsh=0>.
Thanks!
_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list