summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdoc/contributions.txt1
-rw-r--r--indra/llcommon/llfile.cpp4
-rw-r--r--indra/llcommon/llfile.h2
-rw-r--r--indra/llui/llurlentry.cpp5
-rw-r--r--indra/llui/llurlentry.h1
-rw-r--r--indra/llui/llviewereventrecorder.cpp4
-rw-r--r--indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/app_settings/settings_per_account.xml22
-rw-r--r--indra/newview/llfloaterpreference.cpp33
-rw-r--r--indra/newview/llfloaterpreference.h1
-rw-r--r--indra/newview/llfloatertools.cpp1
-rw-r--r--indra/newview/llglsandbox.cpp2
-rw-r--r--indra/newview/llinventorybridge.cpp26
-rw-r--r--indra/newview/llinventoryfunctions.cpp6
-rw-r--r--indra/newview/llmeshrepository.cpp33
-rw-r--r--indra/newview/llmoveview.cpp4
-rw-r--r--indra/newview/llpanellogin.cpp13
-rw-r--r--indra/newview/llpanellogin.h1
-rw-r--r--indra/newview/llpanelobject.cpp18
-rw-r--r--indra/newview/llpanelobjectinventory.cpp236
-rw-r--r--indra/newview/llpanelpeople.cpp1
-rw-r--r--indra/newview/llpanelvolume.cpp6
-rw-r--r--indra/newview/llpanelvolumepulldown.cpp31
-rw-r--r--indra/newview/llpanelvolumepulldown.h4
-rw-r--r--indra/newview/llstartup.cpp1
-rw-r--r--indra/newview/llstatusbar.cpp6
-rw-r--r--indra/newview/llstatusbar.h2
-rw-r--r--indra/newview/llviewermenu.cpp19
-rw-r--r--indra/newview/llviewerobject.cpp22
-rw-r--r--indra/newview/llviewerregion.cpp2
-rw-r--r--indra/newview/llviewerwindow.cpp44
-rw-r--r--indra/newview/llviewerwindow.h11
-rw-r--r--indra/newview/llvoavatar.cpp26
-rw-r--r--indra/newview/llvovolume.cpp29
-rw-r--r--indra/newview/skins/default/xui/de/notifications.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_volume_pulldown.xml20
-rw-r--r--indra/newview/skins/default/xui/ru/panel_main_inventory.xml2
38 files changed, 265 insertions, 386 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index e67df2453e..fcadccab22 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -219,6 +219,7 @@ Ansariel Hiller
STORM-2105
STORM-2151
MAINT-8085
+ STORM-2122
Aralara Rajal
Arare Chantilly
CHUIBUG-191
diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp
index 8aa41035b9..fc203f78e1 100644
--- a/indra/llcommon/llfile.cpp
+++ b/indra/llcommon/llfile.cpp
@@ -258,7 +258,7 @@ int LLFile::remove(const std::string& filename, int supress_error)
return warnif("remove", filename, rc, supress_error);
}
-int LLFile::rename(const std::string& filename, const std::string& newname)
+int LLFile::rename(const std::string& filename, const std::string& newname, int supress_error)
{
#if LL_WINDOWS
std::string utf8filename = filename;
@@ -269,7 +269,7 @@ int LLFile::rename(const std::string& filename, const std::string& newname)
#else
int rc = ::rename(filename.c_str(),newname.c_str());
#endif
- return warnif(STRINGIZE("rename to '" << newname << "' from"), filename, rc);
+ return warnif(STRINGIZE("rename to '" << newname << "' from"), filename, rc, supress_error);
}
bool LLFile::copy(const std::string from, const std::string to)
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index ba935b8714..398938b729 100644
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -74,7 +74,7 @@ public:
static int rmdir(const std::string& filename);
static int remove(const std::string& filename, int supress_error = 0);
- static int rename(const std::string& filename,const std::string& newname);
+ static int rename(const std::string& filename,const std::string& newname, int supress_error = 0);
static bool copy(const std::string from, const std::string to);
static int stat(const std::string& filename,llstat* file_status);
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index a4dc5bcde1..cd9b52d164 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -298,7 +298,7 @@ std::string LLUrlEntryHTTPLabel::getUrl(const std::string &string) const
LLUrlEntryInvalidSLURL::LLUrlEntryInvalidSLURL()
: LLUrlEntryBase()
{
- mPattern = boost::regex("(http://(maps.secondlife.com|slurl.com)/secondlife/|secondlife://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
+ mPattern = boost::regex("(https?://(maps.secondlife.com|slurl.com)/secondlife/|secondlife://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_http.xml";
mTooltip = LLTrans::getString("TooltipHttpUrl");
@@ -385,8 +385,9 @@ bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const
LLUrlEntrySLURL::LLUrlEntrySLURL()
{
// see http://slurl.com/about.php for details on the SLURL format
- mPattern = boost::regex("http://(maps.secondlife.com|slurl.com)/secondlife/[^ /]+(/\\d+){0,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
+ mPattern = boost::regex("https?://(maps.secondlife.com|slurl.com)/secondlife/[^ /]+(/\\d+){0,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
boost::regex::perl|boost::regex::icase);
+ mIcon = "Hand";
mMenuName = "menu_url_slurl.xml";
mTooltip = LLTrans::getString("TooltipSLURL");
}
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index 28e9931718..78c149d9fd 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -175,6 +175,7 @@ class LLUrlEntrySLURL : public LLUrlEntryBase
{
public:
LLUrlEntrySLURL();
+ /*virtual*/ bool isTrusted() const { return true; }
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
/*virtual*/ std::string getLocation(const std::string &url) const;
};
diff --git a/indra/llui/llviewereventrecorder.cpp b/indra/llui/llviewereventrecorder.cpp
index 9fe6a542b4..8754cfebbb 100644
--- a/indra/llui/llviewereventrecorder.cpp
+++ b/indra/llui/llviewereventrecorder.cpp
@@ -34,11 +34,11 @@ LLViewerEventRecorder::LLViewerEventRecorder() {
logEvents = false;
// Remove any previous event log file
std::string old_log_ui_events_to_llsd_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife_Events_log.old");
- LLFile::remove(old_log_ui_events_to_llsd_file);
+ LLFile::remove(old_log_ui_events_to_llsd_file, ENOENT);
mLogFilename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife_Events_log.llsd");
- LLFile::rename(mLogFilename, old_log_ui_events_to_llsd_file);
+ LLFile::rename(mLogFilename, old_log_ui_events_to_llsd_file, ENOENT);
}
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 45e2fc9bf0..379c05a66c 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4798,7 +4798,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
<key>InventoryOutboxDisplayBoth</key>
<map>
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 92e61d2e86..3d4bd659f1 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -392,5 +392,27 @@
<key>Value</key>
<string></string>
</map>
+ <key>SnapshotBaseDir</key>
+ <map>
+ <key>Comment</key>
+ <string>Path to last snapshot save location</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string></string>
+ </map>
+ <key>SnapshotBaseName</key>
+ <map>
+ <key>Comment</key>
+ <string>Pattern for naming snapshots</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>Snapshot</string>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 5de7ca5289..9d723bdd9d 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1249,6 +1249,8 @@ void LLFloaterPreference::refreshEnabledState()
// Cannot have floater active until caps have been received
getChild<LLButton>("default_creation_permissions")->setEnabled(LLStartUp::getStartupState() < STATE_STARTED ? false : true);
+
+ getChildView("block_list")->setEnabled(LLLoginInstance::getInstance()->authSuccess());
}
void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
@@ -1383,8 +1385,6 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
// now turn off any features that are unavailable
disableUnavailableSettings();
-
- getChildView("block_list")->setEnabled(LLLoginInstance::getInstance()->authSuccess());
}
// static
@@ -2563,18 +2563,6 @@ BOOL LLPanelPreferenceGraphics::postBuild()
LLFloaterReg::showInstance("prefs_graphics_advanced");
LLFloaterReg::hideInstance("prefs_graphics_advanced");
-// Don't do this on Mac as their braindead GL versioning
-// sets this when 8x and 16x are indeed available
-//
-#if !LL_DARWIN
- if (gGLManager.mIsIntel || gGLManager.mGLVersion < 3.f)
- { //remove FSAA settings above "4x"
- LLComboBox* combo = getChild<LLComboBox>("fsaa");
- combo->remove("8x");
- combo->remove("16x");
- }
-#endif
-
resetDirtyChilds();
setPresetText();
@@ -2749,6 +2737,23 @@ LLFloaterPreferenceProxy::LLFloaterPreferenceProxy(const LLSD& key)
mCommitCallbackRegistrar.add("Proxy.Change", boost::bind(&LLFloaterPreferenceProxy::onChangeSocksSettings, this));
}
+BOOL LLFloaterPreferenceGraphicsAdvanced::postBuild()
+{
+ // Don't do this on Mac as their braindead GL versioning
+ // sets this when 8x and 16x are indeed available
+ //
+#if !LL_DARWIN
+ if (gGLManager.mIsIntel || gGLManager.mGLVersion < 3.f)
+ { //remove FSAA settings above "4x"
+ LLComboBox* combo = getChild<LLComboBox>("fsaa");
+ combo->remove("8x");
+ combo->remove("16x");
+ }
+#endif
+
+ return TRUE;
+}
+
void LLFloaterPreferenceGraphicsAdvanced::onOpen(const LLSD& key)
{
refresh();
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 444ad5a928..0cd7bac20f 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -276,6 +276,7 @@ class LLFloaterPreferenceGraphicsAdvanced : public LLFloater
public:
LLFloaterPreferenceGraphicsAdvanced(const LLSD& key);
~LLFloaterPreferenceGraphicsAdvanced();
+ /*virtual*/ BOOL postBuild();
void onOpen(const LLSD& key);
void onClickCloseBtn(bool app_quitting);
void disableUnavailableSettings();
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index c9d664c7c4..cf7096da9c 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -253,7 +253,6 @@ BOOL LLFloaterTools::postBuild()
mCheckStretchTexture = getChild<LLCheckBoxCtrl>("checkbox stretch textures");
getChild<LLUICtrl>("checkbox stretch textures")->setValue((BOOL)gSavedSettings.getBOOL("ScaleStretchTextures"));
mComboGridMode = getChild<LLComboBox>("combobox grid mode");
- mCheckStretchUniformLabel = getChild<LLTextBox>("checkbox uniform label");
//
// Create Buttons
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index fc93181ef4..4b0b10dd5a 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -1060,7 +1060,7 @@ F32 gpu_benchmark()
delete [] pixels;
//make a dummy triangle to draw with
- LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, GL_STATIC_DRAW_ARB);
+ LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, GL_STREAM_DRAW_ARB);
if (!buff->allocateBuffer(3, 0, true))
{
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 67b51f11b3..29e63e4bca 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -779,6 +779,14 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
if (obj)
{
+
+ items.push_back(std::string("Copy Separator"));
+ items.push_back(std::string("Copy"));
+ if (!isItemCopyable())
+ {
+ disabled_items.push_back(std::string("Copy"));
+ }
+
if (obj->getIsLinkType())
{
items.push_back(std::string("Find Original"));
@@ -821,13 +829,6 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
disabled_items.push_back(std::string("Copy Asset UUID"));
}
}
- items.push_back(std::string("Copy Separator"));
-
- items.push_back(std::string("Copy"));
- if (!isItemCopyable())
- {
- disabled_items.push_back(std::string("Copy"));
- }
items.push_back(std::string("Cut"));
if (!isItemMovable() || !isItemRemovable())
@@ -2104,12 +2105,6 @@ BOOL LLItemBridge::isItemCopyable() const
return FALSE;
}
- // You can never copy a link.
- if (item->getIsLinkType())
- {
- return FALSE;
- }
-
return item->getPermissions().allowCopyBy(gAgent.getID()) || gSavedSettings.getBOOL("InventoryLinking");
}
return FALSE;
@@ -3812,6 +3807,11 @@ void LLFolderBridge::perform_pasteFromClipboard()
break;
}
}
+ else if (item->getIsLinkType())
+ {
+ link_inventory_object(parent_id, item_id,
+ LLPointer<LLInventoryCallback>(NULL));
+ }
else
{
copy_inventory_item(
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index e056ccebee..4914490319 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -425,7 +425,11 @@ void copy_inventory_category(LLInventoryModel* model,
LLInventoryItem* item = *iter;
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(update_folder_cb, new_cat_uuid));
- if (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID()))
+ if (item->getIsLinkType())
+ {
+ link_inventory_object(new_cat_uuid, item->getLinkedUUID(), cb);
+ }
+ else if(!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID(), gAgent.getGroupID()))
{
// If the item is nocopy, we do nothing or, optionally, move it
if (move_no_copy_items)
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 71a161198a..bb64201fef 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -903,6 +903,7 @@ void LLMeshRepoThread::run()
LLMeshRepository::sLODProcessing--;
mMutex->unlock();
+ // Todo: this and other cases shouldn't retry indefinitely, at the very least do as with mDecompositionRequests
if (!fetchMeshLOD(req.mMeshParams, req.mLOD)) // failed, resubmit
{
mMutex->lock();
@@ -1234,16 +1235,16 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id)
//check VFS for mesh skin info
LLVFile file(gVFS, mesh_id, LLAssetType::AT_MESH);
if (file.getSize() >= offset+size)
- {
- LLMeshRepository::sCacheBytesRead += size;
- ++LLMeshRepository::sCacheReads;
- file.seek(offset);
+ {
U8* buffer = new(std::nothrow) U8[size];
if (!buffer)
{
- LL_WARNS(LOG_MESH) << "Failed to allocate memory for skin info" << LL_ENDL;
+ LL_WARNS_ONCE(LOG_MESH) << "Failed to allocate memory for skin info, size: " << size << LL_ENDL;
return false;
}
+ LLMeshRepository::sCacheBytesRead += size;
+ ++LLMeshRepository::sCacheReads;
+ file.seek(offset);
file.read(buffer, size);
//make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written)
@@ -1331,16 +1332,16 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
LLVFile file(gVFS, mesh_id, LLAssetType::AT_MESH);
if (file.getSize() >= offset+size)
{
- LLMeshRepository::sCacheBytesRead += size;
- ++LLMeshRepository::sCacheReads;
-
- file.seek(offset);
U8* buffer = new(std::nothrow) U8[size];
if (!buffer)
{
- LL_WARNS(LOG_MESH) << "Failed to allocate memory for mesh decomposition" << LL_ENDL;
+ LL_WARNS_ONCE(LOG_MESH) << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
return false;
}
+ LLMeshRepository::sCacheBytesRead += size;
+ ++LLMeshRepository::sCacheReads;
+
+ file.seek(offset);
file.read(buffer, size);
//make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written)
@@ -1434,7 +1435,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
U8* buffer = new(std::nothrow) U8[size];
if (!buffer)
{
- LL_WARNS(LOG_MESH) << "Failed to allocate memory for physics shape" << LL_ENDL;
+ LL_WARNS_ONCE(LOG_MESH) << "Failed to allocate memory for physics shape, size: " << size << LL_ENDL;
return false;
}
file.read(buffer, size);
@@ -1612,15 +1613,17 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
LLVFile file(gVFS, mesh_id, LLAssetType::AT_MESH);
if (file.getSize() >= offset+size)
{
- LLMeshRepository::sCacheBytesRead += size;
- ++LLMeshRepository::sCacheReads;
- file.seek(offset);
U8* buffer = new(std::nothrow) U8[size];
if (!buffer)
{
- LL_WARNS(LOG_MESH) << "Can't allocate memory for mesh LOD" << LL_ENDL;
+ LL_WARNS_ONCE(LOG_MESH) << "Can't allocate memory for mesh LOD, size: " << size << LL_ENDL;
+ // todo: for now it will result in indefinite constant retries, should result in timeout
+ // or in retry-count and disabling mesh. (but usually viewer is beyond saving at this point)
return false;
}
+ LLMeshRepository::sCacheBytesRead += size;
+ ++LLMeshRepository::sCacheReads;
+ file.seek(offset);
file.read(buffer, size);
//make sure buffer isn't all 0's by checking the first 1KB (reserved block but not written)
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index c03080beb8..301487b994 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -716,9 +716,9 @@ void LLPanelStandStopFlying::updatePosition()
left_tb_width = toolbar_left->getRect().getWidth();
}
- if (!mStateManagementButtons.get())
+ if (!mStateManagementButtons.get()) // Obsolete?!!
{
- LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("state_management_buttons_container");
+ LLPanel* panel_ssf_container = gToolBarView->getChild<LLPanel>("state_management_buttons_container");
if (panel_ssf_container)
{
mStateManagementButtons = panel_ssf_container->getHandle();
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 5f26821c4f..ef5ce155b1 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -271,9 +271,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
LLTextBox* forgot_password_text = getChild<LLTextBox>("forgot_password_text");
forgot_password_text->setClickedCallback(onClickForgotPassword, NULL);
- LLTextBox* need_help_text = getChild<LLTextBox>("login_help");
- need_help_text->setClickedCallback(onClickHelp, NULL);
-
// get the web browser control
LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html");
web_browser->addObserver(this);
@@ -924,16 +921,6 @@ void LLPanelLogin::onClickForgotPassword(void*)
}
}
-//static
-void LLPanelLogin::onClickHelp(void*)
-{
- if (sInstance)
- {
- LLViewerHelp* vhelp = LLViewerHelp::getInstance();
- vhelp->showTopic(vhelp->preLoginTopic());
- }
-}
-
// static
void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data)
{
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index 82ef048493..852195b304 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -99,7 +99,6 @@ private:
static void onClickNewAccount(void*);
static void onClickVersion(void*);
static void onClickForgotPassword(void*);
- static void onClickHelp(void*);
static void onPassKey(LLLineEditor* caller, void* user_data);
static void updateServerCombo();
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index d0dea5d044..25cfb598e7 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -448,20 +448,6 @@ void LLPanelObject::getState( )
S32 roots_selected = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
BOOL editable = root_objectp->permModify();
- // Select Single Message
- getChildView("select_single")->setVisible( FALSE);
- getChildView("edit_object")->setVisible( FALSE);
- if (!editable || single_volume || selected_count <= 1)
- {
- getChildView("edit_object")->setVisible( TRUE);
- getChildView("edit_object")->setEnabled(TRUE);
- }
- else
- {
- getChildView("select_single")->setVisible( TRUE);
- getChildView("select_single")->setEnabled(TRUE);
- }
-
BOOL is_flexible = volobjp && volobjp->isFlexible();
BOOL is_permanent = root_objectp->flagObjectPermanent();
BOOL is_permanent_enforced = root_objectp->isPermanentEnforced();
@@ -1893,10 +1879,6 @@ void LLPanelObject::clearCtrls()
mLabelTaper ->setEnabled( FALSE );
mLabelRadiusOffset->setEnabled( FALSE );
mLabelRevolutions->setEnabled( FALSE );
-
- getChildView("select_single")->setVisible( FALSE);
- getChildView("edit_object")->setVisible( TRUE);
- getChildView("edit_object")->setEnabled(FALSE);
getChildView("scale_hole")->setEnabled(FALSE);
getChildView("scale_taper")->setEnabled(FALSE);
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index c50f3477ad..cd1875e995 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -101,9 +101,7 @@ public:
static LLTaskInvFVBridge* createObjectBridge(LLPanelObjectInventory* panel,
LLInventoryObject* object);
void showProperties();
- void buyItem();
S32 getPrice();
- static bool commitBuyItem(const LLSD& notification, const LLSD& response);
// LLFolderViewModelItemInventory functionality
virtual const std::string& getName() const;
@@ -200,75 +198,6 @@ void LLTaskInvFVBridge::showProperties()
show_task_item_profile(mUUID, mPanel->getTaskUUID());
}
-struct LLBuyInvItemData
-{
- LLUUID mTaskID;
- LLUUID mItemID;
- LLAssetType::EType mType;
-
- LLBuyInvItemData(const LLUUID& task,
- const LLUUID& item,
- LLAssetType::EType type) :
- mTaskID(task), mItemID(item), mType(type)
- {}
-};
-
-void LLTaskInvFVBridge::buyItem()
-{
- LL_INFOS() << "LLTaskInvFVBridge::buyItem()" << LL_ENDL;
- LLInventoryItem* item = findItem();
- if(!item || !item->getSaleInfo().isForSale()) return;
- LLBuyInvItemData* inv = new LLBuyInvItemData(mPanel->getTaskUUID(),
- mUUID,
- item->getType());
-
- const LLSaleInfo& sale_info = item->getSaleInfo();
- const LLPermissions& perm = item->getPermissions();
- const std::string owner_name; // no owner name currently... FIXME?
-
- LLViewerObject* obj;
- if( ( obj = gObjectList.findObject( mPanel->getTaskUUID() ) ) && obj->isAttachment() )
- {
- LLNotificationsUtil::add("Cannot_Purchase_an_Attachment");
- LL_INFOS() << "Attempt to purchase an attachment" << LL_ENDL;
- delete inv;
- }
- else
- {
- LLSD args;
- args["PRICE"] = llformat("%d",sale_info.getSalePrice());
- args["OWNER"] = owner_name;
- if (sale_info.getSaleType() != LLSaleInfo::FS_CONTENTS)
- {
- U32 next_owner_mask = perm.getMaskNextOwner();
- args["MODIFYPERM"] = LLTrans::getString((next_owner_mask & PERM_MODIFY) ? "PermYes" : "PermNo");
- args["COPYPERM"] = LLTrans::getString((next_owner_mask & PERM_COPY) ? "PermYes" : "PermNo");
- args["RESELLPERM"] = LLTrans::getString((next_owner_mask & PERM_TRANSFER) ? "PermYes" : "PermNo");
- }
-
- std::string alertdesc;
- switch(sale_info.getSaleType())
- {
- case LLSaleInfo::FS_ORIGINAL:
- alertdesc = owner_name.empty() ? "BuyOriginalNoOwner" : "BuyOriginal";
- break;
- case LLSaleInfo::FS_CONTENTS:
- alertdesc = owner_name.empty() ? "BuyContentsNoOwner" : "BuyContents";
- break;
- case LLSaleInfo::FS_COPY:
- default:
- alertdesc = owner_name.empty() ? "BuyCopyNoOwner" : "BuyCopy";
- break;
- }
-
- LLSD payload;
- payload["task_id"] = inv->mTaskID;
- payload["item_id"] = inv->mItemID;
- payload["type"] = inv->mType;
- LLNotificationsUtil::add(alertdesc, args, payload, LLTaskInvFVBridge::commitBuyItem);
- }
-}
-
S32 LLTaskInvFVBridge::getPrice()
{
LLInventoryItem* item = findItem();
@@ -282,31 +211,6 @@ S32 LLTaskInvFVBridge::getPrice()
}
}
-// static
-bool LLTaskInvFVBridge::commitBuyItem(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if(0 == option)
- {
- LLViewerObject* object = gObjectList.findObject(notification["payload"]["task_id"].asUUID());
- if(!object || !object->getRegion()) return false;
-
-
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessageFast(_PREHASH_BuyObjectInventory);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->nextBlockFast(_PREHASH_Data);
- msg->addUUIDFast(_PREHASH_ObjectID, notification["payload"]["task_id"].asUUID());
- msg->addUUIDFast(_PREHASH_ItemID, notification["payload"]["item_id"].asUUID());
- msg->addUUIDFast(_PREHASH_FolderID,
- gInventory.findCategoryUUIDForType((LLFolderType::EType)notification["payload"]["type"].asInteger()));
- msg->sendReliable(object->getRegion()->getHost());
- }
- return false;
-}
-
const std::string& LLTaskInvFVBridge::getName() const
{
return mName;
@@ -615,29 +519,7 @@ BOOL LLTaskInvFVBridge::dragOrDrop(MASK mask, BOOL drop,
// virtual
void LLTaskInvFVBridge::performAction(LLInventoryModel* model, std::string action)
{
- if (action == "task_buy")
- {
- // Check the price of the item.
- S32 price = getPrice();
- if (-1 == price)
- {
- LL_WARNS() << "label_buy_task_bridged_item: Invalid price" << LL_ENDL;
- }
- else
- {
- if (price > 0 && price > gStatusBar->getBalance())
- {
- LLStringUtil::format_map_t args;
- args["AMOUNT"] = llformat("%d", price);
- LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("this_costs", args), price );
- }
- else
- {
- buyItem();
- }
- }
- }
- else if (action == "task_open")
+ if (action == "task_open")
{
openItem();
}
@@ -659,39 +541,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
return;
}
- if(!gAgent.allowOperation(PERM_OWNER, item->getPermissions(),
- GP_OBJECT_MANIPULATE)
- && item->getSaleInfo().isForSale())
- {
- items.push_back(std::string("Task Buy"));
-
- std::string label= LLTrans::getString("Buy");
- // Check the price of the item.
- S32 price = getPrice();
- if (-1 == price)
- {
- LL_WARNS() << "label_buy_task_bridged_item: Invalid price" << LL_ENDL;
- }
- else
- {
- std::ostringstream info;
- info << LLTrans::getString("BuyforL$") << price;
- label.assign(info.str());
- }
-
- const LLView::child_list_t *list = menu.getChildList();
- LLView::child_list_t::const_iterator itor;
- for (itor = list->begin(); itor != list->end(); ++itor)
- {
- std::string name = (*itor)->getName();
- LLMenuItemCallGL* menu_itemp = dynamic_cast<LLMenuItemCallGL*>(*itor);
- if (name == "Task Buy" && menu_itemp)
- {
- menu_itemp->setLabel(label);
- }
- }
- }
- else if (canOpenItem())
+ if (canOpenItem())
{
items.push_back(std::string("Task Open"));
}
@@ -978,42 +828,15 @@ void LLTaskSoundBridge::performAction(LLInventoryModel* model, std::string actio
void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
LLInventoryItem* item = findItem();
- if(!item) return;
std::vector<std::string> items;
std::vector<std::string> disabled_items;
-
- if(item->getPermissions().getOwner() != gAgent.getID()
- && item->getSaleInfo().isForSale())
+ if (!item)
{
- items.push_back(std::string("Task Buy"));
-
- std::string label= LLTrans::getString("Buy");
- // Check the price of the item.
- S32 price = getPrice();
- if (-1 == price)
- {
- LL_WARNS() << "label_buy_task_bridged_item: Invalid price" << LL_ENDL;
- }
- else
- {
- std::ostringstream info;
- info << LLTrans::getString("BuyforL$") << price;
- label.assign(info.str());
- }
-
- const LLView::child_list_t *list = menu.getChildList();
- LLView::child_list_t::const_iterator itor;
- for (itor = list->begin(); itor != list->end(); ++itor)
- {
- std::string name = (*itor)->getName();
- LLMenuItemCallGL* menu_itemp = dynamic_cast<LLMenuItemCallGL*>(*itor);
- if (name == "Task Buy" && menu_itemp)
- {
- menu_itemp->setLabel(label);
- }
- }
+ hide_context_entries(menu, items, disabled_items);
+ return;
}
- else if (canOpenItem())
+
+ if (canOpenItem())
{
if (!isItemCopyable())
{
@@ -1352,49 +1175,20 @@ void LLTaskMeshBridge::performAction(LLInventoryModel* model, std::string action
void LLTaskMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
LLInventoryItem* item = findItem();
- if(!item) return;
std::vector<std::string> items;
std::vector<std::string> disabled_items;
-
- if(item->getPermissions().getOwner() != gAgent.getID()
- && item->getSaleInfo().isForSale())
+ if(!item)
{
- items.push_back(std::string("Task Buy"));
-
- std::string label= LLTrans::getString("Buy");
- // Check the price of the item.
- S32 price = getPrice();
- if (-1 == price)
- {
- LL_WARNS() << "label_buy_task_bridged_item: Invalid price" << LL_ENDL;
- }
- else
- {
- std::ostringstream info;
- info << LLTrans::getString("BuyforL$") << price;
- label.assign(info.str());
- }
-
- const LLView::child_list_t *list = menu.getChildList();
- LLView::child_list_t::const_iterator itor;
- for (itor = list->begin(); itor != list->end(); ++itor)
- {
- std::string name = (*itor)->getName();
- LLMenuItemCallGL* menu_itemp = dynamic_cast<LLMenuItemCallGL*>(*itor);
- if (name == "Task Buy" && menu_itemp)
- {
- menu_itemp->setLabel(label);
- }
- }
+ hide_context_entries(menu, items, disabled_items);
+ return;
}
- else
+
+ items.push_back(std::string("Task Open"));
+ if (!isItemCopyable())
{
- items.push_back(std::string("Task Open"));
- if (!isItemCopyable())
- {
- disabled_items.push_back(std::string("Task Open"));
- }
+ disabled_items.push_back(std::string("Task Open"));
}
+
items.push_back(std::string("Task Properties"));
if ((flags & FIRST_SELECTED_ITEM) == 0)
{
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index eb2a297a35..30fef9f5f0 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -586,7 +586,6 @@ BOOL LLPanelPeople::postBuild()
getChild<LLFilterEditor>("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
- getChild<LLFilterEditor>("fbc_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
if(gMaxAgentGroups <= BASE_MAX_AGENT_GROUPS)
{
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index b1895bfc9b..95a535da50 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -282,7 +282,6 @@ void LLPanelVolume::getState( )
if (is_light && editable && single_volume)
{
- getChildView("label color")->setEnabled(true);
//mLabelColor ->setEnabled( TRUE );
LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(LightColorSwatch)
@@ -325,7 +324,6 @@ void LLPanelVolume::getState( )
getChild<LLSpinCtrl>("Light Radius", true)->clear();
getChild<LLSpinCtrl>("Light Falloff", true)->clear();
- getChildView("label color")->setEnabled(false);
LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(LightColorSwatch)
{
@@ -567,9 +565,7 @@ void LLPanelVolume::clearCtrls()
getChildView("select_single")->setVisible(true);
getChildView("edit_object")->setEnabled(false);
getChildView("edit_object")->setVisible(false);
- getChildView("Light Checkbox Ctrl")->setEnabled(false);
- getChildView("label color")->setEnabled(false);
- getChildView("label color")->setEnabled(false);
+ getChildView("Light Checkbox Ctrl")->setEnabled(false);;
LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(LightColorSwatch)
{
diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp
index 6595da235c..6792137350 100644
--- a/indra/newview/llpanelvolumepulldown.cpp
+++ b/indra/newview/llpanelvolumepulldown.cpp
@@ -35,6 +35,7 @@
// Linden libs
#include "llbutton.h"
+#include "llcheckboxctrl.h"
#include "lltabcontainer.h"
#include "llfloaterreg.h"
#include "llfloaterpreference.h"
@@ -52,17 +53,15 @@ LLPanelVolumePulldown::LLPanelVolumePulldown()
{
mHoverTimer.stop();
- mCommitCallbackRegistrar.add("Vol.setControlFalse", boost::bind(&LLPanelVolumePulldown::setControlFalse, this, _2));
+ mCommitCallbackRegistrar.add("Vol.setControlFalse", boost::bind(&LLPanelVolumePulldown::setControlFalse, this, _2));
+ mCommitCallbackRegistrar.add("Vol.SetSounds", boost::bind(&LLPanelVolumePulldown::onClickSetSounds, this));
+ mCommitCallbackRegistrar.add("Vol.updateMediaAutoPlayCheckbox", boost::bind(&LLPanelVolumePulldown::updateMediaAutoPlayCheckbox, this, _1));
mCommitCallbackRegistrar.add("Vol.GoAudioPrefs", boost::bind(&LLPanelVolumePulldown::onAdvancedButtonClick, this, _2));
buildFromFile( "panel_volume_pulldown.xml");
}
BOOL LLPanelVolumePulldown::postBuild()
{
- // set the initial volume-slider's position to reflect reality
- LLSliderCtrl* volslider = getChild<LLSliderCtrl>( "mastervolume" );
- volslider->setValue(gSavedSettings.getF32("AudioLevelMaster"));
-
return LLPanel::postBuild();
}
@@ -130,6 +129,28 @@ void LLPanelVolumePulldown::setControlFalse(const LLSD& user_data)
control->set(LLSD(FALSE));
}
+void LLPanelVolumePulldown::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl)
+{
+ std::string name = ctrl->getName();
+
+ // Disable "Allow Media to auto play" only when both
+ // "Streaming Music" and "Media" are unchecked. STORM-513.
+ if ((name == "enable_music") || (name == "enable_media"))
+ {
+ bool music_enabled = getChild<LLCheckBoxCtrl>("enable_music")->get();
+ bool media_enabled = getChild<LLCheckBoxCtrl>("enable_media")->get();
+
+ getChild<LLCheckBoxCtrl>("media_auto_play_btn")->setEnabled(music_enabled || media_enabled);
+ }
+}
+
+void LLPanelVolumePulldown::onClickSetSounds()
+{
+ // Disable Enable gesture sounds checkbox if the master sound is disabled
+ // or if sound effects are disabled.
+ getChild<LLCheckBoxCtrl>("gesture_audio_play_btn")->setEnabled(!gSavedSettings.getBOOL("MuteSounds"));
+}
+
//virtual
void LLPanelVolumePulldown::draw()
{
diff --git a/indra/newview/llpanelvolumepulldown.h b/indra/newview/llpanelvolumepulldown.h
index b843fab756..4f23112f50 100644
--- a/indra/newview/llpanelvolumepulldown.h
+++ b/indra/newview/llpanelvolumepulldown.h
@@ -47,6 +47,10 @@ class LLPanelVolumePulldown : public LLPanel
private:
void setControlFalse(const LLSD& user_data);
+ void onClickSetSounds();
+ // Disables "Allow Media to auto play" check box only when both
+ // "Streaming Music" and "Media" are unchecked. Otherwise enables it.
+ void updateMediaAutoPlayCheckbox(LLUICtrl* ctrl);
void onAdvancedButtonClick(const LLSD& user_data);
LLFrameTimer mHoverTimer;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 62560a2fc8..7a4c41779a 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -751,7 +751,6 @@ bool idle_startup()
if (gLoginMenuBarView == NULL)
{
LL_DEBUGS("AppInit") << "initializing menu bar" << LL_ENDL;
- initialize_edit_menu();
initialize_spellcheck_menu();
init_menus();
}
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 72c5c961aa..43c0fbd53a 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -108,7 +108,6 @@ LLStatusBar::LLStatusBar(const LLRect& rect)
mTextTime(NULL),
mSGBandwidth(NULL),
mSGPacketLoss(NULL),
- mBtnStats(NULL),
mBtnVolume(NULL),
mBoxBalance(NULL),
mBalance(0),
@@ -168,8 +167,6 @@ BOOL LLStatusBar::postBuild()
mBoxBalance = getChild<LLTextBox>("balance");
mBoxBalance->setClickedCallback( &LLStatusBar::onClickBalance, this );
-
- mBtnStats = getChildView("stat_btn");
mIconPresets = getChild<LLIconCtrl>( "presets_icon" );
mIconPresets->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterPresets, this));
@@ -242,8 +239,6 @@ BOOL LLStatusBar::postBuild()
mPanelNearByMedia->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT);
mPanelNearByMedia->setVisible(FALSE);
- mScriptOut = getChildView("scriptout");
-
return TRUE;
}
@@ -297,7 +292,6 @@ void LLStatusBar::refresh()
mSGBandwidth->setVisible(net_stats_visible);
mSGPacketLoss->setVisible(net_stats_visible);
- mBtnStats->setEnabled(net_stats_visible);
// update the master volume button state
bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute();
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index 277f039f20..a3326e752a 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -105,12 +105,10 @@ private:
LLStatGraph *mSGBandwidth;
LLStatGraph *mSGPacketLoss;
- LLView *mBtnStats;
LLIconCtrl *mIconPresets;
LLButton *mBtnVolume;
LLTextBox *mBoxBalance;
LLButton *mMediaToggle;
- LLView *mScriptOut;
LLFrameTimer mClockUpdateTimer;
S32 mBalance;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index e973363e0f..0eebf2051c 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7976,6 +7976,23 @@ void handle_web_browser_test(const LLSD& param)
LLWeb::loadURLInternal(url);
}
+bool callback_clear_cache_immediately(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if ( option == 0 ) // YES
+ {
+ //clear cache
+ LLAppViewer::instance()->purgeCacheImmediate();
+ }
+
+ return false;
+}
+
+void handle_cache_clear_immediately()
+{
+ LLNotificationsUtil::add("ConfirmClearCache", LLSD(), LLSD(), callback_clear_cache_immediately);
+}
+
void handle_web_content_test(const LLSD& param)
{
std::string url = param.asString();
@@ -9026,6 +9043,8 @@ void initialize_menus()
//Develop (Texture Fetch Debug Console)
view_listener_t::addMenu(new LLDevelopTextureFetchDebugger(), "Develop.SetTexFetchDebugger");
+ //Develop (clear cache immediately)
+ commit.add("Develop.ClearCache", boost::bind(&handle_cache_clear_immediately) );
// Admin >Object
view_listener_t::addMenu(new LLAdminForceTakeCopy(), "Admin.ForceTakeCopy");
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 624c48e945..714bf2c9a0 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -134,6 +134,7 @@ std::map<std::string, U32> LLViewerObject::sObjectDataMap;
// JC 3/18/2003
const F32 PHYSICS_TIMESTEP = 1.f / 45.f;
+const U32 MAX_INV_FILE_READ_FAILS = 25;
static LLTrace::BlockTimerStatHandle FTM_CREATE_OBJECT("Create Object");
@@ -3063,6 +3064,7 @@ BOOL LLViewerObject::loadTaskInvFile(const std::string& filename)
llifstream ifs(filename_and_local_path.c_str());
if(ifs.good())
{
+ U32 fail_count = 0;
char buffer[MAX_STRING]; /* Flawfinder: ignore */
// *NOTE: This buffer size is hard coded into scanf() below.
char keyword[MAX_STRING]; /* Flawfinder: ignore */
@@ -3077,8 +3079,14 @@ BOOL LLViewerObject::loadTaskInvFile(const std::string& filename)
while(ifs.good())
{
ifs.getline(buffer, MAX_STRING);
- sscanf(buffer, " %254s", keyword); /* Flawfinder: ignore */
- if(0 == strcmp("inv_item", keyword))
+ if (sscanf(buffer, " %254s", keyword) == EOF) /* Flawfinder: ignore */
+ {
+ // Blank file?
+ LL_WARNS() << "Issue reading from file '"
+ << filename << "'" << LL_ENDL;
+ break;
+ }
+ else if(0 == strcmp("inv_item", keyword))
{
LLPointer<LLInventoryObject> inv = new LLViewerInventoryItem;
inv->importLegacyStream(ifs);
@@ -3091,9 +3099,17 @@ BOOL LLViewerObject::loadTaskInvFile(const std::string& filename)
inv->rename("Contents");
mInventory->push_front(inv);
}
+ else if (fail_count >= MAX_INV_FILE_READ_FAILS)
+ {
+ LL_WARNS() << "Encountered too many unknowns while reading from file: '"
+ << filename << "'" << LL_ENDL;
+ break;
+ }
else
{
- LL_WARNS() << "Unknown token in inventory file '"
+ // Is there really a point to continue processing? We already failing to display full inventory
+ fail_count++;
+ LL_WARNS_ONCE() << "Unknown token while reading from inventory file. Token: '"
<< keyword << "'" << LL_ENDL;
}
}
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 52dc3fbb69..feaafad2e1 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1877,7 +1877,7 @@ void LLViewerRegion::updateNetStats()
mLastPacketsLost = mPacketsLost;
mPacketsIn = cdp->getPacketsIn();
- mBitsIn = 8 * cdp->getBytesIn();
+ mBitsIn = cdp->getBytesIn();
mPacketsOut = cdp->getPacketsOut();
mPacketsLost = cdp->getPacketsLost();
mPingDelay = cdp->getPingDelay();
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index e90b4ac86c..7e90a35f88 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -261,10 +261,8 @@ static const F32 MIN_UI_SCALE = 0.75f;
static const F32 MAX_UI_SCALE = 7.0f;
static const F32 MIN_DISPLAY_SCALE = 0.75f;
-std::string LLViewerWindow::sSnapshotBaseName;
-std::string LLViewerWindow::sSnapshotDir;
-
-std::string LLViewerWindow::sMovieBaseName;
+static LLCachedControl<std::string> sSnapshotBaseName(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseName", "Snapshot"));
+static LLCachedControl<std::string> sSnapshotDir(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseDir", ""));
LLTrace::SampleStatHandle<> LLViewerWindow::sMouseVelocityStat("Mouse Velocity");
@@ -1694,11 +1692,6 @@ LLViewerWindow::LLViewerWindow(const Params& p)
LL_INFOS() << "NOTE: ALL NOTIFICATIONS THAT OCCUR WILL GET ADDED TO IGNORE LIST FOR LATER RUNS." << LL_ENDL;
}
- // Default to application directory.
- LLViewerWindow::sSnapshotBaseName = "Snapshot";
- LLViewerWindow::sMovieBaseName = "SLmovie";
- resetSnapshotLoc();
-
/*
LLWindowCallbacks* callbacks,
@@ -1877,6 +1870,11 @@ void LLViewerWindow::showSystemUIScaleFactorChanged()
LLNotificationsUtil::add("SystemUIScaleFactorChanged", LLSD(), LLSD(), onSystemUIScaleFactorChanged);
}
+std::string LLViewerWindow::getLastSnapshotDir()
+{
+ return sSnapshotDir;
+}
+
//static
bool LLViewerWindow::onSystemUIScaleFactorChanged(const LLSD& notification, const LLSD& response)
{
@@ -1946,6 +1944,10 @@ void LLViewerWindow::initBase()
// Create global views
+ // Login screen and main_view.xml need edit menus for preferences and browser
+ LL_DEBUGS("AppInit") << "initializing edit menu" << LL_ENDL;
+ initialize_edit_menu();
+
// Create the floater view at the start so that other views can add children to it.
// (But wait to add it as a child of the root view so that it will be in front of the
// other views.)
@@ -4397,20 +4399,21 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, BOOL force_picke
// Copy the directory + file name
std::string filepath = picker.getFirstFile();
- LLViewerWindow::sSnapshotBaseName = gDirUtilp->getBaseFileName(filepath, true);
- LLViewerWindow::sSnapshotDir = gDirUtilp->getDirName(filepath);
+ gSavedPerAccountSettings.setString("SnapshotBaseName", gDirUtilp->getBaseFileName(filepath, true));
+ gSavedPerAccountSettings.setString("SnapshotBaseDir", gDirUtilp->getDirName(filepath));
}
- if(LLViewerWindow::sSnapshotDir.empty())
+ std::string snapshot_dir = sSnapshotDir;
+ if(snapshot_dir.empty())
{
return FALSE;
}
// Check if there is enough free space to save snapshot
#ifdef LL_WINDOWS
- boost::filesystem::space_info b_space = boost::filesystem::space(utf8str_to_utf16str(sSnapshotDir));
+ boost::filesystem::space_info b_space = boost::filesystem::space(utf8str_to_utf16str(snapshot_dir));
#else
- boost::filesystem::space_info b_space = boost::filesystem::space(sSnapshotDir);
+ boost::filesystem::space_info b_space = boost::filesystem::space(snapshot_dir);
#endif
if (b_space.free < image->getDataSize())
{
@@ -4448,7 +4451,7 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, BOOL force_picke
void LLViewerWindow::resetSnapshotLoc()
{
- sSnapshotDir.clear();
+ gSavedPerAccountSettings.setString("SnapshotBaseDir", std::string());
}
// static
@@ -4502,6 +4505,17 @@ void LLViewerWindow::playSnapshotAnimAndSound()
send_sound_trigger(LLUUID(gSavedSettings.getString("UISndSnapshot")), 1.0f);
}
+BOOL LLViewerWindow::isSnapshotLocSet() const
+{
+ std::string snapshot_dir = sSnapshotDir;
+ return !snapshot_dir.empty();
+}
+
+void LLViewerWindow::resetSnapshotLoc() const
+{
+ gSavedPerAccountSettings.setString("SnapshotBaseDir", std::string());
+}
+
BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type)
{
return rawSnapshot(raw, preview_width, preview_height, FALSE, FALSE, show_ui, do_rebuild, type);
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 38178fa910..c01921641c 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -350,8 +350,8 @@ public:
BOOL rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, BOOL keep_window_aspect = TRUE, BOOL is_texture = FALSE,
BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_SNAPSHOT_IMAGE_SIZE);
BOOL thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type);
- BOOL isSnapshotLocSet() const { return ! sSnapshotDir.empty(); }
- void resetSnapshotLoc() const { sSnapshotDir.clear(); }
+ BOOL isSnapshotLocSet() const;
+ void resetSnapshotLoc() const;
BOOL saveImageNumbered(LLImageFormatted *image, BOOL force_picker, BOOL& insufficient_memory);
// Reset the directory where snapshots are saved.
@@ -419,7 +419,7 @@ public:
bool getSystemUIScaleFactorChanged() { return mSystemUIScaleFactorChanged; }
static void showSystemUIScaleFactorChanged();
- static std::string getLastSnapshotDir() { return sSnapshotDir; }
+ static std::string getLastSnapshotDir();
private:
bool shouldShowToolTipFor(LLMouseHandler *mh);
@@ -504,11 +504,6 @@ private:
boost::scoped_ptr<LLWindowListener> mWindowListener;
boost::scoped_ptr<LLViewerWindowListener> mViewerWindowListener;
- static std::string sSnapshotBaseName;
- static std::string sSnapshotDir;
-
- static std::string sMovieBaseName;
-
// Object temporarily hovered over while dragging
LLPointer<LLViewerObject> mDragHoveredObject;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index d7a24c6823..0f751de2e3 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5322,6 +5322,11 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
if (use_new_walk_run)
result = ANIM_AGENT_RUN_NEW;
}
+ // keeps in sync with setSex() related code (viewer controls sit's sex)
+ else if (id == ANIM_AGENT_SIT_FEMALE)
+ {
+ result = ANIM_AGENT_SIT;
+ }
}
@@ -6093,7 +6098,26 @@ void LLVOAvatar::initAttachmentPoints(bool ignore_hud_joints)
//-----------------------------------------------------------------------------
void LLVOAvatar::updateVisualParams()
{
- setSex( (getVisualParamWeight( "male" ) > 0.5f) ? SEX_MALE : SEX_FEMALE );
+ ESex avatar_sex = (getVisualParamWeight("male") > 0.5f) ? SEX_MALE : SEX_FEMALE;
+ if (getSex() != avatar_sex)
+ {
+ if (mIsSitting && findMotion(avatar_sex == SEX_MALE ? ANIM_AGENT_SIT_FEMALE : ANIM_AGENT_SIT) != NULL)
+ {
+ // In some cases of gender change server changes sit motion with motion message,
+ // but in case of some avatars (legacy?) there is no update from server side,
+ // likely because server doesn't know about difference between motions
+ // (female and male sit ids are same server side, so it is likely unaware that it
+ // need to send update)
+ // Make sure motion is up to date
+ stopMotion(ANIM_AGENT_SIT);
+ setSex(avatar_sex);
+ startMotion(ANIM_AGENT_SIT);
+ }
+ else
+ {
+ setSex(avatar_sex);
+ }
+ }
LLCharacter::updateVisualParams();
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 9b0d9f4a7b..c1ecfd07c1 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -266,9 +266,10 @@ void LLVOVolume::markDead()
{
mSculptTexture->removeVolume(LLRender::SCULPT_TEX, this);
}
- if (hasLightTexture())
+
+ if (mLightTexture.notNull())
{
- getLightTexture()->removeVolume(LLRender::LIGHT_TEX, this);
+ mLightTexture->removeVolume(LLRender::LIGHT_TEX, this);
}
}
@@ -2850,8 +2851,8 @@ void LLVOVolume::setLightTextureID(LLUUID id)
{
setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, TRUE, true);
}
- else
- {
+ else if (old_texturep)
+ {
old_texturep->removeVolume(LLRender::LIGHT_TEX, this);
}
LLLightImageParams* param_block = (LLLightImageParams*) getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE);
@@ -2860,17 +2861,25 @@ void LLVOVolume::setLightTextureID(LLUUID id)
param_block->setLightTexture(id);
parameterChanged(LLNetworkData::PARAMS_LIGHT_IMAGE, true);
}
- getLightTexture()->addVolume(LLRender::LIGHT_TEX, this); // new texture
+ LLViewerTexture* tex = getLightTexture();
+ if (tex)
+ {
+ tex->addVolume(LLRender::LIGHT_TEX, this); // new texture
+ }
+ else
+ {
+ LL_WARNS() << "Can't get light texture for ID " << id.asString() << LL_ENDL;
+ }
}
- else
+ else if (hasLightTexture())
{
- if (hasLightTexture())
+ if (old_texturep)
{
old_texturep->removeVolume(LLRender::LIGHT_TEX, this);
- setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, FALSE, true);
- parameterChanged(LLNetworkData::PARAMS_LIGHT_IMAGE, true);
- mLightTexture = NULL;
}
+ setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, FALSE, true);
+ parameterChanged(LLNetworkData::PARAMS_LIGHT_IMAGE, true);
+ mLightTexture = NULL;
}
}
diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml
index 3c979c56c3..aefe30813c 100644
--- a/indra/newview/skins/default/xui/de/notifications.xml
+++ b/indra/newview/skins/default/xui/de/notifications.xml
@@ -2505,7 +2505,7 @@ Möchten Sie den Nicht-stören-Modus deaktivieren, bevor Sie diese Transaktion a
<usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="OK"/>
</notification>
<notification name="ConfirmEmptyTrash">
- [COUNT] bestellungen und Ordner werden dauerhaft gelöscht. Sind Sie sicher, dass Sie den Inhalt Ihres Papierkorbs dauerhaft löschen möchten?
+ [COUNT] Bestellungen und Ordner werden dauerhaft gelöscht. Sind Sie sicher, dass Sie den Inhalt Ihres Papierkorbs dauerhaft löschen möchten?
<usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="OK"/>
</notification>
<notification name="TrashIsFull">
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 5b45364127..3ea9e77a03 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -88,14 +88,6 @@
function="Inventory.Share" />
</menu_item_call>
<menu_item_call
- label="Buy"
- layout="topleft"
- name="Task Buy">
- <menu_item_call.on_click
- function="Inventory.DoToSelected"
- parameter="task_buy" />
- </menu_item_call>
- <menu_item_call
label="Open"
layout="topleft"
name="Task Open">
diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml
index 6adede0362..2034409111 100644
--- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml
+++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml
@@ -29,7 +29,7 @@
top="10"
volume="true">
<slider.commit_callback
- function="Pref.setControlFalse"
+ function="Vol.setControlFalse"
parameter="MuteAudio" />
</slider>
<button
@@ -61,7 +61,7 @@
top_pad="4"
volume="true">
<slider.commit_callback
- function="Pref.setControlFalse"
+ function="Vol.setControlFalse"
parameter="MuteUI" />
</slider>
<button
@@ -94,7 +94,7 @@
top_pad="4"
volume="true">
<slider.commit_callback
- function="Pref.setControlFalse"
+ function="Vol.setControlFalse"
parameter="MuteAmbient" />
</slider>
<button
@@ -127,7 +127,7 @@
top_pad="4"
volume="true">
<slider.commit_callback
- function="Pref.setControlFalse"
+ function="Vol.setControlFalse"
parameter="MuteSounds" />
</slider>
<button
@@ -144,7 +144,7 @@
tab_stop="false"
width="16">
<button.commit_callback
- function="Pref.SetSounds"/>
+ function="Vol.SetSounds"/>
</button>
<check_box
name="gesture_audio_play_btn"
@@ -173,7 +173,7 @@
top_pad="4"
volume="true">
<slider.commit_callback
- function="Pref.setControlFalse"
+ function="Vol.setControlFalse"
parameter="MuteMusic" />
</slider>
<button
@@ -199,7 +199,7 @@
top_delta="2"
width="350">
<check_box.commit_callback
- function="Pref.updateMediaAutoPlayCheckbox"/>
+ function="Vol.updateMediaAutoPlayCheckbox"/>
</check_box>
<slider
control_name="AudioLevelMedia"
@@ -218,7 +218,7 @@
top_pad="4"
volume="true">
<slider.commit_callback
- function="Pref.setControlFalse"
+ function="Vol.setControlFalse"
parameter="MuteMedia" />
</slider>
<button
@@ -246,7 +246,7 @@
name="enable_media"
width="110">
<check_box.commit_callback
- function="Pref.updateMediaAutoPlayCheckbox"/>
+ function="Vol.updateMediaAutoPlayCheckbox"/>
</check_box>
<slider
control_name="AudioLevelVoice"
@@ -265,7 +265,7 @@
show_text="false"
volume="true">
<slider.commit_callback
- function="Pref.setControlFalse"
+ function="Vol.setControlFalse"
parameter="MuteVoice" />
</slider>
<button
diff --git a/indra/newview/skins/default/xui/ru/panel_main_inventory.xml b/indra/newview/skins/default/xui/ru/panel_main_inventory.xml
index b9113e021a..f2502bf6d3 100644
--- a/indra/newview/skins/default/xui/ru/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/ru/panel_main_inventory.xml
@@ -4,7 +4,7 @@
Выборка [ITEM_COUNT] предметов и [CATEGORY_COUNT] папок ... [FILTER]
</panel.string>
<panel.string name="ItemcountCompleted">
- [ITEM_COUNT] предметов(а) и [CATEGORY_COUNT] папки(ок) ... [FILTER]
+ [ITEM_COUNT] предметов(а) и [CATEGORY_COUNT] папки(ок) [FILTER]
</panel.string>
<panel.string name="ItemcountUnknown">
Выборка [ITEM_COUNT] предметов и [CATEGORY_COUNT] папок [FILTER]