diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llconversationmodel.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llconversationmodel.h | 2 | ||||
-rw-r--r-- | indra/newview/llconversationview.cpp | 32 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 22 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_conversation_list_item.xml | 22 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml | 9 |
6 files changed, 56 insertions, 36 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index fa49987d15..51a37fe856 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -101,6 +101,11 @@ LLConversationItemSession::LLConversationItemSession(const LLUUID& uuid, LLFolde { } +bool LLConversationItemSession::hasChildren() const +{ + return getChildrenCount() > 0; +} + void LLConversationItemSession::addParticipant(LLConversationItemParticipant* participant) { addChild(participant); diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 26c7a29d76..e5c727feae 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -120,6 +120,8 @@ public: LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItemSession() {} + /*virtual*/ bool hasChildren() const; + void setSessionID(const LLUUID& session_id) { mUUID = session_id; mNeedsRefresh = true; } void addParticipant(LLConversationItemParticipant* participant); void removeParticipant(LLConversationItemParticipant* participant); diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 514bf38b00..53971a3159 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -35,12 +35,13 @@ // // Implementation of conversations list session widgets // +static LLDefaultChildRegistry::Register<LLConversationViewSession> r_conversation_view_session("conversation_view_session"); LLConversationViewSession::Params::Params() : container() {} -LLConversationViewSession::LLConversationViewSession( const LLConversationViewSession::Params& p ): +LLConversationViewSession::LLConversationViewSession(const LLConversationViewSession::Params& p): LLFolderViewFolder(p), mContainer(p.container), mItemPanel(NULL), @@ -65,6 +66,8 @@ BOOL LLConversationViewSession::postBuild() void LLConversationViewSession::draw() { +// *TODO Seth PE: remove the code duplicated from LLFolderViewFolder::draw() +// ***** LLFolderViewFolder::draw() code begin ***** if (mAutoOpenCountdown != 0.f) { mControlLabelRotation = mAutoOpenCountdown * -90.f; @@ -77,7 +80,10 @@ void LLConversationViewSession::draw() { mControlLabelRotation = lerp(mControlLabelRotation, 0.f, LLCriticalDamp::getInterpolant(0.025f)); } +// ***** LLFolderViewFolder::draw() code end ***** +// *TODO Seth PE: remove the code duplicated from LLFolderViewItem::draw() +// ***** LLFolderViewItem::draw() code begin ***** const LLColor4U DEFAULT_WHITE(255, 255, 255); static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); @@ -190,10 +196,27 @@ void LLConversationViewSession::draw() } mDragAndDropTarget = FALSE; } +// ***** LLFolderViewItem::draw() code end ***** - LLView::draw(); + // draw children if root folder, or any other folder that is open or animating to closed state + bool draw_children = getRoot() == static_cast<LLFolderViewFolder*>(this) + || isOpen() + || mCurHeight != mTargetHeight; - mExpanderHighlighted = FALSE; + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end();) + { + folders_t::iterator fit = iter++; + (*fit)->setVisible(draw_children); + } + for (items_t::iterator iter = mItems.begin(); + iter != mItems.end();) + { + items_t::iterator iit = iter++; + (*iit)->setVisible(draw_children); + } + + LLView::draw(); } // virtual @@ -203,8 +226,7 @@ S32 LLConversationViewSession::arrange(S32* width, S32* height) getLocalRect().mTop, getLocalRect().mRight, getLocalRect().mTop - getItemHeight()); - mItemPanel->setRect(rect); - mItemPanel->reshape(rect.getWidth(), rect.getHeight()); + mItemPanel->setShape(rect); return LLFolderViewFolder::arrange(width, height); } diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 9157d16aea..79009942bf 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -132,7 +132,7 @@ BOOL LLIMFloaterContainer::postBuild() p.root = NULL; mConversationsRoot = LLUICtrlFactory::create<LLFolderView>(p); - // Scroller + // a scroller for folder view LLRect scroller_view_rect = mConversationsListPanel->getRect(); scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); LLScrollContainer::Params scroller_params(LLUICtrlFactory::getDefaultParams<LLFolderViewScrollContainer>()); @@ -639,10 +639,7 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid) // Add a new conversation widget to the root folder of the folder view widget->addToFolder(mConversationsRoot); - - // Add it to the UI -// mConversationsListPanel->addChild(widget); - widget->setVisible(TRUE); + widget->requestArrange(); // Create the participants widgets now // Note: usually, we do not get an updated avatar list at that point @@ -654,16 +651,8 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid) LLConversationItem* participant_model = dynamic_cast<LLConversationItem*>(*current_participant_model); LLConversationViewParticipant* participant_view = createConversationViewParticipant(participant_model); participant_view->addToFolder(widget); -// mConversationsListPanel->addChild(participant_view); -// participant_view->setVisible(TRUE); current_participant_model++; } - - S32 width = 0; - S32 height = 0; - mConversationsRoot->arrange(&width, &height); - -// repositioningWidgets(); return; } @@ -683,8 +672,6 @@ void LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool c // Suppress the conversation items and widgets from their respective maps mConversationsItems.erase(uuid); mConversationsWidgets.erase(uuid); - - repositioningWidgets(); // Don't let the focus fall IW, select and refocus on the first conversation in the list if (change_focus) @@ -704,13 +691,8 @@ LLConversationViewSession* LLIMFloaterContainer::createConversationItemWidget(LL LLConversationViewSession::Params params; params.name = item->getDisplayName(); - //params.icon = bridge->getIcon(); - //params.icon_open = bridge->getOpenIcon(); - //params.creation_date = bridge->getCreationDate(); - params.item_height = 24; params.root = mConversationsRoot; params.listener = item; - params.rect = LLRect (0, 0, 0, 0); params.tool_tip = params.name; params.container = this; diff --git a/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml b/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml index d1f25b45fe..375ea79ebe 100644 --- a/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_conversation_list_item.xml @@ -3,8 +3,8 @@ follows="left|top|right" height="24" layout="topleft" - mouse_opaque="flase" name="conversation_list_item" + mouse_opaque="false" width="120"> <avatar_icon follows="top|left" @@ -12,7 +12,6 @@ default_icon_name="Generic_Person" layout="topleft" left="5" - mouse_opaque="true" top="2" width="20" /> <layout_stack @@ -21,7 +20,8 @@ height="24" layout="topleft" left_pad="5" - name="caonversation_item_stack" + mouse_opaque="false" + name="conversation_item_stack" orientation="horizontal" top="0" width="90"> @@ -29,6 +29,7 @@ auto_resize="false" user_resize="false" height="24" + mouse_opaque="false" name="call_icon_panel" visible="false" width="20"> @@ -44,13 +45,11 @@ </layout_panel> <layout_panel auto_resize="true" - user_resize="false" - left_pad="0" + user_resize="false" height="24" + mouse_opaque="false" name="conversation_title_panel" - min_dim="50" - width="70" - expanded_min_dim="50"> + width="70"> <text follows="left|top|right" font="SansSerifSmall" @@ -70,9 +69,10 @@ height="16" layout="topleft" left_pad="5" - mouse_opaque="true" - name="speaking_indicator" - width="20" /> + mouse_opaque="true" + name="speaking_indicator" + visible="false" + width="20" /> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml b/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml new file mode 100644 index 0000000000..f44731ea3d --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/conversation_view_session.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<conversation_view_session + folder_arrow_image="Folder_Arrow" + folder_indentation="8" + item_height="24" + item_top_pad="4" + selection_image="Rounded_Square" + mouse_opaque="true" + follows="left|top|right"/> |