diff options
Diffstat (limited to 'indra/newview')
21 files changed, 180 insertions, 146 deletions
diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index b2399d238b..dc6847f236 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -306,13 +306,16 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op ) } } -void LLColorSwatchCtrl::onFloaterClose() +// This is called when the main floatercustomize panel is closed. +// Since this class has pointers up to its parents, we need to cleanup +// this class first in order to avoid a crash. +void LLColorSwatchCtrl::onParentFloaterClosed() { LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get(); - if (pickerp) { pickerp->setSwatch(NULL); + pickerp->closeFloater(); } mPickerHandle.markDead(); diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h index 2f6aec85e8..4bb7d837cb 100644 --- a/indra/newview/llcolorswatch.h +++ b/indra/newview/llcolorswatch.h @@ -105,7 +105,7 @@ public: /*virtual*/ void setEnabled( BOOL enabled ); static void onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE ); - void onFloaterClose(); + void onParentFloaterClosed(); protected: BOOL mValid; diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 56b56dc3d2..73b79d8e13 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -241,16 +241,6 @@ BOOL LLFloaterColorPicker::postBuild() return TRUE; } -/*virtual*/ -void LLFloaterColorPicker::onClose(bool app_settings) -{ - if (mSwatch) - { - mSwatch->onFloaterClose(); - } - stopUsingPipette(); -} - ////////////////////////////////////////////////////////////////////////////// // void LLFloaterColorPicker::initUI ( F32 rValIn, F32 gValIn, F32 bValIn ) diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h index b381740acd..0bbbe2051c 100644 --- a/indra/newview/llfloatercolorpicker.h +++ b/indra/newview/llfloatercolorpicker.h @@ -56,7 +56,6 @@ class LLFloaterColorPicker // overrides virtual BOOL postBuild (); - virtual void onClose(bool app_settings); virtual void draw (); virtual BOOL handleMouseDown ( S32 x, S32 y, MASK mask ); virtual BOOL handleMouseUp ( S32 x, S32 y, MASK mask ); diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 5bef306485..fe793fbcb8 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -40,6 +40,7 @@ #include "llinventoryfilter.h" #include "llpanel.h" #include "llviewercontrol.h" // gSavedSettings +#include "llviewerinventory.h" #include "llviewerwindow.h" // Argh, only for setCursor() // linden library includes @@ -603,6 +604,11 @@ const std::string& LLFolderViewItem::getSearchableLabel() const return mSearchableLabel; } +LLViewerInventoryItem * LLFolderViewItem::getInventoryItem(void) +{ + return gInventory.getItem(getListener()->getUUID()); +} + std::string LLFolderViewItem::getName( void ) const { if(mListener) diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 0ea031108b..43a5fd8de5 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -45,6 +45,7 @@ class LLFolderViewListenerFunctor; class LLInventoryFilter; class LLMenuGL; class LLUIImage; +class LLViewerInventoryItem; // These are grouping of inventory types. // Order matters when sorting system folders to the top. @@ -281,6 +282,9 @@ public: const LLFolderViewEventListener* getListener( void ) const { return mListener; } LLFolderViewEventListener* getListener( void ) { return mListener; } + + // Gets the inventory item if it exists (null otherwise) + LLViewerInventoryItem * getInventoryItem(void); // just rename the object. void rename(const std::string& new_name); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3746e9cfeb..52ebefabea 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3150,6 +3150,22 @@ void LLTextureBridge::openItem() } } +bool LLTextureBridge::canSaveTexture(void) +{ + const LLInventoryModel* model = getInventoryModel(); + if(!model) + { + return false; + } + + const LLViewerInventoryItem *item = model->getItem(mUUID); + if (item) + { + return item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED); + } + return false; +} + void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { lldebugs << "LLTextureBridge::buildContextMenu()" << llendl; @@ -3174,6 +3190,10 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Texture Separator")); items.push_back(std::string("Save As")); + if (!canSaveTexture()) + { + disabled_items.push_back(std::string("Save As")); + } } hide_context_entries(menu, items, disabled_items); } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 63be9dcdb8..5e4e89a71b 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -377,6 +377,7 @@ public: protected: LLTextureBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLInventoryType::EType type) : LLItemBridge(inventory, uuid), mInvType(type) {} + bool canSaveTexture(void); LLInventoryType::EType mInvType; }; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 4cbf27b725..92b9dc427f 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -903,13 +903,10 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) if (!auto_open) return NULL; // D. Open the inventory side panel and use that. - LLSideTray *side_tray = LLSideTray::getInstance(); + LLSD key; LLSidepanelInventory *sidepanel_inventory = - dynamic_cast<LLSidepanelInventory *>(side_tray->getPanel("sidepanel_inventory")); - - // Use the inventory side panel only if it is already active. - // Activating it may unexpectedly switch off the currently active tab in some cases. - if (sidepanel_inventory && (LLPanel*)side_tray->getActiveTab() == (LLPanel*)sidepanel_inventory) + dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->showPanel("sidepanel_inventory", key)); + if (sidepanel_inventory) { return sidepanel_inventory->getActivePanel(); } diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index e0f159cfeb..fff2575893 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -551,21 +551,21 @@ bool LLPanelGroup::canClose() break; if(!need_save) return false; - // If no message was provided, give a generic one.
- if (mesg.empty())
- {
- mesg = mDefaultNeedsApplyMesg;
- }
- // Create a notify box, telling the user about the unapplied tab.
- LLSD args;
- args["NEEDS_APPLY_MESSAGE"] = mesg;
- args["WANT_APPLY_MESSAGE"] = mWantApplyMesg;
-
- LLNotificationsUtil::add("SaveChanges", args, LLSD(), boost::bind(&LLPanelGroup::handleNotifyCallback,this, _1, _2));
-
- mShowingNotifyDialog = true;
-
- return false;
+ // If no message was provided, give a generic one. + if (mesg.empty()) + { + mesg = mDefaultNeedsApplyMesg; + } + // Create a notify box, telling the user about the unapplied tab. + LLSD args; + args["NEEDS_APPLY_MESSAGE"] = mesg; + args["WANT_APPLY_MESSAGE"] = mWantApplyMesg; + + LLNotificationsUtil::add("SaveChanges", args, LLSD(), boost::bind(&LLPanelGroup::handleNotifyCallback,this, _1, _2)); + + mShowingNotifyDialog = true; + + return false; } bool LLPanelGroup::notifyChildren(const LLSD& info) @@ -576,32 +576,32 @@ bool LLPanelGroup::notifyChildren(const LLSD& info) if (str_action == "quit" ) { - canClose();
- return true;
+ canClose(); + return true; } if(str_action == "wait_quit") return mShowingNotifyDialog; } return false; } -bool LLPanelGroup::handleNotifyCallback(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- mShowingNotifyDialog = false;
- switch (option)
- {
- case 0: // "Apply Changes"
- apply();
- break;
- case 1: // "Ignore Changes"
- break;
- case 2: // "Cancel"
- default:
- // Do nothing. The user is canceling the action.
- // If we were quitting, we didn't really mean it.
- LLAppViewer::instance()->abortQuit();
- break;
- }
- return false;
-}
+bool LLPanelGroup::handleNotifyCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + mShowingNotifyDialog = false; + switch (option) + { + case 0: // "Apply Changes" + apply(); + break; + case 1: // "Ignore Changes" + break; + case 2: // "Cancel" + default: + // Do nothing. The user is canceling the action. + // If we were quitting, we didn't really mean it. + LLAppViewer::instance()->abortQuit(); + break; + } + return false; +} diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 21627e84ff..cef21e85d6 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llpanelmaininventory.h" +#include "llagent.h" #include "lldndbutton.h" #include "llfilepicker.h" #include "llfloaterinventory.h" @@ -863,7 +864,6 @@ void LLPanelMainInventory::initListCommandsHandlers() mEnableCallbackRegistrar.add("Inventory.GearDefault.Enable", boost::bind(&LLPanelMainInventory::isActionEnabled, this, _2)); mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - } void LLPanelMainInventory::updateListCommands() @@ -909,6 +909,22 @@ void LLPanelMainInventory::onClipboardAction(const LLSD& userdata) getActivePanel()->getRootFolder()->doToSelected(getActivePanel()->getModel(),command_name); } +void LLPanelMainInventory::saveTexture(const LLSD& userdata) +{ + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (!current_item) + { + return; + } + + const LLUUID& item_id = current_item->getListener()->getUUID(); + LLPreviewTexture* preview_texture = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(item_id), TAKE_FOCUS_YES); + if (preview_texture) + { + preview_texture->openToSave(); + } +} + void LLPanelMainInventory::onCustomAction(const LLSD& userdata) { if (!isActionEnabled(userdata)) @@ -953,18 +969,7 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } if (command_name == "save_texture") { - LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); - if (!current_item) - { - return; - } - - const LLUUID& item_id = current_item->getListener()->getUUID(); - LLPreviewTexture* preview_texture = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(item_id), TAKE_FOCUS_YES); - if (preview_texture) - { - preview_texture->openToSave(); - } + saveTexture(userdata); } // This doesn't currently work, since the viewer can't change an assetID an item. if (command_name == "regenerate_link") @@ -1008,6 +1013,22 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } } +bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata) +{ + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (current_item) + { + LLViewerInventoryItem *inv_item = current_item->getInventoryItem(); + if(inv_item) + { + bool can_save = inv_item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED); + LLInventoryType::EType curr_type = current_item->getListener()->getInventoryType(); + return can_save && (curr_type == LLInventoryType::IT_TEXTURE || curr_type == LLInventoryType::IT_SNAPSHOT); + } + } + return false; +} + BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) { const std::string command_name = userdata.asString(); @@ -1035,12 +1056,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) } if (command_name == "save_texture") { - LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); - if (current_item) - { - return (current_item->getListener()->getInventoryType() == LLInventoryType::IT_TEXTURE); - } - return FALSE; + return isSaveTextureEnabled(userdata); } if (command_name == "find_original") { diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index ae78d3bec8..92443df369 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -110,6 +110,8 @@ protected: void doCreate(const LLSD& userdata); void resetFilters(); void setSortBy(const LLSD& userdata); + void saveTexture(const LLSD& userdata); + bool isSaveTextureEnabled(const LLSD& userdata); private: LLFloaterInventoryFinder* getFinder(); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 9d38dab26e..43366ef814 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -157,7 +157,7 @@ LLInventoryItem* LLTaskInvFVBridge::findItem() const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { - return (LLInventoryItem*)(object->getInventoryObject(mUUID)); + return dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mUUID)); } return NULL; } @@ -712,6 +712,7 @@ public: virtual LLUIImagePtr getIcon() const; virtual const std::string& getDisplayName() const { return getName(); } virtual BOOL isItemRenameable() const; + // virtual BOOL isItemCopyable() const { return FALSE; } virtual BOOL renameItem(const std::string& new_name); virtual BOOL isItemRemovable(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 698f6152b4..26694ac433 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -76,29 +76,12 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key) mAspectRatio(0.f), mPreviewToSave(FALSE) { - const LLInventoryItem *item = getItem(); + const LLViewerInventoryItem *item = static_cast<const LLViewerInventoryItem*>(getItem()); if(item) { mShowKeepDiscard = item->getPermissions().getCreator() != gAgent.getID(); mImageID = item->getAssetUUID(); - const LLPermissions& perm = item->getPermissions(); - U32 mask = PERM_NONE; - if(perm.getOwner() == gAgent.getID()) - { - mask = perm.getMaskBase(); - } - else if(gAgent.isInGroup(perm.getGroup())) - { - mask = perm.getMaskGroup(); - } - else - { - mask = perm.getMaskEveryone(); - } - if((mask & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) - { - mIsCopyable = TRUE; - } + mIsCopyable = item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED); } else // not an item, assume it's an asset id { @@ -145,6 +128,9 @@ BOOL LLPreviewTexture::postBuild() childSetVisible("Discard", false); } + childSetAction("save_tex_btn", LLPreviewTexture::onSaveAsBtn, this); + childSetVisible("save_tex_btn", canSaveAs()); + if (!mCopyToInv) { const LLInventoryItem* item = getItem(); @@ -164,6 +150,13 @@ BOOL LLPreviewTexture::postBuild() return LLPreview::postBuild(); } +// static +void LLPreviewTexture::onSaveAsBtn(void* data) +{ + LLPreviewTexture* self = (LLPreviewTexture*)data; + self->saveAs(); +} + void LLPreviewTexture::draw() { if (mUpdateDimensions) @@ -576,6 +569,7 @@ void LLPreviewTexture::loadAsset() mImage->forceToSaveRawImage(0) ; mAssetStatus = PREVIEW_ASSET_LOADING; updateDimensions(); + childSetVisible("save_tex_btn", canSaveAs()); } LLPreview::EAssetStatus LLPreviewTexture::getAssetStatus() diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index 9b3c91d831..980aecee6d 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -58,7 +58,6 @@ public: virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); virtual void onFocusReceived(); - static void saveToFile(void* userdata); static void onFileLoadedForSave( BOOL success, LLViewerFetchedTexture *src_vi, @@ -68,6 +67,8 @@ public: BOOL final, void* userdata ); void openToSave(); + + static void onSaveAsBtn(void* data); protected: void init(); /* virtual */ BOOL postBuild(); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 4d6c19157a..44930f03c5 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5754,21 +5754,21 @@ void LLSelectMgr::redo() //----------------------------------------------------------------------------- BOOL LLSelectMgr::canDoDelete() const { - bool can_delete = false;
- // This function is "logically const" - it does not change state in
- // a way visible outside the selection manager.
- LLSelectMgr* self = const_cast<LLSelectMgr*>(this);
- LLViewerObject* obj = self->mSelectedObjects->getFirstDeleteableObject();
- // Note: Can only delete root objects (see getFirstDeleteableObject() for more info)
- if (obj!= NULL)
- {
- // all the faces needs to be selected
- if(self->mSelectedObjects->contains(obj,SELECT_ALL_TES ))
- {
- can_delete = true;
- }
- }
-
+ bool can_delete = false; + // This function is "logically const" - it does not change state in + // a way visible outside the selection manager. + LLSelectMgr* self = const_cast<LLSelectMgr*>(this); + LLViewerObject* obj = self->mSelectedObjects->getFirstDeleteableObject(); + // Note: Can only delete root objects (see getFirstDeleteableObject() for more info) + if (obj!= NULL) + { + // all the faces needs to be selected + if(self->mSelectedObjects->contains(obj,SELECT_ALL_TES )) + { + can_delete = true; + } + } + return can_delete; } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 9856cb2b7f..78cee15384 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1379,6 +1379,25 @@ LLViewerInventoryCategory *LLViewerInventoryItem::getLinkedCategory() const return NULL; } +bool LLViewerInventoryItem::checkPermissionsSet(PermissionMask mask) const +{ + const LLPermissions& perm = getPermissions(); + PermissionMask curr_mask = PERM_NONE; + if(perm.getOwner() == gAgent.getID()) + { + curr_mask = perm.getMaskBase(); + } + else if(gAgent.isInGroup(perm.getGroup())) + { + curr_mask = perm.getMaskGroup(); + } + else + { + curr_mask = perm.getMaskEveryone(); + } + return ((curr_mask & mask) == mask); +} + //---------- void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name) diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 0156e7dab1..412a2c66e6 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -158,6 +158,9 @@ public: bool getIsBrokenLink() const; // true if the baseitem this points to doesn't exist in memory. LLViewerInventoryItem *getLinkedItem() const; LLViewerInventoryCategory *getLinkedCategory() const; + + // Checks the items permissions (for owner, group, or everyone) and returns true if all mask bits are set. + bool checkPermissionsSet(PermissionMask mask) const; // callback void onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 4b0dc8f668..a1c3806b27 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -71,15 +71,6 @@ // system libraries #include <boost/tokenizer.hpp> -class LLFileEnableSaveAs : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - bool new_value = gFloaterView->getFrontmost() && gFloaterView->getFrontmost()->canSaveAs(); - return new_value; - } -}; - class LLFileEnableUpload : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -386,19 +377,6 @@ class LLFileCloseAllWindows : public view_listener_t } }; -class LLFileSaveTexture : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLFloater* top = gFloaterView->getFrontmost(); - if (top) - { - top->saveAs(); - } - return true; - } -}; - class LLFileTakeSnapshotToDisk : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -1050,10 +1028,10 @@ void init_menu_file() view_listener_t::addCommit(new LLFileCloseAllWindows(), "File.CloseAllWindows"); view_listener_t::addEnable(new LLFileEnableCloseWindow(), "File.EnableCloseWindow"); view_listener_t::addEnable(new LLFileEnableCloseAllWindows(), "File.EnableCloseAllWindows"); - view_listener_t::addCommit(new LLFileSaveTexture(), "File.SaveTexture"); view_listener_t::addCommit(new LLFileTakeSnapshotToDisk(), "File.TakeSnapshotToDisk"); view_listener_t::addCommit(new LLFileQuit(), "File.Quit"); view_listener_t::addEnable(new LLFileEnableUpload(), "File.EnableUpload"); - view_listener_t::addEnable(new LLFileEnableSaveAs(), "File.EnableSaveAs"); + + // "File.SaveTexture" moved to llpanelmaininventory so that it can be properly handled. } diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml index 52a19ac6b3..602a18ea56 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml @@ -61,7 +61,16 @@ name="Discard" top_delta="0" width="100" /> - <text + <button + follows="left|bottom" + height="22" + label="Save As" + layout="topleft" + left_pad="5" + name="save_tex_btn" + top_delta="0" + width="100" /> + <text type="string" length="1" follows="left|bottom" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 6f2d696e9e..0891afaf76 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1201,15 +1201,6 @@ function="ToggleControl" parameter="CompressSnapshotsToDisk" /> </menu_item_check> - <menu_item_call - label="Save Texture As" - layout="topleft" - name="Save Texture As"> - <menu_item_call.on_click - function="File.SaveTexture" /> - <menu_item_call.on_enable - function="File.EnableSaveAs" /> - </menu_item_call> <menu_item_separator layout="topleft" /> <menu |