X-Git-Url: https://cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fappearanceprefs.C;h=fc2ff08901b8bd0a07276012f83f6e853526f81d;hb=d3136bf5076921bddf85277f619eeffcf8eb3009;hp=cb0279af049029c02861cfc183700e85052175e0;hpb=6487f2b33390bab8c318b357a398a195d758100c;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/appearanceprefs.C b/cinelerra-5.1/cinelerra/appearanceprefs.C index cb0279af..fc2ff089 100644 --- a/cinelerra-5.1/cinelerra/appearanceprefs.C +++ b/cinelerra-5.1/cinelerra/appearanceprefs.C @@ -38,6 +38,7 @@ AppearancePrefs::AppearancePrefs(MWindow *mwindow, PreferencesWindow *pwindow) { hms = 0; hmsf = 0; + timecode = 0; samples = 0; frames = 0; hex = 0; @@ -52,6 +53,7 @@ AppearancePrefs::~AppearancePrefs() { delete hms; delete hmsf; + delete timecode; delete samples; delete frames; delete hex; @@ -131,6 +133,10 @@ void AppearancePrefs::create_objects() pwindow->thread->edl->session->time_format == TIME_HMSF, x, y)); y += ys20; + add_subwindow(timecode = new TimeFormatTimecode(pwindow, this, + pwindow->thread->edl->session->time_format == TIME_TIMECODE, + x, y)); + y += ys20; add_subwindow(samples = new TimeFormatSamples(pwindow, this, pwindow->thread->edl->session->time_format == TIME_SAMPLES, x, y)); @@ -178,18 +184,17 @@ void AppearancePrefs::create_objects() x2, y, xS(80), yS(24), clr_color, clr_alpha)); draw_3d_border(x2-2,y-2, xS(80)+4,xS(24)+4, 1); cwdw_bg_color->create_objects(); + x2 += cwdw_bg_color->get_w(); y += ys35; - x = x1; - add_subwindow(title = new BC_Title(x, y, _("YUV color space:"))); - x += title->get_w() + margin; + add_subwindow(title = new BC_Title(x1, y, _("YUV color space:"))); + x = x2 - xS(120); add_subwindow(yuv_color_space = new YuvColorSpace(x, y, pwindow)); yuv_color_space->create_objects(); y += yuv_color_space->get_h() + ys5; - x = x1; - add_subwindow(title = new BC_Title(x, y, _("YUV color range:"))); - x += title->get_w() + margin; + add_subwindow(title = new BC_Title(x1, y, _("YUV color range:"))); + x = x2 - xS(100); add_subwindow(yuv_color_range = new YuvColorRange(x, y, pwindow)); yuv_color_range->create_objects(); y += yuv_color_range->get_h() + ys35; @@ -208,9 +213,6 @@ void AppearancePrefs::create_objects() UseWarnVersion *ver_warn = new UseWarnVersion(pwindow, x, y); add_subwindow(ver_warn); y += ver_warn->get_h() + ys5; - UseWarnStack *stack_warn = new UseWarnStack(pwindow, x, y); - add_subwindow(stack_warn); - y += stack_warn->get_h() + ys5; BD_WarnRoot *bdwr_warn = new BD_WarnRoot(pwindow, x, y); add_subwindow(bdwr_warn); y += bdwr_warn->get_h() + ys5; @@ -259,6 +261,9 @@ void AppearancePrefs::create_objects() DeactivateFocusPolicy *focus_deactivate = new DeactivateFocusPolicy(pwindow, x, y); add_subwindow(focus_deactivate); y += focus_deactivate->get_h() + ys5; + AutoRotate *auto_rotate = new AutoRotate(pwindow, x, y); + add_subwindow(auto_rotate); + y += auto_rotate->get_h() + ys5; } int AppearancePrefs::update(int new_value) @@ -267,6 +272,7 @@ int AppearancePrefs::update(int new_value) pwindow->thread->edl->session->time_format = new_value; hms->update(new_value == TIME_HMS); hmsf->update(new_value == TIME_HMSF); + timecode->update(new_value == TIME_TIMECODE); samples->update(new_value == TIME_SAMPLES); hex->update(new_value == TIME_SAMPLES_HEX); frames->update(new_value == TIME_FRAMES); @@ -296,6 +302,16 @@ int TimeFormatHMSF::handle_event() return 1; } +TimeFormatTimecode::TimeFormatTimecode(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y) + : BC_Radial(x, y, value, TIME_TIMECODE_TEXT) +{ this->pwindow = pwindow; this->tfwindow = tfwindow; } + +int TimeFormatTimecode::handle_event() +{ + tfwindow->update(TIME_TIMECODE); + return 1; +} + TimeFormatSamples::TimeFormatSamples(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y) : BC_Radial(x, y, value, TIME_SAMPLES_TEXT) { this->pwindow = pwindow; this->tfwindow = tfwindow; } @@ -605,19 +621,6 @@ int UseWarnVersion::handle_event() return 1; } -UseWarnStack::UseWarnStack(PreferencesWindow *pwindow, int x, int y) - : BC_CheckBox(x, y, pwindow->thread->preferences->warn_stack, - _("Stack warns if reference not modified")) -{ - this->pwindow = pwindow; -} - -int UseWarnStack::handle_event() -{ - pwindow->thread->preferences->warn_stack = get_value(); - return 1; -} - BD_WarnRoot::BD_WarnRoot(PreferencesWindow *pwindow, int x, int y) : BC_CheckBox(x, y, pwindow->thread->preferences->bd_warn_root, _("Create Bluray warns if not root")) @@ -703,6 +706,19 @@ int DeactivateFocusPolicy::handle_event() return 1; } +AutoRotate::AutoRotate(PreferencesWindow *pwindow, int x, int y) + : BC_CheckBox(x, y, pwindow->thread->preferences->auto_rotate != 0, + _("Auto rotate ffmpeg media")) +{ + this->pwindow = pwindow; +} + +int AutoRotate::handle_event() +{ + pwindow->thread->preferences->auto_rotate = get_value(); + return 1; +} + ForwardRenderDisplacement::ForwardRenderDisplacement(PreferencesWindow *pwindow, int x, int y) : BC_CheckBox(x, y, pwindow->thread->preferences->forward_render_displacement, _("Always show next frame"))