summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofile.cpp
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2009-12-16 12:26:52 +0000
committerLynx Linden <lynx@lindenlab.com>2009-12-16 12:26:52 +0000
commit3eea3281af4277e9b0201dab60f6579b6140a9d0 (patch)
treefc5148a1dc33e5774736a88bb62676abd18de7af /indra/newview/llpanelprofile.cpp
parent88291b378eda6178ae3f2cbda60feddf0e68e3fa (diff)
DEV-44351: Add a new secondlife:///app/classified/create SLapp.
Also cleaned up the code for the existing app/classified/{UUID} support. Much nicer now.
Diffstat (limited to 'indra/newview/llpanelprofile.cpp')
-rw-r--r--indra/newview/llpanelprofile.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 3274820174..c73ade53c8 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -144,6 +144,7 @@ BOOL LLPanelProfile::postBuild()
void LLPanelProfile::onOpen(const LLSD& key)
{
+ // open the desired panel
if (key.has("open_tab_name"))
{
getTabContainer()[PANEL_PICKS]->onClosePanel();
@@ -155,6 +156,33 @@ void LLPanelProfile::onOpen(const LLSD& key)
{
getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId());
}
+
+ // support commands to open further pieces of UI
+ if (key.has("show_tab_panel"))
+ {
+ std::string panel = key["show_tab_panel"].asString();
+ if (panel == "create_classified")
+ {
+ LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
+ if (picks)
+ {
+ picks->createNewClassified();
+ }
+ }
+ else if (panel == "classified_details")
+ {
+ LLUUID classified_id = key["classified_id"].asUUID();
+ LLUUID avatar_id = key["classified_avatar_id"].asUUID();
+ LLUUID snapshot_id = key["classified_snapshot_id"].asUUID();
+ std::string name = key["classified_name"].asString();
+ std::string desc = key["classified_desc"].asString();
+ LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
+ if (picks)
+ {
+ picks->openClassifiedInfo(classified_id, avatar_id, snapshot_id, name, desc);
+ }
+ }
+ }
}
//*TODO redo panel toggling