#include "shbtnprefs.h"
#include "theme.h"
-#if 0
-N_("Drag all following edits")
-N_("Drag only one edit")
-N_("Drag source only")
-N_("No effect")
-#endif
-
-#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_RIPPLE_TITLE N_("All Edits (ripple)")
+#define MOVE_ROLL_TITLE N_("One Edit (roll)")
+#define MOVE_SLIP_TITLE N_("Src Only (slip)")
+#define MOVE_SLIDE_TITLE N_("Move Edit (slide)")
+#define MOVE_EDGE_TITLE N_("Drag Edge (edge)")
#define MOVE_EDITS_DISABLED_TITLE N_("No effect")
+
InterfacePrefs::InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow)
: PreferencesDialog(mwindow, pwindow)
{
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;
+ add_subwindow(title = new BC_Title(x, y, _("Clicking on edit boundaries does what:")));
+ y += title->get_h() + 10;
add_subwindow(new BC_Title(x, y, _("Button 1:")));
-
int x1 = x + 100;
+
ViewBehaviourText *text;
add_subwindow(text = new ViewBehaviourText(x1, y - 5,
behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[0]),
y += 30;
add_subwindow(title = new BC_Title(x1=x, y + 5, _("Min DB for meter:")));
- x1 += title->get_w() + 10;
+ x1 += title->get_w() + 4;
sprintf(string, "%d", pwindow->thread->edl->session->min_meter_db);
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;
+ x1 += min_db->get_w() + 4;
+ add_subwindow(title = new BC_Title(x1, y + 5, _("Max:")));
+ x1 += title->get_w() + 4;
sprintf(string, "%d", pwindow->thread->edl->session->max_meter_db);
add_subwindow(max_db = new MeterMaxDB(pwindow, string, x1, y));
y += 30;
const char* InterfacePrefs::behavior_to_text(int mode)
{
- 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 "";
+ switch( mode ) {
+ case MOVE_RIPPLE: return _(MOVE_RIPPLE_TITLE);
+ case MOVE_ROLL: return _(MOVE_ROLL_TITLE);
+ case MOVE_SLIP: return _(MOVE_SLIP_TITLE);
+ case MOVE_SLIDE: return _(MOVE_SLIDE_TITLE);
+ case MOVE_EDGE: return _(MOVE_EDGE_TITLE);
+ case MOVE_EDITS_DISABLED: return _(MOVE_EDITS_DISABLED_TITLE);
}
+ return "";
}
IndexPathText::IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text)
ViewBehaviourText::ViewBehaviourText(int x, int y, const char *text, PreferencesWindow *pwindow,
int *output)
- : BC_PopupMenu(x, y, 200, text)
+ : BC_PopupMenu(x, y, 250, text)
{
this->output = output;
}
void ViewBehaviourText::create_objects()
{
- add_item(new ViewBehaviourItem(this, _(MOVE_ALL_EDITS_TITLE), MOVE_ALL_EDITS));
- add_item(new ViewBehaviourItem(this, _(MOVE_ONE_EDIT_TITLE), MOVE_ONE_EDIT));
- add_item(new ViewBehaviourItem(this, _(MOVE_NO_EDITS_TITLE), MOVE_NO_EDITS));
- add_item(new ViewBehaviourItem(this, _(MOVE_EDITS_DISABLED_TITLE), MOVE_EDITS_DISABLED));
+ for( int mode=0; mode<=EDIT_HANDLE_MODES; ++mode )
+ add_item(new ViewBehaviourItem(this,
+ InterfacePrefs::behavior_to_text(mode), mode));
}
-ViewBehaviourItem::ViewBehaviourItem(ViewBehaviourText *popup, char *text, int behaviour)
+ViewBehaviourItem::ViewBehaviourItem(ViewBehaviourText *popup,
+ const char *text, int behaviour)
: BC_MenuItem(text)
{
this->popup = popup;