+PreferencesConfirmDialog::PreferencesConfirmDialog(PreferencesThread *thread,
+ const char *reason, int close)
+{
+ this->thread = thread;
+ this->close = close;
+ sprintf(query, _("Busy: %s in progress. Are you sure?"), reason);
+}
+PreferencesConfirmDialog::~PreferencesConfirmDialog()
+{
+ close_window();
+}
+BC_Window *PreferencesConfirmDialog::new_gui()
+{
+ qwindow = new PreferencesConfirmWindow(this);
+ qwindow->create_objects(query, 0);
+ return qwindow;
+}
+void PreferencesConfirmDialog::handle_done_event(int result)
+{
+ if( result != 2 ) return; // not yes
+ if( !close ) {
+ thread->window->lock_window("PreferencesConfirmDialog::handle_done_event");
+ thread->apply_settings();
+ thread->mwindow->save_defaults();
+ thread->window->unlock_window();
+ }
+ else
+ thread->window->set_done(0);
+}
+
+PreferencesConfirmWindow::PreferencesConfirmWindow(PreferencesConfirmDialog *dialog)
+ : QuestionWindow(dialog->thread->mwindow)
+{
+ this->dialog = dialog;
+}
+PreferencesConfirmWindow::~PreferencesConfirmWindow()
+{
+}
+