diff options
author | MaximB ProductEngine <mberezhnoy@productengine.com> | 2012-10-30 18:50:37 +0200 |
---|---|---|
committer | MaximB ProductEngine <mberezhnoy@productengine.com> | 2012-10-30 18:50:37 +0200 |
commit | 1160d82fb8566d7c76f0c39785c97fcf31768f0c (patch) | |
tree | 5f3b9c28b1e277ee7d339bf54ee11d27250e655b /indra | |
parent | d2087bdd8a6591cafc6c8d8de7582a9dda6ea352 (diff) | |
parent | 5215bf6edef283cb6c570d3e7aea11f0ecf8313f (diff) |
merging into latest changes
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llfloater.cpp | 40 | ||||
-rwxr-xr-x | indra/newview/llavataractions.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llchiclet.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llconversationmodel.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llgroupactions.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llimfloater.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llimfloater.h | 2 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 23 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 4 |
10 files changed, 49 insertions, 59 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 58b17f74a8..8f7d4afb1b 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -725,7 +725,27 @@ void LLFloater::closeFloater(bool app_quitting) make_ui_sound("UISndWindowClose"); } - //If floater is a dependent, remove it from parent (dependee) + gFocusMgr.clearLastFocusForGroup(this); + + if (hasFocus()) + { + // Do this early, so UI controls will commit before the + // window is taken down. + releaseFocus(); + + // give focus to dependee floater if it exists, and we had focus first + if (isDependent()) + { + LLFloater* dependee = mDependeeHandle.get(); + if (dependee && !dependee->isDead()) + { + dependee->setFocus(TRUE); + } + } + } + + + //If floater is a dependent, remove it from parent (dependee) LLFloater* dependee = mDependeeHandle.get(); if (dependee) { @@ -750,24 +770,6 @@ void LLFloater::closeFloater(bool app_quitting) } cleanupHandles(); - gFocusMgr.clearLastFocusForGroup(this); - - if (hasFocus()) - { - // Do this early, so UI controls will commit before the - // window is taken down. - releaseFocus(); - - // give focus to dependee floater if it exists, and we had focus first - if (isDependent()) - { - LLFloater* dependee = mDependeeHandle.get(); - if (dependee && !dependee->isDead()) - { - dependee->setFocus(TRUE); - } - } - } dirtyRect(); diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 7322b3bb0b..13262efb3b 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -56,6 +56,7 @@ #include "llinventorybridge.h" #include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType #include "llinventorypanel.h" +#include "llimfloatercontainer.h" #include "llimview.h" // for gIMMgr #include "llmutelist.h" #include "llnotificationsutil.h" // for LLNotificationsUtil @@ -67,7 +68,6 @@ #include "llviewerobjectlist.h" #include "llviewermessage.h" // for handle_lure #include "llviewerregion.h" -#include "llimfloater.h" #include "lltrans.h" #include "llcallingcard.h" #include "llslurl.h" // IDEVO @@ -184,7 +184,7 @@ static void on_avatar_name_cache_start_im(const LLUUID& agent_id, LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, agent_id); if (session_id != LLUUID::null) { - LLIMFloater::show(session_id); + LLIMFloaterContainer::getInstance()->showConversation(session_id); } make_ui_sound("UISndStartIM"); } @@ -302,7 +302,7 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids, const LLUUID& float return; } - LLIMFloater::show(session_id); + LLIMFloaterContainer::getInstance()->showConversation(session_id); make_ui_sound("UISndStartIM"); } diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 17181edffc..e328186fd6 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -34,6 +34,7 @@ #include "llgroupactions.h" #include "lliconctrl.h" #include "llimfloater.h" +#include "llimfloatercontainer.h" #include "llimview.h" #include "llfloaterreg.h" #include "lllocalcliprect.h" @@ -1196,7 +1197,7 @@ void LLChicletPanel::onCurrentVoiceChannelChanged(const LLUUID& session_id) chiclet->setShowSpeaker(true); if (gSavedSettings.getBOOL("OpenIMOnVoice")) { - LLIMFloater::show(chiclet->getSessionId()); + LLIMFloaterContainer::getInstance()->showConversation(session_id); } } } diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index f0c8658cfe..67a1aed675 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -401,12 +401,13 @@ void LLConversationItemParticipant::onAvatarNameCache(const LLAvatarName& av_nam mDisplayName = (av_name.mDisplayName.empty() ? av_name.mUsername : av_name.mDisplayName); mNeedsRefresh = true; LLConversationItemSession* parent_session = dynamic_cast<LLConversationItemSession*>(mParent); - if (parent_session) + if (parent_session != NULL) { parent_session->requestSort(); parent_session->updateParticipantName(this); + postEvent("update_participant", parent_session, this); } - postEvent("update_participant", parent_session, this); + } void LLConversationItemParticipant::dumpDebugData() diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 623ebb76f2..15eca39bce 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -36,10 +36,10 @@ #include "llfloaterreg.h" #include "llfloatersidepanelcontainer.h" #include "llgroupmgr.h" +#include "llimfloatercontainer.h" #include "llimview.h" // for gIMMgr #include "llnotificationsutil.h" #include "llstatusbar.h" // can_afford_transaction() -#include "llimfloater.h" #include "groupchatlistener.h" // @@ -335,7 +335,7 @@ LLUUID LLGroupActions::startIM(const LLUUID& group_id) group_id); if (session_id != LLUUID::null) { - LLIMFloater::show(session_id); + LLIMFloaterContainer::getInstance()->showConversation(session_id); } make_ui_sound("UISndStartIM"); return session_id; diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index e4032738a7..1af5def5f0 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -582,7 +582,7 @@ void LLIMFloater::onParticipantsListChanged(LLUICtrl* ctrl) } } -void LLIMFloater::addToHost(const LLUUID& session_id, const bool force) +void LLIMFloater::addToHost(const LLUUID& session_id) { if (!LLIMConversation::isChatMultiTab() || !gIMMgr->hasSession(session_id)) { @@ -607,20 +607,7 @@ void LLIMFloater::addToHost(const LLUUID& session_id, const bool force) LLTabContainer::eInsertionPoint i_pt = LLTabContainer::END; if (floater_container) { - floater_container->addFloater(floater, TRUE, i_pt); - } - } - - if (force) - { - if (floater_container && floater_container->getVisible()) - { - floater->openFloater(floater->getKey()); - floater->setVisible(TRUE); - } - else - { - floater->setVisible(FALSE); + floater_container->addFloater(floater, FALSE, i_pt); } } } diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index 26daf00afd..8a0d6f10e0 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -72,7 +72,7 @@ public: static LLIMFloater* findInstance(const LLUUID& session_id); static LLIMFloater* getInstance(const LLUUID& session_id); - static void addToHost(const LLUUID& session_id, const bool force = false); + static void addToHost(const LLUUID& session_id); // LLFloater overrides /*virtual*/ void onClose(bool app_quitting); diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 83233cdd13..f46ecd905a 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -98,8 +98,8 @@ LLIMFloaterContainer::~LLIMFloaterContainer() void LLIMFloaterContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { - LLIMFloater::addToHost(session_id, true); - addConversationListItem(session_id, true); + LLIMFloater::addToHost(session_id); + addConversationListItem(session_id); } void LLIMFloaterContainer::sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) @@ -109,8 +109,8 @@ void LLIMFloaterContainer::sessionActivated(const LLUUID& session_id, const std: void LLIMFloaterContainer::sessionVoiceOrIMStarted(const LLUUID& session_id) { - LLIMFloater::addToHost(session_id, true); - addConversationListItem(session_id, true); + LLIMFloater::addToHost(session_id); + addConversationListItem(session_id); } void LLIMFloaterContainer::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) @@ -128,7 +128,7 @@ void LLIMFloaterContainer::onCurrentChannelChanged(const LLUUID& session_id) { if (session_id != LLUUID::null) { - LLIMFloater::show(session_id); + LLIMFloaterContainer::getInstance()->showConversation(session_id); } } @@ -1196,16 +1196,15 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid, bool isWi current_participant_model++; } - if (isWidgetSelected) - { - selectConversation(uuid); - } - // set the widget to minimized mode if conversations pane is collapsed widget->toggleMinimizedMode(mConversationsPane->isCollapsed()); - // scroll to newly added item - mConversationsRoot->scrollToShowSelection(); + if (isWidgetSelected) + { + selectConversation(uuid); + // scroll to newly added item + mConversationsRoot->scrollToShowSelection(); + } return; } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 28c2edbe84..5d8d82b226 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -46,7 +46,7 @@ #include "llfriendcard.h" #include "llgesturemgr.h" #include "llgiveinventory.h" -#include "llimfloater.h" +#include "llimfloatercontainer.h" #include "llimview.h" #include "llclipboard.h" #include "llinventorydefines.h" @@ -4704,7 +4704,7 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act LLUUID session_id = gIMMgr->addSession(callingcard_name, IM_NOTHING_SPECIAL, item->getCreatorUUID()); if (session_id != LLUUID::null) { - LLIMFloater::show(session_id); + LLIMFloaterContainer::getInstance()->showConversation(session_id); } } } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index a8d99ad7de..dafc71b59c 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -39,7 +39,7 @@ #include "llfloatersidepanelcontainer.h" #include "llfolderview.h" #include "llfolderviewitem.h" -#include "llimfloater.h" +#include "llimfloatercontainer.h" #include "llimview.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" @@ -1087,7 +1087,7 @@ bool LLInventoryPanel::beginIMSession() LLUUID session_id = gIMMgr->addSession(name, type, members[0], members); if (session_id != LLUUID::null) { - LLIMFloater::show(session_id); + LLIMFloaterContainer::getInstance()->showConversation(session_id); } return true; |