diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/linux_tools/client-readme.txt | 5 | ||||
-rw-r--r-- | indra/newview/llagent.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterland.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llfloaterworldmap.cpp | 75 | ||||
-rw-r--r-- | indra/newview/llfloaterworldmap.h | 1 | ||||
-rw-r--r-- | indra/newview/llfolderview.cpp | 57 | ||||
-rw-r--r-- | indra/newview/llgesturemgr.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llpanelclassified.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llpanelclassified.h | 25 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 54 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewermenufile.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 204 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.h | 3 | ||||
-rw-r--r-- | indra/newview/llworldmap.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llworldmap.h | 4 | ||||
-rwxr-xr-x | indra/newview/viewer_manifest.py | 1 |
17 files changed, 318 insertions, 162 deletions
diff --git a/indra/newview/linux_tools/client-readme.txt b/indra/newview/linux_tools/client-readme.txt index 297fd0a063..e07384cc93 100644 --- a/indra/newview/linux_tools/client-readme.txt +++ b/indra/newview/linux_tools/client-readme.txt @@ -235,9 +235,8 @@ For problems and discussion concerning unofficial (not secondlife.com) releases, please contact your packager or the SLDev mailing list: <https://lists.secondlife.com/cgi-bin/mailman/listinfo/sldev> -In-world help: Please use the 'Help' menu in the client for general -non-Linux-specific Second Life help including live support from the fabulous -'Help Request' team. +In-world help: Please use the 'Help' menu in the client for various +non-Linux-specific Second Life help options. In-world discussion: There is a 'Linux Client Users' group inside Second Life which is free to join. You can find it by pressing diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index dbbe1affb9..45f0b448e2 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -6750,7 +6750,7 @@ void LLAgent::removeWearable( EWearableType type ) if( old_wearable->isDirty() ) { // Bring up view-modal dialog: Save changes? Yes, No, Cancel - gViewerWindow->alertXml("WearableSave", LLAgent::onRemoveWearableDialog, (void*)(S32)type ); + gViewerWindow->alertXml("WearableSave", LLAgent::onRemoveWearableDialog, (void*)type ); return; } else diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 1e9acc96c1..4b18c0c91a 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2453,6 +2453,10 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl *ctrl, void *userdata) U8 media_auto_scale = self->mMediaAutoScaleCheck->get(); LLUUID media_id = self->mMediaTextureCtrl->getImageAssetID(); + // Remove leading/trailing whitespace (common when copying/pasting) + LLString::trim(music_url); + LLString::trim(media_url); + // Push data into current parcel parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local); parcel->setMusicURL(music_url.c_str()); diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index d8ed27173d..365926863e 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -159,6 +159,8 @@ LLFloaterWorldMap::LLFloaterWorldMap() mCompletingRegionName(""), mWaitingForTracker(FALSE), mExactMatch(FALSE), + mIsClosing(FALSE), + mSetToUserPosition(TRUE), mTrackedLocation(0,0,0), mTrackedStatus(LLTracker::TRACKING_NOTHING) { @@ -335,6 +337,9 @@ void LLFloaterWorldMap::show(void*, BOOL center_on_target) gFloaterWorldMap->buildAvatarIDList(); gFloaterWorldMap->buildLandmarkIDLists(); + + // If nothing is being tracked, set flag so the user position will be found + gFloaterWorldMap->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING ); } if (center_on_target) @@ -497,7 +502,7 @@ void LLFloaterWorldMap::draw() childSetEnabled("Teleport", (BOOL)tracking_status); // childSetEnabled("Clear", (BOOL)tracking_status); childSetEnabled("Show Destination", (BOOL)tracking_status || gWorldMap->mIsTrackingUnknownLocation); - childSetEnabled("copy_slurl", (BOOL)tracking_status); + childSetEnabled("copy_slurl", (mSLURL.size() > 0) ); setMouseOpaque(TRUE); mDragHandle->setMouseOpaque(TRUE); @@ -641,7 +646,8 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global) return; } - LLString sim_name = gWorldMap->simNameFromPosGlobal( pos_global ); + LLString sim_name; + gWorldMap->simNameFromPosGlobal( pos_global, sim_name ); F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS ); F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS ); LLString full_name = llformat("%s (%d, %d, %d)", @@ -662,15 +668,51 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global) void LLFloaterWorldMap::updateLocation() { + bool gotSimName; + + LLTracker::ETrackingStatus status = LLTracker::getTrackingStatus(); + // These values may get updated by a message, so need to check them every frame // The fields may be changed by the user, so only update them if the data changes LLVector3d pos_global = LLTracker::getTrackedPositionGlobal(); if (pos_global.isExactlyZero()) { + LLVector3d agentPos = gAgent.getPositionGlobal(); + + // Set to avatar's current postion if nothing is selected + if ( status == LLTracker::TRACKING_NOTHING && mSetToUserPosition ) + { + // Make sure we know where we are before setting the current user position + LLString agent_sim_name; + gotSimName = gWorldMap->simNameFromPosGlobal( agentPos, agent_sim_name ); + if ( gotSimName ) + { + mSetToUserPosition = FALSE; + + // Fill out the location field + childSetValue("location", agent_sim_name); + + // Figure out where user is + LLVector3d agentPos = gAgent.getPositionGlobal(); + + S32 agent_x = llround( (F32)fmod( agentPos.mdV[VX], (F64)REGION_WIDTH_METERS ) ); + S32 agent_y = llround( (F32)fmod( agentPos.mdV[VY], (F64)REGION_WIDTH_METERS ) ); + S32 agent_z = llround( (F32)agentPos.mdV[VZ] ); + + childSetValue("spin x", LLSD(agent_x) ); + childSetValue("spin y", LLSD(agent_y) ); + childSetValue("spin z", LLSD(agent_z) ); + + // Set the current SLURL + mSLURL = LLWeb::escapeURL( llformat("http://slurl.com/secondlife/%s/%d/%d/%d", + agent_sim_name.c_str(), agent_x, agent_y, agent_z) ); + } + } + return; // invalid location } - LLTracker::ETrackingStatus status = LLTracker::getTrackingStatus(); - LLString sim_name = gWorldMap->simNameFromPosGlobal( pos_global ); + LLString sim_name; + gotSimName = gWorldMap->simNameFromPosGlobal( pos_global, sim_name ); if ((status != LLTracker::TRACKING_NOTHING) && (status != mTrackedStatus || pos_global != mTrackedLocation || sim_name != mTrackedSimName)) { @@ -697,8 +739,16 @@ void LLFloaterWorldMap::updateLocation() childSetValue("spin y", LLSD(region_y) ); childSetValue("spin z", LLSD((F32)pos_global.mdV[VZ]) ); - mSLURL = LLWeb::escapeURL(llformat("http://slurl.com/secondlife/%s/%d/%d/%d", - sim_name.c_str(), llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ]))); + // simNameFromPosGlobal can fail, so don't give the user an invalid SLURL + if ( gotSimName ) + { + mSLURL = LLWeb::escapeURL(llformat("http://slurl.com/secondlife/%s/%d/%d/%d", + sim_name.c_str(), llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ]))); + } + else + { // Empty SLURL will disable the "Copy SLURL to clipboard" button + mSLURL = ""; + } } } @@ -1082,6 +1132,9 @@ void LLFloaterWorldMap::onLandmarkComboCommit( LLUICtrl* ctrl, void* userdata ) self->trackLandmark( item_id); onShowTargetBtn(self); + + // Reset to user postion if nothing is tracked + self->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING ); } // static @@ -1133,6 +1186,10 @@ void LLFloaterWorldMap::onAvatarComboCommit( LLUICtrl* ctrl, void* userdata ) self->trackAvatar(new_avatar_id, name); onShowTargetBtn(self); } + else + { // Reset to user postion if nothing is tracked + self->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING ); + } } // static @@ -1188,6 +1245,8 @@ void LLFloaterWorldMap::onClearBtn(void* data) self->mTrackedStatus = LLTracker::TRACKING_NOTHING; LLTracker::stopTracking((void *)(intptr_t)TRUE); gWorldMap->mIsTrackingUnknownLocation = FALSE; + self->mSLURL = ""; // Clear the SLURL since it's invalid + self->mSetToUserPosition = TRUE; // Revert back to the current user position } // static @@ -1206,6 +1265,10 @@ void LLFloaterWorldMap::onShowTargetBtn(void* data) void LLFloaterWorldMap::onShowAgentBtn(void* data) { LLWorldMapView::setPan( 0, 0, FALSE); // FALSE == animate + + // Set flag so user's location will be displayed if not tracking anything else + LLFloaterWorldMap* self = (LLFloaterWorldMap*)data; + self->mSetToUserPosition = TRUE; } // static diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index 5867ea179c..37143b4c1b 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -156,6 +156,7 @@ protected: BOOL mExactMatch; BOOL mIsClosing; + BOOL mSetToUserPosition; LLVector3d mTrackedLocation; LLTracker::ETrackingStatus mTrackedStatus; diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 79e3315115..34a062576f 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -548,16 +548,15 @@ void LLFolderViewItem::rename(const LLString& new_name) if( !new_name.empty() ) { mLabel = new_name.c_str(); - BOOL is_renamed = TRUE; if( mListener ) { - is_renamed = mListener->renameItem(new_name); - } - if(mParentFolder && is_renamed) - { - mParentFolder->resort(this); + mListener->renameItem(new_name); + + if(mParentFolder) + { + mParentFolder->resort(this); + } } - //refresh(); } } @@ -2970,7 +2969,10 @@ void LLFolderView::sanitizeSelection() // store off current item in case it is automatically deselected // and we want to preserve context LLFolderViewItem* original_selected_item = getCurSelectedItem(); - + + // Cache "Show all folders" filter setting + BOOL show_all_folders = (getRoot()->getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS); + std::vector<LLFolderViewItem*> items_to_remove; selected_items_t::iterator item_iter; for (item_iter = mSelectedItems.begin(); item_iter != mSelectedItems.end(); ++item_iter) @@ -2981,10 +2983,20 @@ void LLFolderView::sanitizeSelection() BOOL visible = item->potentiallyVisible(); // initialize from filter state for this item // modify with parent open and filters states LLFolderViewFolder* parent_folder = item->getParentFolder(); - while(parent_folder) + if ( parent_folder ) { - visible = visible && parent_folder->isOpen() && parent_folder->potentiallyVisible(); - parent_folder = parent_folder->getParentFolder(); + if ( show_all_folders ) + { // "Show all folders" is on, so this folder is visible + visible = TRUE; + } + else + { // Move up through parent folders and see what's visible + while(parent_folder) + { + visible = visible && parent_folder->isOpen() && parent_folder->potentiallyVisible(); + parent_folder = parent_folder->getParentFolder(); + } + } } // deselect item if any ancestor is closed or didn't pass filter requirements. @@ -3000,7 +3012,7 @@ void LLFolderView::sanitizeSelection() for (other_item_iter = mSelectedItems.begin(); other_item_iter != mSelectedItems.end(); ++other_item_iter) { LLFolderViewItem* other_item = *other_item_iter; - for(LLFolderViewFolder* parent_folder = other_item->getParentFolder(); parent_folder; parent_folder = parent_folder->getParentFolder()) + for( parent_folder = other_item->getParentFolder(); parent_folder; parent_folder = parent_folder->getParentFolder()) { if (parent_folder == item) { @@ -3339,19 +3351,30 @@ void LLFolderView::openSelectedItems( void ) { S32 left, top; gFloaterView->getNewFloaterPosition(&left, &top); - LLMultiPreview* multi_previewp = new LLMultiPreview(LLRect(left, top, left + 300, top - 100)); - - LLFloater::setFloaterHost(multi_previewp); + gFloaterView->getNewFloaterPosition(&left, &top); + LLMultiProperties* multi_propertiesp = new LLMultiProperties(LLRect(left, top, left + 300, top - 100)); selected_items_t::iterator item_it; for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) { - (*item_it)->open(); /* Flawfinder: ignore */ + // IT_{OBJECT,ATTACHMENT} creates LLProperties + // floaters; others create LLPreviews. Put + // each one in the right type of container. + LLFolderViewEventListener* listener = (*item_it)->getListener(); + bool is_prop = listener && (listener->getInventoryType() == LLInventoryType::IT_OBJECT || listener->getInventoryType() == LLInventoryType::IT_ATTACHMENT); + if (is_prop) + LLFloater::setFloaterHost(multi_propertiesp); + else + LLFloater::setFloaterHost(multi_previewp); + (*item_it)->open(); } LLFloater::setFloaterHost(NULL); - multi_previewp->open(); /* Flawfinder: ignore */ + // *NOTE: LLMulti* will safely auto-delete when open'd + // without any children. + multi_previewp->open(); + multi_propertiesp->open(); } } } diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index d66916e8f1..be1c26381b 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -186,6 +186,11 @@ void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id, BOOL inform_server, BOOL deactivate_similar) { + if( !gAssetStorage ) + { + llwarns << "LLGestureManager::activateGestureWithAsset without valid gAssetStorage" << llendl; + return; + } // If gesture is already active, nothing to do. if (isGestureActive(item_id)) { diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index b9b9cda4e8..afba55f4aa 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -85,20 +85,20 @@ LLPanelClassified::LLPanelClassified(BOOL in_finder) mPriceForListing(0), mDataRequested(FALSE), mPaidFor(FALSE), - mPosGlobal(), - mSnapshotCtrl(NULL), - mNameEditor(NULL), - mDescEditor(NULL), - mLocationEditor(NULL), + mPosGlobal(), + mSnapshotCtrl(NULL), + mNameEditor(NULL), + mDescEditor(NULL), + mLocationEditor(NULL), mCategoryCombo(NULL), + mMatureCheck(NULL), + mAutoRenewCheck(NULL), mUpdateBtn(NULL), - mTeleportBtn(NULL), - mMapBtn(NULL), + mTeleportBtn(NULL), + mMapBtn(NULL), mProfileBtn(NULL), mInfoText(NULL), - mMatureCheck(NULL), - mAutoRenewCheck(NULL), - mSetBtn(NULL), + mSetBtn(NULL), mClickThroughText(NULL) { sAllPanels.push_back(this); @@ -825,6 +825,7 @@ void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data) void LLPanelClassified::onFocusReceived(LLUICtrl* ctrl, void* data) { // allow the data to be saved + // Dave/Simon TODO: replace this with better isDirty() functionality onCommitAny(ctrl, data); } diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h index ca6a05eb31..21f6f9263c 100644 --- a/indra/newview/llpanelclassified.h +++ b/indra/newview/llpanelclassified.h @@ -95,8 +95,8 @@ protected: BOOL mInFinder; bool mDirty; bool mForceClose; - LLUUID mClassifiedID; - LLUUID mRequestedID; + LLUUID mClassifiedID; + LLUUID mRequestedID; LLUUID mCreatorID; LLUUID mParcelID; S32 mPriceForListing; @@ -109,24 +109,25 @@ protected: BOOL mPaidFor; LLString mSimName; - LLVector3d mPosGlobal; + LLVector3d mPosGlobal; - LLTextureCtrl* mSnapshotCtrl; - LLLineEditor* mNameEditor; + // Values the user may change + LLTextureCtrl* mSnapshotCtrl; + LLLineEditor* mNameEditor; LLLineEditor* mDateEditor; - LLTextEditor* mDescEditor; - LLLineEditor* mLocationEditor; + LLTextEditor* mDescEditor; + LLLineEditor* mLocationEditor; LLComboBox* mCategoryCombo; + LLCheckBoxCtrl* mMatureCheck; + LLCheckBoxCtrl* mAutoRenewCheck; LLButton* mUpdateBtn; - LLButton* mTeleportBtn; - LLButton* mMapBtn; + LLButton* mTeleportBtn; + LLButton* mMapBtn; LLButton* mProfileBtn; LLTextBox* mInfoText; - LLCheckBoxCtrl* mMatureCheck; - LLCheckBoxCtrl* mAutoRenewCheck; - LLButton* mSetBtn; + LLButton* mSetBtn; LLTextBox* mClickThroughText; LLRect mSnapshotSize; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index ab735c97ad..117f020793 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -191,6 +191,7 @@ static bool gGotUseCircuitCodeAck = false; LLString gInitialOutfit; LLString gInitialOutfitGender; // "male" or "female" +static bool gUseCircuitCallbackCalled = false; // // local function declaration @@ -775,6 +776,15 @@ BOOL idle_startup() snprintf(gUserServerName, MAX_STRING, "%s", server_label.c_str()); /* Flawfinder: ignore */ } + // Dave S temp reversion of SL-49082 fix - this code breaks command line urls. I'll fix this with + // the control isDirty() functionality tomorrow. + + //if ( userPickedServer ) + //{ // User picked a grid from the popup, so clear the stored urls so they will be re-generated from gUserServerChoice + // auth_uris.clear(); + // resetURIs(); + //} + LLString location; LLPanelLogin::getLocation( location ); LLURLSimString::setString( location ); @@ -1514,12 +1524,21 @@ BOOL idle_startup() { update_texture_fetch(); + if ( gViewerWindow != NULL && gToolMgr != NULL ) + { // This isn't the first logon attempt, so show the UI + gViewerWindow->setNormalControlsVisible( TRUE ); + } + // Initialize UI if (!gNoRender) { // Initialize all our tools. Must be done after saved settings loaded. - gToolMgr = new LLToolMgr(); - gToolMgr->initTools(); + if ( gToolMgr == NULL ) + { + gToolMgr = new LLToolMgr(); + gToolMgr->initTools(); + } + // Quickly get something onscreen to look at. gViewerWindow->initWorldUI(); @@ -1550,14 +1569,20 @@ BOOL idle_startup() gXferManager->registerCallbacks(gMessageSystem); - gCacheName = new LLCacheName(gMessageSystem); - gCacheName->addObserver(callback_cache_name); - - // Load stored cache if possible - load_name_cache(); + if ( gCacheName == NULL ) + { + gCacheName = new LLCacheName(gMessageSystem); + gCacheName->addObserver(callback_cache_name); + + // Load stored cache if possible + load_name_cache(); + } // Data storage for map of world. - gWorldMap = new LLWorldMap(); + if ( gWorldMap == NULL ) + { + gWorldMap = new LLWorldMap(); + } // register null callbacks for audio until the audio system is initialized gMessageSystem->setHandlerFuncFast(_PREHASH_SoundTrigger, null_message_callback, NULL); @@ -1639,6 +1664,9 @@ BOOL idle_startup() { llwarns << "Attempting to connect to simulator with a zero circuit code!" << llendl; } + + gUseCircuitCallbackCalled = FALSE; + msg->enableCircuit(first_sim, TRUE); // now, use the circuit info to tell simulator about us! llinfos << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << llendl; @@ -2780,10 +2808,9 @@ void use_circuit_callback(void**, S32 result) { // bail if we're quitting. if(gQuit) return; - static bool called = false; - if(!called) + if( !gUseCircuitCallbackCalled ) { - called = true; + gUseCircuitCallbackCalled = true; if (result) { // Make sure user knows something bad happened. JC @@ -3701,5 +3728,8 @@ void reset_login() { gStartupState = STATE_LOGIN_SHOW; - // do cleanup here of in-world UI? + if ( gViewerWindow ) + { // Hide menus and normal buttons + gViewerWindow->setNormalControlsVisible( FALSE ); + } } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3e097d5600..bc0be1b5a2 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7431,7 +7431,7 @@ class LLViewCheckRenderType : public view_listener_t bool new_value = false; if (type == "particles") { - new_value = LLPipeline::toggleRenderTypeControlNegated((void *)(S32)LLPipeline::RENDER_TYPE_PARTICLES); + new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES); } gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); return true; diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 0038c0cf1c..7215f7948f 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -202,7 +202,7 @@ class LLFileUploadImage : public view_listener_t { bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) { - const char* filename = upload_pick((void *)(S32)LLFilePicker::FFLOAD_IMAGE); + const char* filename = upload_pick((void *)LLFilePicker::FFLOAD_IMAGE); if (filename) { LLFloaterImagePreview* floaterp = new LLFloaterImagePreview(filename); @@ -216,7 +216,7 @@ class LLFileUploadSound : public view_listener_t { bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) { - const char* filename = upload_pick((void*)((S32)LLFilePicker::FFLOAD_WAV)); + const char* filename = upload_pick((void*)LLFilePicker::FFLOAD_WAV); if (filename) { LLFloaterNameDesc* floaterp = new LLFloaterNameDesc(filename); @@ -230,7 +230,7 @@ class LLFileUploadAnim : public view_listener_t { bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) { - const char* filename = upload_pick((void*)((S32)LLFilePicker::FFLOAD_ANIM)); + const char* filename = upload_pick((void*)LLFilePicker::FFLOAD_ANIM); if (filename) { LLFloaterAnimPreview* floaterp = new LLFloaterAnimPreview(filename); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d6b5534153..dd2c1c6d76 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1813,117 +1813,120 @@ void LLViewerWindow::initWorldUI() S32 width = mRootView->getRect().getWidth(); LLRect full_window(0, height, width, 0); - LLRect bar_rect(-1, STATUS_BAR_HEIGHT, width+1, -1); - gToolBar = new LLToolBar("toolbar", bar_rect); - - LLRect chat_bar_rect(-1,CHAT_BAR_HEIGHT, width+1, -1); - chat_bar_rect.translate(0, STATUS_BAR_HEIGHT-1); - gChatBar = new LLChatBar("chat", chat_bar_rect); - - bar_rect.translate(0, STATUS_BAR_HEIGHT-1); - bar_rect.translate(0, CHAT_BAR_HEIGHT-1); - gOverlayBar = new LLOverlayBar("overlay", bar_rect); - - // panel containing chatbar, toolbar, and overlay, over floaters - LLRect bottom_rect(-1, 2*STATUS_BAR_HEIGHT + CHAT_BAR_HEIGHT, width+1, -1); - gBottomPanel = new LLBottomPanel("bottom panel", bottom_rect); + if ( gToolBar == NULL ) // Don't re-enter if objects are alreay created + { + LLRect bar_rect(-1, STATUS_BAR_HEIGHT, width+1, -1); + gToolBar = new LLToolBar("toolbar", bar_rect); - // the order here is important - gBottomPanel->addChild(gChatBar); - gBottomPanel->addChild(gToolBar); - gBottomPanel->addChild(gOverlayBar); - mRootView->addChild(gBottomPanel); + LLRect chat_bar_rect(-1,CHAT_BAR_HEIGHT, width+1, -1); + chat_bar_rect.translate(0, STATUS_BAR_HEIGHT-1); + gChatBar = new LLChatBar("chat", chat_bar_rect); - // View for hover information - gHoverView = new LLHoverView("gHoverView", full_window); - gHoverView->setVisible(TRUE); - mRootView->addChild(gHoverView); + bar_rect.translate(0, STATUS_BAR_HEIGHT-1); + bar_rect.translate(0, CHAT_BAR_HEIGHT-1); + gOverlayBar = new LLOverlayBar("overlay", bar_rect); - // - // Map - // - // TODO: Move instance management into class - gFloaterMap = new LLFloaterMap("Map"); - gFloaterMap->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); - gFloaterMap->setVisible( gSavedSettings.getBOOL("ShowMiniMap") ); + // panel containing chatbar, toolbar, and overlay, over floaters + LLRect bottom_rect(-1, 2*STATUS_BAR_HEIGHT + CHAT_BAR_HEIGHT, width+1, -1); + gBottomPanel = new LLBottomPanel("bottom panel", bottom_rect); - // keep onscreen - gFloaterView->adjustToFitScreen(gFloaterMap, FALSE); + // the order here is important + gBottomPanel->addChild(gChatBar); + gBottomPanel->addChild(gToolBar); + gBottomPanel->addChild(gOverlayBar); + mRootView->addChild(gBottomPanel); - if (gSavedSettings.getBOOL("ShowCameraControls")) - { - LLFloaterCamera::show(NULL); - } - - if (gSavedSettings.getBOOL("ShowMovementControls")) - { - LLFloaterMove::show(NULL); - } - - // Must have one global chat floater so it can actually store - // the history. JC - gFloaterChat = new LLFloaterChat(); - gFloaterChat->setVisible( FALSE ); + // View for hover information + gHoverView = new LLHoverView("gHoverView", full_window); + gHoverView->setVisible(TRUE); + mRootView->addChild(gHoverView); - if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) gFloaterChat->loadHistory(); + // + // Map + // + // TODO: Move instance management into class + gFloaterMap = new LLFloaterMap("Map"); + gFloaterMap->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); + gFloaterMap->setVisible( gSavedSettings.getBOOL("ShowMiniMap") ); - gIMView = new LLIMView("gIMView", LLRect() ); - gIMView->setFollowsAll(); - mRootView->addChild(gIMView); + // keep onscreen + gFloaterView->adjustToFitScreen(gFloaterMap, FALSE); - LLRect morph_view_rect = full_window; - morph_view_rect.stretch( -STATUS_BAR_HEIGHT ); - morph_view_rect.mTop = full_window.mTop - 32; - gMorphView = new LLMorphView("gMorphView", morph_view_rect ); - mRootView->addChild(gMorphView); - gMorphView->setVisible(FALSE); + if (gSavedSettings.getBOOL("ShowCameraControls")) + { + LLFloaterCamera::show(NULL); + } + + if (gSavedSettings.getBOOL("ShowMovementControls")) + { + LLFloaterMove::show(NULL); + } + + // Must have one global chat floater so it can actually store + // the history. JC + gFloaterChat = new LLFloaterChat(); + gFloaterChat->setVisible( FALSE ); + + if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) gFloaterChat->loadHistory(); + + gIMView = new LLIMView("gIMView", LLRect() ); + gIMView->setFollowsAll(); + mRootView->addChild(gIMView); + + LLRect morph_view_rect = full_window; + morph_view_rect.stretch( -STATUS_BAR_HEIGHT ); + morph_view_rect.mTop = full_window.mTop - 32; + gMorphView = new LLMorphView("gMorphView", morph_view_rect ); + mRootView->addChild(gMorphView); + gMorphView->setVisible(FALSE); - gFloaterMute = new LLFloaterMute(); - gFloaterMute->setVisible(FALSE); + gFloaterMute = new LLFloaterMute(); + gFloaterMute->setVisible(FALSE); - LLWorldMapView::initClass(); + LLWorldMapView::initClass(); - LLRect world_map_rect = gSavedSettings.getRect("FloaterWorldMapRect"); - // if 0,0,0,0 then use fullscreen - if (world_map_rect.mTop == 0 - && world_map_rect.mLeft == 0 - && world_map_rect.mRight == 0 - && world_map_rect.mBottom == 0) - { - world_map_rect.set(0, height-TOOL_BAR_HEIGHT, width, STATUS_BAR_HEIGHT); - world_map_rect.stretch(-4); - gSavedSettings.setRect("FloaterWorldMapRect", world_map_rect); - } - gFloaterWorldMap = new LLFloaterWorldMap(); - gFloaterWorldMap->setVisible(FALSE); + LLRect world_map_rect = gSavedSettings.getRect("FloaterWorldMapRect"); + // if 0,0,0,0 then use fullscreen + if (world_map_rect.mTop == 0 + && world_map_rect.mLeft == 0 + && world_map_rect.mRight == 0 + && world_map_rect.mBottom == 0) + { + world_map_rect.set(0, height-TOOL_BAR_HEIGHT, width, STATUS_BAR_HEIGHT); + world_map_rect.stretch(-4); + gSavedSettings.setRect("FloaterWorldMapRect", world_map_rect); + } + gFloaterWorldMap = new LLFloaterWorldMap(); + gFloaterWorldMap->setVisible(FALSE); - // - // Tools for building - // + // + // Tools for building + // - // Toolbox floater - init_menus(); + // Toolbox floater + init_menus(); - gFloaterTools = new LLFloaterTools(); - gFloaterTools->setVisible(FALSE); + gFloaterTools = new LLFloaterTools(); + gFloaterTools->setVisible(FALSE); - // Status bar - S32 menu_bar_height = gMenuBarView->getRect().getHeight(); - LLRect root_rect = gViewerWindow->getRootView()->getRect(); - LLRect status_rect(0, root_rect.getHeight(), root_rect.getWidth(), root_rect.getHeight() - menu_bar_height); - gStatusBar = new LLStatusBar("status", status_rect); - gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP); + // Status bar + S32 menu_bar_height = gMenuBarView->getRect().getHeight(); + LLRect root_rect = gViewerWindow->getRootView()->getRect(); + LLRect status_rect(0, root_rect.getHeight(), root_rect.getWidth(), root_rect.getHeight() - menu_bar_height); + gStatusBar = new LLStatusBar("status", status_rect); + gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP); - gStatusBar->reshape(root_rect.getWidth(), gStatusBar->getRect().getHeight(), TRUE); - gStatusBar->translate(0, root_rect.getHeight() - gStatusBar->getRect().getHeight()); - // sync bg color with menu bar - gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor() ); + gStatusBar->reshape(root_rect.getWidth(), gStatusBar->getRect().getHeight(), TRUE); + gStatusBar->translate(0, root_rect.getHeight() - gStatusBar->getRect().getHeight()); + // sync bg color with menu bar + gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor() ); - gViewerWindow->getRootView()->addChild(gStatusBar); + gViewerWindow->getRootView()->addChild(gStatusBar); - // menu holder appears on top to get first pass at all mouse events - gViewerWindow->getRootView()->sendChildToFront(gMenuHolder); + // menu holder appears on top to get first pass at all mouse events + gViewerWindow->getRootView()->sendChildToFront(gMenuHolder); + } } @@ -2144,6 +2147,23 @@ void LLViewerWindow::reshape(S32 width, S32 height) } } + +// Hide normal UI when a logon fails +void LLViewerWindow::setNormalControlsVisible( BOOL visible ) +{ + if ( gBottomPanel ) + gBottomPanel->setVisible( visible ); + + if ( gMenuBarView ) + gMenuBarView->setVisible( visible ); + + if ( gStatusBar ) + gStatusBar->setVisible( visible ); +} + + + + void LLViewerWindow::drawDebugText() { mDebugText->draw(); diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index af5ffd7914..91bf0d9918 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -154,6 +154,9 @@ public: BOOL handleKey(KEY key, MASK mask); void handleScrollWheel (S32 clicks); + // Hide normal UI when a logon fails, re-show everything when logon is attempted again + void setNormalControlsVisible( BOOL visible ); + // Handle the application becoming active (frontmost) or inactive //BOOL handleActivate(BOOL activate); diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp index e61b5f1af5..6fea695353 100644 --- a/indra/newview/llworldmap.cpp +++ b/indra/newview/llworldmap.cpp @@ -225,20 +225,25 @@ LLSimInfo* LLWorldMap::simInfoFromName(const LLString& sim_name) return sim_info; } -LLString LLWorldMap::simNameFromPosGlobal(const LLVector3d& pos_global) +bool LLWorldMap::simNameFromPosGlobal(const LLVector3d& pos_global, LLString & outSimName ) { + bool gotSimName = true; + U64 handle = to_region_handle(pos_global); sim_info_map_t::iterator it = mSimInfoMap.find(handle); if (it != mSimInfoMap.end()) { LLSimInfo* info = (*it).second; - return info->mName.c_str(); + outSimName = info->mName.c_str(); } else { - return "(unknown region)"; + gotSimName = false; + outSimName = "(unknown region)"; } + + return gotSimName; } void LLWorldMap::setCurrentLayer(S32 layer, bool request_layer) diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h index 76ab88de1e..bdf8a7e735 100644 --- a/indra/newview/llworldmap.h +++ b/indra/newview/llworldmap.h @@ -115,8 +115,8 @@ public: // Returns simulator information for named sim, or NULL if non-existent LLSimInfo* simInfoFromName(const LLString& sim_name); - // Returns simulator name - LLString simNameFromPosGlobal(const LLVector3d& pos_global); + // Gets simulator name for a global position, returns true if it was found + bool simNameFromPosGlobal(const LLVector3d& pos_global, LLString & outSimName ); // Sets the current layer void setCurrentLayer(S32 layer, bool request_layer = false); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 0fe81baae9..c93b302312 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -414,6 +414,7 @@ class Linux_i686Manifest(LinuxManifest): self.path("libuuid.so", "libuuid.so.1") self.path("libSDL-1.2.so.0") self.path("libELFIO.so") + #self.path("libresolv.so") - don't bundle #self.path("libtcmalloc.so.0") - bugged #self.path("libstacktrace.so.0") - probably bugged self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason |