enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h
[ardour.git] / gtk2_ardour / session_option_editor.cc
index 51f30b6a6187841e0f217cafd7995e7e19553f70..baadcef795ff625c66f48bf26898358f3361e70c 100644 (file)
 #include "gui_thread.h"
 #include "session_option_editor.h"
 #include "search_path_option.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
 using namespace Timecode;
 
 SessionOptionEditor::SessionOptionEditor (Session* s)
-       : OptionEditor (&(s->config), _("Session Properties"))
+       : OptionEditorWindow (&(s->config), _("Session Properties"))
        , _session_config (&(s->config))
 {
        set_session (s);
@@ -132,18 +132,6 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
 
        /* FADES */
 
-       ComboOption<CrossfadeChoice>* cfc = new ComboOption<CrossfadeChoice> (
-               "xfade-choice",
-               _("Default crossfade type"),
-               sigc::mem_fun (*_session_config, &SessionConfiguration::get_xfade_choice),
-               sigc::mem_fun (*_session_config, &SessionConfiguration::set_xfade_choice)
-               );
-
-       cfc->add (ConstantPowerMinus3dB, _("Constant power (-3dB) crossfade"));
-       cfc->add (ConstantPowerMinus6dB, _("Linear (-6dB) crossfade"));
-
-       add_option (_("Fades"), cfc);
-
        add_option (_("Fades"), new SpinOption<float> (
                _("destructive-xfade-seconds"),
                _("Destructive crossfade length"),
@@ -153,6 +141,20 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
                _("ms")
                            ));
 
+       add_option (_("Fades"), new BoolOption (
+                           "use-transport-fades",
+                           _("Declick when transport starts and stops"),
+                           sigc::mem_fun (*_session_config, &SessionConfiguration::get_use_transport_fades),
+                           sigc::mem_fun (*_session_config, &SessionConfiguration::set_use_transport_fades)
+                           ));
+
+       add_option (_("Fades"), new BoolOption (
+                           "use-monitor-fades",
+                           _("Declick when monitor state changes"),
+                           sigc::mem_fun (*_session_config, &SessionConfiguration::get_use_monitor_fades),
+                           sigc::mem_fun (*_session_config, &SessionConfiguration::set_use_monitor_fades)
+                           ));
+
        add_option (_("Fades"), new BoolOption (
                            "use-region-fades",
                            _("Region fades active"),
@@ -191,27 +193,34 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
                sigc::mem_fun (*_session_config, &SessionConfiguration::set_native_file_header_format)
                );
 
-       hf->add (BWF, _("Broadcast WAVE"));
-       hf->add (WAVE, _("WAVE"));
+       hf->add (BWF, _("Broadcast WAVE (4GB size limit)"));
+#ifdef HAVE_RF64_RIFF
+       hf->add (MBWF, _("Broadcast RF64"));
+#endif
+       hf->add (WAVE, _("WAVE (4GB size limit)"));
        hf->add (WAVE64, _("WAVE-64"));
        hf->add (CAF, _("CAF"));
+       hf->add (RF64, _("RF64"));
+#ifdef HAVE_RF64_RIFF
+       hf->add (RF64_WAV, _("RF64 (WAV compatible)"));
+#endif
 
        add_option (_("Media"), hf);
 
-       add_option (_("Locations"), new OptionEditorHeading (_("File locations")));
+       add_option (S_("Files|Locations"), new OptionEditorHeading (_("File locations")));
 
         SearchPathOption* spo = new SearchPathOption ("audio-search-path", _("Search for audio files in:"),
                                                      _session->path(),
                                                       sigc::mem_fun (*_session_config, &SessionConfiguration::get_audio_search_path),
                                                       sigc::mem_fun (*_session_config, &SessionConfiguration::set_audio_search_path));
-        add_option (_("Locations"), spo);
+        add_option (S_("Files|Locations"), spo);
 
         spo = new SearchPathOption ("midi-search-path", _("Search for MIDI files in:"),
                                    _session->path(),
                                     sigc::mem_fun (*_session_config, &SessionConfiguration::get_midi_search_path),
                                     sigc::mem_fun (*_session_config, &SessionConfiguration::set_midi_search_path));
 
-        add_option (_("Locations"), spo);
+        add_option (S_("Files|Locations"), spo);
 
        /* File Naming  */
 
@@ -219,7 +228,7 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
 
        BoolOption *bo;
 
-       bo = new BoolOption (
+       bo = new RouteDisplayBoolOption (
                        "track-name-number",
                        _("Prefix Track number"),
                        sigc::mem_fun (*_session_config, &SessionConfiguration::get_track_name_number),
@@ -407,7 +416,7 @@ SessionOptionEditor::parameter_changed (std::string const & p)
 bool
 SessionOptionEditor::set_use_monitor_section (bool yn)
 {
-       bool had_monitor_section = _session->monitor_out();
+       bool had_monitor_section = _session->monitor_out() != 0;
 
        if (yn) {
                _session->add_monitor_section ();
@@ -416,10 +425,10 @@ SessionOptionEditor::set_use_monitor_section (bool yn)
        }
 
        /* store this choice for any new sessions */
-       
+
        Config->set_use_monitor_bus (yn);
 
-       return had_monitor_section != yn;
+       return had_monitor_section != (_session->monitor_out() != 0);
 }
 
 bool