sams last ladspa icons, libopus/vp9, mixer fixer, plugin resets, fmt frmsz, shm fixes
[goodguy/history.git] / cinelerra-5.1 / cinelerra / zwindow.C
index 22c8250b78006ea5c1e31521fd1136d5e8e88221..c970f22f7ce4c69b9ae442e949fcc9558fbd1c2a 100644 (file)
@@ -206,6 +206,7 @@ BC_Window* ZWindow::new_gui()
 
 void ZWindow::handle_done_event(int result)
 {
+       mwindow->del_mixer(this);
 }
 void ZWindow::handle_close_event(int result)
 {
@@ -218,16 +219,13 @@ void ZWindow::change_source(EDL *edl)
                this->edl->remove_user();
        this->edl = edl;
        if( edl != 0 ) {
-               zgui->playback_engine->que->send_command(CURRENT_FRAME, CHANGE_ALL, edl, 1);
+               zgui->playback_engine->refresh_frame(CHANGE_ALL, edl);
        }
 }
 
-void ZWindow::stop_playback()
+void ZWindow::stop_playback(int wait)
 {
-       int locked = zgui->get_window_lock();
-       if( locked ) zgui->unlock_window();
-       zgui->playback_engine->interrupt_playback(1);
-       if( locked ) zgui->lock_window("ZWindow::stop_playback");
+       zgui->playback_engine->stop_playback(wait);
 }
 
 void ZWindow::issue_command(int command, int wait_tracking,
@@ -255,17 +253,18 @@ void ZWindow::update_mixer_ids()
 
 void ZWindow::set_title(const char *tp)
 {
+       Mixer *mixer = mwindow->edl->mixers.get_mixer(idx);
+       if( mixer ) mixer->set_title(tp);
        char *cp = title, *ep = cp + sizeof(title)-1;
        cp += snprintf(title, ep-cp, _("Mixer %d"), idx);
        if( tp ) cp += snprintf(cp, ep-cp, ": %s", tp);
-       else tp = title;
-       Mixer *mixer = mwindow->edl->mixers.get_mixer(idx);
-       if( mixer ) mixer->set_title(title);
+       *cp = 0;
 }
 
 void ZWindow::reposition(int x, int y, int w, int h)
 {
        Mixer *mixer = mwindow->edl->mixers.get_mixer(idx);
-       if( mixer ) mixer->reposition(x, y, w, h);
+       if( !mixer ) return;
+       mixer->reposition(x, y, w, h);
 }