mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-02 20:51:23 -07:00
Version check. #1006
This commit is contained in:
parent
bc9ff47d3f
commit
f5bda326b8
4 changed files with 57 additions and 1 deletions
|
|
@ -180,6 +180,7 @@ sub _build_field {
|
|||
} elsif ($opt->{type} eq 'bool') {
|
||||
$field = Wx::CheckBox->new($self->parent, -1, "");
|
||||
$field->SetValue($opt->{default});
|
||||
$field->Disable if $opt->{readonly};
|
||||
EVT_CHECKBOX($self->parent, $field, sub { $self->_on_change($opt_key, $field->GetValue); });
|
||||
$self->_setters->{$opt_key} = sub { $field->SetValue($_[0]) };
|
||||
$tooltip .= " (default: " . ($opt->{default} ? 'yes' : 'no') . ")" if defined($opt->{default});
|
||||
|
|
|
|||
|
|
@ -22,6 +22,14 @@ sub new {
|
|||
values => ['simple','expert'],
|
||||
default => $Slic3r::GUI::Settings->{_}{mode},
|
||||
},
|
||||
{
|
||||
opt_key => 'version_check',
|
||||
type => 'bool',
|
||||
label => 'Check for updates',
|
||||
tooltip => 'If this is enabled, Slic3r will check for updates daily and display a reminder if a newer version is available.',
|
||||
default => $Slic3r::GUI::Settings->{_}{version_check} // 1,
|
||||
readonly => !Slic3r::GUI->have_version_check,
|
||||
},
|
||||
],
|
||||
on_change => sub { $self->{values}{$_[0]} = $_[1] },
|
||||
label_width => 100,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue