aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorArmin Weatherwax2010-08-26 16:24:58 +0200
committerMcCabe Maxsted2010-08-29 01:25:08 -0700
commitd9c9fbdd0d4c2638b3aab5b2db0f8cf6d48a928e (patch)
treefdb7a77139e07e168008cfe2c28e14294c3788ef /linden/indra/newview/llinventorybridge.cpp
parentKatharine Berry: Allow loading of windlight parameters from arbitrary XML str... (diff)
downloadmeta-impy-d9c9fbdd0d4c2638b3aab5b2db0f8cf6d48a928e.zip
meta-impy-d9c9fbdd0d4c2638b3aab5b2db0f8cf6d48a928e.tar.gz
meta-impy-d9c9fbdd0d4c2638b3aab5b2db0f8cf6d48a928e.tar.bz2
meta-impy-d9c9fbdd0d4c2638b3aab5b2db0f8cf6d48a928e.tar.xz
Katharine Berry: Can load WindLight settings from LLSD notecards ending in ".wl"
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llinventorybridge.cpp68
1 files changed, 68 insertions, 0 deletions
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index 41af123..7396eac 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -86,6 +86,7 @@
86#include "lluictrlfactory.h" 86#include "lluictrlfactory.h"
87#include "llselectmgr.h" 87#include "llselectmgr.h"
88#include "llfloateropenobject.h" 88#include "llfloateropenobject.h"
89#include "llwlparammanager.h"
89 90
90// Helpers 91// Helpers
91// bug in busy count inc/dec right now, logic is complex... do we really need it? 92// bug in busy count inc/dec right now, logic is complex... do we really need it?
@@ -812,6 +813,12 @@ void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model,
812 folder_view_itemp->getListener()->pasteFromClipboard(); 813 folder_view_itemp->getListener()->pasteFromClipboard();
813 return; 814 return;
814 } 815 }
816 else if ("load_windlight" == action)
817 {
818 LLInventoryItem* itemp = model->getItem(mUUID);
819 if(!itemp) return;
820 LLWLParamManager::instance()->loadPresetNotecard(itemp->getName(), itemp->getAssetUUID(), mUUID);
821 }
815} 822}
816 823
817void LLItemBridge::selectItem() 824void LLItemBridge::selectItem()
@@ -3059,7 +3066,68 @@ void LLNotecardBridge::openItem()
3059 open_notecard(item, getPrefix() + item->getName(), LLUUID::null, FALSE); 3066 open_notecard(item, getPrefix() + item->getName(), LLUUID::null, FALSE);
3060 } 3067 }
3061} 3068}
3069
3070void LLNotecardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
3071{
3072 // *TODO: Translate
3073 lldebugs << "LLNotecardBridge::buildContextMenu()" << llendl;
3074 std::vector<std::string> items;
3075 std::vector<std::string> disabled_items;
3076 if(isInTrash())
3077 {
3078 items.push_back(std::string("Purge Item"));
3079 if (!isItemRemovable())
3080 {
3081 disabled_items.push_back(std::string("Purge Item"));
3082 }
3083
3084 items.push_back(std::string("Restore Item"));
3085 }
3062 3086
3087 else
3088 {
3089 bool is_windlight = (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".wl") == 0);
3090
3091 if(is_windlight)
3092 {
3093 items.push_back(std::string("Use Windlight Settings"));
3094 }
3095 items.push_back(std::string("Properties"));
3096 getClipboardEntries(true, items, disabled_items, flags);
3097 }
3098 hideContextEntries(menu, items, disabled_items);
3099/*
3100--
3101
3102
3103
3104 menuentry_vec_t items;
3105 menuentry_vec_t disabled_items;
3106 if(isItemInTrash())
3107 {
3108 addTrashContextMenuOptions(items, disabled_items);
3109 }
3110 else
3111 {
3112 bool is_windlight = (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".wl") == 0);
3113 items.push_back(std::string("Share"));
3114 if (!canShare())
3115 {
3116 disabled_items.push_back(std::string("Share"));
3117 }
3118
3119 addOpenRightClickMenuOption(items);
3120 if(is_windlight)
3121 {
3122 items.push_back(std::string("Use Windlight Settings"));
3123 }
3124 items.push_back(std::string("Properties"));
3125
3126 getClipboardEntries(true, items, disabled_items, flags);
3127 }
3128 hide_context_entries(menu, items, disabled_items);
3129*/
3130}
3063 3131
3064// +=================================================+ 3132// +=================================================+
3065// | LLGestureBridge | 3133// | LLGestureBridge |