summaryrefslogtreecommitdiff
path: root/indra/newview/lllocationinputctrl.cpp
diff options
context:
space:
mode:
authorDave SIMmONs <simon@lindenlab.com>2011-05-06 18:29:43 -0700
committerDave SIMmONs <simon@lindenlab.com>2011-05-06 18:29:43 -0700
commitb43da6721e538290962cafa7ddd32a8f4c7e21db (patch)
treee6eddfdc3b71bf4fff78d28e4b77a70e42b850a8 /indra/newview/lllocationinputctrl.cpp
parent32d30f33be853c0e1e2fc7657c14cd4575b19db2 (diff)
Viewer UI work to add icons for the nav bar and places profile to indicate parcel privacy settings. Using engineering art icons.
Diffstat (limited to 'indra/newview/lllocationinputctrl.cpp')
-rw-r--r--indra/newview/lllocationinputctrl.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 5c65dcec34..c68d1bb845 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -190,6 +190,7 @@ LLLocationInputCtrl::Params::Params()
scripts_icon("scripts_icon"),
damage_icon("damage_icon"),
damage_text("damage_text"),
+ privacy_icon("privacy_icon"),
maturity_help_topic("maturity_help_topic")
{
}
@@ -342,6 +343,13 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
mDamageText = LLUICtrlFactory::create<LLTextBox>(damage_text);
addChild(mDamageText);
+ LLIconCtrl::Params privacy_icon = p.privacy_icon;
+ privacy_icon.tool_tip = LLTrans::getString("LocationCtrlPrivacyTooltip");
+ privacy_icon.mouse_opaque = true;
+ mParcelIcon[PRIVACY_ICON] = LLUICtrlFactory::create<LLIconCtrl>(privacy_icon);
+ mParcelIcon[PRIVACY_ICON]->setMouseDownCallback(boost::bind(&LLLocationInputCtrl::onParcelIconClick, this, PRIVACY_ICON));
+ addChild(mParcelIcon[PRIVACY_ICON]);
+
// Register callbacks and load the location field context menu (NB: the order matters).
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Navbar.Action", boost::bind(&LLLocationInputCtrl::onLocationContextMenuItemClicked, this, _2));
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Navbar.EnableMenuItem", boost::bind(&LLLocationInputCtrl::onLocationContextMenuItemEnabled, this, _2));
@@ -810,6 +818,7 @@ void LLLocationInputCtrl::refreshParcelIcons()
bool allow_build = vpm->allowAgentBuild(current_parcel); // true when anyone is allowed to build. See EXT-4610.
bool allow_scripts = vpm->allowAgentScripts(agent_region, current_parcel);
bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel);
+ bool privacy = current_parcel->getPrivacy();
// Most icons are "block this ability"
mParcelIcon[VOICE_ICON]->setVisible( !allow_voice );
@@ -819,6 +828,7 @@ void LLLocationInputCtrl::refreshParcelIcons()
mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts );
mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage );
mDamageText->setVisible(allow_damage);
+ mParcelIcon[PRIVACY_ICON]->setVisible( privacy );
// Padding goes to left of both landmark star and for sale btn
x -= mAddLandmarkHPad;
@@ -1175,6 +1185,9 @@ void LLLocationInputCtrl::onParcelIconClick(EParcelIcon icon)
case DAMAGE_ICON:
LLNotificationsUtil::add("NotSafe");
break;
+ case PRIVACY_ICON:
+ LLNotificationsUtil::add("PrivateParcel");
+ break;
case ICON_COUNT:
break;
// no default to get compiler warning when a new icon gets added