Fix bugs in previous commit that caused FTBFS in synfig and ETL FTBFS with older...
[synfig.git] / synfig-studio / tags / stable / src / gtkmm / valuelink.cpp
index c4e64b4..910bc3a 100644 (file)
@@ -1,20 +1,21 @@
-/* === S I N F G =========================================================== */
+/* === S Y N F I G ========================================================= */
 /*!    \file valuelink.cpp
 **     \brief ValueBase Link Implementation File
 **
-**     $Id: valuelink.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $
+**     $Id$
 **
 **     \legal
 **     Copyright (c) 2004 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
 */
 /* ========================================================================= */
 
 #include "valuelink.h"
 
+#include "general.h"
+
 #endif
 
 /* === U S I N G =========================================================== */
 
 using namespace std;
 using namespace etl;
-using namespace sinfg;
+using namespace synfig;
 
 using studio::ValueBaseLink;
 
@@ -64,12 +67,12 @@ ValueBaseLink::~ValueBaseLink()
 ValueNode::LooseHandle ValueBaseLink::get_link_vfunc(int i)const
 {
        /*list_type::const_iterator     it = list.begin();
-       
+
        while(it != list.end() && i-- > 0)
        {
                ++it;
        }
-       
+
        if(it == list.end())
        {
                return ValueNode::LooseHandle();
@@ -98,7 +101,7 @@ String ValueBaseLink::link_local_name(int i)const
 
        if(h)
        {
-               return h->get_local_name();             
+               return h->get_local_name();
        }else return String();
 }
 
@@ -112,13 +115,13 @@ String ValueBaseLink::link_name(int i)const
        }else return String();
 }
 
-int ValueBaseLink::get_link_index_from_name(const String &name)const
+int ValueBaseLink::get_link_index_from_name(const synfig::String &name)const
 {
        throw Exception::BadLinkName(name);
 }
 
 //list management stuff
-ValueBaseLink::list_type::const_iterator ValueBaseLink::findlink(ValueNode::Handle x) const
+ValueBaseLink::list_type::const_iterator ValueBaseLink::findlink(synfig::ValueNode::Handle x) const
 {
        for(list_type::const_iterator i = list.begin(); i != list.end(); ++i)
        {
@@ -127,10 +130,10 @@ ValueBaseLink::list_type::const_iterator ValueBaseLink::findlink(ValueNode::Hand
                        return i;
                }
        }
-       
+
        return list.end();
 }
-ValueBaseLink::list_type::iterator ValueBaseLink::findlink(ValueNode::Handle x)
+ValueBaseLink::list_type::iterator ValueBaseLink::findlink(synfig::ValueNode::Handle x)
 {
        for(list_type::iterator i = list.begin(); i != list.end(); ++i)
        {
@@ -139,24 +142,24 @@ ValueBaseLink::list_type::iterator ValueBaseLink::findlink(ValueNode::Handle x)
                        return i;
                }
        }
-       
+
        return list.end();
 }
 
-void ValueBaseLink::add(ValueNode::Handle v)
+void ValueBaseLink::add(synfig::ValueNode::Handle v)
 {
        list_type::iterator i = findlink(v);
-       
+
        if(i != list.end())
        {
                list.push_back(v);
        }
 }
 
-void ValueBaseLink::remove(ValueNode::Handle v)
+void ValueBaseLink::remove(synfig::ValueNode::Handle v)
 {
        list_type::iterator i = findlink(v);
-       
+
        if(i != list.end())
        {
                if(i != list.end()-1)
@@ -164,5 +167,5 @@ void ValueBaseLink::remove(ValueNode::Handle v)
                        *i = list.back();
                }
                list.pop_back();
-       }       
+       }
 }