diff --git a/indra/llcharacter/llbvhloader.h b/indra/llcharacter/llbvhloader.h index de16d86ff4..cfa7f6ec5b 100755 --- a/indra/llcharacter/llbvhloader.h +++ b/indra/llcharacter/llbvhloader.h @@ -296,6 +296,10 @@ public: ELoadStatus getStatus() { return mStatus; } + // FIRE-17277: Allow entering Loop In/Loop Out as frames + S32 getNumFrames() const { return mNumFrames; } + // + protected: // Consumes one line of input from file. diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 5b0e8dbb02..3def7b72bd 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2600,7 +2600,10 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size) } } F32 wsum = wght.mV[VX] + wght.mV[VY] + wght.mV[VZ] + wght.mV[VW]; - if (wsum <= 0.f) + + // FIRE-17341 / BUG-10747 do allow weights of zero, or some rigged mesh will display broken. + // if (wsum <= 0.f) + if (wsum < 0.f) { wght = LLVector4(0.99999f,0.f,0.f,0.f); } diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index 75b6ab4aca..6dd76b4056 100755 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -131,17 +131,6 @@ CURLcode LLURLRequest::_sslCtxCallback(CURL * curl, void *sslctx, void *param) SSL_CTX_set_cert_verify_callback(ctx, req->mDetail->mSSLVerifyCallback, (void *)req); // the calls are void - // FIRE-11406 - // Some server at LL don't like it at all when curl/openssl try to speak TLSv1.2 to them, instead - // of renegotiating to SSLv3 they clamp up and don't talk to us at all anywmore, not even dropping the connection. - // This then leads to unfun timeouts and failed transactions. - -#ifdef SSL_TXT_TLSV1_2 - SSL_CTX_set_options( ctx, SSL_OP_ALL | SSL_OP_NO_TLSv1_2 ); -#endif - - // - return CURLE_OK; } diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index f8e7567e95..989be60273 100755 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -432,7 +432,13 @@ void LLTabContainer::draw() { break; } - target_pixel_scroll += (*iter)->mButton->getRect().getWidth(); + //target_pixel_scroll += (*iter)->mButton->getRect().getWidth(); + // Only show button if tab is visible + if ((*iter)->mVisible) + { + target_pixel_scroll += (*iter)->mButton->getRect().getWidth(); + } + // cur_scroll_pos--; } @@ -2318,7 +2324,10 @@ void LLTabContainer::updateMaxScrollPos() setMaxScrollPos(getTabCount()); for(tuple_list_t::reverse_iterator tab_it = mTabList.rbegin(); tab_it != mTabList.rend(); ++tab_it) { - running_tab_width += (*tab_it)->mButton->getRect().getWidth(); + // Only show button if tab is visible + //running_tab_width += (*tab_it)->mButton->getRect().getWidth(); + running_tab_width += (*tab_it)->mVisible ? (*tab_it)->mButton->getRect().getWidth() : 0; + // if (running_tab_width > available_width_with_arrows) { break; @@ -2327,7 +2336,9 @@ void LLTabContainer::updateMaxScrollPos() } // in case last tab doesn't actually fit on screen, make it the last scrolling position setMaxScrollPos(llmin(getMaxScrollPos(), getTabCount() - 1)); - no_scroll = FALSE; + // Only show button if tab is visible + //no_scroll = FALSE; + no_scroll = (running_tab_width <= available_width_with_arrows); } } if (no_scroll) @@ -2445,5 +2456,7 @@ void LLTabContainer::setTabVisibility( LLPanel const *aPanel, bool aVisible ) this->setVisible( TRUE ); else this->setVisible( FALSE ); + + updateMaxScrollPos(); } // diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 93669c6bfb..7d392890b1 100755 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -1167,7 +1167,11 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id) } else { - button->setCommitCallback(executeParam); + // Check enabled state of button before executing! + //button->setCommitCallback(executeParam); + LLUICtrl::commit_callback_t execute_func = initCommitCallback(executeParam); + button->setCommitCallback(boost::bind(&LLToolBarButton::callIfEnabled, button, execute_func, _1, _2)); + // } // Set up "is running" query callback diff --git a/indra/llui/llviewereventrecorder.cpp b/indra/llui/llviewereventrecorder.cpp index a0a2f19df8..f5579158f2 100644 --- a/indra/llui/llviewereventrecorder.cpp +++ b/indra/llui/llviewereventrecorder.cpp @@ -33,12 +33,25 @@ LLViewerEventRecorder::LLViewerEventRecorder() { clear(UNDEFINED); logEvents = false; // Remove any previous event log file - std::string old_log_ui_events_to_llsd_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife_Events_log.old"); - LLFile::remove(old_log_ui_events_to_llsd_file); - + // Name this properly and silence the warnings + //std::string old_log_ui_events_to_llsd_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife_Events_log.old"); + //LLFile::remove(old_log_ui_events_to_llsd_file); + // - mLogFilename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife_Events_log.llsd"); - LLFile::rename(mLogFilename, old_log_ui_events_to_llsd_file); + //mLogFilename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife_Events_log.llsd"); + //LLFile::rename(mLogFilename, old_log_ui_events_to_llsd_file); + std::string old_log_ui_events_to_llsd_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, llformat("%s_Events_log.old", APP_NAME.c_str())); + if (LLFile::isfile(old_log_ui_events_to_llsd_file)) + { + LLFile::remove(old_log_ui_events_to_llsd_file); + } + + mLogFilename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, llformat("%s_Events_log.llsd", APP_NAME.c_str())); + if (LLFile::isfile(mLogFilename)) + { + LLFile::rename(mLogFilename, old_log_ui_events_to_llsd_file); + } + // } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 902eaea9da..79f10641f7 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -147,6 +147,7 @@ set(viewer_SOURCE_FILES fsavatarsearchmenu.cpp fsblocklistmenu.cpp fschathistory.cpp + fschatoptionsmenu.cpp fscommon.cpp fsconsoleutils.cpp fscontactsfriendsmenu.cpp @@ -892,6 +893,7 @@ set(viewer_HEADER_FILES fsavatarsearchmenu.h fsblocklistmenu.h fschathistory.h + fschatoptionsmenu.h fscommon.h fsconsoleutils.h fscontactsfriendsmenu.h diff --git a/indra/newview/NACLfloaterexploresounds.cpp b/indra/newview/NACLfloaterexploresounds.cpp index 11499cc29e..e225577e80 100644 --- a/indra/newview/NACLfloaterexploresounds.cpp +++ b/indra/newview/NACLfloaterexploresounds.cpp @@ -234,7 +234,7 @@ BOOL NACLFloaterExploreSounds::tick() { LLStringUtil::format_map_t format_args; format_args["TIME"] = llformat("%.1f", static_cast((LLTimer::getElapsedSeconds() - item.mTimeStopped) / 60.0)); - playing_column["value"] = formatString(str_not_playing, format_args); + playing_column["value"] = format_string(str_not_playing, format_args); } LLSD& type_column = element["columns"][1]; diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 5d6201e691..798773b713 100755 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -29,6 +29,8 @@ tooltip_ref="Command_Avatar_Tooltip" execute_function="Floater.Toggle" execute_parameters="avatar" + is_enabled_function="GridFeatureCheck" + is_enabled_parameters="avatar_picker" is_running_function="Floater.IsOpen" is_running_parameters="avatar" /> @@ -72,6 +74,8 @@ tooltip_ref="Command_Destinations_Tooltip" execute_function="Floater.Toggle" execute_parameters="destinations" + is_enabled_function="GridFeatureCheck" + is_enabled_parameters="destination_guide" is_running_function="Floater.IsOpen" is_running_parameters="destinations" /> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 770dcf2675..f62ebe1975 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1044,7 +1044,7 @@ AutoCloseOOC Comment - Auto-close OOC chat (i.e. add \"))\" if not found and \"((\" was used) + Auto-close OOC chat (i.e. add "))" if not found and "((" was used) Persist 1 Type @@ -1074,19 +1074,6 @@ Value 0 - - GlobalOnlineStatusToggle - - Comment - Saves the state of global online status permission for friends - Persist - 1 - Type - Boolean - Value - 1 - - RenderVolumeSAProtection Comment @@ -1098,7 +1085,6 @@ Value 0 - RenderVolumeSAThreshold Comment @@ -7575,17 +7561,6 @@ Backup 0 - LegacyMultiAttachmentSupport - - Comment - Converts legacy "secondary attachment points" to multi-attachments for other avatars - Persist - 1 - Type - Boolean - Value - 0 - LimitDragDistance Comment @@ -23740,6 +23715,74 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + FSEnableMovingFolderLinks + + Comment + Enable moving of folder links via drag and drop + Persist + 1 + Type + Boolean + Value + 1 + + ForceInitialCOFDelay + + Comment + Number of seconds to delay initial processing of COF contents + Persist + 1 + Type + F32 + Value + 0.0 + + FSTypeDuringEmote + + Comment + Enables the typing animation even while emoting + Persist + 1 + Type + Boolean + Value + 0 + + FSLegacyNotificationWell + + Comment + Enables the legacy notifications and system messages well + Persist + 1 + Type + Boolean + Value + 0 + + FSInternalLegacyNotificationWell + + Comment + Internal state of FSLegacyNotificationWell + Persist + 0 + HideFromEditor + 1 + Type + Boolean + Value + 0 + + FSShowIMSendButton + + Comment + Shows the send chat button in IM session windows + Persist + 1 + Type + Boolean + Value + 1 + diff --git a/indra/newview/app_settings/settings_phoenix.xml b/indra/newview/app_settings/settings_phoenix.xml index 9df192d3fe..12338aae91 100644 --- a/indra/newview/app_settings/settings_phoenix.xml +++ b/indra/newview/app_settings/settings_phoenix.xml @@ -531,6 +531,18 @@ 0 + FSLegacyNotificationWell + + Comment + Enables the legacy notifications and system messages well + Persist + 1 + Type + Boolean + Value + 1 + + FSAnimatedScriptDialogs diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index b2b952d0ed..714dfacc14 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -102,22 +102,22 @@ public: doZdCleanup(); if (mErrorCode == 1) { - reportToNearbyChat(llformat("The object with the UUID of \"%s\" can no longer be found in-world.", mDropUUID.c_str())); - reportToNearbyChat("This can occur if the object was returned or deleted, or if your client is no longer rendering it."); - reportToNearbyChat(llformat("Transfer from \"%s\" to \"%s\" aborted.", mFolderName.c_str(), mDropUUID.c_str())); + report_to_nearby_chat(llformat("The object with the UUID of \"%s\" can no longer be found in-world.", mDropUUID.c_str())); + report_to_nearby_chat("This can occur if the object was returned or deleted, or if your client is no longer rendering it."); + report_to_nearby_chat(llformat("Transfer from \"%s\" to \"%s\" aborted.", mFolderName.c_str(), mDropUUID.c_str())); } else { if (mPackage) { - reportToNearbyChat("Packager finished, you may now pick up the prim that contains the objects."); - reportToNearbyChat(llformat("Packaged what you had selected in world into the folder \"%s\" in your inventory and into the prim with the UUID of \"%s\"", mFolderName.c_str(), mDropUUID.c_str())); - reportToNearbyChat("Don't worry if you look at the contents of package right now, it may show as empty, it isn't, it's just a bug with Second Life itself."); - reportToNearbyChat("If you take it into your inventory then rez it back out, all the contents will be there."); + report_to_nearby_chat("Packager finished, you may now pick up the prim that contains the objects."); + report_to_nearby_chat(llformat("Packaged what you had selected in world into the folder \"%s\" in your inventory and into the prim with the UUID of \"%s\"", mFolderName.c_str(), mDropUUID.c_str())); + report_to_nearby_chat("Don't worry if you look at the contents of package right now, it may show as empty, it isn't, it's just a bug with Second Life itself."); + report_to_nearby_chat("If you take it into your inventory then rez it back out, all the contents will be there."); } else { - reportToNearbyChat(llformat("Completed transfer from \"%s\" to \"%s\".", mFolderName.c_str(), mDropUUID.c_str())); + report_to_nearby_chat(llformat("Completed transfer from \"%s\" to \"%s\".", mFolderName.c_str(), mDropUUID.c_str())); } } } @@ -129,7 +129,7 @@ public: LLViewerObject* objectp = gObjectList.findObject(mDestination); if (objectp) { - reportToNearbyChat(std::string("transferring ") + subj->getName()); + report_to_nearby_chat(std::string("transferring ") + subj->getName()); LLToolDragAndDrop::dropInventory(objectp, subj, LLToolDragAndDrop::SOURCE_AGENT, gAgentID); if (mStack.size() > 0) { @@ -218,11 +218,11 @@ public: if (mPackage) { - reportToNearbyChat("Packager started. Phase 1 (taking in-world objects into inventory) starting in: "); + report_to_nearby_chat("Packager started. Phase 1 (taking in-world objects into inventory) starting in: "); } else { - reportToNearbyChat("Ztake activated. Taking selected in-world objects into inventory in: "); + report_to_nearby_chat("Ztake activated. Taking selected in-world objects into inventory in: "); } } @@ -230,7 +230,7 @@ public: { if (!mPackage) { - reportToNearbyChat("Ztake deactivated."); + report_to_nearby_chat("Ztake deactivated."); } } @@ -239,7 +239,7 @@ public: { switch (mState) { case ZTS_COUNTDOWN: - reportToNearbyChat(llformat("%i...", mCountdown--)); + report_to_nearby_chat(llformat("%i...", mCountdown--)); if (mCountdown == 0) mState = ZTS_SELECTION; break; @@ -298,25 +298,25 @@ public: } else { - reportToNearbyChat("Ktake has taken all selected objects."); + report_to_nearby_chat("Ktake has taken all selected objects."); doZtCleanup(); mState = ZTS_DONE; } } else { - reportToNearbyChat("Ztake has taken all selected objects. Say \"ztake off\" to deactivate ztake or select more objects to continue."); + report_to_nearby_chat("Ztake has taken all selected objects. Say \"ztake off\" to deactivate ztake or select more objects to continue."); } } else { if (mPackage) { - reportToNearbyChat(llformat("Packager: %i objects left to take.", mToTake.size())); + report_to_nearby_chat(llformat("Packager: %i objects left to take.", mToTake.size())); } else { - reportToNearbyChat(llformat("Ztake: %i objects left to take.", mToTake.size())); + report_to_nearby_chat(llformat("Ztake: %i objects left to take.", mToTake.size())); } } } @@ -325,12 +325,12 @@ public: { if (mPackage) { - reportToNearbyChat(llformat("Packager: no objects to take.")); + report_to_nearby_chat(llformat("Packager: no objects to take.")); doZtCleanup(); } else { - reportToNearbyChat(llformat("Ztake: no objects to take.")); + report_to_nearby_chat(llformat("Ztake: no objects to take.")); } } break; @@ -350,14 +350,14 @@ public: if (itemstack.size() >= mPackSize || mCountdown == 0) { if (itemstack.size() < mPackSize) { - reportToNearbyChat("Phase 1 of the packager finished, but some items mave have been missed."); + report_to_nearby_chat("Phase 1 of the packager finished, but some items mave have been missed."); } else { - reportToNearbyChat("Phase 1 of the packager finished."); + report_to_nearby_chat("Phase 1 of the packager finished."); } - reportToNearbyChat("Do not have the destination prim selected while transfer is running to reduce the chances of \"Inventory creation on in-world object failed.\""); + report_to_nearby_chat("Do not have the destination prim selected while transfer is running to reduce the chances of \"Inventory creation on in-world object failed.\""); LLUUID sdest = LLUUID(mPackageDest); new JCZdrop(itemstack, sdest, mFolderName.c_str(), mPackageDest.asString().c_str(), true); @@ -421,12 +421,12 @@ public: TMZtake(const LLUUID& target) : LLEventTimer(0.33f), mTarget(target), mRunning(FALSE), mCountdown(5) { - reportToNearbyChat("Mtake activated. Taking selected in-world objects into inventory in: "); + report_to_nearby_chat("Mtake activated. Taking selected in-world objects into inventory in: "); } ~TMZtake() { - reportToNearbyChat("Mtake deactivated."); + report_to_nearby_chat("Mtake deactivated."); } BOOL tick() @@ -470,7 +470,7 @@ public: } if (mCountdown > 0) { - reportToNearbyChat(llformat("%i...", mCountdown--)); + report_to_nearby_chat(llformat("%i...", mCountdown--)); } else if (mToTake.size() > 0) { @@ -496,11 +496,11 @@ public: { if (mToTake.size() == 0) { - reportToNearbyChat("Mtake has taken all selected objects. Say \"mtake off\" to deactivate Mtake or select more objects to continue."); + report_to_nearby_chat("Mtake has taken all selected objects. Say \"mtake off\" to deactivate Mtake or select more objects to continue."); } else { - reportToNearbyChat(llformat("Mtake: %i objects left to take.", mToTake.size())); + report_to_nearby_chat(llformat("Mtake: %i objects left to take.", mToTake.size())); } } } @@ -582,7 +582,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { if (from_gesture) { - reportToNearbyChat(LLTrans::getString("DrawDistanceSteppingGestureObsolete")); + report_to_nearby_chat(LLTrans::getString("DrawDistanceSteppingGestureObsolete")); gSavedSettings.setBOOL("FSRenderFarClipStepping", TRUE); return false; } @@ -593,7 +593,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge gAgentCamera.mDrawDistance = drawDist; LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%.0f", drawDist); - reportToNearbyChat(LLTrans::getString("FSCmdLineDrawDistanceSet", args)); + report_to_nearby_chat(LLTrans::getString("FSCmdLineDrawDistanceSet", args)); return false; } } @@ -655,7 +655,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge std::string bw_cmd_respond; args["[VALUE]"] = llformat ("%d", band_width); bw_cmd_respond = LLTrans::getString("FSCmdLineRSP", args); - reportToNearbyChat(bw_cmd_respond); + report_to_nearby_chat(bw_cmd_respond); return false; } } @@ -707,7 +707,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { object_name = RlvStrings::getAnonym(object_name); } - reportToNearbyChat(llformat("%s: (%s)", target_key.asString().c_str(), object_name.c_str())); + report_to_nearby_chat(llformat("%s: (%s)", target_key.asString().c_str(), object_name.c_str())); } return false; } @@ -720,7 +720,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge if (!myObject) { - reportToNearbyChat(llformat("Object with key %s not found!", target_key.asString().c_str())); + report_to_nearby_chat(llformat("Object with key %s not found!", target_key.asString().c_str())); return false; } @@ -760,7 +760,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge msg->addVector3("Normal", LLVector3::zero); msg->addVector3("Binormal", LLVector3::zero); msg->sendMessage(myObject->getRegion()->getHost()); - reportToNearbyChat(llformat("Touched object with key %s", target_key.asString().c_str())); + report_to_nearby_chat(llformat("Touched object with key %s", target_key.asString().c_str())); } } return false; @@ -774,7 +774,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge if (!myObject) { - reportToNearbyChat(llformat("Object with key %s not found!", target_key.asString().c_str())); + report_to_nearby_chat(llformat("Object with key %s not found!", target_key.asString().c_str())); return false; } if ((!rlv_handler_t::isEnabled()) || (gRlvHandler.canSit(myObject, LLVector3::zero))) @@ -789,7 +789,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge msg->addVector3Fast(_PREHASH_Offset, LLVector3::zero); gAgent.getRegion()->sendReliableMessage(); - reportToNearbyChat(llformat("Sat on object with key %s", target_key.asString().c_str())); + report_to_nearby_chat(llformat("Sat on object with key %s", target_key.asString().c_str())); } } return false; @@ -799,7 +799,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge if ((!rlv_handler_t::isEnabled()) || (RlvActions::canStand())) { gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); - reportToNearbyChat(std::string("Standing up")); + report_to_nearby_chat(std::string("Standing up")); } return false; } @@ -822,7 +822,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge gAgent.sendReliableMessage(); LLStringUtil::format_map_t args; args["NAME"] = LLSLURL("agent", target_key, "inspect").getSLURLString(); - reportToNearbyChat(LLTrans::getString("FSCmdLineTpOffered", args)); + report_to_nearby_chat(LLTrans::getString("FSCmdLineTpOffered", args)); } return false; } @@ -932,7 +932,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { LLStringUtil::format_map_t args; args["RAND"] = llformat("%s", look_for.c_str()); - reportToNearbyChat(LLTrans::getString("FSCmdLineCalcRandError", args)); + report_to_nearby_chat(LLTrans::getString("FSCmdLineCalcRandError", args)); } std::string random_number_text = llformat("%d", random_number); expr.replace(random_string_pos, look_for.length(), random_number_text); @@ -957,7 +957,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge result_str << result; out = result_str.str(); } - reportToNearbyChat(out); + report_to_nearby_chat(out); return false; } } @@ -990,22 +990,22 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { if (zdrop) { - reportToNearbyChat("Zdrop is already active."); + report_to_nearby_chat("Zdrop is already active."); } else { std::string destination; if (i >> destination) { - reportToNearbyChat("Beginning Zdrop."); - reportToNearbyChat("Verifying destination prim is present inworld..."); + report_to_nearby_chat("Beginning Zdrop."); + report_to_nearby_chat("Verifying destination prim is present inworld..."); if (!LLUUID::validate(destination)) { - reportToNearbyChat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); + report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); } else if (!gObjectList.findObject(LLUUID(destination))) { - reportToNearbyChat("Unable to locate object. Please verify the object is rezzed and in view, and that the UUID is correct."); + report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed and in view, and that the UUID is correct."); } else { @@ -1021,7 +1021,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge LLUUID folder_id = gInventory.findCategoryByName(folder); if (folder_id.notNull()) { - reportToNearbyChat("Verifying folder location..."); + report_to_nearby_chat("Verifying folder location..."); std::stack inventorystack; std::vector > inventory = findInventoryInFolder(folder); for (std::vector >::iterator it = inventory.begin(); it != inventory.end(); ++it) @@ -1031,32 +1031,32 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge } if (inventorystack.size()) { - reportToNearbyChat(llformat("Found folder \"%s\".", folder.c_str())); - reportToNearbyChat(llformat("Found prim \"%s\".", destination.c_str())); - reportToNearbyChat(llformat("Transferring inventory items from \"%s\" to prim \"%s\".", folder.c_str(), destination.c_str())); - reportToNearbyChat("WARNING: No-copy items will be moved to the destination prim!"); - reportToNearbyChat("Do not have the prim selected while transfer is running to reduce the chances of \"Inventory creation on in-world object failed.\""); - reportToNearbyChat("Use \"zdrop off\" to stop the transfer"); + report_to_nearby_chat(llformat("Found folder \"%s\".", folder.c_str())); + report_to_nearby_chat(llformat("Found prim \"%s\".", destination.c_str())); + report_to_nearby_chat(llformat("Transferring inventory items from \"%s\" to prim \"%s\".", folder.c_str(), destination.c_str())); + report_to_nearby_chat("WARNING: No-copy items will be moved to the destination prim!"); + report_to_nearby_chat("Do not have the prim selected while transfer is running to reduce the chances of \"Inventory creation on in-world object failed.\""); + report_to_nearby_chat("Use \"zdrop off\" to stop the transfer"); LLUUID sdest = LLUUID(destination); zdrop = new JCZdrop(inventorystack, sdest, folder.c_str(), destination.c_str()); } } else { - reportToNearbyChat(llformat("\"%s\" folder not found. Please check the spelling.", folder.c_str())); - reportToNearbyChat("Zdrop cannot work if the folder is inside another folder."); + report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder.c_str())); + report_to_nearby_chat("Zdrop cannot work if the folder is inside another folder."); } } catch (std::out_of_range) { - reportToNearbyChat("The Zdrop command transfers items from your inventory to a rezzed prim without the need to wait for the contents of the prim to load. No-copy items are moved to the prim. All other items are copied."); - reportToNearbyChat("Valid command: Zdrop (rezzed prim UUID) (source inventory folder name)"); + report_to_nearby_chat("The Zdrop command transfers items from your inventory to a rezzed prim without the need to wait for the contents of the prim to load. No-copy items are moved to the prim. All other items are copied."); + report_to_nearby_chat("Valid command: Zdrop (rezzed prim UUID) (source inventory folder name)"); } } } else { - reportToNearbyChat("Please specify an object UUID to copy the items in this folder to."); + report_to_nearby_chat("Please specify an object UUID to copy the items in this folder to."); } } } @@ -1064,7 +1064,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { if (!zdrop) { - reportToNearbyChat("Zdrop is already deactivated."); + report_to_nearby_chat("Zdrop is already deactivated."); } else { @@ -1075,13 +1075,13 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge } else { - reportToNearbyChat(llformat("Invalid command: \"%s\". Valid commands: zdrop on (source inventory folder) (rezzed prim UUID); zdrop off", setting.c_str())); + report_to_nearby_chat(llformat("Invalid command: \"%s\". Valid commands: zdrop on (source inventory folder) (rezzed prim UUID); zdrop off", setting.c_str())); } } else { - reportToNearbyChat("The Zdrop command transfers items from your inventory to a rezzed prim without the need to wait for the contents of the prim to load. No-copy items are moved to the prim. All other items are copied."); - reportToNearbyChat("Valid commands: zdrop on (rezzed prim UUID) (source inventory folder name); zdrop off"); + report_to_nearby_chat("The Zdrop command transfers items from your inventory to a rezzed prim without the need to wait for the contents of the prim to load. No-copy items are moved to the prim. All other items are copied."); + report_to_nearby_chat("Valid commands: zdrop on (rezzed prim UUID) (source inventory folder name); zdrop off"); } return false; } @@ -1094,12 +1094,12 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { if (ztake) { - reportToNearbyChat("Ztake is already active."); + report_to_nearby_chat("Ztake is already active."); } else { - reportToNearbyChat("Beginning Ztake."); - reportToNearbyChat("Verifying folder location..."); + report_to_nearby_chat("Beginning Ztake."); + report_to_nearby_chat("Verifying folder location..."); std::string folder_name; std::string tmp; while (i >> tmp) @@ -1112,18 +1112,18 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge LLUUID folder = gInventory.findCategoryByName(folder_name); if (folder.notNull()) { - reportToNearbyChat(llformat("Found destination folder \"%s\".", folder_name.c_str())); + report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); ztake = new JCZtake(folder); } else { - reportToNearbyChat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); - reportToNearbyChat("Ztake cannot work if the folder is inside another folder."); + report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); + report_to_nearby_chat("Ztake cannot work if the folder is inside another folder."); } } catch (std::out_of_range) { - reportToNearbyChat("Please specify a destination folder in your inventory."); + report_to_nearby_chat("Please specify a destination folder in your inventory."); } } } @@ -1131,7 +1131,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { if (!ztake) { - reportToNearbyChat("Ztake is already deactivated."); + report_to_nearby_chat("Ztake is already deactivated."); } else { @@ -1142,14 +1142,14 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge } else { - reportToNearbyChat(llformat("Invalid command: \"%s\". Valid commands: ztake on (destination inventory folder); ztake off", setting.c_str())); + report_to_nearby_chat(llformat("Invalid command: \"%s\". Valid commands: ztake on (destination inventory folder); ztake off", setting.c_str())); } return false; } else { - reportToNearbyChat("The Ztake command copies selected rezzed objects into the folder you specify in your inventory."); - reportToNearbyChat("Valid commands: ztake on (destination inventory folder name); ztake off"); + report_to_nearby_chat("The Ztake command copies selected rezzed objects into the folder you specify in your inventory."); + report_to_nearby_chat("Valid commands: ztake on (destination inventory folder name); ztake off"); } return false; } @@ -1158,14 +1158,14 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge std::string destination; if (i >> destination) { - reportToNearbyChat("Verifying destination prim is present inworld..."); + report_to_nearby_chat("Verifying destination prim is present inworld..."); if (!LLUUID::validate(destination)) { - reportToNearbyChat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); + report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); } else if (!gObjectList.findObject(LLUUID(destination))) { - reportToNearbyChat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); + report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); } else { @@ -1181,24 +1181,24 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge LLUUID folder = gInventory.findCategoryByName(folder_name); if (folder.notNull()) { - reportToNearbyChat(llformat("Found destination folder \"%s\".", folder_name.c_str())); + report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); ztake = new JCZtake(folder, true, LLUUID(destination), folder_name, (command == "cpackage") ? DRD_ACQUIRE_TO_AGENT_INVENTORY : DRD_TAKE_INTO_AGENT_INVENTORY); } else { - reportToNearbyChat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); - reportToNearbyChat("The packager cannot work if the folder is inside another folder."); + report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); + report_to_nearby_chat("The packager cannot work if the folder is inside another folder."); } } catch (std::out_of_range) { - reportToNearbyChat("Please specify a destination folder in your inventory."); + report_to_nearby_chat("Please specify a destination folder in your inventory."); } } } else { - reportToNearbyChat(llformat("Packager usage: \"%s destination_prim_UUID inventory folder name\"",command.c_str())); + report_to_nearby_chat(llformat("Packager usage: \"%s destination_prim_UUID inventory folder name\"",command.c_str())); } return false; } @@ -1207,14 +1207,14 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge std::string destination; if (i >> destination) { - reportToNearbyChat("Verifying destination prim is present inworld..."); + report_to_nearby_chat("Verifying destination prim is present inworld..."); if (!LLUUID::validate(destination)) { - reportToNearbyChat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); + report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); } else if (!gObjectList.findObject(LLUUID(destination))) { - reportToNearbyChat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); + report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); } else { @@ -1234,7 +1234,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge if (!LLUUID::validate(take)) { - reportToNearbyChat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); + report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); return false; } else @@ -1242,7 +1242,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge LLViewerObject* objectp = gObjectList.findObject(LLUUID(take)); if(!objectp) { - reportToNearbyChat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); + report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); return false; } else @@ -1258,30 +1258,30 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge if (to_take.empty()) { - reportToNearbyChat("No objects to take."); + report_to_nearby_chat("No objects to take."); } else { - reportToNearbyChat(llformat("Found destination folder \"%s\".", folder_name.c_str())); + report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); ztake = new JCZtake(folder, true, LLUUID(destination), folder_name, DRD_ACQUIRE_TO_AGENT_INVENTORY, false, to_take); } } else { - reportToNearbyChat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); - reportToNearbyChat("The packager cannot work if the folder is inside another folder."); + report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); + report_to_nearby_chat("The packager cannot work if the folder is inside another folder."); } } catch (std::out_of_range) { - reportToNearbyChat("Please specify a destination folder in your inventory."); + report_to_nearby_chat("Please specify a destination folder in your inventory."); } } } } else { - reportToNearbyChat(llformat("Packager usage: \"%s destination_prim_UUID inventory folder name\"",command.c_str())); + report_to_nearby_chat(llformat("Packager usage: \"%s destination_prim_UUID inventory folder name\"",command.c_str())); } return false; } @@ -1291,14 +1291,14 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge std::string destination; if (i >> destination) { - reportToNearbyChat("Verifying destination prim is present inworld..."); + report_to_nearby_chat("Verifying destination prim is present inworld..."); if (!LLUUID::validate(destination)) { - reportToNearbyChat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); + report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); } else if (!gObjectList.findObject(LLUUID(destination))) { - reportToNearbyChat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); + report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); } else { @@ -1310,7 +1310,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge LLUUID folder = gInventory.findCategoryByName(folder_name); if (folder.notNull()) { - reportToNearbyChat(llformat("kpackager started. Destination folder: \"%s\" Listening to object: \"%s\"", folder_name.c_str(), destination.c_str())); + report_to_nearby_chat(llformat("kpackager started. Destination folder: \"%s\" Listening to object: \"%s\"", folder_name.c_str(), destination.c_str())); cmd_line_mPackagerToTake.clear(); cmd_line_mPackagerTargetFolderName = folder_name; @@ -1319,20 +1319,20 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge } else { - reportToNearbyChat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); - reportToNearbyChat("The packager cannot work if the folder is inside another folder."); + report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); + report_to_nearby_chat("The packager cannot work if the folder is inside another folder."); } } catch (std::out_of_range) { - reportToNearbyChat("Please specify a destination folder in your inventory."); + report_to_nearby_chat("Please specify a destination folder in your inventory."); } } } } else { - reportToNearbyChat(llformat("Packager usage: \"%s destination_prim_UUID inventory folder name\"",command.c_str())); + report_to_nearby_chat(llformat("Packager usage: \"%s destination_prim_UUID inventory folder name\"",command.c_str())); } return false; } @@ -1342,7 +1342,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge cmd_line_mPackagerTargetFolderName = ""; cmd_line_mPackagerTargetFolder.setNull(); cmd_line_mPackagerDest.setNull(); - reportToNearbyChat("Packager: Stopped and cleared."); + report_to_nearby_chat("Packager: Stopped and cleared."); return false; } } @@ -1364,7 +1364,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge if (!LLUUID::validate(take)) { - reportToNearbyChat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); + report_to_nearby_chat("Entered UUID is invalid! (Hint: use the \"copy key\" button in the build menu.)"); return false; } else @@ -1372,7 +1372,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge LLViewerObject* objectp = gObjectList.findObject(LLUUID(take)); if(!objectp) { - reportToNearbyChat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); + report_to_nearby_chat("Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct."); return false; } else @@ -1388,23 +1388,23 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge if (to_take.empty()) { - reportToNearbyChat("No objects to take."); + report_to_nearby_chat("No objects to take."); } else { - reportToNearbyChat(llformat("Found destination folder \"%s\".", folder_name.c_str())); + report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); ztake = new JCZtake(folder, true, LLUUID::null, folder_name, (command == "kcopy") ? DRD_ACQUIRE_TO_AGENT_INVENTORY : DRD_TAKE_INTO_AGENT_INVENTORY, false, to_take); } } else { - reportToNearbyChat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); - reportToNearbyChat("The packager cannot work if the folder is inside another folder."); + report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); + report_to_nearby_chat("The packager cannot work if the folder is inside another folder."); } } catch (std::out_of_range) { - reportToNearbyChat("Please specify a destination folder in your inventory."); + report_to_nearby_chat("Please specify a destination folder in your inventory."); } } return false; @@ -1418,12 +1418,12 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { if (mtake) { - reportToNearbyChat("Mtake is already active."); + report_to_nearby_chat("Mtake is already active."); } else { - reportToNearbyChat("Beginning Mtake."); - reportToNearbyChat("Verifying folder location..."); + report_to_nearby_chat("Beginning Mtake."); + report_to_nearby_chat("Verifying folder location..."); std::string folder_name; std::string tmp; while (i >> tmp) @@ -1436,18 +1436,18 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge LLUUID folder = gInventory.findCategoryByName(folder_name); if (folder.notNull()) { - reportToNearbyChat(llformat("Found destination folder \"%s\".", folder_name.c_str())); + report_to_nearby_chat(llformat("Found destination folder \"%s\".", folder_name.c_str())); mtake = new TMZtake(folder); } else { - reportToNearbyChat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); - reportToNearbyChat("Mtake cannot work if the folder is inside another folder."); + report_to_nearby_chat(llformat("\"%s\" folder not found. Please check the spelling.", folder_name.c_str())); + report_to_nearby_chat("Mtake cannot work if the folder is inside another folder."); } } catch (std::out_of_range) { - reportToNearbyChat("Please specify a destination folder in your inventory."); + report_to_nearby_chat("Please specify a destination folder in your inventory."); } } } @@ -1455,7 +1455,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { if (!mtake) { - reportToNearbyChat("Mtake is already deactivated."); + report_to_nearby_chat("Mtake is already deactivated."); } else { @@ -1466,14 +1466,14 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge } else { - reportToNearbyChat(llformat("Invalid command: \"%s\". Valid commands: mtake on (destination inventory folder); mtake off", setting.c_str())); + report_to_nearby_chat(llformat("Invalid command: \"%s\". Valid commands: mtake on (destination inventory folder); mtake off", setting.c_str())); } return false; } else { - reportToNearbyChat("The Mtake command renames selected rezzed objects to the dimensions of the prim, then copies them into the folder you specify in your inventory."); - reportToNearbyChat("Valid commands: mtake on (destination inventory folder name); mtake off"); + report_to_nearby_chat("The Mtake command renames selected rezzed objects to the dimensions of the prim, then copies them into the folder you specify in your inventory."); + report_to_nearby_chat("Valid commands: mtake on (destination inventory folder name); mtake off"); } return false; } @@ -1493,11 +1493,11 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge LLStringUtil::format_map_t args; args["[POS]"] = cameraPositionString; - reportToNearbyChat(LLTrans::getString("FSCameraPositionCopied", args)); + report_to_nearby_chat(LLTrans::getString("FSCameraPositionCopied", args)); } else { - reportToNearbyChat("Could not get a valid region pointer."); + report_to_nearby_chat("Could not get a valid region pointer."); } return false; } @@ -1535,7 +1535,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { LLStringUtil::format_map_t args; args["COMMAND"] = llformat("%s", std::string(sFSCmdLineRollDice).c_str()); - reportToNearbyChat(LLTrans::getString("FSCmdLineRollDiceModifiersInvalid", args)); + report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceModifiersInvalid", args)); return false; } @@ -1552,11 +1552,11 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { result_per_die -= 1; die_penetrated = 0; - reportToNearbyChat(llformat("#%d 1d%d-1: %d.", die_iter, faces, result_per_die)); + report_to_nearby_chat(llformat("#%d 1d%d-1: %d.", die_iter, faces, result_per_die)); } else { - reportToNearbyChat(llformat("#%d 1d%d: %d.", die_iter, faces, result_per_die)); + report_to_nearby_chat(llformat("#%d 1d%d: %d.", die_iter, faces, result_per_die)); } result += result_per_die; ++die_iter; @@ -1566,7 +1566,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge // Modifier: Successes lower than a value if (result_per_die <= modifier) { - reportToNearbyChat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceSuccess")); + report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceSuccess")); ++successes; } else @@ -1579,7 +1579,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge // Modifier: Successes greater than a value if (result_per_die >= modifier) { - reportToNearbyChat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceSuccess")); + report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceSuccess")); ++successes; } else @@ -1590,13 +1590,13 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge else if ((modifier_type == "!" && result_per_die == modifier) || (modifier_type == "!>" && result_per_die >= modifier) || (modifier_type == "!<" && result_per_die <= modifier)) { // Modifier: Exploding dice - reportToNearbyChat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceExploded")); + report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceExploded")); --die_iter; } else if ((modifier_type == "!p" && result_per_die == modifier) || (modifier_type == "!p>" && result_per_die >= modifier) || (modifier_type == "!p<" && result_per_die <= modifier)) { // Modifier: Penetrating dice (special style of exploding dice) - reportToNearbyChat(" ^-- " + LLTrans::getString("FSCmdLineRollDicePenetrated")); + report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDicePenetrated")); die_penetrated = 1; --die_iter; } @@ -1604,7 +1604,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge { // Modifier: Reroll result -= result_per_die; - reportToNearbyChat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceReroll")); + report_to_nearby_chat(" ^-- " + LLTrans::getString("FSCmdLineRollDiceReroll")); --die_iter; } @@ -1614,7 +1614,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge // More than 1000 iterations already? We probably have an infinite loop - kill all further rolls // Explosions can trigger this easily, "rolld 1 6 !> 0" for example die_iter = 102; - reportToNearbyChat(LLTrans::getString("FSCmdLineRollDiceFreezeGuard")); + report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceFreezeGuard")); return false; } } @@ -1634,14 +1634,14 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge else if (modifier_type == ">" || modifier_type == "<") { // Modifier: Successes - reportToNearbyChat(LLTrans::getString("FSCmdLineRollDiceSuccess") + ": " + llformat("%d", successes)); + report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceSuccess") + ": " + llformat("%d", successes)); } modifier_type = modifier_type + llformat("%d", modifier); } } else { - reportToNearbyChat(LLTrans::getString("FSCmdLineRollDiceLimits")); + report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceLimits")); return false; } } @@ -1657,7 +1657,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge args["FACES"] = llformat("%d", faces); args["RESULT"] = llformat("%d", result); args["MODIFIER"] = llformat("%s", modifier_type.c_str()); - reportToNearbyChat(LLTrans::getString("FSCmdLineRollDiceTotal", args)); + report_to_nearby_chat(LLTrans::getString("FSCmdLineRollDiceTotal", args)); return false; } } @@ -1790,7 +1790,7 @@ bool cmdline_packager(const std::string& message, const LLUUID& fromID, const LL LLViewerObject* objectp = gObjectList.findObject(LLUUID(item)); if(!objectp) { - reportToNearbyChat(llformat("Packager: Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct: \"%s\"", item.c_str())); + report_to_nearby_chat(llformat("Packager: Unable to locate object. Please verify the object is rezzed, in view, and that the UUID is correct: \"%s\"", item.c_str())); return false; } else @@ -1806,12 +1806,12 @@ bool cmdline_packager(const std::string& message, const LLUUID& fromID, const LL } while(comma < csv.length()); - reportToNearbyChat(llformat("Packager: adding objects: \"%s\"", csv.c_str())); + report_to_nearby_chat(llformat("Packager: adding objects: \"%s\"", csv.c_str())); return true; } else if (cmd == "kpackagerend") { - reportToNearbyChat("Packager: finilizing."); + report_to_nearby_chat("Packager: finilizing."); ztake = new JCZtake(cmd_line_mPackagerTargetFolder, true, cmd_line_mPackagerDest, cmd_line_mPackagerTargetFolderName, DRD_ACQUIRE_TO_AGENT_INVENTORY, false, cmd_line_mPackagerToTake); cmd_line_mPackagerToTake.clear(); cmd_line_mPackagerTargetFolderName = ""; diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index e8e4f98e85..ca160beb36 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -966,8 +966,6 @@ void FSChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL name_params.color(name_color); name_params.readonly_color(name_color); - std::string prefix = chat.mText.substr(0, 4); - // FS:LO FIRE-2899 - Faded text for IMs in nearby chat F32 FSIMChatHistoryFade = gSavedSettings.getF32("FSIMChatHistoryFade"); @@ -979,7 +977,7 @@ void FSChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL // FS:LO FIRE-2899 - Faded text for IMs in nearby chat //IRC styled /me messages. - bool irc_me = (prefix == "/me " || prefix == "/me'"); + bool irc_me = is_irc_me_prefix(chat.mText); // Delimiter after a name in header copy/past and in plain text mode std::string delimiter = ": "; diff --git a/indra/newview/fschatoptionsmenu.cpp b/indra/newview/fschatoptionsmenu.cpp new file mode 100644 index 0000000000..b9a23f759a --- /dev/null +++ b/indra/newview/fschatoptionsmenu.cpp @@ -0,0 +1,184 @@ +/** + * @file fschatoptionsmenu.cpp + * @brief Handler for chat options menu + * + * $LicenseInfo:firstyear=2015&license=viewerlgpl$ + * Phoenix Firestorm Viewer Source Code + * Copyright (c) 2015 Ansariel Hiller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA + * http://www.firestormviewer.org + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "fschatoptionsmenu.h" + +#include "fsfloaterim.h" +#include "fsfloaternearbychat.h" +#include "llfloaterreg.h" +#include "llfloatersidepanelcontainer.h" +#include "llviewercontrol.h" + +void FSChatOptionsMenu::onMenuItemClick(const LLSD& userdata, LLUICtrl* source) +{ + const std::string option = userdata.asString(); + + if (option == "blocklist") + { + if (gSavedSettings.getBOOL("FSUseStandaloneBlocklistFloater")) + { + LLFloaterReg::toggleInstance("fs_blocklist"); + } + else + { + LLPanel* panel = LLFloaterSidePanelContainer::getPanel("people", "panel_people"); + if (!panel) + { + return; + } + + if (panel->isInVisibleChain()) + { + LLFloaterReg::hideInstance("people"); + } + else + { + LLFloaterSidePanelContainer::showPanel("people", "panel_people", LLSD().with("people_panel_tab_name", "blocked_panel")); + } + } + } + else if (option == "font_size_small") + { + gSavedSettings.setS32("ChatFontSize", 0); + } + else if (option == "font_size_medium") + { + gSavedSettings.setS32("ChatFontSize", 1); + } + else if (option == "font_size_large") + { + gSavedSettings.setS32("ChatFontSize", 2); + } + else if (option == "font_size_huge") + { + gSavedSettings.setS32("ChatFontSize", 3); + } + else if (option == "new_message_notification") + { + if (dynamic_cast(source)) + { + gSavedSettings.setBOOL("FSNotifyUnreadChatMessages", !gSavedSettings.getBOOL("FSNotifyUnreadChatMessages")); + } + else if (dynamic_cast(source)) + { + gSavedSettings.setBOOL("FSNotifyUnreadIMMessages", !gSavedSettings.getBOOL("FSNotifyUnreadIMMessages")); + } + } +} + +bool FSChatOptionsMenu::onMenuItemEnable(const LLSD& userdata, LLUICtrl* source) +{ + const std::string option = userdata.asString(); + + if (option == "typing_chevron") + { + FSFloaterIM* floater = dynamic_cast(source); + return (floater && floater->isP2PChat()); + } + else if (option == "show_channel_selection") + { + return gSavedSettings.getBOOL("FSNearbyChatbar"); + } + else if (option == "show_send_button") + { + return gSavedSettings.getBOOL("FSNearbyChatbar"); + } + + return false; +} + +bool FSChatOptionsMenu::onMenuItemVisible(const LLSD& userdata, LLUICtrl* source) +{ + const std::string option = userdata.asString(); + + if (option == "typing_chevron") + { + return (dynamic_cast(source) != NULL); + } + else if (option == "show_chat_bar") + { + return (dynamic_cast(source) != NULL); + } + else if (option == "show_channel_selection") + { + return (dynamic_cast(source) != NULL); + } + else if (option == "show_send_button") + { + return (dynamic_cast(source) != NULL); + } + else if (option == "show_im_send_button") + { + return (dynamic_cast(source) != NULL); + } + + return false; +} + +bool FSChatOptionsMenu::onMenuItemCheck(const LLSD& userdata, LLUICtrl* source) +{ + const std::string option = userdata.asString(); + + if (option == "blocklist") + { + if (gSavedSettings.getBOOL("FSUseStandaloneBlocklistFloater")) + { + return LLFloaterReg::instanceVisible("fs_blocklist"); + } + } + else if (option == "font_size_small") + { + return (gSavedSettings.getS32("ChatFontSize") == 0); + } + else if (option == "font_size_medium") + { + return (gSavedSettings.getS32("ChatFontSize") == 1); + } + else if (option == "font_size_large") + { + return (gSavedSettings.getS32("ChatFontSize") == 2); + } + else if (option == "font_size_huge") + { + return (gSavedSettings.getS32("ChatFontSize") == 3); + } + else if (option == "new_message_notification") + { + if (dynamic_cast(source)) + { + return gSavedSettings.getBOOL("FSNotifyUnreadChatMessages"); + } + else if (dynamic_cast(source)) + { + return gSavedSettings.getBOOL("FSNotifyUnreadIMMessages"); + } + } + + return false; +} diff --git a/indra/newview/fschatoptionsmenu.h b/indra/newview/fschatoptionsmenu.h new file mode 100644 index 0000000000..3958c7ab55 --- /dev/null +++ b/indra/newview/fschatoptionsmenu.h @@ -0,0 +1,41 @@ +/** + * @file fschatoptionsmenu.h + * @brief Handler for chat options menu + * + * $LicenseInfo:firstyear=2015&license=viewerlgpl$ + * Phoenix Firestorm Viewer Source Code + * Copyright (c) 2015 Ansariel Hiller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA + * http://www.firestormviewer.org + * $/LicenseInfo$ + */ + +#ifndef FS_CHATOPTIONSMENU_H +#define FS_CHATOPTIONSMENU_H + +#include "lluictrl.h" + +namespace FSChatOptionsMenu +{ + void onMenuItemClick(const LLSD& userdata, LLUICtrl* source); + bool onMenuItemEnable(const LLSD& userdata, LLUICtrl* source); + bool onMenuItemVisible(const LLSD& userdata, LLUICtrl* source); + bool onMenuItemCheck(const LLSD& userdata, LLUICtrl* source); +}; + +#endif // FS_CHATOPTIONSMENU_H diff --git a/indra/newview/fscommon.cpp b/indra/newview/fscommon.cpp index 5ba1504269..4191c1bd52 100644 --- a/indra/newview/fscommon.cpp +++ b/indra/newview/fscommon.cpp @@ -61,7 +61,7 @@ extern S32 gMaxAgentGroups; S32 FSCommon::sObjectAddMsg = 0; -void reportToNearbyChat(const std::string& message) +void report_to_nearby_chat(const std::string& message) { LLChat chat; chat.mText = message; @@ -69,76 +69,78 @@ void reportToNearbyChat(const std::string& message) LLNotificationsUI::LLNotificationManager::instance().onChat(chat, LLSD()); } -std::string applyAutoCloseOoc(const std::string& message) +std::string format_string(std::string text, const LLStringUtil::format_map_t& args) +{ + LLStringUtil::format(text, args); + return text; +} + +bool is_irc_me_prefix(const std::string& text) +{ + const std::string prefix = text.substr(0, 4); + return (prefix == "/me " || prefix == "/me'"); +} + +std::string FSCommon::applyAutoCloseOoc(std::string message) { if (!gSavedSettings.getBOOL("AutoCloseOOC")) { return message; } - std::string utf8_text(message); - // Try to find any unclosed OOC chat (i.e. an opening // double parenthesis without a matching closing double // parenthesis. - if (utf8_text.find("(( ") != -1 && utf8_text.find("))") == -1) + if (message.find("(( ") != std::string::npos && message.find("))") == std::string::npos) { // add the missing closing double parenthesis. - utf8_text += " ))"; + message += " ))"; } - else if (utf8_text.find("((") != -1 && utf8_text.find("))") == -1) + else if (message.find("((") != std::string::npos && message.find("))") == std::string::npos) { - if (utf8_text.at(utf8_text.length() - 1) == ')') + if (message.at(message.length() - 1) == ')') { // cosmetic: add a space first to avoid a closing triple parenthesis - utf8_text += " "; + message += " "; } // add the missing closing double parenthesis. - utf8_text += "))"; + message += "))"; } - else if (utf8_text.find("[[ ") != -1 && utf8_text.find("]]") == -1) + else if (message.find("[[ ") != std::string::npos && message.find("]]") == std::string::npos) { // add the missing closing double parenthesis. - utf8_text += " ]]"; + message += " ]]"; } - else if (utf8_text.find("[[") != -1 && utf8_text.find("]]") == -1) + else if (message.find("[[") != std::string::npos && message.find("]]") == std::string::npos) { - if (utf8_text.at(utf8_text.length() - 1) == ']') + if (message.at(message.length() - 1) == ']') { // cosmetic: add a space first to avoid a closing triple parenthesis - utf8_text += " "; + message += " "; } // add the missing closing double parenthesis. - utf8_text += "]]"; + message += "]]"; } - return utf8_text; + return message; } -std::string applyMuPose(const std::string& message) +std::string FSCommon::applyMuPose(std::string message) { - std::string utf8_text(message); - // Convert MU*s style poses into IRC emotes here. - if (gSavedSettings.getBOOL("AllowMUpose") && utf8_text.find(":") == 0 && utf8_text.length() > 3) + if (gSavedSettings.getBOOL("AllowMUpose") && message.find(":") == 0 && message.length() > 3) { - if (utf8_text.find(":'") == 0) + if (message.find(":'") == 0) { - utf8_text.replace(0, 1, "/me"); + message.replace(0, 1, "/me"); } - else if (!isdigit(utf8_text.at(1)) && !ispunct(utf8_text.at(1)) && !isspace(utf8_text.at(1))) // Do not prevent smileys and such. + else if (!isdigit(message.at(1)) && !ispunct(message.at(1)) && !isspace(message.at(1))) // Do not prevent smileys and such. { - utf8_text.replace(0, 1, "/me "); + message.replace(0, 1, "/me "); } } - return utf8_text; -} - -std::string formatString(std::string text, const LLStringUtil::format_map_t& args) -{ - LLStringUtil::format(text, args); - return text; + return message; } S32 FSCommon::secondsSinceEpochFromString(const std::string& format, const std::string& str) diff --git a/indra/newview/fscommon.h b/indra/newview/fscommon.h index c2efbb795f..7dbee113ab 100644 --- a/indra/newview/fscommon.h +++ b/indra/newview/fscommon.h @@ -36,13 +36,15 @@ class LLViewerObject; const F32 AVATAR_UNKNOWN_Z_OFFSET = -1.f; // Const value for avatars at unknown height const F32 AVATAR_UNKNOWN_RANGE = -1.f; -void reportToNearbyChat(const std::string& message); -std::string applyAutoCloseOoc(const std::string& message); -std::string applyMuPose(const std::string& message); -std::string formatString(std::string text, const LLStringUtil::format_map_t& args); +void report_to_nearby_chat(const std::string& message); +std::string format_string(std::string text, const LLStringUtil::format_map_t& args); +bool is_irc_me_prefix(const std::string& text); namespace FSCommon { + std::string applyAutoCloseOoc(std::string message); + std::string applyMuPose(std::string message); + /** * Convert a string of a specified date format into seconds since the Epoch. * diff --git a/indra/newview/fsconsoleutils.cpp b/indra/newview/fsconsoleutils.cpp index dbda6fbfe9..676797335c 100644 --- a/indra/newview/fsconsoleutils.cpp +++ b/indra/newview/fsconsoleutils.cpp @@ -30,22 +30,14 @@ #include "fsconsoleutils.h" #include "fscommon.h" -#include "fsfloaternearbychat.h" #include "llagent.h" #include "llavatarnamecache.h" #include "llconsole.h" -#include "llfloaterreg.h" #include "llimview.h" #include "lltrans.h" +#include "llviewerchat.h" #include "llviewercontrol.h" -// static -BOOL FSConsoleUtils::isNearbyChatVisible() -{ - FSFloaterNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("fs_nearby_chat", LLSD()); - return nearby_chat->getVisible(); -} - // static bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args) { @@ -74,11 +66,9 @@ bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args else if (chat_msg.mSourceType == CHAT_SOURCE_OBJECT) { 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'"; + bool irc_me = is_irc_me_prefix(chat_msg.mText); // Delimiter after a name in header copy/past and in plain text mode std::string delimiter = ": "; @@ -135,11 +125,9 @@ void FSConsoleUtils::onProcessChatAvatarNameLookup(const LLUUID& agent_id, const { 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'"; + bool irc_me = is_irc_me_prefix(chat_msg.mText); // Delimiter after a name in header copy/past and in plain text mode std::string delimiter = ": "; @@ -224,11 +212,9 @@ void FSConsoleUtils::onProccessInstantMessageNameLookup(const LLUUID& agent_id, 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'") + if (is_irc_me_prefix(message)) { delimiter = LLStringUtil::null; message = message.substr(3); diff --git a/indra/newview/fsconsoleutils.h b/indra/newview/fsconsoleutils.h index 80e1fd0a61..612abf74a4 100644 --- a/indra/newview/fsconsoleutils.h +++ b/indra/newview/fsconsoleutils.h @@ -34,12 +34,10 @@ class LLChat; class FSConsoleUtils { public: - static bool ProcessChatMessage(const LLChat& chat_msg, const LLSD &args); static bool ProcessInstantMessage(const LLUUID& session_id, const LLUUID& from_id, const std::string& message); protected: - static BOOL isNearbyChatVisible(); static void onProcessChatAvatarNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, const LLChat& chat_msg); static void onProccessInstantMessageNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, const std::string& message_str, const std::string& group, const LLUUID& session_id); diff --git a/indra/newview/fsfloatergrouptitles.cpp b/indra/newview/fsfloatergrouptitles.cpp index d5a319d7e7..30c8cab800 100644 --- a/indra/newview/fsfloatergrouptitles.cpp +++ b/indra/newview/fsfloatergrouptitles.cpp @@ -92,7 +92,7 @@ BOOL FSFloaterGroupTitles::postBuild() mTitleList->setDoubleClickCallback(boost::bind(&FSFloaterGroupTitles::activateGroupTitle, this)); mTitleList->setCommitCallback(boost::bind(&FSFloaterGroupTitles::selectedTitleChanged, this)); - mTitleList->sortByColumn("grouptitle", TRUE); + mTitleList->sortByColumn("title_sort_column", TRUE); refreshGroupTitles(); @@ -156,10 +156,10 @@ void FSFloaterGroupTitles::addListItem(const LLUUID& group_id, const LLUUID& rol item["columns"][3]["value"] = group_id; item["columns"][4]["column"] = "title_sort_column"; item["columns"][4]["type"] = "text"; - item["columns"][4]["value"] = (is_group ? title : ""); + item["columns"][4]["value"] = (is_group ? ("1_" + title) : "0"); item["columns"][5]["column"] = "name_sort_column"; item["columns"][5]["type"] = "text"; - item["columns"][5]["value"] = (is_group ? group_name : ""); + item["columns"][5]["value"] = (is_group ? ("1_" + group_name) : "0"); mTitleList->addElement(item); diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp index f737ca9a30..c485901744 100644 --- a/indra/newview/fsfloaterim.cpp +++ b/indra/newview/fsfloaterim.cpp @@ -32,6 +32,7 @@ #include "fsfloaterim.h" #include "fschathistory.h" +#include "fschatoptionsmenu.h" #include "fscommon.h" #include "fsdata.h" #include "fsfloaterimcontainer.h" // to replace separate IM Floaters with multifloater container @@ -139,7 +140,12 @@ FSFloaterIM::FSFloaterIM(const LLUUID& session_id) mCommitCallbackRegistrar.add("IMSession.Menu.Action", boost::bind(&FSFloaterIM::doToSelected, this, _2)); mEnableCallbackRegistrar.add("IMSession.Menu.Enable", boost::bind(&FSFloaterIM::checkEnabled, this, _2)); - + + mEnableCallbackRegistrar.add("ChatOptions.Check", boost::bind(&FSFloaterIM::onChatOptionsCheckContextMenuItem, this, _2)); + mCommitCallbackRegistrar.add("ChatOptions.Action", boost::bind(&FSFloaterIM::onChatOptionsContextMenuItemClicked, this, _2)); + mEnableCallbackRegistrar.add("ChatOptions.Visible", boost::bind(&FSFloaterIM::onChatOptionsVisibleContextMenuItem, this, _2)); + mEnableCallbackRegistrar.add("ChatOptions.Enable", boost::bind(&FSFloaterIM::onChatOptionsEnableContextMenuItem, this, _2)); + setOverlapsScreenChannel(true); LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this); @@ -350,8 +356,8 @@ void FSFloaterIM::sendMsgFromInputEditor(EChatType type) std::string utf8_text = wstring_to_utf8str(text); // Convert OOC and MU* style poses - utf8_text = applyAutoCloseOoc(utf8_text); - utf8_text = applyMuPose(utf8_text); + utf8_text = FSCommon::applyAutoCloseOoc(utf8_text); + utf8_text = FSCommon::applyMuPose(utf8_text); // Support group chat prefix static LLCachedControl chat_prefix(gSavedSettings, "FSSupportGroupChatPrefix2"); @@ -377,7 +383,7 @@ void FSFloaterIM::sendMsgFromInputEditor(EChatType type) #else std::string strFSTag = "(FS64 "; #endif - if (utf8_text.find("/me ") == 0 || utf8_text.find("/me'") == 0) + if (is_irc_me_prefix(utf8_text)) { utf8_text.insert(4,(strFSTag + LLVersionInfo::getShortVersion() + skinIndicator + #ifdef OPENSIM @@ -596,6 +602,26 @@ bool FSFloaterIM::checkEnabled(const LLSD& userdata) return false; } +void FSFloaterIM::onChatOptionsContextMenuItemClicked(const LLSD& userdata) +{ + FSChatOptionsMenu::onMenuItemClick(userdata, this); +} + +bool FSFloaterIM::onChatOptionsCheckContextMenuItem(const LLSD& userdata) +{ + return FSChatOptionsMenu::onMenuItemCheck(userdata, this); +} + +bool FSFloaterIM::onChatOptionsVisibleContextMenuItem(const LLSD& userdata) +{ + return FSChatOptionsMenu::onMenuItemVisible(userdata, this); +} + +bool FSFloaterIM::onChatOptionsEnableContextMenuItem(const LLSD& userdata) +{ + return FSChatOptionsMenu::onMenuItemEnable(userdata, this); +} + // support sysinfo button -Zi void FSFloaterIM::onSysinfoButtonClicked() { @@ -842,6 +868,8 @@ BOOL FSFloaterIM::postBuild() mInputEditor->enableSingleLineMode(gSavedSettings.getBOOL("FSUseSingleLineChatEntry")); mInputEditor->setCommitCallback(boost::bind(&FSFloaterIM::sendMsgFromInputEditor, this, CHAT_TYPE_NORMAL)); + getChild("send_chat")->setCommitCallback(boost::bind(&FSFloaterIM::sendMsgFromInputEditor, this, CHAT_TYPE_NORMAL)); + BOOL isFSSupportGroup = FSData::getInstance()->isSupportGroup(mSessionID); getChild("support_panel")->setVisible(isFSSupportGroup); diff --git a/indra/newview/fsfloaterim.h b/indra/newview/fsfloaterim.h index cd185dcf48..04a051d9dc 100644 --- a/indra/newview/fsfloaterim.h +++ b/indra/newview/fsfloaterim.h @@ -153,6 +153,8 @@ public: void loadInitialInvitedIDs(); + bool isP2PChat() const { return mIsP2PChat; } + protected: /* virtual */ void onClickCloseBtn(bool app_quitting = false); @@ -226,6 +228,11 @@ private: void addSessionParticipants(const uuid_vec_t& uuids); void addP2PSessionParticipants(const LLSD& notification, const LLSD& response, const uuid_vec_t& uuids); + void onChatOptionsContextMenuItemClicked(const LLSD& userdata); + bool onChatOptionsCheckContextMenuItem(const LLSD& userdata); + bool onChatOptionsVisibleContextMenuItem(const LLSD& userdata); + bool onChatOptionsEnableContextMenuItem(const LLSD& userdata); + FSPanelChatControlPanel* mControlPanel; LLUUID mSessionID; S32 mLastMessageIndex; diff --git a/indra/newview/fsfloaternearbychat.cpp b/indra/newview/fsfloaternearbychat.cpp index f729ab46e9..dfbe80634d 100644 --- a/indra/newview/fsfloaternearbychat.cpp +++ b/indra/newview/fsfloaternearbychat.cpp @@ -34,6 +34,7 @@ #include "chatbar_as_cmdline.h" #include "fschathistory.h" +#include "fschatoptionsmenu.h" #include "fscommon.h" #include "fsfloaterim.h" #include "fsfloaterimcontainer.h" @@ -50,7 +51,6 @@ #include "llconsole.h" #include "lldraghandle.h" #include "llfloaterreg.h" -#include "llfloatersidepanelcontainer.h" #include "llfocusmgr.h" #include "llgesturemgr.h" #include "lliconctrl.h" @@ -76,20 +76,6 @@ S32 FSFloaterNearbyChat::sLastSpecialChatChannel = 0; -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-0.2.2) -void send_chat_from_nearby_floater(std::string utf8_out_text, EChatType type, S32 channel); -// [/RLVa:KB] -void really_send_chat_from_nearby_floater(std::string utf8_out_text, EChatType type, S32 channel); - -struct LLChatTypeTrigger { - std::string name; - EChatType type; -}; - -static LLChatTypeTrigger sChatTypeTriggers[] = { - { "/whisper" , CHAT_TYPE_WHISPER}, - { "/shout" , CHAT_TYPE_SHOUT} -}; FSFloaterNearbyChat::FSFloaterNearbyChat(const LLSD& key) : LLFloater(key) @@ -104,6 +90,11 @@ FSFloaterNearbyChat::FSFloaterNearbyChat(const LLSD& key) ,mUnreadMessages(0) ,mUnreadMessagesMuted(0) { + //menu + mEnableCallbackRegistrar.add("ChatOptions.Check", boost::bind(&FSFloaterNearbyChat::onChatOptionsCheckContextMenuItem, this, _2)); + mCommitCallbackRegistrar.add("ChatOptions.Action", boost::bind(&FSFloaterNearbyChat::onChatOptionsContextMenuItemClicked, this, _2)); + mEnableCallbackRegistrar.add("ChatOptions.Visible", boost::bind(&FSFloaterNearbyChat::onChatOptionsVisibleContextMenuItem, this, _2)); + mEnableCallbackRegistrar.add("ChatOptions.Enable", boost::bind(&FSFloaterNearbyChat::onChatOptionsEnableContextMenuItem, this, _2)); } FSFloaterNearbyChat::~FSFloaterNearbyChat() @@ -129,21 +120,6 @@ void FSFloaterNearbyChat::updateFSUseNearbyChatConsole(const LLSD &data) BOOL FSFloaterNearbyChat::postBuild() { setIsSingleInstance(TRUE); - - //menu - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; - - enable_registrar.add("NearbyChat.Check", boost::bind(&FSFloaterNearbyChat::onNearbyChatCheckContextMenuItem, this, _2)); - registrar.add("NearbyChat.Action", boost::bind(&FSFloaterNearbyChat::onNearbyChatContextMenuItemClicked, this, _2)); - - LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile("menu_nearby_chat.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - if (menu) - { - mPopupMenuHandle = menu->getHandle(); - } - - gSavedSettings.declareS32("nearbychat_showicons_and_names", 2, "NearByChat header settings"); mInputEditor = getChild("chat_box"); mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5)); @@ -316,13 +292,6 @@ BOOL FSFloaterNearbyChat::focusFirstItem(BOOL prefer_text_fields, BOOL focus_fla return TRUE; } -void FSFloaterNearbyChat::onNearbySpeakers() -{ - LLSD param; - param["people_panel_tab_name"] = "nearby_panel"; - LLFloaterSidePanelContainer::showPanel("people", "panel_people", param); -} - void FSFloaterNearbyChat::onHistoryButtonClicked() { if (gSavedSettings.getBOOL("FSUseBuiltInHistory")) @@ -335,18 +304,24 @@ void FSFloaterNearbyChat::onHistoryButtonClicked() } } -void FSFloaterNearbyChat::onNearbyChatContextMenuItemClicked(const LLSD& userdata) +void FSFloaterNearbyChat::onChatOptionsContextMenuItemClicked(const LLSD& userdata) { + FSChatOptionsMenu::onMenuItemClick(userdata, this); } -bool FSFloaterNearbyChat::onNearbyChatCheckContextMenuItem(const LLSD& userdata) +bool FSFloaterNearbyChat::onChatOptionsCheckContextMenuItem(const LLSD& userdata) { - std::string str = userdata.asString(); - if (str == "nearby_people") - { - onNearbySpeakers(); - } - return false; + return FSChatOptionsMenu::onMenuItemCheck(userdata, this); +} + +bool FSFloaterNearbyChat::onChatOptionsVisibleContextMenuItem(const LLSD& userdata) +{ + return FSChatOptionsMenu::onMenuItemVisible(userdata, this); +} + +bool FSFloaterNearbyChat::onChatOptionsEnableContextMenuItem(const LLSD& userdata) +{ + return FSChatOptionsMenu::onMenuItemEnable(userdata, this); } void FSFloaterNearbyChat::openFloater(const LLSD& key) @@ -693,6 +668,7 @@ BOOL FSFloaterNearbyChat::handleKeyHere( KEY key, MASK mask ) } else if (mask == (MASK_SHIFT | MASK_CONTROL)) { + // linefeed if (!gSavedSettings.getBOOL("FSUseSingleLineChatEntry")) { if ((wstring_utf8_length(mInputEditor->getWText()) + wchar_utf8_length('\n')) > mInputEditor->getMaxTextLength()) @@ -726,7 +702,14 @@ BOOL FSFloaterNearbyChat::handleKeyHere( KEY key, MASK mask ) void FSFloaterNearbyChat::onChatBoxKeystroke() { - FSNearbyChat::handleChatBarKeystroke(mInputEditor); + S32 channel = 0; + if (gSavedSettings.getBOOL("FSNearbyChatbar") && + gSavedSettings.getBOOL("FSShowChatChannel")) + { + channel = (S32)(FSFloaterNearbyChat::getInstance()->getChild("ChatChannel")->get()); + } + + FSNearbyChat::handleChatBarKeystroke(mInputEditor, channel); } // static @@ -746,38 +729,6 @@ void FSFloaterNearbyChat::reshapeChatLayoutPanel() mChatLayoutPanel->reshape(mChatLayoutPanel->getRect().getWidth(), mInputEditor->getRect().getHeight() + mInputEditorPad, FALSE); } -EChatType FSFloaterNearbyChat::processChatTypeTriggers(EChatType type, std::string &str) -{ - U32 length = str.length(); - S32 cnt = sizeof(sChatTypeTriggers) / sizeof(*sChatTypeTriggers); - - for (S32 n = 0; n < cnt; n++) - { - if (length >= sChatTypeTriggers[n].name.length()) - { - std::string trigger = str.substr(0, sChatTypeTriggers[n].name.length()); - - if (!LLStringUtil::compareInsensitive(trigger, sChatTypeTriggers[n].name)) - { - U32 trigger_length = sChatTypeTriggers[n].name.length(); - - // It's to remove space after trigger name - if (length > trigger_length && str[trigger_length] == ' ') - trigger_length++; - - str = str.substr(trigger_length, length); - - if (CHAT_TYPE_NORMAL == type) - return sChatTypeTriggers[n].type; - else - break; - } - } - } - - return type; -} - void FSFloaterNearbyChat::sendChat( EChatType type ) { if (mInputEditor) @@ -813,8 +764,8 @@ void FSFloaterNearbyChat::sendChat( EChatType type ) if (0 == channel) { // Convert OOC and MU* style poses - utf8text = applyAutoCloseOoc(utf8text); - utf8text = applyMuPose(utf8text); + utf8text = FSCommon::applyAutoCloseOoc(utf8text); + utf8text = FSCommon::applyMuPose(utf8text); // discard returned "found" boolean if(!LLGestureMgr::instance().triggerAndReviseString(utf8text, &utf8_revised_text)) @@ -839,7 +790,7 @@ void FSFloaterNearbyChat::sendChat( EChatType type ) nType = type; } - type = processChatTypeTriggers(nType, utf8_revised_text); + type = FSNearbyChat::processChatTypeTriggers(nType, utf8_revised_text); if (!utf8_revised_text.empty() && cmd_line_chat(utf8_revised_text, type)) { @@ -891,82 +842,19 @@ void FSFloaterNearbyChat::onChatTypeChanged() void FSFloaterNearbyChat::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate) { - sendChatFromViewer(utf8str_to_wstring(utf8text), type, animate); -} - -void FSFloaterNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate) -{ + LLWString wtext = utf8string_to_wstring(utf8text); S32 channel = 0; bool is_set = false; LLWString out_text = FSNearbyChat::stripChannelNumber(wtext, &channel, &sLastSpecialChatChannel, &is_set); - // If "/" is not specified, see if a channel has been set in - // the spinner. + // If "/" is not specified, see if a channel has been set in the spinner. if (!is_set && gSavedSettings.getBOOL("FSNearbyChatbar") && gSavedSettings.getBOOL("FSShowChatChannel")) { - // [FS communication UI] - //channel = (S32)(LLFloaterNearbyChat::getInstance()->getChild("ChatChannel")->get()); channel = (S32)(FSFloaterNearbyChat::getInstance()->getChild("ChatChannel")->get()); - // [FS communication UI] } - std::string utf8_out_text = wstring_to_utf8str(out_text); - std::string utf8_text = wstring_to_utf8str(wtext); - - utf8_text = utf8str_trim(utf8_text); - if (!utf8_text.empty()) - { - utf8_text = utf8str_truncate(utf8_text, MAX_STRING - 1); - } - - // [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b - if ( (0 == channel) && (rlv_handler_t::isEnabled()) ) - { - // Adjust the (public) chat "volume" on chat and gestures (also takes care of playing the proper animation) - if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATNORMAL)) ) - type = CHAT_TYPE_WHISPER; - else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATSHOUT)) ) - type = CHAT_TYPE_NORMAL; - else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATWHISPER)) ) - type = CHAT_TYPE_NORMAL; - - animate &= !gRlvHandler.hasBehaviour( (!RlvUtil::isEmote(utf8_text)) ? RLV_BHVR_REDIRCHAT : RLV_BHVR_REDIREMOTE ); - } - // [/RLVa:KB] - - // Don't animate for chats people can't hear (chat to scripts) - if (animate && (channel == 0)) - { - if (type == CHAT_TYPE_WHISPER) - { - LL_DEBUGS("FSFloaterNearbyChat") << "You whisper " << utf8_text << LL_ENDL; - gAgent.sendAnimationRequest(ANIM_AGENT_WHISPER, ANIM_REQUEST_START); - } - else if (type == CHAT_TYPE_NORMAL) - { - LL_DEBUGS("FSFloaterNearbyChat") << "You say " << utf8_text << LL_ENDL; - gAgent.sendAnimationRequest(ANIM_AGENT_TALK, ANIM_REQUEST_START); - } - else if (type == CHAT_TYPE_SHOUT) - { - LL_DEBUGS("FSFloaterNearbyChat") << "You shout " << utf8_text << LL_ENDL; - gAgent.sendAnimationRequest(ANIM_AGENT_SHOUT, ANIM_REQUEST_START); - } - else - { - LL_INFOS("FSFloaterNearbyChat") << "send_chat_from_viewer() - invalid volume" << LL_ENDL; - return; - } - } - else - { - if (type != CHAT_TYPE_START && type != CHAT_TYPE_STOP) - { - LL_DEBUGS("FSFloaterNearbyChat") << "Channel chat: " << utf8_text << LL_ENDL; - } - } - - send_chat_from_nearby_floater(utf8_out_text, type, channel); + + FSNearbyChat::sendChatFromViewer(wtext, out_text, type, animate, channel); } // Exit "chat mode" and do the appropriate focus changes @@ -977,161 +865,10 @@ void FSFloaterNearbyChat::stopChat() if (nearby_chat) { nearby_chat->mInputEditor->setFocus(FALSE); - gAgent.stopTyping(); + gAgent.stopTyping(); } } -//void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel) -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-0.2.2a -void send_chat_from_nearby_floater(std::string utf8_out_text, EChatType type, S32 channel) -// [/RLVa:KB] -{ - // [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0a - // Only process chat messages (ie not CHAT_TYPE_START, CHAT_TYPE_STOP, etc) - if ( (rlv_handler_t::isEnabled()) && ( (CHAT_TYPE_WHISPER == type) || (CHAT_TYPE_NORMAL == type) || (CHAT_TYPE_SHOUT == type) ) ) - { - if (0 == channel) - { - // (We already did this before, but LLChatHandler::handle() calls this directly) - if ( ((CHAT_TYPE_SHOUT == type) || (CHAT_TYPE_NORMAL == type)) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATNORMAL)) ) - type = CHAT_TYPE_WHISPER; - else if ( (CHAT_TYPE_SHOUT == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATSHOUT)) ) - type = CHAT_TYPE_NORMAL; - else if ( (CHAT_TYPE_WHISPER == type) && (gRlvHandler.hasBehaviour(RLV_BHVR_CHATWHISPER)) ) - type = CHAT_TYPE_NORMAL; - - // Redirect chat if needed - if ( ( (gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT) || (gRlvHandler.hasBehaviour(RLV_BHVR_REDIREMOTE)) ) && - (gRlvHandler.redirectChatOrEmote(utf8_out_text)) ) ) - { - return; - } - - // Filter public chat if sendchat restricted - if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHAT)) - gRlvHandler.filterChat(utf8_out_text, true); - } - else - { - // Don't allow chat on a non-public channel if sendchannel restricted (unless the channel is an exception) - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHANNEL)) && (!gRlvHandler.isException(RLV_BHVR_SENDCHANNEL, channel)) ) - return; - - // Don't allow chat on debug channel if @sendchat, @redirchat or @rediremote restricted (shows as public chat on viewers) - if (CHAT_CHANNEL_DEBUG == channel) - { - bool fIsEmote = RlvUtil::isEmote(utf8_out_text); - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHAT)) || - ((!fIsEmote) && (gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT))) || - ((fIsEmote) && (gRlvHandler.hasBehaviour(RLV_BHVR_REDIREMOTE))) ) - { - return; - } - } - } - } - // [/RLVa:KB] - - // FIRE-787: break up too long chat lines into multiple messages - U32 split = MAX_MSG_BUF_SIZE - 1; - U32 pos = 0; - U32 total = utf8_out_text.length(); - - // Don't break null messages - if(total == 0) - { - really_send_chat_from_nearby_floater(utf8_out_text, type, channel); - } - - while(pos < total) - { - U32 next_split = split; - - if (pos + next_split > total) - { - // just send the rest of the message - next_split = total - pos; - } - else - { - // first, try to split at a space - while((U8(utf8_out_text[pos + next_split]) != ' ') - && (next_split > 0)) - { - --next_split; - } - - if (next_split == 0) - { - next_split = split; - // no space found, split somewhere not in the middle of UTF-8 - while((U8(utf8_out_text[pos + next_split]) >= 0x80) - && (U8(utf8_out_text[pos + next_split]) < 0xC0) - && (next_split > 0)) - { - --next_split; - } - } - - if(next_split == 0) - { - next_split = split; - LL_WARNS("Splitting") << "utf-8 couldn't be split correctly" << LL_ENDL; - } - } - - std::string send = utf8_out_text.substr(pos, next_split); - pos += next_split; - - // *FIXME: Queue messages and wait for server - really_send_chat_from_nearby_floater(send, type, channel); - } - - // moved here so we don't bump the count for every message segment - add(LLStatViewer::CHAT_COUNT,1); - // FIRE-787 -} - -// FIRE-787: break up too long chat lines into multiple messages -// This function just sends the message, with no other processing. Moved out -// of send_chat_from_viewer. -void really_send_chat_from_nearby_floater(std::string utf8_out_text, EChatType type, S32 channel) -{ - LLMessageSystem* msg = gMessageSystem; - - // gMessageSystem can be 0, not sure how it is exactly to reproduce, maybe during viewer shutdown? - if( !msg ) - return; - // - - if(channel >= 0) - { - msg->newMessageFast(_PREHASH_ChatFromViewer); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgentID); - msg->addUUIDFast(_PREHASH_SessionID, gAgentSessionID); - msg->nextBlockFast(_PREHASH_ChatData); - msg->addStringFast(_PREHASH_Message, utf8_out_text); - msg->addU8Fast(_PREHASH_Type, type); - msg->addS32("Channel", channel); - } - else - { - msg->newMessage("ScriptDialogReply"); - msg->nextBlock("AgentData"); - msg->addUUID("AgentID", gAgentID); - msg->addUUID("SessionID", gAgentSessionID); - msg->nextBlock("Data"); - msg->addUUID("ObjectID", gAgentID); - msg->addS32("ChatChannel", channel); - msg->addS32("ButtonIndex", 0); - msg->addString("ButtonLabel", utf8_out_text); - } - - gAgent.sendReliableMessage(); -} -// FIRE-787 - void FSFloaterNearbyChat::updateUnreadMessageNotification(S32 unread_messages, bool muted_history) { BOOL show_muted_history = gSavedSettings.getBOOL("FSShowMutedChatHistory"); diff --git a/indra/newview/fsfloaternearbychat.h b/indra/newview/fsfloaternearbychat.h index 0b66c0b29d..d03cb4e1d3 100644 --- a/indra/newview/fsfloaternearbychat.h +++ b/indra/newview/fsfloaternearbychat.h @@ -49,16 +49,14 @@ public: FSFloaterNearbyChat(const LLSD& key); ~FSFloaterNearbyChat(); - BOOL postBuild (); + BOOL postBuild(); /** @param archive true - to save a message to the chat history log */ - void addMessage (const LLChat& message,bool archive = true, const LLSD &args = LLSD()); - void onNearbyChatContextMenuItemClicked(const LLSD& userdata); - bool onNearbyChatCheckContextMenuItem(const LLSD& userdata); + void addMessage(const LLChat& message,bool archive = true, const LLSD &args = LLSD()); - /*virtual*/ void onOpen (const LLSD& key); + /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ void setVisible(BOOL visible); void openFloater(const LLSD& key); void clearChatHistory(); @@ -71,11 +69,11 @@ public: static FSFloaterNearbyChat* findInstance(); static FSFloaterNearbyChat* getInstance(); - + void removeScreenChat(); - + static bool isChatMultiTab(); - + BOOL getVisible(); void onHistoryButtonClicked(); @@ -92,12 +90,9 @@ public: S32 getMessageArchiveLength() {return mMessageArchive.size();} virtual BOOL handleKeyHere( KEY key, MASK mask ); - + static void startChat(const char* line); static void stopChat(); - - static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate); - static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); void updateUnreadMessageNotification(S32 unread_messages, bool muted_history); void updateShowMutedChatHistory(const LLSD &data); @@ -108,20 +103,21 @@ protected: void onChatBoxFocusReceived(); void sendChat( EChatType type ); + void sendChatFromViewer(const std::string& utf8text, EChatType type, BOOL animate); void onChatBoxCommit(); void onChatTypeChanged(); - EChatType processChatTypeTriggers(EChatType type, std::string &str); void reshapeFloater(bool collapse); void reshapeChatLayoutPanel(); static S32 sLastSpecialChatChannel; private: - void onNearbySpeakers(); + void onChatOptionsContextMenuItemClicked(const LLSD& userdata); + bool onChatOptionsCheckContextMenuItem(const LLSD& userdata); + bool onChatOptionsVisibleContextMenuItem(const LLSD& userdata); + bool onChatOptionsEnableContextMenuItem(const LLSD& userdata); -private: - LLHandle mPopupMenuHandle; FSChatHistory* mChatHistory; FSChatHistory* mChatHistoryMuted; LLChatEntry* mInputEditor; diff --git a/indra/newview/fsfloatersearch.cpp b/indra/newview/fsfloatersearch.cpp index c7b7b4650d..efc9fde8e4 100644 --- a/indra/newview/fsfloatersearch.cpp +++ b/indra/newview/fsfloatersearch.cpp @@ -2746,20 +2746,10 @@ void FSPanelSearchWeb::loadURL(const SearchQuery &p) { url = debug_url; } - else if(LLGridManager::getInstance()->isInOpenSim()) - { - std::string os_search_url = LFSimFeatureHandler::instance().searchURL(); - if (!os_search_url.empty()) - url = os_search_url; - else if (LLLoginInstance::getInstance()->hasResponse("search")) - url = LLLoginInstance::getInstance()->getResponse("search").asString(); - else - url = gSavedSettings.getString("SearchURLOpenSim"); - } else #endif // OPENSIM { - url = gSavedSettings.getString("SearchURL"); + url = LFSimFeatureHandler::instance().searchURL(); } url = LLWeb::expandURLSubstitutions(url, subs); diff --git a/indra/newview/fskeywords.cpp b/indra/newview/fskeywords.cpp index 28fd378f84..36f1fb22c6 100644 --- a/indra/newview/fskeywords.cpp +++ b/indra/newview/fskeywords.cpp @@ -26,6 +26,7 @@ #include "llviewerprecompiledheaders.h" +#include "fscommon.h" #include "fskeywords.h" #include "growlmanager.h" #include "llagent.h" @@ -155,8 +156,7 @@ void FSKeywords::notify(const LLChat& chat) if (FSEnableGrowl) { std::string msg = chat.mFromName; - std::string prefix = chat.mText.substr(0, 4); - if (prefix == "/me " || prefix == "/me'") + if (is_irc_me_prefix(chat.mText)) { msg = msg + chat.mText.substr(3); } diff --git a/indra/newview/fslslbridge.cpp b/indra/newview/fslslbridge.cpp index ca89fdd82d..2a4b4c3a8e 100644 --- a/indra/newview/fslslbridge.cpp +++ b/indra/newview/fslslbridge.cpp @@ -221,7 +221,7 @@ bool FSLSLBridge::lslToViewer(const std::string& message, const LLUUID& fromID, if (gSavedPerAccountSettings.getBOOL("UseMoveLock")) { updateBoolSettingValue("UseMoveLock"); - reportToNearbyChat(LLTrans::getString("MovelockEnabling")); + report_to_nearby_chat(LLTrans::getString("MovelockEnabling")); } // @@ -238,7 +238,7 @@ bool FSLSLBridge::lslToViewer(const std::string& message, const LLUUID& fromID, { // Don't call for update here and only change setting to 'false', getCommitSignal()->connect->boost in llviewercontrol.cpp will send a message to Bridge anyway gSavedPerAccountSettings.setBOOL("UseMoveLock", false); - reportToNearbyChat(LLTrans::getString("MovelockDisabling")); + report_to_nearby_chat(LLTrans::getString("MovelockDisabling")); } else { @@ -329,24 +329,24 @@ bool FSLSLBridge::lslToViewer(const std::string& message, const LLUUID& fromID, { LLStringUtil::format_map_t args2; args2["OBJECT_CHARACTER_TIME"] = scriptInfoArray[5].asString(); - args["PATHFINDING_TEXT"] = " " + formatString(LLTrans::getString("fsbridge_script_info_pf"), args2); + args["PATHFINDING_TEXT"] = " " + format_string(LLTrans::getString("fsbridge_script_info_pf"), args2); } else { args["PATHFINDING_TEXT"] = ""; } - reportToNearbyChat(formatString(LLTrans::getString("fsbridge_script_info"), args)); + report_to_nearby_chat(format_string(LLTrans::getString("fsbridge_script_info"), args)); } else { - reportToNearbyChat(LLTrans::getString("fsbridge_error_scriptinfonotfound")); + report_to_nearby_chat(LLTrans::getString("fsbridge_error_scriptinfonotfound")); LL_WARNS("FSLSLBridge") << "ScriptInfo - Object to check is invalid or out of range (warning returned by viewer, data somehow passed bridge script check)" << LL_ENDL; } } else { - reportToNearbyChat(LLTrans::getString("fsbridge_error_scriptinfomalformed")); + report_to_nearby_chat(LLTrans::getString("fsbridge_error_scriptinfomalformed")); LL_WARNS("FSLSLBridge") << "ScriptInfo - Received malformed response from bridge (missing ending tag)" << LL_ENDL; } } @@ -361,11 +361,11 @@ bool FSLSLBridge::lslToViewer(const std::string& message, const LLUUID& fromID, { if (message.substr(valuepos + FS_STATE_ATTRIBUTE.size(), 1) == "1") { - reportToNearbyChat(LLTrans::getString("MovelockEnabled")); + report_to_nearby_chat(LLTrans::getString("MovelockEnabled")); } else if (message.substr(valuepos + FS_STATE_ATTRIBUTE.size(), 1) == "0") { - reportToNearbyChat(LLTrans::getString("MovelockDisabled")); + report_to_nearby_chat(LLTrans::getString("MovelockDisabled")); } else { @@ -384,17 +384,17 @@ bool FSLSLBridge::lslToViewer(const std::string& message, const LLUUID& fromID, { if (message.substr(valuepos + FS_ERROR_ATTRIBUTE.size(), 9) == "injection") { - reportToNearbyChat(LLTrans::getString("fsbridge_error_injection")); + report_to_nearby_chat(LLTrans::getString("fsbridge_error_injection")); LL_WARNS("FSLSLBridge") << "Script injection detected" << LL_ENDL; } else if (message.substr(valuepos + FS_ERROR_ATTRIBUTE.size(), 18) == "scriptinfonotfound") { - reportToNearbyChat(LLTrans::getString("fsbridge_error_scriptinfonotfound")); + report_to_nearby_chat(LLTrans::getString("fsbridge_error_scriptinfonotfound")); LL_WARNS("FSLSLBridge") << "ScriptInfo - Object to check is invalid or out of range (warning returned by bridge)" << LL_ENDL; } else if (message.substr(valuepos + FS_ERROR_ATTRIBUTE.size(), 7) == "wrongvm") { - reportToNearbyChat(LLTrans::getString("fsbridge_error_wrongvm")); + report_to_nearby_chat(LLTrans::getString("fsbridge_error_wrongvm")); LL_WARNS("FSLSLBridge") << "Script is using old LSO (16 KB memory limit) instead of new Mono (64 KB memory limit) virtual machine, which creates high probability of stack-heap collision and bridge failure by running out of memory" << LL_ENDL; } else @@ -485,7 +485,7 @@ void FSLSLBridge::recreateBridge() { // FIRE-11746: Recreate should throw error if disabled LL_WARNS("FSLSLBridge") << "Asked to create bridge, but bridge is disabled. Aborting." << LL_ENDL; - reportToNearbyChat(LLTrans::getString("fsbridge_cant_create_disabled")); + report_to_nearby_chat(LLTrans::getString("fsbridge_cant_create_disabled")); setBridgeCreating(false); // FIRE-11746 return; @@ -494,7 +494,7 @@ void FSLSLBridge::recreateBridge() if (gSavedSettings.getBOOL("NoInventoryLibrary")) { LL_WARNS("FSLSLBridge") << "Asked to create bridge, but we don't have a library. Aborting." << LL_ENDL; - reportToNearbyChat(LLTrans::getString("fsbridge_no_library")); + report_to_nearby_chat(LLTrans::getString("fsbridge_no_library")); setBridgeCreating(false); return; } @@ -502,12 +502,12 @@ void FSLSLBridge::recreateBridge() if (mBridgeCreating) { LL_WARNS("FSLSLBridge") << "Bridge creation already in progress, aborting new attempt." << LL_ENDL; - reportToNearbyChat(LLTrans::getString("fsbridge_already_creating")); + report_to_nearby_chat(LLTrans::getString("fsbridge_already_creating")); return; } //announce yourself - reportToNearbyChat(LLTrans::getString("fsbridge_creating")); + report_to_nearby_chat(LLTrans::getString("fsbridge_creating")); LLUUID catID = findFSCategory(); @@ -593,7 +593,7 @@ void FSLSLBridge::initBridge() if (gSavedSettings.getBOOL("NoInventoryLibrary")) { LL_WARNS("FSLSLBridge") << "Asked to create bridge, but we don't have a library. Aborting." << LL_ENDL; - reportToNearbyChat(LLTrans::getString("fsbridge_no_library")); + report_to_nearby_chat(LLTrans::getString("fsbridge_no_library")); setBridgeCreating(false); return; } @@ -663,7 +663,7 @@ void FSLSLBridge::startCreation() setBridgeCreating(true); mFinishCreation = false; //announce yourself - reportToNearbyChat(LLTrans::getString("fsbridge_creating")); + report_to_nearby_chat(LLTrans::getString("fsbridge_creating")); createNewBridge(); } @@ -724,7 +724,7 @@ void FSLSLBridge::processAttach(LLViewerObject* object, const LLViewerJointAttac LL_WARNS("FSLSLBridge") << "Bridge not created. Our bridge container attachment isn't named correctly." << LL_ENDL; if (mBridgeCreating) { - reportToNearbyChat(LLTrans::getString("fsbridge_failure_creation_bad_name")); + report_to_nearby_chat(LLTrans::getString("fsbridge_failure_creation_bad_name")); setBridgeCreating(false); //in case we interrupted the creation } return; @@ -736,7 +736,7 @@ void FSLSLBridge::processAttach(LLViewerObject* object, const LLViewerJointAttac LL_WARNS("FSLSLBridge") << "Bridge container is still NULL in inventory. Aborting." << LL_ENDL; if (mBridgeCreating) { - reportToNearbyChat(LLTrans::getString("fsbridge_failure_creation_null")); + report_to_nearby_chat(LLTrans::getString("fsbridge_failure_creation_null")); setBridgeCreating(false); //in case we interrupted the creation } return; @@ -750,7 +750,7 @@ void FSLSLBridge::processAttach(LLViewerObject* object, const LLViewerJointAttac mAllowDetach = true; LLVOAvatarSelf::detachAttachmentIntoInventory(fsObject->getUUID()); LL_WARNS("FSLSLBridge") << "Attempt to attach to bridge point an object other than current bridge" << LL_ENDL; - reportToNearbyChat(LLTrans::getString("fsbridge_failure_attach_wrong_object")); + report_to_nearby_chat(LLTrans::getString("fsbridge_failure_attach_wrong_object")); if (mBridgeCreating) { setBridgeCreating(false); //in case we interrupted the creation @@ -768,7 +768,7 @@ void FSLSLBridge::processAttach(LLViewerObject* object, const LLViewerJointAttac LL_WARNS("FSLSLBridge") << "Bridge container isn't in the correct inventory location. Detaching it and aborting." << LL_ENDL; if (mBridgeCreating) { - reportToNearbyChat(LLTrans::getString("fs_bridge_failure_attach_wrong_location")); + report_to_nearby_chat(LLTrans::getString("fs_bridge_failure_attach_wrong_location")); setBridgeCreating(false); //in case we interrupted the creation } return; @@ -785,7 +785,7 @@ void FSLSLBridge::processAttach(LLViewerObject* object, const LLViewerJointAttac LL_WARNS("FSLSLBridge") << "Something unknown just got attached to bridge point, detaching and aborting." << LL_ENDL; if (mBridgeCreating) { - reportToNearbyChat(LLTrans::getString("fsbridge_failure_attach_point_in_use")); + report_to_nearby_chat(LLTrans::getString("fsbridge_failure_attach_point_in_use")); setBridgeCreating(false); //in case we interrupted the creation } LLVOAvatarSelf::detachAttachmentIntoInventory(mpBridge->getUUID()); @@ -861,7 +861,7 @@ void FSLSLBridge::inventoryChanged(LLViewerObject* object, } else { - reportToNearbyChat(LLTrans::getString("fsbridge_warning_unexpected_items")); + report_to_nearby_chat(LLTrans::getString("fsbridge_warning_unexpected_items")); LL_WARNS("FSLSLBridge") << "The bridge inventory contains items other than bridge script." << LL_ENDL; if (!isOurScript) //some junk but no valid script? Unlikely to happen, but lets add script anyway. { @@ -885,7 +885,7 @@ void FSLSLBridge::inventoryChanged(LLViewerObject* object, LL_INFOS("FSLSLBridge") << "Bridge created." << LL_ENDL; mFinishCreation = false; mAllowedDetachables.clear(); - reportToNearbyChat(LLTrans::getString("fsbridge_created")); + report_to_nearby_chat(LLTrans::getString("fsbridge_created")); } } @@ -970,11 +970,11 @@ void FSLSLBridge::processDetach(LLViewerObject* object, const LLViewerJointAttac if (mpBridge && mpBridge->getUUID() == fsObject->getUUID()) { mpBridge = NULL; - reportToNearbyChat(LLTrans::getString("fsbridge_detached")); + report_to_nearby_chat(LLTrans::getString("fsbridge_detached")); mIsFirstCallDone = false; if (mBridgeCreating) { - reportToNearbyChat(LLTrans::getString("fsbridge_warning_not_finished")); + report_to_nearby_chat(LLTrans::getString("fsbridge_warning_not_finished")); setBridgeCreating(false); //in case we interrupted the creation mAllowedDetachables.clear(); } @@ -1183,7 +1183,7 @@ void FSLSLBridgeScriptCallback::fire(const LLUUID& inv_item) } else { - reportToNearbyChat(LLTrans::getString("fsbridge_failure_creation_create_script")); + report_to_nearby_chat(LLTrans::getString("fsbridge_failure_creation_create_script")); cleanup = true; } } @@ -1309,7 +1309,7 @@ void FSLSLBridge::cleanUpBridge() { //something unexpected went wrong. Try to clean up and not crash. LL_WARNS("FSLSLBridge") << "Bridge object not found. Can't proceed with creation, exiting." << LL_ENDL; - reportToNearbyChat(LLTrans::getString("fsbridge_failure_not_found")); + report_to_nearby_chat(LLTrans::getString("fsbridge_failure_not_found")); if (isBridgeValid()) { diff --git a/indra/newview/fsnearbychatcontrol.cpp b/indra/newview/fsnearbychatcontrol.cpp index 26ba7f6038..b07b1361c8 100644 --- a/indra/newview/fsnearbychatcontrol.cpp +++ b/indra/newview/fsnearbychatcontrol.cpp @@ -27,14 +27,8 @@ #include "llviewerprecompiledheaders.h" -// llui -#include "lllineeditor.h" -#include "llspinctrl.h" - -// newview #include "fsnearbychatcontrol.h" #include "fsnearbychathub.h" -#include "fsfloaternearbychat.h" #include "llagent.h" // gAgent #include "llagentcamera.h" // gAgentCamera #include "llautoreplace.h" @@ -43,7 +37,8 @@ static LLDefaultChildRegistry::Register r("fs_nearby_chat_control"); FSNearbyChatControl::FSNearbyChatControl(const FSNearbyChatControl::Params& p) : - LLLineEditor(p) + LLLineEditor(p), + mDefault(p.is_default) { // FIRE-11373: Autoreplace doesn't work in nearby chat bar setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5)); @@ -93,7 +88,7 @@ void FSNearbyChatControl::setFocus(BOOL focus) void FSNearbyChatControl::autohide() { - if (getName() == "default_chat_bar") + if (isDefault()) { if (gSavedSettings.getBOOL("CloseChatOnReturn")) { @@ -142,6 +137,7 @@ BOOL FSNearbyChatControl::handleKeyHere(KEY key, MASK mask) } else if (mask == (MASK_SHIFT | MASK_CONTROL)) { + // linefeed addChar(llwchar(182)); return TRUE; } diff --git a/indra/newview/fsnearbychatcontrol.h b/indra/newview/fsnearbychatcontrol.h index 43a0b22eba..be2a0d14c2 100644 --- a/indra/newview/fsnearbychatcontrol.h +++ b/indra/newview/fsnearbychatcontrol.h @@ -28,13 +28,20 @@ #ifndef FS_NEARBYCHATCONTROL_H #define FS_NEARBYCHATCONTROL_H -#include "llchat.h" #include "lllineeditor.h" class FSNearbyChatControl : public LLLineEditor { public: - struct Params : public LLInitParam::Block {}; + struct Params : public LLInitParam::Block + { + Optional is_default; + + Params() + : is_default("default", false) + { + } + }; FSNearbyChatControl(const Params& p); ~FSNearbyChatControl(); @@ -45,12 +52,16 @@ public: virtual BOOL handleKeyHere(KEY key, MASK mask); + bool isDefault() const { return mDefault; } + private: // Typing in progress, expand gestures etc. static void onKeystroke(LLLineEditor* caller, void* userdata); // Unfocus and autohide chat bar accordingly if we are the default chat bar - void autohide(); + void autohide(); + + bool mDefault; }; #endif // FS_NEARBYCHATCONTROL_H diff --git a/indra/newview/fsnearbychathub.cpp b/indra/newview/fsnearbychathub.cpp index 890b464f7f..4c2d45b86e 100644 --- a/indra/newview/fsnearbychathub.cpp +++ b/indra/newview/fsnearbychathub.cpp @@ -48,15 +48,8 @@ static const U32 NAME_PREDICTION_MINIMUM_LENGTH = 3; -// Fix for bad edge snapping // *HACK* chat bar cannot return its correct height for some reason static const S32 MAGIC_CHAT_BAR_PAD = 5; -// Fix for bad edge snapping - -// FIRE-787: break up too long chat lines into multiple messages -void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel); -void really_send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel); -// FIRE-787 struct LLChatTypeTrigger { std::string name; @@ -65,33 +58,50 @@ struct LLChatTypeTrigger { static LLChatTypeTrigger sChatTypeTriggers[] = { { "/whisper" , CHAT_TYPE_WHISPER}, - { "/shout" , CHAT_TYPE_SHOUT} + { "/shout" , CHAT_TYPE_SHOUT} }; -S32 FSNearbyChat::sLastSpecialChatChannel = 0; -FSNearbyChat::FSNearbyChat() : - mDefaultChatBar(NULL), - mFocusedInputEditor(NULL) +// This function just sends the message, with no other processing. Moved out +// of send_chat_from_viewer. +void really_send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel) { - gSavedSettings.getControl("MainChatbarVisible")->getSignal()->connect(boost::bind(&FSNearbyChat::onDefaultChatBarButtonClicked, this)); + LLMessageSystem* msg = gMessageSystem; + + if (!msg) + { + return; + } + + if (channel >= 0) + { + msg->newMessageFast(_PREHASH_ChatFromViewer); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgentID); + msg->addUUIDFast(_PREHASH_SessionID, gAgentSessionID); + msg->nextBlockFast(_PREHASH_ChatData); + msg->addStringFast(_PREHASH_Message, utf8_out_text); + msg->addU8Fast(_PREHASH_Type, type); + msg->addS32("Channel", channel); + } + else + { + msg->newMessage("ScriptDialogReply"); + msg->nextBlock("AgentData"); + msg->addUUID("AgentID", gAgentID); + msg->addUUID("SessionID", gAgentSessionID); + msg->nextBlock("Data"); + msg->addUUID("ObjectID", gAgentID); + msg->addS32("ChatChannel", channel); + msg->addS32("ButtonIndex", 0); + msg->addString("ButtonLabel", utf8_out_text); + } + + gAgent.sendReliableMessage(); } -FSNearbyChat::~FSNearbyChat() -{ -} - -void FSNearbyChat::onDefaultChatBarButtonClicked() -{ - showDefaultChatBar(gSavedSettings.getBOOL("MainChatbarVisible")); -} - -//void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel) -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-0.2.2a void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel) -// [/RLVa:KB] { -// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0a // Only process chat messages (ie not CHAT_TYPE_START, CHAT_TYPE_STOP, etc) if ( (rlv_handler_t::isEnabled()) && ( (CHAT_TYPE_WHISPER == type) || (CHAT_TYPE_NORMAL == type) || (CHAT_TYPE_SHOUT == type) ) ) { @@ -135,9 +145,7 @@ void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channe } } } -// [/RLVa:KB] -// FIRE-787: break up too long chat lines into multiple messages U32 split = MAX_MSG_BUF_SIZE - 1; U32 pos = 0; U32 total = utf8_out_text.length(); @@ -178,11 +186,10 @@ void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channe } } - if(next_split == 0) + if (next_split == 0) { next_split = split; - LL_WARNS("Splitting") << - "utf-8 couldn't be split correctly" << LL_ENDL; + LL_WARNS("Splitting") << "utf-8 couldn't be split correctly" << LL_ENDL; } } @@ -194,51 +201,100 @@ void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channe } // moved here so we don't bump the count for every message segment - add(LLStatViewer::CHAT_COUNT,1); -// FIRE-787 + add(LLStatViewer::CHAT_COUNT, 1); } -// FIRE-787: break up too long chat lines into multiple messages -// This function just sends the message, with no other processing. Moved out -// of send_chat_from_viewer. -void really_send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel) +bool matchChatTypeTrigger(const std::string& in_str, std::string* out_str) { - LLMessageSystem* msg = gMessageSystem; - - // gMessageSystem can be 0, not sure how it is exactly to reproduce, maybe during viewer shutdown? - if (!msg) + U32 in_len = in_str.length(); + S32 cnt = sizeof(sChatTypeTriggers) / sizeof(*sChatTypeTriggers); + + for (S32 n = 0; n < cnt; n++) { - return; + if (in_len > sChatTypeTriggers[n].name.length()) + continue; + + std::string trigger_trunc = sChatTypeTriggers[n].name; + LLStringUtil::truncate(trigger_trunc, in_len); + + if (!LLStringUtil::compareInsensitive(in_str, trigger_trunc)) + { + *out_str = sChatTypeTriggers[n].name; + return true; + } } - // - - if (channel >= 0) - { - msg->newMessageFast(_PREHASH_ChatFromViewer); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_ChatData); - msg->addStringFast(_PREHASH_Message, utf8_out_text); - msg->addU8Fast(_PREHASH_Type, type); - msg->addS32("Channel", channel); - } - else - { - msg->newMessage("ScriptDialogReply"); - msg->nextBlock("AgentData"); - msg->addUUID("AgentID", gAgent.getID()); - msg->addUUID("SessionID", gAgent.getSessionID()); - msg->nextBlock("Data"); - msg->addUUID("ObjectID", gAgent.getID()); - msg->addS32("ChatChannel", channel); - msg->addS32("ButtonIndex", 0); - msg->addString("ButtonLabel", utf8_out_text); - } - - gAgent.sendReliableMessage(); + + return false; +} + + +////////////////////////////////////////////////////////////////////////////// +// FSNearbyChat +////////////////////////////////////////////////////////////////////////////// + +S32 FSNearbyChat::sLastSpecialChatChannel = 0; + +FSNearbyChat::FSNearbyChat() : + mDefaultChatBar(NULL), + mFocusedInputEditor(NULL) +{ + gSavedSettings.getControl("MainChatbarVisible")->getSignal()->connect(boost::bind(&FSNearbyChat::onDefaultChatBarButtonClicked, this)); +} + +FSNearbyChat::~FSNearbyChat() +{ +} + +void FSNearbyChat::sendChat(LLWString text, EChatType type) +{ + LLWStringUtil::trim(text); + + if (!text.empty()) + { + if (type == CHAT_TYPE_OOC) + { + text = utf8string_to_wstring(gSavedSettings.getString("FSOOCPrefix") + " ") + text + utf8string_to_wstring(" " + gSavedSettings.getString("FSOOCPostfix")); + } + + // Check if this is destined for another channel + S32 channel = 0; + bool is_set = false; + stripChannelNumber(text, &channel, &sLastSpecialChatChannel, &is_set); + + std::string utf8text = wstring_to_utf8str(text); + // Try to trigger a gesture, if not chat to a script. + std::string utf8_revised_text; + if (0 == channel) + { + // Convert OOC and MU* style poses + utf8text = FSCommon::applyAutoCloseOoc(utf8text); + utf8text = FSCommon::applyMuPose(utf8text); + + // discard returned "found" boolean + if(!LLGestureMgr::instance().triggerAndReviseString(utf8text, &utf8_revised_text)) + { + utf8_revised_text = utf8text; + } + } + else + { + utf8_revised_text = utf8text; + } + + utf8_revised_text = utf8str_trim(utf8_revised_text); + + EChatType nType = (type == CHAT_TYPE_OOC ? CHAT_TYPE_NORMAL : type); + type = processChatTypeTriggers(nType, utf8_revised_text); + + if (!utf8_revised_text.empty() && cmd_line_chat(utf8_revised_text, type)) + { + // Chat with animation + sendChatFromViewer(utf8_revised_text, type, gSavedSettings.getBOOL("PlayChatAnim")); + } + } + + gAgent.stopTyping(); } -// FIRE-787 void FSNearbyChat::sendChatFromViewer(const std::string& utf8text, EChatType type, BOOL animate) { @@ -251,14 +307,106 @@ void FSNearbyChat::sendChatFromViewer(const LLWString& wtext, EChatType type, BO S32 channel = 0; bool is_set = false; LLWString out_text = stripChannelNumber(wtext, &channel, &sLastSpecialChatChannel, &is_set); - // If "/" is not specified, see if a channel has been set in - // the spinner. - if (!is_set && - gSavedSettings.getBOOL("FSNearbyChatbar") && - gSavedSettings.getBOOL("FSShowChatChannel")) + sendChatFromViewer(wtext, out_text, type, animate, channel); +} + +// all chat bars call this function and we keep the first or one that's seen as the default +void FSNearbyChat::registerChatBar(FSNearbyChatControl* chatBar) +{ + if (!mDefaultChatBar || chatBar->isDefault()) { - channel = (S32)(FSFloaterNearbyChat::getInstance()->getChild("ChatChannel")->get()); + mDefaultChatBar = chatBar; } +} + +// unhide the default nearby chat bar on request (pressing Enter or a letter key) +void FSNearbyChat::showDefaultChatBar(BOOL visible, const char* text) const +{ + if (!mDefaultChatBar) + { + return; + } + + // change settings control to signal button state + gSavedSettings.setBOOL("MainChatbarVisible", visible); + + mDefaultChatBar->getParent()->setVisible(visible); + mDefaultChatBar->setVisible(visible); + mDefaultChatBar->setFocus(visible); + + // Fix for bad edge snapping + if (visible) + { + gFloaterView->setSnapOffsetChatBar(mDefaultChatBar->getRect().getHeight() + MAGIC_CHAT_BAR_PAD); + } + else + { + gFloaterView->setSnapOffsetChatBar(0); + } + + if (!text) + { + return; + } + + if (mDefaultChatBar->getText().empty()) + { + mDefaultChatBar->setText(LLStringExplicit(text)); + mDefaultChatBar->setCursorToEnd(); + } + // Fix for bad edge snapping +} + +// We want to know which nearby chat editor (if any) currently has focus +void FSNearbyChat::setFocusedInputEditor(FSNearbyChatControl* inputEditor, BOOL focus) +{ + if (focus) + { + mFocusedInputEditor = inputEditor; + } + else if (mFocusedInputEditor == inputEditor) + { + // only remove focus if the request came from the previously active input editor + // to avoid races + mFocusedInputEditor = NULL; + } +} + +// for the "arrow key moves avatar when chat is empty" hack in llviewerwindow.cpp +// and the hide chat bar feature in mouselook in llagent.cpp +BOOL FSNearbyChat::defaultChatBarIsIdle() const +{ + if (mFocusedInputEditor && mFocusedInputEditor->isDefault()) + { + return mFocusedInputEditor->getText().empty(); + } + + // if any other chat bar has focus, report "idle", because they're not the default + return TRUE; +} + +// for the "arrow key moves avatar when chat is empty" hack in llviewerwindow.cpp +BOOL FSNearbyChat::defaultChatBarHasFocus() const +{ + if (mFocusedInputEditor && mFocusedInputEditor->isDefault()) + { + return TRUE; + } + + return FALSE; +} + +void FSNearbyChat::onDefaultChatBarButtonClicked() +{ + showDefaultChatBar(gSavedSettings.getBOOL("MainChatbarVisible")); +} + + +////////////////////////////////////////////////////////////////////////////// +// General chat handling methods + +void FSNearbyChat::sendChatFromViewer(const LLWString& wtext, const LLWString& out_text, EChatType type, BOOL animate, S32 channel) +{ std::string utf8_out_text = wstring_to_utf8str(out_text); std::string utf8_text = wstring_to_utf8str(wtext); @@ -318,6 +466,7 @@ void FSNearbyChat::sendChatFromViewer(const LLWString& wtext, EChatType type, BO send_chat_from_viewer(utf8_out_text, type, channel); } +// static EChatType FSNearbyChat::processChatTypeTriggers(EChatType type, std::string &str) { U32 length = str.length(); @@ -431,189 +580,8 @@ LLWString FSNearbyChat::stripChannelNumber(const LLWString &mesg, S32* channel, } } -void FSNearbyChat::sendChat(LLWString text, EChatType type) -{ - LLWStringUtil::trim(text); - - if (!text.empty()) - { - if (type == CHAT_TYPE_OOC) - { - std::string tempText = wstring_to_utf8str( text ); - tempText = gSavedSettings.getString("FSOOCPrefix") + " " + tempText + " " + gSavedSettings.getString("FSOOCPostfix"); - text = utf8str_to_wstring(tempText); - } - - // Check if this is destined for another channel - S32 channel = 0; - bool is_set = false; - stripChannelNumber(text, &channel, &sLastSpecialChatChannel, &is_set); - // If "/" is not specified, see if a channel has been set in - // the spinner. - if (!is_set && - gSavedSettings.getBOOL("FSNearbyChatbar") && - gSavedSettings.getBOOL("FSShowChatChannel")) - { - channel = (S32)(FSFloaterNearbyChat::getInstance()->getChild("ChatChannel")->get()); - } - - std::string utf8text = wstring_to_utf8str(text); - // Try to trigger a gesture, if not chat to a script. - std::string utf8_revised_text; - if (0 == channel) - { - // Convert OOC and MU* style poses - utf8text = applyAutoCloseOoc(utf8text); - utf8text = applyMuPose(utf8text); - - // discard returned "found" boolean - if(!LLGestureMgr::instance().triggerAndReviseString(utf8text, &utf8_revised_text)) - { - utf8_revised_text = utf8text; - } - } - else - { - utf8_revised_text = utf8text; - } - - utf8_revised_text = utf8str_trim(utf8_revised_text); - - EChatType nType; - if (type == CHAT_TYPE_OOC) - { - nType = CHAT_TYPE_NORMAL; - } - else - { - nType = type; - } - - type = processChatTypeTriggers(nType, utf8_revised_text); - - if (!utf8_revised_text.empty() && cmd_line_chat(utf8_revised_text, type)) - { - // Chat with animation - sendChatFromViewer(utf8_revised_text, type, gSavedSettings.getBOOL("PlayChatAnim")); - } - } - - gAgent.stopTyping(); -} - -// all chat bars call this function and we keep the first or one that's seen as the default -void FSNearbyChat::registerChatBar(FSNearbyChatControl* chatBar) -{ - // TODO: make this a Param option "is_default" - if (!mDefaultChatBar || chatBar->getName() == "default_chat_bar") - { - mDefaultChatBar=chatBar; - } -} - -// unhide the default nearby chat bar on request (pressing Enter or a letter key) -void FSNearbyChat::showDefaultChatBar(BOOL visible, const char* text) const -{ - if (!mDefaultChatBar) - { - return; - } - - // change settings control to signal button state - gSavedSettings.setBOOL("MainChatbarVisible",visible); - - mDefaultChatBar->getParent()->setVisible(visible); - mDefaultChatBar->setVisible(visible); - mDefaultChatBar->setFocus(visible); - - // Fix for bad edge snapping - if (visible) - { - gFloaterView->setSnapOffsetChatBar(mDefaultChatBar->getRect().getHeight() + MAGIC_CHAT_BAR_PAD); - } - else - { - gFloaterView->setSnapOffsetChatBar(0); - } - - if (!text) - { - return; - } - - if (mDefaultChatBar->getText().empty()) - { - mDefaultChatBar->setText(LLStringExplicit(text)); - mDefaultChatBar->setCursorToEnd(); - } - // Fix for bad edge snapping -} - -// We want to know which nearby chat editor (if any) currently has focus -void FSNearbyChat::setFocusedInputEditor(FSNearbyChatControl* inputEditor, BOOL focus) -{ - if (focus) - { - mFocusedInputEditor = inputEditor; - } - - // only remove focus if the request came from the previously active input editor - // to avoid races - else if (mFocusedInputEditor == inputEditor) - { - mFocusedInputEditor = NULL; - } -} - -// for the "arrow key moves avatar when chat is empty" hack in llviewerwindow.cpp -// and the hide chat bar feature in mouselook in llagent.cpp -BOOL FSNearbyChat::defaultChatBarIsIdle() const -{ - if (mFocusedInputEditor && mFocusedInputEditor->getName() == "default_chat_bar") - { - return mFocusedInputEditor->getText().empty(); - } - - // if any other chat bar has focus, report "idle", because they're not the default - return TRUE; -} - -// for the "arrow key moves avatar when chat is empty" hack in llviewerwindow.cpp -BOOL FSNearbyChat::defaultChatBarHasFocus() const -{ - if (mFocusedInputEditor && mFocusedInputEditor->getName() == "default_chat_bar") - { - return TRUE; - } - - return FALSE; -} - -bool matchChatTypeTrigger(const std::string& in_str, std::string* out_str) -{ - U32 in_len = in_str.length(); - S32 cnt = sizeof(sChatTypeTriggers) / sizeof(*sChatTypeTriggers); - - for (S32 n = 0; n < cnt; n++) - { - if (in_len > sChatTypeTriggers[n].name.length()) - continue; - - std::string trigger_trunc = sChatTypeTriggers[n].name; - LLStringUtil::truncate(trigger_trunc, in_len); - - if (!LLStringUtil::compareInsensitive(in_str, trigger_trunc)) - { - *out_str = sChatTypeTriggers[n].name; - return true; - } - } - - return false; -} - //static -void FSNearbyChat::handleChatBarKeystroke(LLUICtrl* source) +void FSNearbyChat::handleChatBarKeystroke(LLUICtrl* source, S32 channel /* = 0 */) { LLChatEntry* chat_entry = dynamic_cast(source); LLLineEditor* line_editor = dynamic_cast(source); @@ -636,28 +604,27 @@ void FSNearbyChat::handleChatBarKeystroke(LLUICtrl* source) // Can't trim the end, because that will cause autocompletion // to eat trailing spaces that might be part of a gesture. LLWStringUtil::trimHead(raw_text); - S32 length = raw_text.length(); + size_t length = raw_text.length(); - S32 channel=0; - if (gSavedSettings.getBOOL("FSNearbyChatbar") && - gSavedSettings.getBOOL("FSShowChatChannel")) + LLWString prefix; + if (length > 3) { - // [FS communication UI] - //channel = (S32)(LLFloaterNearbyChat::getInstance()->getChild("ChatChannel")->get()); - channel = (S32)(FSFloaterNearbyChat::getInstance()->getChild("ChatChannel")->get()); - // [FS communication UI] + prefix = raw_text.substr(0, 3); + LLWStringUtil::toLower(prefix); } - // if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences - // [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Modified: RLVa-1.0.0d + static LLCachedControl type_during_emote(gSavedSettings, "FSTypeDuringEmote"); + static LLCachedControl allow_mu_pose(gSavedSettings, "AllowMUpose"); if (length > 0 && - raw_text[0] != '/' && (raw_text[0] != ':' || !gSavedSettings.getBOOL("AllowMUpose")) && + ((raw_text[0] != '/' || (type_during_emote && length > 3 && prefix == utf8string_to_wstring("/me") && (raw_text[3] == ' ' || raw_text[3] == '\''))) + && (raw_text[0] != ':' || !allow_mu_pose || type_during_emote)) && !gRlvHandler.hasBehaviour(RLV_BHVR_REDIRCHAT)) - // [/RLVa:KB] { // only start typing animation if we are chatting without / on channel 0 -Zi - if(channel==0) + if (channel == 0) + { gAgent.startTyping(); + } } else { diff --git a/indra/newview/fsnearbychathub.h b/indra/newview/fsnearbychathub.h index 9d89cbc9dd..fc9ceafc6f 100644 --- a/indra/newview/fsnearbychathub.h +++ b/indra/newview/fsnearbychathub.h @@ -57,16 +57,17 @@ public: void sendChat(LLWString text, EChatType type); static LLWString stripChannelNumber(const LLWString &mesg, S32* channel, S32* last_channel, bool* is_set); - EChatType processChatTypeTriggers(EChatType type, std::string &str); + static EChatType processChatTypeTriggers(EChatType type, std::string &str); void sendChatFromViewer(const std::string& utf8text, EChatType type, BOOL animate); void sendChatFromViewer(const LLWString& wtext, EChatType type, BOOL animate); + static void sendChatFromViewer(const LLWString& wtext, const LLWString& out_text, EChatType type, BOOL animate, S32 channel); void setFocusedInputEditor(FSNearbyChatControl* inputEditor, BOOL focus); BOOL defaultChatBarIsIdle() const; BOOL defaultChatBarHasFocus() const; - static void handleChatBarKeystroke(LLUICtrl* source); + static void handleChatBarKeystroke(LLUICtrl* source, S32 channel = 0); FSNearbyChatControl* mFocusedInputEditor; }; diff --git a/indra/newview/fsnearbychatvoicemonitor.cpp b/indra/newview/fsnearbychatvoicemonitor.cpp index 904be7b485..2d0779f53c 100644 --- a/indra/newview/fsnearbychatvoicemonitor.cpp +++ b/indra/newview/fsnearbychatvoicemonitor.cpp @@ -29,7 +29,7 @@ #include "fsnearbychatvoicemonitor.h" #include "llvoiceclient.h" -static LLDefaultChildRegistry::Register r("nearby_chat_voice_monitor"); +static LLDefaultChildRegistry::Register r("fs_nearby_chat_voice_monitor"); FSNearbyChatVoiceControl::Params::Params() : voice_monitor_padding("voice_monitor_padding"), diff --git a/indra/newview/fsradar.cpp b/indra/newview/fsradar.cpp index d6d701f841..a660ca1b95 100644 --- a/indra/newview/fsradar.cpp +++ b/indra/newview/fsradar.cpp @@ -177,8 +177,8 @@ void FSRadar::updateRadarList() LLMuteList* mutelist = LLMuteList::getInstance(); FSWSAssetBlacklist* blacklist = FSWSAssetBlacklist::getInstance(); - static const F32 chat_range_say = LFSimFeatureHandler::getInstance()->sayRange(); - static const F32 chat_range_shout = LFSimFeatureHandler::getInstance()->shoutRange(); + const F32 chat_range_say = LFSimFeatureHandler::getInstance()->sayRange(); + const F32 chat_range_shout = LFSimFeatureHandler::getInstance()->shoutRange(); static const std::string str_chat_entering = LLTrans::getString("entering_chat_range"); static const std::string str_chat_leaving = LLTrans::getString("leaving_chat_range"); @@ -380,7 +380,7 @@ void FSRadar::updateRadarList() { LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%3.2f", avRange); - std::string message = formatString(str_chat_entering, args); + std::string message = format_string(str_chat_entering, args); make_ui_sound("UISndRadarChatEnter"); // FIRE-6069: Radar alerts sounds LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } @@ -388,7 +388,7 @@ void FSRadar::updateRadarList() { LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%3.2f", avRange); - std::string message = formatString(str_draw_distance_entering, args); + std::string message = format_string(str_draw_distance_entering, args); make_ui_sound("UISndRadarDrawEnter"); // FIRE-6069: Radar alerts sounds LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } @@ -399,7 +399,7 @@ void FSRadar::updateRadarList() { LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%3.2f", avRange); - std::string message = formatString(str_region_entering_distance, args); + std::string message = format_string(str_region_entering_distance, args); LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } else @@ -437,7 +437,7 @@ void FSRadar::updateRadarList() { LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%3.2f", avRange); - std::string message = formatString(str_chat_entering, args); + std::string message = format_string(str_chat_entering, args); make_ui_sound("UISndRadarChatEnter"); // FIRE-6069: Radar alerts sounds LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } @@ -453,7 +453,7 @@ void FSRadar::updateRadarList() { LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%3.2f", avRange); - std::string message = formatString(str_draw_distance_entering, args); + std::string message = format_string(str_draw_distance_entering, args); make_ui_sound("UISndRadarDrawEnter"); // FIRE-6069: Radar alerts sounds LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } @@ -472,7 +472,7 @@ void FSRadar::updateRadarList() { LLStringUtil::format_map_t args; args["DISTANCE"] = llformat("%3.2f", avRange); - std::string message = formatString(str_region_entering_distance, args); + std::string message = format_string(str_region_entering_distance, args); LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } else @@ -526,7 +526,7 @@ void FSRadar::updateRadarList() make_ui_sound("UISndRadarAgeAlert"); LLStringUtil::format_map_t args; args["AGE"] = llformat("%d", avAge); - std::string message = formatString(str_avatar_age_alert, args); + std::string message = format_string(str_avatar_age_alert, args); LLAvatarNameCache::get(avId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, message)); } ent->mAgeAlertPerformed = true; @@ -980,7 +980,7 @@ void FSRadar::zoomAvatar(const LLUUID& avatar_id, const std::string& name) { LLStringUtil::format_map_t args; args["AVATARNAME"] = name.c_str(); - reportToNearbyChat(LLTrans::getString("camera_no_focus", args)); + report_to_nearby_chat(LLTrans::getString("camera_no_focus", args)); } } diff --git a/indra/newview/growlmanager.cpp b/indra/newview/growlmanager.cpp index 3bd99a2e8a..baa3a38611 100644 --- a/indra/newview/growlmanager.cpp +++ b/indra/newview/growlmanager.cpp @@ -34,6 +34,7 @@ #include "growlmanager.h" +#include "fscommon.h" #include "growlnotifier.h" #include "llagentdata.h" #include "llappviewer.h" @@ -319,19 +320,18 @@ void GrowlManager::onInstantMessage(const LLSD& im) if (session->isP2PSessionType() && (!im["keyword_alert_performed"].asBoolean() || !gSavedSettings.getBOOL("FSFilterGrowlKeywordDuplicateIMs"))) { // Don't show messages from ourselves or the system. - LLUUID from_id = im["from_id"].asUUID(); + const LLUUID from_id = im["from_id"].asUUID(); if (from_id.isNull() || from_id == gAgentID) { return; } std::string message = im["message"].asString(); - std::string prefix = message.substr(0, 4); - if (prefix == "/me " || prefix == "/me'") + if (is_irc_me_prefix(message)) { message = message.substr(3); } - gGrowlManager->performNotification(im["from"].asString(), message, GROWL_IM_MESSAGE_TYPE); + LLAvatarNameCache::get(from_id, boost::bind(&GrowlManager::onAvatarNameCache, _2, message, GROWL_IM_MESSAGE_TYPE)); } } @@ -379,17 +379,22 @@ void GrowlManager::onNearbyChatMessage(const LLSD& chat) if ((EChatType)chat["chat_type"].asInteger() == CHAT_TYPE_IM) { std::string message = chat["message"].asString(); - - const std::string prefix = message.substr(0, 4); - if (prefix == "/me " || prefix == "/me'") + if (is_irc_me_prefix(message)) { message = message.substr(3); } - gGrowlManager->performNotification(chat["from"].asString(), message, GROWL_IM_MESSAGE_TYPE); + LLAvatarNameCache::get(chat["from_id"].asUUID(), boost::bind(&GrowlManager::onAvatarNameCache, _2, message, GROWL_IM_MESSAGE_TYPE)); } } +//static +void GrowlManager::onAvatarNameCache(const LLAvatarName& av_name, const std::string& message, const std::string& type) +{ + const std::string sender = FSCommon::getAvatarNameByDisplaySettings(av_name); + notify(sender, message, type); +} + bool GrowlManager::shouldNotify() { // This magic stolen from llappviewer.cpp. LLViewerWindow::getActive lies. diff --git a/indra/newview/growlmanager.h b/indra/newview/growlmanager.h index 7e1554c543..6365b9a19d 100644 --- a/indra/newview/growlmanager.h +++ b/indra/newview/growlmanager.h @@ -36,6 +36,7 @@ #include "llnotifications.h" #include "growlnotifier.h" #include "lleventtimer.h" +#include "llavatarnamecache.h" struct GrowlNotification { @@ -80,6 +81,7 @@ private: static void onScriptDialog(const LLSD& data); static void onNearbyChatMessage(const LLSD& chat); static inline bool shouldNotify(); + static void onAvatarNameCache(const LLAvatarName& av_name, const std::string& message, const std::string& type); LLBoundListener mNotificationConnection; boost::signals2::connection mInstantMessageConnection; diff --git a/indra/newview/kcwlinterface.cpp b/indra/newview/kcwlinterface.cpp index bc8ded15f9..6f318f544b 100644 --- a/indra/newview/kcwlinterface.cpp +++ b/indra/newview/kcwlinterface.cpp @@ -44,12 +44,30 @@ const F32 PARCEL_WL_CHECK_TIME = 5.f; const S32 PARCEL_WL_MIN_ALT_CHANGE = 3; +const std::string PARCEL_WL_DEFAULT = "Default"; + +class KCWindlightInterface::LLParcelChangeObserver : public LLParcelObserver +{ +public: + LLParcelChangeObserver(KCWindlightInterface* windlightInterface) : mKCWindlightInterface(windlightInterface) {} + +private: + /*virtual*/ void changed() + { + if (mKCWindlightInterface) + { + mKCWindlightInterface->ParcelChange(); + } + } + + KCWindlightInterface* mKCWindlightInterface; +}; KCWindlightInterface::KCWindlightInterface() : LLEventTimer(PARCEL_WL_CHECK_TIME), mWLset(false), mWeChangedIt(false), - mCurrentSpace(-2.f), + mCurrentSpace(-2), mLastParcelID(-1), mLastRegion(NULL), mRegionOverride(false), @@ -61,6 +79,17 @@ KCWindlightInterface::KCWindlightInterface() : mEventTimer.stop(); mDisabled = true; } + + mParcelMgrConnection = gAgent.addParcelChangedCallback( + boost::bind(&KCWindlightInterface::onAgentParcelChange, this)); +} + +KCWindlightInterface::~KCWindlightInterface() +{ + if (mParcelMgrConnection.connected()) + { + mParcelMgrConnection.disconnect(); + } } void KCWindlightInterface::ParcelChange() @@ -92,11 +121,11 @@ void KCWindlightInterface::ParcelChange() if ( (this_parcel_id != mLastParcelID) || (mLastParcelDesc != desc) ) //parcel changed { - //LL_INFOS() << "agent in new parcel: "<< this_parcel_id << " : " << parcel->getName() << LL_ENDL; + LL_DEBUGS() << "Agent in new parcel: " << this_parcel_id << LL_ENDL; mLastParcelID = this_parcel_id; mLastParcelDesc = desc; - mCurrentSpace = -2.f; + mCurrentSpace = -2; mCurrentSettings.clear(); setWL_Status(false); //clear the status bar icon const LLVector3& agent_pos_region = gAgent.getPositionAgent(); @@ -122,6 +151,12 @@ void KCWindlightInterface::ParcelChange() } } +void KCWindlightInterface::onAgentParcelChange() +{ + ParcelChange(); +} + + BOOL KCWindlightInterface::tick() { if ((LLStartUp::getStartupState() < STATE_STARTED) || checkSettings()) @@ -163,17 +198,29 @@ void KCWindlightInterface::ApplySettings(const LLSD& settings) mRegionOverride = settings.has("region_override"); - ApplySkySettings(settings); + bool non_region_default_applied = ApplySkySettings(settings); - if (settings.has("water") && (!mHaveRegionSettings || mRegionOverride)) + // We can only apply a water preset if we didn't set region WL default previously + // or there will be unpredictable behavior where the region WL defaults will be + // disabled again and sky/day cycle presets will be reverted to whatever the user + // has set before. + if (non_region_default_applied) { - LLEnvManagerNew::instance().setUseWaterPreset(settings["water"].asString(), gSavedSettings.getBOOL("FSInterpolateParcelWL")); - setWL_Status(true); + if (settings.has("water") && (!mHaveRegionSettings || mRegionOverride)) + { + LL_DEBUGS() << "Applying WL water set: " << settings["water"].asString() << LL_ENDL; + LLEnvManagerNew::instance().setUseWaterPreset(settings["water"].asString(), gSavedSettings.getBOOL("FSInterpolateParcelWL")); + setWL_Status(true); + } + } + else + { + LL_WARNS() << "Cannot apply Parcel WL water preset because region WL default has been set due to invalid sky preset" << LL_ENDL; } } } -void KCWindlightInterface::ApplySkySettings(const LLSD& settings) +bool KCWindlightInterface::ApplySkySettings(const LLSD& settings) { if (settings.has("sky")) { @@ -193,28 +240,32 @@ void KCWindlightInterface::ApplySkySettings(const LLSD& settings) if (lower != mCurrentSpace) //workaround: only apply once { mCurrentSpace = lower; //use lower as an id + LL_DEBUGS() << "Applying WL sky set: " << (*space_it)["preset"].asString() << LL_ENDL; ApplyWindLightPreset((*space_it)["preset"].asString()); } - return; + return true; } } } - if (mCurrentSpace != -1.f) + if (mCurrentSpace != -1) { - mCurrentSpace = -1.f; + mCurrentSpace = -1; // set notes on KCWindlightInterface::haveParcelOverride if (settings.has("sky_default") && (!mHaveRegionSettings || mRegionOverride)) { - //LL_INFOS() << "WL set : " << settings["sky_default"] << LL_ENDL; + LL_DEBUGS() << "Applying WL sky set: " << settings["sky_default"] << " (Parcel WL Default)" << LL_ENDL; ApplyWindLightPreset(settings["sky_default"].asString()); } else //reset to default { - //LL_INFOS() << "WL set : Default" << LL_ENDL; - ApplyWindLightPreset("Default"); + LL_DEBUGS() << "Applying WL sky set: Region Default" << LL_ENDL; + ApplyWindLightPreset(PARCEL_WL_DEFAULT); + return false; } } + + return true; } void KCWindlightInterface::ApplyWindLightPreset(const std::string& preset) @@ -224,7 +275,7 @@ void KCWindlightInterface::ApplyWindLightPreset(const std::string& preset) LLWLParamManager* wlprammgr = LLWLParamManager::getInstance(); LLWLParamKey key(preset, LLEnvKey::SCOPE_LOCAL); - if ( (preset != "Default") && (wlprammgr->hasParamSet(key)) ) + if ( (preset != PARCEL_WL_DEFAULT) && (wlprammgr->hasParamSet(key)) ) { LLEnvManagerNew::instance().setUseSkyPreset(preset, gSavedSettings.getBOOL("FSInterpolateParcelWL")); setWL_Status(true); @@ -233,7 +284,9 @@ void KCWindlightInterface::ApplyWindLightPreset(const std::string& preset) else { if (!LLEnvManagerNew::instance().getUseRegionSettings()) + { LLEnvManagerNew::instance().setUseRegionSettings(true, gSavedSettings.getBOOL("FSInterpolateParcelWL")); + } setWL_Status(false); mWeChangedIt = false; } @@ -247,7 +300,7 @@ void KCWindlightInterface::ResetToRegion(bool force) //TODO: clear per parcel if (mWeChangedIt || force) //dont reset anything if we didnt do it { - ApplyWindLightPreset("Default"); + ApplyWindLightPreset(PARCEL_WL_DEFAULT); } } @@ -379,11 +432,11 @@ bool KCWindlightInterface::ParseParcelForWLSettings(const std::string& desc, LLS { if (match[1].matched) { - //LL_INFOS() << "sky flag: " << match[1] << " : " << match[2] << " : " << match[3] << " : " << match[5] << LL_ENDL; + LL_DEBUGS() << "Sky Flags: type = " << match[1] << " from = " << match[2] << " to = " << match[3] << " preset = " << match[5] << LL_ENDL; std::string preset(match[5]); LLWLParamKey key(preset, LLEnvKey::SCOPE_LOCAL); - if(wlprammgr->hasParamSet(key)) + if (wlprammgr->hasParamSet(key)) { if (match[2].matched && match[3].matched) { @@ -396,22 +449,29 @@ bool KCWindlightInterface::ParseParcelForWLSettings(const std::string& desc, LLS space["upper"] = upper; space["preset"] = preset; if (!settings.has("sky")) + { settings["sky"] = LLSD(); + } settings["sky"][sky_index++] = space; found_settings = true; } } else { + LL_DEBUGS() << "Sky Default = " << preset << LL_ENDL; settings["sky_default"] = preset; found_settings = true; } } + else + { + LL_WARNS() << "Parcel Windlight contains unknown sky: " << preset << LL_ENDL; + } } else if (match[4].matched) { std::string preset(match[5]); - //LL_INFOS() << "got water: " << preset << LL_ENDL; + LL_DEBUGS() << "Got Water Preset: " << preset << LL_ENDL; if(wwprammgr->hasParamSet(preset)) { settings["water"] = preset; @@ -420,8 +480,7 @@ bool KCWindlightInterface::ParseParcelForWLSettings(const std::string& desc, LLS } else if (match[6].matched) { - //std::string preset(match[5]); - LL_INFOS() << "got region override flag" << LL_ENDL; + LL_DEBUGS() << "Got Region Override Flag" << LL_ENDL; settings["region_override"] = true; } @@ -569,7 +628,7 @@ bool KCWindlightInterface::haveParcelOverride(const LLEnvironmentSettings& new_s //*ASSUMPTION: if region day cycle is empty, its set to default mHaveRegionSettings = new_settings.getWLDayCycle().size() > 0; - return mRegionOverride || mCurrentSpace != -1.f; + return mRegionOverride || mCurrentSpace != -1; } void KCWindlightInterface::setWL_Status(bool pwl_status) @@ -590,7 +649,7 @@ bool KCWindlightInterface::checkSettings() { mCurrentSettings.clear(); mWeChangedIt = false; - mCurrentSpace = -2.f; + mCurrentSpace = -2; mLastParcelID = -1; mRegionOverride = false; mHaveRegionSettings = false; diff --git a/indra/newview/kcwlinterface.h b/indra/newview/kcwlinterface.h index b7c222596b..d77fb798b4 100644 --- a/indra/newview/kcwlinterface.h +++ b/indra/newview/kcwlinterface.h @@ -33,15 +33,19 @@ class LLParcel; class LLViewerRegion; class LLEnvironmentSettings; +class LLParcelChangeObserver; class KCWindlightInterface : public LLSingleton, LLEventTimer { + LOG_CLASS(KCWindlightInterface); + public: KCWindlightInterface(); + ~KCWindlightInterface(); void ParcelChange(); virtual BOOL tick(); void ApplySettings(const LLSD& settings); - void ApplySkySettings(const LLSD& settings); + bool ApplySkySettings(const LLSD& settings); void ApplyWindLightPreset(const std::string& preset); void ResetToRegion(bool force = false); //bool ChatCommand(std::string message, std::string from_name, LLUUID source_id, LLUUID owner_id); @@ -54,6 +58,11 @@ public: bool getWLset() { return mWLset; } private: + class LLParcelChangeObserver; + friend class LLParcelChangeObserver; + boost::signals2::connection mParcelMgrConnection; + void onAgentParcelChange(); + bool callbackParcelWL(const LLSD& notification, const LLSD& response); bool callbackParcelWLClear(const LLSD& notification, const LLSD& response); bool AllowedLandOwners(const LLUUID& agent_id); diff --git a/indra/newview/lfsimfeaturehandler.cpp b/indra/newview/lfsimfeaturehandler.cpp index f3c8129f22..1842426a82 100644 --- a/indra/newview/lfsimfeaturehandler.cpp +++ b/indra/newview/lfsimfeaturehandler.cpp @@ -20,17 +20,27 @@ #include "lfsimfeaturehandler.h" #include "llagent.h" +#include "lllogininstance.h" +#include "llviewercontrol.h" #include "llviewernetwork.h" #include "llviewerregion.h" LFSimFeatureHandler::LFSimFeatureHandler() -: mSupportsExport(false) -, mSayRange(20) -, mShoutRange(100) -, mWhisperRange(10) + : mSupportsExport(false), + mSayRange(20), + mShoutRange(100), + mWhisperRange(10), + mHasAvatarPicker(false), + mHasDestinationGuide(false) { - if (!LLGridManager::getInstance()->isInSecondLife()) // Remove this line if we ever handle SecondLife sim features - gAgent.addRegionChangedCallback(boost::bind(&LFSimFeatureHandler::handleRegionChange, this)); + LL_INFOS() << "Initializing Sim Feature Handler" << LL_ENDL; + + gAgent.addRegionChangedCallback(boost::bind(&LFSimFeatureHandler::handleRegionChange, this)); + + // Call setSupportedFeatures -> This will work because we construct + // our singleton instance during STATE_SEED_CAP_GRANTED startup state + // after we received the initial region caps + setSupportedFeatures(); } ExportSupport LFSimFeatureHandler::exportPolicy() const @@ -59,27 +69,115 @@ void LFSimFeatureHandler::setSupportedFeatures() { LLSD info; region->getSimulatorFeatures(info); - if (info.has("OpenSimExtras")) // OpenSim specific sim features + if (!LLGridManager::getInstance()->isInSecondLife() && info.has("OpenSimExtras")) // OpenSim specific sim features { + LL_INFOS() << "Setting OpenSimExtras..." << LL_ENDL; + // For definition of OpenSimExtras please see // http://opensimulator.org/wiki/SimulatorFeatures_Extras const LLSD& extras(info["OpenSimExtras"]); + LL_DEBUGS() << "OpenSimExtras received: " << extras << LL_ENDL; + mSupportsExport = extras.has("ExportSupported") ? extras["ExportSupported"].asBoolean() : false; - mMapServerURL = extras.has("map-server-url") ? extras["map-server-url"].asString() : ""; - mSearchURL = extras.has("search-server-url") ? extras["search-server-url"].asString() : ""; + mMapServerURL = extras.has("map-server-url") ? extras["map-server-url"].asString() : gSavedSettings.getString("CurrentMapServerURL"); mSayRange = extras.has("say-range") ? extras["say-range"].asInteger() : 20; mShoutRange = extras.has("shout-range") ? extras["shout-range"].asInteger() : 100; mWhisperRange = extras.has("whisper-range") ? extras["whisper-range"].asInteger() : 10; + + if (extras.has("search-server-url")) + { + mSearchURL = extras["search-server-url"].asString(); + } + else if (LLLoginInstance::getInstance()->hasResponse("search")) + { + mSearchURL = LLLoginInstance::getInstance()->getResponse("search").asString(); + } + else + { + mSearchURL = LLGridManager::getInstance()->isInSecondLife() ? gSavedSettings.getString("SearchURL") : gSavedSettings.getString("SearchURLOpenSim"); + } + + if (extras.has("destination-guide-url")) + { + mDestinationGuideURL = extras["destination-guide-url"].asString(); + } + else if (LLLoginInstance::getInstance()->hasResponse("destination_guide_url")) + { + mDestinationGuideURL = LLLoginInstance::getInstance()->getResponse("destination_guide_url").asString(); + } + else if (LLGridManager::instance().isInSecondLife()) + { + mDestinationGuideURL = gSavedSettings.getString("DestinationGuideURL"); + } + else + { + mDestinationGuideURL = LLStringUtil::null; + } + + if (extras.has("avatar-picker-url")) + { + mAvatarPickerURL = extras["avatar-picker-url"].asString(); + } + else if (LLLoginInstance::getInstance()->hasResponse("avatar-picker-url")) + { + mAvatarPickerURL = LLLoginInstance::getInstance()->getResponse("avatar-picker-url").asString(); + } + else if (LLGridManager::instance().isInSecondLife()) + { + mAvatarPickerURL = gSavedSettings.getString("AvatarPickerURL"); + } + else + { + mAvatarPickerURL = LLStringUtil::null; + } } else // OpenSim specifics are unsupported reset all to default { + LL_INFOS() << "Setting defaults..." << LL_ENDL; mSupportsExport = false; - mMapServerURL = ""; - mSearchURL = ""; + mMapServerURL = gSavedSettings.getString("CurrentMapServerURL"); mSayRange = 20; mShoutRange = 100; mWhisperRange = 10; + + if (LLLoginInstance::getInstance()->hasResponse("search")) + { + mSearchURL = LLLoginInstance::getInstance()->getResponse("search").asString(); + } + else + { + mSearchURL = LLGridManager::getInstance()->isInSecondLife() ? gSavedSettings.getString("SearchURL") : gSavedSettings.getString("SearchURLOpenSim"); + } + + if (LLLoginInstance::getInstance()->hasResponse("destination_guide_url")) + { + mDestinationGuideURL = LLLoginInstance::getInstance()->getResponse("destination_guide_url").asString(); + } + else if (LLGridManager::instance().isInSecondLife()) + { + mDestinationGuideURL = gSavedSettings.getString("DestinationGuideURL"); + } + else + { + mDestinationGuideURL = LLStringUtil::null; + } + + if (LLLoginInstance::getInstance()->hasResponse("avatar-picker-url")) + { + mAvatarPickerURL = LLLoginInstance::getInstance()->getResponse("avatar-picker-url").asString(); + } + else if (LLGridManager::instance().isInSecondLife()) + { + mAvatarPickerURL = gSavedSettings.getString("AvatarPickerURL"); + } + else + { + mAvatarPickerURL = LLStringUtil::null; + } } + + mHasAvatarPicker = !avatarPickerURL().empty(); + mHasDestinationGuide = !destinationGuideURL().empty(); } } @@ -107,3 +205,13 @@ boost::signals2::connection LFSimFeatureHandler::setWhisperRangeCallback(const b { return mWhisperRange.connect(slot); } + +boost::signals2::connection LFSimFeatureHandler::setAvatarPickerCallback(const boost::signals2::signal::slot_type& slot) +{ + return mAvatarPickerURL.connect(slot); +} + +boost::signals2::connection LFSimFeatureHandler::setDestinationGuideCallback(const boost::signals2::signal::slot_type& slot) +{ + return mDestinationGuideURL.connect(slot); +} diff --git a/indra/newview/lfsimfeaturehandler.h b/indra/newview/lfsimfeaturehandler.h index c0ced542d0..e69746ab7d 100644 --- a/indra/newview/lfsimfeaturehandler.h +++ b/indra/newview/lfsimfeaturehandler.h @@ -55,6 +55,8 @@ typedef enum e_export_support class LFSimFeatureHandler : public LLSingleton { + LOG_CLASS(LFSimFeatureHandler); + protected: friend class LLSingleton; LFSimFeatureHandler(); @@ -69,6 +71,8 @@ public: boost::signals2::connection setSayRangeCallback(const boost::signals2::signal::slot_type& slot); boost::signals2::connection setShoutRangeCallback(const boost::signals2::signal::slot_type& slot); boost::signals2::connection setWhisperRangeCallback(const boost::signals2::signal::slot_type& slot); + boost::signals2::connection setAvatarPickerCallback(const boost::signals2::signal::slot_type& slot); + boost::signals2::connection setDestinationGuideCallback(const boost::signals2::signal::slot_type& slot); // Accessors bool simSupportsExport() const { return mSupportsExport; } @@ -78,6 +82,11 @@ public: U32 shoutRange() const { return mShoutRange; } U32 whisperRange() const { return mWhisperRange; } ExportSupport exportPolicy() const; + std::string avatarPickerURL() const { return mAvatarPickerURL; } + std::string destinationGuideURL() const { return mDestinationGuideURL; } + + bool hasAvatarPicker() const { return mHasAvatarPicker; } + bool hasDestinationGuide() const { return mHasDestinationGuide; } private: // SignaledTypes @@ -87,6 +96,11 @@ private: SignaledType mSayRange; SignaledType mShoutRange; SignaledType mWhisperRange; + SignaledType mAvatarPickerURL; + SignaledType mDestinationGuideURL; + + bool mHasAvatarPicker; + bool mHasDestinationGuide; }; #endif //LFSIMFEATUREHANDLER_H diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 5615f128e3..6da73924a2 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -4472,7 +4472,7 @@ bool LLAgent::teleportCore(bool is_local) } // - // bit of a hack -KC + // bit of a hack KCWindlightInterface::instance().setTPing(true); } make_ui_sound("UISndTeleportOut"); @@ -4783,7 +4783,8 @@ void LLAgent::doTeleportViaLocation(const LLVector3d& pos_global) msg->addUUIDFast(_PREHASH_SessionID, getSessionID()); msg->nextBlockFast(_PREHASH_Info); - F32 width = regionp->getWidth(); + // FIRE-17262: Wrong local teleports on a large opensim region (apparently need to divide by grid unit size) + F32 width = REGION_WIDTH_METERS;// regionp->getWidth(); LLVector3 pos(fmod((F32)pos_global.mdV[VX], width), fmod((F32)pos_global.mdV[VY], width), (F32)pos_global.mdV[VZ]); diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 760feac494..0ec821f6ab 100755 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2934,13 +2934,13 @@ void LLAgentCamera::loadCameraPosition() if (stored_camera_pos.isNull()) { - reportToNearbyChat(LLTrans::getString("LoadCameraPositionNoneSaved")); + report_to_nearby_chat(LLTrans::getString("LoadCameraPositionNoneSaved")); return; } if (dist_vec_squared(gAgent.getPositionGlobal(), stored_camera_pos) > far_clip_squared) { - reportToNearbyChat(LLTrans::getString("LoadCameraPositionOutsideDrawDistance")); + report_to_nearby_chat(LLTrans::getString("LoadCameraPositionOutsideDrawDistance")); return; } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5a845a5f2f..e2d8eba7cf 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1035,6 +1035,9 @@ bool LLAppViewer::init() settings_map["floater"] = &gSavedSettings; // *TODO: New settings file settings_map["account"] = &gSavedPerAccountSettings; + // Optional legacy notification well + gSavedSettings.setBOOL("FSInternalLegacyNotificationWell", gSavedSettings.getBOOL("FSLegacyNotificationWell")); + LLUI::initClass(settings_map, LLUIImageList::getInstance(), ui_audio_callback, diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 5d3c37b4a1..48dac91c6b 100755 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -150,7 +150,17 @@ void LLChannelManager::onLoginCompleted() S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound); - mStartUpChannel->setMouseDownCallback(boost::bind(&LLFloaterNotificationsTabbed::onStartUpToastClick, LLFloaterNotificationsTabbed::getInstance(), _2, _3, _4)); + // Optional legacy notification well + //mStartUpChannel->setMouseDownCallback(boost::bind(&LLFloaterNotificationsTabbed::onStartUpToastClick, LLFloaterNotificationsTabbed::getInstance(), _2, _3, _4)); + if (!gSavedSettings.getBOOL("FSInternalLegacyNotificationWell")) + { + mStartUpChannel->setMouseDownCallback(boost::bind(&LLFloaterNotificationsTabbed::onStartUpToastClick, LLFloaterNotificationsTabbed::getInstance(), _2, _3, _4)); + } + else + { + mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4)); + } + // mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this)); mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime")); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index a5516460f3..33dd9620b1 100755 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -313,7 +313,16 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p) mNotificationChannel.reset(new ChicletNotificationChannel(this)); // ensure that notification well window exists, to synchronously // handle toast add/delete events. - LLFloaterNotificationsTabbed::getInstance()->setSysWellChiclet(this); + // Optional legacy notification well + //LLFloaterNotificationsTabbed::getInstance()->setSysWellChiclet(this); + if (!gSavedSettings.getBOOL("FSInternalLegacyNotificationWell")) + { + LLFloaterNotificationsTabbed::getInstance()->setSysWellChiclet(this); + } + else + { + LLNotificationWellWindow::getInstance()->setSysWellChiclet(this); + } } void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data) @@ -321,7 +330,16 @@ void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data) std::string action = user_data.asString(); if("close all" == action) { - LLFloaterNotificationsTabbed::getInstance()->closeAll(); + // Optional legacy notification well + //LLFloaterNotificationsTabbed::getInstance()->closeAll(); + if (!gSavedSettings.getBOOL("FSInternalLegacyNotificationWell")) + { + LLFloaterNotificationsTabbed::getInstance()->closeAll(); + } + else + { + LLNotificationWellWindow::getInstance()->closeAll(); + } // [FS communication UI] - We have our own IM well button again //LLIMWellWindow::getInstance()->closeAll(); } @@ -374,7 +392,11 @@ bool LLNotificationChiclet::ChicletNotificationChannel::filterNotification( LLNo if ( (notification->getName() == "ScriptDialog") // special case for scripts // if there is no toast window for the notification, filter it //|| (!LLNotificationWellWindow::getInstance()->findItemByID(notification->getID())) - || (!LLFloaterNotificationsTabbed::getInstance()->findItemByID(notification->getID(), notification->getName())) + // Optional legacy notification well + //|| (!LLFloaterNotificationsTabbed::getInstance()->findItemByID(notification->getID(), notification->getName())) + || ((!gSavedSettings.getBOOL("FSInternalLegacyNotificationWell") && !LLFloaterNotificationsTabbed::getInstance()->findItemByID(notification->getID(), notification->getName())) + || (gSavedSettings.getBOOL("FSInternalLegacyNotificationWell") && !LLNotificationWellWindow::getInstance()->findItemByID(notification->getID()))) + // ) { displayNotification = false; diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp index 1e97c6dfa3..f537a947e1 100755 --- a/indra/newview/llchicletbar.cpp +++ b/indra/newview/llchicletbar.cpp @@ -150,7 +150,17 @@ BOOL LLChicletBar::postBuild() // [FS communication UI] showWellButton("im_well", !LLIMWellWindow::getInstance()->isWindowEmpty()); - showWellButton("notification_well", !LLFloaterNotificationsTabbed::getInstance()->isWindowEmpty()); + // Optional legacy notification well + //showWellButton("notification_well", !LLFloaterNotificationsTabbed::getInstance()->isWindowEmpty()); + if (!gSavedSettings.getBOOL("FSInternalLegacyNotificationWell")) + { + showWellButton("notification_well", !LLFloaterNotificationsTabbed::getInstance()->isWindowEmpty()); + } + else + { + showWellButton("notification_well", !LLNotificationWellWindow::getInstance()->isWindowEmpty()); + } + // LLPanelTopInfoBar::instance().setResizeCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this)); LLPanelTopInfoBar::instance().setVisibleCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this)); diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp index bb97ee7bd1..8d54e8434f 100755 --- a/indra/newview/llenvmanager.cpp +++ b/indra/newview/llenvmanager.cpp @@ -503,7 +503,7 @@ void LLEnvManagerNew::onRegionSettingsResponse(const LLSD& content) // Load region sky presets. LLWLParamManager::instance().refreshRegionPresets(); - // Use the region settings if parcel settings didnt override it already -KC + // Use the region settings if parcel settings didnt override it already if (KCWindlightInterface::instance().haveParcelOverride(new_settings)) { // If using server settings, update managers. @@ -523,6 +523,7 @@ void LLEnvManagerNew::onRegionSettingsResponse(const LLSD& content) setUserPrefs(getWaterPresetName(), getSkyPresetName(), getDayCycleName(), false, true, mInterpNextChangeMessage); } } + // // Let interested parties know about the region settings update. mRegionSettingsChangeSignal(); diff --git a/indra/newview/llfloateravatar.cpp b/indra/newview/llfloateravatar.cpp index 31adf5b61e..63ddcee7ef 100755 --- a/indra/newview/llfloateravatar.cpp +++ b/indra/newview/llfloateravatar.cpp @@ -36,9 +36,13 @@ #include "lluictrlfactory.h" #include "llmediactrl.h" +#include "lfsimfeaturehandler.h" +#include "llhttpconstants.h" +#include "llweb.h" LLFloaterAvatar::LLFloaterAvatar(const LLSD& key) - : LLFloater(key) + : LLFloater(key), + mAvatarPickerUrlChangedSignal() // Avatar chooser does not change between OpenSim grids { } @@ -51,6 +55,13 @@ LLFloaterAvatar::~LLFloaterAvatar() avatar_picker->clearCache(); //images are reloading each time already avatar_picker->unloadMediaSource(); } + + // Avatar chooser does not change between OpenSim grids + if (mAvatarPickerUrlChangedSignal.connected()) + { + mAvatarPickerUrlChangedSignal.disconnect(); + } + // } BOOL LLFloaterAvatar::postBuild() @@ -59,4 +70,23 @@ BOOL LLFloaterAvatar::postBuild() return TRUE; } +// Avatar chooser does not change between OpenSim grids +void LLFloaterAvatar::onOpen(const LLSD& key) +{ + // Connect during onOpen instead of ctor because LLFloaterAvatar instance + // gets created before we can safely create a LFSimFeatureHandler instance! + // Assuming we receive the avatar picker URL via login response and it + // is the same URL being sent by region caps so we will be good for the initial + // region the avatar logs into as well. + if (!mAvatarPickerUrlChangedSignal.connected()) + { + mAvatarPickerUrlChangedSignal = LFSimFeatureHandler::instance().setAvatarPickerCallback(boost::bind(&LLFloaterAvatar::handleUrlChanged, this)); + } +} + +void LLFloaterAvatar::handleUrlChanged() +{ + getChild("avatar_picker_contents")->navigateTo(LLWeb::expandURLSubstitutions(LFSimFeatureHandler::instance().avatarPickerURL(), LLSD()), HTTP_CONTENT_TEXT_HTML); +} +// diff --git a/indra/newview/llfloateravatar.h b/indra/newview/llfloateravatar.h index cadc5e4028..6f9d6413ec 100755 --- a/indra/newview/llfloateravatar.h +++ b/indra/newview/llfloateravatar.h @@ -38,6 +38,13 @@ private: LLFloaterAvatar(const LLSD& key); /*virtual*/ ~LLFloaterAvatar(); /*virtual*/ BOOL postBuild(); + + // Avatar chooser does not change between OpenSim grids + /*virtual*/ void onOpen(const LLSD& key); + void handleUrlChanged(); + + boost::signals2::connection mAvatarPickerUrlChangedSignal; + // }; #endif diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 3b1aee77d1..8ac66c6644 100755 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -176,6 +176,12 @@ void LLFloaterBvhPreview::setAnimCallbacks() getChild("loop_in_point")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateLoopIn, this, _1)); getChild("loop_out_point")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitLoopOut, this)); getChild("loop_out_point")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateLoopOut, this, _1)); + // FIRE-17277: Allow entering Loop In/Loop Out as frames + getChild("loop_in_frames")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitLoopInFrames, this)); + getChild("loop_in_frames")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateLoopInFrames, this, _1)); + getChild("loop_out_frames")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitLoopOutFrames, this)); + getChild("loop_out_frames")->setValidateBeforeCommit( boost::bind(&LLFloaterBvhPreview::validateLoopOutFrames, this, _1)); + // getChild("hand_pose_combo")->setCommitCallback(boost::bind(&LLFloaterBvhPreview::onCommitHandPose, this)); @@ -329,6 +335,20 @@ BOOL LLFloaterBvhPreview::loadBVH() // motion will be returned, but it will be in a load-pending state, as this is a new motion // this motion will not request an asset transfer until next update, so we have a chance to // load the keyframe data locally + // FIRE-17277: Allow entering Loop In/Loop Out as frames + mNumFrames = loaderp->getNumFrames(); + getChild("loop_in_frames")->setMaxValue(LLSD((F32)mNumFrames)); + getChild("loop_out_frames")->setMaxValue(LLSD((F32)mNumFrames)); + // (Re)assign loop frames spinners from loop percentages. + getChild("loop_in_frames")->setValue(LLSD((F32)getChild("loop_in_point")->getValue().asReal() / 100.f * (F32)mNumFrames)); + getChild("loop_out_frames")->setValue(LLSD((F32)getChild("loop_out_point")->getValue().asReal() / 100.f * (F32)mNumFrames)); + + LLUIString out_str = getString("FS_report_frames"); + out_str.setArg("[F]", llformat("%d", mNumFrames)); + out_str.setArg("[S]", llformat("%.1f", loaderp->getDuration())); + out_str.setArg("[FPS]", llformat("%.1f", (F32)mNumFrames / loaderp->getDuration())); + getChild("frames_label")->setValue(LLSD(out_str)); + // // Preview on own avatar //motionp = (LLKeyframeMotion*)mAnimPreview->getDummyAvatar()->createMotion(mMotionID); motionp = dynamic_cast(mAnimPreview->getPreviewAvatar(this)->createMotion(mMotionID)); @@ -388,8 +408,18 @@ BOOL LLFloaterBvhPreview::loadBVH() motionp->setLoopOut((F32)getChild("loop_out_point")->getValue().asReal() / 100.f * motionp->getDuration()); motionp->setPriority(getChild("priority")->getValue().asInteger()); motionp->setHandPose(LLHandMotion::getHandPose(getChild("hand_pose_combo")->getValue().asString())); - motionp->setEaseIn((F32)getChild("ease_in_time")->getValue().asReal()); - motionp->setEaseOut((F32)getChild("ease_out_time")->getValue().asReal()); + F32 ease_in = (F32)getChild("ease_in_time")->getValue().asReal(); + F32 ease_out = (F32)getChild("ease_out_time")->getValue().asReal(); + if (motionp->getDuration() != 0.f && ease_in + ease_out > motionp->getDuration() && !getChild("loop_check")->getValue().asBoolean()) + { + F32 factor = motionp->getDuration() / (ease_in + ease_out); + ease_in *= factor; + ease_out *= factor; + getChild("ease_in_time")->setValue(LLSD(ease_in)); + getChild("ease_out_time")->setValue(LLSD(ease_out)); + } + motionp->setEaseIn(ease_in); + motionp->setEaseOut(ease_out); // setEnabled(TRUE); std::string seconds_string; @@ -869,7 +899,10 @@ void LLFloaterBvhPreview::onCommitLoopIn() if (motionp) { - motionp->setLoopIn((F32)getChild("loop_in_point")->getValue().asReal() / 100.f); + // FIRE-17277: Allow entering Loop In/Loop Out as frames + //motionp->setLoopIn((F32)getChild("loop_in_point")->getValue().asReal() / 100.f); + getChild("loop_in_frames")->setValue(LLSD((F32)getChild("loop_in_point")->getValue().asReal() / 100.f * (F32)mNumFrames)); + // resetMotion(); getChild("loop_check")->setValue(LLSD(TRUE)); onCommitLoop(); @@ -893,13 +926,61 @@ void LLFloaterBvhPreview::onCommitLoopOut() if (motionp) { - motionp->setLoopOut((F32)getChild("loop_out_point")->getValue().asReal() * 0.01f * motionp->getDuration()); + // FIRE-17277: Allow entering Loop In/Loop Out as frames + //motionp->setLoopOut((F32)getChild("loop_out_point")->getValue().asReal() * 0.01f * motionp->getDuration()); + getChild("loop_out_frames")->setValue(LLSD((F32)getChild("loop_out_point")->getValue().asReal() / 100.f * (F32)mNumFrames)); + // resetMotion(); getChild("loop_check")->setValue(LLSD(TRUE)); onCommitLoop(); } } +// FIRE-17277: Allow entering Loop In/Loop Out as frames +//----------------------------------------------------------------------------- +// onCommitLoopInFrames() +//----------------------------------------------------------------------------- +void LLFloaterBvhPreview::onCommitLoopInFrames() +{ + if (!getEnabled() || !mAnimPreview) + return; + + // Preview on own avatar + LLVOAvatar* avatarp = mAnimPreview->getPreviewAvatar(this); + LLKeyframeMotion* motionp = dynamic_cast(avatarp->findMotion(mMotionID)); + + if (motionp) + { + getChild("loop_in_point")->setValue(LLSD(mNumFrames == 0 ? 0.f : 100.f * (F32)getChild("loop_in_frames")->getValue().asReal() / (F32)mNumFrames)); + resetMotion(); + getChild("loop_check")->setValue(LLSD(TRUE)); + // The values are actually set here: + onCommitLoop(); + } +} + +//----------------------------------------------------------------------------- +// onCommitLoopOutFrames() +//----------------------------------------------------------------------------- +void LLFloaterBvhPreview::onCommitLoopOutFrames() +{ + if (!getEnabled() || !mAnimPreview) + return; + + // Preview on own avatar + LLVOAvatar* avatarp = mAnimPreview->getPreviewAvatar(this); + LLKeyframeMotion* motionp = dynamic_cast(avatarp->findMotion(mMotionID)); + + if (motionp) + { + getChild("loop_out_point")->setValue(LLSD(mNumFrames == 0 ? 100.f : 100.f * (F32)getChild("loop_out_frames")->getValue().asReal() / (F32)mNumFrames)); + resetMotion(); + getChild("loop_check")->setValue(LLSD(TRUE)); + onCommitLoop(); + } +} +// + //----------------------------------------------------------------------------- // onCommitName() //----------------------------------------------------------------------------- @@ -1083,6 +1164,9 @@ bool LLFloaterBvhPreview::validateLoopIn(const LLSD& data) } getChild("loop_in_point")->setValue(LLSD(loop_in_value)); + // FIRE-17277: Allow entering Loop In/Loop Out as frames + getChild("loop_in_frames")->setValue(LLSD(loop_in_value / 100.f * (F32)mNumFrames)); + // return true; } @@ -1111,10 +1195,74 @@ bool LLFloaterBvhPreview::validateLoopOut(const LLSD& data) } getChild("loop_out_point")->setValue(LLSD(loop_out_value)); + // FIRE-17277: Allow entering Loop In/Loop Out as frames + getChild("loop_out_frames")->setValue(LLSD(loop_out_value / 100.f * (F32)mNumFrames)); + // return true; } +// FIRE-17277: Allow entering Loop In/Loop Out as frames +//----------------------------------------------------------------------------- +// validateLoopInFrames() +//----------------------------------------------------------------------------- +bool LLFloaterBvhPreview::validateLoopInFrames(const LLSD& data) +{ + if (!getEnabled()) + return false; + + F32 loop_in_value = (F32)getChild("loop_in_frames")->getValue().asReal(); + F32 loop_out_value = (F32)getChild("loop_out_frames")->getValue().asReal(); + + if (loop_in_value < 0.f) + { + loop_in_value = 0.f; + } + else if (loop_in_value > 100.f) + { + loop_in_value = 100.f; + } + else if (loop_in_value > loop_out_value) + { + loop_in_value = loop_out_value; + } + + getChild("loop_in_frames")->setValue(LLSD(loop_in_value)); + getChild("loop_in_point")->setValue(LLSD(mNumFrames == 0 ? 0.f : 100.f * loop_in_value / (F32)mNumFrames)); + return true; +} + +//----------------------------------------------------------------------------- +// validateLoopOutFrames() +//----------------------------------------------------------------------------- +bool LLFloaterBvhPreview::validateLoopOutFrames(const LLSD& data) +{ + if (!getEnabled()) + return false; + + F32 loop_out_value = (F32)getChild("loop_out_frames")->getValue().asReal(); + F32 loop_in_value = (F32)getChild("loop_in_frames")->getValue().asReal(); + + if (loop_out_value < 0.f) + { + loop_out_value = 0.f; + } + else if (loop_out_value > 100.f) + { + loop_out_value = 100.f; + } + else if (loop_out_value < loop_in_value) + { + loop_out_value = loop_in_value; + } + + getChild("loop_out_frames")->setValue(LLSD(loop_out_value)); + getChild("loop_out_point")->setValue(LLSD(mNumFrames == 0 ? 100.f : 100.f * loop_out_value / (F32)mNumFrames)); + return true; +} +// + + //----------------------------------------------------------------------------- // refresh() //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterbvhpreview.h b/indra/newview/llfloaterbvhpreview.h index 6b7e6c3c5d..a803c411ba 100755 --- a/indra/newview/llfloaterbvhpreview.h +++ b/indra/newview/llfloaterbvhpreview.h @@ -116,6 +116,12 @@ public: LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status); + // FIRE-17277: Allow entering Loop In/Loop Out as frames + void onCommitLoopInFrames(); + void onCommitLoopOutFrames(); + bool validateLoopInFrames(const LLSD& data); + bool validateLoopOutFrames(const LLSD& data); + // private: void setAnimCallbacks() ; // Reload animation from disk @@ -146,6 +152,9 @@ protected: // FIRE-2083: Slider in upload animation floater doesn't work LLFrameTimer mTimer; + + // FIRE-17277: Allow entering Loop In/Loop Out as frames + S32 mNumFrames; }; #endif // LL_LLFLOATERBVHPREVIEW_H diff --git a/indra/newview/llfloaterdestinations.cpp b/indra/newview/llfloaterdestinations.cpp index af21cb593f..0214de9c29 100755 --- a/indra/newview/llfloaterdestinations.cpp +++ b/indra/newview/llfloaterdestinations.cpp @@ -35,14 +35,25 @@ #include "llfloaterdestinations.h" #include "lluictrlfactory.h" +#include "lfsimfeaturehandler.h" +#include "llhttpconstants.h" +#include "llmediactrl.h" +#include "llweb.h" LLFloaterDestinations::LLFloaterDestinations(const LLSD& key) - : LLFloater(key) + : LLFloater(key), + mDestinationGuideUrlChangedSignal() // FIRE-16833: Destination guide does not change between OpenSim grids { } LLFloaterDestinations::~LLFloaterDestinations() { + // FIRE-16833: Destination guide does not change between OpenSim grids + if (mDestinationGuideUrlChangedSignal.connected()) + { + mDestinationGuideUrlChangedSignal.disconnect(); + } + // } BOOL LLFloaterDestinations::postBuild() @@ -51,4 +62,22 @@ BOOL LLFloaterDestinations::postBuild() return TRUE; } +// FIRE-16833: Destination guide does not change between OpenSim grids +void LLFloaterDestinations::onOpen(const LLSD& key) +{ + // Connect during onOpen instead of ctor because LLFloaterDestinations instance + // gets created before we can safely create a LFSimFeatureHandler instance! + // Assuming we receive the destination guide URL via login response and it + // is the same URL being sent by region caps so we will be good for the initial + // region the avatar logs into as well. + if (!mDestinationGuideUrlChangedSignal.connected()) + { + mDestinationGuideUrlChangedSignal = LFSimFeatureHandler::instance().setDestinationGuideCallback(boost::bind(&LLFloaterDestinations::handleUrlChanged, this)); + } +} +void LLFloaterDestinations::handleUrlChanged() +{ + getChild("destination_guide_contents")->navigateTo(LLWeb::expandURLSubstitutions(LFSimFeatureHandler::instance().destinationGuideURL(), LLSD()), HTTP_CONTENT_TEXT_HTML); +} +// diff --git a/indra/newview/llfloaterdestinations.h b/indra/newview/llfloaterdestinations.h index 85d9b3391e..1de0e9d7d8 100755 --- a/indra/newview/llfloaterdestinations.h +++ b/indra/newview/llfloaterdestinations.h @@ -38,6 +38,13 @@ private: LLFloaterDestinations(const LLSD& key); /*virtual*/ ~LLFloaterDestinations(); /*virtual*/ BOOL postBuild(); + + // FIRE-16833: Destination guide does not change between OpenSim grids + /*virtual*/ void onOpen(const LLSD& key); + void handleUrlChanged(); + + boost::signals2::connection mDestinationGuideUrlChangedSignal; + // }; #endif diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index 596e8c0dbe..a97bb5717a 100755 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -80,8 +80,10 @@ void LLFloaterDisplayName::onOpen(const LLSD& key) av_name.mNextUpdate - LLStringOps::getLocalTimeOffset(); LLDate next_update_local(next_update_local_secs); // display as "July 18 12:17 PM" + // FIRE-17293: Abbreviate month to make sure it fits std::string next_update_string = - next_update_local.toHTTPDateString("%B %d %I:%M %p"); + //next_update_local.toHTTPDateString("%B %d %I:%M %p"); + next_update_local.toHTTPDateString("%b %d %I:%M %p"); getChild("lockout_text")->setTextArg("[TIME]", next_update_string); getChild("lockout_text")->setVisible(true); getChild("save_btn")->setEnabled(false); diff --git a/indra/newview/llfloaterfacebook.cpp b/indra/newview/llfloaterfacebook.cpp index d174fb9f01..8af73b87bb 100644 --- a/indra/newview/llfloaterfacebook.cpp +++ b/indra/newview/llfloaterfacebook.cpp @@ -56,6 +56,8 @@ #include "llspinctrl.h" +#include "lfsimfeaturehandler.h" + static LLPanelInjector t_panel_status("llfacebookstatuspanel"); static LLPanelInjector t_panel_photo("llfacebookphotopanel"); static LLPanelInjector t_panel_checkin("llfacebookcheckinpanel"); @@ -80,7 +82,10 @@ std::string get_map_url() } int x_pos = center_agent[0] / 256.0; int y_pos = center_agent[1] / 256.0; - std::string map_url = gSavedSettings.getString("CurrentMapServerURL") + llformat("map-1-%d-%d-objects.jpg", x_pos, y_pos); + // OpenSim support + //std::string map_url = gSavedSettings.getString("CurrentMapServerURL") + llformat("map-1-%d-%d-objects.jpg", x_pos, y_pos); + std::string map_url = LFSimFeatureHandler::instance().mapServerURL() + llformat("map-1-%d-%d-objects.jpg", x_pos, y_pos); + // return map_url; } diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 3861cb1d88..37f3475173 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -303,6 +303,15 @@ BOOL LLFloaterLand::postBuild() tab->selectTab(sLastTab); } + // FIRE-17280: Requesting Experience access allow & block list breaks OpenSim +#if OPENSIM + if (!LLGridManager::instance().isInSecondLife()) + { + mTabLand->removeTabPanel(mTabLand->getPanelByName("land_experiences_panel")); + } +#endif + // + return TRUE; } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 972af70834..4b08da0f9d 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -129,6 +129,7 @@ #include "fsdroptarget.h" #include "fsfloaterimcontainer.h" #include "growlmanager.h" +#include "lfsimfeaturehandler.h" #include "llavatarname.h" // Deeper name cache stuffs #include "lleventtimer.h" #include "lldiriterator.h" // for populating the fonts combo @@ -379,22 +380,29 @@ bool callback_pick_debug_search(const LLSD& notification, const LLSD& response) if ( option == 0 ) // YES { std::string url; -#ifdef OPENSIM // - if(LLGridManager::getInstance()->isInOpenSim()) + + if (LFSimFeatureHandler::instanceExists()) { - url = LLLoginInstance::getInstance()->hasResponse("search") - ? LLLoginInstance::getInstance()->getResponse("search").asString() - : gSavedSettings.getString("SearchURLOpenSim"); + url = LFSimFeatureHandler::instance().searchURL(); } - else // we are in SL or SL beta -#endif // OPENSIM // + else { - //not in OpenSim means we are in SL or SL beta - url = gSavedSettings.getString("SearchURL"); +#ifdef OPENSIM // + if (LLGridManager::getInstance()->isInOpenSim()) + { + url = LLLoginInstance::getInstance()->hasResponse("search") + ? LLLoginInstance::getInstance()->getResponse("search").asString() + : gSavedSettings.getString("SearchURLOpenSim"); + } + else // we are in SL or SL beta +#endif // OPENSIM // + { + //not in OpenSim means we are in SL or SL beta + url = gSavedSettings.getString("SearchURL"); + } } gSavedSettings.setString("SearchURLDebug", url); - } return false; @@ -487,6 +495,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) // mCommitCallbackRegistrar.add("Pref.ClickSkin", boost::bind(&LLFloaterPreference::onClickSkin, this,_1, _2)); // mCommitCallbackRegistrar.add("Pref.SelectSkin", boost::bind(&LLFloaterPreference::onSelectSkin, this)); mCommitCallbackRegistrar.add("Pref.VoiceSetKey", boost::bind(&LLFloaterPreference::onClickSetKey, this)); + mCommitCallbackRegistrar.add("Pref.VoiceSetClearKey", boost::bind(&LLFloaterPreference::onClickClearKey, this)); // FIRE-3803: Clear voice toggle button mCommitCallbackRegistrar.add("Pref.VoiceSetMiddleMouse", boost::bind(&LLFloaterPreference::onClickSetMiddleMouse, this)); // Handled centrally now // mCommitCallbackRegistrar.add("Pref.SetSounds", boost::bind(&LLFloaterPreference::onClickSetSounds, this)); @@ -634,13 +643,9 @@ BOOL LLFloaterPreference::postBuild() { // [FS communication UI] //gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLFloaterIMSessionTab::processChatHistoryStyleUpdate, false)); - gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&FSFloaterIM::processChatHistoryStyleUpdate, _2)); - gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&FSFloaterNearbyChat::processChatHistoryStyleUpdate, _2)); - gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&FSFloaterIM::processChatHistoryStyleUpdate, _2)); - gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&FSFloaterNearbyChat::processChatHistoryStyleUpdate, _2)); - // [FS communication UI] - gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLViewerChat::signalChatFontChanged)); + //gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLViewerChat::signalChatFontChanged)); + // [FS communication UI] gSavedSettings.getControl("ChatBubbleOpacity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onNameTagOpacityChange, this, _2)); gSavedSettings.getControl("ConsoleBackgroundOpacity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onConsoleOpacityChange, this, _2)); // FIRE-1332 - Sepeate opacity settings for nametag and console chat @@ -2615,6 +2620,13 @@ void LLFloaterPreference::onClickSetKey() } } +// FIRE-3803: Clear voice toggle button +void LLFloaterPreference::onClickClearKey() +{ + gSavedSettings.setString("PushToTalkButton", ""); +} +// + void LLFloaterPreference::setKey(KEY key) { getChild("modifier_combo")->setValue(LLKeyboard::stringFromKey(key)); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 2739236f06..65fffed696 100755 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -190,6 +190,7 @@ public: void onClickSkin(LLUICtrl* ctrl,const LLSD& userdata); void onSelectSkin(); void onClickSetKey(); + void onClickClearKey(); // FIRE-3803: Clear voice toggle button void setKey(KEY key); void onClickSetMiddleMouse(); // void onClickSetSounds(); // Handled centrally now diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 15c56551b5..cc98d26501 100755 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -223,20 +223,10 @@ void LLFloaterSearch::search(const SearchQuery &p) { url = debug_url; } - else if(LLGridManager::getInstance()->isInOpenSim()) - { - std::string os_search_url = LFSimFeatureHandler::instance().searchURL(); - if (!os_search_url.empty()) - url = os_search_url; - else if (LLLoginInstance::getInstance()->hasResponse("search")) - url = LLLoginInstance::getInstance()->getResponse("search").asString(); - else - url = gSavedSettings.getString("SearchURLOpenSim"); - } else // we are in SL or SL beta #endif // OPENSIM // { - url = gSavedSettings.getString("SearchURL"); + url = LFSimFeatureHandler::instance().searchURL(); } // diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h index 48a9f70079..4dda3de43e 100755 --- a/indra/newview/llfriendcard.h +++ b/indra/newview/llfriendcard.h @@ -96,10 +96,12 @@ private: */ const LLUUID extractAvatarID(const LLUUID& avatarID); +public: // Needed to check in LLOpenTaskOffer bool isAvatarDataStored(const LLUUID& avatarID) const { return (mBuddyIDSet.end() != mBuddyIDSet.find(avatarID)); } +private: // Needed to check in LLOpenTaskOffer const LLUUID& findChildFolderUUID(const LLUUID& parentFolderUUID, const std::string& nonLocalizedName) const; const LLUUID& findFriendFolderUUIDImpl() const; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e5322f3864..95a8d54510 100755 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3019,7 +3019,7 @@ void LLIMMgr::addMessage( { LLStringUtil::format_map_t args; args["NAME"] = LLSLURL("group", new_session_id, "about").getSLURLString(); - reportToNearbyChat(LLTrans::getString("GroupChatMuteNotice", args)); + report_to_nearby_chat(LLTrans::getString("GroupChatMuteNotice", args)); } clearPendingInvitation(new_session_id); clearPendingAgentListUpdates(new_session_id); @@ -3103,7 +3103,7 @@ void LLIMMgr::addMessage( } else if (reportIgnoredAdHocSession) { - reportToNearbyChat(LLTrans::getString("IgnoredAdHocSession")); + report_to_nearby_chat(LLTrans::getString("IgnoredAdHocSession")); } return; } @@ -4339,7 +4339,7 @@ public: { LLStringUtil::format_map_t args; args["NAME"] = LLSLURL("group", session_id, "about").getSLURLString(); - reportToNearbyChat(LLTrans::getString("GroupChatMuteNotice", args)); + report_to_nearby_chat(LLTrans::getString("GroupChatMuteNotice", args)); } //KC: make sure we leave the group chat at the server end as well diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 7d7478d005..a9d2781e98 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4484,7 +4484,10 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, // DAD_LINK type might mean one of two asset types: AT_LINK or AT_LINK_FOLDER. // If we have an item of AT_LINK_FOLDER type we should process the linked // category being dragged or dropped into folder. - if (inv_item && LLAssetType::AT_LINK_FOLDER == inv_item->getActualType()) + // FIRE-13863: Allow moving folder links + //if (inv_item && LLAssetType::AT_LINK_FOLDER == inv_item->getActualType()) + if (inv_item && LLAssetType::AT_LINK_FOLDER == inv_item->getActualType() && !gSavedSettings.getBOOL("FSEnableMovingFolderLinks")) + // { LLInventoryCategory* linked_category = gInventory.getCategory(inv_item->getLinkedUUID()); if (linked_category) diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index a81ed69b99..8dc0e41c67 100755 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -358,7 +358,7 @@ void LLMuteList::updateAdd(const LLMute& mute) { LLStringUtil::format_map_t args; args["NAME"] = mute.mName; - reportToNearbyChat(LLTrans::getString("Mute_Add", args)); + report_to_nearby_chat(LLTrans::getString("Mute_Add", args)); } // } @@ -465,7 +465,7 @@ void LLMuteList::updateRemove(const LLMute& mute) { LLStringUtil::format_map_t args; args["NAME"] = mute.mName; - reportToNearbyChat(LLTrans::getString("Mute_Remove", args)); + report_to_nearby_chat(LLTrans::getString("Mute_Remove", args)); } // } diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 8d88446964..f786381752 100755 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -1856,7 +1856,7 @@ void LLNetMap::handleCam() } else { - reportToNearbyChat(LLTrans::getString("minimap_no_focus")); + report_to_nearby_chat(LLTrans::getString("minimap_no_focus")); } } diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index b347524856..8709d2e500 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -401,14 +401,24 @@ BOOL LLGroupNoticeNotificationListItem::postBuild() mTitleBoxExp->setValue(mParams.subject); mNoticeTextExp->setValue(mParams.message); - mTimeBox->setValue(buildNotificationDate(mParams.time_stamp, UTC)); - mTimeBoxExp->setValue(buildNotificationDate(mParams.time_stamp, UTC)); + // FIRE-17313: Display group notices in SLT + //mTimeBox->setValue(buildNotificationDate(mParams.time_stamp, UTC)); + //mTimeBoxExp->setValue(buildNotificationDate(mParams.time_stamp, UTC)); + ////Workaround: in case server timestamp is 0 - we use the time when notification was actually received + //if (mParams.time_stamp.isNull()) + //{ + // mTimeBox->setValue(buildNotificationDate(mParams.received_time, UTC)); + // mTimeBoxExp->setValue(buildNotificationDate(mParams.received_time, UTC)); + //} + mTimeBox->setValue(buildNotificationDate(mParams.time_stamp, SLT)); + mTimeBoxExp->setValue(buildNotificationDate(mParams.time_stamp, SLT)); //Workaround: in case server timestamp is 0 - we use the time when notification was actually received if (mParams.time_stamp.isNull()) { - mTimeBox->setValue(buildNotificationDate(mParams.received_time, UTC)); - mTimeBoxExp->setValue(buildNotificationDate(mParams.received_time, UTC)); + mTimeBox->setValue(buildNotificationDate(mParams.received_time, SLT)); + mTimeBoxExp->setValue(buildNotificationDate(mParams.received_time, SLT)); } + // setSender(mParams.sender); if (mInventoryOffer != NULL) diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 955c24eb7a..88c5014f9d 100755 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -92,7 +92,8 @@ LLPanelGroup::LLPanelGroup() : LLPanel(), LLGroupMgrObserver( LLUUID() ), mSkipRefresh(FALSE), - mButtonJoin(NULL) + mButtonJoin(NULL), + mIsUsingTabContainer(false) // TabContainer switch { // Set up the factory callbacks. // Roles sub tabs @@ -114,19 +115,60 @@ void LLPanelGroup::onOpen(const LLSD& key) if(!key.has("group_id")) return; - // open the desired panel - if (key.has("open_tab_name")) - { - // onOpen from selected panel will be called from onTabSelected callback - LLTabContainer* tab_ctrl = getChild("groups_accordion"); - tab_ctrl->selectTabByName(key["open_tab_name"]); - } - LLUUID group_id = key["group_id"]; if(!key.has("action")) { setGroupID(group_id); - getChild("groups_accordion")->expandDefaultTab(); + // TabContainer switch + //getChild("groups_accordion")->expandDefaultTab(); + if (mIsUsingTabContainer) + { + if (key.has("open_tab_name")) + { + getChild("groups_accordion")->selectTabByName(key["open_tab_name"].asString()); + } + } + else + { + if (key.has("open_tab_name")) + { + LLAccordionCtrlTab* tab_general = getChild("group_general_tab"); + LLAccordionCtrlTab* tab_roles = getChild("group_roles_tab"); + LLAccordionCtrlTab* tab_notices = getChild("group_notices_tab"); + LLAccordionCtrlTab* tab_land = getChild("group_land_tab"); + LLAccordionCtrlTab* tab_experiences = getChild("group_experiences_tab"); + + if(tab_general->getDisplayChildren()) + tab_general->changeOpenClose(tab_general->getDisplayChildren()); + if(tab_roles->getDisplayChildren()) + tab_roles->changeOpenClose(tab_roles->getDisplayChildren()); + if(tab_notices->getDisplayChildren()) + tab_notices->changeOpenClose(tab_notices->getDisplayChildren()); + if(tab_land->getDisplayChildren()) + tab_land->changeOpenClose(tab_land->getDisplayChildren()); + if(tab_experiences->getDisplayChildren()) + tab_experiences->changeOpenClose(tab_land->getDisplayChildren()); + + tab_general->setSelected(false); + tab_roles->setSelected(false); + tab_notices->setSelected(false); + tab_land->setSelected(false); + tab_experiences->setSelected(false); + + LLAccordionCtrlTab* target_tab = getChild(key["open_tab_name"].asString())->getParentByType(); + if (target_tab) + { + target_tab->changeOpenClose(false); + target_tab->setFocus(TRUE); + target_tab->notifyParent(LLSD().with("action", "select_current")); + } + } + else + { + getChild("groups_accordion")->expandDefaultTab(); + } + } + // return; } @@ -213,6 +255,9 @@ BOOL LLPanelGroup::postBuild() LLVoiceClient::getInstance()->addObserver(this); + // TabContainer switch + mIsUsingTabContainer = (findChild("groups_accordion") != NULL); + return TRUE; } @@ -442,14 +487,39 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) getChild("prepend_founded_by")->setVisible(!is_null_group_id); - LLAccordionCtrl* tab_ctrl = getChild("groups_accordion"); - tab_ctrl->reset(); + // TabContainer switch + //LLAccordionCtrl* tab_ctrl = getChild("groups_accordion"); + //tab_ctrl->reset(); - LLAccordionCtrlTab* tab_general = getChild("group_general_tab"); - LLAccordionCtrlTab* tab_roles = getChild("group_roles_tab"); - LLAccordionCtrlTab* tab_notices = getChild("group_notices_tab"); - LLAccordionCtrlTab* tab_land = getChild("group_land_tab"); - LLAccordionCtrlTab* tab_experiences = getChild("group_experiences_tab"); + //LLAccordionCtrlTab* tab_general = getChild("group_general_tab"); + //LLAccordionCtrlTab* tab_roles = getChild("group_roles_tab"); + //LLAccordionCtrlTab* tab_notices = getChild("group_notices_tab"); + //LLAccordionCtrlTab* tab_land = getChild("group_land_tab"); + //LLAccordionCtrlTab* tab_experiences = getChild("group_experiences_tab"); + LLAccordionCtrl* tab_ctrl = NULL; + LLAccordionCtrlTab* tab_general = NULL; + LLAccordionCtrlTab* tab_roles = NULL; + LLAccordionCtrlTab* tab_notices = NULL; + LLAccordionCtrlTab* tab_land = NULL; + LLAccordionCtrlTab* tab_experiences = NULL; + LLTabContainer* tabcont_ctrl = NULL; + + if (mIsUsingTabContainer) + { + tabcont_ctrl = getChild("groups_accordion"); + } + else + { + tab_ctrl = getChild("groups_accordion"); + tab_ctrl->reset(); + + tab_general = getChild("group_general_tab"); + tab_roles = getChild("group_roles_tab"); + tab_notices = getChild("group_notices_tab"); + tab_land = getChild("group_land_tab"); + tab_experiences = getChild("group_experiences_tab"); + } + // if(mButtonJoin) mButtonJoin->setVisible(false); @@ -457,9 +527,20 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) if(is_null_group_id)//creating new group { + // TabContainer switch + if (mIsUsingTabContainer) + { + for (S32 i = 1; i <= 4; ++i) + { + tabcont_ctrl->setTabVisibility(tabcont_ctrl->getPanelByIndex(i), false); + } + } + else + { + // if(!tab_general->getDisplayChildren()) tab_general->changeOpenClose(tab_general->getDisplayChildren()); - + if(tab_roles->getDisplayChildren()) tab_roles->changeOpenClose(tab_roles->getDisplayChildren()); if(tab_notices->getDisplayChildren()) @@ -473,6 +554,9 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) tab_notices->setVisible(false); tab_land->setVisible(false); tab_experiences->setVisible(false); + // TabContainer switch + } + // getChild("group_name")->setVisible(false); getChild("group_name_editor")->setVisible(true); @@ -486,6 +570,14 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) { if(!is_same_id) { + // TabContainer switch + if (mIsUsingTabContainer) + { + tabcont_ctrl->selectFirstTab(); + } + else + { + // if(!tab_general->getDisplayChildren()) tab_general->changeOpenClose(tab_general->getDisplayChildren()); if(tab_roles->getDisplayChildren()) @@ -496,15 +588,32 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) tab_land->changeOpenClose(tab_land->getDisplayChildren()); if(tab_experiences->getDisplayChildren()) tab_experiences->changeOpenClose(tab_land->getDisplayChildren()); + // TabContainer switch + } + // } LLGroupData agent_gdatap; bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlikeWithoutAdminMenuFakery(); + // TabContainer switch + if (mIsUsingTabContainer) + { + for (S32 i = 1; i <= 4; ++i) + { + tabcont_ctrl->setTabVisibility(tabcont_ctrl->getPanelByIndex(i), is_member); + } + } + else + { + // tab_roles->setVisible(is_member); tab_notices->setVisible(is_member); tab_land->setVisible(is_member); tab_experiences->setVisible(is_member); + // TabContainer switch + } + // getChild("group_name")->setVisible(true); getChild("group_name_editor")->setVisible(false); @@ -517,7 +626,13 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) button_chat->setVisible(is_member); } - tab_ctrl->arrange(); + // TabContainer switch + //tab_ctrl->arrange(); + if (!mIsUsingTabContainer) + { + tab_ctrl->arrange(); + } + // reposButtons(); update(GC_ALL);//show/hide "join" button if data is already ready diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index 33faa19417..ae157cfbad 100755 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -120,6 +120,9 @@ protected: LLButton* mButtonJoin; LLUICtrl* mJoinText; + + // TabContainer switch + bool mIsUsingTabContainer; }; class LLPanelGroupTab : public LLPanel diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 9316e6145a..f23283a092 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -650,7 +650,6 @@ BOOL LLPanelPeople::postBuild() // FIRE-4740: Friend counter in people panel mFriendsTabContainer = friends_tab->findChild("friends_accordion"); // Firestorm radar - friends_tab->childSetAction("GlobalOnlineStatusToggle", boost::bind(&LLPanelPeople::onGlobalVisToggleButtonClicked, this)); mOnlineFriendList = friends_tab->getChild("avatars_online"); mAllFriendList = friends_tab->getChild("avatars_all"); mSuggestedFriends = friends_tab->getChild("suggested_friends"); @@ -1747,47 +1746,6 @@ bool LLPanelPeople::isAccordionCollapsedByUser(const std::string& name) return isAccordionCollapsedByUser(getChild(name)); } -// Firestorm radar -void LLPanelPeople::onGlobalVisToggleButtonClicked() -// Iterate through friends lists, toggling status permission on or off -{ - bool vis = getChild("GlobalOnlineStatusToggle")->getValue().asBoolean(); - gSavedSettings.setBOOL("GlobalOnlineStatusToggle", vis); - - const LLAvatarTracker& av_tracker = LLAvatarTracker::instance(); - LLAvatarTracker::buddy_map_t all_buddies; - av_tracker.copyBuddyList(all_buddies); - LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); - for (; buddy_it != all_buddies.end(); ++buddy_it) - { - LLUUID buddy_id = buddy_it->first; - const LLRelationship* relation = LLAvatarTracker::instance().getBuddyInfo(buddy_id); - if (relation == NULL) - { - // Lets have a warning log message instead of having a crash. EXT-4947. - LL_WARNS() << "Trying to modify rights for non-friend avatar. Skipped." << LL_ENDL; - return; - } - - S32 cur_rights = relation->getRightsGrantedTo(); - S32 new_rights = 0; - if (vis) - new_rights = LLRelationship::GRANT_ONLINE_STATUS + (cur_rights & LLRelationship::GRANT_MAP_LOCATION) + (cur_rights & LLRelationship::GRANT_MODIFY_OBJECTS); - else - new_rights = (cur_rights & LLRelationship::GRANT_MAP_LOCATION) + (cur_rights & LLRelationship::GRANT_MODIFY_OBJECTS); - - LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(buddy_id,new_rights); - } - - mAllFriendList->showPermissions(true); - mOnlineFriendList->showPermissions(true); - - LLSD args; - args["MESSAGE"] = getString("high_server_load"); - LLNotificationsUtil::add("GenericAlert", args); -} -// Firestorm radar - // [FS:CR] Contact sets void LLPanelPeople::updateContactSets(LGGContactSets::EContactSetUpdate type) { diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 9e5088a351..dfec38fdcc 100755 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -147,10 +147,6 @@ private: bool isAccordionCollapsedByUser(LLUICtrl* acc_tab); bool isAccordionCollapsedByUser(const std::string& name); - // Firestorm callback handler - void onGlobalVisToggleButtonClicked(); - // Firestorm callback handler - LLTabContainer* mTabContainer; LLAvatarList* mOnlineFriendList; LLAvatarList* mAllFriendList; diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 58bc37e26a..80bb8be01f 100755 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -368,7 +368,7 @@ F32 LLScriptFloater::getCurrentTransparency() { if (mNoTransparency) { - return 1.0; + return 1.0f; } else { diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 3538686478..aae5a85769 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -224,6 +224,7 @@ #include "fsregistrarutils.h" #include "fsscriptlibrary.h" #include "fswsassetblacklist.h" +#include "lfsimfeaturehandler.h" #include "lggcontactsets.h" #include "llfloatersearch.h" #include "llfloatersidepanelcontainer.h" @@ -388,13 +389,13 @@ public: { if (status == HTTP_INTERNAL_ERROR) { - reportToNearbyChat(LLTrans::getString("SLGridStatusTimedOut")); + report_to_nearby_chat(LLTrans::getString("SLGridStatusTimedOut")); } else { LLStringUtil::format_map_t args; args["STATUS"] = llformat("%d", status); - reportToNearbyChat(LLTrans::getString("SLGridStatusOtherError", args)); + report_to_nearby_chat(LLTrans::getString("SLGridStatusOtherError", args)); } LL_WARNS("SLGridStatusResponder") << "Error - status " << status << LL_ENDL; return; @@ -403,7 +404,7 @@ public: S32 outputSize = buffer->countAfter(channels.in(), NULL); if (outputSize <= 0) { - reportToNearbyChat(LLTrans::getString("SLGridStatusInvalidMsg")); + report_to_nearby_chat(LLTrans::getString("SLGridStatusInvalidMsg")); LL_WARNS("SLGridStatusResponder") << "Error - empty output" << LL_ENDL; return; } @@ -477,17 +478,17 @@ public: LLStringUtil::trim(newsTitle); LLStringUtil::trim(newsDesc); LLStringUtil::trim(newsLink); - reportToNearbyChat("[ " + newsTitle + " ] " + newsDesc + " [ " + newsLink + " ]"); + report_to_nearby_chat("[ " + newsTitle + " ] " + newsDesc + " [ " + newsLink + " ]"); } else { - reportToNearbyChat(LLTrans::getString("SLGridStatusInvalidMsg")); + report_to_nearby_chat(LLTrans::getString("SLGridStatusInvalidMsg")); LL_WARNS("SLGridStatusResponder") << "Error - inner tag(s) missing" << LL_ENDL; } } else { - reportToNearbyChat(LLTrans::getString("SLGridStatusInvalidMsg")); + report_to_nearby_chat(LLTrans::getString("SLGridStatusInvalidMsg")); LL_WARNS("SLGridStatusResponder") << "Error - output without " << LL_ENDL; } } @@ -604,7 +605,7 @@ bool idle_startup() gSavedSettings.setString("FSInternalSkinCurrent", gSavedSettings.getString("FSSkinCurrentReadableName")); gSavedSettings.setString("FSInternalSkinCurrentTheme", gSavedSettings.getString("FSSkinCurrentThemeReadableName")); // - + if (LLFeatureManager::getInstance()->isSafe()) { LLNotificationsUtil::add("DisplaySetToSafe"); @@ -1787,7 +1788,7 @@ bool idle_startup() // Aurora Sim //LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim); -LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim, first_sim_size_x, first_sim_size_y); + LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim, first_sim_size_x, first_sim_size_y); // Aurora Sim display_startup(); @@ -1924,6 +1925,9 @@ LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim, first_sim_size_x, LLVoiceClient::getInstance()->updateSettings(); display_startup(); + // OpenSim support: Init with defaults - we get the OpenSimExtras later during login + LFSimFeatureHandler::instance(); + // create a container's instance for start a controlling conversation windows // by the voice's events // [FS communication UI] @@ -2898,7 +2902,7 @@ LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim, first_sim_size_x, // FIRE-6643 Display MOTD when login screens are disabled if (gSavedSettings.getBOOL("FSDisableLoginScreens")) { - reportToNearbyChat(gAgent.mMOTD); + report_to_nearby_chat(gAgent.mMOTD); } // // diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index ad03fa246b..a18b4974e8 100755 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -438,6 +438,186 @@ BOOL LLIMWellWindow::ObjectRowPanel::handleRightMouseDown(S32 x, S32 y, MASK mas return mChiclet->handleRightMouseDown(x, y, mask); } +// Optional legacy notification well +/************************************************************************/ +/* LLNotificationWellWindow implementation */ +/************************************************************************/ + +////////////////////////////////////////////////////////////////////////// +// PUBLIC METHODS +LLNotificationWellWindow::WellNotificationChannel::WellNotificationChannel(LLNotificationWellWindow* well_window) +: LLNotificationChannel(LLNotificationChannel::Params().name(well_window->getPathname())), + mWellWindow(well_window) +{ + connectToChannel("Notifications"); + connectToChannel("Group Notifications"); + connectToChannel("Offer"); +} + +LLNotificationWellWindow::LLNotificationWellWindow(const LLSD& key) +: LLSysWellWindow(key) +{ + mNotificationUpdates.reset(new WellNotificationChannel(this)); + mUpdateLocked = false; +} + +// static +LLNotificationWellWindow* LLNotificationWellWindow::getInstance(const LLSD& key /*= LLSD()*/) +{ + return LLFloaterReg::getTypedInstance("notification_well_window", key); +} + +// virtual +BOOL LLNotificationWellWindow::postBuild() +{ + BOOL rv = LLSysWellWindow::postBuild(); + setTitle(getString("title_notification_well_window")); + return rv; +} + +// virtual +void LLNotificationWellWindow::setVisible(BOOL visible) +{ + if (visible) + { + // when Notification channel is cleared, storable toasts will be added into the list. + clearScreenChannels(); + } + + LLSysWellWindow::setVisible(visible); +} + +//--------------------------------------------------------------------------------- +void LLNotificationWellWindow::addItem(LLSysWellItem::Params p) +{ + LLSD value = p.notification_id; + // do not add clones + if( mMessageList->getItemByValue(value)) + return; + + LLSysWellItem* new_item = new LLSysWellItem(p); + if (mMessageList->addItem(new_item, value, ADD_TOP, !mUpdateLocked)) + { + if( !mUpdateLocked ) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + reshapeWindow(); + } + new_item->setOnItemCloseCallback(boost::bind(&LLNotificationWellWindow::onItemClose, this, _1)); + new_item->setOnItemClickCallback(boost::bind(&LLNotificationWellWindow::onItemClick, this, _1)); + } + else + { + LL_WARNS() << "Unable to add Notification into the list, notification ID: " << p.notification_id + << ", title: " << p.title + << LL_ENDL; + + new_item->die(); + } +} + +void LLNotificationWellWindow::closeAll() +{ + // Need to clear notification channel, to add storable toasts into the list. + clearScreenChannels(); + std::vector items; + mMessageList->getItems(items); + + LLPersistentNotificationStorage::getInstance()->startBulkUpdate(); // + + for (std::vector::iterator + iter = items.begin(), + iter_end = items.end(); + iter != iter_end; ++iter) + { + LLSysWellItem* sys_well_item = dynamic_cast(*iter); + if (sys_well_item) + onItemClose(sys_well_item); + } + + // All done, renable normal mode and save. + LLPersistentNotificationStorage::getInstance()->endBulkUpdate(); + LLPersistentNotificationStorage::getInstance()->saveNotifications(); + // +} + +void LLNotificationWellWindow::unlockWindowUpdate() +{ + mUpdateLocked = false; + mSysWellChiclet->updateWidget(isWindowEmpty()); + + // Let the list rearrange itself. This is normally called during addItem if the window is not locked. + LLSD oNotify; + oNotify["rearrange"] = 1; + mMessageList->notify( oNotify ); + + reshapeWindow(); + +} + +////////////////////////////////////////////////////////////////////////// +// PRIVATE METHODS +void LLNotificationWellWindow::initChannel() +{ + LLSysWellWindow::initChannel(); + if(mChannel) + { + mChannel->addOnStoreToastCallback(boost::bind(&LLNotificationWellWindow::onStoreToast, this, _1, _2)); + } +} + +void LLNotificationWellWindow::clearScreenChannels() +{ + // 1 - remove StartUp toast and channel if present + if(!LLNotificationsUI::LLScreenChannel::getStartUpToastShown()) + { + LLNotificationsUI::LLChannelManager::getInstance()->onStartUpToastClose(); + } + + // 2 - remove toasts in Notification channel + if(mChannel) + { + mChannel->removeAndStoreAllStorableToasts(); + } +} + +void LLNotificationWellWindow::onStoreToast(LLPanel* info_panel, LLUUID id) +{ + LLSysWellItem::Params p; + p.notification_id = id; + p.title = static_cast(info_panel)->getTitle(); + addItem(p); +} + +void LLNotificationWellWindow::onItemClick(LLSysWellItem* item) +{ + LLUUID id = item->getID(); + LLFloaterReg::showInstance("inspect_toast", id); +} + +void LLNotificationWellWindow::onItemClose(LLSysWellItem* item) +{ + LLUUID id = item->getID(); + + if(mChannel) + { + // removeItemByID() is invoked from killToastByNotificationID() and item will removed; + mChannel->killToastByNotificationID(id); + } + else + { + // removeItemByID() should be called one time for each item to remove it from notification well + removeItemByID(id); + } + +} + +void LLNotificationWellWindow::onAdd( LLNotificationPtr notify ) +{ + removeItemByID(notify->getID()); +} +// + /************************************************************************/ /* LLIMWellWindow implementation */ /************************************************************************/ diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index ecfdc652c6..1f00b94e65 100755 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -102,6 +102,65 @@ protected: bool mIsReshapedByUser; }; +// Optional legacy notification well +/** + * Class intended to manage incoming notifications. + * + * It contains a list of notifications that have not been responded to. + */ +class LLNotificationWellWindow : public LLSysWellWindow +{ + bool mUpdateLocked; + +public: + LLNotificationWellWindow(const LLSD& key); + static LLNotificationWellWindow* getInstance(const LLSD& key = LLSD()); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void setVisible(BOOL visible); + /*virtual*/ void onAdd(LLNotificationPtr notify); + // Operating with items + void addItem(LLSysWellItem::Params p); + + // Closes all notifications and removes them from the Notification Well + void closeAll(); + + void lockWindowUpdate() + { mUpdateLocked = true; } + void unlockWindowUpdate(); + +protected: + struct WellNotificationChannel : public LLNotificationChannel + { + WellNotificationChannel(LLNotificationWellWindow*); + void onDelete(LLNotificationPtr notify) + { + mWellWindow->removeItemByID(notify->getID()); + } + + LLNotificationWellWindow* mWellWindow; + }; + + LLNotificationChannelPtr mNotificationUpdates; + /*virtual*/ const std::string& getAnchorViewName() { return NOTIFICATION_WELL_ANCHOR_NAME; } + +private: + // init Window's channel + void initChannel(); + void clearScreenChannels(); + + void onStoreToast(LLPanel* info_panel, LLUUID id); + + // Handlers + void onItemClick(LLSysWellItem* item); + void onItemClose(LLSysWellItem* item); + + // ID of a toast loaded by user (by clicking notification well item) + LLUUID mLoadedToastId; + +}; +// + /** * Class intended to manage incoming messages in IM chats. * diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index caf46340ae..637c07b973 100755 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -131,17 +131,23 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi BOOL hasInventory = payload["inventory_offer"].isDefined(); // attachment container (if any) - LLPanel* pAttachContainer = getChild("attachment_container"); + LLPanel* pAttachContainer = findChild("attachment_container"); // attachment container label (if any) - LLTextBox* pAttachContainerLabel = getChild("attachment_label"); + LLTextBox* pAttachContainerLabel = findChild("attachment_label"); //attachment text LLTextBox * pAttachLink = getChild("attachment"); //attachment icon LLIconCtrl* pAttachIcon = getChild("attachment_icon", TRUE); //If attachment is empty let it be invisible and not take place at the panel - pAttachContainer->setVisible(hasInventory); - pAttachContainerLabel->setVisible(hasInventory); + if (pAttachContainer) + { + pAttachContainer->setVisible(hasInventory); + } + if (pAttachContainerLabel) + { + pAttachContainerLabel->setVisible(hasInventory); + } pAttachLink->setVisible(hasInventory); pAttachIcon->setVisible(hasInventory); if (hasInventory) { @@ -260,7 +266,7 @@ F32 LLToastGroupNotifyPanel::getCurrentTransparency() { if (gSavedSettings.getBOOL("FSGroupNotifyNoTransparency")) { - return 1.0; + return 1.0f; } else { diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index e773ed8c41..52b885f3e1 100755 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -40,6 +40,8 @@ #include "llviewerchat.h" #include "llviewercontrol.h" +#include "fscommon.h" + const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6; //-------------------------------------------------------------------------- @@ -75,8 +77,11 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif } //Handle IRC styled /me messages. - std::string prefix = p.message.substr(0, 4); - if (prefix == "/me " || prefix == "/me'") + // Consolidate IRC /me prefix checks + //std::string prefix = p.message.substr(0, 4); + //if (prefix == "/me " || prefix == "/me'") + if (is_irc_me_prefix(p.message)) + // { //style_params.font.style = "UNDERLINE"; mMessage->clear(); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 074963cacc..ccc80a4a38 100755 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -81,6 +81,8 @@ // Firestorm inclues #include "fsfloatercontacts.h" +#include "fsfloaterim.h" +#include "fsfloaternearbychat.h" #include "fsfloaterposestand.h" #include "fsfloaterteleporthistory.h" #include "fslslbridge.h" @@ -810,6 +812,44 @@ void handleKeyboardLayoutChanged(const LLSD& newvalue) } // +// Global online status toggle +void handleGlobalOnlineStatusChanged(const LLSD& newvalue) +{ + bool visible = newvalue.asBoolean(); + + LLAvatarTracker::buddy_map_t all_buddies; + LLAvatarTracker::instance().copyBuddyList(all_buddies); + + LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); + for (; buddy_it != all_buddies.end(); ++buddy_it) + { + LLUUID buddy_id = buddy_it->first; + const LLRelationship* relation = LLAvatarTracker::instance().getBuddyInfo(buddy_id); + if (relation == NULL) + { + // Lets have a warning log message instead of having a crash. EXT-4947. + LL_WARNS() << "Trying to modify rights for non-friend avatar. Skipped." << LL_ENDL; + return; + } + + S32 cur_rights = relation->getRightsGrantedTo(); + S32 new_rights = 0; + if (visible) + { + new_rights = LLRelationship::GRANT_ONLINE_STATUS + (cur_rights & LLRelationship::GRANT_MAP_LOCATION) + (cur_rights & LLRelationship::GRANT_MODIFY_OBJECTS); + } + else + { + new_rights = (cur_rights & LLRelationship::GRANT_MAP_LOCATION) + (cur_rights & LLRelationship::GRANT_MODIFY_OBJECTS); + } + + LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(buddy_id, new_rights); + } + + LLNotificationsUtil::add("GlobalOnlineStatusToggle"); +} +// + //////////////////////////////////////////////////////////////////////////// void settings_setup_listeners() @@ -1004,7 +1044,17 @@ void settings_setup_listeners() gSavedSettings.getControl("FSUseAzertyKeyboardLayout")->getCommitSignal()->connect(boost::bind(&handleKeyboardLayoutChanged, _2)); + // [FS communication UI] + gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&FSFloaterIM::processChatHistoryStyleUpdate, _2)); + gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&FSFloaterNearbyChat::processChatHistoryStyleUpdate, _2)); + gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&FSFloaterIM::processChatHistoryStyleUpdate, _2)); + gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&FSFloaterNearbyChat::processChatHistoryStyleUpdate, _2)); + gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLViewerChat::signalChatFontChanged)); + // [FS communication UI] + gSavedSettings.getControl(RLV_SETTING_MAIN)->getSignal()->connect(boost::bind(&RlvSettings::onChangedSettingMain, _2)); + + gSavedPerAccountSettings.getControl("GlobalOnlineStatusToggle")->getSignal()->connect(boost::bind(&handleGlobalOnlineStatusChanged, _2)); } #if TEST_CACHED_CONTROL diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index cc758157de..ee8f3ea668 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -325,7 +325,17 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("notification_well_window", "floater_notifications_tabbed.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + // Optional legacy notification well + //LLFloaterReg::add("notification_well_window", "floater_notifications_tabbed.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + if (!gSavedSettings.getBOOL("FSInternalLegacyNotificationWell")) + { + LLFloaterReg::add("notification_well_window", "floater_notifications_tabbed.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + } + else + { + LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + } + // LLFloaterReg::add("object_weights", "floater_object_weights.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ed24522bc9..86e0487b55 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -148,6 +148,7 @@ #include "fsfloatercontacts.h" // Display group list in contacts floater #include "fspose.h" // FIRE-4345: Undeform #include "fswsassetblacklist.h" +#include "lfsimfeaturehandler.h" #include "llavatarpropertiesprocessor.h" // ## Zi: Texture Refresh #include "llsdserialize.h" #include "lltexturecache.h" // ## Zi: Texture Refresh @@ -830,16 +831,16 @@ class LLAdvancedToggleHUDInfo : public view_listener_t } else if ("badge" == info_type) { - reportToNearbyChat("Hippos!"); + report_to_nearby_chat("Hippos!"); } else if ("cookies" == info_type) { - reportToNearbyChat("Cookies!"); + report_to_nearby_chat("Cookies!"); } // else if ("motd" == info_type) { - reportToNearbyChat(gAgent.mMOTD); + report_to_nearby_chat(gAgent.mMOTD); } // return true; @@ -4448,11 +4449,11 @@ class FSSelfToggleMoveLock : public view_listener_t gSavedPerAccountSettings.setBOOL("UseMoveLock", new_value); if (new_value) { - reportToNearbyChat(LLTrans::getString("MovelockEnabling")); + report_to_nearby_chat(LLTrans::getString("MovelockEnabling")); } else { - reportToNearbyChat(LLTrans::getString("MovelockDisabling")); + report_to_nearby_chat(LLTrans::getString("MovelockDisabling")); } } #ifdef OPENSIM @@ -8748,7 +8749,7 @@ void handle_selected_texture_info(void*) //LLSD args; //args["MESSAGE"] = msg; //LLNotificationsUtil::add("SystemMessage", args); - reportToNearbyChat(msg); + report_to_nearby_chat(msg); // } } @@ -8877,7 +8878,28 @@ class LLCheckControl : public view_listener_t } }; -// Reset to default control +// Control enhancements +class LLTogglePerAccountControl : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + std::string control_name = userdata.asString(); + BOOL checked = gSavedPerAccountSettings.getBOOL( control_name ); + gSavedPerAccountSettings.setBOOL( control_name, !checked ); + return true; + } +}; + +class LLCheckPerAccountControl : public view_listener_t +{ + bool handleEvent( const LLSD& userdata) + { + std::string callback_data = userdata.asString(); + bool new_value = gSavedPerAccountSettings.getBOOL(callback_data); + return new_value; + } +}; + class FSResetControl : public view_listener_t { bool handleEvent( const LLSD& userdata) @@ -8896,7 +8918,7 @@ class FSResetPerAccountControl : public view_listener_t return true; } }; -// Reset to default control +// Control enhancements // not so generic @@ -8964,13 +8986,13 @@ class LLAdvancedToggleDoubleClickTeleport: public view_listener_t if (checked) { gSavedSettings.setBOOL("DoubleClickTeleport", FALSE); - reportToNearbyChat(LLTrans::getString("DoubleClickTeleportDisabled")); + report_to_nearby_chat(LLTrans::getString("DoubleClickTeleportDisabled")); } else { gSavedSettings.setBOOL("DoubleClickTeleport", TRUE); gSavedSettings.setBOOL("DoubleClickAutoPilot", FALSE); - reportToNearbyChat(LLTrans::getString("DoubleClickTeleportEnabled")); + report_to_nearby_chat(LLTrans::getString("DoubleClickTeleportEnabled")); } return true; } @@ -9365,7 +9387,7 @@ class FSDumpSimulatorFeaturesToChat : public view_listener_t std::stringstream out_str; region->getSimulatorFeatures(sim_features); LLSDSerialize::toPrettyXML(sim_features, out_str); - reportToNearbyChat(out_str.str()); + report_to_nearby_chat(out_str.str()); } return true; } @@ -9391,38 +9413,58 @@ class FSAddToContactSet : public view_listener_t // Add to contact set // Opensim menu item visibility control -class LLGridCheck : public view_listener_t +bool checkIsGrid(const LLSD& userdata) { - bool handleEvent(const LLSD& userdata) + std::string grid_type = userdata.asString(); + if ("secondlife" == grid_type) { - std::string grid_type = userdata.asString(); - if ("secondlife" == grid_type) - { - return LLGridManager::getInstance()->isInSecondLife(); - } + return LLGridManager::getInstance()->isInSecondLife(); + } #ifdef OPENSIM - else if ("opensim" == grid_type) - { - return LLGridManager::getInstance()->isInOpenSim(); - } - else if ("aurorasim" == grid_type) - { - return LLGridManager::getInstance()->isInAuroraSim(); - } + else if ("opensim" == grid_type) + { + return LLGridManager::getInstance()->isInOpenSim(); + } + else if ("aurorasim" == grid_type) + { + return LLGridManager::getInstance()->isInAuroraSim(); + } #else // !OPENSIM - else if ("opensim" == grid_type || "aurorasim" == grid_type) - { - LL_DEBUGS("ViewerMenu") << grid_type << "is not a supported platform on Havok builds. Disabling item." << LL_ENDL; - return false; - } + else if ("opensim" == grid_type || "aurorasim" == grid_type) + { + LL_DEBUGS("ViewerMenu") << grid_type << "is not a supported platform on Havok builds. Disabling item." << LL_ENDL; + return false; + } #endif // OPENSIM + else + { + LL_WARNS("ViewerMenu") << "Unhandled or bad on_visible gridcheck parameter! (" << grid_type << ")" << LL_ENDL; + } + return true; +} + +bool isGridFeatureEnabled(const LLSD& userdata) +{ + if (LFSimFeatureHandler::instanceExists()) + { + const std::string feature = userdata.asString(); + + if (feature == "avatar_picker") + { + return LFSimFeatureHandler::instance().hasAvatarPicker(); + } + else if (feature == "destination_guide") + { + return LFSimFeatureHandler::instance().hasDestinationGuide(); + } else { - LL_WARNS("ViewerMenu") << "Unhandled or bad on_visible gridcheck parameter! (" << grid_type << ")" << LL_ENDL; + LL_WARNS("ViewerMenu") << "Unhandled or bad grid feature check parameter! (" << feature << ")" << LL_ENDL; } - return true; } -}; + + return false; +} // class LLToolsSelectOnlyMyObjects : public view_listener_t @@ -10773,7 +10815,8 @@ void initialize_menus() // [FS communication UI] //enable.add("Conversation.IsConversationLoggingAllowed", boost::bind(&LLFloaterIMContainer::isConversationLoggingAllowed)); - view_listener_t::addEnable(new LLGridCheck(), "GridCheck"); // Opensim menu item visibility control + enable.add("GridCheck", boost::bind(&checkIsGrid, _2)); // Opensim menu item visibility control + enable.add("GridFeatureCheck", boost::bind(&isGridFeatureEnabled, _2)); // Agent commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying)); @@ -11262,10 +11305,12 @@ void initialize_menus() view_listener_t::addMenu(new LLGoToObject(), "GoToObject"); commit.add("PayObject", boost::bind(&handle_give_money_dialog)); - // Reset to default control + // Control enhancements + view_listener_t::addMenu(new LLTogglePerAccountControl(), "TogglePerAccountControl"); + view_listener_t::addMenu(new LLCheckPerAccountControl(), "CheckPerAccountControl"); view_listener_t::addMenu(new FSResetControl(), "ResetControl"); view_listener_t::addMenu(new FSResetPerAccountControl(), "ResetPerAccountControl"); - // Reset to default control + // Control enhancements commit.add("Inventory.NewWindow", boost::bind(&LLFloaterInventory::showAgentInventory)); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index edeb03bc9d..cea46d7260 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -140,6 +140,7 @@ #include "fswsassetblacklist.h" #include "llfloaterbump.h" #include "llfloaterreg.h" +#include "llfriendcard.h" #include "llgiveinventory.h" #include "lltexturefetch.h" #include "rlvactions.h" @@ -1129,6 +1130,17 @@ protected: LL_DEBUGS("Inventory_Move") << "Found asset UUID: " << asset_uuid << LL_ENDL; was_moved = true; } + // We might end up here if LLFriendCardsManager tries to sync the friend cards at login + // and that might pop up the inventory window for extra annoyance -> silence this! + else if (added_item->getActualType() == LLAssetType::AT_CALLINGCARD) + { + if (LLFriendCardsManager::instance().isAvatarDataStored(added_item->getCreatorUUID())) + { + LL_DEBUGS("FriendCard") << "Skipping added calling card from friend cards sync: " << added_item->getCreatorUUID().asString() << LL_ENDL; + was_moved = true; + } + } + // } } @@ -3611,8 +3623,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) args["slurl"] = location; // Look for IRC-style emotes here so object name formatting is correct - std::string prefix = message.substr(0, 4); - if (prefix == "/me " || prefix == "/me'") + // Consolidate IRC /me prefix checks + //std::string prefix = message.substr(0, 4); + //if (prefix == "/me " || prefix == "/me'") + if (is_irc_me_prefix(message)) + // { chat.mChatStyle = CHAT_STYLE_IRC; } @@ -4623,8 +4638,11 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) BOOL ircstyle = FALSE; // Look for IRC-style emotes here so chatbubbles work - std::string prefix = mesg.substr(0, 4); - if (prefix == "/me " || prefix == "/me'") + // Consolidate IRC /me prefix checks + //std::string prefix = mesg.substr(0, 4); + //if (prefix == "/me " || prefix == "/me'") + if (is_irc_me_prefix(mesg)) + // { ircstyle = TRUE; } @@ -6293,11 +6311,11 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data) if (change_count > 0) { - reportToNearbyChat(formatString(increase_message, args)); + report_to_nearby_chat(format_string(increase_message, args)); } else if (change_count < 0) { - reportToNearbyChat(formatString(decrease_message, args)); + report_to_nearby_chat(format_string(decrease_message, args)); } } } @@ -7568,7 +7586,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) // make_ui_sound("UISndRestart"); - reportToNearbyChat(LLTrans::getString("FSRegionRestartInLocalChat")); // FIRE-6307: Region restart notices in local chat + report_to_nearby_chat(LLTrans::getString("FSRegionRestartInLocalChat")); // FIRE-6307: Region restart notices in local chat } // FIRE-9858: Kill annoying "Autopilot canceled" toast @@ -7793,7 +7811,7 @@ void process_alert_core(const std::string& message, BOOL modal) } make_ui_sound("UISndRestartOpenSim"); - reportToNearbyChat(LLTrans::getString("FSRegionRestartInLocalChat")); // FIRE-6307: Region restart notices in local chat + report_to_nearby_chat(LLTrans::getString("FSRegionRestartInLocalChat")); // FIRE-6307: Region restart notices in local chat return; } // @@ -7958,7 +7976,7 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use action = LLTrans::getString("Collision_UnknownType", args); return; } - reportToNearbyChat(action); + report_to_nearby_chat(action); } // Nearby Chat Collision Messages // Report Collision Messages to scripts diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 3181c26b4f..3111f54b61 100755 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -49,7 +49,7 @@ #include "lltrans.h" #include "llvieweraudio.h" -#include "fscommon.h" // For media filter reportToNearbyChat +#include "fscommon.h" // For media filter report_to_nearby_chat // Static Variables @@ -926,7 +926,7 @@ void LLViewerParcelMedia::filterMediaUrl(LLParcel* parcel) { LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - reportToNearbyChat(LLTrans::getString("MediaFilterMediaContentBlocked", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentBlocked", format_args)); sMediaLastActionPlay = false; } else @@ -1007,7 +1007,7 @@ void callback_media_alert2(const LLSD ¬ification, const LLSD &response, LLPar LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - reportToNearbyChat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysAllowed", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysAllowed", format_args)); LLViewerParcelMedia::sCurrentMedia = *parcel; if (parcel->getName() == currentparcel->getName()) { @@ -1024,7 +1024,7 @@ void callback_media_alert2(const LLSD ¬ification, const LLSD &response, LLPar LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - reportToNearbyChat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysBlocked", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysBlocked", format_args)); } else if ((option == 2) && allow) // Whitelist URL { @@ -1035,7 +1035,7 @@ void callback_media_alert2(const LLSD ¬ification, const LLSD &response, LLPar LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[MEDIAURL]"] = media_url; - reportToNearbyChat(LLTrans::getString("MediaFilterMediaContentUrlAlwaysAllowed", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentUrlAlwaysAllowed", format_args)); LLViewerParcelMedia::sCurrentMedia = *parcel; if (parcel->getName() == currentparcel->getName()) { @@ -1052,7 +1052,7 @@ void callback_media_alert2(const LLSD ¬ification, const LLSD &response, LLPar LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[MEDIAURL]"] = media_url; - reportToNearbyChat(LLTrans::getString("MediaFilterMediaContentUrlAlwaysBlocked", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentUrlAlwaysBlocked", format_args)); } // We've dealt with the alert, so mark it as inactive. @@ -1132,7 +1132,7 @@ void callback_media_alert_single(const LLSD ¬ification, const LLSD &response, LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - reportToNearbyChat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysBlocked", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysBlocked", format_args)); } else if (option == 3) // Whitelist domain { @@ -1143,7 +1143,7 @@ void callback_media_alert_single(const LLSD ¬ification, const LLSD &response, LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - reportToNearbyChat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysAllowed", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterMediaContentDomainAlwaysAllowed", format_args)); LLViewerParcelMedia::sCurrentMedia = *parcel; if (parcel->getName() == currentparcel->getName()) { @@ -1347,7 +1347,7 @@ void LLViewerParcelMedia::filterAudioUrl(std::string media_url) { LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - reportToNearbyChat(LLTrans::getString("MediaFilterAudioContentBlocked", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentBlocked", format_args)); LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade(); sAudioLastActionPlay = false; } @@ -1430,7 +1430,7 @@ void callback_audio_alert2(const LLSD ¬ification, const LLSD &response, std:: LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - reportToNearbyChat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysAllowed", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysAllowed", format_args)); if (gAudiop != NULL) { LLViewerParcelMedia::sCurrentMusic = media_url; @@ -1447,7 +1447,7 @@ void callback_audio_alert2(const LLSD ¬ification, const LLSD &response, std:: LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - reportToNearbyChat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysBlocked", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysBlocked", format_args)); if (gAudiop != NULL) { LLViewerParcelMedia::sCurrentMusic = ""; @@ -1464,7 +1464,7 @@ void callback_audio_alert2(const LLSD ¬ification, const LLSD &response, std:: LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[MEDIAURL]"] = media_url; - reportToNearbyChat(LLTrans::getString("MediaFilterAudioContentUrlAlwaysAllowed", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentUrlAlwaysAllowed", format_args)); if (gAudiop != NULL) { LLViewerParcelMedia::sCurrentMusic = media_url; @@ -1481,7 +1481,7 @@ void callback_audio_alert2(const LLSD ¬ification, const LLSD &response, std:: LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[MEDIAURL]"] = media_url; - reportToNearbyChat(LLTrans::getString("MediaFilterAudioContentUrlAlwaysBlocked", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentUrlAlwaysBlocked", format_args)); if (gAudiop != NULL) { LLViewerParcelMedia::sCurrentMusic = ""; @@ -1567,7 +1567,7 @@ void callback_audio_alert_single(const LLSD ¬ification, const LLSD &response, LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - reportToNearbyChat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysAllowed", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysAllowed", format_args)); if (gAudiop != NULL) { LLViewerParcelMedia::sCurrentMusic = media_url; @@ -1584,7 +1584,7 @@ void callback_audio_alert_single(const LLSD ¬ification, const LLSD &response, LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - reportToNearbyChat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysBlocked", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterAudioContentDomainAlwaysBlocked", format_args)); if (gAudiop != NULL) { LLViewerParcelMedia::sCurrentMusic = ""; @@ -1775,7 +1775,7 @@ void LLViewerParcelMedia::filterMOAPUrl(LLMediaDataClientObject *object, LLObjec { LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - reportToNearbyChat(LLTrans::getString("MediaFilterSharedMediaContentBlocked", domain)); + report_to_nearby_chat(LLTrans::getString("MediaFilterSharedMediaContentBlocked", domain)); sAudioLastActionPlay = false; } else @@ -1849,7 +1849,7 @@ void callback_MOAP_alert2(const LLSD ¬ification, const LLSD &response, LLMedi LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - reportToNearbyChat(LLTrans::getString("MediaFilterSharedMediaContentDomainAlwaysAllowed", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterSharedMediaContentDomainAlwaysAllowed", format_args)); nav_object->doNavigate(object, texture_index, media_url); LLViewerParcelMedia::sCurrentMOAP = media_url; LLViewerParcelMedia::sMOAPLastActionPlay = true; @@ -1863,7 +1863,7 @@ void callback_MOAP_alert2(const LLSD ¬ification, const LLSD &response, LLMedi LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[DOMAIN]"] = domain; - reportToNearbyChat(LLTrans::getString("MediaFilterSharedMediaContentDomainAlwaysBlocked", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterSharedMediaContentDomainAlwaysBlocked", format_args)); LLViewerParcelMedia::sCurrentMOAP = ""; LLViewerParcelMedia::sMOAPLastActionPlay = false; } @@ -1876,7 +1876,7 @@ void callback_MOAP_alert2(const LLSD ¬ification, const LLSD &response, LLMedi LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[MEDIAURL]"] = media_url; - reportToNearbyChat(LLTrans::getString("MediaFilterSharedMediaContentUrlAlwaysAllowed", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterSharedMediaContentUrlAlwaysAllowed", format_args)); nav_object->doNavigate(object, texture_index, media_url); LLViewerParcelMedia::sCurrentMOAP = media_url; LLViewerParcelMedia::sMOAPLastActionPlay = true; @@ -1890,7 +1890,7 @@ void callback_MOAP_alert2(const LLSD ¬ification, const LLSD &response, LLMedi LLViewerParcelMedia::saveDomainFilterList(); LLStringUtil::format_map_t format_args; format_args["[MEDIAURL]"] = media_url; - reportToNearbyChat(LLTrans::getString("MediaFilterSharedMediaContentUrlAlwaysBlocked", format_args)); + report_to_nearby_chat(LLTrans::getString("MediaFilterSharedMediaContentUrlAlwaysBlocked", format_args)); LLViewerParcelMedia::sCurrentMOAP = ""; LLViewerParcelMedia::sMOAPLastActionPlay = false; } diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 56b9473a77..4390c95107 100755 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -68,6 +68,7 @@ #include "llweb.h" #include "llvieweraudio.h" #include "kcwlinterface.h" +#include "llviewernetwork.h" const F32 PARCEL_COLLISION_DRAW_SECS = 1.f; @@ -1661,9 +1662,6 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use instance->mTeleportFinishedSignal(instance->mTeleportInProgressPosition, false); } } - - //KC: check for parcel changes for WL settings - KCWindlightInterface::instance().ParcelChange(); } else if (local_id == parcel_mgr.mAgentParcel->getLocalID()) { @@ -1744,7 +1742,21 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use } // Request access list information for this land + // FIRE-17280: Requesting Experience access allow & block list breaks OpenSim + //parcel_mgr.sendParcelAccessListRequest(AL_ACCESS | AL_BAN | AL_ALLOW_EXPERIENCE | AL_BLOCK_EXPERIENCE); +#if OPENSIM + if (LLGridManager::instance().isInSecondLife()) + { + parcel_mgr.sendParcelAccessListRequest(AL_ACCESS | AL_BAN | AL_ALLOW_EXPERIENCE | AL_BLOCK_EXPERIENCE); + } + else + { + parcel_mgr.sendParcelAccessListRequest(AL_ACCESS | AL_BAN); + } +#else parcel_mgr.sendParcelAccessListRequest(AL_ACCESS | AL_BAN | AL_ALLOW_EXPERIENCE | AL_BLOCK_EXPERIENCE); +#endif + // #include "llviewermenu.h" +#include "lfsimfeaturehandler.h" #ifdef LL_WINDOWS #pragma warning(disable:4355) @@ -1977,7 +1978,7 @@ const LLViewerRegion::tex_matrix_t& LLViewerRegion::getWorldMapTiles() const for (U32 x = 0; x != totalX; ++x) for (U32 y = 0; y != totalY; ++y) { - const std::string map_url = gSavedSettings.getString("CurrentMapServerURL") + llformat("map-1-%d-%d-objects.jpg", gridX + x, gridY + y); + const std::string map_url = LFSimFeatureHandler::instance().mapServerURL() + llformat("map-1-%d-%d-objects.jpg", gridX + x, gridY + y); LLPointer tex(LLViewerTextureManager::getFetchedTextureFromUrl(map_url, FTT_MAP_TILE, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); mWorldMapTiles.push_back(tex); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 016147cf98..b2206db80b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4775,7 +4775,7 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke { LLStringUtil::format_map_t args; args["FILENAME"] = filepath; - reportToNearbyChat(LLTrans::getString("SnapshotSavedToDisk", args)); + report_to_nearby_chat(LLTrans::getString("SnapshotSavedToDisk", args)); } // return image->save(filepath); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c39d7e5980..88e7e07949 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6330,19 +6330,13 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi if (!attachment) { - if(attachmentID != 127 && !((attachmentID > 40) && (attachmentID <= 68))) + if(attachmentID != 127) { LL_WARNS() << "Object attachment point invalid: " << attachmentID << " trying to use 1 (chest)" << LL_ENDL; } -// attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) -// [SL:KB] - Patch: Appearance-LegacyMultiAttachment | Checked: 2010-08-28 (Catznip-2.6.0a) | Added: Catznip-2.1.2a - S32 idxAttachPt = 1; - if ( (!isSelf()) && (gSavedSettings.getBOOL("LegacyMultiAttachmentSupport")) && (attachmentID > 40) && (attachmentID <= 68) ) - idxAttachPt = attachmentID - 38; - attachment = get_if_there(mAttachmentPoints, idxAttachPt, (LLViewerJointAttachment*)NULL); -// [/SL:KB] + attachment = get_if_there(mAttachmentPoints, 1, (LLViewerJointAttachment*)NULL); // Arbitrary using 1 (chest) if (attachment) { LL_WARNS() << "Object attachment point invalid: " << attachmentID diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp index 6d3ec0c947..f835abcf4a 100755 --- a/indra/newview/llworldmipmap.cpp +++ b/indra/newview/llworldmipmap.cpp @@ -189,19 +189,10 @@ LLPointer LLWorldMipmap::getObjectsTile(U32 grid_x, U32 LLPointer LLWorldMipmap::loadObjectsTile(U32 grid_x, U32 grid_y, S32 level) { // Get the grid coordinates -// HG Maps -#ifdef OPENSIM - std::string hg_map; - if (LLGridManager::getInstance()->isInOpenSim()) - { - hg_map = LFSimFeatureHandler::instance().mapServerURL(); - } - std::string imageurl = hg_map.empty() ? gSavedSettings.getString("CurrentMapServerURL") : hg_map; - imageurl.append(llformat("map-%d-%d-%d-objects.jpg", level, grid_x, grid_y)); -#else // !OPENSIM - std::string imageurl = gSavedSettings.getString("CurrentMapServerURL") + llformat("map-%d-%d-%d-objects.jpg", level, grid_x, grid_y); -#endif // OPENSIM -// + // HG Maps + //std::string imageurl = gSavedSettings.getString("CurrentMapServerURL") + llformat("map-%d-%d-%d-objects.jpg", level, grid_x, grid_y); + std::string imageurl = LFSimFeatureHandler::instance().mapServerURL() + llformat("map-%d-%d-%d-objects.jpg", level, grid_x, grid_y); + // // DO NOT COMMIT!! DEBUG ONLY!!! // Use a local jpeg for every tile to test map speed without S3 access diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index ab970ccd04..b37b57687c 100755 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -298,18 +298,6 @@ CURLcode LLXMLRPCTransaction::Impl::_sslCtxFunction(CURL * curl, void *sslctx, v SSL_CTX_set_cert_verify_callback(ctx, _sslCertVerifyCallback, param); // the calls are void - - // FIRE-11406 - // Some server at LL don't like it at all when curl/openssl try to speak TLSv1.2 to them, instead - // of renegotiating to SSLv3 they clamp up and don't talk to us at all anywmore, not even dropping the connection. - // This then leads to unfun timeouts and failed transactions. - -#ifdef SSL_TXT_TLSV1_2 - SSL_CTX_set_options( ctx, SSL_OP_ALL | SSL_OP_NO_TLSv1_2 ); -#endif - - // - return CURLE_OK; } diff --git a/indra/newview/qtoolalign.cpp b/indra/newview/qtoolalign.cpp index e7805858aa..4c292eeed2 100644 --- a/indra/newview/qtoolalign.cpp +++ b/indra/newview/qtoolalign.cpp @@ -429,11 +429,11 @@ void QToolAlign::align() { if(AlignThread::sInstance) { - reportToNearbyChat(LLTrans::getString("qtool_still_busy")); + report_to_nearby_chat(LLTrans::getString("qtool_still_busy")); } else { - reportToNearbyChat(LLTrans::getString("qtool_busy")); + report_to_nearby_chat(LLTrans::getString("qtool_busy")); AlignThread::sInstance = new AlignThread(); AlignThread::sInstance->start(); } @@ -458,7 +458,7 @@ public: delete AlignThread::sInstance; AlignThread::sInstance = NULL; LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION); - reportToNearbyChat(LLTrans::getString("qtool_done")); + report_to_nearby_chat(LLTrans::getString("qtool_done")); return TRUE; } }; diff --git a/indra/newview/skins/ansastorm/xui/en/panel_toolbar_view.xml b/indra/newview/skins/ansastorm/xui/en/panel_toolbar_view.xml index a87f701276..9988ad251a 100644 --- a/indra/newview/skins/ansastorm/xui/en/panel_toolbar_view.xml +++ b/indra/newview/skins/ansastorm/xui/en/panel_toolbar_view.xml @@ -224,15 +224,16 @@ parameter="fs_nearby_chat" /> - + Falscher Root-Joint-Name, "hip" verwenden. + + [F] frm. [S] s. [FPS] FPS + Name: @@ -117,8 +120,13 @@ Maximal erlaubt sind [MAX_LENGTH] Sekunden. + + 300 frm. 30 s. 10 FPS + + + Handhaltung @@ -177,9 +185,7 @@ Maximal erlaubt sind [MAX_LENGTH] Sekunden. + - + - - + diff --git a/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml b/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml index 150225af27..abc9ae1306 100644 --- a/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml +++ b/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml @@ -6,13 +6,4 @@ keep_one_selected="false" multi_select="false" opaque="true"> - \ No newline at end of file diff --git a/indra/newview/skins/default/xui/es/panel_people.xml b/indra/newview/skins/default/xui/es/panel_people.xml index 2b17db7839..e9aba2306b 100755 --- a/indra/newview/skins/default/xui/es/panel_people.xml +++ b/indra/newview/skins/default/xui/es/panel_people.xml @@ -1,7 +1,6 @@ - diff --git a/indra/newview/skins/default/xui/ja/panel_people.xml b/indra/newview/skins/default/xui/ja/panel_people.xml index 2f6a8a718f..1bdcc9cc81 100644 --- a/indra/newview/skins/default/xui/ja/panel_people.xml +++ b/indra/newview/skins/default/xui/ja/panel_people.xml @@ -1,7 +1,6 @@ - diff --git a/indra/newview/skins/default/xui/ja/panel_toolbar_view.xml b/indra/newview/skins/default/xui/ja/panel_toolbar_view.xml index b9c8ea072f..dcf59a04a1 100644 --- a/indra/newview/skins/default/xui/ja/panel_toolbar_view.xml +++ b/indra/newview/skins/default/xui/ja/panel_toolbar_view.xml @@ -46,7 +46,6 @@ - + [DESC] [NUM] diff --git a/indra/newview/skins/starlight/xui/en/panel_group_notify.xml b/indra/newview/skins/starlight/xui/en/panel_group_notify.xml index a89c6fa488..bf25f77b40 100644 --- a/indra/newview/skins/starlight/xui/en/panel_group_notify.xml +++ b/indra/newview/skins/starlight/xui/en/panel_group_notify.xml @@ -100,4 +100,13 @@ right="-10" name="btn_ok" width="70" /> + - + + + + + + + - + + + + + + + - + + + + diff --git a/indra/newview/skins/vintage/xui/en/floater_im_container.xml b/indra/newview/skins/vintage/xui/en/floater_im_container.xml deleted file mode 100644 index 9fc3c59ae1..0000000000 --- a/indra/newview/skins/vintage/xui/en/floater_im_container.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - diff --git a/indra/newview/skins/vintage/xui/en/panel_people.xml b/indra/newview/skins/vintage/xui/en/panel_people.xml index b3a699ff55..4ea0a2e85f 100644 --- a/indra/newview/skins/vintage/xui/en/panel_people.xml +++ b/indra/newview/skins/vintage/xui/en/panel_people.xml @@ -14,9 +14,6 @@ - diff --git a/indra/newview/skins/vintage/xui/en/panel_toolbar_view.xml b/indra/newview/skins/vintage/xui/en/panel_toolbar_view.xml index 424209b684..4da49e2a05 100644 --- a/indra/newview/skins/vintage/xui/en/panel_toolbar_view.xml +++ b/indra/newview/skins/vintage/xui/en/panel_toolbar_view.xml @@ -223,6 +223,7 @@ - diff --git a/indra/newview/skins/vintage/xui/ja/panel_people.xml b/indra/newview/skins/vintage/xui/ja/panel_people.xml index 0577d93678..0bcd79512f 100644 --- a/indra/newview/skins/vintage/xui/ja/panel_people.xml +++ b/indra/newview/skins/vintage/xui/ja/panel_people.xml @@ -4,7 +4,6 @@ - diff --git a/indra/newview/skins/vintage/xui/pl/panel_people.xml b/indra/newview/skins/vintage/xui/pl/panel_people.xml index 9eff4d646c..368c9a1004 100644 --- a/indra/newview/skins/vintage/xui/pl/panel_people.xml +++ b/indra/newview/skins/vintage/xui/pl/panel_people.xml @@ -1,6 +1,5 @@ - diff --git a/indra/newview/skins/vintage/xui/ru/panel_people.xml b/indra/newview/skins/vintage/xui/ru/panel_people.xml index 0f932662e5..71a4a4b5b7 100644 --- a/indra/newview/skins/vintage/xui/ru/panel_people.xml +++ b/indra/newview/skins/vintage/xui/ru/panel_people.xml @@ -1,6 +1,5 @@ - diff --git a/indra/newview/streamtitledisplay.cpp b/indra/newview/streamtitledisplay.cpp index 90995219a4..7c9210e904 100644 --- a/indra/newview/streamtitledisplay.cpp +++ b/indra/newview/streamtitledisplay.cpp @@ -87,7 +87,7 @@ void StreamTitleDisplay::checkMetadata() if (ShowStreamMetadata > 1) { chat = LLTrans::getString("StreamtitleNowPlaying") + " " + chat; - reportToNearbyChat(chat); + report_to_nearby_chat(chat); } else if (ShowStreamMetadata == 1 && (mMetadata.has("TITLE") || mMetadata.has("ARTIST")))