diff options
author | Josh Bell <josh@lindenlab.com> | 2007-02-20 22:02:36 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-02-20 22:02:36 +0000 |
commit | 7dada07dbaae3dfb9b1319453e51019bfff2717f (patch) | |
tree | a7f2b84ea65c39cee31474640dd5f265c0b2f432 /indra/newview | |
parent | 73bc0fb42b5bcd80030d9f30d5cb57ec2397ba08 (diff) |
svn merge -r 57620:58007 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterbuycurrency.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterbuyland.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llfloatersellland.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llhudobject.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llimpanel.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llimpanel.h | 2 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 17 | ||||
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 13 | ||||
-rw-r--r-- | indra/newview/lltooldraganddrop.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llviewercontrol.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llworldmap.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llworldmapview.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llworldmapview.h | 4 |
16 files changed, 65 insertions, 55 deletions
diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index 55667b55e1..b49dfbff34 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -166,7 +166,7 @@ BOOL LLFloaterBuyCurrencyUI::canClose() void LLFloaterBuyCurrencyUI::onClose(bool app_quitting) { LLFloater::onClose(app_quitting); - delete this; + destroy(); } void LLFloaterBuyCurrencyUI::updateUI() diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index e0af892878..03a94aed63 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -993,7 +993,7 @@ BOOL LLFloaterBuyLandUI::canClose() void LLFloaterBuyLandUI::onClose(bool app_quitting) { LLFloater::onClose(app_quitting); - delete this; + destroy(); } diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 098417d1b4..75a87233f0 100755 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -148,7 +148,7 @@ void LLFloaterSellLandUI::SelectionObserver::changed() void LLFloaterSellLandUI::onClose(bool app_quitting) { LLFloater::onClose(app_quitting); - delete this; + destroy(); } BOOL LLFloaterSellLandUI::postBuild() diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index 403e6c6dff..1c8c45a078 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -148,7 +148,7 @@ LLHUDObject *LLHUDObject::addHUDObject(const U8 type) ((LLHUDEffectSpiral *)hud_objectp)->setColor(LLColor4U(255, 255, 255, 255)); break; case LL_HUD_EFFECT_GLOW: - llerrs << "Glow not implemented!" << llendl; + // deprecated break; case LL_HUD_EFFECT_POINT: hud_objectp = new LLHUDEffectSpiral(type); diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index b7a29b63b9..83c08ec602 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -592,7 +592,7 @@ void LLFloaterIMPanel::onInputEditorKeystroke(LLLineEditor* caller, void* userda } } -void LLFloaterIMPanel::close(bool app_quitting) +void LLFloaterIMPanel::onClose(bool app_quitting) { setTyping(FALSE); diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h index caed94ebc1..d54ac794b7 100644 --- a/indra/newview/llimpanel.h +++ b/indra/newview/llimpanel.h @@ -37,7 +37,7 @@ public: // Check typing timeout timer. /*virtual*/ void draw(); - /*virtual*/ void close(bool app_quitting = FALSE); + /*virtual*/ void onClose(bool app_quitting = FALSE); // add target ids to the session. // Return TRUE if successful, otherwise FALSE. diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b1b57fb003..f4280aae9c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -327,6 +327,14 @@ void hideContextEntries(LLMenuGL& menu, for (itor = list->begin(); itor != list->end(); ++itor) { LLString name = (*itor)->getName(); + + // descend into split menus: + if ((name == "More") && (WIDGET_TYPE_MENU_ITEM_BRANCH == (*itor)->getWidgetType())) + { + hideContextEntries(*((LLMenuItemBranchGL *)(*itor))->getBranch(), entries_to_show, disabled_entries); + } + + bool found = false; std::vector<LLString>::const_iterator itor2; for (itor2 = entries_to_show.begin(); itor2 != entries_to_show.end(); ++itor2) @@ -1758,6 +1766,14 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) LLInventoryModel* model = mInventoryPanel->getModel(); if(!model) return; LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); + LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND); + + if (lost_and_found_id == mUUID) + { + // This is the lost+found folder. + mItems.push_back("Empty Lost And Found"); + } + if(trash_id == mUUID) { // This is the trash. diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 7bd6c9ad82..fc95ebd067 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -63,7 +63,6 @@ #include "lleventnotifier.h" #include "llface.h" #include "llfeaturemanager.h" -#include "llfloateraccounthistory.h" #include "llfloaterchat.h" #include "llfloatergesture.h" #include "llfloaterland.h" @@ -2287,11 +2286,11 @@ BOOL idle_startup() // JC - 7/20/2002 gViewerWindow->sendShapeToSim(); + // Ignore stipend information for now. Money history is on the web site. // if needed, show the money history window - if (stipend_since_login && !gNoRender) - { - LLFloaterAccountHistory::show(NULL); - } + //if (stipend_since_login && !gNoRender) + //{ + //} if (!gAgent.isFirstLogin()) { @@ -3125,14 +3124,6 @@ void register_viewer_callbacks(LLMessageSystem* msg) msg->setHandlerFuncFast(_PREHASH_GrantGodlikePowers, process_grant_godlike_powers); - msg->setHandlerFuncFast(_PREHASH_MoneySummaryReply, - LLFloaterAccountHistory::processMoneySummaryReply); - msg->setHandlerFuncFast(_PREHASH_MoneyDetailsReply, - LLFloaterAccountHistory::processMoneyDetailsReply); - msg->setHandlerFuncFast(_PREHASH_MoneyTransactionsReply, - LLFloaterAccountHistory::processMoneyTransactionsReply); - - // ASDF msg->setHandlerFuncFast(_PREHASH_GroupAccountSummaryReply, LLGroupMoneyPlanningTabEventHandler::processGroupAccountSummaryReply); msg->setHandlerFuncFast(_PREHASH_GroupAccountDetailsReply, diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index b2f2a861ed..794281965e 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -212,7 +212,8 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mInventoryPanel->setAutoSelectOverride(true); mInventoryPanel->setFilterTypes(filter_types); - mInventoryPanel->setFilterPermMask(getFilterPermMask()); + //mInventoryPanel->setFilterPermMask(getFilterPermMask()); //Commented out due to no-copy texture loss. + mInventoryPanel->setFilterPermMask(immediate_filter_perm_mask); mInventoryPanel->setSelectCallback(onSelectionChange, this); mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); mInventoryPanel->setAllowMultiSelect(FALSE); @@ -350,7 +351,8 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop( if (mod) item_perm_mask |= PERM_MODIFY; if (xfer) item_perm_mask |= PERM_TRANSFER; - PermissionMask filter_perm_mask = getFilterPermMask(); + //PermissionMask filter_perm_mask = getFilterPermMask(); Commented out due to no-copy texture loss. + PermissionMask filter_perm_mask = mImmediateFilterPermMask; if ( (item_perm_mask & filter_perm_mask) == filter_perm_mask ) { if (drop) @@ -729,7 +731,7 @@ void LLFloaterTexturePicker::onApplyImmediateCheck(LLUICtrl* ctrl, void *user_da void LLFloaterTexturePicker::updateFilterPermMask() { - mInventoryPanel->setFilterPermMask( getFilterPermMask() ); + //mInventoryPanel->setFilterPermMask( getFilterPermMask() ); Commented out due to no-copy texture loss. } void LLFloaterTexturePicker::onSearchEdit(const LLString& search_string, void* user_data ) @@ -1252,8 +1254,9 @@ BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item) if (mod) item_perm_mask |= PERM_MODIFY; if (xfer) item_perm_mask |= PERM_TRANSFER; - PermissionMask filter_perm_mask = mCanApplyImmediately ? - mImmediateFilterPermMask : mNonImmediateFilterPermMask; +// PermissionMask filter_perm_mask = mCanApplyImmediately ? commented out due to no-copy texture loss. +// mImmediateFilterPermMask : mNonImmediateFilterPermMask; + PermissionMask filter_perm_mask = mImmediateFilterPermMask; if ( (item_perm_mask & filter_perm_mask) == filter_perm_mask ) { if(mDragCallback) diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 94b549b8e6..5d7b323660 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1185,6 +1185,8 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, return TRUE; } + if (!item) return FALSE; + LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); if(!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())) { @@ -1217,6 +1219,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, return FALSE; } } +std::cout << "ASSET ID: " << new_item->getAssetUUID() << "\n"; hit_obj->updateInventory(new_item, TASK_INVENTORY_ASSET_KEY, true); } else if(!item->getPermissions().allowOperationBy(PERM_TRANSFER, @@ -1230,6 +1233,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, // *FIX: may want to make sure agent can paint hit_obj. // make sure the object has the texture in it's inventory. +std::cout << "ASSET ID: " << new_item->getAssetUUID() << "\n"; hit_obj->updateInventory(new_item, TASK_INVENTORY_ASSET_KEY, true); } return TRUE; @@ -2305,6 +2309,12 @@ EAcceptance LLToolDragAndDrop::dad3dTextureObject( { return ACCEPT_NO_LOCKED; } + //If texture !copyable don't texture or you'll never get it back. + if(!item->getPermissions().allowCopyBy(gAgent.getID())) + { + return ACCEPT_NO; + } + if(drop && (ACCEPT_YES_SINGLE <= rv)) { if((mask & MASK_SHIFT)) diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 99cae9979c..225d599838 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -86,7 +86,7 @@ BOOL LLFloaterSettingsDebug::postBuild() childSetUserData("boolean_combo", this); childSetCommitCallback("color_swatch", onCommitSettings); childSetUserData("color_swatch", this); - + childSetAction("default_btn", onClickDefault, this); mComment = (LLTextEditor*)getChildByName("comment_text"); return TRUE; } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 7a48367a47..240100be61 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -655,7 +655,7 @@ void copy_inventory_item( msg->addUUIDFast(_PREHASH_OldAgentID, current_owner); msg->addUUIDFast(_PREHASH_OldItemID, item_id); msg->addUUIDFast(_PREHASH_NewFolderID, parent_id); - msg->addString("NewName", new_name); + msg->addStringFast(_PREHASH_NewName, new_name); gAgent.sendReliableMessage(); } @@ -672,11 +672,11 @@ void move_inventory_item( msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, agent_id); msg->addUUIDFast(_PREHASH_SessionID, session_id); - msg->addBOOLFast(_PREHASH_Stamp, false); + msg->addBOOLFast(_PREHASH_Stamp, FALSE); msg->nextBlockFast(_PREHASH_InventoryData); msg->addUUIDFast(_PREHASH_ItemID, item_id); msg->addUUIDFast(_PREHASH_FolderID, parent_id); - msg->addString("NewName", new_name); + msg->addStringFast(_PREHASH_NewName, new_name); gAgent.sendReliableMessage(); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9b6fc425fa..c7bd6b51e4 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -89,7 +89,6 @@ #include "llfloaterland.h" #include "llfloaterlandholdings.h" #include "llfloatermap.h" -#include "llfloateraccounthistory.h" #include "llfloaterimagepreview.h" #include "llfloatermute.h" #include "llfloaternamedesc.h" @@ -5215,15 +5214,23 @@ void upload_error(const char* error_message, const char* label, const std::strin LLFilePicker::instance().reset(); } +class LLFileEnableCloseWindow : public view_listener_t +{ + bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) + { + bool new_value = gFloaterView->getFocusedFloater() != NULL || gSnapshotFloaterView->getFocusedFloater() != NULL; + // horrendously opaque, this code + gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); + return true; + } +}; + class LLFileCloseWindow : public view_listener_t { bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) { - LLFloater *top = gFloaterView->getFrontmost(); - if (top && top->hasFocus()) - { - LLFloater::closeByMenu( top ); - } + LLFloater::closeFocusedFloater(); + return true; } }; @@ -6411,10 +6418,6 @@ class LLShowFloater : public view_listener_t { gDebugView->mStatViewp->setVisible(!gDebugView->mStatViewp->getVisible()); } - else if (floater_name == "account history") - { - LLFloaterAccountHistory::show(NULL); - } else if (floater_name == "my land") { LLFloaterLandHoldings::show(NULL); @@ -8615,6 +8618,7 @@ void initialize_menu_actions() (new LLFileUploadAnim())->registerListener(gMenuHolder, "File.UploadAnim"); (new LLFileUploadBulk())->registerListener(gMenuHolder, "File.UploadBulk"); (new LLFileCloseWindow())->registerListener(gMenuHolder, "File.CloseWindow"); + (new LLFileEnableCloseWindow())->registerListener(gMenuHolder, "File.EnableCloseWindow"); (new LLFileSaveTexture())->registerListener(gMenuHolder, "File.SaveTexture"); (new LLFileTakeSnapshot())->registerListener(gMenuHolder, "File.TakeSnapshot"); (new LLFileTakeSnapshotToDisk())->registerListener(gMenuHolder, "File.TakeSnapshotToDisk"); diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp index 7a6b89fcda..59587ef13c 100644 --- a/indra/newview/llworldmap.cpp +++ b/indra/newview/llworldmap.cpp @@ -247,7 +247,6 @@ void LLWorldMap::setCurrentLayer(S32 layer, bool request_layer) if (!mMapLoaded[layer] || request_layer) { sendMapLayerRequest(); - sendItemRequest(MAP_ITEM_AGENT_COUNT); } if (mTelehubs.size() == 0 || @@ -698,12 +697,6 @@ void LLWorldMap::processMapItemReply(LLMessageSystem* msg, void**) gWorldMap->mClassifieds.push_back(new_item); break; } - case MAP_ITEM_AGENT_COUNT: // agent counts - { - // We only ever receive one per region, i.e. this update superceeds any others - gWorldMap->mNumAgents[new_item.mRegionHandle] = new_item.mExtra; - break; - } case MAP_ITEM_AGENT_LOCATIONS: // agent locations { if (!siminfo) diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 3644bd0640..10994d38d2 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -148,8 +148,7 @@ LLWorldMapView::LLWorldMapView(const std::string& name, const LLRect& rect ) mMouseDownPanY( 0 ), mMouseDownX( 0 ), mMouseDownY( 0 ), - mSelectIDStart(0), - mAgentCountsUpdateTime(0) + mSelectIDStart(0) { sPixelsPerMeter = gMapScale / REGION_WIDTH_METERS; clearLastClick(); @@ -279,12 +278,6 @@ void LLWorldMapView::draw() F64 current_time = LLTimer::getElapsedSeconds(); - if (current_time - mAgentCountsUpdateTime > AGENT_COUNTS_UPDATE_TIME) - { - gWorldMap->sendItemRequest(MAP_ITEM_AGENT_COUNT); - mAgentCountsUpdateTime = current_time; - } - mVisibleRegions.clear(); // animate pan if necessary diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h index 7cf0f655a1..d0a6aeacb2 100644 --- a/indra/newview/llworldmapview.h +++ b/indra/newview/llworldmapview.h @@ -33,8 +33,9 @@ class LLTextBox; #define SIM_MAP_AGENT_SCALE 20 // width in pixels, where we start drawing agents #define SIM_MAP_SCALE 90 // width in pixels, where we start drawing sim tiles +// Updates for agent locations. #define AGENTS_UPDATE_TIME 60.0 // in seconds -#define AGENT_COUNTS_UPDATE_TIME 60.0 // in seconds + class LLWorldMapView : public LLPanel { @@ -164,7 +165,6 @@ public: static BOOL sHandledLastClick; S32 mSelectIDStart; - F64 mAgentCountsUpdateTime; typedef std::vector<U64> handle_list_t; handle_list_t mVisibleRegions; // set every frame |