Re: Gtk, filter folders from FileChooserDialog

2014-09-09 Thread Ritesh Khadgaray
Hi

On 2 Sep 2014 22:40,  wrote:
>
>
>
> 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.
>
>


One would need to write C code to implement this in gtk. Gtk-devel would be
a more appropriate list on merits of implementing this property.

Cheers
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Re: Gtk, filter folders from FileChooserDialog

2014-09-02 Thread rsm . mailing_lists



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, > 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


function with the Gtk.FileFilterFlags.FILENAME


and i returned False/True with my custom function.

But it seems that the Gtk.FileFilter


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


? I was quite surprised of discovering this because the
Gtk.FileChooser


works for selecting folders, and the way of retrieving the folders
path is by using get_filename

.

Thanks!





___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list