Fix bugs in previous commit that caused FTBFS in synfig and ETL FTBFS with older...
[synfig.git] / synfig-studio / tags / stable / src / synfigapp / actions / layeradd.cpp
index 41cfe1a..e7ec3ab 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 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
@@ -32,6 +33,8 @@
 #include "layeradd.h"
 #include <synfigapp/canvasinterface.h>
 
+#include <synfigapp/general.h>
+
 #endif
 
 using namespace std;
@@ -42,9 +45,9 @@ using namespace Action;
 
 /* === M A C R O S ========================================================= */
 
-ACTION_INIT(Action::LayerAdd);
+ACTION_INIT_NO_GET_LOCAL_NAME(Action::LayerAdd);
 ACTION_SET_NAME(Action::LayerAdd,"layer_add");
-ACTION_SET_LOCAL_NAME(Action::LayerAdd,"Add Layer");
+ACTION_SET_LOCAL_NAME(Action::LayerAdd,N_("Add Layer"));
 ACTION_SET_TASK(Action::LayerAdd,"add");
 ACTION_SET_CATEGORY(Action::LayerAdd,Action::CATEGORY_LAYER);
 ACTION_SET_PRIORITY(Action::LayerAdd,0);
@@ -61,6 +64,15 @@ Action::LayerAdd::LayerAdd()
 {
 }
 
+synfig::String
+Action::LayerAdd::get_local_name()const
+{
+       if (layer)
+               return strprintf("%s '%s'", _("Add Layer"), layer->get_local_name().c_str());
+       else
+               return _("Add Layer");
+}
+
 Action::ParamVocab
 Action::LayerAdd::get_param_vocab()
 {