From 643ef4072a2387c8f8f5e2f3d6a801e5471bce18 Mon Sep 17 00:00:00 2001
From: Armin Weatherwax
Date: Thu, 26 Aug 2010 18:03:11 +0200
Subject: Katharine Berry:Double-clicking a WindLight notecard immediately
applies the setting.
---
linden/indra/newview/llinventorybridge.cpp | 59 ++++++++++------------
linden/indra/newview/llinventorybridge.h | 1 +
.../skins/default/xui/en-us/menu_inventory.xml | 8 ++-
3 files changed, 34 insertions(+), 34 deletions(-)
(limited to 'linden/indra')
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,
folder_view_itemp->getListener()->pasteFromClipboard();
return;
}
- else if ("load_windlight" == action)
- {
- LLInventoryItem* itemp = model->getItem(mUUID);
- if(!itemp) return;
- LLWLParamManager::instance()->loadPresetNotecard(itemp->getName(), itemp->getAssetUUID(), mUUID);
- }
}
void LLItemBridge::selectItem()
@@ -828,6 +822,16 @@ void LLItemBridge::selectItem()
{
item->fetchFromServer();
}
+
+ if (item && item->isComplete())
+ {
+ bool is_windlight = (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".wl") == 0);
+ if(is_windlight)
+ {
+ LLWLParamManager::instance()->loadPresetNotecard(item->getName(), item->getAssetUUID(), mUUID);
+ }
+ }
+
}
void LLItemBridge::restoreItem()
@@ -3060,7 +3064,9 @@ void LLNotecardBridge::openItem()
LLViewerInventoryItem* item = getItem();
if (item)
{
- open_notecard(item, getPrefix() + item->getName(), LLUUID::null, FALSE);
+ bool is_windlight = (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".wl") == 0);
+ if(!is_windlight)
+ open_notecard(item, getPrefix() + item->getName(), LLUUID::null, FALSE);
}
}
@@ -3087,43 +3093,32 @@ void LLNotecardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
if(is_windlight)
{
- items.push_back(std::string("Use Windlight Settings"));
+ items.push_back(std::string("Use WindLight Settings"));
+ items.push_back(std::string("Edit WindLight Settings"));
}
items.push_back(std::string("Properties"));
getClipboardEntries(true, items, disabled_items, flags);
}
hideContextEntries(menu, items, disabled_items);
-/*
---
-
+}
+void LLNotecardBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
+{
+ LLViewerInventoryItem* itemp = model->getItem(mUUID);
+ if(!itemp) return;
- menuentry_vec_t items;
- menuentry_vec_t disabled_items;
- if(isItemInTrash())
+ if ("load_windlight" == action)
{
- addTrashContextMenuOptions(items, disabled_items);
+ LLWLParamManager::instance()->loadPresetNotecard(itemp->getName(), itemp->getAssetUUID(), mUUID);
+ }
+ else if ("edit_windlight" == action)
+ {
+ open_notecard(itemp, getPrefix() + itemp->getName(), LLUUID::null, FALSE);
}
else
{
- bool is_windlight = (getName().length() > 2 && getName().compare(getName().length() - 3, 3, ".wl") == 0);
- items.push_back(std::string("Share"));
- if (!canShare())
- {
- disabled_items.push_back(std::string("Share"));
- }
-
- addOpenRightClickMenuOption(items);
- if(is_windlight)
- {
- items.push_back(std::string("Use Windlight Settings"));
- }
- items.push_back(std::string("Properties"));
-
- getClipboardEntries(true, items, disabled_items, flags);
+ LLItemBridge::performAction(folder, model, action);
}
- hide_context_entries(menu, items, disabled_items);
-*/
}
LLUIImagePtr LLNotecardBridge::getIcon() const
diff --git a/linden/indra/newview/llinventorybridge.h b/linden/indra/newview/llinventorybridge.h
index 2ad4b3a..b703d07 100644
--- a/linden/indra/newview/llinventorybridge.h
+++ b/linden/indra/newview/llinventorybridge.h
@@ -477,6 +477,7 @@ public:
virtual LLUIImagePtr getIcon() const;
virtual void openItem();
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
+ virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action);
protected:
LLNotecardBridge(LLInventoryPanel* inventory, const LLUUID& uuid) :
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml b/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
index 8d5f1fe..2c837a2 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
@@ -141,10 +141,14 @@
name="Open" width="128">
-
+
+
+
+
--
cgit v1.1