Fix a bug introduced by r590. The name of the paste_canvas later (which was PasteCan...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 4 Sep 2007 22:01:16 +0000 (22:01 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 4 Sep 2007 22:01:16 +0000 (22:01 +0000)
git-svn-id: http://svn.voria.com/code@597 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/canvas.cpp
synfig-studio/trunk/src/gtkmm/canvasview.cpp
synfig-studio/trunk/src/gtkmm/iconcontroler.cpp
synfig-studio/trunk/src/gtkmm/layeractionmanager.cpp
synfig-studio/trunk/src/synfigapp/actions/layerencapsulate.cpp
synfig-studio/trunk/src/synfigapp/canvasinterface.cpp

index 355a738..6404b84 100644 (file)
@@ -1036,7 +1036,7 @@ synfig::optimize_layers(Context context, Canvas::Handle op_canvas)
                        continue;
 
                Layer_PasteCanvas* paste_canvas(static_cast<Layer_PasteCanvas*>(layer.get()));
-               if(layer->get_name()=="PasteCanvas" && paste_canvas->get_time_offset()==0)
+               if(layer->get_name()=="paste_canvas" && paste_canvas->get_time_offset()==0)
                {
                        Canvas::Handle sub_canvas(Canvas::create_inline(op_canvas));
                        Canvas::Handle paste_sub_canvas = paste_canvas->get_sub_canvas();
@@ -1076,7 +1076,7 @@ synfig::optimize_layers(Context context, Canvas::Handle op_canvas)
                                continue;
                        }catch(int) { }
 #endif
-                       Layer::Handle new_layer(Layer::create("PasteCanvas"));
+                       Layer::Handle new_layer(Layer::create("paste_canvas"));
                        dynamic_cast<Layer_PasteCanvas*>(new_layer.get())->set_muck_with_time(false);
                        Layer::ParamList param_list(paste_canvas->get_param_list());
                        //param_list.erase("canvas");
index 2301968..0ad6a31 100644 (file)
@@ -1718,7 +1718,7 @@ CanvasView::popup_layer_menu(synfig::Layer::Handle layer)
 
        //parammenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("New Layer"),*newlayers));
 
-       if(layer->get_name()=="PasteCanvas")
+       if(layer->get_name()=="paste_canvas")
        {
                menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Select All Children"),
                        sigc::bind(
@@ -2146,7 +2146,7 @@ CanvasView::on_layer_user_click(int button, Gtk::TreeRow row, LayerTree::ColumnI
                                build_new_layer_menu(*newlayers);
 
                                parammenu.items().push_back(Gtk::Menu_Helpers::MenuElem("New Layer",*newlayers));
-                               if(!multiple_selected && layer->get_name()=="PasteCanvas")
+                               if(!multiple_selected && layer->get_name()=="paste_canvas")
                                {
                                        parammenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Select All Children"),
                                                sigc::bind(
@@ -2626,7 +2626,7 @@ CanvasView::rebuild_ducks_layer_(synfig::TransformStack& transform_stack, Canvas
 
                // If this is a paste canvas layer, then we need to
                // descend into it
-               if(layer_name=="PasteCanvas")
+               if(layer_name=="paste_canvas")
                {
                        Vector scale;
                        scale[0]=scale[1]=exp(layer->get_param("zoom").get(Real()));
index 143d06c..41bdf4c 100644 (file)
@@ -150,7 +150,7 @@ IconControler::IconControler(const synfig::String& basepath)
        INIT_STOCK_ICON(saveall,"saveall_icon."IMAGE_EXT,_("Save All"));
        INIT_STOCK_ICON(bool,"bool_icon."IMAGE_EXT,_("Bool"));
        INIT_STOCK_ICON(layer,"layer_icon."IMAGE_EXT,_("Layer"));
-       INIT_STOCK_ICON(layer_pastecanvas,"pastecanvas_icon."IMAGE_EXT,_("PasteCanvas"));
+       INIT_STOCK_ICON(layer_pastecanvas,"pastecanvas_icon."IMAGE_EXT,_("Paste Canvas"));
        INIT_STOCK_ICON(group,"group_icon."IMAGE_EXT,_("Group"));
        INIT_STOCK_ICON(grid_enable,"grid_enable_icon."IMAGE_EXT,_("Show Grid"));
        INIT_STOCK_ICON(grid_disable,"grid_disable_icon."IMAGE_EXT,_("Hide Grid"));
@@ -355,7 +355,7 @@ studio::get_action_stock_id(const synfigapp::Action::BookEntry& action)
 Gtk::StockID
 studio::layer_icon(const synfig::String &layer)
 {
-       if(layer=="PasteCanvas" || layer=="pastecanvas")
+       if(layer=="PasteCanvas" || layer=="pastecanvas" || layer=="paste_canvas")
                return Gtk::StockID("synfig-layer_pastecanvas");
        else if(layer=="rotate")
                return Gtk::StockID("synfig-rotate");
index 80b91b9..d601b78 100644 (file)
@@ -280,7 +280,7 @@ LayerActionManager::refresh()
                                }
                        }
 
-                       if(!multiple_selected && layer->get_name()=="PasteCanvas")
+                       if(!multiple_selected && layer->get_name()=="paste_canvas")
                        {
                                action_group_->add(Gtk::Action::create(
                                        "select-all-child-layers",
index 7860f6c..cf799ce 100644 (file)
@@ -135,7 +135,7 @@ Action::LayerEncapsulate::prepare()
        if(!child_canvas)
                child_canvas=Canvas::create_inline(get_canvas());
 
-       Layer::Handle new_layer(Layer::create("PasteCanvas"));
+       Layer::Handle new_layer(Layer::create("paste_canvas"));
 
        new_layer->set_param("canvas",child_canvas);
 
index 2b92275..45882a9 100644 (file)
@@ -487,9 +487,9 @@ CanvasInterface::import(const synfig::String &filename, bool copy)
                if(!outside_canvas)
                        throw String(_("Unable to open this composition"));
 
-               Layer::Handle layer(add_layer_to("PasteCanvas",get_canvas()));
+               Layer::Handle layer(add_layer_to("paste_canvas",get_canvas()));
                if(!layer)
-                       throw String(_("Unable to create \"PasteCanvas\" layer"));
+                       throw String(_("Unable to create \"Paste Canvas\" layer"));
                if(!layer->set_param("canvas",ValueBase(outside_canvas)))
                        throw int();