diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-03-04 10:14:41 -0800 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-03-04 10:14:41 -0800 |
commit | 3d1ec8b462bc091e9d63c385ec0bc595937f31c5 (patch) | |
tree | 7d6dda88bf45d2fae769e1ae1bf6e570bf1678a2 | |
parent | 9f965be297422ddab79ff9be47fb6d5c64a5096f (diff) | |
parent | a26c1672235578f3a4e21be370b11522207e2c57 (diff) |
merge
-rwxr-xr-x | indra/llui/llfolderviewitem.cpp | 2 | ||||
-rw-r--r-- | indra/llui/lltabcontainer.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llconversationmodel.cpp | 29 | ||||
-rwxr-xr-x | indra/newview/llconversationmodel.h | 6 | ||||
-rwxr-xr-x | indra/newview/llconversationview.cpp | 13 | ||||
-rwxr-xr-x | indra/newview/llconversationview.h | 1 | ||||
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 120 | ||||
-rw-r--r-- | indra/newview/llfloaterimcontainer.h | 8 | ||||
-rw-r--r-- | indra/newview/llfloaterimnearbychat.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llfloaterimsessiontab.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llfloaterimsessiontab.h | 2 | ||||
-rw-r--r-- | indra/newview/lloutputmonitorctrl.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lloutputmonitorctrl.h | 3 | ||||
-rwxr-xr-x | indra/newview/llviewerwindow.cpp | 9 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 8 |
15 files changed, 171 insertions, 76 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index f67c134751..fdb4108afb 100755 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -2072,7 +2072,7 @@ LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* it if (fit != fend) { // try selecting child element of this folder - if ((*fit)->isOpen()) + if ((*fit)->isOpen() && include_children) { result = (*fit)->getPreviousFromChild(NULL); } diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 91527c68f2..0c43a571b8 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -1483,6 +1483,8 @@ BOOL LLTabContainer::setTab(S32 which) for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) { LLTabTuple* tuple = *iter; + if (!tuple) + continue; BOOL is_selected = ( tuple == selected_tuple ); tuple->mButton->setUseEllipses(mUseTabEllipses); tuple->mButton->setHAlign(mFontHalign); diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 0977056b2a..009fce0a92 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -322,7 +322,7 @@ void LLConversationItemSession::setParticipantIsMuted(const LLUUID& participant_ LLConversationItemParticipant* participant = findParticipant(participant_id); if (participant) { - participant->setIsMuted(is_muted); + participant->muteVoice(is_muted); } } @@ -462,7 +462,6 @@ void LLConversationItemSession::onAvatarNameCache(const LLAvatarName& av_name) LLConversationItemParticipant::LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : LLConversationItem(display_name,uuid,root_view_model), - mIsMuted(false), mIsModerator(false), mDisplayModeratorLabel(false), mDistToAgent(-1.0) @@ -473,7 +472,6 @@ LLConversationItemParticipant::LLConversationItemParticipant(std::string display LLConversationItemParticipant::LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : LLConversationItem(uuid,root_view_model), - mIsMuted(false), mIsModerator(false), mDisplayModeratorLabel(false), mDistToAgent(-1.0) @@ -549,7 +547,7 @@ LLConversationItemSession* LLConversationItemParticipant::getParentSession() void LLConversationItemParticipant::dumpDebugData() { - llinfos << "Merov debug : participant, uuid = " << mUUID << ", name = " << mName << ", display name = " << mDisplayName << ", muted = " << mIsMuted << ", moderator = " << mIsModerator << llendl; + llinfos << "Merov debug : participant, uuid = " << mUUID << ", name = " << mName << ", display name = " << mDisplayName << ", muted = " << isVoiceMuted() << ", moderator = " << mIsModerator << llendl; } void LLConversationItemParticipant::setDisplayModeratorRole(bool displayRole) @@ -561,6 +559,29 @@ void LLConversationItemParticipant::setDisplayModeratorRole(bool displayRole) } } +bool LLConversationItemParticipant::isVoiceMuted() +{ + return LLMuteList::getInstance()->isMuted(mUUID, LLMute::flagVoiceChat); +} + +void LLConversationItemParticipant::muteVoice(bool mute_voice) +{ + std::string name; + gCacheName->getFullName(mUUID, name); + LLMuteList * mute_listp = LLMuteList::getInstance(); + bool voice_already_muted = mute_listp->isMuted(mUUID, name); + + LLMute mute(mUUID, name, LLMute::AGENT); + if (voice_already_muted && !mute_voice) + { + mute_listp->remove(mute); + } + else if (!voice_already_muted && mute_voice) + { + mute_listp->add(mute); + } +} + // // LLConversationSort // diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index c907d1d6d2..8766585049 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -189,9 +189,9 @@ public: virtual const std::string& getDisplayName() const { return mDisplayName; } - bool isMuted() { return mIsMuted; } - bool isModerator() {return mIsModerator; } - void setIsMuted(bool is_muted) { mIsMuted = is_muted; mNeedsRefresh = true; } + bool isVoiceMuted(); + bool isModerator() const { return mIsModerator; } + void muteVoice(bool mute_voice); void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; mNeedsRefresh = true; } void setTimeNow() { mLastActiveTime = LLFrameTimer::getElapsedSeconds(); mNeedsRefresh = true; } void setDistance(F64 dist) { mDistToAgent = dist; mNeedsRefresh = true; } diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 73b2c6f88c..882ef64715 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -527,19 +527,6 @@ S32 LLConversationViewParticipant::arrange(S32* width, S32* height) return arranged; } -void LLConversationViewParticipant::refresh() -{ - // Refresh the participant view from its model data - LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(getViewModelItem()); - participant_model->resetRefresh(); - - // *TODO: We should also do something with vmi->isModerator() to echo that state in the UI somewhat - mSpeakingIndicator->setIsMuted(participant_model->isMuted()); - - // Do the regular upstream refresh - LLFolderViewItem::refresh(); -} - void LLConversationViewParticipant::addToFolder(LLFolderViewFolder* folder) { // Add the item to the folder (conversation) diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index f9b45073f4..76d3d079ea 100755 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -130,7 +130,6 @@ public: virtual ~LLConversationViewParticipant( void ); bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); } - virtual void refresh(); void addToFolder(LLFolderViewFolder* folder); void addToSession(const LLUUID& session_id); diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index c5edd11c12..46ec1d510d 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -605,7 +605,7 @@ void LLFloaterIMContainer::setVisible(BOOL visible) setSelectedSession(LLUUID(NULL)); } openNearbyChat(); - selectConversationPair(getSelectedSession(), false); + selectConversationPair(getSelectedSession(), false, false); } nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); @@ -1096,12 +1096,9 @@ void LLFloaterIMContainer::doToSelectedConversation(const std::string& command, } else if("chat_history" == command) { - const LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(conversationItem->getUUID()); - - if (NULL != session) + if (selectedIDS.size() > 0) { - const LLUUID session_id = session->isOutgoingAdHoc() ? session->generateOutgouigAdHocHash() : session->mSessionID; - LLFloaterReg::showInstance("preview_conversation", session_id, true); + LLAvatarActions::viewChatHistory(selectedIDS.front()); } } else @@ -1165,15 +1162,9 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) } //Enable Chat history item for ad-hoc and group conversations - if ("can_chat_history" == item) + if ("can_chat_history" == item && uuids.size() > 0) { - if(getCurSelectedViewModelItem()) - { - if (getCurSelectedViewModelItem()->getType() != LLConversationItem::CONV_PARTICIPANT) - { - return isConversationLoggingAllowed(); - } - } + return LLLogChat::isTranscriptExist(uuids.front()); } // If nothing is selected(and selected item is not group chat), everything needs to be disabled @@ -1213,6 +1204,15 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v return false; } + // If the user agent is selected with others, everything is disabled + for (uuid_vec_t::const_iterator id = uuids.begin(); id != uuids.end(); ++id) + { + if (gAgent.getID() == *id) + { + return false; + } + } + // Handle all other options if (("can_invite" == item) || ("can_chat_history" == item) || ("can_share" == item) || ("can_pay" == item)) { @@ -1339,30 +1339,19 @@ void LLFloaterIMContainer::selectConversation(const LLUUID& session_id) // Select the conversation *after* (or before if none after) the passed uuid conversation // Used to change the selection on key hits -void LLFloaterIMContainer::selectNextConversation(const LLUUID& uuid) +void LLFloaterIMContainer::selectNextConversationByID(const LLUUID& uuid) { - LLFolderViewItem* new_selection = NULL; - LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,uuid); - if (widget) - { - new_selection = mConversationsRoot->getNextFromChild(widget, FALSE); - if (!new_selection) - { - new_selection = mConversationsRoot->getPreviousFromChild(widget, FALSE); - } - } - if (new_selection) + bool new_selection = false; + selectConversation(uuid); + new_selection = selectNextorPreviousConversation(true); + if (!new_selection) { - LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(new_selection->getViewModelItem()); - if (vmi) - { - selectConversationPair(vmi->getUUID(), true); - } + selectNextorPreviousConversation(false); } } // Synchronous select the conversation item and the conversation floater -BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget) +BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater/*=true*/) { BOOL handled = TRUE; LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); @@ -1409,7 +1398,7 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool if (!session_floater->hasFocus()) { BOOL is_minimized = session_floater->isMinimized(); - session_floater->setFocus(TRUE); + session_floater->setFocus(focus_floater); session_floater->setMinimized(is_minimized); } } @@ -1887,6 +1876,71 @@ bool LLFloaterIMContainer::isScrolledOutOfSight(LLConversationViewSession* conve return !mConversationsRoot->getVisibleRect().overlaps(widget_rect); } +BOOL LLFloaterIMContainer::handleKeyHere(KEY key, MASK mask ) +{ + if(mask == MASK_ALT) + { + if (KEY_RETURN == key ) + { + expandConversation(); + } + + if ((KEY_DOWN == key ) || (KEY_RIGHT == key)) + { + selectNextorPreviousConversation(true); + } + if ((KEY_UP == key) || (KEY_LEFT == key)) + { + selectNextorPreviousConversation(false); + } + } + return TRUE; +} + +bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next) +{ + if (mConversationsWidgets.size() > 1) + { + LLFolderViewItem* new_selection = NULL; + LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,getSelectedSession()); + if (widget) + { + if(select_next) + { + new_selection = mConversationsRoot->getNextFromChild(widget, FALSE); + } + else + { + new_selection = mConversationsRoot->getPreviousFromChild(widget, FALSE); + } + if (new_selection) + { + LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(new_selection->getViewModelItem()); + if (vmi) + { + selectConversationPair(vmi->getUUID(), true); + LLFloater* floaterp = get_ptr_in_map(mSessions, getSelectedSession()); + if(floaterp && !floaterp->isTornOff()) + { + setFocus(TRUE); + } + return true; + } + } + } + } + return false; +} + +void LLFloaterIMContainer::expandConversation() +{ + LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(get_ptr_in_map(mConversationsWidgets,getSelectedSession())); + if (widget) + { + widget->setOpen(!widget->isOpen()); + } +} + void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) { // Always unminimize before trying to close. diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 419239f90b..c84d4978ec 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -69,9 +69,11 @@ public: void returnFloaterToHost(); void showConversation(const LLUUID& session_id); void selectConversation(const LLUUID& session_id); - void selectNextConversation(const LLUUID& session_id); - BOOL selectConversationPair(const LLUUID& session_id, bool select_widget); + void selectNextConversationByID(const LLUUID& session_id); + BOOL selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater = true); void clearAllFlashStates(); + bool selectNextorPreviousConversation(bool select_next); + void expandConversation(); /*virtual*/ void tabClose(); void showStub(bool visible); @@ -109,7 +111,7 @@ public: void doToParticipants(const std::string& item, uuid_vec_t& selectedIDS); void assignResizeLimits(); - + virtual BOOL handleKeyHere(KEY key, MASK mask ); /*virtual*/ void closeFloater(bool app_quitting = false); private: diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index a3b81e037a..02f54e76db 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -150,7 +150,7 @@ void LLFloaterIMNearbyChat::closeHostedFloater() { setVisible(FALSE); } - floater_container->selectNextConversation(LLUUID()); + floater_container->selectNextConversationByID(LLUUID()); } } @@ -354,6 +354,21 @@ BOOL LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask ) handled = TRUE; } + if((mask == MASK_ALT) && isTornOff()) + { + LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance(); + if ((KEY_UP == key) || (KEY_LEFT == key)) + { + floater_container->selectNextorPreviousConversation(false); + handled = TRUE; + } + if ((KEY_DOWN == key ) || (KEY_RIGHT == key)) + { + floater_container->selectNextorPreviousConversation(true); + handled = TRUE; + } + } + return handled; } diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index f773ed4e23..d3fcfbbc56 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -939,3 +939,24 @@ LLConversationItem* LLFloaterIMSessionTab::getCurSelectedViewModelItem() return conversationItem; } + +BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask ) +{ + if(mask == MASK_ALT) + { + LLFloaterIMContainer* floater_container = LLFloaterIMContainer::getInstance(); + if (KEY_RETURN == key && !isTornOff()) + { + floater_container->expandConversation(); + } + if ((KEY_UP == key) || (KEY_LEFT == key)) + { + floater_container->selectNextorPreviousConversation(false); + } + if ((KEY_DOWN == key ) || (KEY_RIGHT == key)) + { + floater_container->selectNextorPreviousConversation(true); + } + } + return TRUE; +} diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index b245049137..d55b021df7 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -96,8 +96,8 @@ public: void initBtns(); virtual void updateMessages() {} LLConversationItem* getCurSelectedViewModelItem(); - void forceReshape(); + virtual BOOL handleKeyHere( KEY key, MASK mask ); protected: diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index f6e3c0cac0..6c26073d5b 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -284,12 +284,12 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& s { if (speaker_id == gAgentID) { - setIsMuted(false); + mIsMuted = false; } else { // check only blocking on voice. EXT-3542 - setIsMuted(LLMuteList::getInstance()->isMuted(mSpeakerId, LLMute::flagVoiceChat)); + mIsMuted = LLMuteList::getInstance()->isMuted(mSpeakerId, LLMute::flagVoiceChat); LLMuteList::getInstance()->addObserver(this); } } @@ -298,7 +298,7 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& s void LLOutputMonitorCtrl::onChange() { // check only blocking on voice. EXT-3542 - setIsMuted(LLMuteList::getInstance()->isMuted(mSpeakerId, LLMute::flagVoiceChat)); + mIsMuted = LLMuteList::getInstance()->isMuted(mSpeakerId, LLMute::flagVoiceChat); } // virtual diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index af2fd45823..a346909027 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -73,9 +73,6 @@ public: void setPower(F32 val); F32 getPower(F32 val) const { return mPower; } - bool getIsMuted() const { return mIsMuted; } - void setIsMuted(bool val) { mIsMuted = val; } - // For the current user, need to know the PTT state to show // correct button image. void setIsAgentControl(bool val) { mIsAgentControl = val; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e6e93d81bc..e44a2cc4df 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2515,7 +2515,9 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) { // let Control-Up and Control-Down through for chat line history, if (!(key == KEY_UP && mask == MASK_CONTROL) - && !(key == KEY_DOWN && mask == MASK_CONTROL)) + && !(key == KEY_DOWN && mask == MASK_CONTROL) + && !(key == KEY_UP && mask == MASK_ALT) + && !(key == KEY_DOWN && mask == MASK_ALT)) { switch(key) { @@ -2607,7 +2609,10 @@ BOOL LLViewerWindow::handleUnicodeChar(llwchar uni_char, MASK mask) if ((uni_char == 13 && mask != MASK_CONTROL) || (uni_char == 3 && mask == MASK_NONE)) { - return gViewerKeyboard.handleKey(KEY_RETURN, mask, gKeyboard->getKeyRepeated(KEY_RETURN)); + if (mask != MASK_ALT) + { + return gViewerKeyboard.handleKey(KEY_RETURN, mask, gKeyboard->getKeyRepeated(KEY_RETURN)); + } } // let menus handle navigation (jump) keys diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 234c6d7c0f..88c02fc84e 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -9708,14 +9708,6 @@ No room to sit here, try another spot. <notification icon="alertmodal.tga" - name="AutopilotCanceled" - type="notify"> - <tag>fail</tag> -Autopilot canceled - </notification> - - <notification - icon="alertmodal.tga" name="ClaimObjectFailedNoPermission" type="notify"> <tag>fail</tag> |