Revert to old Lock mode (still called Lock).
[ardour.git] / gtk2_ardour / rc_option_editor.cc
index 13f425883e98e03037aae02ae176908a627d64e5..9c5a603fd75c676d30ac1ce627401f0b5647d331 100644 (file)
@@ -319,7 +319,7 @@ public:
                        }
                }
 
-               Table* t = manage (new Table (4, 4));
+               Table* t = manage (new Table (4, 5));
                t->set_spacings (4);
 
                Label* l = manage (left_aligned_label (_("Edit using:")));
@@ -391,7 +391,7 @@ public:
                _insert_note_button_adjustment.set_value (Keyboard::insert_note_button());
                _insert_note_button_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::insert_note_button_changed));
 
-
+               /* ignore snap */
                set_popdown_strings (_snap_modifier_combo, dumb);
                _snap_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_modifier_chosen));
 
@@ -408,6 +408,23 @@ public:
                t->attach (*l, 0, 1, 3, 4, FILL | EXPAND, FILL);
                t->attach (_snap_modifier_combo, 1, 2, 3, 4, FILL | EXPAND, FILL);
 
+               /* snap delta */
+               set_popdown_strings (_snap_delta_combo, dumb);
+               _snap_delta_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_delta_modifier_chosen));
+
+               for (int x = 0; modifiers[x].name; ++x) {
+                       if (modifiers[x].modifier == (guint) Keyboard::snap_delta_modifier ()) {
+                               _snap_delta_combo.set_active_text (S_(modifiers[x].name));
+                               break;
+                       }
+               }
+
+               l = manage (left_aligned_label (_("Snap to absolute using:")));
+               l->set_name ("OptionsLabel");
+
+               t->attach (*l, 0, 1, 4, 5, FILL | EXPAND, FILL);
+               t->attach (_snap_delta_combo, 1, 2, 4, 5, FILL | EXPAND, FILL);
+
                vector<string> strs;
 
                for (map<string,string>::iterator bf = Keyboard::binding_files.begin(); bf != Keyboard::binding_files.end(); ++bf) {
@@ -421,8 +438,8 @@ public:
                l = manage (left_aligned_label (_("Keyboard layout:")));
                l->set_name ("OptionsLabel");
 
-               t->attach (*l, 0, 1, 4, 5, FILL | EXPAND, FILL);
-               t->attach (_keyboard_layout_selector, 1, 2, 4, 5, FILL | EXPAND, FILL);
+               t->attach (*l, 0, 1, 5, 6, FILL | EXPAND, FILL);
+               t->attach (_keyboard_layout_selector, 1, 2, 5, 6, FILL | EXPAND, FILL);
 
                _box->pack_start (*t, false, false);
        }
@@ -502,6 +519,18 @@ private:
                }
        }
 
+       void snap_delta_modifier_chosen ()
+       {
+               string const txt = _snap_delta_combo.get_active_text();
+
+               for (int i = 0; modifiers[i].name; ++i) {
+                       if (txt == _(modifiers[i].name)) {
+                               Keyboard::set_snap_delta_modifier (modifiers[i].modifier);
+                               break;
+                       }
+               }
+       }
+
        void delete_button_changed ()
        {
                Keyboard::set_delete_button (_delete_button_spin.get_value_as_int());
@@ -522,6 +551,7 @@ private:
        ComboBoxText _delete_modifier_combo;
        ComboBoxText _insert_note_modifier_combo;
        ComboBoxText _snap_modifier_combo;
+       ComboBoxText _snap_delta_combo;
        Adjustment _delete_button_adjustment;
        SpinButton _delete_button_spin;
        Adjustment _edit_button_adjustment;
@@ -541,7 +571,7 @@ public:
        {
                _dpi_adjustment.set_value (_ui_config->get_font_scale() / 1024.);
 
-               Label* l = manage (new Label (_("Font scaling:")));
+               Label* l = manage (new Label (_("GUI and Font scaling:")));
                l->set_name ("OptionsLabel");
 
                 const Glib::ustring dflt = _("Default");
@@ -570,7 +600,7 @@ public:
 
                _box->pack_start (*h, false, false);
 
-               set_note (_("Major font-scale changes require an application restart to re-layout."));
+               set_note (_("Adjusting the scale require an application restart to re-layout."));
 
                _dpi_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &FontScalingOptions::dpi_changed));
        }
@@ -1678,6 +1708,17 @@ RCOptionEditor::RCOptionEditor ()
 
        add_option (_("Editor"), bco);
 
+       ComboOption<LayerModel>* lm = new ComboOption<LayerModel> (
+               "layer-model",
+               _("Layering model"),
+               sigc::mem_fun (*_rc_config, &RCConfiguration::get_layer_model),
+               sigc::mem_fun (*_rc_config, &RCConfiguration::set_layer_model)
+               );
+
+       lm->add (LaterHigher, _("later is higher"));
+       lm->add (Manual, _("manual layering"));
+       add_option (_("Editor"), lm);
+
        add_option (_("Editor"),
             new BoolOption (
                     "rubberbanding-snaps-to-grid",