diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-04 11:28:31 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-04 11:28:31 +0000 |
commit | 23877285636610ecf426dc4d40f358a6f2eb4c92 (patch) | |
tree | 6cfcd893db43a26355f2cb3c1ffc75f431a55530 | |
parent | 2c30ccf34d518ccedd0b3ffdeb2ba1da8d140a1d (diff) | |
parent | 879675d986e8167db880586598358e6a80147108 (diff) |
PE merge.
-rw-r--r-- | indra/newview/llgroupactions.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llpanelme.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llpanelprofile.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llpanelprofile.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 13 |
5 files changed, 46 insertions, 6 deletions
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 3653371d76..00e2365ffd 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -161,12 +161,17 @@ void LLGroupActions::join(const LLUUID& group_id) S32 cost = gdatap->mMembershipFee; LLSD args; args["COST"] = llformat("%d", cost); + args["NAME"] = gdatap->mName; LLSD payload; payload["group_id"] = group_id; if (can_afford_transaction(cost)) { - LLNotificationsUtil::add("JoinGroupCanAfford", args, payload, onJoinGroup); + if(cost > 0) + LLNotificationsUtil::add("JoinGroupCanAfford", args, payload, onJoinGroup); + else + LLNotificationsUtil::add("JoinGroupNoCost", args, payload, onJoinGroup); + } else { diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp index ea66ef7d2c..a68552a91e 100644 --- a/indra/newview/llpanelme.cpp +++ b/indra/newview/llpanelme.cpp @@ -69,6 +69,20 @@ BOOL LLPanelMe::postBuild() void LLPanelMe::onOpen(const LLSD& key) { LLPanelProfile::onOpen(key); + + if(key.isUndefined() || key.has("edit_my_profile")) + { + // Open Edit My Profile panel by default (through Side Tray -> My Profile) (EXT-4823) + buildEditPanel(); + openPanel(mEditPanel, getAvatarId()); + } + else if(mEditPanel) + { + // When opening Me Panel through Side Tray LLPanelMe::onOpen() is called twice. + // First time key can be undefined and second time - key may contain some data. + // Lets close Edit Panel if key does contain some data on second call. + closePanel(mEditPanel); + } } bool LLPanelMe::notifyChildren(const LLSD& info) diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index c73ade53c8..b5d85dfd4b 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -197,11 +197,7 @@ void LLPanelProfile::togglePanel(LLPanel* panel, const LLSD& key) } else { - panel->setVisible(FALSE); - if (panel->getParent() == this) - { - removeChild(panel); - } + closePanel(panel); getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId()); } @@ -248,6 +244,16 @@ void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params) panel->setRect(new_rect); } +void LLPanelProfile::closePanel(LLPanel* panel) +{ + panel->setVisible(FALSE); + + if (panel->getParent() == this) + { + removeChild(panel); + } +} + S32 LLPanelProfile::notifyParent(const LLSD& info) { std::string action = info["action"]; diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index bcf4bdd0ec..f1aa3f10f8 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -55,6 +55,8 @@ public: virtual void openPanel(LLPanel* panel, const LLSD& params); + virtual void closePanel(LLPanel* panel); + S32 notifyParent(const LLSD& info); protected: diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5c37ef75b5..5d78cfc9ef 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -405,6 +405,19 @@ Do you wish to proceed? <notification icon="alertmodal.tga" + name="JoinGroupNoCost" + type="alertmodal"> +You are Joining group [NAME]. +Do you wish to proceed? + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="Join"/> + </notification> + + + <notification + icon="alertmodal.tga" name="JoinGroupCannotAfford" type="alertmodal"> Joining this group costs L$[COST]. |