cleanup display suspend.
[ardour.git] / gtk2_ardour / button_joiner.cc
index 86bb055d017ea3da5a0aff629590c892ed79390b..da9ae4584744297719d65c1b3c0696218c86f08a 100644 (file)
@@ -1,3 +1,22 @@
+/*
+    Copyright (C) 2012 Paul Davis 
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
 #include <iostream>
 #include <algorithm>
 
@@ -55,7 +74,7 @@ ButtonJoiner::ButtonJoiner (const std::string& str, Gtk::Widget& lw, Gtk::Widget
        uint32_t border_color;
        uint32_t r, g, b, a;
 
-       border_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: border end", name));
+       border_color = ARDOUR_UI::config()->color (string_compose ("%1: border end", name));
        UINT_TO_RGBA (border_color, &r, &g, &b, &a);
        
        border_r = r/255.0;
@@ -80,7 +99,7 @@ ButtonJoiner::~ButtonJoiner ()
 }
 
 void
-ButtonJoiner::render (cairo_t* cr)
+ButtonJoiner::render (cairo_t* cr, cairo_rectangle_t*)
 {
        double h = get_height();
        
@@ -138,7 +157,7 @@ ButtonJoiner::on_size_allocate (Allocation& alloc)
 }
 
 bool
-ButtonJoiner::on_button_release_event (GdkEventButton* ev)
+ButtonJoiner::on_button_release_event (GdkEventButton*)
 {
        if (_action) {
                _action->activate ();
@@ -237,15 +256,15 @@ ButtonJoiner::set_colors ()
        active_fill_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height());
        inactive_fill_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height());
 
-       start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill start", name));
-       end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill end", name));
+       start_color = ARDOUR_UI::config()->color (string_compose ("%1: fill start", name));
+       end_color = ARDOUR_UI::config()->color (string_compose ("%1: fill end", name));
        UINT_TO_RGBA (start_color, &r, &g, &b, &a);
        cairo_pattern_add_color_stop_rgba (inactive_fill_pattern, 0, r/255.0,g/255.0,b/255.0, a/255.0);
        UINT_TO_RGBA (end_color, &r, &g, &b, &a);
        cairo_pattern_add_color_stop_rgba (inactive_fill_pattern, 1, r/255.0,g/255.0,b/255.0, a/255.0);
 
-       start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill start active", name));
-       end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill end active", name));
+       start_color = ARDOUR_UI::config()->color (string_compose ("%1: fill start active", name));
+       end_color = ARDOUR_UI::config()->color (string_compose ("%1: fill end active", name));
        UINT_TO_RGBA (start_color, &r, &g, &b, &a);
        cairo_pattern_add_color_stop_rgba (active_fill_pattern, 0, r/255.0,g/255.0,b/255.0, a/255.0);
        UINT_TO_RGBA (end_color, &r, &g, &b, &a);