aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-05-17 21:44:14 -0700
committerJacek Antonelli2010-06-19 02:40:54 -0500
commite24cb471fc1f16b717551eb9e9cd182e54e3f376 (patch)
treeb971675895b20f64520c4e9b9965d3aba6456838 /linden/indra/newview
parentFixed Autopilot > Move feature (diff)
downloadmeta-impy-e24cb471fc1f16b717551eb9e9cd182e54e3f376.zip
meta-impy-e24cb471fc1f16b717551eb9e9cd182e54e3f376.tar.gz
meta-impy-e24cb471fc1f16b717551eb9e9cd182e54e3f376.tar.bz2
meta-impy-e24cb471fc1f16b717551eb9e9cd182e54e3f376.tar.xz
Fixed 'Currently Online' text in profile being misaligned and 'Currently Offline' not appearing
Diffstat (limited to 'linden/indra/newview')
-rw-r--r--linden/indra/newview/llpanelavatar.cpp36
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml2
2 files changed, 17 insertions, 21 deletions
diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp
index dbdeb3c..6e0949f 100644
--- a/linden/indra/newview/llpanelavatar.cpp
+++ b/linden/indra/newview/llpanelavatar.cpp
@@ -360,10 +360,6 @@ BOOL LLPanelAvatarSecondLife::postBuild(void)
360 childSetVisible("?",LLPanelAvatar::sAllowFirstLife); 360 childSetVisible("?",LLPanelAvatar::sAllowFirstLife);
361 361
362 childSetVisible("online_yes",FALSE); 362 childSetVisible("online_yes",FALSE);
363
364 // These are cruft but may still exist in some xml files
365 // TODO: remove the following 2 lines once translators grab these changes
366 childSetVisible("online_unknown",FALSE);
367 childSetVisible("online_no",FALSE); 363 childSetVisible("online_no",FALSE);
368 364
369 childSetAction("Find on Map", LLPanelAvatar::onClickTrack, getPanelAvatar()); 365 childSetAction("Find on Map", LLPanelAvatar::onClickTrack, getPanelAvatar());
@@ -1250,6 +1246,13 @@ void LLPanelAvatar::setAvatar(LLViewerObject *avatarp)
1250 1246
1251void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status) 1247void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status)
1252{ 1248{
1249 // Since setOnlineStatus gets called after setAvatarID
1250 // we can do this check here -- MC
1251 if (mAvatarID == gAgent.getID())
1252 {
1253 return;
1254 }
1255
1253 // Online status NO could be because they are hidden 1256 // Online status NO could be because they are hidden
1254 // If they are a friend, we may know the truth! 1257 // If they are a friend, we may know the truth!
1255 if ((ONLINE_STATUS_YES != online_status) 1258 if ((ONLINE_STATUS_YES != online_status)
@@ -1260,6 +1263,7 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status)
1260 } 1263 }
1261 1264
1262 mPanelSecondLife->childSetVisible("online_yes", (online_status == ONLINE_STATUS_YES)); 1265 mPanelSecondLife->childSetVisible("online_yes", (online_status == ONLINE_STATUS_YES));
1266 mPanelSecondLife->childSetVisible("online_no", (online_status == ONLINE_STATUS_NO));
1263 1267
1264 BOOL in_prelude = gAgent.inPrelude(); 1268 BOOL in_prelude = gAgent.inPrelude();
1265 if(gAgent.isGodlike()) 1269 if(gAgent.isGodlike())
@@ -1277,18 +1281,6 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status)
1277 childSetEnabled("Offer Teleport...", TRUE); 1281 childSetEnabled("Offer Teleport...", TRUE);
1278 childSetToolTip("Offer Teleport...", childGetValue("TeleportNormal").asString()); 1282 childSetToolTip("Offer Teleport...", childGetValue("TeleportNormal").asString());
1279 } 1283 }
1280
1281 // Since setOnlineStatus gets called after setAvatarID
1282 // need to make sure that "Offer Teleport" doesn't get set
1283 // to TRUE again for yourself
1284 if (mAvatarID != gAgent.getID())
1285 {
1286 childSetVisible("Offer Teleport...",TRUE);
1287 }
1288 else
1289 {
1290 childSetEnabled("Offer Teleport...", FALSE);
1291 }
1292} 1284}
1293 1285
1294void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name, 1286void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name,
@@ -1405,9 +1397,16 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
1405 childSetEnabled("Unfreeze",FALSE); 1397 childSetEnabled("Unfreeze",FALSE);
1406 childSetVisible("csr_btn", FALSE); 1398 childSetVisible("csr_btn", FALSE);
1407 childSetEnabled("csr_btn", FALSE); 1399 childSetEnabled("csr_btn", FALSE);
1400
1401 // if you don't know if you're online or not, there's no helping you -- MC
1402 childSetVisible("online_yes",FALSE);
1403 childSetVisible("online_no",FALSE);
1408 } 1404 }
1409 else 1405 else
1410 { 1406 {
1407 BOOL is_god = FALSE;
1408 if (gAgent.isGodlike()) is_god = TRUE;
1409
1411 childSetVisible("OK",FALSE); 1410 childSetVisible("OK",FALSE);
1412 childSetEnabled("OK",FALSE); 1411 childSetEnabled("OK",FALSE);
1413 1412
@@ -1426,7 +1425,7 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
1426 1425
1427 childSetVisible("Find on Map",TRUE); 1426 childSetVisible("Find on Map",TRUE);
1428 // Note: we don't always know online status, so always allow gods to try to track 1427 // Note: we don't always know online status, so always allow gods to try to track
1429 BOOL enable_track = gAgent.isGodlike() || is_agent_mappable(mAvatarID); 1428 BOOL enable_track = is_god || is_agent_mappable(mAvatarID);
1430 childSetEnabled("Find on Map",enable_track); 1429 childSetEnabled("Find on Map",enable_track);
1431 if (!mIsFriend) 1430 if (!mIsFriend)
1432 { 1431 {
@@ -1444,9 +1443,6 @@ void LLPanelAvatar::setAvatarID(const LLUUID &avatar_id, const std::string &name
1444 childSetEnabled("Add Friend...", !avatar_is_friend); 1443 childSetEnabled("Add Friend...", !avatar_is_friend);
1445 childSetVisible("Pay...",TRUE); 1444 childSetVisible("Pay...",TRUE);
1446 childSetEnabled("Pay...",FALSE); 1445 childSetEnabled("Pay...",FALSE);
1447
1448 BOOL is_god = FALSE;
1449 if (gAgent.isGodlike()) is_god = TRUE;
1450 1446
1451 childSetVisible("Kick", is_god); 1447 childSetVisible("Kick", is_god);
1452 childSetEnabled("Kick", is_god); 1448 childSetEnabled("Kick", is_god);
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml
index 0fb1f92..1786dc4 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml
@@ -41,7 +41,7 @@
41 </string> 41 </string>
42 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 42 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
43 bottom="-23" drop_shadow_visible="true" follows="left|top" 43 bottom="-23" drop_shadow_visible="true" follows="left|top"
44 font="SansSerifsmall" h_pad="0" halign="left" height="16" right="-12" 44 font="SansSerifsmall" h_pad="0" halign="left" height="16" left="262"
45 mouse_opaque="true" name="online_yes" v_pad="0" width="200"> 45 mouse_opaque="true" name="online_yes" v_pad="0" width="200">
46 Currently: Online 46 Currently: Online
47 </text> 47 </text>