Skip to content

add more apps and search bars#19

Merged
Charliechen114514 merged 4 commits into
mainfrom
feat/noter-and-search
Jul 1, 2026
Merged

add more apps and search bars#19
Charliechen114514 merged 4 commits into
mainfrom
feat/noter-and-search

Conversation

@Charliechen114514

Copy link
Copy Markdown
Member

No description provided.

MS4 launcher closes up: search box, system-app discovery, and a second
standalone App ported from CCIMXDesktop.

- DesktopEntryIndex: scan XDG .desktop (~/.local/share/applications +
  /usr/share/applications), parse Type=Application && !NoDisplay, strip
  Exec %-fields (firefox %u -> firefox). loadAppsConfig merges builtin +
  manifest + .desktop sources.
- AppLauncher: QLineEdit search box, textChanged live-filters the grid
  by display_name (case-insensitive).
- Noter app (apps/noter/): ported from CCIMXNoter, QuarkWidgets MD3
  Button toolbar (Open/Save/Bold/Italic + size slider) + QTextEdit,
  manifest launch_kind=auto. Second standalone App, validates that the
  migration recipe (calculator was first) reproduces.
- Tests: DesktopEntryIndex 7 cases (parse / NoDisplay / non-Application /
  Exec cleanup / basename fallback); full suite green.

MS4 launcher now closes (grid + search + launch); only entry/exit
animation remains.
Three standalone apps migrated in parallel (agent-driven), validating
that the Noter migration recipe reproduces at scale.

- SystemState (apps/system_state/): CPU + memory readout via cfbase
  probes (getCPUProfileInfo, getCPUBonusInfo, getSystemMemoryInfo) +
  QTimer refresh; reuses the base layer instead of CCIMX's platform
  driver chain. Process browser page skipped (base has no process
  enumerator yet).
- AlarmyClock (apps/alarm_clock/): 1s wall-clock poll, QSpinBox editor
  + QListWidget armed list, QMessageBox ring (audio TODO); the
  event-bus/ClockEventProcessor abstraction collapsed to a direct call.
- Calendar (apps/calendar/): QCalendarWidget + per-date notes
  (in-memory QMap, persistence TODO).

Fixes during integration:
- alarm_clock: Q_DECLARE_METATYPE moved to the global namespace (moc
  requires it outside the type's own namespace).
- calendar: dropped QCalendarWidget::setVerticalGridLineVisible (no
  such API) and Qt::DefaultLocaleLongDate (removed in Qt6) -> Qt::TextDate.

All three build green; Doxygen passes.
Two CFDesktop shells on one screen fought over fullscreen geometry and
the WindowManagers cross-tracked each other's windows (bug: window
shuffle + desktop shrinking). The shell is meant to be single-instance
but had no guard.

Add acquireSingleInstanceLock(): a QLockFile on
$TMPDIR/cfdesktop-shell.lock held for the whole process lifetime.
main() exits cleanly when it cannot acquire. QtCore-only QLockFile --
no QtNetwork/D-Bus, suits the 6ULL rule; stale locks from a crash are
reclaimed automatically via PID check.

Verified: launching a second instance exits immediately, leaving one
process and the lock file in place.
The previous single-instance commit declared acquireSingleInstanceLock()
with CF_DESKTOP_EXPORT in desktop_entry.h, but desktop_entry.cpp lives in
the CFDesktopMain STATIC lib which is compiled WITHOUT CFDESKTOP_EXPORTS.
On MSVC the function was therefore treated as dllimport (not dllexport) --
no actual definition was emitted -> LNK2019 unresolved external when
main.cpp referenced it. Linux linked fine because static linking merges
symbols regardless of declspec.

Move acquireSingleInstanceLock() into main.cpp's anonymous namespace (the
CFDesktop exe target). It only serves main() and never needs to cross the
CFDesktop_shared dll boundary, so dropping the export is correct, not a
workaround. desktop_entry reverts to just boot_desktop/run_desktop_session.

Verified on Linux: single-instance still works (second instance exits,
lock file created). The MSVC link error should be gone since the symbol
no longer crosses the dll boundary.
@Charliechen114514 Charliechen114514 merged commit cfcc6ff into main Jul 1, 2026
6 checks passed
@Charliechen114514 Charliechen114514 deleted the feat/noter-and-search branch July 1, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant