X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Fcanvasinterface.cpp;h=8bac47fe821dc018903dcd54386b8a3ff162d58e;hb=22d5c8135bb2f41dca8f3ccd55f6cd70a007c12b;hp=297b7f290438f840ef9ae1a642c22d0f0ba467c1;hpb=9eeed0ce9066de4b2e36885d5ec7b66ac8f14aa8;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp b/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp index 297b7f2..8bac47f 100644 --- a/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp +++ b/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp @@ -300,7 +300,7 @@ CanvasInterface::add_layer_to(synfig::String name, synfig::Canvas::Handle canvas // Action to move the layer (if necessary) if(depth>0) { - Action::Handle action(Action::create("layer_move")); + Action::Handle action(Action::create("LayerMove")); assert(action); if(!action) @@ -463,7 +463,7 @@ CanvasInterface::generate_param_list(const std::list &valu void CanvasInterface::set_rend_desc(const synfig::RendDesc &rend_desc) { - Action::Handle action(Action::create("canvas_rend_desc_set")); + Action::Handle action(Action::create("CanvasRendDescSet")); assert(action); if(!action) @@ -480,7 +480,7 @@ CanvasInterface::set_rend_desc(const synfig::RendDesc &rend_desc) void CanvasInterface::set_name(const synfig::String &x) { - Action::Handle action(Action::create("canvas_name_set")); + Action::Handle action(Action::create("CanvasNameSet")); assert(action); if(!action) @@ -499,7 +499,7 @@ CanvasInterface::set_name(const synfig::String &x) void CanvasInterface::set_description(const synfig::String &x) { - Action::Handle action(Action::create("canvas_description_set")); + Action::Handle action(Action::create("CanvasDescriptionSet")); assert(action); if(!action) @@ -516,7 +516,7 @@ CanvasInterface::set_description(const synfig::String &x) void CanvasInterface::set_id(const synfig::String &x) { - Action::Handle action(Action::create("canvas_id_set")); + Action::Handle action(Action::create("CanvasIdSet")); assert(action); if(!action) @@ -560,7 +560,7 @@ CanvasInterface::jump_to_prev_keyframe() } bool -CanvasInterface::import(const synfig::String &filename, bool resize_image) +CanvasInterface::import(const synfig::String &filename, synfig::String &errors, synfig::String &warnings, bool resize_image) { Action::PassiveGrouper group(get_instance().get(),_("Import Image")); @@ -579,7 +579,6 @@ CanvasInterface::import(const synfig::String &filename, bool resize_image) // If this is a SIF file, then we need to do things slightly differently if(ext=="sif" || ext=="sifz")try { - String errors, warnings; Canvas::Handle outside_canvas(synfig::open_canvas(filename, errors, warnings)); if(!outside_canvas) throw String(_("Unable to open this composition")) + ":\n\n" + errors; @@ -589,6 +588,7 @@ CanvasInterface::import(const synfig::String &filename, bool resize_image) throw String(_("Unable to create \"Paste Canvas\" layer")); if(!layer->set_param("canvas",ValueBase(outside_canvas))) throw int(); + get_canvas()->register_external_canvas(filename, outside_canvas); //layer->set_description(basename(filename)); signal_layer_new_description()(layer,filename); @@ -688,7 +688,7 @@ CanvasInterface::waypoint_duplicate(synfigapp::ValueDesc value_desc,synfig::Wayp void CanvasInterface::waypoint_duplicate(ValueNode::Handle value_node,synfig::Waypoint waypoint) { - Action::Handle action(Action::create("waypoint_set_smart")); + Action::Handle action(Action::create("WaypointSetSmart")); assert(action); if(!action) @@ -717,7 +717,7 @@ CanvasInterface::waypoint_remove(synfigapp::ValueDesc value_desc,synfig::Waypoin void CanvasInterface::waypoint_remove(ValueNode::Handle value_node,synfig::Waypoint waypoint) { - Action::Handle action(Action::create("waypoint_remove")); + Action::Handle action(Action::create("WaypointRemove")); assert(action); if(!action) @@ -741,7 +741,7 @@ CanvasInterface::auto_export(synfig::ValueNode::Handle /*value_node*/) if(value_node->is_exported()) return; - Action::Handle action(Action::create("value_node_add")); + Action::Handle action(Action::create("ValueNodeAdd")); assert(action); if(!action) @@ -768,7 +768,7 @@ CanvasInterface::auto_export(const ValueDesc& /*value_desc*/) if(value_desc.is_exported()) return; - Action::Handle action(Action::create("value_desc_export")); + Action::Handle action(Action::create("ValueDescExport")); assert(action); if(!action) @@ -815,7 +815,7 @@ CanvasInterface::change_value(synfigapp::ValueDesc value_desc,synfig::ValueBase { synfig::warning("Can't get canvas from value desc...?"); } #endif - synfigapp::Action::Handle action(synfigapp::Action::create("value_desc_set")); + synfigapp::Action::Handle action(synfigapp::Action::create("ValueDescSet")); if(!action) { return false;