X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Finterfaceprefs.C;h=9c0b51dd2e5bed868856c75a71f07766172323ea;hb=a2d9ab21fbb8e29310d9cd0be439522d05d0d0ba;hp=d463fb24471ae67c8bd601275f5baf408d0a4b6d;hpb=78555663c7d2d1148808014cc7ada53255c0c305;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/interfaceprefs.C b/cinelerra-5.1/cinelerra/interfaceprefs.C index d463fb24..9c0b51dd 100644 --- a/cinelerra-5.1/cinelerra/interfaceprefs.C +++ b/cinelerra-5.1/cinelerra/interfaceprefs.C @@ -40,10 +40,10 @@ N_("Drag source only") N_("No effect") #endif -#define MOVE_ALL_EDITS_TITLE "Drag all following edits" -#define MOVE_ONE_EDIT_TITLE "Drag only one edit" -#define MOVE_NO_EDITS_TITLE "Drag source only" -#define MOVE_EDITS_DISABLED_TITLE "No effect" +#define MOVE_ALL_EDITS_TITLE N_("Drag all following edits") +#define MOVE_ONE_EDIT_TITLE N_("Drag only one edit") +#define MOVE_NO_EDITS_TITLE N_("Drag source only") +#define MOVE_EDITS_DISABLED_TITLE N_("No effect") InterfacePrefs::InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow) : PreferencesDialog(mwindow, pwindow) @@ -80,11 +80,17 @@ void InterfacePrefs::create_objects() x = x2; BC_Title *title; add_subwindow(title = new BC_Title(x, y, _("Keyframe reticle:"))); - y += 25; - keyframe_reticle = new KeyframeReticle(x, y, &pwindow->thread->preferences->keyframe_reticle); + y += title->get_h() + 5; + keyframe_reticle = new KeyframeReticle(pwindow, this, x, y, + &pwindow->thread->preferences->keyframe_reticle); add_subwindow(keyframe_reticle); keyframe_reticle->create_objects(); + y += 30; + add_subwindow(title = new BC_Title(x, y, _("Snapshot path:"))); + y += title->get_h() + 5; + add_subwindow(snapshot_path = new SnapshotPathText(pwindow, this, x, y, get_w()-x-30)); + x = x0; y = y2; add_subwindow(new BC_Title(x, y, _("Clicking on edit boundaries does what:"))); y += 25; @@ -139,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)); @@ -159,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; @@ -215,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) @@ -495,15 +508,19 @@ HairlineItem::~HairlineItem() int HairlineItem::handle_event() { + popup->pwindow->thread->redraw_overlays = 1; popup->set_text(get_text()); *(popup->output) = hairline; return 1; } -KeyframeReticle::KeyframeReticle(int x, int y, int *output) - : BC_PopupMenu(x, y, 175, hairline_to_string(*output)) +KeyframeReticle::KeyframeReticle(PreferencesWindow *pwindow, + InterfacePrefs *iface_prefs, int x, int y, int *output) + : BC_PopupMenu(x, y, 220, hairline_to_string(*output)) { + this->pwindow = pwindow; + this->iface_prefs = iface_prefs; this->output = output; } @@ -599,3 +616,52 @@ int PrefsYUV420P_DVDlace::handle_event() return 1; } + +SnapshotPathText::SnapshotPathText(PreferencesWindow *pwindow, + InterfacePrefs *subwindow, int x, int y, int w) + : BC_TextBox(x, y, w, 1, pwindow->thread->preferences->snapshot_path) +{ + this->pwindow = pwindow; + this->subwindow = subwindow; +} + +SnapshotPathText::~SnapshotPathText() +{ +} + +int SnapshotPathText::handle_event() +{ + strcpy(pwindow->thread->preferences->snapshot_path, get_text()); + 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; +} +