X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Finterfaceprefs.C;h=4e80eb86de9dd868f83c33df957bc21c51bbbdc1;hb=a7449f690c376b598d56ace484c6449c95acc7de;hp=9a861e68634f56a41eaa1738b4eae8f537f19208;hpb=0df48ad2d876409c5beeae2e21933a728ea76c33;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/interfaceprefs.C b/cinelerra-5.1/cinelerra/interfaceprefs.C index 9a861e68..4e80eb86 100644 --- a/cinelerra-5.1/cinelerra/interfaceprefs.C +++ b/cinelerra-5.1/cinelerra/interfaceprefs.C @@ -48,6 +48,8 @@ InterfacePrefs::InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow) max_db = 0; shbtn_dialog = 0; file_probe_dialog = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Interface"); } InterfacePrefs::~InterfacePrefs() @@ -62,7 +64,7 @@ InterfacePrefs::~InterfacePrefs() void InterfacePrefs::create_objects() { int xs4 = xS(4), xs5 = xS(5), xs10 = xS(10), xs30 = xS(30); - int ys5 = yS(5), ys10 = yS(10), ys20 = yS(20), ys30 = yS(30), ys35 = yS(35); + int ys5 = yS(5), ys10 = yS(10), ys30 = yS(30), ys35 = yS(35); BC_Resources *resources = BC_WindowBase::get_resources(); int margin = mwindow->theme->widget_border; char string[BCTEXTLEN]; @@ -70,29 +72,36 @@ void InterfacePrefs::create_objects() int y0 = mwindow->theme->preferencesoptions_y; int x = x0, y = y0; - add_subwindow(new BC_Title(x, y, _("Editing:"), LARGEFONT, + BC_Title *title; + add_subwindow(title = new BC_Title(x, y, _("Editing:"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Editing section"); y += ys35; int x2 = get_w()/2, y2 = y; x = x2; - BC_Title *title; add_subwindow(title = new BC_Title(x, y, _("Keyframe reticle:"))); + title->context_help_set_keyword("Using Autos"); y += title->get_h() + ys5; keyframe_reticle = new KeyframeReticle(pwindow, this, x, y, &pwindow->thread->preferences->keyframe_reticle); add_subwindow(keyframe_reticle); keyframe_reticle->create_objects(); + keyframe_reticle->context_help_set_keyword("Using Autos"); y += ys30; add_subwindow(title = new BC_Title(x, y, _("Snapshot path:"))); + title->context_help_set_keyword("Snapshot \\/ Grabshot"); y += title->get_h() + ys5; add_subwindow(snapshot_path = new SnapshotPathText(pwindow, this, x, y, get_w()-x-xs30)); + snapshot_path->context_help_set_keyword("Snapshot \\/ Grabshot"); x = x0; y = y2; add_subwindow(title = new BC_Title(x, y, _("Clicking on edit boundaries does what:"))); + title->context_help_set_keyword("Using the Drag Handle with Trim"); y += title->get_h() + ys10; - add_subwindow(new BC_Title(x, y, _("Button 1:"))); + add_subwindow(title = new BC_Title(x, y, _("Button 1:"))); + title->context_help_set_keyword("Using the Drag Handle with Trim"); int x1 = x + xS(100); ViewBehaviourText *text; @@ -101,101 +110,141 @@ void InterfacePrefs::create_objects() pwindow, &(pwindow->thread->edl->session->edit_handle_mode[0]))); text->create_objects(); + text->context_help_set_keyword("Using the Drag Handle with Trim"); y += ys30; - add_subwindow(new BC_Title(x, y, _("Button 2:"))); + add_subwindow(title = new BC_Title(x, y, _("Button 2:"))); + title->context_help_set_keyword("Using the Drag Handle with Trim"); add_subwindow(text = new ViewBehaviourText(x1, y - ys5, behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[1]), pwindow, &(pwindow->thread->edl->session->edit_handle_mode[1]))); text->create_objects(); + text->context_help_set_keyword("Using the Drag Handle with Trim"); y += ys30; - add_subwindow(new BC_Title(x, y, _("Button 3:"))); + add_subwindow(title = new BC_Title(x, y, _("Button 3:"))); + title->context_help_set_keyword("Using the Drag Handle with Trim"); add_subwindow(text = new ViewBehaviourText(x1, y - ys5, behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[2]), pwindow, &(pwindow->thread->edl->session->edit_handle_mode[2]))); text->create_objects(); + text->context_help_set_keyword("Using the Drag Handle with Trim"); y += text->get_h() + ys30; x = x0; add_subwindow(new BC_Bar(xs5, y, get_w() - xs10)); y += ys5; - add_subwindow(new BC_Title(x, y, _("Operation:"), LARGEFONT, + add_subwindow(title = new BC_Title(x, y, _("Operation:"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Operation section"); int y1 = y; y += yS(15); AndroidRemote *android_remote = new AndroidRemote(pwindow, x2, y); add_subwindow(android_remote); + android_remote->context_help_set_keyword("Android Remote Control"); y += android_remote->get_h() + ys10; - add_subwindow(title = new BC_Title(x2, y, _("Port:"))); - int x3 = x2 + title->get_w() + margin; + int x3 = x2; + add_subwindow(title = new BC_Title(x3, y, _("Port:"))); + title->context_help_set_keyword("Android Remote Control"); + x3 += title->get_w() + margin; AndroidPort *android_port = new AndroidPort(pwindow, x3, y); add_subwindow(android_port); - y += title->get_h() + ys10; - add_subwindow(title = new BC_Title(x2, y, _("PIN:"))); + android_port->context_help_set_keyword("Android Remote Control"); + x3 += android_port->get_w() + 2*margin; + add_subwindow(title = new BC_Title(x3, y, _("PIN:"))); + title->context_help_set_keyword("Android Remote Control"); + x3 += title->get_w() + margin; AndroidPIN *android_pin = new AndroidPIN(pwindow, x3, y); add_subwindow(android_pin); - y += title->get_h() + ys20; + android_pin->context_help_set_keyword("Android Remote Control"); + y += android_port->get_h() + 3*margin; ShBtnPrefs *shbtn_prefs = new ShBtnPrefs(pwindow, this, x2, y); add_subwindow(shbtn_prefs); - y += shbtn_prefs->get_h() + ys20; - - add_subwindow(reload_plugins = new PrefsReloadPlugins(pwindow, this, x2, y)); - y += reload_plugins->get_h() + ys10; + shbtn_prefs->context_help_set_keyword("Menu Bar Shell Commands"); + x3 = x2 + shbtn_prefs->get_w() + 2*margin; + add_subwindow(reload_plugins = new PrefsReloadPlugins(pwindow, this, x3, y)); + reload_plugins->context_help_set_keyword("Operation section"); + y += reload_plugins->get_h() + 3*margin; + + add_subwindow(title = new BC_Title(x2, y, _("Nested Proxy Path:"))); + title->context_help_set_keyword("Proxy"); + y += title->get_h() + ys10; + PrefsNestedProxyPath *nested_proxy_path = new PrefsNestedProxyPath(pwindow, this, + x2, y, get_w()-x2-xs30); + add_subwindow(nested_proxy_path); + nested_proxy_path->context_help_set_keyword("Proxy"); + y += xs30; add_subwindow(title = new BC_Title(x2, y, _("Default LV2_PATH:"))); + title->context_help_set_keyword("Audio LV2 \\/ Calf Plugins"); y += title->get_h() + ys10; - PrefsLV2PathText *lv2_path_text = new PrefsLV2PathText(pwindow, this, x2, y, get_w()-x2-xs30); + PrefsLV2PathText *lv2_path_text = new PrefsLV2PathText(pwindow, this, + x2, y, get_w()-x2-xs30); add_subwindow(lv2_path_text); + lv2_path_text->context_help_set_keyword("Audio LV2 \\/ Calf Plugins"); y += xs30; y2 = y; x = x0; y = y1 + ys35; add_subwindow(file_probes = new PrefsFileProbes(pwindow, this, x, y)); + file_probes->context_help_set_keyword("Probe Order when Loading Media"); y += ys30; PrefsTrapSigSEGV *trap_segv = new PrefsTrapSigSEGV(this, x, y); add_subwindow(trap_segv); + trap_segv->context_help_set_keyword("Operation section"); x1 = x + trap_segv->get_w() + xs10; - add_subwindow(new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED)); + add_subwindow(title = new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED)); + title->context_help_set_keyword("Operation section"); y += ys30; PrefsTrapSigINTR *trap_intr = new PrefsTrapSigINTR(this, x, y); add_subwindow(trap_intr); - add_subwindow(new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED)); + trap_intr->context_help_set_keyword("Operation section"); + add_subwindow(title = new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED)); + title->context_help_set_keyword("Operation section"); y += ys30; yuv420p_dvdlace = new PrefsYUV420P_DVDlace(pwindow, this, x, y); add_subwindow(yuv420p_dvdlace); + yuv420p_dvdlace->context_help_set_keyword("Dvd Interlaced Chroma"); y += ys30; add_subwindow(title = new BC_Title(x1=x, y + ys5, _("Min DB for meter:"))); + title->context_help_set_keyword("Sound Level Meters Window"); x1 += title->get_w() + xs4; sprintf(string, "%d", pwindow->thread->edl->session->min_meter_db); add_subwindow(min_db = new MeterMinDB(pwindow, string, x1, y)); + min_db->context_help_set_keyword("Sound Level Meters Window"); x1 += min_db->get_w() + xs4; add_subwindow(title = new BC_Title(x1, y + ys5, _("Max:"))); + title->context_help_set_keyword("Sound Level Meters Window"); x1 += title->get_w() + xs4; sprintf(string, "%d", pwindow->thread->edl->session->max_meter_db); add_subwindow(max_db = new MeterMaxDB(pwindow, string, x1, y)); + max_db->context_help_set_keyword("Sound Level Meters Window"); y += ys30; StillImageUseDuration *use_stduration = new StillImageUseDuration(pwindow, pwindow->thread->edl->session->si_useduration, x, y); add_subwindow(use_stduration); + use_stduration->context_help_set_keyword("Working with Still Images"); x1 = x + use_stduration->get_w() + xs10; StillImageDuration *stduration = new StillImageDuration(pwindow, x1, y); add_subwindow(stduration); + stduration->context_help_set_keyword("Working with Still Images"); x1 += stduration->get_w() + xs10; - add_subwindow(new BC_Title(x1, y, _("Seconds"))); + add_subwindow(title = new BC_Title(x1, y, _("Seconds"))); + title->context_help_set_keyword("Working with Still Images"); y += ys30; PrefsAutostartLV2UI *autostart_lv2ui = new PrefsAutostartLV2UI(x, y,pwindow); add_subwindow(autostart_lv2ui); + autostart_lv2ui->context_help_set_keyword("Audio LV2 \\/ Calf Plugins"); y += autostart_lv2ui->get_h() + ys10; if( y2 > y ) y = y2; @@ -203,37 +252,48 @@ void InterfacePrefs::create_objects() add_subwindow(new BC_Bar(xs5, y, get_w() - xs10)); y += ys5; - add_subwindow(new BC_Title(x, y, _("Index files:"), LARGEFONT, resources->text_default)); + add_subwindow(title = new BC_Title(x, y, _("Index files:"), LARGEFONT, resources->text_default)); + title->context_help_set_keyword("Index Files section"); y += ys30; - add_subwindow(new BC_Title(x, y + ys5, + add_subwindow(title = new BC_Title(x, y + ys5, _("Index files go here:"), MEDIUMFONT, resources->text_default)); + title->context_help_set_keyword("Index Files section"); x1 = x + xS(230); add_subwindow(ipathtext = new IndexPathText(x1, y, pwindow, pwindow->thread->preferences->index_directory)); + ipathtext->context_help_set_keyword("Index Files section"); x1 += ipathtext->get_w(); add_subwindow(ipath = new BrowseButton(mwindow->theme, this, ipathtext, x1, y, pwindow->thread->preferences->index_directory, _("Index Path"), _("Select the directory for index files"), 1)); + ipath->context_help_set_keyword("Index Files section"); y += ys30; - add_subwindow(new BC_Title(x, y + ys5, _("Size of index file in KB:"), + add_subwindow(title = new BC_Title(x, y + ys5, _("Size of index file in KB:"), MEDIUMFONT, resources->text_default)); + title->context_help_set_keyword("Index Files section"); sprintf(string, "%jd", pwindow->thread->preferences->index_size/1024); add_subwindow(isize = new IndexSize(x + xS(230), y, pwindow, string)); + isize->context_help_set_keyword("Index Files section"); add_subwindow(new ScanCommercials(pwindow, xS(400),y)); y += ys30; - add_subwindow(new BC_Title(x, y + ys5, _("Number of index files to keep:"), + add_subwindow(title = new BC_Title(x, y + ys5, _("Number of index files to keep:"), MEDIUMFONT, resources->text_default)); + title->context_help_set_keyword("Index Files section"); sprintf(string, "%ld", (long)pwindow->thread->preferences->index_count); add_subwindow(icount = new IndexCount(x + xS(230), y, pwindow, string)); + icount->context_help_set_keyword("Index Files section"); add_subwindow(del_indexes = new DeleteAllIndexes(mwindow, pwindow, xS(400), y, _("Delete existing indexes"), "[*.idx][*.toc][*.mkr]")); + del_indexes->context_help_set_keyword("Index Files section"); y += ys30; add_subwindow(ffmpeg_marker_files = new IndexFFMPEGMarkerFiles(this, x, y)); + ffmpeg_marker_files->context_help_set_keyword("Index Files section"); add_subwindow(del_clipngs = new DeleteAllIndexes(mwindow, pwindow, xS(400), y, _("Delete clip thumbnails"), "clip_*.png")); + del_clipngs->context_help_set_keyword("Index Files section"); } const char* InterfacePrefs::behavior_to_text(int mode) @@ -400,6 +460,8 @@ ScanCommercials::ScanCommercials(PreferencesWindow *pwindow, int x, int y) _("Scan for commercials during toc build")) { this->pwindow = pwindow; +// *** CONTEXT_HELP *** + context_help_set_keyword("The commercial DB"); } int ScanCommercials::handle_event() { @@ -422,7 +484,7 @@ int AndroidRemote::handle_event() } AndroidPIN::AndroidPIN(PreferencesWindow *pwindow, int x, int y) - : BC_TextBox(x, y, xS(240), 1, pwindow->thread->preferences->android_pin) + : BC_TextBox(x, y, xS(180), 1, pwindow->thread->preferences->android_pin) { this->pwindow = pwindow; } @@ -685,3 +747,21 @@ int PrefsLV2PathText::handle_event() return 1; } +PrefsNestedProxyPath::PrefsNestedProxyPath(PreferencesWindow *pwindow, + InterfacePrefs *subwindow, int x, int y, int w) + : BC_TextBox(x, y, w, 1, pwindow->thread->preferences->nested_proxy_path) +{ + this->pwindow = pwindow; + this->subwindow = subwindow; +} + +PrefsNestedProxyPath::~PrefsNestedProxyPath() +{ +} + +int PrefsNestedProxyPath::handle_event() +{ + strcpy(pwindow->thread->preferences->nested_proxy_path, get_text()); + return 1; +} +