projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update ru.po/andrew, edge gui init fix, dual monitor root coords tweaks, rm debug...
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
cinelerra
/
preferencesthread.C
diff --git
a/cinelerra-5.1/cinelerra/preferencesthread.C
b/cinelerra-5.1/cinelerra/preferencesthread.C
index e273813615b865f617e6af2a8d56f00f1514f9ce..52de4f5526a2888d8e8dd2341c709916f2c40339 100644
(file)
--- a/
cinelerra-5.1/cinelerra/preferencesthread.C
+++ b/
cinelerra-5.1/cinelerra/preferencesthread.C
@@
-102,12
+102,10
@@
PreferencesThread::PreferencesThread(MWindow *mwindow)
this->mwindow = mwindow;
window = 0;
thread_running = 0;
this->mwindow = mwindow;
window = 0;
thread_running = 0;
- confirm_dialog = 0;
}
PreferencesThread::~PreferencesThread()
{
}
PreferencesThread::~PreferencesThread()
{
- delete confirm_dialog;
close_window();
}
close_window();
}
@@
-239,6
+237,7
@@
int PreferencesThread::apply_settings()
if( window ) window->lock_window("PreferencesThread::apply_settings 5");
if( strcmp(preferences->theme, mwindow->preferences->theme) ||
if( window ) window->lock_window("PreferencesThread::apply_settings 5");
if( strcmp(preferences->theme, mwindow->preferences->theme) ||
+ strcmp(preferences->locale, mwindow->preferences->locale) ||
strcmp(preferences->plugin_icons, mwindow->preferences->plugin_icons) ||
preferences->awindow_picon_h != mwindow->preferences->awindow_picon_h ||
preferences->layout_scale != mwindow->preferences->layout_scale ||
strcmp(preferences->plugin_icons, mwindow->preferences->plugin_icons) ||
preferences->awindow_picon_h != mwindow->preferences->awindow_picon_h ||
preferences->layout_scale != mwindow->preferences->layout_scale ||
@@
-253,8
+252,11
@@
int PreferencesThread::apply_settings()
mwindow->restart_status = -1;
}
mwindow->restart_status = -1;
}
+ if( mwindow->preferences->perpetual_session && !preferences->perpetual_session )
+ mwindow->remove_undo_data();
+
mwindow->edl->copy_session(edl, 1);
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);
BC_Signals::set_catch_segv(mwindow->preferences->trap_sigsegv);
BC_Signals::set_catch_intr(mwindow->preferences->trap_sigintr);
@@
-378,13
+380,6
@@
const char *PreferencesThread::busy()
return 0;
}
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;
const char* PreferencesThread::category_to_text(int category)
{
PlaybackConfig *playback_config = edl->session->playback_config;
@@
-434,19
+429,17
@@
PreferencesWindow::PreferencesWindow(MWindow *mwindow,
{
this->mwindow = mwindow;
this->thread = thread;
{
this->mwindow = mwindow;
this->thread = thread;
- dialog = 0;
category = 0;
category = 0;
+ dialog = 0;
+ confirm_dialog = 0;
}
PreferencesWindow::~PreferencesWindow()
{
lock_window("PreferencesWindow::~PreferencesWindow");
delete category;
}
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();
for(int i = 0; i < categories.total; i++)
delete categories.values[i];
unlock_window();
@@
-517,6
+510,13
@@
void PreferencesWindow::update_rates()
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)
{
int PreferencesWindow::set_current_dialog(int number)
{
@@
-653,7
+653,7
@@
int PreferencesApply::handle_event()
{
const char *reason = thread->busy();
if( reason )
{
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();
else {
thread->apply_settings();
mwindow->save_defaults();
@@
-690,7
+690,7
@@
int PreferencesOK::handle_event()
{
const char *reason = mwindow->restart() ? _("restart") : thread->busy();
if( reason )
{
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;
else
thread->window->set_done(0);
return 1;
@@
-711,6
+711,7
@@
PreferencesConfirmDialog::PreferencesConfirmDialog(PreferencesThread *thread,
}
PreferencesConfirmDialog::~PreferencesConfirmDialog()
{
}
PreferencesConfirmDialog::~PreferencesConfirmDialog()
{
+ close_window();
}
BC_Window *PreferencesConfirmDialog::new_gui()
{
}
BC_Window *PreferencesConfirmDialog::new_gui()
{
@@
-720,7
+721,7
@@
BC_Window *PreferencesConfirmDialog::new_gui()
}
void PreferencesConfirmDialog::handle_done_event(int result)
{
}
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();
if( !close ) {
thread->window->lock_window("PreferencesConfirmDialog::handle_done_event");
thread->apply_settings();