Thanks Boris,

I didn't know about the filepicker preference option, but it wouldn't
have worked for me anyway.  Depending on the file being downloaded, I
want to invoke either the standard "save as" dialog or the XUL chrome
dialog (which I have overlaid to restrict where the file can be
saved).

What I was confused about is that I was trying to call createInstance
with the contract ID instead of the CID.  I am now using the CID of
the chrome-based nsIFilePicker implementation I mention above.

Do you know if there is a better way to restrict where the user is
allowed to save a file?

Gtk2 supposedly allows you to create file chooser dialogs with a
backend filesystem, but the the Mozilla Gtk2 code doesn't seem to
support that (I am working with the 1.5 source code).  I tried
slightly modifying the Gtk2-based implementation of nsIFilePicker by
replacing the gtk_file_chooser_dialog_new() call with
gtk_file_chooser_dialog_new_with_backend(), but I don't knowwhat
parameter I should pass as a backend.  Gtk2 attempts to take my
backend parameters and find a shared library with that name, which I
don't understand.

Thanks,
Peter

_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to