Add native file dialogs for workspace and export paths

A 📂 button beside each path field opens a native picker: a folder
chooser for the workspace and an .odt save dialog for the export (which
appends the extension if omitted). Uses rfd with the XDG Desktop Portal
backend, so there is no GTK build dependency and no new shared library
at runtime.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
landon
2026-07-26 14:17:24 -05:00
parent 7008463ebf
commit 7271e5e2ef
5 changed files with 339 additions and 42 deletions
+9
View File
@@ -44,6 +44,14 @@ sudo apt install -y \
libx11-6 libx11-xcb1 libxcursor1 libxi6 libxrandr2 libxinerama1 libxrender1
```
The **📂 Browse** buttons open native file dialogs through the XDG Desktop
Portal. On GNOME this is already installed, but if the dialogs don't appear,
ensure the portal and a file-chooser backend are present:
```sh
sudo apt install -y xdg-desktop-portal xdg-desktop-portal-gtk
```
---
## 2. Get the source onto the tablet
@@ -188,6 +196,7 @@ rm -f ~/.local/share/applications/md-manuscript.desktop
|---|---|
| `error while loading shared libraries: libGL.so.1` (or similar) | Install the runtime libraries in step 1b. |
| Window fails with *"neither WAYLAND_DISPLAY nor DISPLAY is set"* | You're in a text-only session/SSH; run it from the tablet's graphical desktop. |
| **📂 Browse** buttons do nothing / no dialog appears | Install `xdg-desktop-portal` and `xdg-desktop-portal-gtk` (step 1b); you can still type paths by hand. |
| Build error mentioning `rustc … is not supported` | `rustup update`, then `cargo build --release` again. |
| `cargo: command not found` | Run `. "$HOME/.cargo/env"` or open a new terminal after installing rustup. |
| UI text far too small/large | Adjust GNOME *Displays → Scale*, or set `WINIT_X11_SCALE_FACTOR` (X11). |