X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Fmwindow.C;h=8319bfbdead591e94afdb0a1e3ae7f79c87b36d2;hb=22c6251d37911a11e322bf7518e6a992ea0bb6c7;hp=c85212701d68bb1f5e98bb00977958b274c52515;hpb=d3136bf5076921bddf85277f619eeffcf8eb3009;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index c8521270..8319bfbd 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -506,6 +506,13 @@ void MWindow::init_defaults(BC_Hash* &defaults, char *config_path) void MWindow::check_language() { + char pref_locale[BCSTRLEN]; + strcpy(pref_locale, DEFAULT_LOCALE); + defaults->get("LOCALE",pref_locale); +// set LANGUAGE if pref locale != sys + if( strcmp(pref_locale, DEFAULT_LOCALE) ) + setenv("LANGUAGE", pref_locale, 1); + char curr_lang[BCTEXTLEN]; curr_lang[0] = 0; const char *env_lang = getenv("LANGUAGE"); if( !env_lang ) env_lang = getenv("LC_ALL"); @@ -2673,12 +2680,12 @@ void MWindow::create_objects(int want_gui, init_3d(); if(debug) PRINT_TRACE - show_splash(); if(debug) PRINT_TRACE default_standard = default_std(); init_defaults(defaults, config_path); check_language(); + show_splash(); init_preferences(); if(splash_window) splash_window->update_status(_("Initializing Plugins")); @@ -2961,6 +2968,7 @@ void MWindow::show_cwindow() { session->show_cwindow = 1; cwindow->show_window(); + cwindow->gui->tool_panel->raise_tool(); gui->mainmenu->show_cwindow->set_checked(1); } @@ -3734,8 +3742,7 @@ void MWindow::update_project(int load_mode) if( load_mode == LOADMODE_REPLACE || load_mode == LOADMODE_REPLACE_CONCATENATE ) { edl->session->timecode_offset = 0; - delete gui->keyvalue_popup; - gui->keyvalue_popup = 0; + gui->close_keyvalue_popup(); gui->load_panes(); } @@ -4473,26 +4480,20 @@ void MWindow::reset_caches() int locked = gui->get_window_lock(); if( locked ) gui->unlock_window(); awindow->gui->stop_vicon_drawing(1); - frame_cache->remove_all(); - wave_cache->remove_all(); - audio_cache->remove_all(); - video_cache->remove_all(); - if( cwindow->playback_engine ) { - if( cwindow->playback_engine->audio_cache ) - cwindow->playback_engine->audio_cache->remove_all(); - if( cwindow->playback_engine->video_cache ) - cwindow->playback_engine->video_cache->remove_all(); - } + if( cwindow->playback_engine ) + cwindow->playback_engine->create_cache(); for(int i = 0; i < vwindows.size(); i++) { VWindow *vwindow = vwindows[i]; if( !vwindow->is_running() ) continue; if( !vwindow->playback_engine ) continue; - if( vwindow->playback_engine->audio_cache ) - vwindow->playback_engine->audio_cache->remove_all(); - if( vwindow->playback_engine->video_cache ) - vwindow->playback_engine->video_cache->remove_all(); + vwindow->playback_engine->create_cache(); } - if( locked ) gui->lock_window("MWindow::reset_caches"); + gui->lock_window("MWindow::reset_caches"); + frame_cache->remove_all(); + wave_cache->remove_all(); + audio_cache->remove_all(); + video_cache->remove_all(); + if( !locked ) gui->unlock_window(); } void MWindow::remove_from_caches(Indexable *idxbl)