Skip to content

gui: live text filter for the downloads and shared-files tables - #633

Merged
got3nks merged 1 commit into
amule-org:masterfrom
got3nks:feat/list-text-filter
Jul 27, 2026
Merged

gui: live text filter for the downloads and shared-files tables#633
got3nks merged 1 commit into
amule-org:masterfrom
got3nks:feat/list-text-filter

Conversation

@got3nks

@got3nks got3nks commented Jul 27, 2026

Copy link
Copy Markdown

Closes #589.

Adds a Filter box to the header of both the Downloads and Shared Files tables. Type text and the list shows only files whose name contains it (case-insensitive); clearing the box restores the full list. This brings the GUI in line with the new WebUI, which already has it.

Design

Purely GUI-side — the filter operates on the local list model, so it works identically in the monolithic app and the remote GUI (amulegui) with no EC protocol change. Both tables are virtual lists (CMuleVirtualListCtrl), so filtering just changes which items are in the model; SortList() and the OnGetItem* path handle re-render and sorting.

  • Downloads (CDownloadListCtrl): the model already holds every file independent of what's displayed, and the category tabs already gate visibility through a predicate. The filter adds PassesTextFilter() AND-ed into that predicate via IsVisibleInCat(), and changing the text re-runs the same repopulate loop ChangeCategory() uses.
  • Shared files (CSharedFilesCtrl): SetFilterText() rebuilds the model from the master share applying the filter; per-file adds respect it too.

Modeled on the existing search-results filter (CSearchListCtrl).

Notes

  • Reuses the existing _("Filter:") string — no new translations.
  • The shared-files header was relaid out (equal-proportion side regions) so the "Show Clients for" radio group stays window-centered next to the new filter box.
  • New control IDs picked above the wxDesigner-generated range, per the muuli_wdr convention.

Built clean on macOS and Linux for both the monolithic app and amulegui; interactive testing in both tables underway.

Type in the new Filter box in either table's header to show only files
whose name contains the text (case-insensitive); clearing it restores
the full list. Requested in the GUI to match the WebUI.

Purely GUI-side (filters the local list model), so it works identically
in the monolithic app and the remote GUI (amulegui) — no EC protocol
change. Both tables are virtual lists, so filtering just changes which
items are in the model and SortList() handles the rest.

- Downloads: SetFilterText() + a PassesTextFilter()/IsVisibleInCat()
  predicate AND-ed into the existing category show/hide path.
- Shared files: SetFilterText() rebuilds the model from the master share
  applying the filter; per-file adds respect it too.
- Reuses the existing _("Filter:") string — no new translations.
- Shared header relaid out so the 'Show Clients for' radios stay
  window-centered next to the new filter box.
@got3nks
got3nks merged commit e480e1c into amule-org:master Jul 27, 2026
14 checks passed
@got3nks
got3nks deleted the feat/list-text-filter branch July 27, 2026 08:52
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.

Request: Add text filer in download and shared files tables

1 participant