Add a Files page, and links out to the editors that own their own dialogs

The application has no support-file search path — the four folders it uses
are functions returning fixed paths, not settings. Rather than build a Files
page that pretends otherwise, this one answers the question people actually
open it to ask: where does this thing keep my plot styles. Each row shows the
location and opens it in the file manager, and a row whose path the platform
could not give says so with its button disabled.

General gains buttons through to the plugin manager, the keyboard shortcut
editor and the alias editor. Those three have good dialogs of their own and
are not absorbed; Options simply stops being a place you cannot reach them
from.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
PanosandClaude Opus 5 committed 2026-09-10 08:45:20 +03:00
1 parent 5a638f243a
commit 7ea1aef95e
4 files changed
+109

No files matched your search

+2
View File
@@ -2044,6 +2044,8 @@ pub enum Message {
UcsIconAtOriginChanged(bool),
/// Toggle selection cycling from Options; the status-bar pill toggles the same flag.
SelectionCyclingChanged(bool),
/// Reveal one of the application's own folders in the system file manager.
OpenFolder(String),
/// Change isolines per surface in the current drawing (ISOLINES).
IsolinesChanged(i16),
/// Toggle silhouette edges in the current drawing (DISPSILH).
+2
View File
@@ -6363,6 +6363,8 @@ impl OpenCADStudio {
Task::none()
}
Message::OpenFolder(path) => crate::sys::open_url(&path, None),
Message::PickDragRectToggled(rectangle) => {
self.pick_drag_rect = rectangle;
self.persist_settings_if_changed();
+11
View File
@@ -230,6 +230,17 @@ impl OpenCADStudio {
.map_or(1, |h| h.show_solid_history),
}
},
crate::ui::window::options::Folders {
config: crate::config::config_dir()
.map(|p| p.display().to_string()),
plot_styles: crate::io::plot_style::plot_styles_dir()
.ok()
.map(|p| p.display().to_string()),
plugins: crate::plugin::external::plugins_dir()
.map(|p| p.display().to_string()),
autosave: crate::config::config_dir()
.map(|_| std::env::temp_dir().display().to_string()),
},
self.double_click_block_refedit,
self.double_click_block_attedit,
self.cursor_type,