add Autosave continuous backups by Andras Reuss and Andrew-R
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / appearanceprefs.C
index d6ed2bb852dee6f2fc3c80a4a9820f9bc0d8cfac..c80ee26bef23c2a00ff0557087ca65fdbdc33700 100644 (file)
@@ -184,9 +184,8 @@ void AppearancePrefs::create_objects()
        y += ys35;
        add_subwindow(title = new BC_Title(x, y, _("Composer BG Color:")));
        int clr_color = pwindow->thread->edl->session->cwindow_clear_color;
-       int clr_alpha = pwindow->thread->edl->session->cwindow_clear_alpha;
         add_subwindow(cwdw_bg_color = new Composer_BG_Color(pwindow,
-               x2, y, xS(80), yS(24), clr_color, clr_alpha));
+               x2, y, xS(80), yS(24), clr_color));
        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();
@@ -206,7 +205,7 @@ void AppearancePrefs::create_objects()
        if( y2 < y ) y2 = y;
 
        add_subwindow(new BC_Bar(x0, y2, get_w()-x0 - xs30));
-       y += ys15;
+       y += ys35;
 
        x = x0;  y1 = y;
        add_subwindow(title = new BC_Title(x, y, _("Warnings:"), LARGEFONT,
@@ -215,15 +214,27 @@ void AppearancePrefs::create_objects()
        UseWarnIndecies *idx_warn = new UseWarnIndecies(pwindow, x, y);
        add_subwindow(idx_warn);
        y += idx_warn->get_h() + ys5;
-       UseWarnVersion *ver_warn = new UseWarnVersion(pwindow, x, y);
-       add_subwindow(ver_warn);
-       y += ver_warn->get_h() + ys5;
        BD_WarnRoot *bdwr_warn = new BD_WarnRoot(pwindow, x, y);
        add_subwindow(bdwr_warn);
        y += bdwr_warn->get_h() + ys5;
        UseWarnFileRef *warn_ref = new UseWarnFileRef(pwindow, x, y);
        add_subwindow(warn_ref);
        y += warn_ref->get_h() + ys5;
+       
+       add_subwindow(new BC_Bar(x0, y, warn_ref->get_w()-x0 - xs30));
+       y += ys15;
+
+       add_subwindow(title = new BC_Title(x, y, _("Dangerous:"), LARGEFONT,
+               resources->text_default));
+       y += title->get_h() + ys10;
+
+       
+       UseUnsafeGUI *unsafe_gui = new UseUnsafeGUI(pwindow, x, y);
+       add_subwindow(unsafe_gui);
+       y += unsafe_gui->get_h() + ys5;
+       OngoingBackups *ongoing_backups = new OngoingBackups(pwindow, x, y);
+       add_subwindow(ongoing_backups);
+       y += ongoing_backups->get_h() + ys5;
 
        x = get_w() / 3 + xs30;
        y = y1;
@@ -649,16 +660,31 @@ int UseWarnIndecies::handle_event()
        return 1;
 }
 
-UseWarnVersion::UseWarnVersion(PreferencesWindow *pwindow, int x, int y)
- : BC_CheckBox(x, y, pwindow->thread->preferences->warn_version,
-       _("EDL version warns if mismatched"))
+UseUnsafeGUI::UseUnsafeGUI(PreferencesWindow *pwindow, int x, int y)
+ : BC_CheckBox(x, y, pwindow->thread->preferences->unsafe_gui,
+       _("Unsafe GUI in batchrender"))
+{
+       this->pwindow = pwindow;
+       set_tooltip(_("Save to EDL path option becomes available and will overwrite EDL on disk. \n Warn if jobs/session mismatch option is available but can be unchecked."));
+}
+
+int UseUnsafeGUI::handle_event()
+{
+       pwindow->thread->preferences->unsafe_gui = get_value();
+       return 1;
+}
+
+OngoingBackups::OngoingBackups(PreferencesWindow *pwindow, int x, int y)
+ : BC_CheckBox(x, y, pwindow->thread->preferences->ongoing_backups,
+       _("Autosave continuous backups"))
 {
        this->pwindow = pwindow;
+       set_tooltip(_("When you stop Cinelerra, all but the newest 50 will be deleted but you risk \n running out of disk space if you do a lot of work without restarting."));
 }
 
-int UseWarnVersion::handle_event()
+int OngoingBackups::handle_event()
 {
-       pwindow->thread->preferences->warn_version = get_value();
+       pwindow->thread->preferences->ongoing_backups = get_value();
        return 1;
 }
 
@@ -752,6 +778,7 @@ AutoRotate::AutoRotate(PreferencesWindow *pwindow, int x, int y)
        _("Auto rotate ffmpeg media"))
 {
        this->pwindow = pwindow;
+       set_tooltip(_("Automatically rotates media if legal rotation metadata in file."));
 }
 
 int AutoRotate::handle_event()
@@ -778,6 +805,7 @@ AutocolorAssets::AutocolorAssets(PreferencesWindow *pwindow, int x, int y)
        _("Autocolor assets"))
 {
        this->pwindow = pwindow;
+       set_tooltip(_("Displays automatically generated color overlay for the \n edits on the timeline that belong to the same media file."));
 }
 
 int AutocolorAssets::handle_event()
@@ -897,6 +925,7 @@ PerpetualSession::PerpetualSession(int x, int y, PreferencesWindow *pwindow)
        pwindow->thread->preferences->perpetual_session, _("Perpetual session"))
 {
        this->pwindow = pwindow;
+       set_tooltip(_("Resume previous session on startup with undo/redo stack saved between sessions. \n On startup, previous project is loaded as if there was no stoppage."));
 }
 
 int PerpetualSession::handle_event()
@@ -910,6 +939,7 @@ CtrlToggle::CtrlToggle(int x, int y, PreferencesWindow *pwindow)
        pwindow->thread->preferences->ctrl_toggle, _("Clears before toggle"))
 {
        this->pwindow = pwindow;
+       set_tooltip(_("Drag and Drop editing - when using LMB on edit,\n clears all selected edits except this one."));
 }
 
 int CtrlToggle::handle_event()
@@ -923,6 +953,7 @@ RectifyAudioToggle::RectifyAudioToggle(int x, int y, PreferencesWindow *pwindow)
        pwindow->thread->preferences->rectify_audio, _("Timeline Rectify Audio"))
 {
        this->pwindow = pwindow;
+       set_tooltip(_("Displays rectified audio showing only positive half of the waveform \n resulting in waveform stretched more over the height of the track."));
 }
 
 int RectifyAudioToggle::handle_event()
@@ -932,8 +963,8 @@ int RectifyAudioToggle::handle_event()
 }
 
 Composer_BG_Color::Composer_BG_Color(PreferencesWindow *pwindow,
-               int x, int y, int w, int h, int color, int alpha)
- : ColorBoxButton(_("Composer BG color"), x, y, w, h, color, alpha, 1)
+               int x, int y, int w, int h, int color)
+ : ColorBoxButton(_("Composer BG color"), x, y, w, h, color, -1, 1)
 {
        this->pwindow = pwindow;
 }
@@ -955,7 +986,6 @@ void Composer_BG_Color::handle_done_event(int result)
 int Composer_BG_Color::handle_new_color(int color, int alpha)
 {
        pwindow->thread->edl->session->cwindow_clear_color = color;
-       pwindow->thread->edl->session->cwindow_clear_alpha = alpha;
        return 1;
 }