X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fawindowgui.C;h=d2777c93a74edb902295233ccc6e12da7735ba86;hb=f3adc7285af86851913b48592a8c4fdfcdcdf8b6;hp=a984e20cdf66c45455fc08607471f5ed8bd0292b;hpb=38cb4182e11e57fc426bede3825e825e9d61433b;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index a984e20c..d2777c93 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -29,6 +29,7 @@ #include "bcsignals.h" #include "bchash.h" #include "cache.h" +#include "cstrdup.h" #include "clip.h" #include "clippopup.h" #include "cursors.h" @@ -105,7 +106,7 @@ VFrame *AssetVIcon::frame() delete temp; temp = 0; } if( !temp ) - temp = new VFrame(asset->width, asset->height, BC_RGB888); + temp = new VFrame(asset->width, asset->height, BC_RGB888, 0); int ww = picon->gui->vicon_thread->view_w; int hh = picon->gui->vicon_thread->view_h; while( seq_no >= images.size() ) { @@ -297,31 +298,31 @@ void AssetPicon::create_objects() else { gui->lock_window("AssetPicon::create_objects 2"); icon = gui->video_icon; - icon_vframe = BC_WindowBase::get_resources()->type_to_icon[ICON_FILM]; + icon_vframe = gui->video_vframe; } } else { icon = gui->video_icon; - icon_vframe = BC_WindowBase::get_resources()->type_to_icon[ICON_FILM]; + icon_vframe = gui->video_vframe; } } else if( asset->audio_data ) { icon = gui->audio_icon; - icon_vframe = BC_WindowBase::get_resources()->type_to_icon[ICON_SOUND]; + icon_vframe = gui->audio_vframe; } } else if( indexable && !indexable->is_asset ) { icon = gui->video_icon; - icon_vframe = BC_WindowBase::get_resources()->type_to_icon[ICON_FILM]; + icon_vframe = gui->video_vframe; } else if( edl ) { set_text(strcpy(name, edl->local_session->clip_title)); icon = gui->clip_icon; - icon_vframe = mwindow->theme->get_image("clip_icon"); + icon_vframe = gui->clip_vframe; } else if( plugin ) { @@ -373,9 +374,7 @@ void AssetPicon::create_objects() mwindow->edl->session->frames_per_foot); set_text(name); icon = gui->label_icon; - icon_vframe = BC_WindowBase::get_resources()->type_to_icon[ICON_LABEL]; - set_icon(icon); - set_icon_vframe(icon_vframe); + icon_vframe = gui->label_vframe; } if( !icon ) { icon = gui->file_icon; @@ -616,9 +615,9 @@ void AWindowGUI::create_objects() mwindow->theme->get_awindow_sizes(this); load_defaults(mwindow->defaults); - int x1 = mwindow->theme->alist_x, y1 = mwindow->theme->alist_y + 5; + int x1 = mwindow->theme->alist_x, y1 = mwindow->theme->alist_y; int w1 = mwindow->theme->alist_w, h1 = mwindow->theme->alist_h; - search_text = new AWindowSearchText(mwindow, this, x1, y1); + search_text = new AWindowSearchText(mwindow, this, x1, y1+5); search_text->create_objects(); int dy = search_text->get_h() + 10; y1 += dy; h1 -= dy; @@ -720,9 +719,9 @@ int AWindowGUI::translation_event() void AWindowGUI::reposition_objects() { - int x1 = mwindow->theme->alist_x, y1 = mwindow->theme->alist_y + 5; + int x1 = mwindow->theme->alist_x, y1 = mwindow->theme->alist_y; int w1 = mwindow->theme->alist_w, h1 = mwindow->theme->alist_h; - search_text->reposition_window(x1, y1, w1); + search_text->reposition_window(x1, y1+5, w1); int dy = search_text->get_h() + 10; y1 += dy; h1 -= dy; asset_list->reposition_window(x1, y1, w1, h1); @@ -837,6 +836,7 @@ void AWindowRemovePlugin::handle_close_event(int result) { if( !result ) { printf(_("remove %s\n"), plugin->path); + awindow->gui->lock_window("AWindowRemovePlugin::handle_close_event"); ArrayList *folder = plugin->audio ? plugin->transition ? &awindow->gui->atransitions : @@ -846,14 +846,14 @@ void AWindowRemovePlugin::handle_close_event(int result) &awindow->gui->veffects : 0; if( folder ) remove_plugin(plugin, *folder); + MWindow *mwindow = awindow->mwindow; + awindow->gui->unlock_window(); char plugin_path[BCTEXTLEN]; strcpy(plugin_path, plugin->path); - MWindow *mwindow = awindow->mwindow; mwindow->plugindb->remove(plugin); remove(plugin_path); char index_path[BCTEXTLEN]; - snprintf(index_path, sizeof(index_path), "%s/%s", - mwindow->preferences->plugin_dir, PLUGIN_FILE); + mwindow->create_defaults_path(index_path, PLUGIN_FILE); remove(index_path); char picon_path[BCTEXTLEN]; FileSystem fs; @@ -1197,7 +1197,7 @@ void AWindowGUI::copy_picons(ArrayList *dst, (picon->indexable && picon->indexable->awindow_folder == folder) || (picon->edl && picon->edl->local_session->awindow_folder == folder) ) { const char *text = search_text->get_text(); - int hidden = text && text[0] && !strcasestr(picon->get_text(), text); + int hidden = text && text[0] && !bstrcasestr(picon->get_text(), text); if( picon->vicon ) picon->vicon->hidden = hidden; if( hidden ) continue; BC_ListBoxItem *item2, *item1;