#include "awindow.h"
#include "awindowgui.h"
#include "edit.h"
+#include "edits.h"
#include "editpopup.h"
#include "edl.h"
#include "edlsession.h"
EditPopupShowWindow::EditPopupShowWindow(MWindow *mwindow,
EditPopup *popup, int wx, int wy)
: BC_Window(_(PROGRAM_NAME ": Show edit"), wx, wy,
- 300, 200, 300, 200, 0, 0, 1)
+ 300, 220, 300, 220, 0, 0, 1)
{
this->mwindow = mwindow;
this->popup = popup;
{
lock_window("EditPopupShowWindow::create_objects");
int x = 10, y = 10;
- add_subwindow(new BC_Title(x, y, _("Show edit:")));
+ BC_Title *title;
+ char text[BCTEXTLEN];
+ Track *track = popup->track;
+ Edit *edit = popup->edit;
+ sprintf(text, _("Track %d:"), mwindow->edl->tracks->number_of(track)+1);
+ add_subwindow(title = new BC_Title(x, y, text));
+ int x1 = x + title->get_w() + 10;
+ int tw = get_w() - x1 - 20;
+ truncate_text(text, track->title, tw);
+ add_subwindow(new BC_Title(x1, y, text));
+ y += title->get_h() + 5;
+ sprintf(text, _("Edit %d:"), track->edits->number_of(edit)+1);
+ add_subwindow(title = new BC_Title(x, y, text));
+ char edit_title[BCTEXTLEN];
+ edit->get_title(edit_title);
+ truncate_text(text, edit_title, tw);
+ add_subwindow(new BC_Title(x1, y, text));
+ y += title->get_h() + 5;
EDLSession *session = mwindow->edl->session;
int time_format = session->time_format;
- int sample_rate = session->sample_rate;
+ int sample_rate = session->sample_rate;
double frame_rate = session->frame_rate;
double frames_per_foot = session->frames_per_foot;
- Track *track = popup->track;
- Edit *edit = popup->edit;
- double startsource = track->from_units(edit->startsource);
+ double startsource = track->from_units(edit->startsource);
double startproject = track->from_units(edit->startproject);
double length = track->from_units(edit->length);
- char text[BCTEXTLEN], text_length[BCSTRLEN];
- char text_startsource[BCSTRLEN], text_startproject[BCSTRLEN];
+ char text_startsource[BCSTRLEN];
+ char text_startproject[BCSTRLEN];
+ char text_length[BCSTRLEN];
sprintf(text, _("StartSource: %s\nStartProject: %s\nLength: %s\n"),
Units::totext(text_startsource, startsource,
time_format, sample_rate, frame_rate, frames_per_foot),
time_format, sample_rate, frame_rate, frames_per_foot),
Units::totext(text_length, length,
time_format, sample_rate, frame_rate, frames_per_foot));
- show_text = new EditPopupShowText(this, mwindow, x+15, y+20, text);
+ show_text = new EditPopupShowText(this, mwindow, x+15, y+10, text);
add_subwindow(show_text);
add_tool(new BC_OKButton(this));