+ void config_file_changed ()
+ {
+ Config* config = Config::instance();
+ boost::filesystem::path new_file = wx_to_std(_config_file->GetPath());
+ if (new_file == config->config_file()) {
+ return;
+ }
+ bool copy_and_link = true;
+ if (boost::filesystem::exists(new_file)) {
+ ConfigMoveDialog* d = new ConfigMoveDialog (_panel, new_file);
+ if (d->ShowModal() == wxID_OK) {
+ copy_and_link = false;
+ }
+ d->Destroy ();
+ }
+
+ if (copy_and_link) {
+ config->write ();
+ if (new_file != config->config_file()) {
+ config->copy_and_link (new_file);
+ }
+ } else {
+ config->link (new_file);
+ }
+ }
+