rework set default transtion, nested proxy edl fixes, doubleclick proxy media fix...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / awindowgui.C
index 42672233ec775b5fe10e0273db3573e232c62f94..19330e92051af647f0ca7ab156b0828ec70f9144 100644 (file)
@@ -552,6 +552,7 @@ void AssetPicon::create_objects()
                                        pixmap_w = pixmap_h * 16/9;
                                        icon_vframe = new VFrame(0,
                                                -1, pixmap_w, pixmap_h, BC_RGB888, -1);
+                                       icon_vframe->clear_frame();
                                        { char string[BCTEXTLEN];
                                        sprintf(string, _("Reading %s"), name);
                                        mwindow->gui->lock_window("AssetPicon::create_objects 3");
@@ -684,6 +685,7 @@ void AssetPicon::create_objects()
                                        pixmap_w = pixmap_h * 16/9;
                                        icon_vframe = new VFrame(0,
                                                -1, pixmap_w, pixmap_h, BC_RGB888, -1);
+                                       icon_vframe->clear_frame();
                                        char string[BCTEXTLEN];
                                        sprintf(string, _("Rendering %s"), name);
                                        mwindow->gui->lock_window("AssetPicon::create_objects 3");
@@ -1308,6 +1310,12 @@ int AWindowGUI::keypress_event()
                        return 1;
                }
                break;
+       case 'o':
+               if( !ctrl_down() && !shift_down() ) {
+                       assetlist_menu->load_file->handle_event();
+                       return 1;
+               }
+               break;
        case DELETE:
                if( shift_down() ) {
                        PluginServer* plugin = selected_plugin();
@@ -2018,20 +2026,30 @@ int AWindowAssets::handle_event()
 {
        AssetPicon *asset_picon = (AssetPicon *)get_selection(0, 0);
        if( !asset_picon ) return 0;
+       Indexable *picon_idxbl = asset_picon->indexable;
+       EDL *picon_edl = asset_picon->edl;
+       int proxy = 0;
+       VWindow *vwindow = 0;
        switch( mwindow->edl->session->awindow_folder ) {
        case AW_AEFFECT_FOLDER:
        case AW_VEFFECT_FOLDER:
        case AW_ATRANSITION_FOLDER:
        case AW_VTRANSITION_FOLDER: return 1;
+       case AW_PROXY_FOLDER:
+               proxy = 1; // fall thru
+       default:
+               if( mwindow->vwindows.size() > DEFAULT_VWINDOW )
+                       vwindow = mwindow->vwindows.get(DEFAULT_VWINDOW);
+               break;
        }
-       VWindow *vwindow = mwindow->vwindows.size() > DEFAULT_VWINDOW ?
-               mwindow->vwindows.get(DEFAULT_VWINDOW) : 0;
        if( !vwindow || !vwindow->is_running() ) return 1;
+       if( proxy && picon_idxbl ) {
+               picon_edl = gui->collect_proxy(picon_idxbl);
+               picon_idxbl = 0;
+       }
 
-       if( asset_picon->indexable )
-               vwindow->change_source(asset_picon->indexable);
-       else if( asset_picon->edl )
-               vwindow->change_source(asset_picon->edl);
+       if( picon_idxbl ) vwindow->change_source(picon_idxbl);
+       else if( picon_edl ) vwindow->change_source(picon_edl);
        return 1;
 }
 
@@ -2459,10 +2477,14 @@ AddTools::AddTools(MWindow *mwindow, AWindowGUI *gui, int x, int y, const char *
 void AddTools::create_objects()
 {
        uint64_t vis = 0;
-       add_item(new AddPluginItem(this, "ladspa", PLUGIN_LADSPA_ID));
-       vis |= 1 << PLUGIN_LADSPA_ID;
        add_item(new AddPluginItem(this, "ffmpeg", PLUGIN_FFMPEG_ID));
        vis |= 1 << PLUGIN_FFMPEG_ID;
+       add_item(new AddPluginItem(this, "ladspa", PLUGIN_LADSPA_ID));
+       vis |= 1 << PLUGIN_LADSPA_ID;
+#ifdef HAVE_LV2
+       add_item(new AddPluginItem(this, "lv2", PLUGIN_LV2_ID));
+       vis |= 1 << PLUGIN_LV2_ID;
+#endif
        for( int i=0; i<MWindow::plugindb->size(); ++i ) {
                PluginServer *plugin = MWindow::plugindb->get(i);
                if( !plugin->audio && !plugin->video ) continue;
@@ -2481,8 +2503,9 @@ void AddTools::create_objects()
 
 #if 0
 // plugin_dirs list from toplevel makefile include plugin_defs
-N_("ladspa")
 N_("ffmpeg")
+N_("ladspa")
+N_("lv2")
 N_("audio_tools")
 N_("audio_transitions")
 N_("blending")