X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fmetadatatreestore.cpp;h=383cda1d01cb5dba5254258997c7988aa11569cc;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=6f46e48edfc093200f0beb6fd9e5d2e8a287a255;hpb=02252941b29de64037116f4d37991a38d9ff0d94;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/metadatatreestore.cpp b/synfig-studio/trunk/src/gtkmm/metadatatreestore.cpp index 6f46e48..383cda1 100644 --- a/synfig-studio/trunk/src/gtkmm/metadatatreestore.cpp +++ b/synfig-studio/trunk/src/gtkmm/metadatatreestore.cpp @@ -2,19 +2,21 @@ /*! \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 */ /* ========================================================================= */ @@ -31,6 +33,8 @@ #include "metadatatreestore.h" #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -61,14 +65,14 @@ MetaDataTreeStore::MetaDataTreeStore(etl::loose_handlesignal_meta_data_changed().connect(sigc::mem_fun(*this,&MetaDataTreeStore::meta_data_changed)); - + rebuild(); } MetaDataTreeStore::~MetaDataTreeStore() { - synfig::info("MetaDataTreeStore::~MetaDataTreeStore(): Deleted"); - + if (getenv("SYNFIG_DEBUG_DESTRUCTORS")) + synfig::info("MetaDataTreeStore::~MetaDataTreeStore(): Deleted"); } Glib::RefPtr @@ -78,7 +82,7 @@ MetaDataTreeStore::create(etl::loose_handle canvas_i } void -MetaDataTreeStore::meta_data_changed(synfig::String key) +MetaDataTreeStore::meta_data_changed(synfig::String /*key*/) { rebuild(); } @@ -87,9 +91,9 @@ void MetaDataTreeStore::rebuild() { clear(); - + std::list keys(get_canvas()->get_meta_data_keys()); - + for(;!keys.empty();keys.pop_front()) { Gtk::TreeRow row(*append()); @@ -137,10 +141,10 @@ MetaDataTreeStore::set_value_impl(const Gtk::TreeModel::iterator& iter, int colu Glib::Value x; g_value_init(x.gobj(),model.data.type()); g_value_copy(value.gobj(),x.gobj()); - + synfig::String key((Glib::ustring)(*iter)[model.key]); synfig::String new_data(x.get()); - + get_canvas_interface()->set_meta_data(key,new_data); } else