Removed trailing whitespace.
[synfig.git] / synfig-studio / trunk / src / synfigapp / actions / layerparamconnect.cpp
index fae6803..f95d679 100644 (file)
@@ -5,16 +5,17 @@
 **     $Id: layerparamconnect.cpp,v 1.2 2005/01/16 19:55:57 darco Exp $
 **
 **     \legal
-**     Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
 **
-**     This software and associated documentation
-**     are CONFIDENTIAL and PROPRIETARY property of
-**     the above-mentioned copyright holder.
+**     This package 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.
 **
-**     You may not copy, print, publish, or in any
-**     other way distribute this software without
-**     a prior written agreement with
-**     the copyright holder.
+**     This package 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.
 **     \endlegal
 */
 /* ========================================================================= */
@@ -64,7 +65,7 @@ Action::ParamVocab
 Action::LayerParamConnect::get_param_vocab()
 {
        ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-       
+
        ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
                .set_local_name(_("Layer"))
        );
@@ -76,14 +77,14 @@ Action::LayerParamConnect::get_param_vocab()
        ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
                .set_local_name(_("ValueNode"))
        );
-       
+
        return ret;
 }
 
 bool
-Action::LayerParamConnect::is_canidate(const ParamList &x)
+Action::LayerParamConnect::is_candidate(const ParamList &x)
 {
-       return canidate_check(get_param_vocab(),x);
+       return candidate_check(get_param_vocab(),x);
 }
 
 bool
@@ -92,21 +93,21 @@ Action::LayerParamConnect::set_param(const synfig::String& name, const Action::P
        if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
        {
                layer=param.get_layer();
-               
+
                return true;
        }
 
        if(name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
        {
                value_node=param.get_value_node();
-               
+
                return true;
        }
 
        if(name=="param" && param.get_type()==Param::TYPE_STRING)
        {
                param_name=param.get_string();
-               
+
                return true;
        }
 
@@ -122,7 +123,7 @@ Action::LayerParamConnect::is_ready()const
                synfig::warning("Action::LayerParamConnect: Missing \"value_node\"");
        if(param_name.empty())
                synfig::warning("Action::LayerParamConnect: Missing \"param\"");
-       
+
        if(!layer || !value_node || param_name.empty())
                return false;
        return Action::CanvasSpecific::is_ready();
@@ -141,11 +142,11 @@ Action::LayerParamConnect::perform()
 
        old_value=layer->get_param(param_name);
        if(!old_value.is_valid())
-               throw Error(_("Layer did not recognise parameter name"));               
+               throw Error(_("Layer did not recognise parameter name"));
 
        if(!layer->set_param(param_name,(*value_node)(0)))
                throw Error(_("Bad connection"));
-       
+
        layer->connect_dynamic_param(param_name,value_node);
 
        layer->changed();
@@ -168,7 +169,7 @@ Action::LayerParamConnect::undo()
                layer->disconnect_dynamic_param(param_name);
                layer->set_param(param_name,old_value);
        }
-       
+
        layer->changed();
        if(old_value_node)
                old_value_node->changed();
@@ -178,7 +179,7 @@ Action::LayerParamConnect::undo()
        else
                set_dirty(false);
        */
-       
+
        if(get_canvas_interface())
        {
                get_canvas_interface()->signal_layer_param_changed()(layer,param_name);