aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorArmin Weatherwax2010-08-27 02:03:17 +0200
committerMcCabe Maxsted2010-08-29 01:30:41 -0700
commit8da4875a718f55546942aca1f1a9a049989793f1 (patch)
tree90de8d22cca45728d1ad57e109a7271a04181a8c
parentKatharine Berry: Added errors and prompts to notifications.xml (diff)
downloadmeta-impy-8da4875a718f55546942aca1f1a9a049989793f1.zip
meta-impy-8da4875a718f55546942aca1f1a9a049989793f1.tar.gz
meta-impy-8da4875a718f55546942aca1f1a9a049989793f1.tar.bz2
meta-impy-8da4875a718f55546942aca1f1a9a049989793f1.tar.xz
Katharine Berry: Use correct icons for WindLight in inventory
-rw-r--r--linden/indra/newview/llpanelinventory.cpp43
1 files changed, 38 insertions, 5 deletions
diff --git a/linden/indra/newview/llpanelinventory.cpp b/linden/indra/newview/llpanelinventory.cpp
index 85f6ea2..333b83f 100644
--- a/linden/indra/newview/llpanelinventory.cpp
+++ b/linden/indra/newview/llpanelinventory.cpp
@@ -1377,6 +1377,9 @@ public:
1377 virtual LLUIImagePtr getIcon() const; 1377 virtual LLUIImagePtr getIcon() const;
1378 virtual void openItem(); 1378 virtual void openItem();
1379 virtual BOOL removeItem(); 1379 virtual BOOL removeItem();
1380 bool isSkySetting() const;
1381 bool isWaterSetting() const;
1382 bool isWindLight() const;
1380}; 1383};
1381 1384
1382LLTaskNotecardBridge::LLTaskNotecardBridge( 1385LLTaskNotecardBridge::LLTaskNotecardBridge(
@@ -1387,11 +1390,6 @@ LLTaskNotecardBridge::LLTaskNotecardBridge(
1387{ 1390{
1388} 1391}
1389 1392
1390LLUIImagePtr LLTaskNotecardBridge::getIcon() const
1391{
1392 return get_item_icon(LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, 0, FALSE);
1393}
1394
1395void LLTaskNotecardBridge::openItem() 1393void LLTaskNotecardBridge::openItem()
1396{ 1394{
1397 if(LLPreview::show(mUUID)) 1395 if(LLPreview::show(mUUID))
@@ -1410,6 +1408,10 @@ void LLTaskNotecardBridge::openItem()
1410 return; 1408 return;
1411 } 1409 }
1412// [/RLVa:KB] 1410// [/RLVa:KB]
1411 if(isWindLight())
1412 {
1413 return;
1414 }
1413 if(object->permModify() || gAgent.isGodlike()) 1415 if(object->permModify() || gAgent.isGodlike())
1414 { 1416 {
1415 S32 left, top; 1417 S32 left, top;
@@ -1434,6 +1436,37 @@ BOOL LLTaskNotecardBridge::removeItem()
1434 LLPreview::hide(mUUID); 1436 LLPreview::hide(mUUID);
1435 return LLTaskInvFVBridge::removeItem(); 1437 return LLTaskInvFVBridge::removeItem();
1436} 1438}
1439LLUIImagePtr LLTaskNotecardBridge::getIcon() const
1440{
1441 if(isSkySetting())
1442 {
1443 return LLUI::getUIImage("Inv_WindLight");
1444 }
1445 else if(isWaterSetting())
1446 {
1447 return LLUI::getUIImage("Inv_WaterLight");
1448 }
1449 else
1450 {
1451 return get_item_icon(LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, 0, FALSE);
1452 }
1453}
1454
1455bool LLTaskNotecardBridge::isSkySetting() const
1456{
1457 return (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".wl") == 0);
1458}
1459
1460bool LLTaskNotecardBridge::isWaterSetting() const
1461{
1462 return (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".ww") == 0);
1463}
1464
1465bool LLTaskNotecardBridge::isWindLight() const
1466{
1467 return (isSkySetting() || isWaterSetting());
1468}
1469
1437 1470
1438///---------------------------------------------------------------------------- 1471///----------------------------------------------------------------------------
1439/// Class LLTaskGestureBridge 1472/// Class LLTaskGestureBridge