PopupMenuBtnup *pop_win = new PopupMenuBtnup(pwindow, x1, y1);
add_subwindow(pop_win);
y1 += pop_win->get_h() + 5;
- TextboxFocusPolicy *focus_policy = new TextboxFocusPolicy(pwindow, x1, y1);
- add_subwindow(focus_policy);
- y1 += focus_policy->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;
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"),
add_subwindow(deleteall = new DeleteAllIndexes(mwindow, pwindow, 350, y));
-
-
-
y += 35;
add_subwindow(new BC_Bar(5, y, get_w() - 10));
y += 5;
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 "";
}
}
-
-
-
-
-
-
-
-
-
-
-
IndexPathText::IndexPathText(int x,
int y,
PreferencesWindow *pwindow,
+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;
+}
return 1;
}
-TextboxFocusPolicy::TextboxFocusPolicy(PreferencesWindow *pwindow, int x, int y)
- : BC_CheckBox(x, y, pwindow->thread->preferences->textbox_focus_policy,
+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 TextboxFocusPolicy::handle_event()
+int DeactivateFocusPolicy::handle_event()
{
- pwindow->thread->preferences->textbox_focus_policy = get_value();
+ if( get_value() )
+ pwindow->thread->preferences->textbox_focus_policy |= CLICK_DEACTIVATE;
+ else
+ pwindow->thread->preferences->textbox_focus_policy &= ~CLICK_DEACTIVATE;
return 1;
}