new logic for enabling translation in bundled releases of ardour
[ardour.git] / gtk2_ardour / rc_option_editor.cc
index 978cea87cc7116ea0240384a8cc1a9c963d68c94..859eedb822989a9a8145f7d5577daef255b558e9 100644 (file)
@@ -105,10 +105,7 @@ private:
 
        void click_browse_clicked ()
        {
-               SoundFileChooser sfdb (*_parent, _("Choose Click"));
-
-               sfdb.show_all ();
-               sfdb.present ();
+               SoundFileChooser sfdb (_("Choose Click"));
 
                if (sfdb.run () == RESPONSE_OK) {
                        click_chosen (sfdb.get_filename());
@@ -128,7 +125,7 @@ private:
        
        void click_emphasis_browse_clicked ()
        {
-               SoundFileChooser sfdb (*_parent, _("Choose Click Emphasis"));
+               SoundFileChooser sfdb (_("Choose Click Emphasis"));
 
                sfdb.show_all ();
                sfdb.present ();
@@ -395,7 +392,7 @@ public:
                        }
                }
 
-               l = manage (left_aligned_label (_("Toggle snap using:")));
+               l = manage (left_aligned_label (_("Ignore snap using:")));
                l->set_name ("OptionsLabel");
 
                t->attach (*l, 0, 1, 3, 4, FILL | EXPAND, FILL);
@@ -532,7 +529,7 @@ public:
                _dpi_adjustment (50, 50, 250, 1, 10),
                _dpi_slider (_dpi_adjustment)
        {
-               _dpi_adjustment.set_value (_rc_config->get_font_scale () / 1024);
+               _dpi_adjustment.set_value (floor (_rc_config->get_font_scale () / 1024));
 
                Label* l = manage (new Label (_("Font scaling:")));
                l->set_name ("OptionsLabel");
@@ -551,7 +548,7 @@ public:
        void parameter_changed (string const & p)
        {
                if (p == "font-scale") {
-                       _dpi_adjustment.set_value (_rc_config->get_font_scale() / 1024);
+                       _dpi_adjustment.set_value (floor (_rc_config->get_font_scale() / 1024));
                }
        }
 
@@ -881,6 +878,7 @@ RCOptionEditor::RCOptionEditor ()
        /* MISC */
 
         uint32_t hwcpus = hardware_concurrency ();
+       BoolOption* bo;
 
         if (hwcpus > 1) {
                 add_option (_("Misc"), new OptionEditorHeading (_("DSP CPU Utilization")));
@@ -973,6 +971,15 @@ RCOptionEditor::RCOptionEditor ()
                     0, 1000, 1, 20
                     ));
 
+       add_option (_("Misc"),
+            new SpinOption<double> (
+                    "automation-interval-msecs",
+                    _("Automation sampling interval (milliseconds)"),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::get_automation_interval_msecs),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::set_automation_interval_msecs),
+                    1, 1000, 1, 20
+                    ));
+
        /* TRANSPORT */
 
        BoolOption* tsf;
@@ -1099,12 +1106,14 @@ RCOptionEditor::RCOptionEditor ()
                         "SMPTE 12M-1999 specifies 29.97df as 30000/1001. The spec further mentions that "
                         "drop-frame timecode has an accumulated error of -86ms over a 24-hour period.\n"
                         "Drop-frame timecode would compensate exactly for a NTSC color frame rate of 30 * 0.9990 (ie 29.970000). "
-                        "That is not the actual rate, however some vendor use that rate - despite it being against the specs - "
+                        "That is not the actual rate. However, some vendors use that rate - despite it being against the specs - "
                         "because the variant of using exactly 29.97 fps has zero timecode drift.\n"
                         ));
 
        add_option (_("Transport"), _sync_source_2997);
 
+       add_option (_("Transport"), new OptionEditorHeading (S_("LTC Reader")));
+
        _ltc_port = new ComboStringOption (
                "ltc-source-port",
                _("LTC incoming port"),
@@ -1119,7 +1128,6 @@ RCOptionEditor::RCOptionEditor ()
 
        add_option (_("Transport"), _ltc_port);
 
-#ifdef HAVE_LTC
        // TODO; rather disable this button than not compile it..
        add_option (_("Transport"), new OptionEditorHeading (S_("LTC Generator")));
 
@@ -1145,7 +1153,7 @@ RCOptionEditor::RCOptionEditor ()
   _ltc_volume_adjustment = new Gtk::Adjustment(-18, -50, 0, .5, 5);
        _ltc_volume_adjustment->set_value (20 * log10(_rc_config->get_ltc_output_volume()));
        _ltc_volume_adjustment->signal_value_changed().connect (sigc::mem_fun (*this, &RCOptionEditor::ltc_generator_volume_changed));
-       _ltc_volume_slider = new HSliderOption("ltcvol", ("LTC generator level:"), *_ltc_volume_adjustment);
+       _ltc_volume_slider = new HSliderOption("ltcvol", _("LTC generator level"), *_ltc_volume_adjustment);
 
        Gtkmm2ext::UI::instance()->set_tip
                (_ltc_volume_slider->tip_widget(),
@@ -1153,7 +1161,6 @@ RCOptionEditor::RCOptionEditor ()
 
        add_option (_("Transport"), _ltc_volume_slider);
        parameter_changed ("send-ltc");
-#endif
 
        parameter_changed ("sync-source");
 
@@ -1183,13 +1190,19 @@ RCOptionEditor::RCOptionEditor ()
                     sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_track_meters)
                     ));
 
-       add_option (_("Editor"),
-            new BoolOption (
+       bo = new BoolOption (
                     "use-overlap-equivalency",
                     _("Use overlap equivalency for regions"),
                     sigc::mem_fun (*_rc_config, &RCConfiguration::get_use_overlap_equivalency),
                     sigc::mem_fun (*_rc_config, &RCConfiguration::set_use_overlap_equivalency)
-                    ));
+                    );
+
+       add_option (_("Editor"), bo);
+       Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(), 
+                                           string_compose (_("When extending region selection across a group, %1 must decide which regions are equivalent"
+                                                             "\n\nIf enabled, regions are considered \"equivalent\" if they overlap on the timeline."
+                                                             "\n\nIf disabled, regions are considered \"equivalent\" only if have the same start time, length and position"),
+                                                           PROGRAM_NAME));
 
        add_option (_("Editor"),
             new BoolOption (
@@ -1289,13 +1302,16 @@ RCOptionEditor::RCOptionEditor ()
                     sigc::mem_fun (*_rc_config, &RCConfiguration::set_link_editor_and_mixer_selection)
                     ));
 
-       add_option (_("Editor"),
-            new BoolOption (
+       bo = 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 (_("Editor"), bo);
+       Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(), _("If enabled, popup a dialog when a new marker is created to allow its name to be set as it is created."
+                                                               "\n\nYou can always rename markers by right-clicking on them"));
 
        add_option (_("Editor"),
            new BoolOption (
@@ -1427,14 +1443,6 @@ RCOptionEditor::RCOptionEditor ()
                     sigc::mem_fun (*_rc_config, &RCConfiguration::set_plugins_stop_with_transport)
                     ));
 
-       add_option (_("Audio"),
-            new BoolOption (
-                    "do-not-record-plugins",
-                    _("Disable plugins during recording"),
-                    sigc::mem_fun (*_rc_config, &RCConfiguration::get_do_not_record_plugins),
-                    sigc::mem_fun (*_rc_config, &RCConfiguration::set_do_not_record_plugins)
-                    ));
-
        add_option (_("Audio"),
             new BoolOption (
                     "new-plugins-active",
@@ -1676,6 +1684,17 @@ RCOptionEditor::RCOptionEditor ()
 
        /* USER INTERACTION */
 
+       if (getenv ("ARDOUR_BUNDLED")) {
+               add_option (_("User interaction"), 
+                           new BoolOption (
+                                   "enable-translation",
+                                   string_compose (_("Use translations of %1 messages\n"
+                                                     "   <i>(requires a restart of %1 to take effect)</i>\n"
+                                                     "   <i>(if available for your language preferences)</i>"), PROGRAM_NAME),
+                                   sigc::ptr_fun (ARDOUR::translations_are_enabled),
+                                   sigc::ptr_fun (ARDOUR::set_translations_enabled)));
+       }
+
        add_option (_("User interaction"), new OptionEditorHeading (_("Keyboard")));
 
        add_option (_("User interaction"), new KeyboardOptions);
@@ -1707,6 +1726,14 @@ RCOptionEditor::RCOptionEditor ()
                     sigc::mem_fun (*_rc_config, &RCConfiguration::set_widget_prelight)
                     ));
 
+       add_option (S_("GUI"),
+            new BoolOption (
+                    "use-tooltips",
+                    _("Show tooltips if mouse hovers over a control"),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::get_use_tooltips),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::set_use_tooltips)
+                    ));
+
 #ifndef GTKOSX
        /* font scaling does nothing with GDK/Quartz */
        add_option (S_("GUI"), new FontScalingOptions (_rc_config));
@@ -1726,7 +1753,6 @@ 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 (
@@ -1797,7 +1823,7 @@ RCOptionEditor::parameter_changed (string const & p)
        } else if (p == "sync-source") {
                _sync_source->set_sensitive (true);
                if (_session) {
-                       _sync_source->set_sensitive (_session->config.get_external_sync());
+                       _sync_source->set_sensitive (!_session->config.get_external_sync());
                }
                switch(Config->get_sync_source()) {
                case ARDOUR::MTC:
@@ -1812,12 +1838,10 @@ RCOptionEditor::parameter_changed (string const & p)
                        _sync_source_2997->set_sensitive (false);
                        break;
                }
-#ifdef HAVE_LTC
        } else if (p == "send-ltc") {
                bool const s = Config->get_send_ltc ();
                _ltc_send_continuously->set_sensitive (s);
                _ltc_volume_slider->set_sensitive (s);
-#endif /*HAVE_LTC*/
        }
 }