Added copyright lines for files I've edited this year.
[synfig.git] / synfig-studio / trunk / src / gtkmm / metadatatreestore.cpp
index 3f737ea..383cda1 100644 (file)
@@ -1,20 +1,22 @@
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
 /*!    \file metadatatreestore.cpp
 **     \brief Template File
 **
-**     $Id: metadatatreestore.cpp,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
+**     $Id$
 **
 **     \legal
-**     Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2008 Chris Moore
 **
-**     This software and associated documentation
-**     are CONFIDENTIAL and PROPRIETARY property of
-**     the above-mentioned copyright holder.
+**     This package is free software; you can redistribute it and/or
+**     modify it under the terms of the GNU General Public License as
+**     published by the Free Software Foundation; either version 2 of
+**     the License, or (at your option) any later version.
 **
-**     You may not copy, print, publish, or in any
-**     other way distribute this software without
-**     a prior written agreement with
-**     the copyright holder.
+**     This package is distributed in the hope that it will be useful,
+**     but WITHOUT ANY WARRANTY; without even the implied warranty of
+**     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+**     General Public License for more details.
 **     \endlegal
 */
 /* ========================================================================= */
@@ -29,7 +31,9 @@
 #endif
 
 #include "metadatatreestore.h"
-#include <sinfgapp/canvasinterface.h>
+#include <synfigapp/canvasinterface.h>
+
+#include "general.h"
 
 #endif
 
@@ -37,7 +41,7 @@
 
 using namespace std;
 using namespace etl;
-using namespace sinfg;
+using namespace synfig;
 using namespace studio;
 
 /* === M A C R O S ========================================================= */
@@ -55,30 +59,30 @@ static MetaDataTreeStore::Model& ModelHack()
        return *model;
 }
 
-MetaDataTreeStore::MetaDataTreeStore(etl::loose_handle<sinfgapp::CanvasInterface> canvas_interface_):
+MetaDataTreeStore::MetaDataTreeStore(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_):
        Gtk::TreeStore  (ModelHack()),
        canvas_interface_               (canvas_interface_)
 {
        // Connect the signal
        get_canvas()->signal_meta_data_changed().connect(sigc::mem_fun(*this,&MetaDataTreeStore::meta_data_changed));
-       
+
        rebuild();
 }
 
 MetaDataTreeStore::~MetaDataTreeStore()
 {
-       sinfg::info("MetaDataTreeStore::~MetaDataTreeStore(): Deleted");
-
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("MetaDataTreeStore::~MetaDataTreeStore(): Deleted");
 }
 
 Glib::RefPtr<MetaDataTreeStore>
-MetaDataTreeStore::create(etl::loose_handle<sinfgapp::CanvasInterface> canvas_interface_)
+MetaDataTreeStore::create(etl::loose_handle<synfigapp::CanvasInterface> canvas_interface_)
 {
        return Glib::RefPtr<MetaDataTreeStore>(new MetaDataTreeStore(canvas_interface_));
 }
 
 void
-MetaDataTreeStore::meta_data_changed(sinfg::String key)
+MetaDataTreeStore::meta_data_changed(synfig::String /*key*/)
 {
        rebuild();
 }
@@ -87,9 +91,9 @@ void
 MetaDataTreeStore::rebuild()
 {
        clear();
-       
+
        std::list<String> keys(get_canvas()->get_meta_data_keys());
-       
+
        for(;!keys.empty();keys.pop_front())
        {
                Gtk::TreeRow row(*append());
@@ -108,7 +112,7 @@ MetaDataTreeStore::get_value_vfunc (const Gtk::TreeModel::iterator& iter, int co
 
        if(column==model.data.index())
        {
-               sinfg::String key((Glib::ustring)(*iter)[model.key]);
+               synfig::String key((Glib::ustring)(*iter)[model.key]);
                g_value_init(value.gobj(),G_TYPE_STRING);
                g_value_set_string(value.gobj(),get_canvas()->get_meta_data(key).c_str());
                return;
@@ -137,10 +141,10 @@ MetaDataTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int colu
                Glib::Value<Glib::ustring> x;
                g_value_init(x.gobj(),model.data.type());
                g_value_copy(value.gobj(),x.gobj());
-               
-               sinfg::String key((Glib::ustring)(*iter)[model.key]);
-               sinfg::String new_data(x.get());
-               
+
+               synfig::String key((Glib::ustring)(*iter)[model.key]);
+               synfig::String new_data(x.get());
+
                get_canvas_interface()->set_meta_data(key,new_data);
        }
        else