+ for( const char *cp=bp; cp<ep && *cp; ) {
+ const char *dp = strchr(cp, '\n');
+ if( !dp ) dp = ep;
+ char path[BCTEXTLEN], *pp = path;
+ int len = sizeof(path)-1;
+ while( --len>0 && cp<dp ) *pp++ = *cp++;
+ if( *cp ) ++cp;
+ *pp = 0;
+ if( !strlen(path) ) continue;
+ path_list.append(cstrdup(path));
+ }
+ if( !path_list.size() ) return;
+
+ 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()
+{
+}