X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Factions%2Flayerencapsulate.cpp;h=42efe477233df6cdf918bdd624834afcc459f314;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=cf799cef1dae3d2c6498e2908f512ba750196029;hpb=1905325be0aa16501c1a802b70da251fb5657b43;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/actions/layerencapsulate.cpp b/synfig-studio/trunk/src/synfigapp/actions/layerencapsulate.cpp index cf799ce..42efe47 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/layerencapsulate.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/layerencapsulate.cpp @@ -6,6 +6,7 @@ ** ** \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 @@ -34,6 +35,8 @@ #include "layerremove.h" #include +#include + #endif using namespace std; @@ -44,9 +47,9 @@ using namespace Action; /* === M A C R O S ========================================================= */ -ACTION_INIT(Action::LayerEncapsulate); -ACTION_SET_NAME(Action::LayerEncapsulate,"layer_encapsulate"); -ACTION_SET_LOCAL_NAME(Action::LayerEncapsulate,"Encapsulate"); +ACTION_INIT_NO_GET_LOCAL_NAME(Action::LayerEncapsulate); +ACTION_SET_NAME(Action::LayerEncapsulate,"LayerEncapsulate"); +ACTION_SET_LOCAL_NAME(Action::LayerEncapsulate,N_("Encapsulate")); ACTION_SET_TASK(Action::LayerEncapsulate,"encapsulate"); ACTION_SET_CATEGORY(Action::LayerEncapsulate,Action::CATEGORY_LAYER); ACTION_SET_PRIORITY(Action::LayerEncapsulate,0); @@ -63,6 +66,12 @@ Action::LayerEncapsulate::LayerEncapsulate() { } +synfig::String +Action::LayerEncapsulate::get_local_name()const +{ + return get_layer_descriptions(layers, _("Encapsulate Layer"), _("Encapsulate Layers")); +} + Action::ParamVocab Action::LayerEncapsulate::get_param_vocab() { @@ -129,13 +138,13 @@ Action::LayerEncapsulate::prepare() return; if(layers.empty()) - throw Error("No layers to encapsulate"); + throw Error(_("No layers to encapsulate")); // First create the new canvas and layer if(!child_canvas) child_canvas=Canvas::create_inline(get_canvas()); - Layer::Handle new_layer(Layer::create("paste_canvas")); + Layer::Handle new_layer(Layer::create("PasteCanvas")); new_layer->set_param("canvas",child_canvas); @@ -154,7 +163,7 @@ Action::LayerEncapsulate::prepare() // Move the layer { - Action::Handle action(Action::create("layer_move")); + Action::Handle action(Action::create("LayerMove")); assert(action);