feat(options): offer the file association in Options
Registering as the .dwg/.dxf handler was reachable only by typing FILEASSOC, which is also the only thing that installs the icons the desktop shows — so a user with no reason to know the command had no way to arrive at either. The checkbox makes the same two calls the command does, so the stored setting and the actual registration cannot drift apart. A registration the system refuses puts the checkbox back rather than leaving it showing a state that is not true. The line under it says the icons come with it, since that is what sends people looking for this in the first place. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
7c8271c716
commit
26b4f29a13
4 changed files with 54 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ impl<T> fmt::Display for Labelled<T> {
|
|||
|
||||
pub fn view_window<'a>(
|
||||
default_save_format: &'a str,
|
||||
file_assoc_enabled: bool,
|
||||
ui_theme: &'a UiThemeConfig,
|
||||
theme_color_inputs: &'a [String; 6],
|
||||
language: crate::i18n::Language,
|
||||
|
|
@ -137,6 +138,22 @@ pub fn view_window<'a>(
|
|||
text(crate::tr!("options-default-save-format-help"))
|
||||
.size(11)
|
||||
.width(sizing.width),
|
||||
Space::new().height(14),
|
||||
row![
|
||||
iced::widget::checkbox(file_assoc_enabled)
|
||||
.on_toggle(Message::FileAssocChanged)
|
||||
.size(15),
|
||||
text(crate::t!("Open .dwg and .dxf files with Open CAD Studio"))
|
||||
.size(12),
|
||||
]
|
||||
.spacing(8)
|
||||
.align_y(iced::Center),
|
||||
Space::new().height(6),
|
||||
text(crate::t!(
|
||||
"Also installs the application and file-type icons the desktop shows."
|
||||
))
|
||||
.size(11)
|
||||
.width(sizing.width),
|
||||
Space::new().height(22),
|
||||
text(crate::tr!("options-theme-section")).size(15),
|
||||
Space::new().height(10),
|
||||
|
|
|
|||
Loading…
Reference in a new issue