<div dir="ltr"><div class="gmail_default" style="font-size:small">OK, trying this one now !!  We really appreciate your work and do not care if it takes a few tries.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 12, 2021 at 10:22 AM Andrew Randrianasulu via Cin <<a href="mailto:cin@lists.cinelerra-gg.org">cin@lists.cinelerra-gg.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This time I hopefully found how to NOT initialize this variable, and not load it from file either ....<br>
<br>
Try this patch instead of any my previous attempts ... sorry!<br>
<br>
----<br>
diff --git a/cinelerra-5.1/cinelerra/batchrender.C b/cinelerra-5.1/cinelerra/batchrender.C<br>
index 6dcdbc62..f9a91fff 100644<br>
--- a/cinelerra-5.1/cinelerra/batchrender.C<br>
+++ b/cinelerra-5.1/cinelerra/batchrender.C<br>
@@ -60,6 +60,8 @@<br>
 #include "dvdcreate.h"<br>
 #include "bdcreate.h"<br>
<br>
+#define UNSAFE_BUTTON 0<br>
+<br>
 int BatchRenderThread::column_widths[] = { 42, 42, 42, 222, 222, 150 };<br>
 const char *BatchRenderThread::column_titles[] = {<br>
        N_("Enabled"), N_("Labeled"), N_("Farmed"), N_("Output"), N_("EDL"), N_("Elapsed")<br>
@@ -197,7 +199,10 @@ BatchRenderThread::BatchRenderThread(MWindow *mwindow)<br>
        default_job = 0;<br>
        boot_defaults = 0;<br>
        preferences = 0;<br>
+       <br>
+       if (UNSAFE_BUTTON)<br>
        warn = 1;<br>
+<br>
        render = 0;<br>
        batch_path[0] = 0;<br>
        do_farmed = 0;<br>
@@ -217,6 +222,7 @@ void BatchRenderThread::reset(const char *path)<br>
 {<br>
        if( path ) {<br>
                strcpy(batch_path, path);<br>
+               if (UNSAFE_BUTTON)<br>
                warn = 1;<br>
        }<br>
        current_job = 0;<br>
@@ -268,6 +274,7 @@ void BatchRenderThread::load_jobs(char *path, Preferences *preferences)<br>
        while( !result ) {<br>
                if( !(result = file.read_tag()) ) {<br>
                        if( file.tag.title_is("JOBS") ) {<br>
+                               if (UNSAFE_BUTTON)<br>
                                warn = file.tag.get_property("WARN", 1);<br>
                        }<br>
                        else if( file.tag.title_is("JOB") ) {<br>
@@ -293,6 +300,7 @@ void BatchRenderThread::save_jobs(char *path)<br>
 {<br>
        FileXML file;<br>
        file.tag.set_title("JOBS");<br>
+       if (UNSAFE_BUTTON)<br>
        file.tag.set_property("WARN", warn);<br>
        file.append_tag();<br>
        file.append_newline();<br>
@@ -382,6 +390,7 @@ void BatchRenderThread::use_current_edl()<br>
        gui->edl_path_text->update(get_current_edl());<br>
 }<br>
<br>
+<br>
 void BatchRenderThread::update_selected_edl()<br>
 {<br>
         FileXML xml_file;<br>
@@ -792,8 +801,12 @@ void BatchRenderGUI::create_objects()<br>
        y2 = y + edl_path_browse->get_h() + mwindow->theme->widget_border;<br>
<br>
        x = x2;  y = y2;<br>
+<br>
+       if (UNSAFE_BUTTON) {<br>
        add_subwindow(update_selected_edl = new BatchRenderUpdateEDL(thread, x, y));<br>
        y += update_selected_edl->get_h() + mwindow->theme->widget_border;<br>
+       }<br>
+<br>
        add_subwindow(use_current_edl = new BatchRenderCurrentEDL(thread, x, y));<br>
        y += use_current_edl->get_h() + mwindow->theme->widget_border;<br>
        if( !mwindow->edl || !mwindow->edl->path[0] ) use_current_edl->disable();<br>
@@ -805,8 +818,12 @@ void BatchRenderGUI::create_objects()<br>
        x += savelist_batch->get_w() + mwindow->theme->widget_border;<br>
        add_subwindow(loadlist_batch = new BatchRenderLoadList(thread, x, y));<br>
        y += loadlist_batch->get_h() + mwindow->theme->widget_border;<br>
+<br>
+       if (UNSAFE_BUTTON) {<br>
        add_subwindow(warning = new BatchRenderWarning(thread, x2, y));<br>
        y2 = y + warning->get_h() + mwindow->theme->widget_border;<br>
+       }<br>
+       <br>
        if( y2 > y1 ) y1 = y2;<br>
        x = mwindow->theme->batchrender_x1, y = y1;<br>
<br>
@@ -835,6 +852,7 @@ void BatchRenderGUI::button_disable()<br>
        new_batch->disable();<br>
        delete_batch->disable();<br>
        use_current_edl->disable();<br>
+       if (UNSAFE_BUTTON)<br>
        update_selected_edl->disable();<br>
 }<br>
<br>
@@ -844,6 +862,7 @@ void BatchRenderGUI::button_enable()<br>
        delete_batch->enable();<br>
        if( mwindow->edl && mwindow->edl->path[0] )<br>
                use_current_edl->enable();<br>
+       if (UNSAFE_BUTTON)<br>
        update_selected_edl->enable();<br>
 }<br>
<br>
@@ -876,8 +895,12 @@ int BatchRenderGUI::resize_event(int w, int h)<br>
        y2 = y + edl_path_browse->get_h() + mwindow->theme->widget_border;<br>
<br>
        x = x2;  y = y2;<br>
+<br>
+       if (UNSAFE_BUTTON) {<br>
        update_selected_edl->reposition_window(x, y);<br>
        y += update_selected_edl->get_h() + mwindow->theme->widget_border;<br>
+       }<br>
+<br>
        use_current_edl->reposition_window(x, y);<br>
        y += use_current_edl->get_h() + mwindow->theme->widget_border;<br>
        new_batch->reposition_window(x, y);<br>
@@ -889,9 +912,12 @@ int BatchRenderGUI::resize_event(int w, int h)<br>
        x += savelist_batch->get_w() + mwindow->theme->widget_border;<br>
        loadlist_batch->reposition_window(x, y);<br>
        y += loadlist_batch->get_h() + mwindow->theme->widget_border;<br>
+       if (UNSAFE_BUTTON) {<br>
        warning->reposition_window(x2, y);<br>
<br>
        y1 = ys15 + BC_GenericButton::calculate_h() + mwindow->theme->widget_border;<br>
+       }<br>
+       <br>
        y2 = get_h() - y1 - batch_list->get_h();<br>
        y2 -= list_title->get_h() + mwindow->theme->widget_border;<br>
<br>
@@ -1236,6 +1262,7 @@ int BatchRenderCurrentEDL::handle_event()<br>
        return 1;<br>
 }<br>
<br>
+<br>
 BatchRenderUpdateEDL::BatchRenderUpdateEDL(BatchRenderThread *thread,<br>
        int x,<br>
        int y)<br>
@@ -1244,8 +1271,10 @@ BatchRenderUpdateEDL::BatchRenderUpdateEDL(BatchRenderThread *thread,<br>
        this->thread = thread;<br>
 }<br>
<br>
+<br>
 int BatchRenderUpdateEDL::handle_event()<br>
 {<br>
+       if (UNSAFE_BUTTON)<br>
        thread->update_selected_edl();<br>
        return 1;<br>
 }<br>
@@ -1374,6 +1403,7 @@ BatchRenderWarning::BatchRenderWarning(BatchRenderThread *thread, int x, int y)<br>
<br>
 int BatchRenderWarning::handle_event()<br>
 {<br>
+       if (UNSAFE_BUTTON)<br>
        thread->warn = get_value();<br>
        return 1;<br>
 }<br>
<br>
----<br>
-- <br>
Cin mailing list<br>
<a href="mailto:Cin@lists.cinelerra-gg.org" target="_blank">Cin@lists.cinelerra-gg.org</a><br>
<a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" rel="noreferrer" target="_blank">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a><br>
</blockquote></div>