clip folder bug on reload, expander user folder drag/drop segv, remove libfdk src...
authorGood Guy <good1.2guy@gmail.com>
Mon, 22 Oct 2018 22:55:55 +0000 (16:55 -0600)
committerGood Guy <good1.2guy@gmail.com>
Mon, 22 Oct 2018 22:55:55 +0000 (16:55 -0600)
26 files changed:
cinelerra-5.1/blds/cfg-cv.sh
cinelerra-5.1/cinelerra/asset.C
cinelerra-5.1/cinelerra/assetpopup.C
cinelerra-5.1/cinelerra/awindowgui.C
cinelerra-5.1/cinelerra/awindowgui.h
cinelerra-5.1/cinelerra/binfolder.C
cinelerra-5.1/cinelerra/clipedit.C
cinelerra-5.1/cinelerra/clipedls.C
cinelerra-5.1/cinelerra/clippopup.C
cinelerra-5.1/cinelerra/editpopup.C
cinelerra-5.1/cinelerra/edl.C
cinelerra-5.1/cinelerra/indexable.C
cinelerra-5.1/cinelerra/indexable.h
cinelerra-5.1/cinelerra/localsession.C
cinelerra-5.1/cinelerra/localsession.h
cinelerra-5.1/cinelerra/mainsession.C
cinelerra-5.1/cinelerra/mainsession.h
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/mwindowedit.C
cinelerra-5.1/cinelerra/presets.C
cinelerra-5.1/cinelerra/proxy.C
cinelerra-5.1/configure.ac
cinelerra-5.1/guicast/bclistbox.C
cinelerra-5.1/guicast/bclistbox.h
cinelerra-5.1/plugins/bluebanana/bluebananaslider.C
cinelerra-5.1/thirdparty/src/fdk-aac-0.1.5.tar.xz [deleted file]

index 153a526b80d21984a6242801caf6608308943400..dd9f35748605afd8e526b86ef0466810221e0092 100755 (executable)
@@ -22,7 +22,7 @@ mkdir -p libzmpeg3 db db/utils mpeg2enc mplexlo
   --enable-libogg=auto --enable-libtheora=auto --enable-libvorbis=auto \
   --enable-openexr=auto --enable-libsndfile=auto --enable-libdv=auto \
   --enable-libjpeg=auto --enable-tiff=auto --enable-x264=auto \
-  --disable-audiofile --disable-encore --disable-esound --disable-fdk \
+  --enable-audiofile --disable-encore --disable-esound --disable-fdk \
   --disable-ffmpeg --disable-fftw --disable-flac --disable-giflib --disable-ilmbase \
   --disable-libavc1394 --disable-libraw1394 --disable-libiec61883 --disable-libvpx \
   --disable-openjpeg --disable-twolame --disable-x265
index ec82d0e9e6ead12eb2d7e245f161a5579303b35b..4f911e984d544803057547946beb7b9de4ddd55e 100644 (file)
@@ -190,7 +190,7 @@ void Asset::copy_from(Asset *asset, int do_index)
 void Asset::copy_location(Asset *asset)
 {
        strcpy(path, asset->path);
-       awindow_folder = asset->awindow_folder;
+       folder_no = asset->folder_no;
 }
 
 void Asset::copy_format(Asset *asset, int do_index)
@@ -459,7 +459,7 @@ int Asset::read(FileXML *file,
                        else
                        if(file->tag.title_is("FOLDER"))
                        {
-                               awindow_folder = file->tag.get_property("NUMBER", AW_MEDIA_FOLDER);
+                               folder_no = file->tag.get_property("NUMBER", AW_MEDIA_FOLDER);
                        }
                        else
                        if(file->tag.title_is("VIDEO"))
@@ -577,7 +577,7 @@ int Asset::write(FileXML *file,
        file->append_newline();
 
        file->tag.set_title("FOLDER");
-       file->tag.set_property("NUMBER", awindow_folder);
+       file->tag.set_property("NUMBER", folder_no);
        file->append_tag();
        file->tag.set_title("/FOLDER");
        file->append_tag();
index fe52bbd6936336a0ac2a848ae37606f0cac296e7..c9bac6fd1d9bbae4dda377d2e0493703ae6dc4cc 100644 (file)
@@ -823,7 +823,7 @@ int SnapshotMenuItem::handle_event()
                file.close_file();
        }
        if( !ret ) {
-               asset->awindow_folder = AW_MEDIA_FOLDER;
+               asset->folder_no = AW_MEDIA_FOLDER;
                mwindow->edl->assets->append(asset);
                mwindow->awindow->gui->async_update_assets();
        }
@@ -1044,7 +1044,7 @@ int GrabshotPopup::grab_event(XEvent *event)
                file.close_file();
        }
        if( !ret ) {
-               asset->awindow_folder = AW_MEDIA_FOLDER;
+               asset->folder_no = AW_MEDIA_FOLDER;
                mwindow->edl->assets->append(asset);
                mwindow->awindow->gui->async_update_assets();
        }
index 3f9f9b2fa0a82161d150047d294b992c95c429c9..009647b3dbc7daeb084fd2fc56173be89e4f4ab5 100644 (file)
@@ -579,7 +579,7 @@ void AssetPicon::create_objects()
                                        icon_vframe = new VFrame(0,
                                                -1, pixmap_w, pixmap_h, BC_RGB888, -1);
                                        icon_vframe->transfer_from(gui->temp_picon);
-                                       if( asset->awindow_folder == AW_MEDIA_FOLDER ) {
+                                       if( asset->folder_no == AW_MEDIA_FOLDER ) {
 // vicon images
                                                double framerate = asset->get_frame_rate();
                                                if( !framerate ) framerate = VICON_RATE;
@@ -645,7 +645,7 @@ void AssetPicon::create_objects()
                                                        base_colors[i], line_colors[i]);
                                        }
                                        mwindow->audio_cache->check_in(asset);
-                                       if( asset->awindow_folder == AW_MEDIA_FOLDER ) {
+                                       if( asset->folder_no == AW_MEDIA_FOLDER ) {
                                                double secs = duration;
                                                if( secs > 5 ) secs = 5;
                                                double refresh_rate = gui->vicon_thread->refresh_rate;
@@ -1642,6 +1642,10 @@ void AWindowGUI::update_asset_list()
        for( int i=0; i<new_assets.size(); ++i ) {
                AssetPicon *picon = new_assets[i];
                picon->create_objects();
+               if( picon->indexable )
+                       picon->foldernum = AW_MEDIA_FOLDER;
+               else if( picon->edl )
+                       picon->foldernum = AW_CLIP_FOLDER;
                assets.append(picon);
        }
 
@@ -1763,7 +1767,7 @@ EDL *AWindowGUI::collect_proxy(Indexable *indexable)
                if( current->data_type != TRACK_AUDIO ) continue;
                current->insert_asset(unproxy_asset, 0, length, 0, atrack++);
        }
-       proxy_edl->awindow_folder = AW_PROXY_FOLDER;
+       proxy_edl->folder_no = AW_PROXY_FOLDER;
        return proxy_edl;
 }
 
@@ -1776,7 +1780,7 @@ void AWindowGUI::collect_assets(int proxy)
        while( (result = (AssetPicon*)asset_list->get_selection(0, i++)) != 0 ) {
                Indexable *indexable = result->indexable;
                if( proxy && indexable && indexable->is_asset &&
-                   indexable->awindow_folder == AW_PROXY_FOLDER ) {
+                   indexable->folder_no == AW_PROXY_FOLDER ) {
                        EDL *drag_edl = collect_proxy(indexable);
                        if( drag_edl ) mwindow->session->drag_clips->append(drag_edl);
                        continue;
@@ -1792,30 +1796,22 @@ void AWindowGUI::collect_assets(int proxy)
        }
 }
 
-void AWindowGUI::copy_picons(ArrayList<BC_ListBoxItem*> *dst,
-       ArrayList<BC_ListBoxItem*> *src, int folder)
+void AWindowGUI::copy_picons(AssetPicon *picon, ArrayList<BC_ListBoxItem*> *src)
 {
 // Remove current pointers
+       ArrayList<BC_ListBoxItem*> *dst = displayed_assets;
        dst[0].remove_all();
        dst[1].remove_all_objects();
-       AWindowFolderSubItems *sub_items = 0;
-       if( folder >= 0 && folder < AW_LABEL_FOLDER ) {
-               AssetPicon *picon = 0;
-               for( int k=folders.size(); --k>=0; ) {
-                       picon = (AssetPicon*)folders[k];
-                       if( picon->foldernum == folder ) break;
-               }
-               if( picon )
-                       sub_items = picon->sub_items;
-               folder = AW_NO_FOLDER;
-       }
+
+       AWindowFolderSubItems *sub_items = picon ? picon->sub_items : 0;
+       int folder = mwindow->edl->session->awindow_folder;
        BinFolder *bin_folder = folder < AWINDOW_USER_FOLDERS ? 0 :
                mwindow->edl->get_folder(folder);
 
 // Create new pointers
        for( int i = 0; i < src->total; i++ ) {
-               int visible = folder < 0 ? 1 : 0;
-               AssetPicon *picon = (AssetPicon*)src->values[i];
+               int visible = folder >= AW_CLIP_FOLDER ? 0 : 1;
+               picon = (AssetPicon*)src->values[i];
                picon->sort_key = -1;
                if( !visible && bin_folder ) {
                        Indexable *idxbl = bin_folder->is_clips ? (Indexable *)picon->edl :
@@ -1827,9 +1823,9 @@ void AWindowGUI::copy_picons(ArrayList<BC_ListBoxItem*> *dst,
                                visible = 1;
                        }
                }
-               if( !visible && picon->indexable && picon->indexable->awindow_folder == folder )
+               if( !visible && picon->indexable && picon->indexable->folder_no == folder )
                        visible = 1;
-               if( !visible && picon->edl && picon->edl->local_session->folder == folder )
+               if( !visible && picon->edl && picon->edl->folder_no == folder )
                        visible = 1;
                if( visible && sub_items ) {
                        if( !sub_items->matches(picon->get_text()) )
@@ -1904,39 +1900,29 @@ void AWindowGUI::filter_displayed_assets()
        //allow_iconlisting = 1;
        asset_titles[0] = C_("Title");
        asset_titles[1] = _("Comments");
-       int folder = mwindow->edl->session->awindow_folder;
-
-       switch( folder ) {
-       case AW_AEFFECT_FOLDER:
-               copy_picons(displayed_assets, &aeffects, folder);
-               break;
-       case AW_VEFFECT_FOLDER:
-               copy_picons(displayed_assets, &veffects, folder);
-               break;
-       case AW_ATRANSITION_FOLDER:
-               copy_picons(displayed_assets, &atransitions, folder);
-               break;
-       case AW_VTRANSITION_FOLDER:
-               copy_picons(displayed_assets, &vtransitions, folder);
-               break;
-       case AW_LABEL_FOLDER:
-               copy_picons(displayed_assets, &labellist, AW_NO_FOLDER);
-               asset_titles[0] = _("Time Stamps");
-               asset_titles[1] = C_("Title");
-               //allow_iconlisting = 0;
-               break;
-       default:
-               copy_picons(displayed_assets, &assets, mwindow->edl->session->awindow_folder);
-               break;
-       }
-
-       // Ensure the current folder icon is highlighted
+       AssetPicon *picon = 0;
        int selected_folder = mwindow->edl->session->awindow_folder;
+       // Ensure the current folder icon is highlighted
        for( int i = 0; i < folders.total; i++ ) {
                AssetPicon *folder_item = (AssetPicon *)folders.values[i];
                int selected = folder_item->foldernum == selected_folder ? 1 : 0;
                folder_item->set_selected(selected);
+               if( selected ) picon = folder_item;
+       }
+
+       ArrayList<BC_ListBoxItem*> *src = &assets;
+       switch( selected_folder ) {
+       case AW_AEFFECT_FOLDER:  src = &aeffects;  break;
+       case AW_VEFFECT_FOLDER:  src = &veffects;  break;
+       case AW_ATRANSITION_FOLDER:  src = &atransitions;  break;
+       case AW_VTRANSITION_FOLDER:  src = &vtransitions;  break;
+       case AW_LABEL_FOLDER:  src = &labellist;
+               asset_titles[0] = _("Time Stamps");
+               asset_titles[1] = C_("Title");
+               //allow_iconlisting = 0;
+               break;
        }
+       copy_picons(picon, src);
 }
 
 
@@ -2163,7 +2149,7 @@ int AWindowFolders::drag_stop()
        if( get_hidden() ) return 0;
        if( mwindow->session->current_operation == DRAG_ASSET &&
            gui->folder_list->cursor_above() ) { // check user folder
-               int item_no = gui->folder_list->get_cursor_item();
+               int item_no = gui->folder_list->get_cursor_data_item_no();
                AssetPicon *picon = (AssetPicon *)(item_no < 0 ? 0 : gui->folders[item_no]);
                if( picon && picon->foldernum >= AWINDOW_USER_FOLDERS ) {
                        BinFolder *folder = mwindow->edl->get_folder(picon->foldernum);
@@ -2488,11 +2474,14 @@ int AWindowAssets::drag_motion_event()
        lock_window("AWindowAssets::drag_motion_event");
        if( mwindow->session->current_operation == DRAG_ASSET &&
            gui->folder_list->cursor_above() ) { // highlight user folder
-               int item_no = gui->folder_list->get_cursor_item();
+               BC_ListBoxItem *item = 0;
+               int item_no = gui->folder_list->get_cursor_data_item_no(&item);
                if( item_no >= 0 ) {
                        AssetPicon *folder = (AssetPicon *)gui->folders[item_no];
                        if( folder->foldernum < AWINDOW_USER_FOLDERS ) item_no = -1;
                }
+               if( item_no >= 0 )
+                       item_no = gui->folder_list->item_to_index(&gui->folders, item);
                int folder_xposition = gui->folder_list->get_xposition();
                int folder_yposition = gui->folder_list->get_yposition();
                gui->folder_list->update(&gui->folders, 0, 0, 1,
index 6cab2a6d2c45bd3b432c44b86e436e7b0a6f0c9c..d135145555cd4bb8552cea543ff19d37d20ea4ea 100644 (file)
@@ -207,8 +207,7 @@ public:
                int is_realtime,
                int is_transition);
        void create_label_folder();
-       void copy_picons(ArrayList<BC_ListBoxItem*> *dst,
-               ArrayList<BC_ListBoxItem*> *src, int folder);
+       void copy_picons(AssetPicon *picon, ArrayList<BC_ListBoxItem*> *src);
        void sort_picons(ArrayList<BC_ListBoxItem*> *src);
 // Return the selected asset in asset_list
        Indexable* selected_asset();
index dfe101cdb5eb6d295aefe061a2801f6c0bc2cba4..e8a8411d0d0b1dfaee797cfa59222b6bbf8056be 100644 (file)
@@ -347,7 +347,7 @@ int BinFolder::add_patterns(ArrayList<Indexable*> *drag_idxbls, int use_basename
        for( int i=0; i<n; ++i ) {
                idxbl = drag_idxbls->get(i);
                if( !idxbl->is_asset &&
-                   idxbl->awindow_folder == AW_PROXY_FOLDER )
+                   idxbl->folder_no == AW_PROXY_FOLDER )
                        continue;
 
                const char *tp = idxbl->get_title();
@@ -363,7 +363,7 @@ int BinFolder::add_patterns(ArrayList<Indexable*> *drag_idxbls, int use_basename
        for( int i=0; i<n; ++i ) {
                idxbl = drag_idxbls->get(i);
                if( !idxbl->is_asset &&
-                   idxbl->awindow_folder == AW_PROXY_FOLDER )
+                   idxbl->folder_no == AW_PROXY_FOLDER )
                        continue;
                if( i > 0 ) *bp++ = '\n';
                const char *tp = idxbl->get_title();
index a3f633aa6c5b44f86e689278748f20b4fd76dd91..29ebd9f6549fc440264cb39049fef2dbf7b480d3 100644 (file)
@@ -85,9 +85,7 @@ void ClipEdit::handle_close_event(int result)
                if( vwindow && create_it ) {
 //                             vwindow->change_source(new_edl);
                }
-       }
-       else {
-               mwindow->session->clip_number--;
+               mwindow->session->update_clip_number();
        }
 
 // always a copy from new_gui
index 6f384fe8877196077e9833ca74a48e8bb0f0f90a..83c23ee098f39633581606352a0da72d801dddae 100644 (file)
@@ -22,6 +22,7 @@ void ClipEDLs::clear()
 
 void ClipEDLs::add_clip(EDL *edl)
 {
+       edl->folder_no = AW_CLIP_FOLDER;
        append(edl);
        edl->add_user();
 }
index 6806848151c5551abcd0f38a2670a776aa7820aa..4027b8190a148b75898b637e4ca89820fd40d7d4 100644 (file)
@@ -444,7 +444,7 @@ int ClipPopupNest::handle_event()
                EDL *clip = mwindow->session->drag_clips->values[0];
                EDL *nested = edl->new_nested(clip, path);
                EDL *new_clip = edl->create_nested_clip(nested);
-               new_clip->awindow_folder = AW_CLIP_FOLDER;
+               new_clip->folder_no = AW_CLIP_FOLDER;
                 sprintf(new_clip->local_session->clip_icon,
                         "clip_%02d%02d%02d-%02d%02d%02d.png",
                         dtm.tm_year+1900, dtm.tm_mon+1, dtm.tm_mday,
@@ -502,7 +502,7 @@ int ClipPopupUnNest::handle_event()
                        EDL *new_clip = new EDL(edl);
                        new_clip->create_objects();
                        new_clip->copy_all(nested_edl);
-                       new_clip->awindow_folder = AW_CLIP_FOLDER;
+                       new_clip->folder_no = AW_CLIP_FOLDER;
                        int idx = edl->clips.number_of(clip);
                        if( idx >= 0 ) {
                                edl->clips[idx] = new_clip;
index f20f9b95850b317614290869e0740841e52461c0..25931b5d42a8821443de286a97931fc9880b3278 100644 (file)
@@ -241,7 +241,7 @@ int EditPopupFindAsset::handle_event()
                                ap->set_selected(found);
                        }
                        if( picon ) {
-                               int selected_folder = picon->indexable->awindow_folder;
+                               int selected_folder = picon->indexable->folder_no;
                                mwindow->edl->session->awindow_folder = selected_folder;
                                for( int i=0,n=agui->folders.size(); i<n; ++i ) {
                                        AssetPicon *folder_item = (AssetPicon *)agui->folders[i];
index a756e6e576bae9999d136b7d27ffe2ef6666c318..21abfd7b99c95524e7d54020228b5f881b313840 100644 (file)
@@ -342,6 +342,7 @@ int EDL::save_xml(FileXML *file, const char *output_path)
 int EDL::copy_all(EDL *edl)
 {
        if( this == edl ) return 0;
+       folder_no = edl->folder_no;
        update_index(edl);
        copy_session(edl);
        copy_assets(edl);
@@ -402,7 +403,6 @@ void EDL::copy_session(EDL *edl, int session_only)
 
        if( !session_only ) {
                strcpy(this->path, edl->path);
-               awindow_folder = edl->awindow_folder;
                folders.copy_from(&edl->folders);
        }
 
@@ -1029,6 +1029,7 @@ EDL* EDL::add_clip(EDL *edl)
        EDL *new_edl = new EDL(this);
        new_edl->create_objects();
        new_edl->copy_all(edl);
+       new_edl->folder_no = AW_CLIP_FOLDER;
        clips.append(new_edl);
        return new_edl;
 }
@@ -1540,11 +1541,11 @@ void EDL::set_proxy(int new_scale, int use_scaler,
                rescale_proxy(orig_scale, new_scale);
 
 // change original assets to proxy assets
-       int awindow_folder = use_scaler || new_scale != 1 ? AW_PROXY_FOLDER : AW_MEDIA_FOLDER;
+       int folder_no = use_scaler || new_scale != 1 ? AW_PROXY_FOLDER : AW_MEDIA_FOLDER;
        for( int i=0,n=proxy_assets->size(); i<n; ++i ) {
                const char *orig_path = orig_assets->get(i)->path;
                Indexable *proxy_idxbl = proxy_assets->get(i);
-               proxy_idxbl->awindow_folder = awindow_folder;
+               proxy_idxbl->folder_no = folder_no;
                Asset *proxy_asset = proxy_idxbl->is_asset ? assets->update((Asset *)proxy_idxbl) : 0;
                if( proxy_asset && proxy_idxbl ) {
                        proxy_asset->width = proxy_idxbl->get_w();
@@ -1598,7 +1599,7 @@ void EDL::add_proxy(int use_scaler,
 // change original assets to proxy assets
        for( int i=0,n=proxy_assets->size(); i<n; ++i ) {
                Asset *proxy_asset = assets->update((Asset *)proxy_assets->get(i));
-               proxy_asset->awindow_folder = AW_PROXY_FOLDER;
+               proxy_asset->folder_no = AW_PROXY_FOLDER;
 // replace track contents
                for( Track *track=tracks->first; track; track=track->next ) {
                        if( track->data_type != TRACK_VIDEO ) continue;
@@ -1614,7 +1615,7 @@ void EDL::add_proxy(int use_scaler,
 
 Asset *EDL::get_proxy_asset()
 {
-       return awindow_folder == AW_PROXY_FOLDER ?
+       return folder_no == AW_PROXY_FOLDER ?
                tracks->first->edits->first->asset : 0;
 }
 
index 2d32e1943fc84e45f9d0969b50fed0b6318c5e26..30553a79e92177fbfba0ade776b5a34e28e3e356 100644 (file)
@@ -31,7 +31,7 @@ Indexable::Indexable(int is_asset) : Garbage(is_asset ? "Asset" : "EDL")
 {
        index_state = new IndexState;
        this->is_asset = is_asset;
-       this->awindow_folder = AW_MEDIA_FOLDER;
+       this->folder_no = AW_MEDIA_FOLDER;
 }
 
 
@@ -74,7 +74,7 @@ void Indexable::update_index(Indexable *src)
 void Indexable::copy_indexable(Indexable *src)
 {
        if( this == src ) return;
-       awindow_folder = src->awindow_folder;
+       folder_no = src->folder_no;
        update_path(src->path);
        update_index(src);
 }
@@ -118,7 +118,7 @@ const char *Indexable::get_title()
 {
        if( is_asset ) return path;
        EDL *edl = (EDL*)this;
-       if( !edl->parent_edl || awindow_folder == AW_PROXY_FOLDER ) return path;
+       if( !edl->parent_edl || folder_no == AW_PROXY_FOLDER ) return path;
        return edl->local_session->clip_title;
 }
 
index ab07731c17af3be2df7e203f71bbb59348a36ef9..7f9009e111b52b57a9ad6ffff508b769e8b94ef3 100644 (file)
@@ -64,7 +64,7 @@ public:
 // to the backup file, not the project file.
        char path[BCTEXTLEN];
 // Folder in resource manager
-       int awindow_folder;
+       int folder_no;
 
        int is_asset;
 // unique ID of this object for comparison
index 0ce537e25c2b78083c78656579b0cd63aa6225e2..9556dce3d6ebd693e6b3d5dde01230e6d552d179 100644 (file)
@@ -60,7 +60,6 @@ LocalSession::LocalSession(EDL *edl)
 
        selectionstart = selectionend = 0;
        in_point = out_point = -1;
-       folder = AW_CLIP_FOLDER;
        sprintf(clip_title, _("Program"));
        strcpy(clip_notes, _("Hello world"));
        strcpy(clip_icon, "");
@@ -119,7 +118,6 @@ void LocalSession::copy_from(LocalSession *that)
        strcpy(clip_title, that->clip_title);
        strcpy(clip_notes, that->clip_notes);
        strcpy(clip_icon, that->clip_icon);
-       folder = that->folder;
        in_point = that->in_point;
        loop_playback = that->loop_playback;
        loop_start = that->loop_start;
@@ -169,7 +167,6 @@ void LocalSession::save_xml(FileXML *file, double start)
        file->tag.set_property("SELECTION_END", selectionend - start);
        file->tag.set_property("CLIP_TITLE", clip_title);
        file->tag.set_property("CLIP_ICON", clip_icon);
-       file->tag.set_property("FOLDER", folder);
        file->tag.set_property("X_PANE", x_pane);
        file->tag.set_property("Y_PANE", y_pane);
 
@@ -265,10 +262,6 @@ void LocalSession::load_xml(FileXML *file, unsigned long load_flags)
                                        year, mon, mday, hour, min, sec);
                        }
                }
-               int awindow_folder = file->tag.get_property("AWINDOW_FOLDER", -1);
-               folder = awindow_folder >= 0 ? awindow_folder :
-                       file->tag.get_property("FOLDER",
-                               edl->parent_edl ? AW_CLIP_FOLDER : AW_MEDIA_FOLDER);
                loop_playback = file->tag.get_property("LOOP_PLAYBACK", 0);
                loop_start = file->tag.get_property("LOOP_START", (double)0);
                loop_end = file->tag.get_property("LOOP_END", (double)0);
index 5261be1f96d3fbfc72b53974cc0b0dbc776a21c3..ecf48b620a259ee2f4aaaa0ea5bd59939c8c4ba5 100644 (file)
@@ -78,8 +78,6 @@ public:
        char clip_title[BCTEXTLEN];
        char clip_notes[BCTEXTLEN];
        char clip_icon[BCSTRLEN];
-// awindow folder id
-       int folder;
 
        int loop_playback;
        double loop_start, loop_end;
index 4bfda7b05dcd5b17339ec7bc02c788126c62f5ac..86e5b36d3f92c4c579bbbb973347191f85a6dc2d 100644 (file)
@@ -29,6 +29,8 @@
 #include "edlsession.h"
 #include "guicast.h"
 #include "indexable.h"
+#include "language.h"
+#include "localsession.h"
 #include "mainsession.h"
 #include "meterpanel.h"
 #include "mwindow.h"
@@ -589,3 +591,15 @@ Track *MainSession::drag_handle_track()
        return track;
 }
 
+void MainSession::update_clip_number()
+{
+       int clip_no = 0;
+       for( int i=mwindow->edl->clips.size(); --i>=0; ) {
+               EDL *clip_edl = mwindow->edl->clips[i];
+               int no = 0;
+               if( sscanf(clip_edl->local_session->clip_title,_("Clip %d"),&no) == 1 )
+                       if( no > clip_no ) clip_no = no;
+       }
+       clip_number = clip_no+1;
+}
+
index a62063959c060751713a25a2708941734a7b3684..06bd12c09b770b6f73ab08650625a9cc7e7eda73 100644 (file)
@@ -54,6 +54,7 @@ public:
        void default_window_positions(int window_config=0);
        void boundaries();
        Track *drag_handle_track();
+       void update_clip_number();
 
 // For drag and drop events
 // The entire track where the dropped asset is going to go
index 7d871c9652126768e7e3d1612aaaaaa23fcde9ec..25013b43d6e82a9058512cc3912c17555afcea62 100644 (file)
@@ -3470,6 +3470,7 @@ void MWindow::update_project(int load_mode)
 
        if(debug) PRINT_TRACE
        edl->tracks->update_y_pixels(theme);
+       session->update_clip_number();
 
        if(debug) PRINT_TRACE
 
index 24763f75af6fc12d1b82917086f38620c97d496b..f74bfa0c4972db969cb617c9115d184b7069b548 100644 (file)
@@ -2074,7 +2074,7 @@ void MWindow::save_clip(EDL *new_edl, const char *txt)
                "clip_%02d%02d%02d-%02d%02d%02d.png",
                dtm.tm_year+1900, dtm.tm_mon+1, dtm.tm_mday,
                dtm.tm_hour, dtm.tm_min, dtm.tm_sec);
-       new_edl->awindow_folder = AW_CLIP_FOLDER;
+       new_edl->folder_no = AW_CLIP_FOLDER;
        edl->update_assets(new_edl);
        int cur_x, cur_y;
        gui->get_abs_cursor(cur_x, cur_y, 0);
index 237bedd6c5fbd8df1a9e71dc330303c1db526028..2dabe6adb092d7b698a01b8759426d6c10029ab1 100644 (file)
@@ -48,7 +48,7 @@ void PresetsDB::load_from_file(char *path, int is_factory, int clear_it)
        if( clear_it ) clear();
        FileXML file;
 
-       file.read_from_file(path);
+       file.read_from_file(path, 1);
        load_common(&file, is_factory);
 }
 
index 420592ea7e7ec7268928f51a687ff9e8b7d70615..4394120d916f1f77006a6dfac7ff656dfc154674 100644 (file)
@@ -276,7 +276,7 @@ Asset *ProxyRender::add_original(Indexable *idxbl, int new_scale)
                        proxy->copy_format(format_asset, 0);
                        proxy->video_length = video_frames;
                }
-               proxy->awindow_folder = AW_PROXY_FOLDER;
+               proxy->folder_no = AW_PROXY_FOLDER;
                proxy->audio_data = 0;
                proxy->video_data = 1;
                proxy->layers = 1;
index 2c61e826b1d526efe019bde875b131fe4005d59b..131116b593c8c4b12f58a36baba5eb49a5c0af3d 100644 (file)
@@ -732,10 +732,10 @@ fi
 
 AC_DEFUN([PKG_PROVIDE],[
 if test "x$BUILD_$1" = "x" ; then
- if test "x$2" = "xno" -o "x$PKG_$1" = "xno"; then
-  PKG_DISABLED([$1])
- elif test "x$PKG_$1" = "xyes"; then
+ if test "x$PKG_$1" = "xyes"; then
   PKG_FORCED([$1])
+ elif test "x$2" = "xno" -o "x$PKG_$1" = "xno"; then
+  PKG_DISABLED([$1])
  elif test "x$WANT_STATIC_BUILD" = "xyes"; then
   PKG_STATIC([$1],[static])
  elif test "x$HAVE_$1" = "xyes"; then
index 31bcb1412cf40ad43ef64322f422c2413d0b2eaf..2dd4283c990fc325d4caf6edc68068c882a4b035 100644 (file)
@@ -2117,6 +2117,7 @@ int BC_ListBox::get_cursor_item(ArrayList<BC_ListBoxItem*> *data, int cursor_x,
                                    cursor_y < get_item_y(item) + get_item_h(item) ) {
 //printf("BC_ListBox::get_cursor_item %d %d %p\n", master_column, i, item);
                                        if( item_return ) (*item_return) = item;
+                                       if( expanded < 0 ) (*counter) = i;
                                        return (*counter);
                                }
 
@@ -2124,8 +2125,10 @@ int BC_ListBox::get_cursor_item(ArrayList<BC_ListBoxItem*> *data, int cursor_x,
                                if( item->sublist_active() ) {
                                        if( get_cursor_item(item->get_sublist(),
                                              cursor_x, cursor_y, item_return, counter,
-                                             item->get_expand()) >= 0 )
+                                             item->get_expand()) >= 0 ) {
+                                               if( expanded < 0 ) (*counter) = i;
                                                return (*counter);
+                                       }
                                }
                        }
                }
@@ -2136,13 +2139,20 @@ int BC_ListBox::get_cursor_item(ArrayList<BC_ListBoxItem*> *data, int cursor_x,
 }
 
 // short version
-int BC_ListBox::get_cursor_item()
+int BC_ListBox::get_cursor_item_no()
 {
        int rx, ry;
        gui->get_relative_cursor(rx, ry);
        return get_cursor_item(data, rx, ry, 0, 0);
 }
 
+int BC_ListBox::get_cursor_data_item_no(BC_ListBoxItem **item_return)
+{
+       int rx, ry;
+       gui->get_relative_cursor(rx, ry);
+       return get_cursor_item(data, rx, ry, item_return, 0, -1);
+}
+
 int BC_ListBox::repeat_event(int64_t duration)
 {
        switch( current_operation ) {
@@ -2725,7 +2735,7 @@ int BC_ListBox::button_release_event()
 //printf("BC_ListBox::button_release_event 10\n");
                current_operation = NO_OPERATION;
                if( gui ) {
-                       selection_number1 = selection_number = get_cursor_item();
+                       selection_number1 = selection_number = get_cursor_item_no();
 //printf("BC_ListBox::button_release_event %d %d\n", selection_number2, selection_number1);
                }
 
index ba3819ae1b173bc9e0094bdb5bc9a205101bc0d0..6bdd2c041a35e0d202310a27b9c199d3bc7e864d 100644 (file)
@@ -193,6 +193,11 @@ public:
        int is_active();
        int expander_active();
 
+// get item no at current cursor position
+       int get_cursor_item_no();
+// get top data item no, and item at current cursor position
+       int get_cursor_data_item_no(BC_ListBoxItem **item_return=0);
+
        int translation_event();
        int repeat_event(int64_t duration);
        BC_DragWindow* get_drag_popup();
@@ -333,7 +338,6 @@ public:
 // Draw the list items
        int draw_items(int flash, int bg_draw=0);
        int is_highlighted();
-       int get_cursor_item();
 
 private:
        void delete_columns();
@@ -441,7 +445,8 @@ private:
 // Points *item_return to the first item in the row or 0 if no item was found.
 // if it's nonzero.  Returns -1 if no item was found.  Clamps the y coordinate
 // only if the current operation is not SELECT, so scrolling is possible.
-// expanded - 1 if items in this table should be tested for cursor coverage
+// expanded = 1 if items in this table should be tested for cursor coverage
+// expanded = -1 returns only the top level master column index/item
        int get_cursor_item(ArrayList<BC_ListBoxItem*> *data,
                int cursor_x,
                int cursor_y,
index cdaf76de0fe34870e836b72ae38a5b4e63c00468..9acf66b62328266e8bb629da66975c5ec8ddf945 100644 (file)
@@ -1528,15 +1528,17 @@ void BluebananaSliderChannel::update(){
 
     if(!histval){
 
-      for(i=0;i<ntw;i++){
-        unsigned char *row = data;
-        for(j=0;j<nth;j++){
-          row[0] = tb_r;
-          row[1] = tb_g;
-          row[2] = tb_b;
-          row[3] = 0xff;
-          row+=bpr;
+      unsigned char *row = data;
+      for(j=0;j<nth;j++){
+        unsigned char *rp = row;
+        for(i=0;i<ntw;i++){
+          rp[0] = tb_r;
+          rp[1] = tb_g;
+          rp[2] = tb_b;
+          rp[3] = 0xff;
+          rp += bpp;
         }
+        row += bpr;
       }
 
     }else{
diff --git a/cinelerra-5.1/thirdparty/src/fdk-aac-0.1.5.tar.xz b/cinelerra-5.1/thirdparty/src/fdk-aac-0.1.5.tar.xz
deleted file mode 100644 (file)
index e3d4de0..0000000
Binary files a/cinelerra-5.1/thirdparty/src/fdk-aac-0.1.5.tar.xz and /dev/null differ