Re: Preferred Applications revisited, part two
- From: Luca Cavalli <loopback slackit org>
- To: gnomecc-list gnome org
- Subject: Re: Preferred Applications revisited, part two
- Date: Sun, 27 Nov 2005 01:05:11 +0100
On Sat, 2005-11-26 at 18:38 +0100, Sebastien Bacher wrote:
> On dim, 2005-11-20 at 16:01 +0100, Luca Cavalli wrote:
> > Attached to bug #171872  you can find a tarball with the source code
> > of the applet and a screenshot of the gui.
> I've just tried it, and it looks great!
> > * Applications info are now stored in an external XML file.
> Nice. Do you have a dtd or some explanation on the format used
I'm not an XML expert. I barerly know what a DTD is, but never written
one. There is only a small note inside default-applications.xml.in, but
the format is quite simple. Anyway, if needed, I can write something to
explain it, no problem.
> > Paolo Borelli (pbor) suggested me also another nice idea: to use .desktop
> > files stored somewhere like
> > $XDG_DATA_DIRS/gnome-default_apps/web_browsers,
> > $XDG_DATA_DIRS/gnome-default_apps/mail_readers, and so on... This will
> > also remove the libxml dependency. It is not as Sebastien suggested
> > (using .desktop files from /usr/sharep/applications/, extended with an
> > entry to specify the application category, i.e. "Feature: web_browser"
> > for apps capable to open url links), but a sort of. Comments are
> > welcome.
> What is the advantage of this over my suggestion? We already have
> desktop files, is there any need to duplicate files/translations/...?
The advantage of this solution is that it can be implemented without any
modification to the current desktop file format used by the
> > * there is a tooltip which informs users about the %s option, when they
> > use custom commands.
> Nice. Could you write the command on the selected action for non-custom
> choices like the current capplet does too? It can be useful for people
> to figure what it does exactly.
> > * This is a first (second, to be honest, the first had a little bug)
> > release and code needs to be cleaned up, maybe a bit reorganized... I'm
> > waiting for your suggestions and patches.
> Nice work. I've not looked on the code yet, but the capplet is already
> much nicer than the previous one.
> Some questions:
> - is that a new capplet or modifications over the previous one?
It is a new capplet, there are only few lines of code in common between
the two (gconf key #defines).
> - could you make a patch for the CVS with your changes?
When I wrote it I didn't use gnome-control-center/capplets/common/*
stuff, but I can remove my own one, replacing it with control-center
helper functions, where possible. If you look at my source code you will
find some comments regarding this.
Then I can rename my main source file from gnome-da-capplet.c to
gnome-default-applications-properties.c and make a patch over it (it
will replace all the file content), but my other source files must be
added to cvs, while gnome-default-applications-properties-structs.c
removed, since it is no more needed.
> - does changing the web browser have an impact on the application
> opening html file too? Some users find confusing to have different
> browsers used when opening an http URI or using nautilus.
No, opening a file is driven by mime type, so the gconf key is not
readed. Should this applet also handle mime types? Probably yes :)
> We should also decide something on the format to use to list the
> applications. I would like to have comments of the other control-center
> maintainers on this.
If I can express my opinion an XML file is a good compromise between
hardcoded C structs inside source file and automatic application
discovering via desktop files, which is not doable with the current
desktop file format. I like also Paolo's idea of having our own custom
desktop files somewhere.
> We have the choice to code the list, use an xml description, use new
> desktop files, or modify the current desktop files for this.
> Sebastien Bacher
] [Thread Prev