Remove .gitignore do nothing is ignored.
[synfig.git] / synfig-studio / trunk / src / synfigapp / instance.cpp
index 6c048b2..c3c542b 100644 (file)
@@ -6,7 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-**     Copyright (c) 2007 Chris Moore
+**     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
 #include <synfig/valuenode_composite.h>
 #include <synfig/valuenode_radialcomposite.h>
 #include <synfig/valuenode_reference.h>
+#include <synfig/valuenode_greyed.h>
+#include <synfig/valuenode_blinecalctangent.h>
+#include <synfig/valuenode_blinecalcvertex.h>
+#include <synfig/valuenode_blinecalcwidth.h>
+#include <synfig/valuenode_scale.h>
 #include <map>
 
 #include "general.h"
@@ -66,7 +71,11 @@ synfigapp::is_editable(synfig::ValueNode::Handle value_node)
                || ValueNode_Animated::Handle::cast_dynamic(value_node)
                || ValueNode_Composite::Handle::cast_dynamic(value_node)
                || ValueNode_RadialComposite::Handle::cast_dynamic(value_node)
-               || ValueNode_Reference::Handle::cast_dynamic(value_node)
+               ||(ValueNode_Reference::Handle::cast_dynamic(value_node) && !ValueNode_Greyed::Handle::cast_dynamic(value_node))
+               || ValueNode_BLineCalcVertex::Handle::cast_dynamic(value_node)
+               || ValueNode_BLineCalcTangent::Handle::cast_dynamic(value_node)
+               || ValueNode_BLineCalcWidth::Handle::cast_dynamic(value_node)
+               || ValueNode_Scale::Handle::cast_dynamic(value_node)
        )
                return true;
        return false;
@@ -82,7 +91,7 @@ synfigapp::find_instance(etl::handle<synfig::Canvas> canvas)
 
 /* === M E T H O D S ======================================================= */
 
-Instance::Instance(Canvas::Handle canvas):
+Instance::Instance(etl::handle<synfig::Canvas> canvas):
        CVSInfo(canvas->get_file_name()),
        canvas_(canvas)
 {
@@ -94,7 +103,7 @@ Instance::Instance(Canvas::Handle canvas):
 } // END of synfigapp::Instance::Instance()
 
 handle<Instance>
-Instance::create(Canvas::Handle canvas)
+Instance::create(etl::handle<synfig::Canvas> canvas)
 {
        // Construct a new instance
        handle<Instance> instance(new Instance(canvas));
@@ -118,11 +127,13 @@ Instance::set_file_name(const synfig::String &name)
 Instance::~Instance()
 {
        instance_map_.erase(canvas_);
-       synfig::info("studio::Instance::~Instance(): Deleted");
-} // END of studio::Instance::~Instance()
+
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("Instance::~Instance(): Deleted");
+}
 
 handle<CanvasInterface>
-Instance::find_canvas_interface(handle<Canvas> canvas)
+Instance::find_canvas_interface(synfig::Canvas::Handle canvas)
 {
        if(!canvas)
                return 0;
@@ -151,7 +162,7 @@ Instance::save()const
 }
 
 bool
-Instance::save_as(const std::string &file_name)
+Instance::save_as(const synfig::String &file_name)
 {
        bool ret;