mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 15:13:58 -06:00
Merge branch 'master' into simple-mode
This commit is contained in:
commit
b901e1f6c8
48 changed files with 1711 additions and 711 deletions
|
@ -60,14 +60,15 @@ sub OnInit {
|
|||
# locate or create data directory
|
||||
$datadir ||= Wx::StandardPaths::Get->GetUserDataDir;
|
||||
Slic3r::debugf "Data directory: %s\n", $datadir;
|
||||
my $run_wizard = (-d $datadir) ? 0 : 1;
|
||||
for ($datadir, "$datadir/print", "$datadir/filament", "$datadir/printer") {
|
||||
my $encoded_datadir = Slic3r::encode_path($datadir);
|
||||
my $run_wizard = (-d $encoded_datadir) ? 0 : 1;
|
||||
for ($encoded_datadir, "$encoded_datadir/print", "$encoded_datadir/filament", "$encoded_datadir/printer") {
|
||||
mkdir or $self->fatal_error("Slic3r was unable to create its data directory at $_ (errno: $!).")
|
||||
unless -d $_;
|
||||
}
|
||||
|
||||
# load settings
|
||||
if (-f "$datadir/slic3r.ini") {
|
||||
if (-f "$encoded_datadir/slic3r.ini") {
|
||||
my $ini = eval { Slic3r::Config->read_ini("$datadir/slic3r.ini") };
|
||||
$Settings = $ini if $ini;
|
||||
$Settings->{_}{mode} ||= 'expert';
|
||||
|
@ -422,8 +423,9 @@ sub notify {
|
|||
my $notifier = $serv->get_object('/org/freedesktop/Notifications',
|
||||
'org.freedesktop.Notifications');
|
||||
$notifier->Notify('Slic3r', 0, $self->{icon}, $title, $message, [], {}, -1);
|
||||
}
|
||||
};
|
||||
undef $Net::DBus::bus_session;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue