/*! \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
**
-** 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
*/
/* ========================================================================= */
{
// Connect the signal
get_canvas()->signal_meta_data_changed().connect(sigc::mem_fun(*this,&MetaDataTreeStore::meta_data_changed));
-
+
rebuild();
}
}
void
-MetaDataTreeStore::meta_data_changed(synfig::String key)
+MetaDataTreeStore::meta_data_changed(synfig::String /*key*/)
{
rebuild();
}
MetaDataTreeStore::rebuild()
{
clear();
-
+
std::list<String> keys(get_canvas()->get_meta_data_keys());
-
+
for(;!keys.empty();keys.pop_front())
{
Gtk::TreeRow row(*append());
Glib::Value<Glib::ustring> 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