Prevent compiler warnings about unused parameters.
[synfig.git] / synfig-studio / trunk / src / gtkmm / widget_timeslider.cpp
index a0d0a84..24241cb 100644 (file)
@@ -87,11 +87,14 @@ Gdk::Color get_interp_color(synfig::Interpolation x)
 static Gdk::Color
 color_darken(Gdk::Color x, float amount)
 {
-       x.set_rgb_p(
-               x.get_red_p()*amount,
-               x.get_green_p()*amount,
-               x.get_blue_p()*amount
-       );
+       double   red = x.get_red_p()   * amount;
+       double green = x.get_green_p() * amount;
+       double  blue = x.get_blue_p()  * amount;
+
+       x.set_rgb_p(  red > 1 ? 1 : red,
+                               green > 1 ? 1 : green,
+                                blue > 1 ? 1 : blue);
+
        return x;
 }
 
@@ -399,7 +402,7 @@ void Widget_Timeslider::refresh()
        }
 }*/
 
-bool Widget_Timeslider::redraw(bool doublebuffer)
+bool Widget_Timeslider::redraw(bool /*doublebuffer*/)
 {
        Glib::RefPtr<Gdk::Window> window = get_window();
 
@@ -491,7 +494,7 @@ bool Widget_Timeslider::redraw(bool doublebuffer)
        //search around this area to get the right one
 
 
-       //get first valid line and it's position in pixel space
+       //get first valid line and its position in pixel space
        double time = 0;
        double pixel = 0;
 
@@ -499,7 +502,7 @@ bool Widget_Timeslider::redraw(bool doublebuffer)
 
        double subr = scale / subdiv;
 
-       //get it's position inside...
+       //get its position inside...
        time = ceil(start/subr)*subr - start;
        pixel = time*dpdt;