Remove internal edit mode and add "content" tool.
[ardour.git] / gtk2_ardour / audio_clock.cc
index d2c242735ae6fcf406fc46252b44fe22a7c3e02e..b6c2040792274fa514b05a1e9faa5e6d136f9cb4 100644 (file)
@@ -223,15 +223,15 @@ AudioClock::set_colors ()
        uint32_t cursor_color;
 
        if (active_state()) {
-               bg_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 active: background", get_name()));
-               text_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 active: text", get_name()));
-               editing_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 active: edited text", get_name()));
-               cursor_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1 active: cursor", get_name()));
+               bg_color = ARDOUR_UI::config()->color (string_compose ("%1 active: background", get_name()));
+               text_color = ARDOUR_UI::config()->color (string_compose ("%1 active: text", get_name()));
+               editing_color = ARDOUR_UI::config()->color (string_compose ("%1 active: edited text", get_name()));
+               cursor_color = ARDOUR_UI::config()->color (string_compose ("%1 active: cursor", get_name()));
        } else {
-               bg_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: background", get_name()));
-               text_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: text", get_name()));
-               editing_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: edited text", get_name()));
-               cursor_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: cursor", get_name()));
+               bg_color = ARDOUR_UI::config()->color (string_compose ("%1: background", get_name()));
+               text_color = ARDOUR_UI::config()->color (string_compose ("%1: text", get_name()));
+               editing_color = ARDOUR_UI::config()->color (string_compose ("%1: edited text", get_name()));
+               cursor_color = ARDOUR_UI::config()->color (string_compose ("%1: cursor", get_name()));
        }
 
        /* store for bg and cursor in render() */
@@ -260,12 +260,14 @@ AudioClock::set_colors ()
        r = lrint ((r/255.0) * 65535.0);
        g = lrint ((g/255.0) * 65535.0);
        b = lrint ((b/255.0) * 65535.0);
+       delete foreground_attr;
        foreground_attr = new Pango::AttrColor (Pango::Attribute::create_attr_foreground (r, g, b));
 
        UINT_TO_RGBA (editing_color, &r, &g, &b, &a);
        r = lrint ((r/255.0) * 65535.0);
        g = lrint ((g/255.0) * 65535.0);
        b = lrint ((b/255.0) * 65535.0);
+       delete editing_attr;
        editing_attr = new Pango::AttrColor (Pango::Attribute::create_attr_foreground (r, g, b));
 
        normal_attributes.change (*foreground_attr);