… | |
… | |
2227 | $BUTTONBAR->add (new CFPlus::UI::Button |
2227 | $BUTTONBAR->add (new CFPlus::UI::Button |
2228 | text => "Save Config", |
2228 | text => "Save Config", |
2229 | tooltip => "Saves the options chosen in the client setting, server settings and the window layout to be restored on later runs.", |
2229 | tooltip => "Saves the options chosen in the client setting, server settings and the window layout to be restored on later runs.", |
2230 | on_activate => sub { |
2230 | on_activate => sub { |
2231 | $::CFG->{layout} = CFPlus::UI::get_layout; |
2231 | $::CFG->{layout} = CFPlus::UI::get_layout; |
2232 | CFPlus::write_cfg "$Deliantra::VARDIR/cfplusrc"; |
2232 | CFPlus::write_cfg "$Deliantra::VARDIR/client.cf"; |
2233 | status "Configuration Saved"; |
2233 | status "Configuration Saved"; |
2234 | 0 |
2234 | 0 |
2235 | }, |
2235 | }, |
2236 | ); |
2236 | ); |
2237 | |
2237 | |
… | |
… | |
2355 | EV::unloop; |
2355 | EV::unloop; |
2356 | #d# TODO calling exit here hangs the process in some futex |
2356 | #d# TODO calling exit here hangs the process in some futex |
2357 | }; |
2357 | }; |
2358 | |
2358 | |
2359 | { |
2359 | { |
|
|
2360 | if (-e "$Deliantra::VARDIR/client.cf") { |
|
|
2361 | CFPlus::read_cfg "$Deliantra::VARDIR/client.cf"; |
|
|
2362 | } else { |
|
|
2363 | #TODO: compatibility cruft |
2360 | CFPlus::read_cfg "$Deliantra::VARDIR/cfplusrc"; |
2364 | CFPlus::read_cfg "$Deliantra::OLDDIR/cfplusrc"; |
|
|
2365 | print STDERR "INFO: used old configuratrion file\n"; |
|
|
2366 | } |
|
|
2367 | |
2361 | CFPlus::DB::Server::run; |
2368 | CFPlus::DB::Server::run; |
2362 | |
2369 | |
2363 | CFPlus::UI::set_layout ($::CFG->{layout}); |
2370 | CFPlus::UI::set_layout ($::CFG->{layout}); |
2364 | |
2371 | |
2365 | my %DEF_CFG = ( |
2372 | my %DEF_CFG = ( |