Remove .gitignore do nothing is ignored.
[synfig.git] / synfig-studio / trunk / src / synfigapp / actions / blinepointtangentsplit.cpp
index cef7f82..67cc22f 100644 (file)
@@ -2,10 +2,11 @@
 /*!    \file blinepointtangentsplit.cpp
 **     \brief Template File
 **
-**     $Id: blinepointtangentsplit.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
+**     Copyright (c) 2007, 2008 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
@@ -38,6 +39,8 @@
 #include "valuedescconnect.h"
 #include <synfigapp/canvasinterface.h>
 
+#include <synfigapp/general.h>
+
 #endif
 
 using namespace std;
@@ -48,14 +51,14 @@ using namespace Action;
 
 /* === M A C R O S ========================================================= */
 
-ACTION_INIT(Action::BLinePointTangentSplit);
-ACTION_SET_NAME(Action::BLinePointTangentSplit,"bline_point_tangent_split");
-ACTION_SET_LOCAL_NAME(Action::BLinePointTangentSplit,_("Split Tangents"));
+ACTION_INIT_NO_GET_LOCAL_NAME(Action::BLinePointTangentSplit);
+ACTION_SET_NAME(Action::BLinePointTangentSplit,"BLinePointTangentSplit");
+ACTION_SET_LOCAL_NAME(Action::BLinePointTangentSplit,N_("Split Tangents"));
 ACTION_SET_TASK(Action::BLinePointTangentSplit,"split");
 ACTION_SET_CATEGORY(Action::BLinePointTangentSplit,Action::CATEGORY_VALUENODE);
 ACTION_SET_PRIORITY(Action::BLinePointTangentSplit,0);
 ACTION_SET_VERSION(Action::BLinePointTangentSplit,"0.0");
-ACTION_SET_CVS_ID(Action::BLinePointTangentSplit,"$Id: blinepointtangentsplit.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $");
+ACTION_SET_CVS_ID(Action::BLinePointTangentSplit,"$Id$");
 
 /* === G L O B A L S ======================================================= */
 
@@ -69,6 +72,12 @@ Action::BLinePointTangentSplit::BLinePointTangentSplit()
        set_dirty(true);
 }
 
+synfig::String
+Action::BLinePointTangentSplit::get_local_name()const
+{
+       return strprintf(_("Split Tangents of '%s'"), ((ValueNode::Handle)(value_node))->get_description().c_str());
+}
+
 Action::ParamVocab
 Action::BLinePointTangentSplit::get_param_vocab()
 {
@@ -142,39 +151,19 @@ Action::BLinePointTangentSplit::prepare()
 
        Action::Handle action;
 
-       {
-               action=Action::create("value_desc_set");
-               if(!action)
-                       throw Error(_("Couldn't find action \"value_desc_set\""));
-
-               action->set_param("canvas",get_canvas());
-               action->set_param("canvas_interface",get_canvas_interface());
-               action->set_param("value_desc",ValueDesc(value_node,3));
-               action->set_param("time",time);
-               action->set_param("new_value",synfig::ValueBase(true));
+       action=Action::create("ValueDescSet");
+       if(!action)
+               throw Error(_("Couldn't find action \"ValueDescSet\""));
 
-               assert(action->is_ready());
-               if(!action->is_ready())
-                       throw Error(Error::TYPE_NOTREADY);
+       action->set_param("canvas",get_canvas());
+       action->set_param("canvas_interface",get_canvas_interface());
+       action->set_param("value_desc",ValueDesc(value_node,3));
+       action->set_param("time",time);
+       action->set_param("new_value",synfig::ValueBase(true));
 
-               add_action(action);
-       }
-       {
-               action=Action::create("value_desc_set");
-               if(!action)
-                       throw Error(_("Couldn't find action \"value_desc_set\""));
-
-               action->set_param("canvas",get_canvas());
-               action->set_param("canvas_interface",get_canvas_interface());
-               action->set_param("value_desc",ValueDesc(value_node,5));
-               action->set_param("time",time);
-               action->set_param("new_value",(*value_node->get_link("t1"))(time));
-
-               assert(action->is_ready());
-               if(!action->is_ready())
-                       throw Error(Error::TYPE_NOTREADY);
-
-               add_action(action);
-       }
+       assert(action->is_ready());
+       if(!action->is_ready())
+               throw Error(Error::TYPE_NOTREADY);
 
+       add_action(action);
 }