+ MWindow *mwindow = paste->mwindow;
+ mwindow->interrupt_indexes();
+ mwindow->gui->lock_window("AssetPasteDialog::handle_done_event");
+ result = mwindow->load_filenames(&path_list, LOADMODE_RESOURCESONLY, 0);
+ mwindow->gui->unlock_window();
+ path_list.remove_all_objects();
+ mwindow->save_backup();
+ mwindow->restart_brender();
+ mwindow->session->changes_made = 1;
+}
+
+void AssetPasteDialog::handle_close_event(int result)
+{
+ paste_window = 0;
+}
+
+void AssetPasteDialog::start(int x, int y)
+{
+ this->x = x; this->y = y;
+ BC_DialogThread::start();
+}
+
+AssetPasteWindow::AssetPasteWindow(AssetPasteDialog *paste_dialog)
+ : BC_Window(_(PROGRAM_NAME ": Paste File List"),
+ paste_dialog->x - 500/2, paste_dialog->y - 200/2,
+ 500, 200, 500, 200, 1, 0, 1)
+{
+ this->paste_dialog = paste_dialog;
+}
+
+AssetPasteWindow::~AssetPasteWindow()
+{
+}
+
+void AssetPasteWindow::create_objects()
+{
+ BC_Title *title;
+ int x = 10, y = 10, pad = 5;
+ add_subwindow(title = new BC_Title(x, y, _("Enter list of asset paths:")));
+ y += title->get_h() + pad;
+ int text_w = get_w() - x - 10;
+ int text_h = get_h() - y - BC_OKButton::calculate_h() - pad;
+ int text_rows = BC_TextBox::pixels_to_rows(this, MEDIUMFONT, text_h);
+ file_list = new BC_ScrollTextBox(this, x, y, text_w, text_rows, (char*)0, 65536);
+ file_list->create_objects();
+ add_subwindow(new BC_OKButton(this));
+ add_subwindow(new BC_CancelButton(this));
+ show_window();
+}
+
+int AssetPasteWindow::resize_event(int w, int h)
+{
+ int fx = file_list->get_x(), fy = file_list->get_y(), pad = 5;
+ int text_w = w - fx - 10;
+ int text_h = h - fy - BC_OKButton::calculate_h() - pad;
+ int text_rows = BC_TextBox::pixels_to_rows(this, MEDIUMFONT, text_h);
+ file_list->reposition_window(fx, fy, text_w, text_rows);
+ return 0;
+}