Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Application chooser in mozilla applications

20 views
Skip to first unread message

David B. Cortarello

unread,
Jul 10, 2008, 11:22:44 PM7/10/08
to
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?
That way every desktop environment can write their own application
chooser (a small application that given a file name gives you a list
with applications to open it). Like this: http://img58.imageshack.us/img58/8205/openwithsx9.png
(this one is based on the thunar application chooser, gnome people
would use gnome-vfs or gio/gvfs, etc).
So people distributing firefox, thunderbird, etc can set the
application chooser in the about:config or whatever to something
according to their desktops.

aren...@fdn.fr

unread,
Jul 13, 2008, 3:58:11 AM7/13/08
to
Christopher Aillon <cai...@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

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.

David B. Cortarello

unread,
Jul 14, 2008, 8:07:31 AM7/14/08
to
The idea behind this is that every desktop could use their own
application chooser. You go to about:config, set a variable (don't
know, like: Application.Chooser) to /usr/bin/appchooser. And when the
"Save as/Open" dialog comes up, then "Open" button will give you that
external app if it set and exists of course, otherwise, that ugly
GtkFileChooser.

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

Dan Mosedale

unread,
Jul 14, 2008, 4:24:12 PM7/14/08
to
David B. Cortarello wrote:
> The idea behind this is that every desktop could use their own
> application chooser. You go to about:config, set a variable (don't
> know, like: Application.Chooser) to /usr/bin/appchooser. And when the
> "Save as/Open" dialog comes up, then "Open" button will give you that
> external app if it set and exists of course, otherwise, that ugly
> GtkFileChooser.
>
> 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.

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

Christopher Aillon

unread,
Jul 14, 2008, 4:30:37 PM7/14/08
to David B. Cortarello, dev-platf...@lists.mozilla.org
David B. Cortarello wrote:
> The idea behind this is that every desktop could use their own
> application chooser. You go to about:config, set a variable (don't
> know, like: Application.Chooser) to /usr/bin/appchooser. And when the
> "Save as/Open" dialog comes up, then "Open" button will give you that
> external app if it set and exists of course, otherwise, that ugly
> GtkFileChooser.

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.

David B. Cortarello

unread,
Jul 14, 2008, 10:38:44 PM7/14/08
to

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...

Dan Mosedale

unread,
Jul 18, 2008, 2:02:37 PM7/18/08
to
David B. Cortarello wrote:
>
> 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.

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

0 new messages