X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fnew.C;h=9f0c70d507c1545b48bb58f943ea386922c5c78c;hb=9d5997d77ab7736be577456d8fd3dda0ba522d39;hp=fce4c09fd5833787fddf7459850de228e9fb2f8b;hpb=14c59195960203265f308a703e834e7c5f59f6d2;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/new.C b/cinelerra-5.1/cinelerra/new.C index fce4c09f..9f0c70d5 100644 --- a/cinelerra-5.1/cinelerra/new.C +++ b/cinelerra-5.1/cinelerra/new.C @@ -49,9 +49,8 @@ #include -#define WIDTH 600 -#define HEIGHT 400 - +#define WIDTH 640 +#define HEIGHT 425 New::New(MWindow *mwindow) : BC_MenuItem(_("New Project..."), "n", 'n') @@ -77,7 +76,6 @@ int New::handle_event() mwindow->gui->unlock_window(); mwindow->edl->save_defaults(mwindow->defaults); create_new_edl(); - create_new_project(); thread->start(); mwindow->gui->lock_window("New::handle_event"); @@ -163,8 +161,8 @@ BC_Window* NewThread::new_gui() load_defaults(); mwindow->gui->lock_window("NewThread::new_gui"); - int x = mwindow->gui->get_abs_cursor_x(0) - WIDTH / 2; - int y = mwindow->gui->get_abs_cursor_y(0) - HEIGHT / 2; + int x = mwindow->gui->get_pop_cursor_x(0); + int y = mwindow->gui->get_pop_cursor_y(0); nwindow = new NewWindow(mwindow, this, x, y); nwindow->create_objects(); @@ -177,6 +175,7 @@ BC_Window* NewThread::new_gui() void NewThread::handle_close_event(int result) { + if( !new_project->new_edl ) return; new_project->new_edl->save_defaults(mwindow->defaults); mwindow->defaults->save(); @@ -227,16 +226,8 @@ int NewThread::update_aspect() NewWindow::NewWindow(MWindow *mwindow, NewThread *new_thread, int x, int y) - : BC_Window(_(_(PROGRAM_NAME ": New Project")), - x, - y, - WIDTH, - HEIGHT, - -1, - -1, - 0, - 0, - 1) + : BC_Window(_(PROGRAM_NAME ": New Project"), x, y, WIDTH, HEIGHT, + -1, -1, 0, 0, 1) { this->mwindow = mwindow; this->new_thread = new_thread; @@ -306,7 +297,7 @@ void NewWindow::create_objects() y += 30; x1 = x; add_subwindow(new BC_Title(x1, y, _("Tracks:"))); - x1 += 100; + x1 += 115; add_subwindow(vtracks = new NewVTracks(this, "", x1, y)); x1 += vtracks->get_w(); add_subwindow(new NewVTracksTumbler(this, x1, y)); @@ -321,7 +312,7 @@ void NewWindow::create_objects() // y += vchannels->get_h() + 5; x1 = x; add_subwindow(new BC_Title(x1, y, _("Framerate:"))); - x1 += 100; + x1 += 115; add_subwindow(frame_rate = new NewFrameRate(this, "", x1, y)); x1 += frame_rate->get_w(); add_subwindow(new FrameRatePulldown(mwindow, frame_rate, x1, y)); @@ -347,7 +338,7 @@ void NewWindow::create_objects() x1 = x; add_subwindow(new BC_Title(x1, y, _("Canvas size:"))); - x1 += 100; + x1 += 115; add_subwindow(output_w_text = new NewOutputW(this, x1, y)); x1 += output_w_text->get_w() + 2; add_subwindow(new BC_Title(x1, y, "x")); @@ -360,13 +351,13 @@ void NewWindow::create_objects() output_h_text, x1, y)); - x1 += pulldown->get_w() + 5; + x1 += pulldown->get_w() + 10; add_subwindow(new NewSwapExtents(mwindow, this, x1, y)); y += output_h_text->get_h() + 5; x1 = x; add_subwindow(new BC_Title(x1, y, _("Aspect ratio:"))); - x1 += 100; + x1 += 115; add_subwindow(aspect_w_text = new NewAspectW(this, "", x1, y)); x1 += aspect_w_text->get_w() + 2; add_subwindow(new BC_Title(x1, y, ":")); @@ -383,25 +374,23 @@ void NewWindow::create_objects() y += aspect_w_text->get_h() + 5; add_subwindow(new NewAspectAuto(this, x1, y)); y += 40; - add_subwindow(new BC_Title(x, y, _("Color model:"))); - add_subwindow(textbox = new BC_TextBox(x + 100, y, 200, 1, "")); + BC_Title *title; + add_subwindow(title = new BC_Title(x, y, _("Color model:"))); + x1 = x + title->get_w(); + y1 = y; y += title->get_h() + 10; + add_subwindow(title = new BC_Title(x, y, _("Interlace mode:"))); + int x2 = x + title->get_w(); + int y2 = y; y += title->get_h() + 10; + if( x1 < x2 ) x1 = x2; + x1 += 20; + add_subwindow(textbox = new BC_TextBox(x1, y1, 150, 1, "")); add_subwindow(color_model = new ColormodelPulldown(mwindow, - textbox, - &new_edl->session->color_model, - x + 100 + textbox->get_w(), - y)); - y += textbox->get_h() + 5; - - // -------------------- - add_subwindow(new BC_Title(x, y, _("Interlace mode:"))); - add_subwindow(textbox = new BC_TextBox(x + 100, y, 140, 1, "")); + textbox, &new_edl->session->color_model, x1+textbox->get_w(), y1)); + add_subwindow(textbox = new BC_TextBox(x1, y2, 150, 1, "")); add_subwindow(interlace_pulldown = new InterlacemodePulldown(mwindow, - textbox, - &new_edl->session->interlace_mode, + textbox, &new_edl->session->interlace_mode, (ArrayList*)&mwindow->interlace_project_modes, - x + 100 + textbox->get_w(), - y)); - y += textbox->get_h() + 5; + x1+textbox->get_w(), y2)); add_subwindow(new BC_OKButton(this, mwindow->theme->get_image_set("new_ok_images")));