| Age | Commit message (Collapse) | Author | Files | Lines |
|
grep -r skips symlinks it meets while recursing, and applications dirs
hold symlinked entries (an app installed by linking its repo's .desktop
file). Ten handlers were missing from the picker on this machine; -R
follows them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Picks and removes went straight to mimeapps.list, unlike every other
settings page, which edits a draft and commits from the SaveBar in the
header. The page now edits a draft of the file text; Save writes it,
Discard drops it, and the sidebar marks unsaved changes through dirty.
The draft follows the file while nothing is pending, so an outside
change still shows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Shows and sets the default application per file type in mimeapps.list:
role rows that set a group of types at once, every explicit entry with
Change and Remove, and a search to add any type an installed app
declares. The picker offers the apps whose .desktop declares the type,
from one grep over the XDG applications dirs, since DesktopEntry has no
mimeTypes; or every app on request.
No write before the first read, so a click during load cannot replace
the file with one line. Stale entries, whose app DesktopEntries does
not know, show their id in red.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
|
parse() lets the last duplicate key win, as GKeyFile does, but set() and
remove() only touched the first, so on a file with two lines for one type
an edit had no visible effect. set() now rewrites the first match and
drops the later ones; remove() drops every match.
A .desktop file with CRLF line endings left a \r on its MimeType= line,
which scan() returned as a bogus last mime type. Each item is trimmed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Pure functions over the file text for the default apps page: read
[Default Applications], set or remove one type, and map the .desktop
files' MimeType= lines to desktop ids. Every edit touches one line and
leaves [Added Associations], comments and blank lines as they were; a
remove keeps the section header so the text written is never empty.
The spec's stale-app check moves to DesktopEntries.byId: an installed
app without a MimeType= line is absent from the scan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|