def nascondi(self, widget, args=()):
widget.get_window().hide_on_delete()
For some reason you get the GdkWindow of the dialog widget here, and try to call a method that GdkWindow does not have. That cannot work...
In any case hide_on_delete()
is, as far as I know, a bit useless in python (because the number of arguments does not match the signal). Fortunately doing it yourself is not difficult. Try this:
def on_delete_event (widget, event):
widget.hide()
return True
self.__salva_FileChooserDialog.connect("delete-event",
on_delete_event)