From bde7830bf531245570d5754e71f5724ead72dfc1 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 19 Jan 2010 17:58:17 +0200 Subject: =?UTF-8?q?fixed=20EXT-4478=20=E2=80=9CMemory=20leak=20in=20LLChic?= =?UTF-8?q?letPanel=E2=80=9D,=20added=20destroying=20chiclet=20on=20chicle?= =?UTF-8?q?t=20panel=20item=20remove=20event;=20made=20LLIMChiclet=20destr?= =?UTF-8?q?uctor=20virtual;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 1 + indra/newview/llchiclet.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index f21fbbe6f5..1d739f07b1 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1297,6 +1297,7 @@ void LLChicletPanel::removeChiclet(chiclet_list_t::iterator it) mChicletList.erase(it); arrange(); + (*it)->die(); } void LLChicletPanel::removeChiclet(S32 index) diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index ae5b2148db..bb4846aa57 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -325,7 +325,7 @@ public: }; - /*virtual*/ ~LLIMChiclet() {}; + virtual ~LLIMChiclet() {}; /** * Sets IM session name. This name will be displayed in chiclet tooltip. -- cgit v1.2.3 From ac8f5e6f91dab3c3cb9c2fb2ed0274e71f17f1bb Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Tue, 19 Jan 2010 18:23:42 +0200 Subject: fix for low EXT-4464 There is no visual indication of current selection while traversing Group Profile accordion using keyboard actually that was done for some reason... but I really really really don't understand them --HG-- branch : product-engine --- indra/llui/llaccordionctrltab.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 9d6ba57c29..4bfe44135a 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -157,7 +157,8 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw() // because the user's mental model of focus is that it goes away after // the accordion is closed. if (getParent()->hasFocus() - && !(collapsible && !expanded)) + /*&& !(collapsible && !expanded)*/ // WHY?? + ) { mImageHeaderFocused->draw(0,0,width,height); } -- cgit v1.2.3 From a2d083f3ce7b490c88285410591dbcf3592609a2 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 19 Jan 2010 19:24:01 +0200 Subject: Fixed major bug EXT-4336 (Inspectors display groups as people). Added storing item type (avatar/group) in its value, so that we can choose the proper inspector. --HG-- branch : product-engine --- indra/newview/llnamelistctrl.cpp | 80 +++++++++++++++++++++++++++++----------- indra/newview/llnamelistctrl.h | 5 ++- 2 files changed, 62 insertions(+), 23 deletions(-) (limited to 'indra') diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 7e6145f578..6375362ae2 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -74,12 +74,12 @@ void LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos, { //llinfos << "LLNameListCtrl::addNameItem " << agent_id << llendl; - std::string fullname; - gCacheName->getFullName(agent_id, fullname); - - fullname.append(suffix); + NameItem item; + item.value = agent_id; + item.enabled = enabled; + item.target = INDIVIDUAL; - addStringUUIDItem(fullname, agent_id, pos, enabled); + addNameItemRow(item, pos); } // virtual, public @@ -130,11 +130,12 @@ BOOL LLNameListCtrl::handleDragAndDrop( return handled; } -void LLNameListCtrl::showAvatarInspector(const LLUUID& avatar_id) +void LLNameListCtrl::showInspector(const LLUUID& avatar_id, bool is_group) { - LLSD key; - key["avatar_id"] = avatar_id; - LLFloaterReg::showInstance("inspect_avatar", key); + if (is_group) + LLFloaterReg::showInstance("inspect_group", LLSD().with("group_id", avatar_id)); + else + LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", avatar_id)); } //virtual @@ -147,7 +148,7 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask) && column_index == mNameColumnIndex) { // ...this is the column with the avatar name - LLUUID avatar_id = hit_item->getValue().asUUID(); + LLUUID avatar_id = getItemId(hit_item); if (avatar_id.notNull()) { // ...valid avatar id @@ -164,9 +165,12 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask) LLCoordGL pos( sticky_rect.mRight - 16, sticky_rect.mTop ); LLPointer icon = LLUI::getUIImage("Info_Small"); + // Should we show a group or an avatar inspector? + bool is_group = hit_item->getValue()["is_group"].asBoolean(); + LLToolTip::Params params; params.background_visible( false ); - params.click_callback( boost::bind(&LLNameListCtrl::showAvatarInspector, this, avatar_id) ); + params.click_callback( boost::bind(&LLNameListCtrl::showInspector, this, avatar_id, is_group) ); params.delay_time(0.0f); // spawn instantly on hover params.image( icon ); params.message(""); @@ -220,9 +224,22 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& element, EAddPosition p } -LLScrollListItem* LLNameListCtrl::addNameItemRow(const LLNameListCtrl::NameItem& name_item, EAddPosition pos) +LLScrollListItem* LLNameListCtrl::addNameItemRow( + const LLNameListCtrl::NameItem& name_item, + EAddPosition pos, + std::string& suffix) { - LLScrollListItem* item = LLScrollListCtrl::addRow(name_item, pos); + LLUUID id = name_item.value().asUUID(); + LLScrollListItem* item = NULL; + + // Store item type so that we can invoke the proper inspector. + // *TODO Vadim: Is there a more proper way of storing additional item data? + { + LLNameListCtrl::NameItem name_item_(name_item); + name_item_.value = LLSD().with("uuid", id).with("is_group", name_item.target() == GROUP); + item = LLScrollListCtrl::addRow(name_item_, pos); + } + if (!item) return NULL; // use supplied name by default @@ -230,7 +247,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(const LLNameListCtrl::NameItem& switch(name_item.target) { case GROUP: - gCacheName->getGroupName(name_item.value().asUUID(), fullname); + gCacheName->getGroupName(id, fullname); // fullname will be "nobody" if group not found break; case SPECIAL: @@ -239,7 +256,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(const LLNameListCtrl::NameItem& case INDIVIDUAL: { std::string name; - if (gCacheName->getFullName(name_item.value().asUUID(), name)) + if (gCacheName->getFullName(id, name)) { fullname = name; } @@ -249,6 +266,12 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(const LLNameListCtrl::NameItem& break; } + // Append optional suffix. + if (!suffix.empty()) + { + fullname.append(suffix); + } + LLScrollListCell* cell = item->getColumn(mNameColumnIndex); if (cell) { @@ -270,15 +293,24 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(const LLNameListCtrl::NameItem& // public void LLNameListCtrl::removeNameItem(const LLUUID& agent_id) { - BOOL item_exists = selectByID( agent_id ); - if(item_exists) + // Find the item specified with agent_id. + S32 idx = -1; + for (item_list::iterator it = getItemList().begin(); it != getItemList().end(); it++) { - S32 index = getItemIndex(getFirstSelected()); - if(index >= 0) + LLScrollListItem* item = *it; + if (getItemId(item) == agent_id) { - deleteSingleItem(index); + idx = getItemIndex(item); + break; } } + + // Remove it. + if (idx >= 0) + { + selectNthItem(idx); // not sure whether this is needed, taken from previous implementation + deleteSingleItem(idx); + } } // public @@ -303,7 +335,7 @@ void LLNameListCtrl::refresh(const LLUUID& id, const std::string& first, for (iter = getItemList().begin(); iter != getItemList().end(); iter++) { LLScrollListItem* item = *iter; - if (item->getUUID() == id) + if (getItemId(item) == id) { LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(0); cell = item->getColumn(mNameColumnIndex); @@ -343,3 +375,9 @@ void LLNameListCtrl::updateColumns() } } } + +// static +LLUUID LLNameListCtrl::getItemId(LLScrollListItem* item) +{ + return item->getValue()["uuid"].asUUID(); +} diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index d0f0ec4d21..192a3a5afa 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -94,7 +94,7 @@ public: void addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM); /*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL); - LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM); + LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, std::string& suffix = LLStringUtil::null); // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. @@ -121,7 +121,8 @@ public: /*virtual*/ void updateColumns(); private: - void showAvatarInspector(const LLUUID& avatar_id); + void showInspector(const LLUUID& avatar_id, bool is_group); + static LLUUID getItemId(LLScrollListItem* item); private: S32 mNameColumnIndex; -- cgit v1.2.3 From 1d9237e299e152c5a58f89be3da2f40e1e2d7338 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Tue, 19 Jan 2010 19:49:39 +0200 Subject: fixed bug EXT-4445 [BSI] Can start an IM session with myself and offer items via context menu in group chat participants list --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 2 +- indra/newview/skins/default/xui/en/menu_participant_list.xml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 0a180512ce..b049f914ad 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -582,7 +582,7 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(co bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata) { std::string item = userdata.asString(); - if (item == "can_mute_text" || "can_block" == item) + if (item == "can_mute_text" || "can_block" == item || "can_share" == item || "can_im" == item) { return mUUIDs.front() != gAgentID; } diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml index 31263fbea8..805ffbae66 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -47,6 +47,9 @@ name="IM"> + + Date: Tue, 19 Jan 2010 20:17:37 +0200 Subject: Fixed bug EXT-4471 (Group Profile Group Founder not Clickable). --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index 8188048821..5b0a7107e4 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -88,6 +88,7 @@ background_visible="true" initial_value="(retrieving)" layout="topleft" left_delta="0" + link="true" name="founder_name" top_pad="2" use_ellipses="true" -- cgit v1.2.3 From c9896ba504467117bf13a5f2d3526effc123212c Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 19 Jan 2010 20:21:08 +0200 Subject: Fixed name_box to display correct initial value (e.g. "Loading...") until the name is cached instead of a broken link "(nobody)". --HG-- branch : product-engine --- indra/newview/llnamebox.cpp | 13 ++++++++++--- indra/newview/llnamebox.h | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp index d434017804..cd810b9793 100644 --- a/indra/newview/llnamebox.cpp +++ b/indra/newview/llnamebox.cpp @@ -53,6 +53,7 @@ LLNameBox::LLNameBox(const Params& p) { mNameID = LLUUID::null; mLink = p.link; + mInitialValue = p.initial_value().asString(); LLNameBox::sInstances.insert(this); setText(LLStringUtil::null); } @@ -67,17 +68,23 @@ void LLNameBox::setNameID(const LLUUID& name_id, BOOL is_group) mNameID = name_id; std::string name; + BOOL got_name = FALSE; if (!is_group) { - gCacheName->getFullName(name_id, name); + got_name = gCacheName->getFullName(name_id, name); } else { - gCacheName->getGroupName(name_id, name); + got_name = gCacheName->getGroupName(name_id, name); } - setName(name, is_group); + // Got the name already? Set it. + // Otherwise it will be set later in refresh(). + if (got_name) + setName(name, is_group); + else + setText(mInitialValue); } void LLNameBox::refresh(const LLUUID& id, const std::string& firstname, diff --git a/indra/newview/llnamebox.h b/indra/newview/llnamebox.h index 0109525e85..48b54faec8 100644 --- a/indra/newview/llnamebox.h +++ b/indra/newview/llnamebox.h @@ -76,6 +76,7 @@ private: private: LLUUID mNameID; BOOL mLink; + std::string mInitialValue; }; -- cgit v1.2.3 From e57ab1e22500fdf4184fe2b2c9733984496dea53 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 19 Jan 2010 20:40:17 +0200 Subject: Made name boxes displaying an avatar's partner clickable and have a proper initial value. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_edit_profile.xml | 2 ++ indra/newview/skins/default/xui/en/panel_my_profile.xml | 1 + indra/newview/skins/default/xui/en/panel_profile.xml | 1 + 3 files changed, 4 insertions(+) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_edit_profile.xml b/indra/newview/skins/default/xui/en/panel_edit_profile.xml index 172cf18fc4..8268937e7f 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml @@ -304,8 +304,10 @@ Date: Tue, 19 Jan 2010 10:50:06 -0800 Subject: With great sadness, disable an assert that's firing. Add comment at to why. --- indra/newview/lltexlayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 72ef383be9..4a7d784c3e 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -1139,7 +1139,7 @@ LLTexLayerInterface::LLTexLayerInterface(const LLTexLayerInterface &layer, LLWea BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearable ) // This sets mInfo and calls initialization functions { - llassert(mInfo == NULL); + //llassert(mInfo == NULL); // nyx says this is probably bogus but needs investigating mInfo = info; //mID = info->mID; // No ID -- cgit v1.2.3 From 0650dc0b0a71888cad1efc3727b70fd963ad23c4 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Tue, 19 Jan 2010 13:52:59 -0500 Subject: EXT-4412 swap order of tabs on outfit editor panel Swapping back so "my outfits" is displayed first. Also changing code so that this change can be made in the future as a XUI-only change. Reviewed by Vir. --- indra/newview/llpaneloutfitsinventory.cpp | 3 +- .../default/xui/en/panel_outfits_inventory.xml | 42 +++++++++++++--------- 2 files changed, 27 insertions(+), 18 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index df73c27f54..fd5ce7a46d 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -569,8 +569,6 @@ void LLPanelOutfitsInventory::initTabPanels() myoutfits_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); mTabPanels[1] = myoutfits_panel; - mActivePanel = mTabPanels[0]; - for (tabpanels_vec_t::iterator iter = mTabPanels.begin(); iter != mTabPanels.end(); ++iter) @@ -581,6 +579,7 @@ void LLPanelOutfitsInventory::initTabPanels() mAppearanceTabs = getChild("appearance_tabs"); mAppearanceTabs->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::onTabChange, this)); + mActivePanel = (LLInventoryPanel*)mAppearanceTabs->getCurrentPanel(); } void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque &items, BOOL user_action) diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index fd540bdc7e..8895484326 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -21,22 +21,8 @@ halign="center" width="313"> - + +