X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftags%2Fstable%2Fsrc%2Fsynfigapp%2Factions%2Flayermove.cpp;h=f72afa4a0f6963794cd5df6e383a71136f27fe40;hb=47fce282611fbba1044921d22ca887f9b53ad91a;hp=b3399b416b2c4142c0104acfd8b34b368bee33ba;hpb=f6184c2a9c2245aae802c31c8f3300e1b744359c;p=synfig.git diff --git a/synfig-studio/tags/stable/src/synfigapp/actions/layermove.cpp b/synfig-studio/tags/stable/src/synfigapp/actions/layermove.cpp index b3399b4..f72afa4 100644 --- a/synfig-studio/tags/stable/src/synfigapp/actions/layermove.cpp +++ b/synfig-studio/tags/stable/src/synfigapp/actions/layermove.cpp @@ -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 "layermove.h" #include +#include + #endif using namespace std; @@ -42,9 +45,9 @@ using namespace Action; /* === M A C R O S ========================================================= */ -ACTION_INIT(Action::LayerMove); +ACTION_INIT_NO_GET_LOCAL_NAME(Action::LayerMove); ACTION_SET_NAME(Action::LayerMove,"layer_move"); -ACTION_SET_LOCAL_NAME(Action::LayerMove,_("Move Layer")); +ACTION_SET_LOCAL_NAME(Action::LayerMove,N_("Move Layer")); ACTION_SET_TASK(Action::LayerMove,"move"); ACTION_SET_CATEGORY(Action::LayerMove,Action::CATEGORY_LAYER); ACTION_SET_PRIORITY(Action::LayerMove,0); @@ -64,6 +67,15 @@ Action::LayerMove::LayerMove(): { } +synfig::String +Action::LayerMove::get_local_name()const +{ + if (layer) + return strprintf("%s '%s'", _("Move Layer"), layer->get_non_empty_description().c_str()); + else + return _("Move Layer"); +} + Action::ParamVocab Action::LayerMove::get_param_vocab() { @@ -125,7 +137,7 @@ Action::LayerMove::set_param(const synfig::String& name, const Action::Param &pa bool Action::LayerMove::is_ready()const { - synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); + // synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); if(!layer || (unsigned)new_index==0xdeadbeef) return false; return Action::CanvasSpecific::is_ready(); @@ -134,7 +146,7 @@ Action::LayerMove::is_ready()const void Action::LayerMove::perform() { - synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); + // synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); Canvas::Handle subcanvas(layer->get_canvas()); src_canvas=subcanvas; @@ -148,7 +160,7 @@ Action::LayerMove::perform() if(*iter!=layer) throw Error(_("This layer doesn't exist anymore.")); - synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); + // synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); // If the subcanvas isn't the same as the canvas, // then it had better be an inline canvas. If not, @@ -167,7 +179,7 @@ Action::LayerMove::perform() set_dirty(layer->active()); - synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); + // synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); // If we were to move it to where it is if(old_index==depth && src_canvas==dest_canvas) @@ -186,7 +198,7 @@ Action::LayerMove::perform() layer->changed(); dest_canvas->changed(); if(dest_canvas!=src_canvas) src_canvas->changed(); - synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); + // synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); if(get_canvas_interface()) { @@ -208,7 +220,7 @@ Action::LayerMove::perform() } else synfig::warning("CanvasInterface not set on action"); - synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); + // synfig::info(__FILE__":%d: layer->count()=%d",__LINE__,layer.count()); } void