there is a file picker written in xul which you can use, and possibly
overlay/override.
http://kb.mozillazine.org/Ui.allow_platform_file_picker
You'll need to write your own nsIFilePicker only if you don't want a xul
filepicker (for example because you want to use some specific application).
arno.
That way, every distributor can set the application chooser to match
the distribution's desktop, even yoy can program that application
chooser in the language you want.
On Jul 13, 4:58 am, arenev...@fdn.fr wrote:
> Christopher Aillon <cail...@redhat.com> wrote:
> > David B. Cortarello wrote:
> >> Is it there an option to change the GtkFileChooser in the xulrunner
> >> used to choose applications to open files, so I can provide the users
> >> a handy application chooser?
>
> > Hey, yeah it's something we want to get to at some point, but it's not
> > really possible right now save for writing your own nsIFilePicker
> > implementation which would make the calls you need to display the
> > picker. It's not really an easy way, sadly.
>
> there is a file picker written in xul which you can use, and possibly
> overlay/override.http://kb.mozillazine.org/Ui.allow_platform_file_picker
Implementing an nsIFilePicker.idl component that wraps any such
executable sounds like a reasonable way to do this. Alternately, if you
don't already have such an executable, you could just wrap the toolkit
filepicker for the toolkit you care about.
Dan
Well, the file chooser should be part of the system toolkit. I can see
if you want using the KDE file chooser to just work, for example, but
having arbitrary file chooser binaries probably doesn't make much sense.
Christopher, Dan, thanks for answering me so soon.
I don't want to change the file chooser, the GtkFileChooser is ok as
it is, but not as an application chooser, I propose to allow the
distributors to set it to something different.
Providing the binary application chooser is up to the distributor or
desktop developers, mozilla would still provide the actual application
chooser (the file chooser as fallback), they should only allow someone
else to use an external application as an application chooser to match
their desktop without having to mess around with the mozilla file
picker (allowing to set it in a variable or something easy to change).
As far as I know, Gimp devs are working in merging Gio/Gvfs into gtk,
so eventually, mozilla devs would be able to use it.
But as it is now, we have to face it, using a GtkFileChooser as an
application chooser is just a bad idea. Every time I have to tell a
user to use that, is a phone call or an email to ask me what
application they should use and where is it...
OK, thanks for the clarification. What you really want, in that case, I
think, is to implement a toolkit-specific version of
nsIContentDispatchChooser (used for protocol handlers) and
nsIHelperAppLauncherDialog (used for MIME-type handlers). The hope is
that someday nsIHelperAppLaunchDialog and its implementations can be
completely replaced by nsIContentDispatchChooser and its
implementations, but we don't have anyone signed up to do that work at
the moment, I don't think.
Dan