feat(MINE): add <<open whit>> WIP
This commit is contained in:
1 parent
b6f51a76ff
commit
f3bb6efd96
4 files changed
+124
-2
No files matched your search
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#e2e8f0" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="24" height="24">
|
||||
<path d="M21 8l-9-5-9 5v8l9 5 9-5V8z"/>
|
||||
<path d="M3 8l9 5 9-5"/>
|
||||
<path d="M12 13v8"/>
|
||||
<path d="M14.5 9.5h1.25a.75.75 0 0 1 0 1.5H14.5a.75.75 0 0 1 0-1.5z" fill="#e2e8f0" stroke="none"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 378 B |
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
The MIME type of a plugin package (.fwspacm), the archive the packaging
|
||||
script at the repo root builds (see make-plugin-package.py).
|
||||
|
||||
Without this file the extension is unknown to the desktop, so a file manager
|
||||
never offers the application that knows how to read it: the user could only
|
||||
install a package by dropping it on an already open window. Declaring the
|
||||
type is what makes Dolphin (and any other freedesktop file manager) list
|
||||
PacManager under "Ouvrir avec" for a .fwspacm file and hand the path over on
|
||||
the command line: the desktop entry takes %U and
|
||||
MainWindow::installLocalFiles takes it from there.
|
||||
|
||||
Which of those files open with PacManager straight away is decided by
|
||||
mimeapps.list (installed next to the desktop entry), not here: the MIME
|
||||
database only says what a file *is*.
|
||||
|
||||
No <icon> element on purpose: the spec says the system database ignores it,
|
||||
and the name a file manager looks up is derived from the type by convention
|
||||
(application-vnd.fws.pacmanager.plugin-package), which is the name the
|
||||
matching icon is installed under.
|
||||
-->
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/vnd.fws.pacmanager.plugin-package">
|
||||
<comment xml:lang="fr">Paquet de plugin PacManager</comment>
|
||||
<comment xml:lang="en">PacManager plugin package</comment>
|
||||
<!-- An archive, so a file manager that only knows ZIP still shows something
|
||||
sensible, and so the generic archive actions stay available. -->
|
||||
<sub-class-of type="application/zip"/>
|
||||
<glob pattern="*.fwspacm"/>
|
||||
<!-- The glob alone is not enough. Content detection runs before name
|
||||
matching and a .fwspacm *is* a ZIP, so application/zip (priority 50)
|
||||
would win and the file manager would offer Archive Manager instead.
|
||||
Matching the archive layout instead of the name: the local file header
|
||||
starts with PK\x03\x04 and its 26 following bytes carry the name of the
|
||||
first entry, which a package always makes plugin.json. Priority 60 puts
|
||||
it above the generic ZIP rule while staying below a more specific type
|
||||
that would claim the file for a better reason. -->
|
||||
<magic priority="60">
|
||||
<match type="string" offset="0" value="PK\x03\x04"/>
|
||||
<match type="string" offset="30" value="plugin.json"/>
|
||||
</magic>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
@@ -0,0 +1,29 @@
|
||||
# Which files PacManager opens, and how.
|
||||
#
|
||||
# The MIME database (resources/mime/fws-pacmanager.xml) only says what a file
|
||||
# *is*; it cannot choose an application. That is this file's job, and it is the
|
||||
# reason installing the app is enough to make the association show up in a file
|
||||
# manager -- no xdg-mime call is needed afterwards.
|
||||
#
|
||||
# [Default Applications] -- a double click opens the file with PacManager.
|
||||
# Only the plugin packages are claimed outright: nothing else handles them, the
|
||||
# type is private, and a package is useless without the application that reads
|
||||
# it. The Flatpak formats are deliberately *not* here: a .flatpakref belongs to
|
||||
# the Flatpak world, and stealing the double click from it would be rude to
|
||||
# whoever installed flatpak.
|
||||
#
|
||||
# [Added Associations] -- PacManager appears in "Ouvrir avec" (and stays out of
|
||||
# the default). The user picks it when they mean it; their own default set in
|
||||
# the system settings keeps winning. This is what the desktop entry's MimeType
|
||||
# line advertises.
|
||||
#
|
||||
# Both sections are additive for the types they name and touch nothing else, so
|
||||
# a user's own choices in ~/.config/mimeapps.list still override them.
|
||||
|
||||
[Default Applications]
|
||||
application/vnd.fws.pacmanager.plugin-package=org.fws.PacManager.desktop
|
||||
|
||||
[Added Associations]
|
||||
application/vnd.flatpak.ref=org.fws.PacManager.desktop;
|
||||
application/vnd.flatpak.repo=org.fws.PacManager.desktop;
|
||||
application/vnd.flatpak=org.fws.PacManager.desktop;
|
||||
Reference in new issue
Block a user