Don't show log messages from each panel's destructor unless environment variable...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 1 Feb 2008 22:53:21 +0000 (22:53 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 1 Feb 2008 22:53:21 +0000 (22:53 +0000)
git-svn-id: http://svn.voria.com/code@1548 1f10aa63-cdf2-0310-b900-c93c546f37ac

17 files changed:
synfig-studio/trunk/src/gtkmm/canvasview.cpp
synfig-studio/trunk/src/gtkmm/cellrenderer_time.cpp
synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp
synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp
synfig-studio/trunk/src/gtkmm/dockdialog.cpp
synfig-studio/trunk/src/gtkmm/duckmatic.cpp
synfig-studio/trunk/src/gtkmm/historytreestore.cpp
synfig-studio/trunk/src/gtkmm/keyframetree.cpp
synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp
synfig-studio/trunk/src/gtkmm/layergrouptree.cpp
synfig-studio/trunk/src/gtkmm/layergrouptreestore.cpp
synfig-studio/trunk/src/gtkmm/layerparamtreestore.cpp
synfig-studio/trunk/src/gtkmm/layertree.cpp
synfig-studio/trunk/src/gtkmm/layertreestore.cpp
synfig-studio/trunk/src/gtkmm/metadatatreestore.cpp
synfig-studio/trunk/src/synfigapp/canvasinterface.cpp
synfig-studio/trunk/src/synfigapp/instance.cpp

index 39d58f3..e82422d 100644 (file)
@@ -912,7 +912,8 @@ CanvasView::~CanvasView()
        // this was causing a crash before
        canvas_interface()->signal_dirty_preview().clear();
 
-       synfig::info("CanvasView:~CanvasView(): Destructor Finished");
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("CanvasView::~CanvasView(): Deleted");
 }
 
 
index cd94e4e..b267eb2 100644 (file)
@@ -65,7 +65,8 @@ CellRenderer_Time::CellRenderer_Time():
 
 CellRenderer_Time::~CellRenderer_Time()
 {
-       synfig::info("CellRenderer_Time::~CellRenderer_Time(): deleted");
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("CellRenderer_Time::~CellRenderer_Time(): Deleted");
 }
 
 void
index c1759d9..f57b9a1 100644 (file)
@@ -92,7 +92,8 @@ CellRenderer_TimeTrack::CellRenderer_TimeTrack():
 
 CellRenderer_TimeTrack::~CellRenderer_TimeTrack()
 {
-       synfig::info("CellRenderer_TimeTrack::~CellRenderer_TimeTrack(): deleted");
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("CellRenderer_TimeTrack::~CellRenderer_TimeTrack(): Deleted");
 }
 
 void
index fae690b..c8e3605 100644 (file)
@@ -285,7 +285,8 @@ CellRenderer_ValueBase::CellRenderer_ValueBase():
 
 CellRenderer_ValueBase::~CellRenderer_ValueBase()
 {
-//     synfig::info("CellRenderer_ValueBase::~CellRenderer_ValueBase(): deleted");
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("CellRenderer_ValueBase::~CellRenderer_ValueBase(): Deleted");
 }
 
 void
index 78f6042..d5a1a82 100644 (file)
@@ -444,7 +444,9 @@ DockDialog::refresh_accel_group()
 bool
 DockDialog::close()
 {
-       synfig::info("DockDialog::close(): DELETED!");
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("DockDialog::close(): Deleted");
+
        empty_sig.disconnect();
        //get_dock_book().clear();
        delete this;
index f0d4f66..d6cc012 100644 (file)
@@ -99,7 +99,12 @@ Duckmatic::Duckmatic():
 Duckmatic::~Duckmatic()
 {
        clear_ducks();
-       //synfig::info("Duckmatic::~Duckmatic(): Deleted. Duck Count=%d",Duck::duck_count);
+
+       if (Duck::duck_count)
+               synfig::error("%d ducks not yet deleted!", Duck::duck_count);
+
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("Duckmatic::~Duckmatic(): Deleted");
 }
 
 void
index b9573c8..da125ab 100644 (file)
@@ -77,7 +77,8 @@ HistoryTreeStore::HistoryTreeStore(etl::loose_handle<studio::Instance> instance_
 
 HistoryTreeStore::~HistoryTreeStore()
 {
-       synfig::info("HistoryTreeStore::~HistoryTreeStore(): Deleted");
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("HistoryTreeStore::~HistoryTreeStore(): Deleted");
 }
 
 Glib::RefPtr<HistoryTreeStore>
index 101fa50..1a3cd06 100644 (file)
@@ -131,7 +131,8 @@ KeyframeTree::KeyframeTree()
 
 KeyframeTree::~KeyframeTree()
 {
-       synfig::info("KeyframeTree::~KeyframeTree(): deleted");
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("KeyframeTree::~KeyframeTree(): Deleted");
 }
 
 void
index ddcd764..65ad2f4 100644 (file)
@@ -212,7 +212,8 @@ KeyframeTreeStore::KeyframeTreeStore(etl::loose_handle<synfigapp::CanvasInterfac
 
 KeyframeTreeStore::~KeyframeTreeStore()
 {
-       synfig::info("KeyframeTreeStore::~KeyframeTreeStore(): Deleted");
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("KeyframeTreeStore::~KeyframeTreeStore(): Deleted");
 }
 
 Glib::RefPtr<KeyframeTreeStore>
index 824f48b..dd8dd8a 100644 (file)
@@ -110,7 +110,8 @@ LayerGroupTree::LayerGroupTree()
 
 LayerGroupTree::~LayerGroupTree()
 {
-       synfig::info("LayerGroupTree::~LayerGroupTree(): deleted");
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("LayerGroupTree::~LayerGroupTree(): Deleted");
 }
 
 void
index f9750a5..ff0dd27 100644 (file)
@@ -95,7 +95,9 @@ LayerGroupTreeStore::LayerGroupTreeStore(etl::loose_handle<synfigapp::CanvasInte
 LayerGroupTreeStore::~LayerGroupTreeStore()
 {
        //clear();
-       synfig::info("LayerGroupTreeStore::~LayerGroupTreeStore(): Deleted");
+
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("LayerGroupTreeStore::~LayerGroupTreeStore(): Deleted");
 }
 
 bool
index 4f5278f..7c73f2d 100644 (file)
@@ -104,7 +104,9 @@ LayerParamTreeStore::~LayerParamTreeStore()
                changed_connection_list.back().disconnect();
                changed_connection_list.pop_back();
        }
-       synfig::info("LayerParamTreeStore::~LayerParamTreeStore(): Deleted");
+
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("LayerParamTreeStore::~LayerParamTreeStore(): Deleted");
 }
 
 Glib::RefPtr<LayerParamTreeStore>
index bc78ace..eeb47f0 100644 (file)
@@ -167,7 +167,8 @@ LayerTree::LayerTree():
 
 LayerTree::~LayerTree()
 {
-       synfig::info("LayerTree::~LayerTree(): Deleted");
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("LayerTree::~LayerTree(): Deleted");
 }
 
 Gtk::Widget*
index cb8440d..74f41a3 100644 (file)
@@ -97,7 +97,8 @@ LayerTreeStore::LayerTreeStore(etl::loose_handle<synfigapp::CanvasInterface> can
 
 LayerTreeStore::~LayerTreeStore()
 {
-       synfig::info("LayerTreeStore::~LayerTreeStore(): Deleted");
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("LayerTreeStore::~LayerTreeStore(): Deleted");
 }
 
 int
index b253041..91e12a7 100644 (file)
@@ -70,8 +70,8 @@ MetaDataTreeStore::MetaDataTreeStore(etl::loose_handle<synfigapp::CanvasInterfac
 
 MetaDataTreeStore::~MetaDataTreeStore()
 {
-       synfig::info("MetaDataTreeStore::~MetaDataTreeStore(): Deleted");
-
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("MetaDataTreeStore::~MetaDataTreeStore(): Deleted");
 }
 
 Glib::RefPtr<MetaDataTreeStore>
index aa228eb..f066b18 100644 (file)
@@ -91,7 +91,8 @@ CanvasInterface::CanvasInterface(etl::loose_handle<Instance> instance,etl::handl
 
 CanvasInterface::~CanvasInterface()
 {
-       synfig::info("synfigapp::CanvasInterface::~CanvasInterface(): Deleted");
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("CanvasInterface::~CanvasInterface(): Deleted");
 }
 
 void
index 8bdfc3d..5d143e9 100644 (file)
@@ -118,8 +118,10 @@ 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(synfig::Canvas::Handle canvas)