bsd lang segv fix, enable bsd lv2, lv2 gui enable fix, proxy/ffmpeg toggle resize...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / vwindowgui.C
index e94bae855b45d8e0974dff4aa2393058e1ed7af9..87909d2a604aab85a5d009e69cc586de5455c19d 100644 (file)
@@ -112,6 +112,7 @@ void VWindowGUI::draw_wave()
        int w = mwindow->edl->session->output_w;
        int h = mwindow->edl->session->output_h;
        VFrame *vframe = new VFrame(w, h, BC_RGB888);
+       vframe->clear_frame();
        int sample_rate = mwindow->edl->get_sample_rate();
        int channels = mwindow->edl->session->audio_channels;
        if( channels > 2 ) channels = 2;
@@ -165,62 +166,36 @@ void VWindowGUI::change_source(EDL *edl, const char *title)
 void VWindowGUI::update_sources(const char *title)
 {
        lock_window("VWindowGUI::update_sources");
-
-//printf("VWindowGUI::update_sources 1\n");
        sources.remove_all_objects();
-//printf("VWindowGUI::update_sources 2\n");
-
 
-
-       for(int i = 0;
-               i < mwindow->edl->clips.total;
-               i++)
-       {
+       for( int i=0; i<mwindow->edl->clips.size(); ++i ) {
                char *clip_title = mwindow->edl->clips.values[i]->local_session->clip_title;
                int exists = 0;
 
-               for(int j = 0; j < sources.total; j++)
-               {
-                       if(!strcasecmp(sources.values[j]->get_text(), clip_title))
-                       {
+               for( int j=0; !exists && j<sources.size(); ++j ) {
+                       if( !strcasecmp(sources.values[j]->get_text(), clip_title) )
                                exists = 1;
-                       }
                }
 
-               if(!exists)
-               {
+               if( !exists )
                        sources.append(new BC_ListBoxItem(clip_title));
-               }
        }
-//printf("VWindowGUI::update_sources 3\n");
 
        FileSystem fs;
-       for(Asset *current = mwindow->edl->assets->first;
-               current;
-               current = NEXT)
-       {
+       for( Asset *current=mwindow->edl->assets->first; current; current=NEXT ) {
                char clip_title[BCTEXTLEN];
                fs.extract_name(clip_title, current->path);
                int exists = 0;
 
-               for(int j = 0; j < sources.total; j++)
-               {
-                       if(!strcasecmp(sources.values[j]->get_text(), clip_title))
-                       {
+               for( int j=0; !exists && j<sources.size(); ++j ) {
+                       if( !strcasecmp(sources.values[j]->get_text(), clip_title) )
                                exists = 1;
-                       }
                }
 
-               if(!exists)
-               {
+               if( !exists )
                        sources.append(new BC_ListBoxItem(clip_title));
-               }
        }
 
-//printf("VWindowGUI::update_sources 4\n");
-
-//     source->update_list(&sources);
-//     source->update(title);
        unlock_window();
 }
 
@@ -593,7 +568,7 @@ VWindowEditing::~VWindowEditing()
 
 void VWindowEditing::copy_selection()
 {
-       vwindow->copy();
+       vwindow->copy(subwindow->shift_down());
 }
 
 void VWindowEditing::splice_selection()
@@ -601,7 +576,7 @@ void VWindowEditing::splice_selection()
        if(vwindow->get_edl())
        {
                mwindow->gui->lock_window("VWindowEditing::splice_selection");
-               mwindow->splice(vwindow->get_edl());
+               mwindow->splice(vwindow->get_edl(), subwindow->shift_down());
                mwindow->gui->unlock_window();
        }
 }
@@ -611,7 +586,7 @@ void VWindowEditing::overwrite_selection()
        if(vwindow->get_edl())
        {
                mwindow->gui->lock_window("VWindowEditing::overwrite_selection");
-               mwindow->overwrite(vwindow->get_edl());
+               mwindow->overwrite(vwindow->get_edl(), subwindow->shift_down());
                mwindow->gui->unlock_window();
        }
 }
@@ -729,7 +704,7 @@ void VWindowEditing::to_clip()
 {
        EDL *edl = vwindow->get_edl();
        if( !edl ) return;
-       mwindow->to_clip(edl, _("viewer window: "));
+       mwindow->to_clip(edl, _("viewer window: "), subwindow->shift_down());
 }
 
 VWindowSource::VWindowSource(MWindow *mwindow, VWindowGUI *vwindow, int x, int y)