[pygtk] Filechooserbutton callback

Frédéric frederic.mantegazza at gbiloba.org
Thu Oct 23 13:54:11 WST 2008


On mercredi 22 octobre 2008, John Finlay wrote:

> AFAICT the FileChooserButton is a replacement for using an entry/label
> and associated file browser button. It only allows selecting one
> existing file or folder and displays the name of the selected file in
> the button label. The most likely application is to use the FCB in a
> dialog where a file or folder is to be selected (along with other info)
> and finally another action (e.g. clicking an OK button) is used to
> retrieve the currently selected file or folder and perform some
> operations. I don't think it works very well if you want to perform some
> actions immediately after selecting a file or folder unless you pass in
> a FileChooserDialog and add the buttons and handle its responses and
> signals. You can use the "selection-changed" signal with the FCB to be
> notified when a different file has been selected and the dialog is
> closed.

Using the selection-changed signal does not work; it is never emited. 
Anyway, as you suggested, I just get the value when the entire config 
dialog is closed, and it works fine... except under Windows! 
get_current_folder() always returns the first dir I set in the chooser, 
with set_current_folder() method. Note that it works fine under linux and 
Nokia/maemo.

-- 
    Frédéric

    http://www.gbiloba.org


More information about the pygtk mailing list