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;
}
idx = -1;
edl = 0;
highlighted = 0;
+ destroy = 1;
title[0] = 0;
zgui = 0;
}
void ZWindow::handle_done_event(int result)
{
+ if( destroy )
+ mwindow->del_mixer(this);
+ idx = -1;
}
void ZWindow::handle_close_event(int result)
{
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::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()
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);
}