aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llinventorybridge.cpp')
-rw-r--r--linden/indra/newview/llinventorybridge.cpp28
1 files changed, 7 insertions, 21 deletions
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index eb2170a..23d864e 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -3123,11 +3123,11 @@ void LLNotecardBridge::openItem()
3123 LLViewerInventoryItem* item = getItem(); 3123 LLViewerInventoryItem* item = getItem();
3124 if (item) 3124 if (item)
3125 { 3125 {
3126 if(isSkySetting()) 3126 if(LLWLParamManager::isSkySettingsNotecard(getName()))
3127 { 3127 {
3128 LLWLParamManager::instance()->loadPresetNotecard(item->getName(), item->getAssetUUID(), mUUID); 3128 LLWLParamManager::instance()->loadPresetNotecard(item->getName(), item->getAssetUUID(), mUUID);
3129 } 3129 }
3130 else if(isWaterSetting()) 3130 else if(LLWLParamManager::isWaterSettingsNotecard(getName()))
3131 { 3131 {
3132 LLWaterParamManager::instance()->loadPresetNotecard(item->getName(), item->getAssetUUID(), mUUID); 3132 LLWaterParamManager::instance()->loadPresetNotecard(item->getName(), item->getAssetUUID(), mUUID);
3133 } 3133 }
@@ -3158,13 +3158,13 @@ void LLNotecardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
3158 else 3158 else
3159 { 3159 {
3160 3160
3161 if(isWindLight()) 3161 if(LLWLParamManager::isSettingsNotecard(getName()))
3162 { 3162 {
3163 if(isSkySetting()) 3163 if(LLWLParamManager::isSkySettingsNotecard(getName()))
3164 { 3164 {
3165 items.push_back(std::string("Use WindLight Settings")); 3165 items.push_back(std::string("Use WindLight Settings"));
3166 } 3166 }
3167 else if(isWaterSetting()) 3167 else if(LLWLParamManager::isWaterSettingsNotecard(getName()))
3168 { 3168 {
3169 items.push_back(std::string("Use WaterLight Settings")); 3169 items.push_back(std::string("Use WaterLight Settings"));
3170 } 3170 }
@@ -3221,11 +3221,11 @@ void LLNotecardBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
3221 3221
3222LLUIImagePtr LLNotecardBridge::getIcon() const 3222LLUIImagePtr LLNotecardBridge::getIcon() const
3223{ 3223{
3224 if(isSkySetting()) 3224 if(LLWLParamManager::isSkySettingsNotecard(getName()))
3225 { 3225 {
3226 return LLUI::getUIImage("Inv_WindLight"); 3226 return LLUI::getUIImage("Inv_WindLight");
3227 } 3227 }
3228 else if(isWaterSetting()) 3228 else if(LLWLParamManager::isWaterSettingsNotecard(getName()))
3229 { 3229 {
3230 return LLUI::getUIImage("Inv_WaterLight"); 3230 return LLUI::getUIImage("Inv_WaterLight");
3231 } 3231 }
@@ -3235,20 +3235,6 @@ LLUIImagePtr LLNotecardBridge::getIcon() const
3235 } 3235 }
3236} 3236}
3237 3237
3238bool LLNotecardBridge::isSkySetting() const
3239{
3240 return (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".wl") == 0);
3241}
3242
3243bool LLNotecardBridge::isWaterSetting() const
3244{
3245 return (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".ww") == 0);
3246}
3247
3248bool LLNotecardBridge::isWindLight() const
3249{
3250 return (isSkySetting() || isWaterSetting());
3251}
3252 3238
3253// +=================================================+ 3239// +=================================================+
3254// | LLGestureBridge | 3240// | LLGestureBridge |