X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Factions%2Fvaluedesclink.cpp;h=84effe4fc9fc96ff144e81072827e35b659bb0b1;hb=fcf1f2a99d715f39ca71469145d286d74a8af159;hp=6ba086e039bc1a95873ff0f56ed1c25fab529223;hpb=8ef042c40521681cea99944097c4f90a5ac6cf74;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/actions/valuedesclink.cpp b/synfig-studio/trunk/src/synfigapp/actions/valuedesclink.cpp index 6ba086e..84effe4 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/valuedesclink.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/valuedesclink.cpp @@ -6,7 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore +** Copyright (c) 2007, 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -206,9 +206,9 @@ Action::ValueDescLink::set_param(const synfig::String& name, const Action::Param { // Everything must be of the same type poison=true; - status_message = (_("Cannot link two values of different types ('") + - value_desc.get_value().type_name() + _("' and '") + - value_desc_list.front().get_value().type_name() +_("')")); + status_message = (strprintf(_("Cannot link two values of different types ('%s' and '%s')"), + ValueBase::type_local_name(value_desc.get_value_type()).c_str(), + ValueBase::type_local_name(value_desc_list.front().get_value_type()).c_str())); return false; } @@ -244,7 +244,7 @@ Action::ValueDescLink::prepare() if(!link_value_node) { status_message = _("No ValueNodes were available, so one was created."); - ValueDesc& value_desc(value_desc_list.front()); + ValueDesc& value_desc(value_desc_list.back()); link_value_node=ValueNode_Const::create(value_desc.get_value(time)); @@ -285,6 +285,11 @@ Action::ValueDescLink::prepare() { ValueDesc& value_desc(*iter); + // only one of the selected items can be exported - that's the one we're linking to + // don't link it to itself + if (value_desc.is_exported()) + continue; + Action::Handle action(Action::create("value_desc_connect")); action->set_param("canvas",get_canvas()); @@ -299,5 +304,5 @@ Action::ValueDescLink::prepare() add_action_front(action); } - synfig::info(status_message); + synfig::info("http://synfig.org/Linking#Tier_%d : %s", status_level, status_message.c_str()); }