meow-7.2.2
Gilbert Gonzales 2013-03-04 10:14:41 -08:00
commit 3d1ec8b462
15 changed files with 171 additions and 76 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -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
//

View File

@ -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; }

View File

@ -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)

View File

@ -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);

View File

@ -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)
bool new_selection = false;
selectConversation(uuid);
new_selection = selectNextorPreviousConversation(true);
if (!new_selection)
{
new_selection = mConversationsRoot->getNextFromChild(widget, FALSE);
if (!new_selection)
{
new_selection = mConversationsRoot->getPreviousFromChild(widget, FALSE);
}
}
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.

View File

@ -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:

View File

@ -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;
}

View File

@ -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;
}

View File

@ -96,8 +96,8 @@ public:
void initBtns();
virtual void updateMessages() {}
LLConversationItem* getCurSelectedViewModelItem();
void forceReshape();
virtual BOOL handleKeyHere( KEY key, MASK mask );
protected:

View File

@ -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

View File

@ -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; }

View File

@ -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

View File

@ -9706,14 +9706,6 @@ There is no suitable surface to sit on, try another spot.
No room to sit here, try another spot.
</notification>
<notification
icon="alertmodal.tga"
name="AutopilotCanceled"
type="notify">
<tag>fail</tag>
Autopilot canceled
</notification>
<notification
icon="alertmodal.tga"
name="ClaimObjectFailedNoPermission"