Comment 2 for bug 1248152

Revision history for this message
Martin Pitt (pitti) wrote : Re: Gtk.FileChooserWidget won't show the "create folder" button

I don't understand this:

        chooser = Gtk.FileChooserWidget(self,
                  Gtk.FileChooserAction.SELECT_FOLDER)

What is the "self" there? As far as I can see, you should call the proper constructor:

        chooser = Gtk.FileChooserWidget.new(Gtk.FileChooserAction.SELECT_FOLDER)

Gtk.FileChooserWidget() calls the GObject constructor, but it seems GtkFileChooserWidget doesn't actually expose the action as a property (which is odd, most other widgets to). It works fine with that.

In principle, your style of invocation should be invalid and generate an exception. The lack of an exception is what's causing this confusion, I'll have a closer look there.