Opening a .desktop file launches the application it describes, so the
file manager offered no way to look at or change the file itself: the
only way out was a terminal. Reported upstream on 2025-05-11 and still
open.
Add an "Edit desktop entry" action to the context menu, next to the
entry own desktop actions. It opens the file with the default
text/plain handler instead of its application/x-desktop one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The location bar inherits its type from the tab's current location
(Message::EditLocationEnable), and the view has exactly two branches, next
to the existing "TODO: allow editing other locations": a Location::Network
is edited through with_uri, anything else through with_path. Typing
smb://server/share while standing in a local folder therefore produced
Path("smb://server/share"), which is not a directory, and the navigation
was dropped. The reverse direction was broken the same way: from the
Networks view a local path was passed to with_uri and became a bogus
network location.
EditLocationSubmit now decides by parsing the text instead of by the
location it came from:
* parses as a URL with a scheme other than "file" and has a host
-> Location::Network, using url::Url::as_str(), which also normalizes
away surrounding whitespace.
* fails to parse and the current location is a Network
-> Location::Path, with the text untrimmed, because a directory name
may legitimately end in a space.
* anything else is left as it was, so network:/// and foo:bar keep
behaving exactly as before.
The reliable indicator for "this is a path" is that parsing fails, not
that the host is missing: network:/// and file:///home both parse with
has_host() == false. Verified against url 2.5.8.
An unmounted share cannot be resolved, since Tab::resolve sends network
locations through mounter.dir_info, so resolve() returns None and the
navigation would be dropped again. Navigating there is what triggers the
mount, because Cmd::NetworkScan mounts the location it is asked to scan,
so the typed URI is used as a fallback. That fallback is restricted to
input recognised by the first rule above; applying it to any network
location would let unparseable text through, and because with_uri keeps
the display name and path of the previous location, the window would look
normal while the listing stayed empty.
Known cosmetic side effect: while the share is not mounted, resolve()
yields nothing and the tab shows the raw URI as its name. It is replaced
by the proper name as soon as the mount completes.
Drafted with AI assistance (Claude Code); the change was reviewed, built
and tested by me on real hardware as described.
Signed-off-by: chris-010 <10660568+chris-010@users.noreply.github.com>
- Adds context menu to text input fields
- Adds selectable text to context drawer, but only to file name,
created/modified/accessed date. I'm sure more places could use the
selectable text.
- Also pulls the latest changes in Iced and libcosmic that removes
"redraw on any message", which means moving the cursor doesn't
automatically call a redraw, widgets need to ask for it. I have found
all places that previously was working normally because we were
redrawing almost unconditionally. But it is possible that a custom
widget somewhere still isn't asking for a redraw explicitly when its
state changes. So, for QA I'd keep an eye on that.
Depends on:
- [x] https://github.com/pop-os/libcosmic/pull/1288
- [x] https://github.com/pop-os/iced/pull/378
- [x] https://github.com/pop-os/libcosmic/pull/1384
- [x] https://github.com/pop-os/libcosmic/pull/1388https://github.com/user-attachments/assets/caf8f940-0793-4665-844a-b6153b35d7bb
___
- [x] I have disclosed use of any AI generated code in my commit
messages.
- If you are using an LLM, and do not fully understand the changes it is
making to the code base, do not create a PR.
- In our experience, AI generated code often results in overly complex
code that lacks enough context for a proper fix or feature inclusion.
This results in considerably longer code reviews. Due to this, AI
authored or partially authored PRs may be closed without comment.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
Selecting a broken network mount triggers an infinite loop of dialogs
that requires killing the app:
1. Click invalid network mount
2. Try to mount network path
3. Show failure dialog
4. Trigger `NetworkDriveOpenEntityAfterMount`
* BUG: This fires even if the mount failed or the user canceled the
dialog!
6. Goto 2
Fix by having `network_drive(...)` return a Boolean indicating whether
the mount actually happened and using that to break the infinite error
loop.
Fixes#1629
Sample broken network path that triggers the infinite dialog when
selected:
**~/.config/cosmic/com.system76.CosmicFiles/v1/favorites**
```ron
[
Home,
Documents,
Downloads,
Network(
uri: "sftp://myserver/shared",
name: "",
path: "/tmp/fake-network/sftp-host=myserver/mnt",
),
]
```
- [x] I have disclosed use of any AI generated code in my commit
messages.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
Right-clicking inside the trash view now shows 'Empty trash' when
the trash is not empty, in addition to the existing per-item
restore/delete actions and sort options.
The segmented_button widget asserts that context_menu children
count matches model length. The yoda fork was building a single
flat menu for the clicked item instead of iterating over all
nav_model items like upstream, causing an assertion panic on
right-click in the sidebar (trash, folders, etc.).
Align with upstream: iterate self.nav_model.iter() and use
menu::nav_context() instead of menu::items().
At the moment any directory anywhere named "files" is considered trash
by cosmic-files and shown as empty.
This tightens the check on what is a trash directory with a fallback
where it also expect an info directory next to the files directory(only
used if the system doesn't report any trash directory).
As an added bonus I fixed the let _ = THUMB_SEMAPHORE.acquire() that was
immediately discarded and thus dead code.
- [X] I have disclosed use of any AI generated code in my commit
messages.
- If you are using an LLM, and do not fully understand the changes it is
making to the code base, do not create a PR.
- In our experience, AI generated code often results in overly complex
code that lacks enough context for a proper fix or feature inclusion.
This results in considerably longer code reviews. Due to this, AI
authored or partially authored PRs may be closed without comment.
- [X] I understand these changes in full and will be able to respond to
review comments.
- [X] My change is accurately described in the commit message.
- [X] My contribution is tested and working as described.
- [X] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
- [x] I have disclosed use of any AI generated code in my commit
messages.
- If you are using an LLM, and do not fully understand the changes it is
making to the code base, do not create a PR.
- In our experience, AI generated code often results in overly complex
code that lacks enough context for a proper fix or feature inclusion.
This results in considerably longer code reviews. Due to this, AI
authored or partially authored PRs may be closed without comment.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
This commit squashes the 21 local commits that customize cosmic-files for
the yoda stack, to allow a clean rebase on upstream/master.
Original commits (chronological):
- 9bcfe7a Cargo.toml: patch libcosmic via local path for dev builds
- 04abd13 yoda: depend on libcosmic-yoda (path) instead of upstream libcosmic
- 02adcc3 lockfile: libcosmic-yoda 0.1.0-yoda -> 0.1.0-yoda.2
- a025fd6 yoda: prefer cosmic-yoterm over upstream cosmic-term in terminal fallback
- e8d62ae yoda: add "Always use this app" toggle to OpenWith dialog
- 8fb2b15 yoda wayland-v5: redirect window_clipboard + cosmic-text to local forks
- 0595296 yoda: Dolphin-style quick actions toolbar under the headerbar
- 4b6d345 yoda: fix missing rename icon in toolbar
- 8b51af1 yoda: use pencil-symbolic for the Rename toolbar button
- 33a5c8f yoda: phase 2 - customizable toolbar (settings toggles per button)
- 1cf17dc yoda: phase 3 - drag-drop toolbar editor in Settings
- 11d4357 yoda: add up/down buttons next to drag handle in toolbar editor
- af843d2 yoda: direct drag-drop reorder on the toolbar itself
- 94c3e6c yoda: toolbar as segmented_button for working drag reorder
- f053819 yoda: toolbar icon-only + clean visual (Control style, 32px squares)
- 338354c Improve initial directory listing latency
- d080bc8 Resolve cosmic-files warnings without masking
- 69c35ab yoda: switch window_clipboard patch to public Forgejo fork
- 35e115f yoda: switch cosmic-text patch to public Forgejo fork
- 6f3adcd chore: clean feature-gated warnings
- 57ab1ec fix: clean files warnings for terminal build
Original tip preserved as tag backup/pre-rebase-upstream-20260524.
- [x] I have disclosed use of any AI generated code in my commit
messages.
- If you are using an LLM, and do not fully understand the changes it is
making to the code base, do not create a PR.
- In our experience, AI generated code often results in overly complex
code that lacks enough context for a proper fix or feature inclusion.
This results in considerably longer code reviews. Due to this, AI
authored or partially authored PRs may be closed without comment.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
* Syncs extracted zip files on the compio executor's thread
* Close the first zip extract dialog before opening a new one to fix a panic
---------
Co-authored-by: James A DellaMorte <dellamorte.james@comcast.net>