From c11163f51e342cc35511ed559fd3c0ae5405f840 Mon Sep 17 00:00:00 2001 From: dooglus Date: Fri, 1 Feb 2008 22:53:21 +0000 Subject: [PATCH] Don't show log messages from each panel's destructor unless environment variable SYNFIG_DEBUG_DESTRUCTORS is set. git-svn-id: http://svn.voria.com/code@1548 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 3 ++- synfig-studio/trunk/src/gtkmm/cellrenderer_time.cpp | 3 ++- synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp | 3 ++- synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp | 3 ++- synfig-studio/trunk/src/gtkmm/dockdialog.cpp | 4 +++- synfig-studio/trunk/src/gtkmm/duckmatic.cpp | 7 ++++++- synfig-studio/trunk/src/gtkmm/historytreestore.cpp | 3 ++- synfig-studio/trunk/src/gtkmm/keyframetree.cpp | 3 ++- synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp | 3 ++- synfig-studio/trunk/src/gtkmm/layergrouptree.cpp | 3 ++- synfig-studio/trunk/src/gtkmm/layergrouptreestore.cpp | 4 +++- synfig-studio/trunk/src/gtkmm/layerparamtreestore.cpp | 4 +++- synfig-studio/trunk/src/gtkmm/layertree.cpp | 3 ++- synfig-studio/trunk/src/gtkmm/layertreestore.cpp | 3 ++- synfig-studio/trunk/src/gtkmm/metadatatreestore.cpp | 4 ++-- synfig-studio/trunk/src/synfigapp/canvasinterface.cpp | 3 ++- synfig-studio/trunk/src/synfigapp/instance.cpp | 6 ++++-- 17 files changed, 43 insertions(+), 19 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 39d58f3..e82422d 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -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"); } diff --git a/synfig-studio/trunk/src/gtkmm/cellrenderer_time.cpp b/synfig-studio/trunk/src/gtkmm/cellrenderer_time.cpp index cd94e4e..b267eb2 100644 --- a/synfig-studio/trunk/src/gtkmm/cellrenderer_time.cpp +++ b/synfig-studio/trunk/src/gtkmm/cellrenderer_time.cpp @@ -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 diff --git a/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp b/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp index c1759d9..f57b9a1 100644 --- a/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp +++ b/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp @@ -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 diff --git a/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp b/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp index fae690b..c8e3605 100644 --- a/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp +++ b/synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp @@ -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 diff --git a/synfig-studio/trunk/src/gtkmm/dockdialog.cpp b/synfig-studio/trunk/src/gtkmm/dockdialog.cpp index 78f6042..d5a1a82 100644 --- a/synfig-studio/trunk/src/gtkmm/dockdialog.cpp +++ b/synfig-studio/trunk/src/gtkmm/dockdialog.cpp @@ -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; diff --git a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp index f0d4f66..d6cc012 100644 --- a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp +++ b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp @@ -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 diff --git a/synfig-studio/trunk/src/gtkmm/historytreestore.cpp b/synfig-studio/trunk/src/gtkmm/historytreestore.cpp index b9573c8..da125ab 100644 --- a/synfig-studio/trunk/src/gtkmm/historytreestore.cpp +++ b/synfig-studio/trunk/src/gtkmm/historytreestore.cpp @@ -77,7 +77,8 @@ HistoryTreeStore::HistoryTreeStore(etl::loose_handle instance_ HistoryTreeStore::~HistoryTreeStore() { - synfig::info("HistoryTreeStore::~HistoryTreeStore(): Deleted"); + if (getenv("SYNFIG_DEBUG_DESTRUCTORS")) + synfig::info("HistoryTreeStore::~HistoryTreeStore(): Deleted"); } Glib::RefPtr diff --git a/synfig-studio/trunk/src/gtkmm/keyframetree.cpp b/synfig-studio/trunk/src/gtkmm/keyframetree.cpp index 101fa50..1a3cd06 100644 --- a/synfig-studio/trunk/src/gtkmm/keyframetree.cpp +++ b/synfig-studio/trunk/src/gtkmm/keyframetree.cpp @@ -131,7 +131,8 @@ KeyframeTree::KeyframeTree() KeyframeTree::~KeyframeTree() { - synfig::info("KeyframeTree::~KeyframeTree(): deleted"); + if (getenv("SYNFIG_DEBUG_DESTRUCTORS")) + synfig::info("KeyframeTree::~KeyframeTree(): Deleted"); } void diff --git a/synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp b/synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp index ddcd764..65ad2f4 100644 --- a/synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp +++ b/synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp @@ -212,7 +212,8 @@ KeyframeTreeStore::KeyframeTreeStore(etl::loose_handle diff --git a/synfig-studio/trunk/src/gtkmm/layergrouptree.cpp b/synfig-studio/trunk/src/gtkmm/layergrouptree.cpp index 824f48b..dd8dd8a 100644 --- a/synfig-studio/trunk/src/gtkmm/layergrouptree.cpp +++ b/synfig-studio/trunk/src/gtkmm/layergrouptree.cpp @@ -110,7 +110,8 @@ LayerGroupTree::LayerGroupTree() LayerGroupTree::~LayerGroupTree() { - synfig::info("LayerGroupTree::~LayerGroupTree(): deleted"); + if (getenv("SYNFIG_DEBUG_DESTRUCTORS")) + synfig::info("LayerGroupTree::~LayerGroupTree(): Deleted"); } void diff --git a/synfig-studio/trunk/src/gtkmm/layergrouptreestore.cpp b/synfig-studio/trunk/src/gtkmm/layergrouptreestore.cpp index f9750a5..ff0dd27 100644 --- a/synfig-studio/trunk/src/gtkmm/layergrouptreestore.cpp +++ b/synfig-studio/trunk/src/gtkmm/layergrouptreestore.cpp @@ -95,7 +95,9 @@ LayerGroupTreeStore::LayerGroupTreeStore(etl::loose_handle diff --git a/synfig-studio/trunk/src/gtkmm/layertree.cpp b/synfig-studio/trunk/src/gtkmm/layertree.cpp index bc78ace..eeb47f0 100644 --- a/synfig-studio/trunk/src/gtkmm/layertree.cpp +++ b/synfig-studio/trunk/src/gtkmm/layertree.cpp @@ -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* diff --git a/synfig-studio/trunk/src/gtkmm/layertreestore.cpp b/synfig-studio/trunk/src/gtkmm/layertreestore.cpp index cb8440d..74f41a3 100644 --- a/synfig-studio/trunk/src/gtkmm/layertreestore.cpp +++ b/synfig-studio/trunk/src/gtkmm/layertreestore.cpp @@ -97,7 +97,8 @@ LayerTreeStore::LayerTreeStore(etl::loose_handle can LayerTreeStore::~LayerTreeStore() { - synfig::info("LayerTreeStore::~LayerTreeStore(): Deleted"); + if (getenv("SYNFIG_DEBUG_DESTRUCTORS")) + synfig::info("LayerTreeStore::~LayerTreeStore(): Deleted"); } int diff --git a/synfig-studio/trunk/src/gtkmm/metadatatreestore.cpp b/synfig-studio/trunk/src/gtkmm/metadatatreestore.cpp index b253041..91e12a7 100644 --- a/synfig-studio/trunk/src/gtkmm/metadatatreestore.cpp +++ b/synfig-studio/trunk/src/gtkmm/metadatatreestore.cpp @@ -70,8 +70,8 @@ MetaDataTreeStore::MetaDataTreeStore(etl::loose_handle diff --git a/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp b/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp index aa228eb..f066b18 100644 --- a/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp +++ b/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp @@ -91,7 +91,8 @@ CanvasInterface::CanvasInterface(etl::loose_handle instance,etl::handl CanvasInterface::~CanvasInterface() { - synfig::info("synfigapp::CanvasInterface::~CanvasInterface(): Deleted"); + if (getenv("SYNFIG_DEBUG_DESTRUCTORS")) + synfig::info("CanvasInterface::~CanvasInterface(): Deleted"); } void diff --git a/synfig-studio/trunk/src/synfigapp/instance.cpp b/synfig-studio/trunk/src/synfigapp/instance.cpp index 8bdfc3d..5d143e9 100644 --- a/synfig-studio/trunk/src/synfigapp/instance.cpp +++ b/synfig-studio/trunk/src/synfigapp/instance.cpp @@ -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 Instance::find_canvas_interface(synfig::Canvas::Handle canvas) -- 2.7.4