replace "-inf" with UTF8 infinity symbol
authorRobin Gareus <robin@gareus.org>
Tue, 9 Jul 2013 14:23:14 +0000 (16:23 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 10 Jul 2013 13:27:16 +0000 (15:27 +0200)
gtk2_ardour/automation_line.cc
gtk2_ardour/gain_meter.cc
gtk2_ardour/option_editor.cc
gtk2_ardour/route_ui.cc

index 7e60bff2e34ffc0c98a125780eef574dea03776b..92ea8cf952850b6f2a72190ba2f10bd46a038468 100644 (file)
@@ -342,7 +342,7 @@ AutomationLine::fraction_to_string (double fraction) const
 
        if (_uses_gain_mapping) {
                if (fraction == 0.0) {
-                       snprintf (buf, sizeof (buf), "-inf");
+                       snprintf (buf, sizeof (buf), "-\u221e");
                } else {
                        snprintf (buf, sizeof (buf), "%.1f", accurate_coefficient_to_dB (slider_position_to_gain_with_max (fraction, Config->get_max_gain())));
                }
@@ -379,7 +379,7 @@ AutomationLine::fraction_to_relative_string (double original, double fraction) c
                        */
                        return "";
                } else if (fraction == 0.0) {
-                       snprintf (buf, sizeof (buf), "-inf");
+                       snprintf (buf, sizeof (buf), "-\u221e");
                } else {
                        double old_db = accurate_coefficient_to_dB (slider_position_to_gain_with_max (original, Config->get_max_gain()));
                        double new_db = accurate_coefficient_to_dB (slider_position_to_gain_with_max (fraction, Config->get_max_gain()));
@@ -405,7 +405,7 @@ AutomationLine::fraction_to_relative_string (double original, double fraction) c
 double
 AutomationLine::string_to_fraction (string const & s) const
 {
-       if (s == "-inf") {
+       if (s == "-\u221e") {
                return 0;
        }
 
index 4f48ffa57aec006fa4c8c157a2dace57caa32da5..70cabec4b58391b03f5adf568883c88370bc5ffc 100644 (file)
@@ -102,7 +102,7 @@ GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length, int
        peak_display.set_name ("MixerStripPeakDisplay");
        set_size_request_to_display_given_text (peak_display, "-80.g", 2, 6); /* note the descender */
        max_peak = minus_infinity();
-       peak_display.set_label (_("-inf"));
+       peak_display.set_label ("-\u221e");
        peak_display.unset_flags (Gtk::CAN_FOCUS);
 
        gain_automation_style_button.set_name ("mixer strip button");
@@ -354,7 +354,7 @@ GainMeterBase::reset_peak_display ()
        _meter->reset_max();
        level_meter->clear_meters();
        max_peak = -INFINITY;
-       peak_display.set_label (_("-inf"));
+       peak_display.set_label ("-\u221e");
        peak_display.set_name ("MixerStripPeakDisplay");
 }
 
@@ -459,7 +459,7 @@ GainMeterBase::show_gain ()
        switch (_data_type) {
        case DataType::AUDIO:
                if (v == 0.0) {
-                       strcpy (buf, _("-inf"));
+                       strcpy (buf, "-\u221e");
                } else {
                        snprintf (buf, sizeof (buf), "%.1f", accurate_coefficient_to_dB (slider_position_to_gain_with_max (v, Config->get_max_gain())));
                }
@@ -850,7 +850,7 @@ GainMeterBase::update_meters()
        if (mpeak > max_peak) {
                max_peak = mpeak;
                if (mpeak <= -200.0f) {
-                       peak_display.set_label (_("-inf"));
+                       peak_display.set_label ("-\u221e");
                } else {
                        snprintf (buf, sizeof(buf), "%.1f", mpeak);
                        peak_display.set_label (buf);
index 1768bff1a78e0307cfd3653dd32c9e29cb3cda3b..d0087d20833688fc41b307180bf69c3590b82e4f 100644 (file)
@@ -254,7 +254,7 @@ FaderOption::set_state_from_config ()
        char buf[16];
 
        if (val == 0.0) {
-               snprintf (buf, sizeof (buf), "-inf");
+               snprintf (buf, sizeof (buf), "-\u221e");
        } else {
                snprintf (buf, sizeof (buf), "%.2f", accurate_coefficient_to_dB (val));
        }
index bceebc21fb3d6a37160dd6f30fb72b61a45747aa..1387edaaba69b538890e6b07eb43b62dfa44e051 100644 (file)
@@ -882,7 +882,7 @@ RouteUI::build_sends_menu ()
                );
 
        items.push_back (MenuElem(_("Copy track/bus gains to sends"), sigc::mem_fun (*this, &RouteUI::set_sends_gain_from_track)));
-       items.push_back (MenuElem(_("Set sends gain to -inf"), sigc::mem_fun (*this, &RouteUI::set_sends_gain_to_zero)));
+       items.push_back (MenuElem(_("Set sends gain to -\u221edB"), sigc::mem_fun (*this, &RouteUI::set_sends_gain_to_zero)));
        items.push_back (MenuElem(_("Set sends gain to 0dB"), sigc::mem_fun (*this, &RouteUI::set_sends_gain_to_unity)));
 
 }