SYNFIG_LAYER_INIT(SimpleCircle);
SYNFIG_LAYER_SET_NAME(SimpleCircle,"simple_circle");
SYNFIG_LAYER_SET_LOCAL_NAME(SimpleCircle,N_("Simple Circle"));
-SYNFIG_LAYER_SET_CATEGORY(SimpleCircle,N_("Do Not Use"));
+SYNFIG_LAYER_SET_CATEGORY(SimpleCircle,CATEGORY_DO_NOT_USE);
SYNFIG_LAYER_SET_VERSION(SimpleCircle,"0.1");
SYNFIG_LAYER_SET_CVS_ID(SimpleCircle,"$Id$");
_layer_book=new Book();
#define INCLUDE_LAYER(class) synfig::Layer::book()[synfig::String(class::name__)]=BookEntry(class::create,class::name__,dgettext("synfig",class::local_name__),dgettext("synfig",class::category__),class::cvs_id__,class::version__)
-#define LAYER_ALIAS(class,alias) synfig::Layer::book()[synfig::String(alias)]=synfig::Layer::BookEntry(class::create,alias,alias,_("Do Not Use"),class::cvs_id__,class::version__);
+#define LAYER_ALIAS(class,alias) synfig::Layer::book()[synfig::String(alias)]=synfig::Layer::BookEntry(class::create,alias,alias,CATEGORY_DO_NOT_USE,class::cvs_id__,class::version__);
INCLUDE_LAYER(Layer_SolidColor); LAYER_ALIAS(Layer_SolidColor, "solid_color");
INCLUDE_LAYER(Layer_PasteCanvas); LAYER_ALIAS(Layer_PasteCanvas, "paste_canvas");
//! \writeme
#define EXPORT_VERSION() if(param=="Version" || param=="version" || param=="version__") { return version__; }
+//! This is used as the category for layer book entries which represent aliases of layers.
+//! It prevents these layers showing up in the menu.
+#define CATEGORY_DO_NOT_USE "Do Not Use"
+
/* === T Y P E D E F S ===================================================== */
/* === C L A S S E S & S T R U C T S ======================================= */
//! DEPRECATED - use #INCLUDE_LAYER(class)
#define LAYER(class) synfig::Layer::register_in_book(synfig::Layer::BookEntry(class::create,class::name__,dgettext("synfig",class::local_name__),dgettext("synfig",class::category__),class::cvs_id__,class::version__));
//#define LAYER(x) synfig::Layer::book()[synfig::String(x::name__)]=x::create;
-#define LAYER_ALIAS(class,alias) synfig::Layer::register_in_book(synfig::Layer::BookEntry(class::create,alias,alias,_("Do Not Use"),class::cvs_id__,class::version__));
+#define LAYER_ALIAS(class,alias) synfig::Layer::register_in_book(synfig::Layer::BookEntry(class::create,alias,alias,CATEGORY_DO_NOT_USE,class::cvs_id__,class::version__));
//! Marks the end of the layers in the module's inventory
#define END_LAYERS }
void
CanvasView::register_layer_type(synfig::Layer::Book::value_type &/*lyr*/,std::map<synfig::String,Gtk::Menu*>* /*category_map*/)
{
-/* if(lyr.second.category==_("Do Not Use"))
+/* if(lyr.second.category==CATEGORY_DO_NOT_USE)
return;
if(category_map->count(lyr.second.category)==0)
{
synfig::Layer::Book::value_type lyr(*iter);
- if(lyr.second.category==_("Do Not Use"))
+ if(lyr.second.category==CATEGORY_DO_NOT_USE)
continue;
action_group_new_layers->add(Gtk::Action::create(