X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fawindowgui.C;h=1aa57e35b5ebf3eeb42ede875813adb50ec7a509;hb=099132c524d32342be6cfc4948ecb1b3a439b988;hp=cabbbc06fb1c86eda270c8bfed0c13ccb83a2027;hpb=4c207ab325a8e8e6b79a9a18d4647273b5f59f93;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index cabbbc06..1aa57e35 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -109,6 +109,7 @@ AssetVIcon::AssetVIcon(AssetPicon *picon, int w, int h, double framerate, int64_ this->picon = picon; this->length = length; temp = 0; + broken = 0; } AssetVIcon::~AssetVIcon() @@ -119,6 +120,7 @@ AssetVIcon::~AssetVIcon() VFrame *AssetVIcon::frame() { + if( broken ) return 0; AssetVIconThread *avt = picon->gui->vicon_thread; Indexable *idxbl = picon->indexable; Asset *asset = idxbl && idxbl->is_asset ? (Asset *)idxbl : 0; @@ -161,7 +163,10 @@ VFrame *AssetVIcon::frame() if( seq_no >= images.size() ) { MWindow *mwindow = picon->mwindow; File *file = mwindow->video_cache->check_out(asset, mwindow->edl, 1); - if( !file ) return 0; + if( !file ) { + broken = 1; + return 0; + } if( temp && (temp->get_w() != asset->width || temp->get_h() != asset->height) ) { delete temp; temp = 0; } @@ -918,16 +923,25 @@ void AssetPicon::create_objects() int is_clip = 0; if( this->indexable ) { - fs.extract_name(name, indexable->path); - set_text(name); - if( this->indexable->is_asset ) + char *cp = name; + if( this->indexable->is_asset ) { asset = (Asset *)indexable; - else + if( asset->format == FILE_REF ) { + cp += sprintf(cp, "ref:"); + set_color(get_color() ^ 0x5599CC); + } + } + else { edl = (EDL *)indexable; + cp += sprintf(cp, "edl:"); +// set_color(get_color() ^ 0xCC9955); + } + fs.extract_name(cp, indexable->path); + set_text(name); } else if( this->edl ) { edl = this->edl; - set_text(strcpy(name, edl->local_session->clip_title)); + strcpy(name, edl->local_session->clip_title); set_text(name); is_clip = 1; } @@ -2068,10 +2082,6 @@ void AWindowGUI::update_asset_list() if( !exists ) { AssetPicon *picon = new AssetPicon(mwindow, this, current); - if( current->format == FILE_REF ) { - int color = picon->get_color(); - picon->set_color(color ^ 0x5599CC); - } new_assets.append(picon); } } @@ -2643,12 +2653,18 @@ int AWindowFolders::load_expanders() char expanders_path[BCTEXTLEN]; mwindow->create_defaults_path(expanders_path, EXPANDERS_FILE); FILE *fp = fopen(expanders_path, "r"); + if( !fp ) { + snprintf(expanders_path, sizeof(expanders_path), "%s/%s", + File::get_cindat_path(), EXPANDERS_FILE); + char *cp = strrchr(expanders_path,'.'); + if( cp ) strcpy(cp+1, mwindow->cin_lang); + fp = fopen(expanders_path, "r"); + } if( !fp ) { snprintf(expanders_path, sizeof(expanders_path), "%s/%s", File::get_cindat_path(), EXPANDERS_FILE); fp = fopen(expanders_path, "r"); } - if( !fp ) return 1; const char tab = '\t'; char line[BCTEXTLEN]; line[0] = 0;