New `MimeType` fields in .desktop
Jehan Pagès
jehan.marmottard at gmail.com
Wed Feb 17 18:43:14 UTC 2021
Hi!
On Wed, Feb 17, 2021 at 7:22 PM Jan Tojnar <jtojnar at gmail.com> wrote:
> On Wed, Feb 17, 2021 at 18:52, Jehan Pagès
> <jehan.marmottard at gmail.com> wrote:
> > If by photos, you mean for instance JPEG images, then this is a
> > display format (a very bad one at that, lossy, with ugly display
> > artifacts…). It is meant for viewing, not editing. Of course I am
> > not saying you should not edit it, we all edit JPEG images, I do it
> > too. But it's definitely not meant for being a good photo source for
> > further edit. And most people (even the ones who edit a lot of JPEG,
> > I think) would probably prefer a simple viewer as default action when
> > double-clicking for instance.
>
> I overedited it a bit. Initially, I wrote bitmap images, as screenshots
> in PNG format are the most common type of images that I edit.
>
> > What is the exact interaction you have in mind which would be the
> > consequence of making a viewer/editor differentiation?
>
> For example, to edit a screenshot file in Pictures directory. In
> Nautilus, I currently have to click “open with other application”
> and then find GIMP in the dialogue. I just do not bother and drag the
> file on manually started instance of GIMP instead.
>
> I imagine that if the MIME types in desktop files were annotated with
> intent, Nautilus could run the mime-apps-spec algorithm [1] twice,
> filtering for “view” intent one time and “edit” intent the
> second time, and it could show edit action in the context menu if they
> differ.
>
That's an interesting idea. But then it requires to have the format
view/edit expectation written somewhere so that you know what your
double-click should end up doing: will it run the default view program or
the default edit program for this MIME type?
So basically, what I guess you are proposing is (workflow-wise):
If a MIME type represents a format made for viewing:
- double-clicking/default action will open the default viewing software
associated with this MIME type.
- contextual menu will propose an alternative "Edit" item (which will run
the default edit software associated with this MIME type) and the usual
"Open with another application" to get the full list of associations.
If the MIME type is tagged as being an edit format, then this is obviously
reversed.
That's an interesting idea, though in this case, it requires much more
changes and I'm not sure if it doesn't get too complicated for most people
(who don't read specs), in other words over-engineered. The simpler single
association seems to be much more straightforward.
This was why I took some care so that what I was proposing would not change
at all how people interact with applications (it only gives some hints for
better defaults which is a rather invisible process). It is a dev-visible
only change (and not filling the new fields does not break your desktop
file, so it's even backward compatible).
So I'm not so sure what to think of your proposition (even though it's
interesting).
Jehan
> [1]:
> https://specifications.freedesktop.org/mime-apps-spec/latest/ar01s05.html
>
>
>
--
ZeMarmot open animation film
http://film.zemarmot.net
Liberapay: https://liberapay.com/ZeMarmot/
Patreon: https://patreon.com/zemarmot
Tipeee: https://www.tipeee.com/zemarmot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/xdg/attachments/20210217/2020d6ea/attachment.htm>
More information about the xdg
mailing list