X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Flabeledit.C;h=22c5252a802dac626ce676ad56e20ef01c7bd4ad;hb=09ccfde5a1fd65069f69b37490462b7ccf38a336;hp=945d306a5e385da3254fadbf07b1b898286c5a37;hpb=4b6c39e6cf4a3fd9c1b347db6de686ab55d6cac8;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/labeledit.C b/cinelerra-5.1/cinelerra/labeledit.C index 945d306a..22c5252a 100644 --- a/cinelerra-5.1/cinelerra/labeledit.C +++ b/cinelerra-5.1/cinelerra/labeledit.C @@ -45,9 +45,11 @@ LabelEdit::~LabelEdit() close_window(); } -void LabelEdit::start(Label *label) +void LabelEdit::start(Label *label, int x, int y) { this->label = label; + this->x = x; this->y = y; + BC_DialogThread::start(); } @@ -64,15 +66,14 @@ void LabelEdit::handle_done_event(int result) BC_Window *LabelEdit::new_gui() { - int x = mwindow->gui->get_abs_cursor_x(1) - 400 / 2; - int y = mwindow->gui->get_abs_cursor_y(1) - 350 / 2; - label_edit_window = new LabelEditWindow(mwindow, this, x, y); + label_edit_window = new LabelEditWindow(mwindow, this); label_edit_window->create_objects(); return label_edit_window; } -LabelEditWindow::LabelEditWindow(MWindow *mwindow, LabelEdit *thread, int x, int y) - : BC_Window(_(PROGRAM_NAME ": Label Info"), x, y, +LabelEditWindow::LabelEditWindow(MWindow *mwindow, LabelEdit *thread) + : BC_Window(_(PROGRAM_NAME ": Label Info"), + thread->x - 400/2, thread->y - 350/2, 400, 350, 400, 430, 0, 0, 1) { this->mwindow = mwindow; @@ -85,6 +86,7 @@ LabelEditWindow::~LabelEditWindow() void LabelEditWindow::create_objects() { + lock_window("LabelEditWindow::create_objects"); this->label = thread->label; int x = 10, y = 10; @@ -101,6 +103,7 @@ void LabelEditWindow::create_objects() add_subwindow(new BC_CancelButton(this)); show_window(); textbox->activate(); + unlock_window(); } LabelEditComments::LabelEditComments(LabelEditWindow *window, int x, int y, int w, int rows)