Separate visual and audio interfaces for translation.
[ardour.git] / gtk2_ardour / rc_option_editor.cc
index dffe6b3c8ab52e93dccfcb85c98167d7102d13b7..00f56d9d885e8ce1b751285347bbd8659214e19e 100644 (file)
@@ -38,6 +38,8 @@
 #include "ardour/control_protocol_manager.h"
 #include "control_protocol/control_protocol.h"
 
+#include "ardour_window.h"
+#include "ardour_dialog.h"
 #include "gui_thread.h"
 #include "midi_tracer.h"
 #include "rc_option_editor.h"
@@ -56,7 +58,7 @@ using namespace ARDOUR;
 class ClickOptions : public OptionEditorBox
 {
 public:
-       ClickOptions (RCConfiguration* c, ArdourDialog* p)
+       ClickOptions (RCConfiguration* c, Gtk::Window* p)
                : _rc_config (c),
                  _parent (p)
        {
@@ -149,7 +151,7 @@ private:
        }
 
        RCConfiguration* _rc_config;
-       ArdourDialog* _parent;
+       Gtk::Window* _parent;
        Entry _click_path_entry;
        Entry _click_emphasis_path_entry;
 };
@@ -657,7 +659,7 @@ private:
 class ControlSurfacesOptions : public OptionEditorBox
 {
 public:
-       ControlSurfacesOptions (ArdourDialog& parent)
+       ControlSurfacesOptions (Gtk::Window& parent)
                : _parent (parent)
        {
                _store = ListStore::create (_model);
@@ -754,8 +756,8 @@ private:
                                Box* box = (Box*) cpi->protocol->get_gui ();
                                if (box) {
                                        string title = row[_model.name];
-                                       ArdourDialog* win = new ArdourDialog (_parent, title);
-                                       win->get_vbox()->pack_start (*box, false, false);
+                                       ArdourWindow* win = new ArdourWindow (_parent, title);
+                                       win->add (*box);
                                        box->show ();
                                        win->present ();
                                        row[_model.editor] = win;
@@ -878,50 +880,10 @@ RCOptionEditor::RCOptionEditor ()
                 add_option (_("Misc"), procs);
         }
 
-       add_option (_("Misc"), new OptionEditorHeading (_("Metering")));
-
-       ComboOption<float>* mht = new ComboOption<float> (
-               "meter-hold",
-               _("Meter hold time"),
-               sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_hold),
-               sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_hold)
-               );
-
-       mht->add (MeterHoldOff, _("off"));
-       mht->add (MeterHoldShort, _("short"));
-       mht->add (MeterHoldMedium, _("medium"));
-       mht->add (MeterHoldLong, _("long"));
-
-       add_option (_("Misc"), mht);
-
-       ComboOption<float>* mfo = new ComboOption<float> (
-               "meter-falloff",
-               _("Meter fall-off"),
-               sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_falloff),
-               sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_falloff)
-               );
-
-       mfo->add (METER_FALLOFF_OFF, _("off"));
-       mfo->add (METER_FALLOFF_SLOWEST, _("slowest"));
-       mfo->add (METER_FALLOFF_SLOW, _("slow"));
-       mfo->add (METER_FALLOFF_MEDIUM, _("medium"));
-       mfo->add (METER_FALLOFF_FAST, _("fast"));
-       mfo->add (METER_FALLOFF_FASTER, _("faster"));
-       mfo->add (METER_FALLOFF_FASTEST, _("fastest"));
-
-       add_option (_("Misc"), mfo);
-
        add_option (_("Misc"), new OptionEditorHeading (_("Undo")));
 
        add_option (_("Misc"), new UndoOptions (_rc_config));
 
-       add_option (_("Misc"), new OptionEditorHeading (_("Misc")));
-
-#ifndef GTKOSX
-       /* font scaling does nothing with GDK/Quartz */
-       add_option (_("Misc"), new FontScalingOptions (_rc_config));
-#endif
-
        add_option (_("Misc"),
             new BoolOption (
                     "verify-remove-last-capture",
@@ -938,13 +900,7 @@ RCOptionEditor::RCOptionEditor ()
                     sigc::mem_fun (*_rc_config, &RCConfiguration::set_periodic_safety_backups)
                     ));
 
-       add_option (_("Misc"),
-            new BoolOption (
-                    "sync-all-route-ordering",
-                    _("Synchronise editor and mixer track order"),
-                    sigc::mem_fun (*_rc_config, &RCConfiguration::get_sync_all_route_ordering),
-                    sigc::mem_fun (*_rc_config, &RCConfiguration::set_sync_all_route_ordering)
-                    ));
+       add_option (_("Misc"), new OptionEditorHeading (_("Misc")));
 
        add_option (_("Misc"),
             new BoolOption (
@@ -954,21 +910,12 @@ RCOptionEditor::RCOptionEditor ()
                     sigc::mem_fun (*_rc_config, &RCConfiguration::set_only_copy_imported_files)
                     ));
 
-       add_option (_("Misc"),
-            new BoolOption (
-                    "default-narrow_ms",
-                    _("Use narrow mixer strips"),
-                    sigc::mem_fun (*_rc_config, &RCConfiguration::get_default_narrow_ms),
-                    sigc::mem_fun (*_rc_config, &RCConfiguration::set_default_narrow_ms)
-                    ));
-
-       add_option (_("Misc"),
-            new BoolOption (
-                    "name-new-markers",
-                    _("Name new markers"),
-                    sigc::mem_fun (*_rc_config, &RCConfiguration::get_name_new_markers),
-                    sigc::mem_fun (*_rc_config, &RCConfiguration::set_name_new_markers)
-                    ));
+       add_option (_("Misc"), new DirectoryOption (
+                           X_("default-session-parent-dir"),
+                           _("Default folder for new sessions:"),
+                           sigc::mem_fun (*_rc_config, &RCConfiguration::get_default_session_parent_dir),
+                           sigc::mem_fun (*_rc_config, &RCConfiguration::set_default_session_parent_dir)
+                           ));
 
        add_option (_("Misc"), new OptionEditorHeading (_("Click")));
 
@@ -1146,6 +1093,38 @@ RCOptionEditor::RCOptionEditor ()
                            sigc::mem_fun (*_rc_config, &RCConfiguration::set_color_regions_using_track_color)
                            ));
 
+       add_option (_("Editor"),
+                   new BoolOption (
+                           "update-editor-during-summary-drag",
+                           _("Update editor window during drags of the summary"),
+                           sigc::mem_fun (*_rc_config, &RCConfiguration::get_update_editor_during_summary_drag),
+                           sigc::mem_fun (*_rc_config, &RCConfiguration::set_update_editor_during_summary_drag)
+                           ));
+
+       add_option (_("Editor"),
+            new BoolOption (
+                    "sync-all-route-ordering",
+                    _("Synchronise editor and mixer track order"),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::get_sync_all_route_ordering),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::set_sync_all_route_ordering)
+                    ));
+
+       add_option (_("Editor"),
+            new BoolOption (
+                    "link-editor-and-mixer-selection",
+                    _("Synchronise editor and mixer selection"),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::get_link_editor_and_mixer_selection),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::set_link_editor_and_mixer_selection)
+                    ));
+
+       add_option (_("Editor"),
+            new BoolOption (
+                    "name-new-markers",
+                    _("Name new markers"),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::get_name_new_markers),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::set_name_new_markers)
+                    ));
+
        /* AUDIO */
 
        add_option (_("Audio"), new OptionEditorHeading (_("Buffering")));
@@ -1169,8 +1148,6 @@ RCOptionEditor::RCOptionEditor ()
                sigc::mem_fun (*_rc_config, &RCConfiguration::set_monitoring_model)
                );
 
-       add_option (_("Audio"), mm);
-
 #ifndef __APPLE__
         /* no JACK monitoring on CoreAudio */
         if (AudioEngine::instance()->can_request_hardware_monitoring()) {
@@ -1180,6 +1157,8 @@ RCOptionEditor::RCOptionEditor ()
        mm->add (SoftwareMonitoring, _("ardour"));
        mm->add (ExternalMonitoring, _("audio hardware"));
 
+       add_option (_("Audio"), mm);
+
        add_option (_("Audio"),
             new BoolOption (
                     "tape-machine-mode",
@@ -1253,7 +1232,7 @@ RCOptionEditor::RCOptionEditor ()
        }
 
        if (fpu.has_flush_to_zero() && fpu.has_denormals_are_zero()) {
-               dm->add (DenormalFTZDAZ, _("use FlushToZero and DenormalsAreZerO"));
+               dm->add (DenormalFTZDAZ, _("use FlushToZero and DenormalsAreZero"));
        }
 
        add_option (_("Audio"), dm);
@@ -1499,9 +1478,15 @@ RCOptionEditor::RCOptionEditor ()
                            sigc::mem_fun (*_rc_config, &RCConfiguration::set_first_midi_bank_is_zero)
                            ));
 
-       /* CONTROL SURFACES */
+       /* USER INTERACTION */
+
+       add_option (_("User interaction"), new OptionEditorHeading (_("Keyboard")));
 
-       add_option (_("Control surfaces"), new ControlSurfacesOptions (*this));
+       add_option (_("User interaction"), new KeyboardOptions);
+
+       add_option (_("User interaction"), new OptionEditorHeading (_("Control surfaces")));
+
+       add_option (_("User interaction"), new ControlSurfacesOptions (*this));
 
        ComboOption<RemoteModel>* rm = new ComboOption<RemoteModel> (
                "remote-model",
@@ -1514,13 +1499,22 @@ RCOptionEditor::RCOptionEditor ()
        rm->add (MixerOrdered, _("follows order of mixer"));
        rm->add (EditorOrdered, _("follows order of editor"));
 
-       add_option (_("Control surfaces"), rm);
+       add_option (_("User interaction"), rm);
 
-       /* KEYBOARD */
+       /* INTERFACE */
 
-       add_option (_("Keyboard"), new KeyboardOptions);
+       add_option (_("Visual|Interface"),
+            new BoolOption (
+                    "widget_prelight",
+                    _("Graphically indicate mouse pointer hovering over various widgets"),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::get_widget_prelight),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::set_widget_prelight)
+                    ));
 
-       /* INTERFACE */
+#ifndef GTKOSX
+       /* font scaling does nothing with GDK/Quartz */
+       add_option (_("Visual|Interface"), new FontScalingOptions (_rc_config));
+#endif
 
        /* The names of these controls must be the same as those given in MixerStrip
           for the actual widgets being controlled.
@@ -1529,9 +1523,11 @@ RCOptionEditor::RCOptionEditor ()
        _mixer_strip_visibility.add (0, X_("SoloSafe"), _("Solo Safe"));
        _mixer_strip_visibility.add (0, X_("SoloIsolated"), _("Solo Isolated"));
        _mixer_strip_visibility.add (0, X_("Comments"), _("Comments"));
+       _mixer_strip_visibility.add (0, X_("Group"), _("Group"));
+       _mixer_strip_visibility.add (0, X_("MeterPoint"), _("Meter Point"));
        
        add_option (
-               _("Interface"),
+               _("Visual|Interface"),
                new VisibilityOption (
                        _("Mixer Strip"),
                        &_mixer_strip_visibility,
@@ -1539,6 +1535,47 @@ RCOptionEditor::RCOptionEditor ()
                        sigc::mem_fun (*_rc_config, &RCConfiguration::set_mixer_strip_visibility)
                        )
                );
+
+       add_option (_("Visual|Interface"),
+            new BoolOption (
+                    "default-narrow_ms",
+                    _("Use narrow mixer strips by default"),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::get_default_narrow_ms),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::set_default_narrow_ms)
+                    ));
+
+       add_option (_("Visual|Interface"), new OptionEditorHeading (_("Metering")));
+
+       ComboOption<float>* mht = new ComboOption<float> (
+               "meter-hold",
+               _("Meter hold time"),
+               sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_hold),
+               sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_hold)
+               );
+
+       mht->add (MeterHoldOff, _("off"));
+       mht->add (MeterHoldShort, _("short"));
+       mht->add (MeterHoldMedium, _("medium"));
+       mht->add (MeterHoldLong, _("long"));
+
+       add_option (_("Visual|Interface"), mht);
+
+       ComboOption<float>* mfo = new ComboOption<float> (
+               "meter-falloff",
+               _("Meter fall-off"),
+               sigc::mem_fun (*_rc_config, &RCConfiguration::get_meter_falloff),
+               sigc::mem_fun (*_rc_config, &RCConfiguration::set_meter_falloff)
+               );
+
+       mfo->add (METER_FALLOFF_OFF, _("off"));
+       mfo->add (METER_FALLOFF_SLOWEST, _("slowest"));
+       mfo->add (METER_FALLOFF_SLOW, _("slow"));
+       mfo->add (METER_FALLOFF_MEDIUM, _("medium"));
+       mfo->add (METER_FALLOFF_FAST, _("fast"));
+       mfo->add (METER_FALLOFF_FASTER, _("faster"));
+       mfo->add (METER_FALLOFF_FASTEST, _("fastest"));
+
+       add_option (_("Visual|Interface"), mfo);
 }
 
 void