diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llaccordionctrl.cpp | 17 | ||||
-rw-r--r-- | indra/llui/llaccordionctrl.h | 2 | ||||
-rw-r--r-- | indra/newview/llgroupactions.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llgroupactions.h | 2 | ||||
-rw-r--r-- | indra/newview/llgrouplist.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llgrouplist.h | 2 | ||||
-rw-r--r-- | indra/newview/llpanelgroup.cpp | 9 | ||||
-rw-r--r-- | indra/newview/skins/default/textures/icons/Group_Notices.png | bin | 0 -> 3502 bytes | |||
-rw-r--r-- | indra/newview/skins/default/textures/textures.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_list_item.xml | 16 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_list_item_short.xml | 14 |
11 files changed, 77 insertions, 5 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 809d72208f..d0146910b6 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -936,3 +936,20 @@ S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 availabl expanded_tab_height /= num_expanded; return expanded_tab_height; } + +void LLAccordionCtrl::collapseAllTabs() +{ + if (mAccordionTabs.size() > 0) + { + for (size_t i = 0; i < mAccordionTabs.size(); ++i) + { + LLAccordionCtrlTab *tab = mAccordionTabs[i]; + + if (tab->getDisplayChildren()) + { + tab->setDisplayChildren(false); + } + } + arrange(); + } +} diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h index 2828254472..cc49ac8086 100644 --- a/indra/llui/llaccordionctrl.h +++ b/indra/llui/llaccordionctrl.h @@ -122,6 +122,8 @@ public: void setComparator(const LLTabComparator* comp) { mTabComparator = comp; } void sort(); + void collapseAllTabs(); + /** * Sets filter substring as a search_term for help text when there are no any visible tabs. */ diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index b588d6eaa1..5db8424b99 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -398,7 +398,7 @@ void LLGroupActions::inspect(const LLUUID& group_id) } // static -void LLGroupActions::show(const LLUUID& group_id) +void LLGroupActions::show(const LLUUID &group_id, bool expand_notices_tab) { if (group_id.isNull()) return; @@ -406,6 +406,10 @@ void LLGroupActions::show(const LLUUID& group_id) LLSD params; params["group_id"] = group_id; params["open_tab_name"] = "panel_group_info_sidetray"; + if (expand_notices_tab) + { + params["action"] = "show_notices"; + } LLFloaterSidePanelContainer::showPanel("people", "panel_group_info_sidetray", params); LLFloater *floater = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>("people"); diff --git a/indra/newview/llgroupactions.h b/indra/newview/llgroupactions.h index afc4686dd7..44513199c1 100644 --- a/indra/newview/llgroupactions.h +++ b/indra/newview/llgroupactions.h @@ -57,7 +57,7 @@ public: /** * Show group information panel. */ - static void show(const LLUUID& group_id); + static void show(const LLUUID& group_id, bool expand_notices_tab = false); /** * Show group inspector floater. diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 32af2592d3..d137440547 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -303,6 +303,7 @@ void LLGroupList::addNewItem(const LLUUID& id, const std::string& name, const LL item->getChildView("info_btn")->setVisible( false); item->getChildView("profile_btn")->setVisible( false); + item->getChildView("notices_btn")->setVisible(false); item->setGroupIconVisible(mShowIcons); if (!mShowIcons) { @@ -403,6 +404,7 @@ mGroupIcon(NULL), mGroupNameBox(NULL), mInfoBtn(NULL), mProfileBtn(NULL), +mNoticesBtn(NULL), mVisibilityHideBtn(NULL), mVisibilityShowBtn(NULL), mGroupID(LLUUID::null), @@ -435,6 +437,9 @@ BOOL LLGroupListItem::postBuild() mProfileBtn = getChild<LLButton>("profile_btn"); mProfileBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onProfileBtnClick(); }); + mNoticesBtn = getChild<LLButton>("notices_btn"); + mNoticesBtn->setClickedCallback([this](LLUICtrl *, const LLSD &) { onNoticesBtnClick(); }); + mVisibilityHideBtn = findChild<LLButton>("visibility_hide_btn"); if (mVisibilityHideBtn) { @@ -470,6 +475,7 @@ void LLGroupListItem::onMouseEnter(S32 x, S32 y, MASK mask) { mInfoBtn->setVisible(true); mProfileBtn->setVisible(true); + mNoticesBtn->setVisible(true); if (mForAgent && mVisibilityHideBtn) { LLGroupData agent_gdatap; @@ -489,6 +495,7 @@ void LLGroupListItem::onMouseLeave(S32 x, S32 y, MASK mask) getChildView("hovered_icon")->setVisible( false); mInfoBtn->setVisible(false); mProfileBtn->setVisible(false); + mNoticesBtn->setVisible(false); if (mVisibilityHideBtn) { mVisibilityHideBtn->setVisible(false); @@ -583,6 +590,11 @@ void LLGroupListItem::onProfileBtnClick() LLGroupActions::show(mGroupID); } +void LLGroupListItem::onNoticesBtnClick() +{ + LLGroupActions::show(mGroupID, true); +} + void LLGroupListItem::onVisibilityBtnClick(bool new_visibility) { LLGroupData agent_gdatap; diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index 5cbabb712f..1bc2caff33 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -123,6 +123,7 @@ private: void setBold(bool bold); void onInfoBtnClick(); void onProfileBtnClick(); + void onNoticesBtnClick(); void onVisibilityBtnClick(bool new_visibility); LLTextBox* mGroupNameBox; @@ -130,6 +131,7 @@ private: LLGroupIconCtrl* mGroupIcon; LLButton* mInfoBtn; LLButton* mProfileBtn; + LLButton* mNoticesBtn; LLButton* mVisibilityHideBtn; LLButton* mVisibilityShowBtn; diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index ab255d5215..57742f16a7 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -134,6 +134,15 @@ void LLPanelGroup::onOpen(const LLSD& key) if(panel_notices) panel_notices->refreshNotices(); } + if (str_action == "show_notices") + { + setGroupID(group_id); + + LLAccordionCtrl *tab_ctrl = getChild<LLAccordionCtrl>("groups_accordion"); + tab_ctrl->collapseAllTabs(); + getChild<LLAccordionCtrlTab>("group_notices_tab")->setDisplayChildren(true); + tab_ctrl->arrange(); + } } diff --git a/indra/newview/skins/default/textures/icons/Group_Notices.png b/indra/newview/skins/default/textures/icons/Group_Notices.png Binary files differnew file mode 100644 index 0000000000..601502d374 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Group_Notices.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index aa99fe38cd..615816ed99 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -239,6 +239,8 @@ with the same filename but different name <texture name="Generic_Person" file_name="icons/Generic_Person.png" preload="false" /> <texture name="Generic_Person_Large" file_name="icons/Generic_Person_Large.png" preload="false" /> + <texture name="Group_Notices" file_name="icons/Group_Notices.png" preload="false" /> + <texture name="Hand" file_name="icons/hand.png" preload="false" /> <texture name="Help_Press" file_name="navbar/Help_Press.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item.xml b/indra/newview/skins/default/xui/en/panel_group_list_item.xml index e758a8ce30..c8b165e869 100644 --- a/indra/newview/skins/default/xui/en/panel_group_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_group_list_item.xml @@ -49,6 +49,18 @@ value="Unknown" width="242" /> <button + name="notices_btn" + tool_tip="Group Notices" + top_delta="-4" + left_pad="3" + right="-53" + height="20" + width="20" + follows="right" + image_pressed="Group_Notices" + image_unselected="Group_Notices" + tab_stop="false"/> + <button follows="right" height="16" image_pressed="Info_Press" @@ -58,7 +70,7 @@ name="info_btn" tool_tip="More info" tab_stop="false" - top_delta="-2" + top_delta="2" width="16" /> <!--*TODO: Should only appear on rollover--> <button @@ -71,6 +83,6 @@ name="profile_btn" tab_stop="false" tool_tip="View profile" - top_delta="-2" + top_delta="0" width="20" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml b/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml index b72af7221e..042a5f388b 100644 --- a/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml +++ b/indra/newview/skins/default/xui/en/panel_group_list_item_short.xml @@ -54,9 +54,21 @@ use_ellipses="true" /> <button + name="notices_btn" + tool_tip="Group Notices" + top_delta="-4" + left_pad="3" + right="-80" + height="20" + width="20" + follows="right" + image_pressed="Group_Notices" + image_unselected="Group_Notices" + tab_stop="false"/> + <button name="visibility_hide_btn" tool_tip="Hide group on my profile" - top_delta="-3" + top_delta="0" left_pad="3" right="-53" height="20" |