From 36e0f729d33a2e87809f8185cb73016e54ba76a5 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Thu, 12 Nov 2009 12:59:04 +0200 Subject: final fix for (EXT-989) IM chiclets should expand to show active voice indicator (EXT-988) Change indication of unread messges in chiclets fixed chiclets' behavior in the Message Well Window --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 44 ++++++++++++++++------ indra/newview/llsyswellwindow.cpp | 9 +++-- .../skins/default/xui/en/panel_activeim_row.xml | 42 +++++++++++++++++++-- 3 files changed, 77 insertions(+), 18 deletions(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index b919195fb2..e416151748 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -54,10 +54,12 @@ static LLDefaultChildRegistry::Register t1("chiclet_panel"); static LLDefaultChildRegistry::Register t2("chiclet_notification"); static LLDefaultChildRegistry::Register t3("chiclet_im_p2p"); static LLDefaultChildRegistry::Register t4("chiclet_im_group"); +static LLDefaultChildRegistry::Register t5("chiclet_im_adhoc"); static const LLRect CHICLET_RECT(0, 25, 25, 0); -static const LLRect CHICLET_ICON_RECT(0, 24, 24, 0); +static const LLRect CHICLET_ICON_RECT(0, 22, 22, 0); static const LLRect VOICE_INDICATOR_RECT(25, 25, 45, 0); +static const S32 OVERLAY_ICON_SHIFT = 2; // used for shifting of an overlay icon for new massages in a chiclet // static const S32 LLChicletPanel::s_scroll_ratio = 10; @@ -217,13 +219,15 @@ LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p) icon_params.visible = false; icon_params.image = LLUI::getUIImage(p.new_messages_icon_name); mNewMessagesIcon = LLUICtrlFactory::create(icon_params); + addChild(mNewMessagesIcon); + // adjust size and position of an icon LLRect chiclet_rect = p.rect; - LLRect overlay_icon_rect = LLRect(chiclet_rect.getWidth()/2, chiclet_rect.mTop, chiclet_rect.mRight, chiclet_rect.getHeight()/2); - // shift an icon a little bit to the right and up corner of a chiclet - overlay_icon_rect.translate(overlay_icon_rect.getWidth()/5, overlay_icon_rect.getHeight()/5); + LLRect overlay_icon_rect = LLRect(chiclet_rect.getWidth()/2, chiclet_rect.getHeight(), chiclet_rect.getWidth(), chiclet_rect.getHeight()/2); mNewMessagesIcon->setRect(overlay_icon_rect); - addChild(mNewMessagesIcon); + + // shift an icon a little bit to the right and up corner of a chiclet + overlay_icon_rect.translate(OVERLAY_ICON_SHIFT, OVERLAY_ICON_SHIFT); setShowCounter(false); } @@ -602,6 +606,9 @@ BOOL LLAdHocChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) LLIMGroupChiclet::Params::Params() : group_icon("group_icon") +, unread_notifications("unread_notifications") +, speaker("speaker") +, show_speaker("show_speaker") { rect(CHICLET_RECT); @@ -880,19 +887,34 @@ BOOL LLChicletPanel::postBuild() void LLChicletPanel::onCurrentVoiceChannelChanged(const LLUUID& session_id) { - for(chiclet_list_t::iterator it = mChicletList.begin(); it != mChicletList.end(); ++it) + static LLUUID s_previous_active_voice_session_id; + + std::list chiclets = LLIMChiclet::sFindChicletsSignal(session_id); + + for(std::list::iterator it = chiclets.begin(); it != chiclets.end(); ++it) { LLIMChiclet* chiclet = dynamic_cast(*it); if(chiclet) { - if(chiclet->getSessionId() == session_id) + chiclet->setShowSpeaker(true); + } + } + + if(!s_previous_active_voice_session_id.isNull() && s_previous_active_voice_session_id != session_id) + { + chiclets = LLIMChiclet::sFindChicletsSignal(s_previous_active_voice_session_id); + + for(std::list::iterator it = chiclets.begin(); it != chiclets.end(); ++it) + { + LLIMChiclet* chiclet = dynamic_cast(*it); + if(chiclet) { - chiclet->setShowSpeaker(true); - continue; + chiclet->setShowSpeaker(false); } - chiclet->setShowSpeaker(false); - } + } } + + s_previous_active_voice_session_id = session_id; } S32 LLChicletPanel::calcChickletPanleWidth() diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 4422c4b672..2fb6550107 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -501,14 +501,14 @@ LLSysWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& switch (im_chiclet_type) { case LLIMChiclet::TYPE_GROUP: + mChiclet = getChild("group_chiclet"); + break; case LLIMChiclet::TYPE_AD_HOC: - mChiclet = getChild("group_chiclet"); - childSetVisible("p2p_chiclet", false); + mChiclet = getChild("adhoc_chiclet"); break; case LLIMChiclet::TYPE_UNKNOWN: // assign mChiclet a non-null value anyway case LLIMChiclet::TYPE_IM: - mChiclet = getChild("p2p_chiclet"); - childSetVisible("group_chiclet", false); + mChiclet = getChild("p2p_chiclet"); break; } @@ -517,6 +517,7 @@ LLSysWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& mChiclet->setSessionId(sessionId); mChiclet->setIMSessionName(name); mChiclet->setOtherParticipantId(otherParticipantId); + mChiclet->setVisible(true); LLTextBox* contactName = getChild("contact_name"); contactName->setValue(name); diff --git a/indra/newview/skins/default/xui/en/panel_activeim_row.xml b/indra/newview/skins/default/xui/en/panel_activeim_row.xml index 8b815b0f71..5562ec8406 100644 --- a/indra/newview/skins/default/xui/en/panel_activeim_row.xml +++ b/indra/newview/skins/default/xui/en/panel_activeim_row.xml @@ -15,7 +15,16 @@ top="3" left="5" height="25" - width="25"> + width="25" + visible="false" + speaker.name="speaker_p2p" + speaker.width="20" + speaker.height="25" + speaker.left="25" + speaker.top="25" + speaker.auto_update="true" + speaker.draw_border="false" + speaker.visible="false"> + width="25" + visible="false" + speaker.name="speaker_grp" + speaker.width="20" + speaker.height="25" + speaker.left="25" + speaker.top="25" + speaker.auto_update="true" + speaker.draw_border="false" + speaker.visible="false"> + + Date: Thu, 12 Nov 2009 13:29:27 +0200 Subject: Fixed Low bug EXT-2345-There is wrong direction arrow in IM window, after this window has been closed and restored (refer to screenshot) --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 54fc6f02fb..5ea900e46d 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -211,6 +211,7 @@ BOOL LLIMFloater::postBuild() } mControlPanel->setSessionId(mSessionID); + mControlPanel->setVisible(gSavedSettings.getBOOL("IMShowControlPanel")); LLButton* slide_left = getChild("slide_left_btn"); slide_left->setVisible(mControlPanel->getVisible()); @@ -356,8 +357,6 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id) LLDockControl::TOP, boost::bind(&LLIMFloater::getAllowedRect, floater, _1))); } - floater->childSetVisible("panel_im_control_panel", gSavedSettings.getBOOL("IMShowControlPanel")); - return floater; } -- cgit v1.2.3 From 01d90c3d3e90321be326db04ecd2e09328cb189e Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 12 Nov 2009 14:25:34 +0200 Subject: Work on major sub-task EXT-991 (Update bottom bar behavior on resize) increased chat bar text field to compensate changes in changeset: 4652 : d0832cfa71c6 (for EXT-2356 Replace Log button in bottom tray with up arrow) --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml index 1ef845b769..a77094e942 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml @@ -27,7 +27,7 @@ name="chat_box" tool_tip="Press Enter to say, Ctrl+Enter to shout" top="0" - width="250" /> + width="279" /> Date: Thu, 12 Nov 2009 15:24:58 +0200 Subject: no ticket, fixed IM message counting and firing new message balloon --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 7 ++++++- indra/newview/llimview.cpp | 6 +----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index b919195fb2..b5119790c0 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -830,8 +830,13 @@ LLChicletPanel::~LLChicletPanel() void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ LLUUID session_id = data["session_id"].asUUID(); - S32 unread = data["num_unread"].asInteger(); + LLUUID from_id = data["from_id"].asUUID(); + const std::string from = data["from"].asString(); + + //we do not show balloon (indicator of new messages) for system messages and our own messages + if (from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from) return; + S32 unread = data["num_unread"].asInteger(); LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); if (im_floater && im_floater->getVisible()) { diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index be5fbdbbf8..9c38d9c5fc 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -439,11 +439,7 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co addToHistory(session_id, from, from_id, utf8_text); if (log2file) logToFile(session_id, from, from_id, utf8_text); - //we do not count system messages and our messages - if (from_id.notNull() && from_id != gAgentID && SYSTEM_FROM != from) - { - session->mNumUnread++; - } + session->mNumUnread++; // notify listeners LLSD arg; -- cgit v1.2.3 From 86c63e36b59d502f48acc935874050bbe361caf0 Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Thu, 12 Nov 2009 17:36:17 +0200 Subject: Fixed major bug EXT-2400-Viewer crashes on right button click upon IM P2P chiclet. Removed call to non-existing child --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 12bbc29858..fd86192650 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -427,7 +427,6 @@ void LLIMP2PChiclet::updateMenuItems() bool is_friend = LLAvatarActions::isFriend(getOtherParticipantId()); mPopupMenu->getChild("Add Friend")->setEnabled(!is_friend); - mPopupMenu->getChild("Remove Friend")->setEnabled(is_friend); } BOOL LLIMP2PChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) -- cgit v1.2.3 From fcb99c30407d6ccbae17ea4c3d17a65037ca6a5c Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 12 Nov 2009 17:43:23 +0200 Subject: Work on major sub-task EXT-991 (Update bottom bar behavior on resize) Code refuctored: - moved code to process Borrom Bar shrinking into separate method - unified code to process a hiding of the Bottom Tray's buttons Code is ready to process shrink after min width is reached & be synchronized with user hidden buttons --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 264 ++++++++++++++++++++--------------------- indra/newview/llbottomtray.h | 2 + 2 files changed, 128 insertions(+), 138 deletions(-) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 204d7d23fa..291f645ea2 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -238,22 +238,22 @@ void LLBottomTray::showBottomTrayContextMenu(S32 x, S32 y, MASK mask) void LLBottomTray::showGestureButton(BOOL visible) { - mGesturePanel->setVisible(visible); + showTrayButton(RS_BUTTON_GESTURES, visible); } void LLBottomTray::showMoveButton(BOOL visible) { - mMovementPanel->setVisible(visible); + showTrayButton(RS_BUTTON_MOVEMENT, visible); } void LLBottomTray::showCameraButton(BOOL visible) { - mCamPanel->setVisible(visible); + showTrayButton(RS_BUTTON_CAMERA, visible); } void LLBottomTray::showSnapshotButton(BOOL visible) { - mSnapshotPanel->setVisible(visible); + showTrayButton(RS_BUTTON_SNAPSHOT, visible); } namespace @@ -365,8 +365,6 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) void LLBottomTray::updateResizeState(S32 new_width, S32 cur_width) { mResizeState = RS_NORESIZE; - MASK compensative_view_item_mask = RS_CHATBAR_INPUT; - LLPanel* compansative_view = mNearbyChatBar; S32 delta_width = new_width - cur_width; // if (delta_width == 0) return; @@ -386,153 +384,113 @@ void LLBottomTray::updateResizeState(S32 new_width, S32 cur_width) << ", chiclet_panel_min_width: " << chiclet_panel_min_width << llendl; - bool still_should_be_processed = true; // bottom tray is narrowed if (shrink) { - S32 compensative_delta_width = 0; - if (chiclet_panel_width > chiclet_panel_min_width) - { - // we have some space to decrease chiclet panel - S32 panel_delta_min = chiclet_panel_width - chiclet_panel_min_width; - mResizeState |= RS_CHICLET_PANEL; - - S32 delta_panel = llmin(-delta_width, panel_delta_min); + processWidthDecreased(delta_width); + } + // bottom tray is widen + else + { + processWidthIncreased(delta_width); + } - lldebugs << "delta_width: " << delta_width - << ", panel_delta_min: " << panel_delta_min - << ", delta_panel: " << delta_panel - << llendl; + lldebugs << "New resize state: " << mResizeState << llendl; +} - // is chiclet panel width enough to process resizing? - delta_width += panel_delta_min; +void LLBottomTray::processWidthDecreased(S32 delta_width) +{ + bool still_should_be_processed = true; - still_should_be_processed = delta_width < 0; + const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); + const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); - mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - delta_panel, mChicletPanel->getParent()->getRect().getHeight()); - log(mChicletPanel, "after processing panel decreasing via chiclet panel"); + if (chiclet_panel_width > chiclet_panel_min_width) + { + // we have some space to decrease chiclet panel + S32 panel_delta_min = chiclet_panel_width - chiclet_panel_min_width; + mResizeState |= RS_CHICLET_PANEL; - lldebugs << "RS_CHICLET_PANEL" - << ", delta_width: " << delta_width - << llendl; - } - - if (still_should_be_processed && chatbar_panel_width > chatbar_panel_min_width) - { - // we have some space to decrease chatbar panel - S32 panel_delta_min = chatbar_panel_width - chatbar_panel_min_width; - mResizeState |= RS_CHATBAR_INPUT; + S32 delta_panel = llmin(-delta_width, panel_delta_min); - S32 delta_panel = llmin(-delta_width, panel_delta_min); + lldebugs << "delta_width: " << delta_width + << ", panel_delta_min: " << panel_delta_min + << ", delta_panel: " << delta_panel + << llendl; - // is chatbar panel width enough to process resizing? - delta_width += panel_delta_min; - + // is chiclet panel width enough to process resizing? + delta_width += panel_delta_min; - still_should_be_processed = delta_width < 0; + still_should_be_processed = delta_width < 0; - mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mNearbyChatBar->getRect().getHeight()); + mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - delta_panel, mChicletPanel->getParent()->getRect().getHeight()); + log(mChicletPanel, "after processing panel decreasing via chiclet panel"); - lldebugs << "RS_CHATBAR_INPUT" - << ", delta_panel: " << delta_panel - << ", delta_width: " << delta_width - << llendl; + lldebugs << "RS_CHICLET_PANEL" + << ", delta_width: " << delta_width + << llendl; + } - log(mChicletPanel, "after nearby was processed"); + const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); + const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth(); + if (still_should_be_processed && chatbar_panel_width > chatbar_panel_min_width) + { + // we have some space to decrease chatbar panel + S32 panel_delta_min = chatbar_panel_width - chatbar_panel_min_width; + mResizeState |= RS_CHATBAR_INPUT; - } - if (still_should_be_processed) - { - mResizeState |= compensative_view_item_mask; + S32 delta_panel = llmin(-delta_width, panel_delta_min); - if (mSnapshotPanel->getVisible()) - { - mResizeState |= RS_BUTTON_SNAPSHOT; - delta_width += mSnapshotPanel->getRect().getWidth(); - - if (delta_width > 0) - { - compensative_delta_width += delta_width; - } - lldebugs << "RS_BUTTON_SNAPSHOT" - << ", compensative_delta_width: " << compensative_delta_width - << ", delta_width: " << delta_width - << llendl; - showSnapshotButton(false); - } + // is chatbar panel width enough to process resizing? + delta_width += panel_delta_min; - if (delta_width < 0 && mCamPanel->getVisible()) - { - mResizeState |= RS_BUTTON_CAMERA; - delta_width += mCamPanel->getRect().getWidth(); - if (delta_width > 0) - { - compensative_delta_width += delta_width; - } - lldebugs << "RS_BUTTON_CAMERA" - << ", compensative_delta_width: " << compensative_delta_width - << ", delta_width: " << delta_width - << llendl; - showCameraButton(false); - } - if (delta_width < 0 && mMovementPanel->getVisible()) - { - mResizeState |= RS_BUTTON_MOVEMENT; - delta_width += mMovementPanel->getRect().getWidth(); - if (delta_width > 0) - { - compensative_delta_width += delta_width; - } - lldebugs << "RS_BUTTON_MOVEMENT" - << ", compensative_delta_width: " << compensative_delta_width - << ", delta_width: " << delta_width - << llendl; - showMoveButton(false); - } + still_should_be_processed = delta_width < 0; - if (delta_width < 0 && mGesturePanel->getVisible()) - { - mResizeState |= RS_BUTTON_GESTURES; - delta_width += mGesturePanel->getRect().getWidth(); - if (delta_width > 0) - { - compensative_delta_width += delta_width; - } - lldebugs << "RS_BUTTON_GESTURES" - << ", compensative_delta_width: " << compensative_delta_width - << ", delta_width: " << delta_width - << llendl; - showGestureButton(false); - } + mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mNearbyChatBar->getRect().getHeight()); - if (delta_width < 0) - { - llwarns << "WARNING: there is no enough room for bottom tray, resizing still should be processed" << llendl; - } + lldebugs << "RS_CHATBAR_INPUT" + << ", delta_panel: " << delta_panel + << ", delta_width: " << delta_width + << llendl; - if (compensative_delta_width != 0) - { - if (compansative_view) log(compansative_view, "before applying compensative width: "); - compansative_view->reshape(compansative_view->getRect().getWidth() + compensative_delta_width, compansative_view->getRect().getHeight() ); - if (compansative_view) log(compansative_view, "after applying compensative width: "); - lldebugs << compensative_delta_width << llendl; + log(mChicletPanel, "after nearby was processed"); - } - } } - // bottom tray is widen - else + + S32 buttons_freed_width = 0; + if (still_should_be_processed) { - processWidthIncreased(delta_width); - } + processHideButton(RS_BUTTON_SNAPSHOT, &delta_width, &buttons_freed_width); - lldebugs << "New resize state: " << mResizeState << llendl; -} + if (delta_width < 0) + { + processHideButton(RS_BUTTON_CAMERA, &delta_width, &buttons_freed_width); + } -void LLBottomTray::processWidthDecreased(S32 delta_width) -{ + if (delta_width < 0) + { + processHideButton(RS_BUTTON_MOVEMENT, &delta_width, &buttons_freed_width); + } + if (delta_width < 0) + { + processHideButton(RS_BUTTON_GESTURES, &delta_width, &buttons_freed_width); + } + + if (delta_width < 0) + { + llwarns << "WARNING: there is no enough room for bottom tray, resizing still should be processed" << llendl; + } + + if (buttons_freed_width > 0) + { + log(mNearbyChatBar, "before applying compensative width"); + mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() + buttons_freed_width, mNearbyChatBar->getRect().getHeight() ); + log(mNearbyChatBar, "after applying compensative width"); + lldebugs << buttons_freed_width << llendl; + } + } } void LLBottomTray::processWidthIncreased(S32 delta_width) @@ -591,9 +549,9 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) chatbar_shrink_width = chatbar_available_shrink_width; } - log(mNearbyChatBar, "increase width: before applying compensative width: "); + log(mNearbyChatBar, "increase width: before applying compensative width"); mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - chatbar_shrink_width, mNearbyChatBar->getRect().getHeight() ); - if (mNearbyChatBar) log(mNearbyChatBar, "after applying compensative width: "); + if (mNearbyChatBar) log(mNearbyChatBar, "after applying compensative width"); lldebugs << chatbar_shrink_width << llendl; // 3. use width available via decreasing of chiclet panel @@ -642,24 +600,42 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa *available_width -= required_width; *buttons_required_width += required_width; - switch (shown_object_type) - { - case RS_BUTTON_GESTURES: showGestureButton(true); break; - case RS_BUTTON_MOVEMENT: showMoveButton(true); break; - case RS_BUTTON_CAMERA: showCameraButton(true); break; - case RS_BUTTON_SNAPSHOT: showSnapshotButton(true); break; - default: - llwarns << "Unexpected type of button to be shown: " << shown_object_type << llendl; - } + showTrayButton(shown_object_type, true); lldebugs << "processing object type: " << shown_object_type - << ", buttons_required_width: " << buttons_required_width + << ", buttons_required_width: " << *buttons_required_width << llendl; } } return can_be_shown; } +void LLBottomTray::processHideButton(EResizeState shown_object_type, S32* required_width, S32* buttons_freed_width) +{ + LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; + if (NULL == panel) + { + lldebugs << "There is no object to process for state: " << shown_object_type << llendl; + return; + } + + if (panel->getVisible()) + { + *required_width += panel->getRect().getWidth(); + + if (*required_width > 0) + { + *buttons_freed_width += *required_width; + } + + showTrayButton(shown_object_type, false); + + lldebugs << "processing object type: " << shown_object_type + << ", buttons_freed_width: " << *buttons_freed_width + << llendl; + } +} + bool LLBottomTray::canButtonBeShown(LLPanel* panel) const { bool can_be_shown = !panel->getVisible(); @@ -677,4 +653,16 @@ void LLBottomTray::initStateProcessedObjectMap() mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, mCamPanel)); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, mSnapshotPanel)); } + +void LLBottomTray::showTrayButton(EResizeState shown_object_type, bool visible) +{ + LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; + if (NULL == panel) + { + lldebugs << "There is no object to show for state: " << shown_object_type << llendl; + return; + } + + panel->setVisible(visible); +} //EOF diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 6509fea63d..2972a2b1ac 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -102,8 +102,10 @@ private: void processWidthIncreased(S32 delta_width); void log(LLView* panel, const std::string& descr); bool processShowButton(EResizeState shown_object_type, S32* available_width, S32* buttons_required_width); + void processHideButton(EResizeState shown_object_type, S32* required_width, S32* buttons_freed_width); bool canButtonBeShown(LLPanel* panel) const; void initStateProcessedObjectMap(); + void showTrayButton(EResizeState shown_object_type, bool visible); MASK mResizeState; -- cgit v1.2.3 From eddda09e1da61a5958edd7af42a931f7ffb26e4b Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Thu, 12 Nov 2009 17:54:22 +0200 Subject: Fixed Major sub-task EXT-2398-Mini inspector should be opened by DOUBLE-click on the IM message header not by single-click --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index d1922cfd6e..43a1aeaefb 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -131,7 +131,7 @@ public: menu = LLUICtrlFactory::getInstance()->createFromFile("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mPopupMenuHandleObject = menu->getHandle(); - setMouseDownCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4)); + setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4)); return LLPanel::postBuild(); } -- cgit v1.2.3 From e8c3eb438ca113b123d640755588fb0705c2bdb0 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 12 Nov 2009 18:15:17 +0200 Subject: Fixed minor bug EXT-1499 (Finalize the Home panel and add tooltips to the tab grabs)- changed one icon I forgot about in yesterday's fix. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml index 9636e32187..566fc95230 100644 --- a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml +++ b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml @@ -227,7 +227,7 @@ right="-10" top="10" width="20" - image_name="TabIcon_Inventory_Selected"/> + image_name="TabIcon_Things_Selected"/> Date: Thu, 12 Nov 2009 18:48:02 +0200 Subject: fixed major bugs (EXT-2392) No "login" toast appears with overall number of unresolved interactive notifications (EXT-2391) Notifications overflow toast is broken --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 4 ++-- indra/newview/llscreenchannel.cpp | 5 ---- indra/newview/skins/default/xui/en/panel_toast.xml | 28 ++++++---------------- 3 files changed, 9 insertions(+), 28 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 15c9499bbc..38f14793d9 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3563,7 +3563,7 @@ Type S32 Value - 400 + 305 HelpUseLocal @@ -4895,7 +4895,7 @@ Type S32 Value - 350 + 305 NotificationToastLifeTime diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index b667fbf5fd..8825a64853 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -456,7 +456,6 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer) mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::closeOverflowToastPanel, this)); LLTextBox* text_box = mOverflowToastPanel->getChild("toast_text"); - LLIconCtrl* icon = mOverflowToastPanel->getChild("icon"); std::string text = llformat(mOverflowFormatString.c_str(),mHiddenToastsNum); if(mHiddenToastsNum == 1) { @@ -474,7 +473,6 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer) text_box->setValue(text); text_box->setVisible(TRUE); - icon->setVisible(TRUE); mOverflowToastPanel->setVisible(TRUE); } @@ -532,7 +530,6 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer) mStartUpToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onStartUpToastHide, this)); LLTextBox* text_box = mStartUpToastPanel->getChild("toast_text"); - LLIconCtrl* icon = mStartUpToastPanel->getChild("icon"); std::string mStartUpFormatString; @@ -555,8 +552,6 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer) text_box->setValue(text); text_box->setVisible(TRUE); - icon->setVisible(TRUE); - addChild(mStartUpToastPanel); mStartUpToastPanel->setVisible(TRUE); diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml index 7f7777586c..f16329f8d7 100644 --- a/indra/newview/skins/default/xui/en/panel_toast.xml +++ b/indra/newview/skins/default/xui/en/panel_toast.xml @@ -1,7 +1,7 @@ - + - - + top="5" + width="260"> Toast text; - --> + + + + + - + + thumb_image_disabled="SliderThumb_Disabled" + track_image_horizontal="SliderTrack_Horiz" + track_image_vertical="SliderTrack_Vert" + track_highlight_horizontal_image="SliderTrack_Horiz" + track_highlight_vertical_image="SliderTrack_Vert" /> -- cgit v1.2.3 From 978dd80c963911372b0d311fec01b9d4de279c11 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 12 Nov 2009 19:54:45 +0200 Subject: Implemented major sub-task EXT-2364 (Items in group/ad-hoc IM participant list (avatar names) should be reshaped when adding/removing the "(Moderator)" label) --HG-- branch : product-engine --- indra/newview/llavatarlistitem.cpp | 15 +++++++++++++++ indra/newview/llavatarlistitem.h | 2 ++ indra/newview/llparticipantlist.cpp | 2 ++ 3 files changed, 19 insertions(+) diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 7df278d887..c670a65bcc 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -311,3 +311,18 @@ void LLAvatarListItem::onNameCache(const std::string& first_name, const std::str mAvatarName->setValue(name); mAvatarName->setToolTip(name); } + +void LLAvatarListItem::reshapeAvatarName() +{ + S32 width_delta = 0; + width_delta += mShowProfileBtn ? mProfileBtnWidth : 0; + width_delta += mSpeakingIndicator->getVisible() ? mSpeakingIndicatorWidth : 0; + width_delta += mAvatarIcon->getVisible() ? mIconWidth : 0; + width_delta += mShowInfoBtn ? mInfoBtnWidth : 0; + width_delta += mLastInteractionTime->getVisible() ? mLastInteractionTime->getRect().getWidth() : 0; + + S32 height = mAvatarName->getRect().getHeight(); + S32 width = getRect().getWidth() - width_delta; + + mAvatarName->reshape(width, height); +} diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index d379797a46..9d48101a44 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -82,6 +82,8 @@ public: void setContextMenu(ContextMenu* menu) { mContextMenu = menu; } + void reshapeAvatarName(); + private: typedef enum e_online_status { diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index f5367c0477..13bd059d45 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -130,6 +130,7 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) { name.erase(found, moderator_indicator_len); item->setName(name); + item->reshapeAvatarName(); } } } @@ -151,6 +152,7 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) name += " "; name += moderator_indicator; item->setName(name); + item->reshapeAvatarName(); } } } -- cgit v1.2.3 From 74d5a6605bac7ae76889ce3697fc8f59d982d675 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 12 Nov 2009 20:23:43 +0200 Subject: Fixed normal bug EXT-2375 (Nearby Chat: Click on object name spawns Person Inspector instead of Object Inspector) --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 43a1aeaefb..046e1d92dc 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -167,7 +167,15 @@ public: void onHeaderPanelClick(S32 x, S32 y, MASK mask) { - LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", mAvatarID)); + if (mSourceType == CHAT_SOURCE_OBJECT) + { + LLFloaterReg::showInstance("inspect_object", LLSD().insert("object_id", mAvatarID)); + } + else if (mSourceType == CHAT_SOURCE_AGENT) + { + LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", mAvatarID)); + } + //if chat source is system, you may add "else" here to define behaviour. } const LLUUID& getAvatarId () const { return mAvatarID;} -- cgit v1.2.3