mask mousewheel segv bug, mask opengl sw fallback read to ram, fix tiff config withou...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / interfaceprefs.C
index 60241a77972e2723fc5d17d124ec062090560bb2..b75c0bfc0c679068c21f3d035ec0ae03f98774c5 100644 (file)
 #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)
 {
@@ -92,11 +88,11 @@ void InterfacePrefs::create_objects()
        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]),
@@ -176,12 +172,12 @@ void InterfacePrefs::create_objects()
        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;
@@ -240,13 +236,15 @@ void InterfacePrefs::create_objects()
 
 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)
@@ -323,7 +321,7 @@ int IndexFFMPEGMarkerFiles::handle_event()
 
 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;
 }
@@ -339,14 +337,14 @@ int ViewBehaviourText::handle_event()
 
 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;