summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterperms.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-07-07 00:53:05 +0000
committerJames Cook <james@lindenlab.com>2009-07-07 00:53:05 +0000
commit52aeaa32841e7d0b37abab0a2a2540c2be2f16b7 (patch)
treed8f5c98644029dd289a97aa0d8b55c5a6200c214 /indra/newview/llfloaterperms.cpp
parent2c722655bd6701a3dc8518c6518c51f538765dcd (diff)
Merge skinning-14 to viewer-2, including refactoring many floaters to register them with LLFloaterReg, support for introspection of ParamBlock based UI widgets to dump XML schema, splitting llfolderview.cpp into three separate files to unravel dependencies and skeleton for for LLListView widget. Resolved conflicts in these files:
lldraghandle.h, lluictrl.h, llchiclet.cpp, llfolderview.h/cpp, lliinventorybridge.cpp, llpanelpicks.cpp, llviewermenu.cpp, floater_mute.xml, floater_preferences.xml, notifications.xml, panel_preferences_audio.xml, panel_preferences_graphics1.xml, panel_region_general.xml svn merge -r124961:126284 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-14
Diffstat (limited to 'indra/newview/llfloaterperms.cpp')
-rw-r--r--indra/newview/llfloaterperms.cpp41
1 files changed, 14 insertions, 27 deletions
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index 1ef71a9d53..c4f1ebe8aa 100644
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -42,51 +42,44 @@
LLFloaterPerms::LLFloaterPerms(const LLSD& seed)
-: LLFloater()
+: LLFloater(seed)
{
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_perm_prefs.xml");
+ //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_perm_prefs.xml");
+ mCommitCallbackRegistrar.add("Perms.Copy", boost::bind(&LLFloaterPerms::onCommitCopy, this));
+ mCommitCallbackRegistrar.add("Perms.OK", boost::bind(&LLFloaterPerms::onClickOK, this));
+ mCommitCallbackRegistrar.add("Perms.Cancel", boost::bind(&LLFloaterPerms::onClickCancel, this));
+
}
BOOL LLFloaterPerms::postBuild()
{
- childSetEnabled("next_owner_transfer", gSavedSettings.getBOOL("NextOwnerCopy"));
- childSetAction("help", onClickHelp, this);
- childSetAction("ok", onClickOK, this);
- childSetAction("cancel", onClickCancel, this);
- childSetCommitCallback("next_owner_copy", &onCommitCopy, this);
refresh();
return TRUE;
}
-//static
-void LLFloaterPerms::onClickOK(void* data)
+void LLFloaterPerms::onClickOK()
{
- LLFloaterPerms* self = static_cast<LLFloaterPerms*>(data);
- self->ok();
- self->closeFloater();
+ ok();
+ closeFloater();
}
-//static
-void LLFloaterPerms::onClickCancel(void* data)
+void LLFloaterPerms::onClickCancel()
{
- LLFloaterPerms* self = static_cast<LLFloaterPerms*>(data);
- self->cancel();
- self->closeFloater();
+ cancel();
+ closeFloater();
}
-//static
-void LLFloaterPerms::onCommitCopy(LLUICtrl* ctrl, void* data)
+void LLFloaterPerms::onCommitCopy()
{
- LLFloaterPerms* self = static_cast<LLFloaterPerms*>(data);
// Implements fair use
BOOL copyable = gSavedSettings.getBOOL("NextOwnerCopy");
if(!copyable)
{
gSavedSettings.setBOOL("NextOwnerTransfer", TRUE);
}
- LLCheckBoxCtrl* xfer = self->getChild<LLCheckBoxCtrl>("next_owner_transfer");
+ LLCheckBoxCtrl* xfer = getChild<LLCheckBoxCtrl>("next_owner_transfer");
xfer->setEnabled(copyable);
}
@@ -152,9 +145,3 @@ U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix)
return flags;
}
-
-//static
-void LLFloaterPerms::onClickHelp(void* data)
-{
- LLNotifications::instance().add("ClickUploadHelpPermissions");
-}