lock xft, plugin index builder lock, clear clip thumbnails, clear vwin clock, setpoin...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / interfaceprefs.C
index ba27ce4ec648e34973603f598b6ab765e7030d4b..9c0b51dd2e5bed868856c75a71f07766172323ea 100644 (file)
@@ -145,6 +145,12 @@ void InterfacePrefs::create_objects()
        add_subwindow(shbtn_prefs);
        y += shbtn_prefs->get_h() + 30;
 
+       add_subwindow(title = new BC_Title(x2, y, _("Default LV2_PATH:")));
+       y += title->get_h() + 10;
+       PrefsLV2PathText *lv2_path_text = new PrefsLV2PathText(pwindow, this, x2, y, get_w()-x2-30);
+       add_subwindow(lv2_path_text);
+       y += 30;
+
        y2 = y;
        x = x0;  y = y1;
        add_subwindow(file_probes = new PrefsFileProbes(pwindow, this, x, y));
@@ -165,37 +171,36 @@ void InterfacePrefs::create_objects()
        add_subwindow(yuv420p_dvdlace);
        y += 30;
 
-       if( y2 > y ) y = y2;
-       add_subwindow(title = new BC_Title(x, y + 5, _("Min DB for meter:")));
-       x += title->get_w() + 10;
+       add_subwindow(title = new BC_Title(x1=x, y + 5, _("Min DB for meter:")));
+       x1 += title->get_w() + 10;
        sprintf(string, "%d", pwindow->thread->edl->session->min_meter_db);
-       add_subwindow(min_db = new MeterMinDB(pwindow, string, x, y));
-       x += min_db->get_w() + 10;
-       add_subwindow(title = new BC_Title(x, y + 5, _("Max DB:")));
-       x += title->get_w() + 10;
+       add_subwindow(min_db = new MeterMinDB(pwindow, string, x1, y));
+       x1 += min_db->get_w() + 10;
+       add_subwindow(title = new BC_Title(x1, y + 5, _("Max DB:")));
+       x1 += title->get_w() + 10;
        sprintf(string, "%d", pwindow->thread->edl->session->max_meter_db);
-       add_subwindow(max_db = new MeterMaxDB(pwindow, string, x, y));
+       add_subwindow(max_db = new MeterMaxDB(pwindow, string, x1, y));
        y += 30;
 
        StillImageUseDuration *use_stduration = new StillImageUseDuration(pwindow,
-               pwindow->thread->edl->session->si_useduration, x2, y2);
+               pwindow->thread->edl->session->si_useduration, x, y);
        add_subwindow(use_stduration);
-       int tw = 0, th = 0;
-       BC_CheckBox::calculate_extents(this, &tw, &th, 0, 0);
-       x2 += tw + 3;
-       y2 += use_stduration->get_h() + 3;
-       StillImageDuration *stduration = new StillImageDuration(pwindow, x2, y2);
+       x1 = x + use_stduration->get_w() + 10;
+       StillImageDuration *stduration = new StillImageDuration(pwindow, x1, y);
        add_subwindow(stduration);
-       x2 += stduration->get_w() + 10;
-       y2 += 3;
-       add_subwindow(new BC_Title(x2, y2, _("Seconds")));
-       y2 += 30;
+       x1 += stduration->get_w() + 10;
+       add_subwindow(new BC_Title(x1, y, _("Seconds")));
+       y += 30;
 
-       x = x0;  y = y2;
+       PrefsAutostartLV2UI *autostart_lv2ui = new PrefsAutostartLV2UI(x, y,pwindow);
+       add_subwindow(autostart_lv2ui);
+       y += autostart_lv2ui->get_h() + 10;
+
+       if( y2 > y ) y = y2;
+       x = x0;
        add_subwindow(new BC_Bar(5, y,  get_w() - 10));
        y += 5;
 
-
        add_subwindow(new BC_Title(x, y, _("Index files:"), LARGEFONT, resources->text_default));
        y += 30;
 
@@ -221,10 +226,12 @@ void InterfacePrefs::create_objects()
                MEDIUMFONT, resources->text_default));
        sprintf(string, "%ld", (long)pwindow->thread->preferences->index_count);
        add_subwindow(icount = new IndexCount(x + 230, y, pwindow, string));
-       add_subwindow(deleteall = new DeleteAllIndexes(mwindow, pwindow, 400, y));
+       add_subwindow(del_indexes = new DeleteAllIndexes(mwindow, pwindow, 400, y,
+               _("Delete existing indexes"), "[*.idx][*.toc][*.mkr]"));
        y += 30;
        add_subwindow(ffmpeg_marker_files = new IndexFFMPEGMarkerFiles(this, x, y));
-       y += 35;
+       add_subwindow(del_clipngs = new DeleteAllIndexes(mwindow, pwindow, 400, y,
+               _("Delete clip thumbnails"), "clip_*.png"));
 }
 
 const char* InterfacePrefs::behavior_to_text(int mode)
@@ -628,3 +635,33 @@ int SnapshotPathText::handle_event()
        return 1;
 }
 
+PrefsAutostartLV2UI::PrefsAutostartLV2UI(int x, int y, PreferencesWindow *pwindow)
+ : BC_CheckBox(x, y,
+       pwindow->thread->preferences->autostart_lv2ui, _("Auto start lv2 gui"))
+{
+       this->pwindow = pwindow;
+}
+int PrefsAutostartLV2UI::handle_event()
+{
+       pwindow->thread->preferences->autostart_lv2ui = get_value();
+       return 1;
+}
+
+PrefsLV2PathText::PrefsLV2PathText(PreferencesWindow *pwindow,
+       InterfacePrefs *subwindow, int x, int y, int w)
+ : BC_TextBox(x, y, w, 1, pwindow->thread->preferences->lv2_path)
+{
+       this->pwindow = pwindow;
+       this->subwindow = subwindow;
+}
+
+PrefsLV2PathText::~PrefsLV2PathText()
+{
+}
+
+int PrefsLV2PathText::handle_event()
+{
+       strcpy(pwindow->thread->preferences->lv2_path, get_text());
+       return 1;
+}
+