X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmain.C;h=ed403d9ec82f6675aebd651eb2d29bb4a38ff4a7;hb=9bfa5ffc623a598d68264609cad82d71432981c5;hp=42207c557b05bad7ef99ee0fa27aa7c16079adf2;hpb=4c207ab325a8e8e6b79a9a18d4647273b5f59f93;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/main.C b/cinelerra-5.1/cinelerra/main.C index 42207c55..ed403d9e 100644 --- a/cinelerra-5.1/cinelerra/main.C +++ b/cinelerra-5.1/cinelerra/main.C @@ -1,6 +1,7 @@ /* * CINELERRA * Copyright (C) 2010 Adam Williams + * Copyright (C) 2003-2016 Cinelerra CV contributors * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +23,7 @@ #include "arraylist.h" #include "batchrender.h" #include "bcsignals.h" +#include "cstrdup.h" #include "edl.h" #include "file.h" #include "filexml.h" @@ -141,6 +143,15 @@ static float get_layout_scale() return scale; } +/******************************************************************* +* @mainpage +* Cinelerra-GG is a professional video editor for Linux. It is timeline +* based, supports hundreds of (de)coders, LADSPA and LV2 audio plugins, +* FFMPEG audio/video plugins, plus built-in audio/video plugins. +* Screen sizes up to 8K, any frame rate, extensive compositing features, +* title generator and more. +* +********************************************************************/ int main(int argc, char *argv[]) { // handle command line arguments first @@ -167,8 +178,9 @@ int main(int argc, char *argv[]) batch_path[0] = 0; deamon_path[0] = 0; Units::init(); - - File::init_cin_path(); + const char *lang = getenv("LANGUAGE"); + if( lang ) lang = cstrdup(lang); + File::init_cin_env_vars(); const char *locale_path = File::get_locale_path(); const char *cin = File::get_cin(); @@ -363,7 +375,7 @@ int main(int argc, char *argv[]) MWindow mwindow; mwindow.create_objects(1, !filenames.total, config_path); CommandLineThread *thread = 0; - if( mwindow.preferences->perpetual_session && load_perpetual ) + if( load_perpetual ) mwindow.load_undo_data(); //SET_TRACE // load the initial files on seperate tracks @@ -397,16 +409,18 @@ int main(int argc, char *argv[]) } if( restart <= 0 ) done = 1; - mwindow.save_defaults(); - if( mwindow.preferences->perpetual_session ) - mwindow.save_undo_data(); + mwindow.save_undo_data(); //PRINT_TRACE filenames.remove_all_objects(); delete thread; } if( restart < 0 ) { + if( lang ) // reset to cmdline state + setenv("LANGUAGE", lang, 1); + else + unsetenv("LANGUAGE"); char exe_path[BCTEXTLEN]; int len = readlink("/proc/self/exe", exe_path, sizeof(exe_path)-1); if( len < 0 ) break; @@ -424,6 +438,7 @@ DISABLE_BUFFER } filenames.remove_all_objects(); + delete [] lang; Units::finit(); BC_WindowBase::finit_resources();