diff -r f9864a43ddf0 -r 93558d35d3fe doc/contributions.txt --- a/doc/contributions.txt Tue Jun 28 10:22:36 2011 -0400 +++ b/doc/contributions.txt Thu Jun 30 04:24:11 2011 -0400 @@ -103,6 +103,7 @@ Alexandrea Fride STORM-255 STORM-960 + STORM-1459 Alissa Sabre VWR-81 VWR-83 @@ -449,6 +450,7 @@ STORM-1313 STORM-899 STORM-1273 + STORM-1459 Kage Pixel VWR-11 Ken March @@ -690,6 +692,7 @@ STORM-1019 STORM-1095 STORM-1128 + STORM-1459 VWR-2488 VWR-9557 VWR-10579 diff -r f9864a43ddf0 -r 93558d35d3fe indra/newview/llpanelwearing.h --- a/indra/newview/llpanelwearing.h Tue Jun 28 10:22:36 2011 -0400 +++ b/indra/newview/llpanelwearing.h Thu Jun 30 04:24:11 2011 -0400 @@ -60,6 +60,8 @@ /*virtual*/ void getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const; + /*virtual*/ void copyToClipboard(); + boost::signals2::connection setSelectionChangeCallback(commit_callback_t cb); bool hasItemSelected(); diff -r f9864a43ddf0 -r 93558d35d3fe indra/newview/llpanelwearing.cpp --- a/indra/newview/llpanelwearing.cpp Tue Jun 28 10:22:36 2011 -0400 +++ b/indra/newview/llpanelwearing.cpp Thu Jun 30 04:24:11 2011 -0400 @@ -38,6 +38,8 @@ #include "llsidetray.h" #include "llviewermenu.h" #include "llwearableitemslist.h" +#include "llsdserialize.h" +#include "llclipboard.h" // Context menu and Gear menu helper. static void edit_outfit() @@ -58,6 +60,7 @@ registrar.add("Gear.Edit", boost::bind(&edit_outfit)); registrar.add("Gear.TakeOff", boost::bind(&LLWearingGearMenu::onTakeOff, this)); + registrar.add("Gear.Copy", boost::bind(&LLPanelWearing::copyToClipboard, mPanelWearing)); enable_registrar.add("Gear.OnEnable", boost::bind(&LLPanelWearing::isActionEnabled, mPanelWearing, _2)); @@ -280,4 +283,25 @@ mCOFItemsList->getSelectedUUIDs(selected_uuids); } +void LLPanelWearing::copyToClipboard() +{ + std::string text; + std::vector data; + mCOFItemsList->getValues(data); + + for(std::vector::const_iterator iter = data.begin(); iter != data.end();) + { + LLSD uuid = (*iter); + LLViewerInventoryItem* item = gInventory.getItem(uuid); + + iter++; + if (item != NULL) + { + // Append a newline to all but the last line + text += iter != data.end() ? item->getName() + "\n" : item->getName(); + } + } + + gClipboard.copyFromString(utf8str_to_wstring(text)); +} // EOF diff -r f9864a43ddf0 -r 93558d35d3fe indra/newview/skins/default/xui/en/menu_wearing_gear.xml --- a/indra/newview/skins/default/xui/en/menu_wearing_gear.xml Tue Jun 28 10:22:36 2011 -0400 +++ b/indra/newview/skins/default/xui/en/menu_wearing_gear.xml Thu Jun 30 04:24:11 2011 -0400 @@ -20,4 +20,11 @@ function="Gear.OnEnable" parameter="take_off" /> + + +