Phase 1 shipped a fixed 6-button toolbar. Phase 2 moves visibility to
the config so users pick which buttons appear.
Config (config.rs):
- new ToolbarItems struct (CosmicConfigEntry) with one bool per button
- Config.toolbar: ToolbarItems, default = 'minimal 6' set from phase 1
(new_folder, rename, delete, cut, copy, paste) + 5 extras off
(new_file, reload, toggle_show_hidden, open_terminal, location_up)
Rendering (view()):
- iterate through self.config.toolbar fields in fixed logical order
(location → create/edit → clipboard → view toggles)
- dividers inserted only between non-empty groups
- whole toolbar hidden if every button is off (no empty container)
Settings page (settings()):
- new 'Toolbar' section with one toggler per button, wired through
Message::SetToolbar(ToolbarItems) which persists via config_set!
i18n (en + fr):
- added 'toolbar' + 'parent-directory' strings
- reused existing new-folder / new-file / rename / delete / cut / copy /
paste / reload-folder / show-hidden-files / open-in-terminal
All actions dispatch through Action::message so keybindings and toolbar
share one code path.
document-edit-symbolic isn't in the Cosmic theme (checked Cosmic, Pop,
Adwaita, WhiteSur-dark ship lists) so it rendered empty. The Cosmic
theme ships pencil-symbolic which matches the edit/rename semantics
and is guaranteed to resolve through the current icon theme chain.
edit-rename-symbolic isn't part of the COSMIC/Pop/Adwaita/WhiteSur-dark
icon sets, so the Rename button rendered empty. Swap to
document-edit-symbolic which is present in Adwaita (the standard fallback
in the freedesktop-icons resolution chain) and semantically fits edit/rename.
Adds a full-width row of 6 icon buttons between the tab bar and the
tab view: New folder · Rename · Delete | Cut · Copy · Paste. Paste is
disabled when the clipboard is empty (existing self.clipboard_has_content
check). A vertical divider separates file-ops (3 first) from clipboard
ops (3 last).
Implementation reuses Action::message(entity_opt = None) so keybinding
and toolbar dispatch share exactly the same code path — no duplication.
Icons are freedesktop *-symbolic names so they inherit the COSMIC
theme's symbolic color. Tooltips use the existing fl!() strings
(new-folder / rename / delete / cut / copy / paste, EN + FR).
Customization (pick which buttons show up) is deferred to a follow-up
commit — this first pass is fixed at the minimal-6 set per the user's
spec.
Propagates the [patch] blocks added in cosmic-yoterm v5 to keep the
whole yoda app family on a single Wayland-only stack. Without these,
iced_winit fails to select a window_clipboard version because our
fork exposes a `wayland` feature that upstream doesn't.
- window_clipboard → /home/lionel/Devels/window_clipboard (x11 gated
behind opt-in feature)
- cosmic-text → /home/lionel/Devels/cosmic-text (EAW terminal_cells +
upstream PR#503 applied)
The 'Open with...' dialog let you pick an app but never remembered your
choice — you'd see the same dialog again next time. The infrastructure
was already there (MimeAppCache::set_default writes to mimeapps.list),
just never wired to the UI.
Adds a toggler below the app list labelled 'Always use this app for this
file type' (EN) / 'Toujours utiliser cette application pour ce type de
fichier' (FR). When enabled, after spawning the selected app, the
default handler for the file's mime type is persisted via
self.mime_app_cache.set_default(mime, app.id).
Implementation:
- DialogPage::OpenWith gains a set_default: bool field (defaulted false)
- Message::OpenWithToggleDefault(bool) + handler mutates the dialog state
- DialogComplete handler for OpenWith calls set_default after a clean
spawn when the flag is set
- Dialog rendering adds a .control(widget::row) with label + toggler,
between the scrollable list and the action buttons
- i18n strings added: en/fr open-with-set-default
mime_app::MimeAppCache::terminal() hardcoded "com.system76.CosmicTerm"
as the only non-xdg-default fallback. On a yoda stack the relevant
terminal is our fork cosmic-yoterm (desktop id com.aditua.CosmicYoterm),
so we add it first in preference_order. xdg-mime default still wins
when set — this just covers the case where it isn't.
Fixes "Open in terminal" launching Konsole (or first random terminal in
apps list) instead of cosmic-yoterm when xdg-mime default is unset or
points to something else.
Rewire cosmic-files (lib + file manager) onto the yoda fork of libcosmic.
- [dependencies.libcosmic] removed, replaced by [dependencies.libcosmic-yoda]
pointing at ../libcosmic (local path; the leyoda/libcosmic-yoda clone)
- Features: winit dropped, wayland added explicitly in the default set
- Feature refs "libcosmic/xxx" rewritten to "libcosmic-yoda/xxx"
- [patch] block removed — transitive libcosmic refs no longer exist
cosmic-files lib and the file manager binary build clean against
libcosmic-yoda 0.1.0-yoda (3 warnings, all pre-existing unused-var
in search code).
Activates the [patch.'https://github.com/pop-os/libcosmic'] override
pointing at ../libcosmic, enabling local development against a
patched libcosmic checkout (e.g. to pick up
WindowControlsPosition / macOS-style window controls).
This branch is intentionally dev-local: do NOT merge upstream.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tokio recommends using a sync mutex with a notifier instead of the
async mutex where possible. Rust forbids holding a sync mutex guard
across await points so we can prevent a potential deadlock this way.
This adds a custom channel based on the tokio mpmc example for
handling gvfs events from callbacks to avoid the async mutex
requirement. Messages are held in a `VecDeque` behind a sync mutex
and the receiver will get notified via the notifier when a message
is added to the queue.
Weak references used in gio callbacks in case the sender is dropped
by the application.
This caused the tab subscription to block the tokio executor.
Instead store the image dimensions in the `Item`, which is
created on a background thread.
Allow for joining operations into a single Task that
will produce a single Message:PendingResults message such
that multiple Message::PendingComplete and Message::PendingError
messages can be handled together to, for example, show
a single error dialog with multiple errors.