Initial attempt at i18n support using gettext
[synfig.git] / synfig-studio / trunk / src / gtkmm / widget_coloredit.cpp
index 79cafc3..bd71591 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2007 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -39,6 +40,8 @@
 #include <gtkmm/notebook.h>
 #include <gtkmm/box.h>
 
+#include "general.h"
+
 #endif
 
 /* === U S I N G =========================================================== */
@@ -156,7 +159,10 @@ ColorSlider::redraw(GdkEventExpose */*bleh*/)
        int i;
        for(i=width-1;i>=0;i--)
        {
-               color_func(color,gamma_out(float(i)/float(width)));
+               color_func(color,
+                                  (use_colorspace_gamma() && type<TYPE_U)
+                                  ? gamma_out(float(i)/float(width))
+                                  :              (float(i)/float(width)));
                const Color c1(Color::blend(color,bg1,1.0).clamped());
                const Color c2(Color::blend(color,bg2,1.0).clamped());
                assert(c1.is_valid());