// Checked: 2010-12-08 (RLVa-1.2.2c) | Modified: RLVa-1.2.2c void RlvUtil::filterNames(std::string& strUTF8Text, bool fFilterLegacy) { std::vector<LLUUID> idAgents; LLWorld::getInstance()->getAvatars(&idAgents, NULL); for (int idxAgent = 0, cntAgent = idAgents.size(); idxAgent < cntAgent; idxAgent++) { LLAvatarName avName; if (LLAvatarNameCache::get(idAgents[idxAgent], &avName)) { const std::string& strAnonym = RlvStrings::getAnonym(avName.mDisplayName); // NOTE: if the legacy first and last name are empty we get a legacy name of " " which would replace all spaces in the string std::string strLegacyName; if ( (fFilterLegacy) && (!avName.mIsDisplayNameDefault) && (!avName.mLegacyFirstName.empty()) ) strLegacyName = avName.getLegacyName(); // If the display name is a subset of the legacy name we need to filter that first, otherwise it's the other way around if (std::string::npos != strLegacyName.find(avName.mDisplayName)) { if (!strLegacyName.empty()) rlvStringReplace(strUTF8Text, strLegacyName, strAnonym); rlvStringReplace(strUTF8Text, avName.mDisplayName, strAnonym); } else { rlvStringReplace(strUTF8Text, avName.mDisplayName, strAnonym); if (!strLegacyName.empty()) rlvStringReplace(strUTF8Text, strLegacyName, strAnonym); } } } }
// Checked: 2010-12-08 (RLVa-1.2.2c) | Modified: RLVa-1.2.2c void RlvUtil::filterNames(std::string& strUTF8Text, bool fFilterLegacy) { uuid_vec_t idAgents; LLWorld::getInstance()->getAvatars(&idAgents, NULL); for (int idxAgent = 0, cntAgent = idAgents.size(); idxAgent < cntAgent; idxAgent++) { LLAvatarName avName; if (LLAvatarNameCache::get(idAgents[idxAgent], &avName)) { const std::string& strDisplayName = escape_for_regex(avName.getDisplayName()); bool fFilterDisplay = (strDisplayName.length() > 2); const std::string& strLegacyName = avName.getLegacyName(); fFilterLegacy &= (strLegacyName.length() > 2); const std::string& strAnonym = RlvStrings::getAnonym(avName); // If the display name is a subset of the legacy name we need to filter that first, otherwise it's the other way around if (boost::icontains(strLegacyName, strDisplayName)) { if (fFilterLegacy) boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + strLegacyName + "\\b", boost::regex::icase), strAnonym); if (fFilterDisplay) boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + strDisplayName + "\\b", boost::regex::icase), strAnonym); } else { if (fFilterDisplay) boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + strDisplayName + "\\b", boost::regex::icase), strAnonym); if (fFilterLegacy) boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + strLegacyName + "\\b", boost::regex::icase), strAnonym); } } } }
static void on_avatar_name_cache_notify(const LLUUID& agent_id, const LLAvatarName& av_name, bool online, LLSD payload) { // Popup a notify box with online status of this agent // Use display name only because this user is your friend LLSD args; switch (gSavedSettings.getS32("PhoenixNameSystem")) { case 0 : args["NAME"] = av_name.getLegacyName(); break; case 1 : args["NAME"] = (av_name.mIsDisplayNameDefault ? av_name.mDisplayName : av_name.getCompleteName()); break; case 2 : args["NAME"] = av_name.mDisplayName; break; default : args["NAME"] = av_name.getCompleteName(); break; } // Popup a notify box with online status of this agent LLNotificationPtr notification = LLNotificationsUtil::add(online ? "FriendOnline" : "FriendOffline", args, payload); // If there's an open IM session with this agent, send a notification there too. LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id); LLFloaterIMPanel *floater = gIMMgr->findFloaterBySession(session_id); if (floater) { std::string notifyMsg = notification->getMessage(); if (!notifyMsg.empty()) floater->addHistoryLine(notifyMsg,gSavedSettings.getColor4("SystemChatColor")); } }
// Checked: 2010-12-08 (RLVa-1.2.2c) | Modified: RLVa-1.2.2c void RlvUtil::filterNames(std::string& strUTF8Text, bool fFilterLegacy) { uuid_vec_t idAgents; LLWorld::getInstance()->getAvatars(&idAgents, NULL); for (int idxAgent = 0, cntAgent = idAgents.size(); idxAgent < cntAgent; idxAgent++) { LLAvatarName avName; if (LLAvatarNameCache::get(idAgents[idxAgent], &avName)) { const std::string& strAnonym = RlvStrings::getAnonym(avName.mDisplayName); // NOTE: if the legacy first and last name are empty we get a legacy name of " " which would replace all spaces in the string std::string strLegacyName; if ( (fFilterLegacy) && (!avName.mLegacyFirstName.empty()) && ((!avName.mIsDisplayNameDefault) || (LLCacheName::getDefaultLastName() == avName.mLegacyLastName)) ) { strLegacyName = avName.getLegacyName(); } // If the display name is a subset of the legacy name we need to filter that first, otherwise it's the other way around if (boost::icontains(strLegacyName, avName.mDisplayName)) { if (!strLegacyName.empty()) boost::ireplace_all(strUTF8Text, strLegacyName, strAnonym); boost::ireplace_all(strUTF8Text, avName.mDisplayName, strAnonym); } else { boost::ireplace_all(strUTF8Text, avName.mDisplayName, strAnonym); if (!strLegacyName.empty()) boost::ireplace_all(strUTF8Text, strLegacyName, strAnonym); } } } }
void LLInspectAvatar::onAvatarNameCache( const LLUUID& agent_id, const LLAvatarName& av_name) { mAvatarNameCacheConnection.disconnect(); if (agent_id == mAvatarID) { getChild<LLUICtrl>("user_name")->setValue(av_name.getDisplayName()); getChild<LLUICtrl>("user_name_small")->setValue(av_name.getDisplayName()); getChild<LLUICtrl>("user_slid")->setValue(av_name.getUserName()); mAvatarName = av_name; // show smaller display name if too long to display in regular size if (getChild<LLTextBox>("user_name")->getTextPixelWidth() > getChild<LLTextBox>("user_name")->getRect().getWidth()) { getChild<LLUICtrl>("user_name_small")->setVisible( true ); getChild<LLUICtrl>("user_name")->setVisible( false ); } else { getChild<LLUICtrl>("user_name_small")->setVisible( false ); getChild<LLUICtrl>("user_name")->setVisible( true ); } } }
//static // [Ansariel/Henri: Display name support] void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const LLAvatarName& avatar_name, void* user_data) // [/Ansariel/Henri: Display name support] { LLSpeaker* speaker_ptr = ((LLHandle<LLSpeaker>*)user_data)->get(); delete (LLHandle<LLSpeaker>*)user_data; if (speaker_ptr) { // [Ansariel/Henri: Display name support] static S32* sPhoenixNameSystem = rebind_llcontrol<S32>("PhoenixNameSystem", &gSavedSettings, true); switch (*sPhoenixNameSystem) { case 0 : speaker_ptr->mDisplayName = avatar_name.getLegacyName(); break; case 1 : speaker_ptr->mDisplayName = (avatar_name.mIsDisplayNameDefault ? avatar_name.mDisplayName : avatar_name.getCompleteName()); break; case 2 : speaker_ptr->mDisplayName = avatar_name.mDisplayName; break; default : speaker_ptr->mDisplayName = avatar_name.getLegacyName(); break; } // Also set the legacy name. We will need it to initiate a new // IM session. speaker_ptr->mLegacyName = avatar_name.getLegacyName(); // [/Ansariel/Henri: Display name support] // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-1.0.0g // TODO-RLVa: this seems to get called per frame which is very likely an LL bug that will eventuall get fixed if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) speaker_ptr->mDisplayName = RlvStrings::getAnonym(speaker_ptr->mDisplayName); // [/RLVa:KB] } }
void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, std::string suffix, LLHandle<LLNameListItem> item) { avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(agent_id); if (it != mAvatarNameCacheConnections.end()) { if (it->second.connected()) { it->second.disconnect(); } mAvatarNameCacheConnections.erase(it); } std::string name; if (mShortNames) name = av_name.getDisplayName(); else name = av_name.getCompleteName(); // Append optional suffix. if (!suffix.empty()) { name.append(suffix); } LLNameListItem* list_item = item.get(); if (list_item && list_item->getUUID() == agent_id) { LLScrollListCell* cell = list_item->getColumn(mNameColumnIndex); if (cell) { cell->setValue(name); setNeedsSort(); } } ////////////////////////////////////////////////////////////////////////// // BAKER - FIX NameListCtrl //if (mPendingLookupsRemaining <= 0) { // We might get into a state where mPendingLookupsRemaining might // go negative. So just reset it right now and figure out if it's // possible later :) //mPendingLookupsRemaining = 0; mNameListCompleteSignal(true); } //else { // mPendingLookupsRemaining--; } ////////////////////////////////////////////////////////////////////////// dirtyColumns(); }
void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name) { if (mObjectID == avatar_id) { mOwnerName = av_name.getCompleteName(); getChild<LLUICtrl>("object_name")->setValue(av_name.getCompleteName()); getChild<LLUICtrl>("object_name")->setToolTip(av_name.getCompleteName()); getChild<LLUICtrl>("abuser_name_edit")->setValue(av_name.getCompleteName()); } }
// get() with callback compatible version of getPNSName void LLAvatarNameCache::getPNSName(const LLAvatarName& avatar_name, std::string& name) { static LLCachedControl<S32> phoenix_name_system("PhoenixNameSystem", 0); switch (phoenix_name_system) { case 0 : name = avatar_name.getLegacyName(); break; case 1 : name = avatar_name.getCompleteName(); break; case 2 : name = avatar_name.mDisplayName; break; default : name = avatar_name.getLegacyName(); break; } }
// get() with callback compatible version of getPNSName void LLAvatarNameCache::getPNSName(const LLAvatarName& avatar_name, std::string& name, const S32& name_system) { switch (name_system) { case 0 : name = avatar_name.getLegacyName(); break; case 1 : name = avatar_name.getCompleteName(); break; case 2 : name = avatar_name.mDisplayName; break; case 3 : name = avatar_name.getLegacyName() + (avatar_name.mIsDisplayNameDefault ? "" : " (" + avatar_name.mDisplayName + ")"); break; default : name = avatar_name.getLegacyName(); break; } }
void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name) { mAvatarNameCacheConnection.disconnect(); if (mObjectID == avatar_id) { mOwnerName = av_name.getNSName(); getChild<LLUICtrl>("owner_name")->setValue(av_name.getNSName()); getChild<LLUICtrl>("object_name")->setValue(av_name.getNSName()); getChild<LLUICtrl>("abuser_name_edit")->setValue(av_name.getNSName()); } }
// Ansariel: Name lookup callback for chat console output // FS:LO FIRE-5230 - Chat Console Improvement: Replacing the "IM" in front of group chat messages with the actual group name //void LLIMHandler::onAvatarNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, const std::string& message_str) void LLIMHandler::onAvatarNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, const std::string& message_str, const std::string& group) { std::string senderName; std::string message(message_str); std::string delimiter = ": "; std::string prefix = message.substr(0, 4); LLStringUtil::toLower(prefix); // irc styled messages if (prefix == "/me " || prefix == "/me'") { delimiter = LLStringUtil::null; message = message.substr(3); } static LLCachedControl<bool> nameTagShowUsernames(gSavedSettings, "NameTagShowUsernames"); static LLCachedControl<bool> useDisplayNames(gSavedSettings, "UseDisplayNames"); if (nameTagShowUsernames && useDisplayNames) { senderName = av_name.getCompleteName(); } else if (useDisplayNames) { senderName = av_name.mDisplayName; } else { senderName = av_name.getLegacyName(); } if (rlv_handler_t::isEnabled() && gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) { senderName = RlvStrings::getAnonym(senderName); } // FS:LO FIRE-5230 - Chat Console Improvement: Replacing the "IM" in front of group chat messages with the actual group name if(group != "") { senderName = "[" + group + "] " + senderName; } // FS:LO FIRE-5230 - Chat Console Improvement: Replacing the "IM" in front of group chat messages with the actual group name LLColor4 textColor = LLUIColorTable::instance().getColor("AgentChatColor"); //color based on contact sets prefs if(LGGContactSets::getInstance()->hasFriendColorThatShouldShow(agent_id,TRUE)) { textColor = LGGContactSets::getInstance()->getFriendColor(agent_id); } gConsole->addConsoleLine("IM: " + senderName + delimiter + message, textColor); LLFloaterNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterNearbyChat>("nearby_chat", LLSD()); gConsole->setVisible(!nearby_chat->getVisible()); }
bool LLInspectAvatar::enableUnmute() { bool is_linden = LLStringUtil::endsWith(mAvatarName.getDisplayName(), " Linden"); bool is_self = mAvatarID == gAgent.getID(); if (!is_linden && !is_self && LLMuteList::getInstance()->isMuted(mAvatarID, mAvatarName.getDisplayName())) { return true; } else { return false; } }
void LLFloaterIMPanel::onAvatarNameLookup(const LLAvatarName& avatar_name) { setTitle(avatar_name.getNSName()); const S32& ns(gSavedSettings.getS32("IMNameSystem")); std::string title(avatar_name.getNSName(ns)); if (!ns || ns == 3) // Remove Resident, if applicable. { size_t pos(title.find(" Resident")); if (pos != std::string::npos && !gSavedSettings.getBOOL("LiruShowLastNameResident")) title.erase(pos, 9); } setShortTitle(title); if (LLMultiFloater* mf = dynamic_cast<LLMultiFloater*>(getParent())) mf->updateFloaterTitle(this); }
void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name) { // setAvatarName(av_name.mDisplayName); // setAvatarToolTip(av_name.mUsername); // [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a bool fRlvFilter = (mRlvCheckShowNames) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); if (mShowDisplayName && !mShowUsername) setAvatarName( (!fRlvFilter) ? av_name.mDisplayName : RlvStrings::getAnonym(av_name) ); else if (!mShowDisplayName && mShowUsername) setAvatarName( (!fRlvFilter) ? av_name.mUsername : RlvStrings::getAnonym(av_name) ); else setAvatarName( (!fRlvFilter) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name) ); // NOTE: If you change this, you will break sorting the contacts list // by username unless you go change the comparator too. -- TS setAvatarToolTip( (!fRlvFilter) ? av_name.mUsername : RlvStrings::getAnonym(av_name) ); // TODO-RLVa: bit of a hack putting this here. Maybe find a better way? mAvatarIcon->setDrawTooltip(!fRlvFilter); // [/RLVa:KB] //KC - store the username for use in sorting mUserName = av_name.mUsername; //requesting the list to resort notifyParent(LLSD().with("sort", LLSD())); //update children, because this call tends to effect the size of the name field width updateChildren(); }
// static void LLAvatarActions::on_avatar_name_cache_teleport_request(const LLUUID& id, const LLAvatarName& av_name) { LLSD notification; notification["uuid"] = id; std::string name; // [RLVa:KB] - Checked: 2014-03-31 (Catznip-3.6) if (!RlvActions::canShowName(RlvActions::SNC_TELEPORTREQUEST)) name = RlvStrings::getAnonym(av_name.getLegacyName()); else // [RLVa:KB] name = av_name.getNSName(); notification["NAME"] = name; LLSD payload; LLNotificationsUtil::add("TeleportRequestPrompt", notification, payload, teleport_request_callback); }
static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name, bool web) { if (gSavedSettings.getString("WebProfileURL").empty() || !(web || gSavedSettings.getBOOL("UseWebProfiles"))) { LLFloaterAvatarInfo* floater = LLFloaterAvatarInfo::getInstance(agent_id); if(!floater) { floater = new LLFloaterAvatarInfo(av_name.getCompleteName()+" - "+LLTrans::getString("Command_Profile_Label"), agent_id); floater->center(); } // ...bring that window to front floater->open(); /*Flawfinder: ignore*/ } else { std::string username = av_name.mUsername; if (username.empty()) { username = LLCacheName::buildUsername(av_name.mDisplayName); } llinfos << "opening web profile for " << username << llendl; std::string url = getProfileURL(username); // PROFILES: open in webkit window LLFloaterWebContent::Params p; p.url(url). id(agent_id.asString()); LLFloaterWebProfile::showInstance(get_profile_floater_name(agent_id), p); } }
static void on_avatar_name_cache_start_im(const LLUUID& agent_id, const LLAvatarName& av_name) { static LLCachedControl<bool> tear_off("OtherChatsTornOff"); if (!tear_off) gIMMgr->setFloaterOpen(true); gIMMgr->addSession(LLCacheName::cleanFullName(av_name.getLegacyName()), IM_NOTHING_SPECIAL, agent_id); make_ui_sound("UISndStartIM"); }
void LLUrlEntryAgent::onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name) { std::string label = av_name.getCompleteName(); // received the agent name from the server - tell our observers callObservers(id.asString(), label, mIcon); }
void LLCallFloater::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) { LLStringUtil::format_map_t args; args["[NAME]"] = av_name.getCompleteName(); std::string title = getString("title_peer_2_peer", args); setTitle(title); }
static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name) { std::string url = getProfileURL(av_name.getAccountName()); // PROFILES: open in webkit window LLFloaterWebContent::Params p; p.url(url).id(agent_id.asString()); LLFloaterReg::showInstance(get_profile_floater_name(agent_id), p); }
void LLPanelGroupInvite::addUserCallback(const LLUUID& id, const LLAvatarName& av_name) { std::vector<std::string> names; uuid_vec_t agent_ids; agent_ids.push_back(id); names.push_back(av_name.getAccountName()); mImplementation->addUsers(names, agent_ids); }
void LLIMFloater::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) { // Use display name only for labels, as the extended name will be in the // floater title std::string ui_title = av_name.getCompleteName(); updateSessionName(ui_title, av_name.mDisplayName); mTypingStart.setArg("[NAME]", ui_title); }
static void on_avatar_name_cache_start_call(const LLUUID& agent_id, const LLAvatarName& av_name) { LLUUID session_id = gIMMgr->addSession(LLCacheName::cleanFullName(av_name.getLegacyName()), IM_NOTHING_SPECIAL, agent_id); if (session_id.notNull()) { gIMMgr->startCall(session_id); } make_ui_sound("UISndStartIM"); }
static void on_avatar_name_cache_start_call(const LLUUID& agent_id, const LLAvatarName& av_name) { std::string name = av_name.getDisplayName(); LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, agent_id, true); if (session_id != LLUUID::null) { gIMMgr->startCall(session_id); } make_ui_sound("UISndStartIM"); }
static void on_avatar_name_cache_start_im(const LLUUID& agent_id, const LLAvatarName& av_name) { std::string name = av_name.getDisplayName(); LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, agent_id); if (session_id != LLUUID::null) { LLFloaterIMContainer::getInstance()->showConversation(session_id); } make_ui_sound("UISndStartIM"); }
//-TT 2.6.9 merge //Ansariel name lookup function void LLNearbyChatHandler::onAvatarNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, const LLChat& chat_msg) { std::string consoleChat; std::string senderName(chat_msg.mFromName); std::string prefix = chat_msg.mText.substr(0, 4); LLStringUtil::toLower(prefix); //IRC styled /me messages. bool irc_me = prefix == "/me " || prefix == "/me'"; // Delimiter after a name in header copy/past and in plain text mode std::string delimiter = ": "; std::string shout = LLTrans::getString("shout"); std::string whisper = LLTrans::getString("whisper"); if (chat_msg.mChatType == CHAT_TYPE_SHOUT || chat_msg.mChatType == CHAT_TYPE_WHISPER || chat_msg.mText.compare(0, shout.length(), shout) == 0 || chat_msg.mText.compare(0, whisper.length(), whisper) == 0) { delimiter = " "; } // Don't add any delimiter after name in irc styled messages if (irc_me || chat_msg.mChatStyle == CHAT_STYLE_IRC) { delimiter = LLStringUtil::null; } std::string message = irc_me ? chat_msg.mText.substr(3) : chat_msg.mText; // Get the display name of the sender if required static LLCachedControl<bool> nameTagShowUsernames(gSavedSettings, "NameTagShowUsernames"); static LLCachedControl<bool> useDisplayNames(gSavedSettings, "UseDisplayNames"); if (!chat_msg.mRlvNamesFiltered) { if (nameTagShowUsernames && useDisplayNames) { senderName = av_name.getCompleteName(); } else if (useDisplayNames) { senderName = av_name.mDisplayName; } } consoleChat = senderName + delimiter + message; LLColor4 chatcolor; LLViewerChat::getChatColor(chat_msg, chatcolor); gConsole->addConsoleLine(consoleChat, chatcolor); LLFloaterNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterNearbyChat>("nearby_chat", LLSD()); if( nearby_chat ) gConsole->setVisible(!nearby_chat->getVisible()); }
void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name) { mAvatarNameCacheConnection.disconnect(); if (mObjectID == avatar_id) { mOwnerName = av_name.getNSName(); const std::string& name(((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && RlvUtil::isNearbyAgent(avatar_id)) ? RlvStrings::getString(RLV_STRING_HIDDEN) : mOwnerName); getChild<LLUICtrl>("owner_name")->setValue(name); getChild<LLUICtrl>("object_name")->setValue(name); getChild<LLUICtrl>("abuser_name_edit")->setValue(name); } }
static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name, bool web) { static LLCachedControl<std::string> web_profile_url("WebProfileURL"); static LLCachedControl<bool> use_web_profiles("UseWebProfiles"); std::string wpu = web_profile_url; if (wpu.empty() || !(web || use_web_profiles)) { LLFloaterAvatarInfo* floater = LLFloaterAvatarInfo::getInstance(agent_id); if(!floater) { floater = new LLFloaterAvatarInfo(av_name.getCompleteName()+" - "+LLTrans::getString("Command_Profile_Label"), agent_id); // I'd rather have it remember its position ... static LLCachedControl<bool> floater_centers("RtyFloaterProfileCenters"); if(floater_centers) { floater->center(); } else { floater->center_right(); } } // ...bring that window to front floater->open(); /*Flawfinder: ignore*/ } else { std::string url = getProfileURL(av_name.getAccountName()); // PROFILES: open in webkit window LLFloaterWebContent::Params p; p.url(url).id(agent_id.asString()); LLFloaterWebProfile::showInstance(get_profile_floater_name(agent_id), p); } }
// Checked: 2011-05-26 (RLVa-1.3.1c) | Added: RLVa-1.3.1c void RlvFloaterBehaviours::onBtnCopyToClipboard() const { std::ostringstream strRestrictions; strRestrictions << RlvStrings::getVersion() << "\n"; const RlvHandler::rlv_object_map_t* pObjects = gRlvHandler.getObjectMap(); for (RlvHandler::rlv_object_map_t::const_iterator itObj = pObjects->begin(), endObj = pObjects->end(); itObj != endObj; ++itObj) { strRestrictions << "\n" << rlvGetItemNameFromObjID(itObj->first) << ":\n"; const rlv_command_list_t* pCommands = itObj->second.getCommandList(); for (rlv_command_list_t::const_iterator itCmd = pCommands->begin(), endCmd = pCommands->end(); itCmd != endCmd; ++itCmd) { std::string strOption; LLUUID idOption; if ( (itCmd->hasOption()) && (idOption.set(itCmd->getOption(), FALSE)) && (idOption.notNull()) ) { LLAvatarName avName; if (gObjectList.findObject(idOption)) strOption = rlvGetItemNameFromObjID(idOption, true); else if (LLAvatarNameCache::get(idOption, &avName)) strOption = (!avName.getAccountName().empty()) ? avName.getAccountName() : avName.getDisplayName(); else if (!gCacheName->getGroupName(idOption, strOption)) strOption = itCmd->getOption(); } strRestrictions << " -> " << itCmd->asString(); if ( (!strOption.empty()) && (strOption != itCmd->getOption()) ) strRestrictions << " [" << strOption << "]"; if (RLV_RET_SUCCESS != itCmd->getReturnType()) strRestrictions << " (" << RlvStrings::getStringFromReturnCode(itCmd->getReturnType()) << ")"; strRestrictions << "\n"; } } LLWString wstrRestrictions = utf8str_to_wstring(strRestrictions.str()); gClipboard.copyFromSubstring(wstrRestrictions, 0, wstrRestrictions.length()); }