diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llinventorybridge.cpp | 59 |
1 files changed, 27 insertions, 32 deletions
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index efa0d20..db7a955 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp | |||
@@ -813,12 +813,6 @@ void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model, | |||
813 | folder_view_itemp->getListener()->pasteFromClipboard(); | 813 | folder_view_itemp->getListener()->pasteFromClipboard(); |
814 | return; | 814 | return; |
815 | } | 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 | } | ||
822 | } | 816 | } |
823 | 817 | ||
824 | void LLItemBridge::selectItem() | 818 | void LLItemBridge::selectItem() |
@@ -828,6 +822,16 @@ void LLItemBridge::selectItem() | |||
828 | { | 822 | { |
829 | item->fetchFromServer(); | 823 | item->fetchFromServer(); |
830 | } | 824 | } |
825 | |||
826 | if (item && item->isComplete()) | ||
827 | { | ||
828 | bool is_windlight = (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".wl") == 0); | ||
829 | if(is_windlight) | ||
830 | { | ||
831 | LLWLParamManager::instance()->loadPresetNotecard(item->getName(), item->getAssetUUID(), mUUID); | ||
832 | } | ||
833 | } | ||
834 | |||
831 | } | 835 | } |
832 | 836 | ||
833 | void LLItemBridge::restoreItem() | 837 | void LLItemBridge::restoreItem() |
@@ -3060,7 +3064,9 @@ void LLNotecardBridge::openItem() | |||
3060 | LLViewerInventoryItem* item = getItem(); | 3064 | LLViewerInventoryItem* item = getItem(); |
3061 | if (item) | 3065 | if (item) |
3062 | { | 3066 | { |
3063 | open_notecard(item, getPrefix() + item->getName(), LLUUID::null, FALSE); | 3067 | bool is_windlight = (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".wl") == 0); |
3068 | if(!is_windlight) | ||
3069 | open_notecard(item, getPrefix() + item->getName(), LLUUID::null, FALSE); | ||
3064 | } | 3070 | } |
3065 | } | 3071 | } |
3066 | 3072 | ||
@@ -3087,43 +3093,32 @@ void LLNotecardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
3087 | 3093 | ||
3088 | if(is_windlight) | 3094 | if(is_windlight) |
3089 | { | 3095 | { |
3090 | items.push_back(std::string("Use Windlight Settings")); | 3096 | items.push_back(std::string("Use WindLight Settings")); |
3097 | items.push_back(std::string("Edit WindLight Settings")); | ||
3091 | } | 3098 | } |
3092 | items.push_back(std::string("Properties")); | 3099 | items.push_back(std::string("Properties")); |
3093 | getClipboardEntries(true, items, disabled_items, flags); | 3100 | getClipboardEntries(true, items, disabled_items, flags); |
3094 | } | 3101 | } |
3095 | hideContextEntries(menu, items, disabled_items); | 3102 | hideContextEntries(menu, items, disabled_items); |
3096 | /* | 3103 | } |
3097 | -- | ||
3098 | |||
3099 | 3104 | ||
3105 | void LLNotecardBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) | ||
3106 | { | ||
3107 | LLViewerInventoryItem* itemp = model->getItem(mUUID); | ||
3108 | if(!itemp) return; | ||
3100 | 3109 | ||
3101 | menuentry_vec_t items; | 3110 | if ("load_windlight" == action) |
3102 | menuentry_vec_t disabled_items; | ||
3103 | if(isItemInTrash()) | ||
3104 | { | 3111 | { |
3105 | addTrashContextMenuOptions(items, disabled_items); | 3112 | LLWLParamManager::instance()->loadPresetNotecard(itemp->getName(), itemp->getAssetUUID(), mUUID); |
3113 | } | ||
3114 | else if ("edit_windlight" == action) | ||
3115 | { | ||
3116 | open_notecard(itemp, getPrefix() + itemp->getName(), LLUUID::null, FALSE); | ||
3106 | } | 3117 | } |
3107 | else | 3118 | else |
3108 | { | 3119 | { |
3109 | bool is_windlight = (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".wl") == 0); | 3120 | LLItemBridge::performAction(folder, model, action); |
3110 | items.push_back(std::string("Share")); | ||
3111 | if (!canShare()) | ||
3112 | { | ||
3113 | disabled_items.push_back(std::string("Share")); | ||
3114 | } | ||
3115 | |||
3116 | addOpenRightClickMenuOption(items); | ||
3117 | if(is_windlight) | ||
3118 | { | ||
3119 | items.push_back(std::string("Use Windlight Settings")); | ||
3120 | } | ||
3121 | items.push_back(std::string("Properties")); | ||
3122 | |||
3123 | getClipboardEntries(true, items, disabled_items, flags); | ||
3124 | } | 3121 | } |
3125 | hide_context_entries(menu, items, disabled_items); | ||
3126 | */ | ||
3127 | } | 3122 | } |
3128 | 3123 | ||
3129 | LLUIImagePtr LLNotecardBridge::getIcon() const | 3124 | LLUIImagePtr LLNotecardBridge::getIcon() const |