update versioninfo, locks for read_data in plugins, minor fixes
authorGood Guy <good1.2guy@gmail.com>
Sun, 7 May 2017 21:42:56 +0000 (15:42 -0600)
committerGood Guy <good1.2guy@gmail.com>
Sun, 7 May 2017 21:42:56 +0000 (15:42 -0600)
cinelerra-5.1/cinelerra/pluginfclient.C
cinelerra-5.1/cinelerra/versioninfo.h
cinelerra-5.1/plugins/compressor/compressor.C
cinelerra-5.1/plugins/graphic/graphic.C
cinelerra-5.1/plugins/histogram_bezier/bistogram.C
cinelerra-5.1/plugins/piano/piano.C
cinelerra-5.1/plugins/rgb601/rgb601.C
cinelerra-5.1/plugins/synthesizer/synthesizer.C

index 6ff20fd9fbd800e27c3b114931c4176691fa79fe..373f3d2564766c95a518cd3593293d13b13c03bc 100644 (file)
@@ -1016,13 +1016,14 @@ static int get_defaults(const char *name, char *args)
        FILE *fp = fopen(defaults_path,"r");
        if( !fp ) return 0;
        char ff_plugin[BCSTRLEN], ff_args[BCTEXTLEN], *ap = 0;
-       while( !ap && fgets(ff_args, sizeof(ff_args), fp) ) {
-               if( *(ap=ff_args) == ';' ) continue;
-               if( *(ap=ff_args) == '#' ) ++ap;
+       while( fgets(ff_args, sizeof(ff_args), fp) ) {
+               char *cp = ff_args;
+               if( *cp == ';' ) continue;
+               if( *cp == '#' ) ++cp;
                char *bp = ff_plugin, *ep = bp + sizeof(ff_plugin)-1;
-               while( bp < ep && *ap && *ap != '\n' && *ap != ' ' ) *bp++ = *ap++;
+               while( bp < ep && *cp && *cp != '\n' && *cp != ' ' ) *bp++ = *cp++;
                *bp = 0;
-               if( strcmp(ff_plugin, name) ) ap = 0;
+               if( !strcmp(ff_plugin, name) ) { ap = cp;  break; }
        }
        fclose(fp);
        if( !ap ) return 0;
index 5dd68710a392ff0fdc1c1ab898f3606476deeeff..7eaf05f3153b20aa74aceebdb33b1fd12ffeb385 100644 (file)
@@ -2,11 +2,10 @@
 #define __VERSIONINFO_H__
 
 #define CINELERRA_VERSION "5.1"
-#define REPOMAINTXT " git://git.cinelerra-cv.org/goodguy/cinelerra.git "
-#define COPYRIGHT_DATE "2015"
-#define COPYRIGHT_OWNER "Adam Williams"
-#define COPYRIGHTTEXT1 "(c)" COPYRIGHT_DATE ": " COPYRIGHT_OWNER "\n"
-#define COPYRIGHTTEXT2
+#define REPOMAINTXT " git://git.cinelerra-cv.org/goodguy/cinelerra.git\n"
+#define COPYRIGHT_DATE "2017"
+#define COPYRIGHTTEXT1 "(c) 2006-2016 Heroine Virtual Ltd. by Adam Williams\n"
+#define COPYRIGHTTEXT2 "(c) 2007-2017 cin5 derivative by W.P. Morrow aka goodguy\n"
 #undef COMPILEDATE
 
 #endif
index 481988bd16150fb1f9579503c61c0a21750a292a..9797bc3d690e0a79483998cc56ee8edbc81f273a 100644 (file)
@@ -189,15 +189,13 @@ void CompressorEffect::save_data(KeyFrame *keyframe)
 
 void CompressorEffect::update_gui()
 {
-       if(thread)
-       {
-               if(load_configuration())
-               {
-                       thread->window->lock_window("CompressorEffect::update_gui");
-                       ((CompressorWindow*)thread->window)->update();
-                       thread->window->unlock_window();
-               }
-       }
+       if( !thread ) return;
+       CompressorWindow *window = (CompressorWindow*)thread->window;
+// load_configuration,read_data deletes levels
+       window->lock_window("CompressorEffect::update_gui");
+       if( load_configuration() )
+               window->update();
+       window->unlock_window();
 }
 
 
index 0fbf84eec9f984f35e992c4f2becd6c243ffab8f..f927679cd23673d6d79d102619f405a59d557a2e 100644 (file)
@@ -1129,28 +1129,23 @@ void GraphicEQ::save_data(KeyFrame *keyframe)
 
 void GraphicEQ::update_gui()
 {
-       if(thread)
-       {
-               if(load_configuration() &&
-                       ((GraphicGUI*)thread->window)->canvas->state != GraphicCanvas::DRAG_POINT)
-               {
-                       ((GraphicGUI*)thread->window)->lock_window("GraphicEQ::update_gui");
-                       ((GraphicGUI*)thread->window)->update_canvas();
-                       ((GraphicGUI*)thread->window)->update_textboxes();
-                       ((GraphicGUI*)thread->window)->unlock_window();
-               }
-               else
-               {
-                       int total_frames = get_gui_update_frames();
+       if( !thread ) return;
+       GraphicGUI *window = (GraphicGUI *)thread->window;
+//lock here for points, needed by window cursor_motion callback
+//  deleted in load_configuration by read_data
+       window->lock_window("GraphicEQ::update_gui");
+       if( load_configuration() &&
+           window->canvas->state != GraphicCanvas::DRAG_POINT ) {
+               window->update_canvas();
+               window->update_textboxes();
+       }
+       else {
+               int total_frames = get_gui_update_frames();
 //printf("ParametricEQ::update_gui %d %d\n", __LINE__, total_frames);
-                       if(total_frames)
-                       {
-                               ((GraphicGUI*)thread->window)->lock_window("GraphicEQ::update_gui");
-                               ((GraphicGUI*)thread->window)->update_canvas();
-                               ((GraphicGUI*)thread->window)->unlock_window();
-                       }
-               }
+               if( total_frames )
+                       window->update_canvas();
        }
+       window->unlock_window();
 }
 
 void GraphicEQ::reconfigure()
index 16a27cb9cfe2d6862c8159866da2f6f38de2f8ab..53ebceeb3f57b6a07adf338505f839e37acd0dce 100644 (file)
@@ -109,21 +109,16 @@ void HistogramMain::render_gui(void *data)
 
 void HistogramMain::update_gui()
 {
-       if(thread)
-       {
-               thread->window->lock_window("HistogramMain::update_gui");
-               int reconfigure = load_configuration();
-               if(reconfigure)
-               {
-                       HistogramWindow *window = (HistogramWindow *)thread->window;
-                       window->update(0);
-                       if(!config.automatic)
-                       {
-                               window->update_input();
-                       }
-               }
-               thread->window->unlock_window();
+       if( !thread ) return;
+       HistogramWindow *window = (HistogramWindow *)thread->window;
+// points delete in load_configuration,read_data
+       window->lock_window("HistogramMain::update_gui");
+       if( load_configuration() ) {
+               window->update(0);
+               if(!config.automatic)
+                       window->update_input();
        }
+       window->unlock_window();
 }
 
 
index ec130f15d3e9b230e537939a5f6701a0bc2d8a78..a1fa01ea3be51274f03b0fa58331331df6fe94e8 100644 (file)
@@ -162,13 +162,13 @@ void Piano::raise_window()
 
 void Piano::update_gui()
 {
-       if(thread)
-       {
-               load_configuration();
-               thread->window->lock_window();
-               thread->window->update_gui();
-               thread->window->unlock_window();
-       }
+       if( !thread ) return;
+       PianoWindow *window = (PianoWindow *)thread->window:
+// load_configuration,read_data deletes oscillator_config
+       window->lock_window("Piano::update_gui");
+       load_configuration();
+       window->update_gui();
+       window->unlock_window();
 }
 
 
index 05a715b013f6b66967907a5e1861183c2bdf223f..c67de4aff1e1a36ea7c8fa471591113e482216f7 100644 (file)
@@ -117,14 +117,8 @@ void RGB601Main::read_data(KeyFrame *keyframe)
                        }
                }
        }
-
-       if(thread)
-       {
-               ((RGB601Window*)thread->window)->update();
-       }
 }
 
-
 #define CREATE_TABLE(max) \
 { \
        for(int i = 0; i < max; i++) \
index 840eb90c341a5af0d549716f0ab4fa99f36c22d3..5838a48ffbc68f69730a17975cdc85bef05b024d 100644 (file)
@@ -176,15 +176,13 @@ void Synth::save_data(KeyFrame *keyframe)
 
 void Synth::update_gui()
 {
-       if(thread)
-       {
-               if(load_configuration())
-               {
-                       thread->window->lock_window();
-                       ((SynthWindow*)thread->window)->update_gui();
-                       thread->window->unlock_window();
-               }
-       }
+       if( !thread ) return;
+       SynthWindow *window = (SynthWindow*)thread->window;
+// load_configuration,read_data deletes oscillator_config
+       window->lock_window("Synth::update_gui");
+       if( load_configuration() )
+               window->update_gui();
+       window->unlock_window();
 }