From 18e3fd3e0a765309039571d9dc12a68590cfbf75 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Sat, 26 Dec 2009 12:56:38 +0200 Subject: fixed low bug EXT-3625 Unable to submit Friendship offer message by Enter key --HG-- branch : product-engine --- indra/newview/lltoastalertpanel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index c48301fa1e..8f296b3794 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -385,6 +385,12 @@ BOOL LLToastAlertPanel::handleKeyHere(KEY key, MASK mask ) { if( KEY_RETURN == key && mask == MASK_NONE ) { + LLButton* defaultBtn = getDefaultButton(); + if(defaultBtn && defaultBtn->getVisible() && defaultBtn->getEnabled()) + { + // If we have a default button, click it when return is pressed + defaultBtn->onCommit(); + } return TRUE; } else if (KEY_RIGHT == key) -- cgit v1.2.3 From 4c4c78872898bc7a8fdbc5f403b667a0c7896719 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Sat, 26 Dec 2009 13:25:22 +0200 Subject: Fixed normal bug EXT-3643 (Make Friend Offer dialog a modal alert) -- made dialog a modal alert -- logging to IM is left as it was --HG-- branch : product-engine --- indra/newview/llnotificationalerthandler.cpp | 13 +++++++++++++ indra/newview/llnotificationhandler.h | 16 ++++++++++++++++ indra/newview/llnotificationhandlerutil.cpp | 22 ++++++++++++++++------ indra/newview/llnotificationofferhandler.cpp | 4 +--- .../newview/skins/default/xui/en/notifications.xml | 2 +- 5 files changed, 47 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp index c3df4cbaf4..52de8355e9 100644 --- a/indra/newview/llnotificationalerthandler.cpp +++ b/indra/newview/llnotificationalerthandler.cpp @@ -93,6 +93,19 @@ bool LLAlertHandler::processNotification(const LLSD& notify) if (notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "load") { + if (LLHandlerUtil::canSpawnSessionAndLogToIM(notification)) + { + const std::string name = LLHandlerUtil::getSubstitutionName(notification); + + LLUUID from_id = notification->getPayload()["from_id"]; + + // firstly create session... + LLHandlerUtil::spawnIMSession(name, from_id); + + // ...then log message to have IM Well notified about new message + LLHandlerUtil::logToIMP2P(notification); + } + LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal); LLToast::Params p; p.notif_id = notification->getID(); diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 33ef4c81cd..0fb438bfe9 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -276,6 +276,13 @@ public: */ static bool canSpawnIMSession(const LLNotificationPtr& notification); + /** + * Checks if passed notification can create IM session and be written into it. + * + * This method uses canLogToIM() & canSpawnIMSession(). + */ + static bool canSpawnSessionAndLogToIM(const LLNotificationPtr& notification); + /** * Writes notification message to IM session. */ @@ -303,6 +310,15 @@ public: * Spawns IM session. */ static void spawnIMSession(const std::string& name, const LLUUID& from_id); + + /** + * Returns name from the notification's substitution. + * + * Methods gets "NAME" or "[NAME]" from the substitution map. + * + * @param notification - Notification which substitution's name will be returned. + */ + static std::string getSubstitutionName(const LLNotificationPtr& notification); }; } diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 34807485a6..fba5773602 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -63,6 +63,7 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) return GRANTED_MODIFY_RIGHTS == notification->getName() || REVOKED_MODIFY_RIGHTS == notification->getName() || PAYMENT_RECIVED == notification->getName() + || OFFER_FRIENDSHIP == notification->getName() || FRIENDSHIP_OFFERED == notification->getName() || SERVER_OBJECT_MESSAGE == notification->getName() || INVENTORY_ACCEPTED == notification->getName() @@ -82,14 +83,19 @@ bool LLHandlerUtil::canLogToNearbyChat(const LLNotificationPtr& notification) // static bool LLHandlerUtil::canSpawnIMSession(const LLNotificationPtr& notification) { - return ADD_FRIEND_WITH_MESSAGE == notification->getName() - || OFFER_FRIENDSHIP == notification->getName() + return OFFER_FRIENDSHIP == notification->getName() || FRIENDSHIP_ACCEPTED == notification->getName() || USER_GIVE_ITEM == notification->getName() || INVENTORY_ACCEPTED == notification->getName() || INVENTORY_DECLINED == notification->getName(); } +// static +bool LLHandlerUtil::canSpawnSessionAndLogToIM(const LLNotificationPtr& notification) +{ + return canLogToIM(notification) && canSpawnIMSession(notification); +} + // static void LLHandlerUtil::logToIM(const EInstantMessage& session_type, const std::string& session_name, const std::string& from_name, @@ -124,10 +130,7 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type, // static void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification) { - const std::string - name = - notification->getSubstitutions().has("NAME") ? notification->getSubstitutions()["NAME"] - : notification->getSubstitutions()["[NAME]"]; + const std::string name = LLHandlerUtil::getSubstitutionName(notification); const std::string session_name = notification->getPayload().has( "SESSION_NAME") ? notification->getPayload()["SESSION_NAME"].asString() : name; @@ -193,3 +196,10 @@ void LLHandlerUtil::spawnIMSession(const std::string& name, const LLUUID& from_i } } +// static +std::string LLHandlerUtil::getSubstitutionName(const LLNotificationPtr& notification) +{ + return notification->getSubstitutions().has("NAME") + ? notification->getSubstitutions()["NAME"] + : notification->getSubstitutions()["[NAME]"]; +} diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 5861a802e9..dd66a6c507 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -105,9 +105,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify) { if (LLHandlerUtil::canSpawnIMSession(notification)) { - const std::string name = notification->getSubstitutions().has( - "NAME") ? notification->getSubstitutions()["NAME"] - : notification->getSubstitutions()["[NAME]"]; + const std::string name = LLHandlerUtil::getSubstitutionName(notification); LLUUID from_id = notification->getPayload()["from_id"]; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index e4ec98c35c..af02a182db 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5106,7 +5106,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you [O + type="alertmodal"> [NAME] is offering friendship. [MESSAGE] -- cgit v1.2.3 From f39ef6ee2c165ec08ff7592e6d57edfdc429bac3 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Sat, 26 Dec 2009 13:27:45 +0200 Subject: =?UTF-8?q?fixed=20EXT-3702=20=E2=80=9C"group=20invitation=20accep?= =?UTF-8?q?ted"=20toast=20should=20be=20non-interactive=E2=80=9D,=20made?= =?UTF-8?q?=20system=20IM=20notifications(IM=5FMESSAGEBOX)=20as=20notifyti?= =?UTF-8?q?p;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 72e3c27bc9..d0eddc24b2 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1849,7 +1849,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // This is a block, modeless dialog. //*TODO: Translate args["MESSAGE"] = message; - LLNotificationsUtil::add("SystemMessage", args); + LLNotificationsUtil::add("SystemMessageTip", args); } break; case IM_GROUP_NOTICE: -- cgit v1.2.3 From 4f9563b8292188836476ec750e0292e8efa34627 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Sat, 26 Dec 2009 14:24:22 +0200 Subject: Fixed low bug EXT-3543 ("Mute this participant" menu should be disabled for non-connected participants) -- improved condition to validate whether speaker is in voice channel --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 3 ++- indra/newview/llspeakers.cpp | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 479c29f656..e1491b0889 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -589,7 +589,8 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& if (speakerp.notNull()) { // not in voice participants can not be moderated - return speakerp->mStatus != LLSpeaker::STATUS_TEXT_ONLY; + return speakerp->mStatus == LLSpeaker::STATUS_VOICE_ACTIVE + || speakerp->mStatus == LLSpeaker::STATUS_MUTED; } } return false; diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 91b417c61f..010dfd1b33 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -615,6 +615,9 @@ private: void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id) { + LLPointer speakerp = findSpeaker(speaker_id); + if (!speakerp) return; + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); LLSD data; data["method"] = "mute update"; @@ -623,7 +626,7 @@ void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id) data["params"]["agent_id"] = speaker_id; data["params"]["mute_info"] = LLSD::emptyMap(); //current value represents ability to type, so invert - data["params"]["mute_info"]["text"] = !findSpeaker(speaker_id)->mModeratorMutedText; + data["params"]["mute_info"]["text"] = !speakerp->mModeratorMutedText; LLHTTPClient::post(url, data, new ModerationResponder(getSessionID())); } -- cgit v1.2.3 From cd9c3afb11f1bd305836fbd4d1c553ba893c1f12 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Sat, 26 Dec 2009 14:32:29 +0200 Subject: Fixed low bug EXT-3526(Moderator tag appears for a participant in the p2p voice chat) --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index e1491b0889..330e220af3 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -98,6 +98,10 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av { mModeratorList.insert(speakerp->mID); } + else + { + mModeratorToRemoveList.insert(speakerp->mID); + } } // we need to exclude agent id for non group chat sort(); @@ -159,7 +163,7 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) { std::string name = item->getAvatarName(); size_t found = name.find(moderator_indicator); - if (found == std::string::npos) + if (found != std::string::npos) { name.erase(found, moderator_indicator_len); item->setName(name); -- cgit v1.2.3 From 7319c80ee16b2e009169548bf286b9e514027808 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Sat, 26 Dec 2009 15:00:05 +0200 Subject: =?UTF-8?q?implemented=20EXT-3701=20=E2=80=9CReplace=20"accept"=20?= =?UTF-8?q?button=20with=20"show"=20in=20the=20inventory=20offer=20toast?= =?UTF-8?q?=E2=80=9D;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 6 +++--- indra/newview/skins/default/xui/en/notifications.xml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d0eddc24b2..87045d2abf 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1158,9 +1158,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& default: LL_WARNS("Messaging") << "inventory_offer_callback: unknown offer type" << LL_ENDL; break; - } // end switch (mIM) - - // Show falls through to accept. + } + break; + // end switch (mIM) case IOR_ACCEPT: msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1)); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index af02a182db..9d3c31c4e6 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5022,9 +5022,9 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you [O [ITEM_SLURL]