summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorLogan Dethrow <log@lindenlab.com>2011-09-01 17:06:15 -0400
committerLogan Dethrow <log@lindenlab.com>2011-09-01 17:06:15 -0400
commit9a1e8d78fe461e5257ca76c295c4915f8719aa4d (patch)
treef7cd1dd498fc712c27b7159b21c062f35e3717f6 /indra/newview
parent342005cd92b6fafdb0fee1d59a3c8750ccb34f1c (diff)
parente62a4d4ec151e81f4dc68b29a009596d3d154d57 (diff)
Merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/llappviewer.cpp73
-rw-r--r--indra/newview/llappviewer.h2
-rw-r--r--indra/newview/lldrawpoolbump.cpp2
-rw-r--r--indra/newview/llfloaterpostcard.cpp4
-rw-r--r--indra/newview/llfolderview.cpp15
-rw-r--r--indra/newview/lllogininstance.cpp2
-rw-r--r--indra/newview/llsechandler_basic.cpp2
-rw-r--r--indra/newview/llsidetray.cpp13
-rw-r--r--indra/newview/llspatialpartition.cpp9
-rw-r--r--indra/newview/llspatialpartition.h2
-rw-r--r--indra/newview/llstartup.cpp32
-rw-r--r--indra/newview/lltoastnotifypanel.cpp25
-rw-r--r--indra/newview/llviewermenu.cpp128
-rw-r--r--indra/newview/llviewermessage.cpp81
-rw-r--r--indra/newview/llviewermessage.h1
-rw-r--r--indra/newview/llviewerregion.cpp1
-rw-r--r--indra/newview/llviewertexture.cpp22
-rw-r--r--indra/newview/llviewertexture.h1
-rw-r--r--indra/newview/llvocache.cpp18
-rwxr-xr-xindra/newview/llvovolume.cpp7
-rw-r--r--indra/newview/skins/default/xui/en/floater_postcard.xml12
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_login.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_terrain.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml5
-rw-r--r--indra/newview/tests/llsechandler_basic_test.cpp3
27 files changed, 327 insertions, 148 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 30e0b86a5a..43aa67e949 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4048,7 +4048,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://search-beta.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]</string>
+ <string>http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]</string>
</map>
<key>WebProfileURL</key>
<map>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 9b29d69cce..6a808b5daf 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -322,6 +322,41 @@ static std::string gLaunchFileOnQuit;
// Used on Win32 for other apps to identify our window (eg, win_setup)
const char* const VIEWER_WINDOW_CLASSNAME = "Second Life";
+//-- LLDeferredTaskList ------------------------------------------------------
+
+/**
+ * A list of deferred tasks.
+ *
+ * We sometimes need to defer execution of some code until the viewer gets idle,
+ * e.g. removing an inventory item from within notifyObservers() may not work out.
+ *
+ * Tasks added to this list will be executed in the next LLAppViewer::idle() iteration.
+ * All tasks are executed only once.
+ */
+class LLDeferredTaskList: public LLSingleton<LLDeferredTaskList>
+{
+ LOG_CLASS(LLDeferredTaskList);
+
+ friend class LLAppViewer;
+ typedef boost::signals2::signal<void()> signal_t;
+
+ void addTask(const signal_t::slot_type& cb)
+ {
+ mSignal.connect(cb);
+ }
+
+ void run()
+ {
+ if (!mSignal.empty())
+ {
+ mSignal();
+ mSignal.disconnect_all_slots();
+ }
+ }
+
+ signal_t mSignal;
+};
+
//----------------------------------------------------------------------------
// List of entries from strings.xml to always replace
@@ -732,6 +767,23 @@ bool LLAppViewer::init()
initThreads();
LL_INFOS("InitInfo") << "Threads initialized." << LL_ENDL ;
+ // Initialize settings early so that the defaults for ignorable dialogs are
+ // picked up and then correctly re-saved after launching the updater (STORM-1268).
+ LLUI::settings_map_t settings_map;
+ settings_map["config"] = &gSavedSettings;
+ settings_map["ignores"] = &gWarningSettings;
+ settings_map["floater"] = &gSavedSettings; // *TODO: New settings file
+ settings_map["account"] = &gSavedPerAccountSettings;
+
+ LLUI::initClass(settings_map,
+ LLUIImageList::getInstance(),
+ ui_audio_callback,
+ &LLUI::sGLScaleFactor);
+ LL_INFOS("InitInfo") << "UI initialized." << LL_ENDL ;
+
+ LLNotifications::instance();
+ LL_INFOS("InitInfo") << "Notifications initialized." << LL_ENDL ;
+
writeSystemInfo();
// Initialize updater service (now that we have an io pump)
@@ -773,19 +825,8 @@ bool LLAppViewer::init()
{
LLError::setPrintLocation(true);
}
-
- // Widget construction depends on LLUI being initialized
- LLUI::settings_map_t settings_map;
- settings_map["config"] = &gSavedSettings;
- settings_map["ignores"] = &gWarningSettings;
- settings_map["floater"] = &gSavedSettings; // *TODO: New settings file
- settings_map["account"] = &gSavedPerAccountSettings;
- LLUI::initClass(settings_map,
- LLUIImageList::getInstance(),
- ui_audio_callback,
- &LLUI::sGLScaleFactor);
-
+
// Setup paths and LLTrans after LLUI::initClass has been called
LLUI::setupPaths();
LLTransUtil::parseStrings("strings.xml", default_trans_args);
@@ -3823,6 +3864,11 @@ bool LLAppViewer::initCache()
}
}
+void LLAppViewer::addOnIdleCallback(const boost::function<void()>& cb)
+{
+ LLDeferredTaskList::instance().addTask(cb);
+}
+
void LLAppViewer::purgeCache()
{
LL_INFOS("AppCache") << "Purging Cache and Texture Cache..." << LL_ENDL;
@@ -4416,6 +4462,9 @@ void LLAppViewer::idle()
gAudiop->idle(max_audio_decode_time);
}
}
+
+ // Execute deferred tasks.
+ LLDeferredTaskList::instance().run();
// Handle shutdown process, for example,
// wait for floaters to close, send quit message,
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 61ee6a7cf1..32115e0e7b 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -164,6 +164,8 @@ public:
login_completed_signal_t mOnLoginCompleted;
boost::signals2::connection setOnLoginCompletedCallback( const login_completed_signal_t::slot_type& cb ) { return mOnLoginCompleted.connect(cb); }
+ void addOnIdleCallback(const boost::function<void()>& cb); // add a callback to fire (once) when idle
+
void purgeCache(); // Clear the local cache.
// mute/unmute the system's master audio
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 6f71c54f79..0742250b0b 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -155,6 +155,7 @@ void LLStandardBumpmap::addstandard()
LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id));
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setBoostLevel(LLViewerTexture::BOOST_BUMP) ;
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL );
+ gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->forceToSaveRawImage(0) ;
LLStandardBumpmap::sStandardBumpmapCount++;
}
@@ -1078,6 +1079,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
{
src_image->setBoostLevel(LLViewerTexture::BOOST_BUMP) ;
src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()), NULL );
+ src_image->forceToSaveRawImage(0) ;
}
}
}
diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp
index dd0b1d999c..3bcbb987f7 100644
--- a/indra/newview/llfloaterpostcard.cpp
+++ b/indra/newview/llfloaterpostcard.cpp
@@ -137,9 +137,9 @@ void LLFloaterPostcard::draw()
// first set the max extents of our preview
rect.translate(-rect.mLeft, -rect.mBottom);
- rect.mLeft += 280;
+ rect.mLeft += 320;
rect.mRight -= 10;
- rect.mTop -= 20;
+ rect.mTop -= 27;
rect.mBottom = rect.mTop - 130;
// then fix the aspect ratio
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 6461a5525e..ec162e00eb 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -1912,9 +1912,20 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
// when drop is not handled by child, it should be handled
// by the folder which is the hierarchy root.
- if (!handled && getListener()->getUUID().notNull())
+ if (!handled)
{
- LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+ if (getListener()->getUUID().notNull())
+ {
+ LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+ }
+ else
+ {
+ if (!mFolders.empty())
+ {
+ // dispatch to last folder as a hack to support "Contents" folder in object inventory
+ handled = mFolders.back()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
+ }
+ }
}
if (handled)
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index b20f89aa7c..f00d6087f9 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -568,7 +568,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
else
{
requested_options.append("basic-mode");
- requested_options.append("inventory-basic");
+ //requested_options.append("inventory-basic");
}
#endif
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index 904bb03270..8d64c8c04f 100644
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -1005,6 +1005,8 @@ void LLBasicCertificateStore::validate(int validation_policy,
LLPointer<LLCertificateChain> cert_chain,
const LLSD& validation_params)
{
+ // If --no-verify-ssl-cert was passed on the command line, stop right now.
+ if (gSavedSettings.getBOOL("NoVerifySSLCert")) return;
if(cert_chain->size() < 1)
{
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 651897a217..a7c4057846 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -496,7 +496,7 @@ public:
LLSideTray* side_tray = LLSideTray::getInstance();
// Check if the tab we are dragging is docked.
- if (!side_tray->isTabAttached(getName())) return FALSE;
+ if (!side_tray->isTabAttached(mTabName)) return FALSE;
// Same value is hardcoded in LLDragHandle::handleHover().
const S32 undock_threshold = 12;
@@ -505,7 +505,7 @@ public:
if (delta_x <= -undock_threshold || delta_x >= undock_threshold ||
delta_y <= -undock_threshold || delta_y >= undock_threshold)
{
- LLSideTrayTab* tab = side_tray->getTab(getName());
+ LLSideTrayTab* tab = side_tray->getTab(mTabName);
if (!tab) return FALSE;
tab->setDocked(false);
@@ -544,7 +544,12 @@ protected:
, mDragLastScreenX(0)
, mDragLastScreenY(0)
, mBadgeDriver(NULL)
- {}
+ {
+ // Find out the tab name to use in handleHover().
+ size_t pos = getName().find("_button");
+ llassert(pos != std::string::npos);
+ mTabName = getName().substr(0, pos);
+ }
friend class LLUICtrlFactory;
@@ -562,6 +567,7 @@ private:
S32 mDragLastScreenX;
S32 mDragLastScreenY;
+ std::string mTabName;
LLSideTrayTabBadgeDriver* mBadgeDriver;
};
@@ -679,6 +685,7 @@ LLSideTrayTab* LLSideTray::getTab(const std::string& name)
bool LLSideTray::isTabAttached(const std::string& name)
{
LLSideTrayTab* tab = getTab(name);
+ llassert(tab);
if (!tab) return false;
return std::find(mTabs.begin(), mTabs.end(), tab) != mTabs.end();
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index e23b431457..fd17781a2e 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -523,6 +523,11 @@ void LLSpatialGroup::clearDrawMap()
mDrawMap.clear();
}
+BOOL LLSpatialGroup::isHUDGroup()
+{
+ return mSpatialPartition && mSpatialPartition->isHUDPartition() ;
+}
+
BOOL LLSpatialGroup::isRecentlyVisible() const
{
return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < LLDrawable::getMinVisFrameRange() ;
@@ -4155,6 +4160,10 @@ void LLSpatialGroup::drawObjectBox(LLColor4 col)
drawBox(mObjectBounds[0], size);
}
+bool LLSpatialPartition::isHUDPartition()
+{
+ return mPartitionType == LLViewerRegion::PARTITION_HUD ;
+}
BOOL LLSpatialPartition::isVisible(const LLVector3& v)
{
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 54d5d36f6e..11955540c6 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -282,6 +282,7 @@ public:
LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part);
+ BOOL isHUDGroup() ;
BOOL isDead() { return isState(DEAD); }
BOOL isState(U32 state) const;
BOOL isOcclusionState(U32 state) const { return mOcclusionState[LLViewerCamera::sCurCameraID] & state ? TRUE : FALSE; }
@@ -470,6 +471,7 @@ public:
S32 cull(LLCamera &camera, std::vector<LLDrawable *>* results = NULL, BOOL for_select = FALSE); // Cull on arbitrary frustum
BOOL isVisible(const LLVector3& v);
+ bool isHUDPartition() ;
virtual LLSpatialBridge* asBridge() { return NULL; }
virtual BOOL isBridge() { return asBridge() != NULL; }
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 8c63ec983b..749acea6c1 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2579,22 +2579,32 @@ void init_start_screen(S32 location_id)
else if(!start_image_bmp->load(temp_str) )
{
LL_WARNS("AppInit") << "Bitmap load failed" << LL_ENDL;
- return;
+ gStartTexture = NULL;
}
+ else
+ {
+ gStartImageWidth = start_image_bmp->getWidth();
+ gStartImageHeight = start_image_bmp->getHeight();
- gStartImageWidth = start_image_bmp->getWidth();
- gStartImageHeight = start_image_bmp->getHeight();
+ LLPointer<LLImageRaw> raw = new LLImageRaw;
+ if (!start_image_bmp->decode(raw, 0.0f))
+ {
+ LL_WARNS("AppInit") << "Bitmap decode failed" << LL_ENDL;
+ gStartTexture = NULL;
+ }
+ else
+ {
+ raw->expandToPowerOfTwo();
+ gStartTexture = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE) ;
+ }
+ }
- LLPointer<LLImageRaw> raw = new LLImageRaw;
- if (!start_image_bmp->decode(raw, 0.0f))
+ if(gStartTexture.isNull())
{
- LL_WARNS("AppInit") << "Bitmap decode failed" << LL_ENDL;
- gStartTexture = NULL;
- return;
+ gStartTexture = LLViewerTexture::sBlackImagep ;
+ gStartImageWidth = gStartTexture->getWidth() ;
+ gStartImageHeight = gStartTexture->getHeight() ;
}
-
- raw->expandToPowerOfTwo();
- gStartTexture = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE) ;
}
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index fa91f129b8..6873cf058a 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -307,8 +307,14 @@ void LLToastNotifyPanel::updateButtonsLayout(const std::vector<index_button_pair
S32 bottom_offset = mIsScriptDialog ? (BTN_HEIGHT + IGNORE_BTN_TOP_DELTA + BOTTOM_PAD) : BOTTOM_PAD;
S32 max_width = mControlPanel->getRect().getWidth();
LLButton* ignore_btn = NULL;
+ LLButton* mute_btn = NULL;
for (std::vector<index_button_pair_t>::const_iterator it = buttons.begin(); it != buttons.end(); it++)
{
+ if (-2 == it->first)
+ {
+ mute_btn = it->second;
+ continue;
+ }
if (it->first == -1)
{
ignore_btn = it->second;
@@ -328,6 +334,8 @@ void LLToastNotifyPanel::updateButtonsLayout(const std::vector<index_button_pair
left = btn_rect.mLeft + btn_rect.getWidth() + h_pad;
mControlPanel->addChild(btn, -1);
}
+
+ U32 ignore_btn_width = 0;
if (mIsScriptDialog && ignore_btn != NULL)
{
LLRect ignore_btn_rect(ignore_btn->getRect());
@@ -340,8 +348,25 @@ void LLToastNotifyPanel::updateButtonsLayout(const std::vector<index_button_pair
ignore_btn_rect.setOriginAndSize(ignore_btn_left, BOTTOM_PAD,// always move ignore button at the bottom
ignore_btn_rect.getWidth(), ignore_btn_rect.getHeight());
ignore_btn->setRect(ignore_btn_rect);
+ ignore_btn_width = ignore_btn_rect.getWidth();
mControlPanel->addChild(ignore_btn, -1);
}
+
+ if (mIsScriptDialog && mute_btn != NULL)
+ {
+ LLRect mute_btn_rect(mute_btn->getRect());
+ S32 buttons_per_row = max_width / BUTTON_WIDTH; //assume that h_pad far less than BUTTON_WIDTH
+ // Place mute (Block) button to the left of the ignore button.
+ S32 mute_btn_left = buttons_per_row * BUTTON_WIDTH + (buttons_per_row - 1) * h_pad - mute_btn_rect.getWidth() - ignore_btn_width - (h_pad / 2);
+ if (mute_btn_left + mute_btn_rect.getWidth() > max_width) // make sure that the mute button is in panel
+ {
+ mute_btn_left = max_width - mute_btn_rect.getWidth() - 2 * HPAD;
+ }
+ mute_btn_rect.setOriginAndSize(mute_btn_left, BOTTOM_PAD,// always move mute button at the bottom
+ mute_btn_rect.getWidth(), mute_btn_rect.getHeight());
+ mute_btn->setRect(mute_btn_rect);
+ mControlPanel->addChild(mute_btn);
+ }
}
void LLToastNotifyPanel::adjustPanelForScriptNotice(S32 button_panel_width, S32 button_panel_height)
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index b29821479b..26599f557e 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -116,6 +116,8 @@
using namespace LLVOAvatarDefines;
+typedef LLPointer<LLViewerObject> LLViewerObjectPtr;
+
static boost::unordered_map<std::string, LLStringExplicit> sDefaultItemLabels;
BOOL enable_land_build(void*);
@@ -4010,23 +4012,21 @@ void handle_god_request_avatar_geometry(void *)
}
}
-
-void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
+static bool get_derezzable_objects(
+ EDeRezDestination dest,
+ std::string& error,
+ LLViewerRegion*& first_region,
+ LLDynamicArray<LLViewerObjectPtr>* derez_objectsp,
+ bool only_check = false)
{
- if(gAgentCamera.cameraMouselook())
- {
- gAgentCamera.changeCameraToDefault();
- }
- //gInventoryView->setPanelOpen(TRUE);
+ bool found = false;
- std::string error;
- LLDynamicArray<LLViewerObject*> derez_objects;
+ LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
// Check conditions that we can't deal with, building a list of
// everything that we'll actually be derezzing.
- LLViewerRegion* first_region = NULL;
- for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin();
- iter != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); iter++)
+ for (LLObjectSelection::valid_root_iterator iter = selection->valid_root_begin();
+ iter != selection->valid_root_end(); iter++)
{
LLSelectNode* node = *iter;
LLViewerObject* object = node->getObject();
@@ -4093,8 +4093,53 @@ void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
}
if(can_derez_current)
{
- derez_objects.put(object);
+ found = true;
+
+ if (only_check)
+ // one found, no need to traverse to the end
+ break;
+
+ if (derez_objectsp)
+ derez_objectsp->put(object);
+
+ }
+ }
+
+ return found;
+}
+
+static bool can_derez(EDeRezDestination dest)
+{
+ LLViewerRegion* first_region = NULL;
+ std::string error;
+ return get_derezzable_objects(dest, error, first_region, NULL, true);
+}
+
+static void derez_objects(
+ EDeRezDestination dest,
+ const LLUUID& dest_id,
+ LLViewerRegion*& first_region,
+ std::string& error,
+ LLDynamicArray<LLViewerObjectPtr>* objectsp)
+{
+ LLDynamicArray<LLViewerObjectPtr> derez_objects;
+
+ if (!objectsp) // if objects to derez not specified
+ {
+ // get them from selection
+ if (!get_derezzable_objects(dest, error, first_region, &derez_objects, false))
+ {
+ llwarns << "No objects to derez" << llendl;
+ return;
}
+
+ objectsp = &derez_objects;
+ }
+
+
+ if(gAgentCamera.cameraMouselook())
+ {
+ gAgentCamera.changeCameraToDefault();
}
// This constant is based on (1200 - HEADER_SIZE) / 4 bytes per
@@ -4104,13 +4149,13 @@ void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
// satisfy anybody.
const S32 MAX_ROOTS_PER_PACKET = 250;
const S32 MAX_PACKET_COUNT = 254;
- F32 packets = ceil((F32)derez_objects.count() / (F32)MAX_ROOTS_PER_PACKET);
+ F32 packets = ceil((F32)objectsp->count() / (F32)MAX_ROOTS_PER_PACKET);
if(packets > (F32)MAX_PACKET_COUNT)
{
error = "AcquireErrorTooManyObjects";
}
- if(error.empty() && derez_objects.count() > 0)
+ if(error.empty() && objectsp->count() > 0)
{
U8 d = (U8)dest;
LLUUID tid;
@@ -4135,11 +4180,11 @@ void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
msg->addU8Fast(_PREHASH_PacketCount, packet_count);
msg->addU8Fast(_PREHASH_PacketNumber, packet_number);
objects_in_packet = 0;
- while((object_index < derez_objects.count())
+ while((object_index < objectsp->count())
&& (objects_in_packet++ < MAX_ROOTS_PER_PACKET))
{
- LLViewerObject* object = derez_objects.get(object_index++);
+ LLViewerObject* object = objectsp->get(object_index++);
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU32Fast(_PREHASH_ObjectLocalID, object->getLocalID());
// VEFFECT: DerezObject
@@ -4164,6 +4209,13 @@ void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
}
}
+static void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
+{
+ LLViewerRegion* first_region = NULL;
+ std::string error;
+ derez_objects(dest, dest_id, first_region, error, NULL);
+}
+
void handle_take_copy()
{
if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return;
@@ -4175,12 +4227,19 @@ void handle_take_copy()
// You can return an object to its owner if it is on your land.
class LLObjectReturn : public view_listener_t
{
+public:
+ LLObjectReturn() : mFirstRegion(NULL) {}
+
+private:
bool handleEvent(const LLSD& userdata)
{
if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true;
mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
+ // Save selected objects, so that we still know what to return after the confirmation dialog resets selection.
+ get_derezzable_objects(DRD_RETURN_TO_OWNER, mError, mFirstRegion, &mReturnableObjects);
+
LLNotificationsUtil::add("ReturnToOwner", LLSD(), LLSD(), boost::bind(&LLObjectReturn::onReturnToOwner, this, _1, _2));
return true;
}
@@ -4191,16 +4250,23 @@ class LLObjectReturn : public view_listener_t
if (0 == option)
{
// Ignore category ID for this derez destination.
- derez_objects(DRD_RETURN_TO_OWNER, LLUUID::null);
+ derez_objects(DRD_RETURN_TO_OWNER, LLUUID::null, mFirstRegion, mError, &mReturnableObjects);
}
+ mReturnableObjects.clear();
+ mError.clear();
+ mFirstRegion = NULL;
+
// drop reference to current selection
mObjectSelection = NULL;
return false;
}
-protected:
LLObjectSelectionHandle mObjectSelection;
+
+ LLDynamicArray<LLViewerObjectPtr> mReturnableObjects;
+ std::string mError;
+ LLViewerRegion* mFirstRegion;
};
@@ -4225,29 +4291,7 @@ class LLObjectEnableReturn : public view_listener_t
}
else
{
- LLViewerRegion* region = gAgent.getRegion();
- if (region)
- {
- // Estate owners and managers can always return objects.
- if (region->canManageEstate())
- {
- new_value = true;
- }
- else
- {
- struct f : public LLSelectedObjectFunctor
- {
- virtual bool apply(LLViewerObject* obj)
- {
- return
- obj->permModify() ||
- obj->isReturnable();
- }
- } func;
- const bool firstonly = true;
- new_value = LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func, firstonly);
- }
- }
+ new_value = can_derez(DRD_RETURN_TO_OWNER);
}
#endif
return new_value;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 321d02aaf1..68745d5aeb 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1049,48 +1049,26 @@ void start_new_inventory_observer()
class LLDiscardAgentOffer : public LLInventoryFetchItemsObserver
{
LOG_CLASS(LLDiscardAgentOffer);
+
public:
LLDiscardAgentOffer(const LLUUID& folder_id, const LLUUID& object_id) :
LLInventoryFetchItemsObserver(object_id),
mFolderID(folder_id),
mObjectID(object_id) {}
- virtual ~LLDiscardAgentOffer() {}
+
virtual void done()
{
LL_DEBUGS("Messaging") << "LLDiscardAgentOffer::done()" << LL_ENDL;
- const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- bool notify = false;
- if(trash_id.notNull() && mObjectID.notNull())
- {
- LLInventoryModel::update_list_t update;
- LLInventoryModel::LLCategoryUpdate old_folder(mFolderID, -1);
- update.push_back(old_folder);
- LLInventoryModel::LLCategoryUpdate new_folder(trash_id, 1);
- update.push_back(new_folder);
- gInventory.accountForUpdate(update);
- gInventory.moveObject(mObjectID, trash_id);
- LLInventoryObject* obj = gInventory.getObject(mObjectID);
- if(obj)
- {
- // no need to restamp since this is already a freshly
- // stamped item.
- obj->updateParentOnServer(FALSE);
- notify = true;
- }
- }
- else
- {
- LL_WARNS("Messaging") << "DiscardAgentOffer unable to find: "
- << (trash_id.isNull() ? "trash " : "")
- << (mObjectID.isNull() ? "object" : "") << LL_ENDL;
- }
+
+ // We're invoked from LLInventoryModel::notifyObservers().
+ // If we now try to remove the inventory item, it will cause a nested
+ // notifyObservers() call, which won't work.
+ // So defer moving the item to trash until viewer gets idle (in a moment).
+ LLAppViewer::instance()->addOnIdleCallback(boost::bind(&LLInventoryModel::removeItem, &gInventory, mObjectID));
gInventory.removeObserver(this);
- if(notify)
- {
- gInventory.notifyObservers();
- }
delete this;
}
+
protected:
LLUUID mFolderID;
LLUUID mObjectID;
@@ -1495,7 +1473,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
LLChat chat;
std::string log_message;
S32 button = LLNotificationsUtil::getSelectedOption(notification, response);
-
+
LLInventoryObserver* opener = NULL;
LLViewerInventoryCategory* catp = NULL;
catp = (LLViewerInventoryCategory*)gInventory.getCategory(mObjectID);
@@ -1527,7 +1505,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
// TODO: when task inventory offers can also be handled the new way, migrate the code that sets these strings here:
from_string = chatHistory_string = mFromName;
- bool busy=FALSE;
+ bool busy = gAgent.getBusy();
switch(button)
{
@@ -1586,9 +1564,6 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
}
break;
- case IOR_BUSY:
- //Busy falls through to decline. Says to make busy message.
- busy=TRUE;
case IOR_MUTE:
// MUTE falls through to decline
case IOR_DECLINE:
@@ -1734,7 +1709,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
from_string = chatHistory_string = mFromName;
}
- bool busy=FALSE;
+ bool busy = gAgent.getBusy();
switch(button)
{
@@ -1780,9 +1755,6 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
} // end switch (mIM)
break;
- case IOR_BUSY:
- //Busy falls through to decline. Says to make busy message.
- busy=TRUE;
case IOR_MUTE:
// MUTE falls through to decline
case IOR_DECLINE:
@@ -2667,7 +2639,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
{
// Until throttling is implemented, busy mode should reject inventory instead of silently
// accepting it. SEE SL-39554
- info->forceResponse(IOR_BUSY);
+ info->forceResponse(IOR_DECLINE);
}
else
{
@@ -6544,8 +6516,24 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response)
rtn_text = LLNotification::getSelectedOptionName(response);
}
- // Didn't click "Ignore"
- if (button_idx != -1)
+ // Button -2 = Mute
+ // Button -1 = Ignore - no processing needed for this button
+ // Buttons 0 and above = dialog choices
+
+ if (-2 == button_idx)
+ {
+ std::string object_name = notification["payload"]["object_name"].asString();
+ LLUUID object_id = notification["payload"]["object_id"].asUUID();
+ LLMute mute(object_id, object_name, LLMute::OBJECT);
+ if (LLMuteList::getInstance()->add(mute))
+ {
+ // This call opens the sidebar, displays the block list, and highlights the newly blocked
+ // object in the list so the user can see that their block click has taken effect.
+ LLPanelBlockedList::showPanelAndSelect(object_id);
+ }
+ }
+
+ if (0 <= button_idx)
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("ScriptDialogReply");
@@ -6588,12 +6576,12 @@ void process_script_dialog(LLMessageSystem* msg, void**)
std::string message;
std::string first_name;
std::string last_name;
- std::string title;
+ std::string object_name;
S32 chat_channel;
msg->getString("Data", "FirstName", first_name);
msg->getString("Data", "LastName", last_name);
- msg->getString("Data", "ObjectName", title);
+ msg->getString("Data", "ObjectName", object_name);
msg->getString("Data", "Message", message);
msg->getS32("Data", "ChatChannel", chat_channel);
@@ -6604,6 +6592,7 @@ void process_script_dialog(LLMessageSystem* msg, void**)
payload["sender"] = msg->getSender().getIPandPort();
payload["object_id"] = object_id;
payload["chat_channel"] = chat_channel;
+ payload["object_name"] = object_name;
// build up custom form
S32 button_count = msg->getNumberOfBlocks("Buttons");
@@ -6622,7 +6611,7 @@ void process_script_dialog(LLMessageSystem* msg, void**)
}
LLSD args;
- args["TITLE"] = title;
+ args["TITLE"] = object_name;
args["MESSAGE"] = message;
LLNotificationPtr notification;
if (!first_name.empty())
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 9d09d9c01a..d8acd99953 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -57,7 +57,6 @@ enum InventoryOfferResponse
IOR_ACCEPT,
IOR_DECLINE,
IOR_MUTE,
- IOR_BUSY,
IOR_SHOW
};
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index db2dc531db..17f908d73f 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1193,6 +1193,7 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObjec
eCacheUpdateResult result = CACHE_UPDATE_ADDED;
if (mImpl->mCacheMap.size() > MAX_OBJECT_CACHE_ENTRIES)
{
+ delete mImpl->mCacheMap.begin()->second ;
mImpl->mCacheMap.erase(mImpl->mCacheMap.begin());
result = CACHE_UPDATE_REPLACED;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 5fcc57bc91..70509f9a9f 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -66,6 +66,7 @@
// statics
LLPointer<LLViewerTexture> LLViewerTexture::sNullImagep = NULL;
+LLPointer<LLViewerTexture> LLViewerTexture::sBlackImagep = NULL;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sMissingAssetImagep = NULL;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sWhiteImagep = NULL;
LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultImagep = NULL;
@@ -295,17 +296,23 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromHost(const
void LLViewerTextureManager::init()
{
- LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,3);
- raw->clear(0x77, 0x77, 0x77, 0xFF);
- LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), TRUE) ;
-
-#if 1
- LLPointer<LLViewerFetchedTexture> imagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT);
- LLViewerFetchedTexture::sDefaultImagep = imagep;
+ {
+ LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,3);
+ raw->clear(0x77, 0x77, 0x77, 0xFF);
+ LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), TRUE) ;
+ }
const S32 dim = 128;
LLPointer<LLImageRaw> image_raw = new LLImageRaw(dim,dim,3);
U8* data = image_raw->getData();
+
+ memset(data, 0, dim * dim * 3) ;
+ LLViewerTexture::sBlackImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE) ;
+
+#if 1
+ LLPointer<LLViewerFetchedTexture> imagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT);
+ LLViewerFetchedTexture::sDefaultImagep = imagep;
+
for (S32 i = 0; i<dim; i++)
{
for (S32 j = 0; j<dim; j++)
@@ -359,6 +366,7 @@ void LLViewerTextureManager::cleanup()
LLImageGL::sDefaultGLTexture = NULL ;
LLViewerTexture::sNullImagep = NULL;
+ LLViewerTexture::sBlackImagep = NULL;
LLViewerFetchedTexture::sDefaultImagep = NULL;
LLViewerFetchedTexture::sSmokeImagep = NULL;
LLViewerFetchedTexture::sMissingAssetImagep = NULL;
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index c5b8c8923a..de528927b4 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -330,6 +330,7 @@ public:
static BOOL sUseTextureAtlas ;
static LLPointer<LLViewerTexture> sNullImagep; // Null texture for non-textured objects.
+ static LLPointer<LLViewerTexture> sBlackImagep; // Texture to show NOTHING (pure black)
};
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index f0b5b50feb..6d457434b5 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -621,16 +621,20 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
S32 num_entries;
success = check_read(&apr_file, &num_entries, sizeof(S32)) ;
- for (S32 i = 0; success && i < num_entries; i++)
+ if(success)
{
- LLVOCacheEntry* entry = new LLVOCacheEntry(&apr_file);
- if (!entry->getLocalID())
+ for (S32 i = 0; i < num_entries; i++)
{
- llwarns << "Aborting cache file load for " << filename << ", cache file corruption!" << llendl;
- delete entry ;
- success = false ;
+ LLVOCacheEntry* entry = new LLVOCacheEntry(&apr_file);
+ if (!entry->getLocalID())
+ {
+ llwarns << "Aborting cache file load for " << filename << ", cache file corruption!" << llendl;
+ delete entry ;
+ success = false ;
+ break ;
+ }
+ cache_entry_map[entry->getLocalID()] = entry;
}
- cache_entry_map[entry->getLocalID()] = entry;
}
}
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index eb3ed3c379..528c7acbc8 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4490,6 +4490,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
std::sort(faces.begin(), faces.end(), LLFace::CompareDistanceGreater());
}
+ bool hud_group = group->isHUDGroup() ;
std::vector<LLFace*>::iterator face_iter = faces.begin();
LLSpatialGroup::buffer_map_t buffer_map;
@@ -4760,7 +4761,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
registerFace(group, facep, LLRenderPass::PASS_INVISI_SHINY);
registerFace(group, facep, LLRenderPass::PASS_INVISIBLE);
}
- else if (LLPipeline::sRenderDeferred)
+ else if (LLPipeline::sRenderDeferred && !hud_group)
{ //deferred rendering
if (te->getFullbright())
{ //register in post deferred fullbright shiny pass
@@ -4798,7 +4799,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
else if (fullbright || bake_sunlight)
{ //fullbright
registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT);
- if (LLPipeline::sRenderDeferred && LLPipeline::sRenderBump && te->getBumpmap())
+ if (LLPipeline::sRenderDeferred && !hud_group && LLPipeline::sRenderBump && te->getBumpmap())
{ //if this is the deferred render and a bump map is present, register in post deferred bump
registerFace(group, facep, LLRenderPass::PASS_POST_BUMP);
}
@@ -4824,7 +4825,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
}
//not sure why this is here, and looks like it might cause bump mapped objects to get rendered redundantly -- davep 5/11/2010
- if (!is_alpha && !LLPipeline::sRenderDeferred)
+ if (!is_alpha && (hud_group || !LLPipeline::sRenderDeferred))
{
llassert((mask & LLVertexBuffer::MAP_NORMAL) || fullbright);
facep->setPoolType((fullbright) ? LLDrawPool::POOL_FULLBRIGHT : LLDrawPool::POOL_SIMPLE);
diff --git a/indra/newview/skins/default/xui/en/floater_postcard.xml b/indra/newview/skins/default/xui/en/floater_postcard.xml
index 8da35e9d7f..c756661ffc 100644
--- a/indra/newview/skins/default/xui/en/floater_postcard.xml
+++ b/indra/newview/skins/default/xui/en/floater_postcard.xml
@@ -7,11 +7,11 @@
height="380"
layout="topleft"
min_height="380"
- min_width="450"
+ min_width="490"
name="Postcard"
help_topic="postcard"
title="EMAIL SNAPSHOT"
- width="450">
+ width="490">
<floater.string
name="default_subject">
Postcard from [SECOND_LIFE].
@@ -40,7 +40,7 @@
follows="left|top"
height="20"
layout="topleft"
- left_delta="108"
+ left_delta="148"
name="to_form"
top_delta="-4"
width="150" />
@@ -59,7 +59,7 @@
follows="left|top"
height="20"
layout="topleft"
- left_delta="108"
+ left_delta="148"
name="from_form"
top_delta="-4"
width="150" />
@@ -78,7 +78,7 @@
follows="left|top"
height="20"
layout="topleft"
- left_delta="108"
+ left_delta="148"
max_length_bytes="100"
name="name_form"
top_delta="-4"
@@ -99,7 +99,7 @@
height="20"
label="Type your subject here."
layout="topleft"
- left_delta="108"
+ left_delta="148"
max_length_bytes="100"
name="subject_form"
top_delta="-4"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 104bcaf7d0..251fce2333 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6261,6 +6261,10 @@ Grant this request?
[MESSAGE]
<form name="form">
<button
+ index="-2"
+ name="Mute"
+ text="Block"/>
+ <button
index="-1"
name="Ignore"
text="Ignore"/>
@@ -6276,6 +6280,10 @@ Grant this request?
[MESSAGE]
<form name="form">
<button
+ index="-2"
+ name="Mute"
+ text="Block"/>
+ <button
index="-1"
name="Ignore"
text="Ignore"/>
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 0bc1be666e..83f1bff91f 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -117,12 +117,13 @@ label="Remember password"
name="connect_btn"
top="35"
width="90" />
+ <!-- Utf code in label is a filled up-pointing triangle -->
<menu_button
left_pad="5"
top="35"
width="80"
height="23"
- label="Mode ▲"
+ label="Mode &#9650;"
name="mode_menu"
tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
menu_filename="menu_mode_change.xml"
diff --git a/indra/newview/skins/default/xui/en/panel_region_terrain.xml b/indra/newview/skins/default/xui/en/panel_region_terrain.xml
index bbb8b40594..5d060c0a0d 100644
--- a/indra/newview/skins/default/xui/en/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_terrain.xml
@@ -193,7 +193,7 @@
</text>
<text
follows="left|top"
- height="20"
+ height="60"
layout="topleft"
left_delta="0"
name="height_text_lbl11"
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index 23ad0e9528..f25a73da38 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -77,15 +77,16 @@
top="0"
width="55" />
</panel>
+ <!-- UTF 9660 code in label below is a down-pointing filled-in triangle -->
<menu_button
follows="right|top"
image_color="0 0 0 0"
hover_glow_amount="0"
left_pad="5"
- top="0"
+ top="2"
width="55"
height="18"
- label="Mode ▼"
+ label="Mode &#9660;"
tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
menu_filename="menu_mode_change.xml"
/>
diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp
index daa10819fc..0235400976 100644
--- a/indra/newview/tests/llsechandler_basic_test.cpp
+++ b/indra/newview/tests/llsechandler_basic_test.cpp
@@ -86,6 +86,9 @@ std::string LLControlGroup::getString(const std::string& name)
return "";
}
+// Stub for --no-verify-ssl-cert
+BOOL LLControlGroup::getBOOL(const std::string& name) { return FALSE; }
+
LLSD LLCredential::getLoginParams()
{
LLSD result = LLSD::emptyMap();