X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fzwindow.C;h=5743aa40ab577c0bf5b1dc8140d3e783ce31ddbe;hb=df72ca6732207dc25472a23169ff79ef6d4cca1c;hp=46e00a91336f16338f7dba8326132b824f0b6109;hpb=ad2996ab94e6e12c9c14a5b9f14792f76111dff7;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/zwindow.C b/cinelerra-5.1/cinelerra/zwindow.C index 46e00a91..5743aa40 100644 --- a/cinelerra-5.1/cinelerra/zwindow.C +++ b/cinelerra-5.1/cinelerra/zwindow.C @@ -73,7 +73,7 @@ void Mixers::del_mixer(int idx) void Mixer::set_title(const char *tp) { if( tp == title ) return; - strncpy(title, tp, sizeof(title)); + strncpy(title, !tp ? "" : tp, sizeof(title)); title[sizeof(title)-1] = 0; } @@ -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,7 +219,7 @@ 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); } } @@ -228,10 +229,10 @@ void ZWindow::stop_playback(int wait) } void ZWindow::issue_command(int command, int wait_tracking, - int use_inout, int update_refresh, int toggle_audio) + int use_inout, int update_refresh, int toggle_audio, int loop_play) { zgui->playback_engine->issue_command(edl, command, - wait_tracking, use_inout, update_refresh, toggle_audio); + wait_tracking, use_inout, update_refresh, toggle_audio, loop_play); } void ZWindow::update_mixer_ids() @@ -252,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); }