summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelexperiences.cpp
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2014-02-26 17:32:21 -0800
committerdolphin <dolphin@lindenlab.com>2014-02-26 17:32:21 -0800
commitc1f730ed46c14c12d5856109b622bf085c39abb0 (patch)
tree5c2382b0cdd20e69031c8c0f97c6b4322e1d6817 /indra/newview/llpanelexperiences.cpp
parentfa88239bd00fcb6d58f20a0c23699f108acbfcbc (diff)
Moved the experience acquire code to the experiences panel
Diffstat (limited to 'indra/newview/llpanelexperiences.cpp')
-rw-r--r--indra/newview/llpanelexperiences.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llpanelexperiences.cpp b/indra/newview/llpanelexperiences.cpp
index 3aca9eb68b..f1d6ea09ed 100644
--- a/indra/newview/llpanelexperiences.cpp
+++ b/indra/newview/llpanelexperiences.cpp
@@ -35,6 +35,7 @@
#include "llpanelexperiences.h"
#include "llslurl.h"
+#include "lllayoutstack.h"
static LLRegisterPanelClassWrapper<LLPanelExperiences> register_experiences_panel("experiences_panel");
@@ -114,7 +115,25 @@ void LLPanelExperiences::addExperience( const LLUUID& id )
}
}
+void LLPanelExperiences::setButtonAction(const std::string& label, const commit_signal_t::slot_type& cb )
+{
+ if(label.empty())
+ {
+ getChild<LLLayoutPanel>("button_panel")->setVisible(false);
+ }
+ else
+ {
+ getChild<LLLayoutPanel>("button_panel")->setVisible(true);
+ LLButton* child = getChild<LLButton>("btn_action");
+ child->setCommitCallback(cb);
+ child->setLabel(getString(label));
+ }
+}
+void LLPanelExperiences::enableButton( bool enable )
+{
+ getChild<LLButton>("btn_action")->setEnabled(enable);
+}
LLExperienceItem::LLExperienceItem()
@@ -142,7 +161,6 @@ LLPanelSearchExperiences* LLPanelSearchExperiences::create( const std::string& n
{
LLPanelSearchExperiences* panel= new LLPanelSearchExperiences();
panel->getChild<LLPanel>("results")->addChild(LLPanelExperiences::create(name));
- ///XXXif(
return panel;
}