X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fbatchrender.C;h=20d817b5df222837f07ff18320cf28aa483b5449;hb=2ff681c423ff0f83efbaed49aa37195a3b37f6db;hp=27cd834288e78a1d79c25bffbdee0eb6ec1b42fb;hpb=09fd1385e786587799d1181fa5e94a32fe453af8;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/batchrender.C b/cinelerra-5.1/cinelerra/batchrender.C index 27cd8342..20d817b5 100644 --- a/cinelerra-5.1/cinelerra/batchrender.C +++ b/cinelerra-5.1/cinelerra/batchrender.C @@ -60,6 +60,8 @@ #include "dvdcreate.h" #include "bdcreate.h" +#include + int BatchRenderThread::column_widths[] = { 42, 42, 42, 222, 222, 150 }; const char *BatchRenderThread::column_titles[] = { N_("Enabled"), N_("Labeled"), N_("Farmed"), N_("Output"), N_("EDL"), N_("Elapsed") @@ -197,7 +199,7 @@ BatchRenderThread::BatchRenderThread(MWindow *mwindow) default_job = 0; boot_defaults = 0; preferences = 0; - warn = 1; + warn = 0; render = 0; batch_path[0] = 0; do_farmed = 0; @@ -268,9 +270,9 @@ void BatchRenderThread::load_jobs(char *path, Preferences *preferences) while( !result ) { if( !(result = file.read_tag()) ) { if( file.tag.title_is("JOBS") ) { - if (mwindow->preferences->unsafe_gui) + if (mwindow && mwindow->preferences->unsafe_gui) warn = file.tag.get_property("WARN", 1); - if (!mwindow->preferences->unsafe_gui) + if (mwindow && !mwindow->preferences->unsafe_gui) warn = 0; } else if( file.tag.title_is("JOB") ) { @@ -296,7 +298,7 @@ void BatchRenderThread::save_jobs(char *path) { FileXML file; file.tag.set_title("JOBS"); - if (mwindow->preferences->unsafe_gui) + if (mwindow && mwindow->preferences->unsafe_gui) file.tag.set_property("WARN", warn); file.append_tag(); file.append_newline(); @@ -540,7 +542,7 @@ void BatchRenderThread::calculate_dest_paths(ArrayList *paths, PackageDispatcher *packages = new PackageDispatcher; // Load EDL - TransportCommand *command = new TransportCommand; + TransportCommand *command = new TransportCommand(preferences); FileXML *file = new FileXML; file->read_from_file(job->edl_path); @@ -595,8 +597,10 @@ void BatchRenderThread::start_rendering(char *config_path, else { BC_Trace::disable_locks(); } - +// In batch mode there is no mwindow, so init_plugins is called with +// mwindow* = NULL. MWindow::init_plugins(0, preferences); + MWindow::init_ladspa_plugins(0, preferences); char font_path[BCTEXTLEN]; strcpy(font_path, preferences->plugin_dir); strcat(font_path, "/" FONT_SEARCHPATH); @@ -741,6 +745,8 @@ BatchRenderGUI::BatchRenderGUI(MWindow *mwindow, this->mwindow = mwindow; this->thread = thread; use_renderfarm = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Batch Rendering"); } BatchRenderGUI::~BatchRenderGUI() @@ -833,8 +839,10 @@ void BatchRenderGUI::create_objects() y += batch_list->get_h() + mwindow->theme->widget_border; add_subwindow(start_button = new BatchRenderStart(thread, x, y)); - x = get_w() / 2 - BC_GenericButton::calculate_w(this, _("Stop")) / 2; + x = get_w() / 3 - BC_GenericButton::calculate_w(this, _("Stop")) / 3; add_subwindow(stop_button = new BatchRenderStop(thread, x, y)); + x = get_w() / 1.5 - BC_GenericButton::calculate_w(this, _("?")) / 1.5; + add_subwindow(help_button = new BatchRenderHelp(thread, x, y)); x = get_w() - BC_GenericButton::calculate_w(this, _("Close")) - xs10; add_subwindow(cancel_button = new BatchRenderCancel(thread, x, y)); @@ -919,10 +927,12 @@ int BatchRenderGUI::resize_event(int w, int h) y += batch_list->get_h() + mwindow->theme->widget_border; start_button->reposition_window(x, y); - x = w / 2 - stop_button->get_w() / 2; + x = w / 3 - stop_button->get_w() / 3; stop_button->reposition_window(x, y); x = w - cancel_button->get_w() - xs10; cancel_button->reposition_window(x, y); + x = w / 1.5 - help_button->get_w() / 1.5; + help_button->reposition_window(x, y); return 1; } @@ -1157,7 +1167,7 @@ void BatchRenderSaveList::run() int BatchRenderSaveList::keypress_event() { if( get_keypress() == 's' || get_keypress() == 'S' ) return handle_event(); - return 0; + return context_help_check_and_show(); } @@ -1238,7 +1248,7 @@ void BatchRenderLoadList::run() int BatchRenderLoadList::keypress_event() { if( get_keypress() == 'o' || get_keypress() == 'O' ) return handle_event(); - return 0; + return context_help_check_and_show(); } BatchRenderCurrentEDL::BatchRenderCurrentEDL(BatchRenderThread *thread, @@ -1427,6 +1437,20 @@ int BatchRenderCancel::keypress_event() thread->gui->set_done(1); return 1; } + return context_help_check_and_show(); +} + +//new help button +BatchRenderHelp::BatchRenderHelp(BatchRenderThread *thread, int x, int y) + : BC_GenericButton(x, y, _("?")) +{ + this->thread = thread; + set_tooltip(_("Open quick start guide in default browser")); +} + +int BatchRenderHelp::handle_event() +{ + system("xdg-open file://$CIN_DAT/doc/help_br_index.html"); return 0; }