/*! \file valuenodeadd.cpp
** \brief Template File
**
-** $Id: valuenodeadd.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $
+** $Id$
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
#include "valuenodeadd.h"
#include <synfigapp/canvasinterface.h>
+#include <synfigapp/general.h>
+
#endif
using namespace std;
ACTION_INIT(Action::ValueNodeAdd);
ACTION_SET_NAME(Action::ValueNodeAdd,"value_node_add");
-ACTION_SET_LOCAL_NAME(Action::ValueNodeAdd,"Add ValueNode");
+ACTION_SET_LOCAL_NAME(Action::ValueNodeAdd,N_("Add ValueNode"));
ACTION_SET_TASK(Action::ValueNodeAdd,"add");
ACTION_SET_CATEGORY(Action::ValueNodeAdd,Action::CATEGORY_VALUENODE);
ACTION_SET_PRIORITY(Action::ValueNodeAdd,0);
ACTION_SET_VERSION(Action::ValueNodeAdd,"0.0");
-ACTION_SET_CVS_ID(Action::ValueNodeAdd,"$Id: valuenodeadd.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $");
+ACTION_SET_CVS_ID(Action::ValueNodeAdd,"$Id$");
/* === G L O B A L S ======================================================= */
Action::ValueNodeAdd::get_param_vocab()
{
ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
-
+
ret.push_back(ParamDesc("new",Param::TYPE_VALUENODE)
.set_local_name(_("New ValueNode"))
.set_desc(_("ValueNode to be added"))
ret.push_back(ParamDesc("name",Param::TYPE_STRING)
.set_local_name(_("Name"))
);
-
+
return ret;
}
bool
-Action::ValueNodeAdd::is_canidate(const ParamList &x)
+Action::ValueNodeAdd::is_candidate(const ParamList &x)
{
- return canidate_check(get_param_vocab(),x);
+ return candidate_check(get_param_vocab(),x);
}
bool
if(param_name=="new" && param.get_type()==Param::TYPE_VALUENODE)
{
value_node=param.get_value_node();
-
+
return true;
}
if(param_name=="name" && param.get_type()==Param::TYPE_STRING)
{
name=param.get_string();
-
+
return true;
}
{
throw Error(_("Parameter appears to already be exported"));
}
-
+
try
{
get_canvas()->add_value_node(value_node,name);
}
set_dirty(false);
-
+
// Signal that a layer has been inserted
if(get_canvas_interface())
{
}
set_dirty(false);
-
+
// Signal that a layer has been inserted
if(get_canvas_interface())
{