summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-10-05 23:41:22 +0000
committerJames Cook <james@lindenlab.com>2009-10-05 23:41:22 +0000
commit5749dd152b84488606ff70572a5cf825954835ec (patch)
tree6fae6b06f54776a907ce6e3399238c9135c52e53
parent0e753a281ec3c3f100c057d3ee9de479005511ef (diff)
EXT-670 Kill Calling Cards tab in "Resident chooser". Reviewed with Kelly.
-rw-r--r--indra/newview/llfloateravatarpicker.cpp60
-rw-r--r--indra/newview/llfloateravatarpicker.h6
-rw-r--r--indra/newview/skins/default/xui/en/floater_avatar_picker.xml33
3 files changed, 3 insertions, 96 deletions
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 91b9bcfe72..890d863db7 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -37,20 +37,15 @@
#include "llagent.h"
#include "llfocusmgr.h"
#include "llfloaterreg.h"
-#include "llfloaterinventory.h"
-#include "llfoldervieweventlistener.h"
-#include "llinventorymodel.h"
#include "llviewercontrol.h"
#include "llworld.h"
// Linden libraries
-#include "llbutton.h"
#include "lllineeditor.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
#include "llscrolllistcell.h"
#include "lltabcontainer.h"
-#include "lltextbox.h"
#include "lluictrlfactory.h"
#include "message.h"
@@ -117,13 +112,6 @@ BOOL LLFloaterAvatarPicker::postBuild()
getChild<LLScrollListCtrl>("SearchResults")->setCommentText(getString("no_results"));
- LLInventoryPanel* inventory_panel = getChild<LLInventoryPanel>("InventoryPanel");
- inventory_panel->setFilterTypes(0x1 << LLInventoryType::IT_CALLINGCARD);
- inventory_panel->setFollowsAll();
- inventory_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
- inventory_panel->openDefaultFolderForType(LLAssetType::AT_CALLINGCARD);
- inventory_panel->setSelectCallback(boost::bind(&LLFloaterAvatarPicker::doCallingCardSelectionChange, this, _1, _2));
-
getChild<LLTabContainer>("ResidentChooserTabs")->setCommitCallback(
boost::bind(&LLFloaterAvatarPicker::onTabChanged, this));
@@ -173,11 +161,7 @@ void LLFloaterAvatarPicker::onBtnSelect(void* userdata)
{
LLPanel* active_panel = self->childGetVisibleTab("ResidentChooserTabs");
- if(active_panel == self->getChild<LLPanel>("CallingCardsPanel"))
- {
- self->mCallback(self->mSelectedInventoryAvatarNames, self->mSelectedInventoryAvatarIDs, self->mCallbackUserdata);
- }
- else if(active_panel == self->getChild<LLPanel>("SearchPanel"))
+ if(active_panel == self->getChild<LLPanel>("SearchPanel"))
{
std::vector<std::string> avatar_names;
std::vector<LLUUID> avatar_ids;
@@ -192,7 +176,6 @@ void LLFloaterAvatarPicker::onBtnSelect(void* userdata)
self->mCallback(avatar_names, avatar_ids, self->mCallbackUserdata);
}
}
- self->getChild<LLInventoryPanel>("InventoryPanel")->setSelection(LLUUID::null, FALSE);
self->getChild<LLScrollListCtrl>("SearchResults")->deselectAllItems(TRUE);
self->getChild<LLScrollListCtrl>("NearMe")->deselectAllItems(TRUE);
if(self->mCloseOnSelect)
@@ -235,40 +218,6 @@ void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata)
}
}
-// Callback for inventory picker (select from calling cards)
-void LLFloaterAvatarPicker::doCallingCardSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
-{
- bool panel_active = (childGetVisibleTab("ResidentChooserTabs") == getChild<LLPanel>("CallingCardsPanel"));
-
- mSelectedInventoryAvatarIDs.clear();
- mSelectedInventoryAvatarNames.clear();
-
- if (panel_active)
- {
- childSetEnabled("Select", FALSE);
- }
-
- std::deque<LLFolderViewItem*>::const_iterator item_it;
- for (item_it = items.begin(); item_it != items.end(); ++item_it)
- {
- LLFolderViewEventListener* listenerp = (*item_it)->getListener();
- if (listenerp->getInventoryType() == LLInventoryType::IT_CALLINGCARD)
- {
- LLInventoryItem* item = gInventory.getItem(listenerp->getUUID());
- if (item)
- {
- mSelectedInventoryAvatarIDs.push_back(item->getCreatorUUID());
- mSelectedInventoryAvatarNames.push_back(listenerp->getName());
- }
- }
- }
-
- if (panel_active)
- {
- childSetEnabled("Select", visibleItemsSelected());
- }
-}
-
void LLFloaterAvatarPicker::populateNearMe()
{
BOOL all_loaded = TRUE;
@@ -336,10 +285,6 @@ BOOL LLFloaterAvatarPicker::visibleItemsSelected() const
{
return getChild<LLScrollListCtrl>("SearchResults")->getFirstSelectedIndex() >= 0;
}
- else if(active_panel == getChild<LLPanel>("CallingCardsPanel"))
- {
- return mSelectedInventoryAvatarIDs.size() > 0;
- }
else if(active_panel == getChild<LLPanel>("NearMePanel"))
{
return getChild<LLScrollListCtrl>("NearMe")->getFirstSelectedIndex() >= 0;
@@ -349,7 +294,7 @@ BOOL LLFloaterAvatarPicker::visibleItemsSelected() const
void LLFloaterAvatarPicker::find()
{
- const std::string& text = childGetValue("Edit").asString();
+ std::string text = childGetValue("Edit").asString();
mQueryID.generate();
@@ -375,7 +320,6 @@ void LLFloaterAvatarPicker::find()
void LLFloaterAvatarPicker::setAllowMultiple(BOOL allow_multiple)
{
getChild<LLScrollListCtrl>("SearchResults")->setAllowMultipleSelection(allow_multiple);
- getChild<LLInventoryPanel>("InventoryPanel")->setAllowMultiSelect(allow_multiple);
getChild<LLScrollListCtrl>("NearMe")->setAllowMultipleSelection(allow_multiple);
}
diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h
index 63896bef9f..f3b9aefb9c 100644
--- a/indra/newview/llfloateravatarpicker.h
+++ b/indra/newview/llfloateravatarpicker.h
@@ -37,7 +37,6 @@
#include <vector>
-
class LLFloaterAvatarPicker : public LLFloater
{
public:
@@ -57,7 +56,6 @@ public:
static void processAvatarPickerReply(class LLMessageSystem* msg, void**);
private:
-
static void editKeystroke(class LLLineEditor* caller, void* user_data);
static void onBtnFind(void* userdata);
@@ -68,8 +66,6 @@ private:
static void onList(class LLUICtrl* ctrl, void* userdata);
void onTabChanged();
- void doCallingCardSelectionChange(const std::deque<class LLFolderViewItem*> &items, BOOL user_action);
-
void populateNearMe();
BOOL visibleItemsSelected() const; // Returns true if any items in the current tab are selected.
@@ -79,8 +75,6 @@ private:
virtual void draw();
virtual BOOL handleKeyHere(KEY key, MASK mask);
- std::vector<LLUUID> mSelectedInventoryAvatarIDs;
- std::vector<std::string> mSelectedInventoryAvatarNames;
LLUUID mQueryID;
BOOL mResultsReturned;
BOOL mNearMeListComplete;
diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
index f76e4acbc9..e1f8011cbe 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
@@ -84,38 +84,7 @@
top="52"
width="132" />
</panel>
- <panel
- border="true"
- height="150"
- label="Calling Cards"
- layout="topleft"
- left_delta="-1"
- name="CallingCardsPanel"
- top_delta="134"
- width="135">
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="InstructSelectCallingCard"
- top="8"
- width="220">
- Select a calling card:
- </text>
- <inventory_panel
- allow_multi_select="false"
- border="true"
- follows="left|top|right|bottom"
- height="110"
- layout="topleft"
- left_delta="0"
- name="InventoryPanel"
- top_pad="7"
- width="115" />
- </panel>
+
<panel
border="none"
height="150"