X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmainsession.C;h=66978fef4c32c355044270f6c66921d24cc8b0f0;hp=16a20fe891fd8a2dd958677294daaeec51308380;hb=7ffa6954689f14a41a3bae7a0fdb3f2abeaa9679;hpb=0df48ad2d876409c5beeae2e21933a728ea76c33 diff --git a/cinelerra-5.1/cinelerra/mainsession.C b/cinelerra-5.1/cinelerra/mainsession.C index 16a20fe8..66978fef 100644 --- a/cinelerra-5.1/cinelerra/mainsession.C +++ b/cinelerra-5.1/cinelerra/mainsession.C @@ -106,6 +106,9 @@ MainSession::MainSession(MWindow *mwindow) use_vector = 0; use_hist_parade = 0; use_wave_parade = 0; + use_wave_gain = 5; + use_vect_gain = 5; + use_smooth = 0; afolders_w = 0; show_vwindow = show_awindow = show_cwindow = show_gwindow = show_lwindow = 0; plugindialog_w = plugindialog_h = 0; @@ -201,7 +204,7 @@ void MainSession::default_window_positions(int window_config) int border_bottom = display_info.get_bottom_border(); int dual_head = screens > 1 ? 1 : 0; - int left_w = 0, right_w = root_w; + int left_w = 0, left_h = 0, right_w = 0; int xin_screens = display_info.get_xinerama_screens(); if( xin_screens > 1 ) { dual_head = 1; @@ -210,7 +213,7 @@ void MainSession::default_window_positions(int window_config) if( display_info.xinerama_geometry(s, x, y, w, h) ) continue; if( !y && !x ) { - left_w = w; + left_w = w; left_h = h; break; } } @@ -229,14 +232,13 @@ void MainSession::default_window_positions(int window_config) root_w = right_w; } else { - // use same aspect ratio to compute left height root_w = left_w; - root_h = (root_w*root_h) / right_w; + root_h = left_h; } } } // Wider than 16:9, narrower than dual head - if( screens < 2 && (float)root_w / root_h > 1.8 ) { + else if( screens < 2 && (float)root_w / root_h > 1.8 ) { dual_head = 1; switch( root_h ) { case 600: right_w = 800; break; @@ -244,16 +246,20 @@ void MainSession::default_window_positions(int window_config) case 1024: right_w = 1280; break; case 1200: right_w = 1600; break; case 1080: right_w = 1920; break; - default: right_w = root_w/2; break; - } - if( window_config == 1 ) { - root_x = root_w - right_w; - root_w = right_w; + default: + dual_head = 0; + break; } - else { - // use same aspect ratio to compute left height - root_w -= right_w; - root_h = (root_w*root_h) / right_w; + if( dual_head ) { + if( window_config == 1 ) { + root_x = root_w - right_w; + root_w = right_w; + } + else { + // use same aspect ratio to compute left height + root_w -= right_w; + root_h = (root_w*root_h) / right_w; + } } } @@ -318,6 +324,9 @@ void MainSession::default_window_positions(int window_config) use_vector = 1; use_hist_parade = 1; use_wave_parade = 1; + use_wave_gain = 5; + use_vect_gain = 5; + use_smooth = 1; if(mwindow->edl) lwindow_w = MeterPanel::get_meters_width(mwindow->theme, @@ -369,8 +378,12 @@ void MainSession::default_window_positions(int window_config) int MainSession::load_defaults(BC_Hash *defaults) { // Setup main windows - strcpy(a_x11_host, defaults->get("A_X11_HOST", a_x11_host)); - strcpy(b_x11_host, defaults->get("B_X11_HOST", b_x11_host)); + char *a_host = defaults->get("A_X11_HOST", a_x11_host); + if( a_host != a_x11_host ) + strcpy(a_x11_host, defaults->get("A_X11_HOST", a_x11_host)); + char *b_host = defaults->get("B_X11_HOST", b_x11_host); + if( b_host != b_x11_host ) + strcpy(b_x11_host, defaults->get("B_X11_HOST", b_x11_host)); window_config = defaults->get("WINDOW_CONFIG", window_config); default_window_positions(window_config); @@ -428,11 +441,14 @@ int MainSession::load_defaults(BC_Hash *defaults) use_vector = defaults->get("USE_VECTOR", use_vector); use_hist_parade = defaults->get("USE_HIST_PARADE", use_hist_parade); use_wave_parade = defaults->get("USE_WAVE_PARADE", use_wave_parade); + use_wave_gain = defaults->get("USE_WAVE_GAIN", use_wave_gain); + use_vect_gain = defaults->get("USE_VECT_GAIN", use_vect_gain); + use_smooth = defaults->get("USE_SMOOTH", use_smooth); //printf("MainSession::load_defaults 1\n"); // Other windows - afolders_w = defaults->get("ABINS_W", 200); + afolders_w = defaults->get("ABINS_W", xS(200)); bwindow_w = defaults->get("BWINDOW_W", bwindow_w); bwindow_h = defaults->get("BWINDOW_H", bwindow_h); @@ -470,19 +486,19 @@ int MainSession::load_defaults(BC_Hash *defaults) cwindow_controls = defaults->get("CWINDOW_CONTROLS", cwindow_controls); - plugindialog_w = defaults->get("PLUGINDIALOG_W", 510); - plugindialog_h = defaults->get("PLUGINDIALOG_H", 415); -// presetdialog_w = defaults->get("PRESETDIALOG_W", 510); -// presetdialog_h = defaults->get("PRESETDIALOG_H", 415); - keyframedialog_w = defaults->get("KEYFRAMEDIALOG_W", 320); - keyframedialog_h = defaults->get("KEYFRAMEDIALOG_H", 415); - keyframedialog_column1 = defaults->get("KEYFRAMEDIALOG_COLUMN1", 150); - keyframedialog_column2 = defaults->get("KEYFRAMEDIALOG_COLUMN2", 100); + plugindialog_w = defaults->get("PLUGINDIALOG_W", xS(510)); + plugindialog_h = defaults->get("PLUGINDIALOG_H", yS(415)); +// presetdialog_w = defaults->get("PRESETDIALOG_W", xS(510)); +// presetdialog_h = defaults->get("PRESETDIALOG_H", yS(415)); + keyframedialog_w = defaults->get("KEYFRAMEDIALOG_W", xS(320)); + keyframedialog_h = defaults->get("KEYFRAMEDIALOG_H", yS(415)); + keyframedialog_column1 = defaults->get("KEYFRAMEDIALOG_COLUMN1", xS(150)); + keyframedialog_column2 = defaults->get("KEYFRAMEDIALOG_COLUMN2", xS(100)); keyframedialog_all = defaults->get("KEYFRAMEDIALOG_ALL", 0); - menueffect_w = defaults->get("MENUEFFECT_W", 580); - menueffect_h = defaults->get("MENUEFFECT_H", 350); - transitiondialog_w = defaults->get("TRANSITIONDIALOG_W", 320); - transitiondialog_h = defaults->get("TRANSITIONDIALOG_H", 512); + menueffect_w = defaults->get("MENUEFFECT_W", xS(580)); + menueffect_h = defaults->get("MENUEFFECT_H", yS(350)); + transitiondialog_w = defaults->get("TRANSITIONDIALOG_W", xS(320)); + transitiondialog_h = defaults->get("TRANSITIONDIALOG_H", yS(512)); current_tip = defaults->get("CURRENT_TIP", current_tip); actual_frame_rate = defaults->get("ACTUAL_FRAME_RATE", (float)-1); @@ -553,6 +569,9 @@ int MainSession::save_defaults(BC_Hash *defaults) defaults->update("USE_VECTOR", use_vector); defaults->update("USE_HIST_PARADE", use_hist_parade); defaults->update("USE_WAVE_PARADE", use_wave_parade); + defaults->update("USE_WAVE_GAIN", use_wave_gain); + defaults->update("USE_VECT_GAIN", use_vect_gain); + defaults->update("USE_SMOOTH", use_smooth); defaults->update("ABINS_W", afolders_w);