this->mwindow = mwindow;
window = 0;
thread_running = 0;
- confirm_dialog = 0;
}
PreferencesThread::~PreferencesThread()
{
- delete confirm_dialog;
close_window();
}
}
mwindow->edl->copy_session(edl, 1);
- mwindow->preferences->copy_from(preferences);
+ mwindow->update_preferences(preferences);
BC_Signals::set_catch_segv(mwindow->preferences->trap_sigsegv);
BC_Signals::set_catch_intr(mwindow->preferences->trap_sigintr);
return 0;
}
-void PreferencesThread::confirm_update(const char *reason, int close)
-{
- delete confirm_dialog;
- confirm_dialog = new PreferencesConfirmDialog(this, reason, close);
- confirm_dialog->start();
-}
-
const char* PreferencesThread::category_to_text(int category)
{
PlaybackConfig *playback_config = edl->session->playback_config;
{
this->mwindow = mwindow;
this->thread = thread;
- dialog = 0;
category = 0;
+ dialog = 0;
+ confirm_dialog = 0;
}
PreferencesWindow::~PreferencesWindow()
{
lock_window("PreferencesWindow::~PreferencesWindow");
delete category;
-
-
- if(dialog) delete dialog;
-
-
+ delete dialog;
+ delete confirm_dialog;
for(int i = 0; i < categories.total; i++)
delete categories.values[i];
unlock_window();
unlock_window();
}
+void PreferencesWindow::confirm_update(const char *reason, int close)
+{
+ delete confirm_dialog;
+ confirm_dialog = new PreferencesConfirmDialog(thread, reason, close);
+ confirm_dialog->start();
+}
+
int PreferencesWindow::set_current_dialog(int number)
{
{
const char *reason = thread->busy();
if( reason )
- thread->confirm_update(reason, 0);
+ thread->window->confirm_update(reason, 0);
else {
thread->apply_settings();
mwindow->save_defaults();
{
const char *reason = mwindow->restart() ? _("restart") : thread->busy();
if( reason )
- thread->confirm_update(reason, 1);
+ thread->window->confirm_update(reason, 1);
else
thread->window->set_done(0);
return 1;
}
PreferencesConfirmDialog::~PreferencesConfirmDialog()
{
+ close_window();
}
BC_Window *PreferencesConfirmDialog::new_gui()
{
}
void PreferencesConfirmDialog::handle_done_event(int result)
{
- if( !result ) return; // no
+ if( result != 2 ) return; // not yes
if( !close ) {
thread->window->lock_window("PreferencesConfirmDialog::handle_done_event");
thread->apply_settings();