pdulvp.fr

Window > Refresh, and icons refreshed when a drive mounts has been fixed.

See more details at : https://github.com/pdulvp/pmane-sa/issues/12

  • New Window > Refresh entry (F5) re-reads every group's icons from disk; an item whose file is still missing keeps a generic fallback icon, nothing is removed
  • Icons picked in the properties dialog are retried on refresh too (GroupWindow::refreshDerivedIcons(true)), since their file may have been on a drive that was not mounted at load
  • The same refresh runs automatically when a mount point appears: new MountWatch class, event-driven via a QSocketNotifier (POLLPRI) on /proc/self/mountinfo, no polling; unmounts do not trigger it
  • Minimized-group icon previews are rebuilt on refresh, they are snapshots taken at minimize time

The data and the cache move with the settings

<sub>2026-10-30-1448-the-data-and-the-cache-move-with-the-settings.md — 2026-10-30 14:48</sub>

The move written for ~/.config leaves the other two behind: the wine prefixes
under ~/.local/share/pmane-sa/pmane-sa, which are the heaviest thing the
program owns, and the launch logs under ~/.cache/pmane-sa/pmane-sa. All three
are <root>/<organisation>/<application> and move the same way.

Decisions

  • One rule for the three roots, config, data and cache, rather than one

written for each: the old folder is <root>/pmane-sa/pmane-sa and the new
one is whatever QStandardPaths gives now.

  • The destination counts as free when it holds no file. Running the new

program once makes empty prefixes and launches folders, which must not
be what stops a 1.4 GB prefix folder from moving. Such a destination is
removed -- it can only be empty folders -- and the old one renamed over it.

  • A folder holding files is never merged into. Two sets of prefixes are

not reconciled; the old one is left where it is and said so, once.

  • The cache moves as well, rather than being deleted or left to rot: it is

the same shape, and a log already written is still worth reading. It is the
one root that says nothing when the destination is in use, since that would
be said at every startup for what is only logs of past launches.

Steps

  • [x] 1. src/LegacyConfig.{h,cpp} renamed src/LegacyPaths.{h,cpp}, the

function migrateLegacyFolders(): the three roots in a loop, plus
pmane-sa.conf beside the config one.

  • [x] 2. CMakeLists.txt and src/main.cpp follow the rename.
  • [x] 3. Checked against homes of its own, the program run offscreen in each:

settings, a prefix and a log all move, over the empty prefixes and
launches the new program had already made; a data folder holding
prefixes is left alone, with one line saying so and nothing swapped; a
second run says nothing and the old roots are gone. A cache already in
use says nothing at all.

  • [x] 4. README: the line about the old location covers all three.

A default icon per file type

<sub>2026-10-30-1753-a-default-icon-per-file-type.md — 2026-10-30 17:53</sub>

A ROM, a disc image or a DOSBox config carries no artwork, so every one of them
ends up under the same generic icon. Options > Default Icons... sets one
icon per file type, from the same "Change Icon" listing the properties dialog
uses, and every item of that type that has no artwork of its own takes it.

The types listed are the ones the launchers claim, so adding smc to RetroArch
makes a row for it appear.

Decisions

  • Where it sits in the chain. An icon picked for the item wins, then the

artwork the file itself carries (an .exe's resources, a .desktop's icon,
the one a DOSBox [ui] names, Steam's cached artwork), then the default for
the file type, then the generic fallbacks that exist today. So an .exe
dropped on a group keeps its own icon and only falls back to the default
when it has none, which is what was asked.

  • The desktop's mime icon moves below it. A document's type icon from the

icon theme is itself a generic default; one set here is deliberate and must
win over it.

  • Stored by extension, not by launcher. A .iso is one file type whoever

runs it, and two launchers claiming it must not disagree.

  • An icon is a file and an index, as an item's is: the listing offers every

icon an .exe or .ico holds, and the index chooses between them.

  • A type that no longer belongs to any launcher keeps its row if an icon

was set for it, so removing an extension from a launcher by accident does
not throw the setting away.

  • The open desktop is refreshed when the dialog is accepted: items whose

icon was derived rather than picked take the new default without a restart.

Steps

  • [x] 1. src/DefaultIcons.{h,cpp}: `struct DefaultIcon { QString file; int

index; bool legacy; }, everyFileType()` (the extensions every launcher
claims, plus those already set), defaultIcons() / setDefaultIcons()
over the defaultIcons group of the settings, and
defaultIconForPath() loading and caching the artwork.

  • [x] 2. src/ItemDetails.cpp completeProgramItem(): the default after the

per-kind discovery and before the theme and style fallbacks, with the
document mime icon moved below it.

  • [x] 3. src/DefaultIconsDialog.{h,cpp}: the table -- file type, the icon and

the file it comes from -- with Change Icon... opening
IconPickerDialog on the row's current icon and Clear emptying it.

  • [x] 4. CMakeLists.txt; src/MainWindow.cpp: the Options entry, and the

open groups re-deriving their icons afterwards
(GroupWindow::refreshDerivedIcons()).

  • [x] 5. Checked offscreen: the table lists the types of every launcher; an

icon set for nes reaches a .nes item and no other type; with an icon
set for exe, Pharaoh.exe still shows its own 32x32 artwork while a
file with no resources in it takes the default; clearing puts the
generic icon back.

  • [x] 6. README: a "Default icons" section with the order the icons are

resolved in, and docs/images/default-icons.png taken by the
screenshots tool, which now shoots this dialog too.

The time and the date part, and the time opens a clock face

<sub>2026-10-31-1305-the-time-and-the-date-part-and-the-time-opens-a-clock-face.md — 2026-10-31 13:05</sub>

The strip's clock is one label reading "10:09 31/10/2026", and clicking
anywhere on it opens the month. The two are separated: the time on its own
opens a round clock with hands, the date on its own keeps opening the month.

Decisions

  • A pane of the same kind as the month and the calculator: a popup with the

banner down its left side, a band across the top, and the face painted below
it. Nothing in it is clickable -- it shows the time, it is not an alarm.

  • The band carries the date in full, the day name included, which is what a

clock face cannot say.

  • The hands are drawn, not glyphs: hour and minute in the window text

colour, the second hand in the caption colour so it reads as the moving one,
and twelve marks round the edge with the quarters heavier.

  • The second hand ticks only while the pane is open. Its timer runs on

show and stops on hide, the strip's own clock being the one that has to keep
time.

  • One kiosk setting still governs both labels. showCalendar hides the

clock today; splitting the label is not a reason for a second setting in
Options > Settings.

Steps

  • [x] 1. src/ClockPane.{h,cpp}: the popup -- banner, band with the long date,

painted face with hour, minute and second hands, a timer that runs while
it is visible.

  • [x] 2. src/TitleBar.{h,cpp}: m_clock becomes the time alone and m_date

the date; each gets its tooltip, its cursor and its pane; applyPalette,
applyKioskSettings and titleArea take in the second label.

  • [x] 3. CMakeLists.txt: the new pair of files.
  • [x] 4. tools/Screenshots.cpp, README: the strip's third pane is shot and

shown, docs/images/clock.png.

  • [x] 5. Built, and looked at offscreen: the dial with its marks and its three

hands in docs/images/clock.png, and the strip in docs/images/main.png
reading "13:04 31/10/2026" as it did when it was one label.

The time and the date light up under the pointer

<sub>2026-10-31-1330-the-time-and-the-date-light-up-under-the-pointer.md — 2026-10-31 13:30</sub>

The two labels the clock was split into open panes when clicked but show
nothing under the pointer, so neither looks like something to click.

Decisions

  • They become caption buttons rather than painted labels. The strip's

other clickable things are QToolButtons in auto-raise, and a button gets
the hover and the pressed look from the style, with no colour of ours to
keep in step with the scheme.

  • The space around them moves into the layout. A button's own padding is

what the hover panel hugs, so the margins that kept the clock clear of the
title and the window buttons are added as spacing beside them instead.

  • Their clicks become clicked(), which is what a button has, so the two

branches watching for a press in the event filter go.

Steps

  • [x] 1. src/TitleBar.h: m_clock and m_date become QToolButton *.
  • [x] 2. src/TitleBar.cpp: built as text-only auto-raise buttons with the

spacing beside them, opening their panes from clicked(); the event
filter loses the two label branches.

  • [x] 3. Built, and looked at the strip in docs/images/main.png: the two

read flat at rest, "14:59 31/10/2026", with the gap between them and
the room beside them kept. The hover and the pressed look are the
style's own, as on the caption buttons next to them.

The window menu's active entry has no checkbox

<sub>2026-11-02-2042-the-window-menus-active-entry-has-no-checkbox.md — 2026-11-02 20:42</sub>

The Window menu lists one entry per open group, and the active group's entry
carried a checkbox. It said nothing the menu does not already say — the
active window is the one in front — so the check is gone.

Steps

  • [x] 1. src/MainWindow.cpp, updateWindowMenu(): drop setCheckable(true)

and setChecked(...) on the per-window actions; the triggered handler
that activates or restores the window is unchanged.

  • [x] 2. Built the pmane-sa target to confirm the change compiles and links.

A Documents launcher with a customizable extension list

<sub>2026-11-02-2110-a-documents-launcher-with-a-customizable-extension-list.md — 2026-11-02 21:10</sub>

The launchers dialog gains a "Documents" launcher that opens files with the
application the desktop has registered for their type. The extensions it
handles — and accepts when a file is dropped on an item — are editable in
Options > Launchers, in the launcher's "File types" field; pdf and cbz
stay the defaults. For now every extension opens with the default app.

Decisions

  • Documents become a launcher family (id "documents"), like wine or

DOSBox, so the existing per-launcher extensions field, persistence and
claiming logic are reused instead of a second hardcoded list.

  • A new flag usesDefaultApp on Launcher: such a launcher has no

programs to configure, so the launchers dialog hides the runners table for
it and says the files open with the desktop's default application.
Launching still goes through the existing isDocument branch in
ItemLauncher (QDesktopServices::openUrl), now driven by the launcher's
extension list.

  • isDocument is claimedBy("documents", ...), so handled, droppable

(isLaunchable, drops in GroupWindow) and the icon/mime paths all follow
the same list.

  • The browse filter in the properties dialog is built from the launcher's

extensions instead of the hardcoded *.pdf *.cbz.

  • The "File types:" label stays: it is generic across launchers.

Steps

  • [x] 1. src/Launchers.h: add usesDefaultApp to Launcher.
  • [x] 2. src/Launchers.cpp: add the "documents" launcher to

defaultLaunchers() with extensions pdf, cbz.

  • [x] 3. src/ItemKind.cpp: isDocument() delegates to the launcher.
  • [x] 4. src/ItemPropertiesDialog.cpp: browse filter built from the

launcher's extensions.

  • [x] 5. src/LaunchersDialog.{h,cpp}: hide the runners section for a

usesDefaultApp launcher, show a note instead.

  • [x] 6. Build pmane-sa (serial, cmake --build build --target pmane-sa;

the PATH cmake is shadowed by a broken VSCode-extension copy, so
/usr/bin/cmake run with LD_LIBRARY_PATH unset was used).

Window > Refresh, and an automatic icon refresh when a drive mounts

<sub>2026-11-07-2221-window-refresh-and-an-automatic-icon-refresh-when-a-drive-mounts.md — 2026-11-07 22:21</sub>

A new Window > Refresh entry re-reads every group's icons from disk. It exists
because a drive may not be mounted when the desktop loads, so an item's
executable or artwork is missing and the item falls back to a generic icon;
once the drive mounts, Refresh reads the real icon. Nothing is removed when a
file is still unavailable: the item keeps its fallback icon, and a user-picked
icon is retried on each refresh.

The same refresh runs automatically when a mount point appears. That is
event-driven, not polled: the kernel's mount table /proc/self/mountinfo
supports poll() and wakes exactly once per mount or unmount (verified with a
user-namespace test: poll returned POLLIN|POLLERR once per mount/umount,
while inotify on the same file stayed silent). QSocketNotifier wraps that
fd in the event loop, so nothing runs unless the kernel reports a change. Only
new mount points emit; unmounts do not, so an icon already read is kept.

Decisions

  • New src/MountWatch.{h,cpp}: opens /proc/self/mountinfo, arms a

QSocketNotifier on the fd, and on wake re-reads the table, compares the
set of mount points with the one in memory, and emits mounted() only when
a mount point was added. A short single-shot timer coalesces a burst of
events into one signal; it is started by the kernel event, never on its own.

  • GroupWindow::refreshDerivedIcons(bool includeChosen = false): the

existing call from Options > Default Icons keeps its behaviour. With
includeChosen the refresh also retries icons picked in the properties
dialog (iconIndex >= 0), keeping iconIndex/iconSource and letting
completeProgramItem() reload them from disk, falling back as usual when
the file is still missing.

  • Window > Refresh is a persistent QAction (F5, QKeySequence::Refresh)

created in buildMenus(), added to the window so the shortcut works before
the menu opens, and re-added in updateWindowMenu() next to Undo/Redo/Tile,
like those.

  • MainWindow::refreshIcons() refreshes every group and rebuilds the

preview icons of the minimized-group icons, which are snapshots taken at
minimize time.

Steps

  • [x] 1. Write src/MountWatch.h / src/MountWatch.cpp.
  • [x] 2. src/GroupWindow.h/.cpp: refreshDerivedIcons(bool includeChosen).
  • [x] 3. src/MainWindow.h/.cpp: m_refreshAction, refreshIcons(), the

MountWatch member, the Window menu entry.

  • [x] 4. CMakeLists.txt: add the new files to PMANE_SOURCES.
  • [x] 5. Build pmane-sa and fix any errors.
  • [x] 6. Mark the plan complete, write sumup.md, archive the plan.

<sub>Filed by prel from the completed plans at commit time.</sub>