N_("Labels"),
N_("Clips"),
N_("Media"),
- N_("User")
+ N_("Proxy"),
+ N_("User"),
};
{
char png_path[BCTEXTLEN];
char *pp = png_path, *ep = pp + sizeof(png_path)-1;
- pp += snprintf(pp, ep-pp, "%s/picon", File::get_plugin_path());
- if( strcmp(DEFAULT_PICON, plugin_icons) )
- pp += snprintf(pp, ep-pp, "_%s", plugin_icons);
- pp += snprintf(pp, ep-pp, "/%s.png", name);
+ snprintf(pp, ep-pp, "%s/picon_%s/%s.png",
+ File::get_plugin_path(), plugin_icons, name);
return VFramePng::vframe_png(png_path,0,0);
}
folders.append(new AssetPicon(mwindow, this, AW_VTRANSITION_FOLDER, 1));
folders.append(new AssetPicon(mwindow, this, AW_LABEL_FOLDER, 1));
folders.append(new AssetPicon(mwindow, this, AW_CLIP_FOLDER, 1));
+ folders.append(new AssetPicon(mwindow, this, AW_PROXY_FOLDER, 1));
folders.append(new AssetPicon(mwindow, this, AW_MEDIA_FOLDER, 1));
create_label_folder();
snprintf(index_path, sizeof(index_path), "%s/%s",
mwindow->preferences->plugin_dir, PLUGIN_FILE);
remove(index_path);
- char png_path[BCTEXTLEN];
- if( plugin->get_plugin_png_path(png_path, mwindow->preferences->plugin_icons) )
- remove(png_path);
- if( plugin->get_plugin_png_path(png_path, DEFAULT_PICON) )
- remove(png_path);
+ FileSystem fs;
+ fs.update(File::get_plugin_path());
+ for( int i=0; i<fs.dir_list.total; ++i ) {
+ char *fs_path = fs.dir_list[i]->path;
+ if( !fs.is_dir(fs_path) ) continue;
+ char *cp = strrchr(fs_path,'/');
+ cp = !cp ? fs_path : cp+1;
+ if( strncmp("picon_", cp, 6) ) continue;
+ char png_path[BCTEXTLEN];
+ if( !plugin->get_plugin_png_path(png_path, cp+6) )
+ remove(png_path);
+ }
delete plugin; plugin = 0;
awindow->gui->async_update_assets();
}
// printf("AWindowGUI::update_folder_list %s\n", folders.values[i]->get_text());
// Delete excess
- for( int i = folders.total - 1; i >= 0; i-- ) {
+ for( int i=folders.total; --i>=0; ) {
AssetPicon *picon = (AssetPicon*)folders.values[i];
if( !picon->in_use && !picon->persistent ) {
delete picon;
}
// Ensure the current folder icon is highlighted
- for( int i = 0; i < folders.total; i++ )
- folders.values[i]->set_selected(0);
-
- folders.values[mwindow->edl->session->awindow_folder]->set_selected(1);
+ int selected_folder = mwindow->edl->session->awindow_folder;
+ 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);
+ }
}
gui->cliplist_menu->activate_menu();
break;
case AW_MEDIA_FOLDER:
+ case AW_PROXY_FOLDER:
gui->assetlist_menu->update_titles();
gui->assetlist_menu->activate_menu();
break;