Use the translated version of the type name in the parameter dialog.
[synfig.git] / synfig-core / trunk / src / synfig / valuenode_gradientrotate.cpp
index bc03f6c..139de98 100644 (file)
@@ -1,11 +1,12 @@
 /* === S Y N F I G ========================================================= */
 /*!    \file valuenode_gradientrotate.cpp
-**     \brief Template File
+**     \brief Implementation of the "Gradient Rotate" valuenode conversion.
 **
 **     $Id$
 **
 **     \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
@@ -123,7 +124,8 @@ synfig::ValueNode_GradientRotate::operator()(Time t)const
 bool
 ValueNode_GradientRotate::set_link_vfunc(int i,ValueNode::Handle x)
 {
-       assert(i>=0 && i<3);
+       assert(i>=0 && i<link_count());
+
        switch(i)
        {
                case 0:
@@ -140,7 +142,8 @@ ValueNode_GradientRotate::set_link_vfunc(int i,ValueNode::Handle x)
 ValueNode::LooseHandle
 ValueNode_GradientRotate::get_link_vfunc(int i)const
 {
-       assert(i>=0 && i<3);
+       assert(i>=0 && i<link_count());
+
        switch(i)
        {
                case 0:
@@ -160,7 +163,8 @@ ValueNode_GradientRotate::link_count()const
 String
 ValueNode_GradientRotate::link_local_name(int i)const
 {
-       assert(i>=0 && i<2);
+       assert(i>=0 && i<link_count());
+
        switch(i)
        {
                case 0:
@@ -175,7 +179,8 @@ ValueNode_GradientRotate::link_local_name(int i)const
 String
 ValueNode_GradientRotate::link_name(int i)const
 {
-       assert(i>=0 && i<2);
+       assert(i>=0 && i<link_count());
+
        switch(i)
        {
                case 0: