X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fawindowgui.C;h=c9a9a898ec33ba473d1690df138d127f541a7a24;hb=588649236b6ae38da7c8627ff7439aeff3c78798;hp=d71d1588715e1e58e4d0f69028d38c5ba95e3edc;hpb=9ffdfbe8e6fa7daaad4dcfdd46b6ac7b6e7a47e8;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index d71d1588..c9a9a898 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -612,22 +612,10 @@ AssetVIconThread::AssetVIconThread(AWindowGUI *gui, Preferences *preferences) case VICON_COLOR_MODE_HIGH: vicon_cmodel = BC_RGB888; break; } this->vicon_cmodel = vicon_cmodel; - this->draw_lock = new Mutex("AssetVIconThread::draw_lock"); } AssetVIconThread::~AssetVIconThread() { - delete draw_lock; -} - -void AssetVIconThread::drawing_started() -{ - draw_lock->lock("AssetVIconThread::drawing_started"); -} - -void AssetVIconThread::drawing_stopped() -{ - draw_lock->unlock(); } void AssetVIconThread::set_view_popup(AssetVIcon *v, int draw_mode) @@ -691,10 +679,8 @@ ViewPopup *AssetVIconThread::new_view_window(ViewPopup *vpopup) void AssetVIconThread::stop_vicon_drawing(int wait) { stop_drawing(); - if( wait ) { - drawing_started(); // waits for draw lock - drawing_stopped(); - } + gui->lock_window("AssetVIconThread::stop_vicon_drawing"); + gui->unlock_window(); } @@ -959,6 +945,11 @@ void AssetPicon::create_objects() if( asset->video_data ) { if( mwindow->preferences->use_thumbnails ) { gui->unlock_window(); + char string[BCTEXTLEN]; + sprintf(string, _("Reading %s"), name); + mwindow->gui->lock_window("AssetPicon::create_objects"); + mwindow->gui->show_message(string); + mwindow->gui->unlock_window(); File *file = mwindow->video_cache->check_out(asset, mwindow->edl, 1); @@ -982,11 +973,6 @@ void AssetPicon::create_objects() asset->width, asset->height, BC_RGB888, -1); } - { char string[BCTEXTLEN]; - sprintf(string, _("Reading %s"), name); - mwindow->gui->lock_window("AssetPicon::create_objects"); - mwindow->gui->show_message(string); - mwindow->gui->unlock_window(); } file->read_frame(gui->temp_picon); mwindow->video_cache->check_in(asset);