X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Finterfaceprefs.C;h=1a3f1be553c983b84575215abed6d205d00857c8;hb=24db15d85f2e4c986ff91f992e815747c55948f3;hp=58aef4973aad16fc6daf2e54bef188257c921289;hpb=21c2e6b36d6a96c2f662a89459d607b5a387f4eb;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/interfaceprefs.C b/cinelerra-5.1/cinelerra/interfaceprefs.C index 58aef497..1a3f1be5 100644 --- a/cinelerra-5.1/cinelerra/interfaceprefs.C +++ b/cinelerra-5.1/cinelerra/interfaceprefs.C @@ -140,24 +140,37 @@ void InterfacePrefs::create_objects() UseWarnVersion *ver_win = new UseWarnVersion(pwindow, x1, y1); add_subwindow(ver_win); y1 += ver_win->get_h() + 5; + BD_WarnRoot *bdwr_win = new BD_WarnRoot(pwindow, x1, y1); + add_subwindow(bdwr_win); + y1 += bdwr_win->get_h() + 5; PopupMenuBtnup *pop_win = new PopupMenuBtnup(pwindow, x1, y1); add_subwindow(pop_win); - y1 += pop_win->get_h() + 25; + y1 += pop_win->get_h() + 5; + ActivateFocusPolicy *focus_activate = new ActivateFocusPolicy(pwindow, x1, y1); + add_subwindow(focus_activate); + y1 += focus_activate->get_h() + 5; + DeactivateFocusPolicy *focus_deactivate = new DeactivateFocusPolicy(pwindow, x1, y1); + add_subwindow(focus_deactivate); + y1 += focus_deactivate->get_h() + 5; + + if( y < y1 ) y = y1; + y += 10; 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)); + add_subwindow(ffmpeg_marker_files = new IndexFFMPEGMarkerFiles(this, x1, y)); - y += 25; + y += 30; add_subwindow(new BC_Title(x, y + 5, _("Index files go here:"), MEDIUMFONT, resources->text_default)); add_subwindow(ipathtext = new IndexPathText(x + 230, y, pwindow, pwindow->thread->preferences->index_directory)); add_subwindow(ipath = new BrowseButton(mwindow->theme, this, ipathtext, - x + 230 + ipathtext->get_w(), y, + x1 = x + 230 + ipathtext->get_w(), y, pwindow->thread->preferences->index_directory, _("Index Path"), _("Select the directory for index files"), @@ -178,9 +191,6 @@ void InterfacePrefs::create_objects() add_subwindow(deleteall = new DeleteAllIndexes(mwindow, pwindow, 350, y)); - - - y += 35; add_subwindow(new BC_Bar(5, y, get_w() - 10)); y += 5; @@ -280,23 +290,12 @@ void InterfacePrefs::create_objects() const char* InterfacePrefs::behavior_to_text(int mode) { - switch(mode) - { - case MOVE_ALL_EDITS: - return _(MOVE_ALL_EDITS_TITLE); - break; - case MOVE_ONE_EDIT: - return _(MOVE_ONE_EDIT_TITLE); - break; - case MOVE_NO_EDITS: - return _(MOVE_NO_EDITS_TITLE); - break; - case MOVE_EDITS_DISABLED: - return _(MOVE_EDITS_DISABLED_TITLE); - break; - default: - return ""; - break; + switch(mode) { + case MOVE_ALL_EDITS: return _(MOVE_ALL_EDITS_TITLE); + case MOVE_ONE_EDIT: return _(MOVE_ONE_EDIT_TITLE); + case MOVE_NO_EDITS: return _(MOVE_NO_EDITS_TITLE); + case MOVE_EDITS_DISABLED: return _(MOVE_EDITS_DISABLED_TITLE); + default: return ""; } } @@ -317,17 +316,6 @@ int InterfacePrefs::update(int new_value) - - - - - - - - - - - IndexPathText::IndexPathText(int x, int y, PreferencesWindow *pwindow, @@ -391,15 +379,22 @@ int IndexCount::handle_event() +IndexFFMPEGMarkerFiles::IndexFFMPEGMarkerFiles(InterfacePrefs *iface_prefs, int x, int y) + : BC_CheckBox(x, y, + iface_prefs->pwindow->thread->preferences->ffmpeg_marker_indexes, + _("build ffmpeg marker indexes")) +{ + this->iface_prefs = iface_prefs; +} +IndexFFMPEGMarkerFiles::~IndexFFMPEGMarkerFiles() +{ +} - - - - - - - - +int IndexFFMPEGMarkerFiles::handle_event() +{ + iface_prefs->pwindow->thread->preferences->ffmpeg_marker_indexes = get_value(); + return 1; +} @@ -711,6 +706,19 @@ int UseWarnVersion::handle_event() 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")) +{ + this->pwindow = pwindow; +} + +int BD_WarnRoot::handle_event() +{ + pwindow->thread->preferences->bd_warn_root = get_value(); + return 1; +} + PopupMenuBtnup::PopupMenuBtnup(PreferencesWindow *pwindow, int x, int y) : BC_CheckBox(x, y, pwindow->thread->preferences->popupmenu_btnup, _("Popups activate on button up")) @@ -724,6 +732,39 @@ int PopupMenuBtnup::handle_event() return 1; } +ActivateFocusPolicy::ActivateFocusPolicy(PreferencesWindow *pwindow, int x, int y) + : BC_CheckBox(x, y, (pwindow->thread->preferences->textbox_focus_policy & CLICK_ACTIVATE) != 0, + _("Click to activate text focus")) +{ + this->pwindow = pwindow; +} + +int ActivateFocusPolicy::handle_event() +{ + if( get_value() ) + pwindow->thread->preferences->textbox_focus_policy |= CLICK_ACTIVATE; + else + pwindow->thread->preferences->textbox_focus_policy &= ~CLICK_ACTIVATE; + return 1; +} + +DeactivateFocusPolicy::DeactivateFocusPolicy(PreferencesWindow *pwindow, int x, int y) + : BC_CheckBox(x, y, (pwindow->thread->preferences->textbox_focus_policy & CLICK_DEACTIVATE) != 0, + _("Click to deactivate text focus")) +{ + this->pwindow = pwindow; +} + +int DeactivateFocusPolicy::handle_event() +{ + if( get_value() ) + pwindow->thread->preferences->textbox_focus_policy |= CLICK_DEACTIVATE; + else + pwindow->thread->preferences->textbox_focus_policy &= ~CLICK_DEACTIVATE; + return 1; +} + + ScanCommercials::ScanCommercials(PreferencesWindow *pwindow, int x, int y) : BC_CheckBox(x,