summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/cmake/BuildVersion.cmake2
-rwxr-xr-xindra/llcommon/tests/llprocess_test.cpp14
-rwxr-xr-xindra/llui/lltexteditor.cpp24
-rwxr-xr-xindra/llui/lltexteditor.h2
-rwxr-xr-xindra/newview/CMakeLists.txt2
-rwxr-xr-xindra/newview/app_settings/cmd_line.xml10
-rwxr-xr-xindra/newview/app_settings/settings.xml22
-rwxr-xr-xindra/newview/app_settings/settings_minimal.xml5
-rwxr-xr-xindra/newview/llappviewer.cpp16
-rwxr-xr-xindra/newview/llchatbar.cpp2
-rwxr-xr-xindra/newview/llfloaterabout.cpp4
-rwxr-xr-xindra/newview/llfloaterbulkpermission.cpp36
-rwxr-xr-xindra/newview/llfloaterbulkpermission.h16
-rw-r--r--indra/newview/llfloatergotoline.cpp160
-rw-r--r--indra/newview/llfloatergotoline.h66
-rwxr-xr-xindra/newview/llfloaterimnearbychat.cpp2
-rwxr-xr-xindra/newview/llfloaterimnearbychatlistener.cpp4
-rwxr-xr-xindra/newview/llmaniprotate.cpp232
-rwxr-xr-xindra/newview/llpanelgrouproles.cpp66
-rwxr-xr-xindra/newview/llpanelgrouproles.h1
-rwxr-xr-xindra/newview/llpanelpeople.cpp4
-rwxr-xr-xindra/newview/llpreviewscript.cpp21
-rwxr-xr-xindra/newview/llpreviewscript.h3
-rwxr-xr-xindra/newview/llviewermessage.cpp17
-rwxr-xr-xindra/newview/llviewernetwork.cpp32
-rwxr-xr-xindra/newview/llviewernetwork.h9
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_bulk_perms.xml19
-rw-r--r--indra/newview/skins/default/xui/en/floater_goto_line.xml44
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml39
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_group_notices.xml4
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_people.xml14
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_preferences_advanced.xml2
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_script_ed.xml4
-rwxr-xr-xindra/newview/tests/lllogininstance_test.cpp5
-rwxr-xr-xindra/newview/tests/llviewernetwork_test.cpp10
-rwxr-xr-xindra/viewer_components/updater/llupdatechecker.cpp21
-rwxr-xr-xindra/viewer_components/updater/llupdatechecker.h12
-rwxr-xr-xindra/viewer_components/updater/llupdaterservice.cpp53
-rwxr-xr-xindra/viewer_components/updater/llupdaterservice.h4
-rwxr-xr-xindra/viewer_components/updater/scripts/linux/update_install7
-rwxr-xr-xindra/viewer_components/updater/tests/llupdaterservice_test.cpp24
41 files changed, 796 insertions, 238 deletions
diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake
index b9ec8f5266..af2063ce6d 100755
--- a/indra/cmake/BuildVersion.cmake
+++ b/indra/cmake/BuildVersion.cmake
@@ -18,7 +18,7 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n
find_program(MERCURIAL hg)
if (DEFINED MERCURIAL)
execute_process(
- COMMAND ${MERCURIAL} log -r tip --template "{p1rev}"
+ COMMAND ${MERCURIAL} log -r tip --template "{rev}"
OUTPUT_VARIABLE VIEWER_VERSION_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp
index f188865eb0..3e68ef068e 100755
--- a/indra/llcommon/tests/llprocess_test.cpp
+++ b/indra/llcommon/tests/llprocess_test.cpp
@@ -608,9 +608,6 @@ namespace tut
void object::test<5>()
{
set_test_name("exit(2)");
-#if LL_WINDOWS
- skip("MAINT-2302: This frequently (though not always) fails on Windows.");
-#endif
PythonProcessLauncher py(get_test_name(),
"import sys\n"
"sys.exit(2)\n");
@@ -622,10 +619,7 @@ namespace tut
template<> template<>
void object::test<6>()
{
- set_test_name("syntax_error:");
-#if LL_WINDOWS
- skip("MAINT-2302: This frequently (though not always) fails on Windows.");
-#endif
+ set_test_name("syntax_error");
PythonProcessLauncher py(get_test_name(),
"syntax_error:\n");
py.mParams.files.add(LLProcess::FileParam()); // inherit stdin
@@ -647,9 +641,6 @@ namespace tut
void object::test<7>()
{
set_test_name("explicit kill()");
-#if LL_WINDOWS
- skip("MAINT-2302: This frequently (though not always) fails on Windows.");
-#endif
PythonProcessLauncher py(get_test_name(),
"from __future__ import with_statement\n"
"import sys, time\n"
@@ -694,9 +685,6 @@ namespace tut
void object::test<8>()
{
set_test_name("implicit kill()");
-#if LL_WINDOWS
- skip("MAINT-2302: This frequently (though not always) fails on Windows.");
-#endif
NamedTempFile out("out", "not started");
LLProcess::handle phandle(0);
{
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 834f213097..d6c5c5c48e 100755
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -1125,7 +1125,8 @@ void LLTextEditor::addChar(llwchar wc)
}
}
-void LLTextEditor::addLineBreakChar()
+
+void LLTextEditor::addLineBreakChar(BOOL group_together)
{
if( !getEnabled() )
{
@@ -1143,7 +1144,7 @@ void LLTextEditor::addLineBreakChar()
LLStyleConstSP sp(new LLStyle(LLStyle::Params()));
LLTextSegmentPtr segment = new LLLineBreakTextSegment(sp, mCursorPos);
- S32 pos = execute(new TextCmdAddChar(mCursorPos, FALSE, '\n', segment));
+ S32 pos = execute(new TextCmdAddChar(mCursorPos, group_together, '\n', segment));
setCursorPos(mCursorPos + pos);
}
@@ -1484,21 +1485,28 @@ void LLTextEditor::pasteTextWithLinebreaks(LLWString & clean_string)
std::basic_string<llwchar>::size_type start = 0;
std::basic_string<llwchar>::size_type pos = clean_string.find('\n',start);
- while(pos!=-1)
+ while((pos != -1) && (pos != clean_string.length() -1))
{
if(pos!=start)
{
std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,pos-start);
- setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr()));
+ setCursorPos(mCursorPos + insert(mCursorPos, str, TRUE, LLTextSegmentPtr()));
}
- addLineBreakChar();
-
+ addLineBreakChar(TRUE); // Add a line break and group with the next addition.
+
start = pos+1;
pos = clean_string.find('\n',start);
}
- std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,clean_string.length()-start);
- setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr()));
+ if (pos != start)
+ {
+ std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,clean_string.length()-start);
+ setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr()));
+ }
+ else
+ {
+ addLineBreakChar(FALSE); // Add a line break and end the grouping.
+ }
}
// copy selection to primary
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 969e072704..ad46ed45ec 100755
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -248,7 +248,7 @@ protected:
// Undoable operations
void addChar(llwchar c); // at mCursorPos
S32 addChar(S32 pos, llwchar wc);
- void addLineBreakChar();
+ void addLineBreakChar(BOOL group_together = FALSE);
S32 overwriteChar(S32 pos, llwchar wc);
void removeChar();
S32 removeChar(S32 pos);
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 89add3e21f..e2ae7a5a9a 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -229,6 +229,7 @@ set(viewer_SOURCE_FILES
llfloaterfonttest.cpp
llfloatergesture.cpp
llfloatergodtools.cpp
+ llfloatergotoline.cpp
llfloatergroupinvite.cpp
llfloatergroups.cpp
llfloaterhandler.cpp
@@ -812,6 +813,7 @@ set(viewer_HEADER_FILES
llfloaterfonttest.h
llfloatergesture.h
llfloatergodtools.h
+ llfloatergotoline.h
llfloatergroupinvite.h
llfloatergroups.h
llfloaterhandler.h
diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 74117dbd85..a9f6079630 100755
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -111,6 +111,16 @@
<string>CmdLineGridChoice</string>
</map>
+ <key>update-service</key>
+ <map>
+ <key>desc</key>
+ <string>Override the url base for the update query.</string>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>CmdLineUpdateService</string>
+ </map>
+
<key>help</key>
<map>
<key>desc</key>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 4c8860ffe7..9239059c10 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1782,6 +1782,17 @@
<key>Value</key>
<string />
</map>
+ <key>CmdLineUpdateService</key>
+ <map>
+ <key>Comment</key>
+ <string>Override the url base for the update query.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
<key>CmdLineHelperURI</key>
<map>
<key>Comment</key>
@@ -7086,6 +7097,17 @@
<key>Value</key>
<real>90.0</real>
</map>
+ <key>PlayChatAnim</key>
+ <map>
+ <key>Comment</key>
+ <string>Your avatar plays the chat animation whenever you say, shout or whisper something in nearby chat</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>PlayTypingAnim</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml
index 01a70f2671..e660c1a33b 100755
--- a/indra/newview/app_settings/settings_minimal.xml
+++ b/indra/newview/app_settings/settings_minimal.xml
@@ -1 +1,4 @@
-<llsd/> \ No newline at end of file
+<?xml version="1.0"?>
+<llsd>
+ <undef/>
+</llsd>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b2aadf9cc0..ad2d0e1145 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3006,13 +3006,19 @@ namespace {
void LLAppViewer::initUpdater()
{
// Initialize the updater service.
- // Generate URL to the udpater service
// Get Channel
// Get Version
- std::string url = gSavedSettings.getString("UpdaterServiceURL");
+
+ /*****************************************************************
+ * Previously, the url was derived from the settings
+ * UpdaterServiceURL
+ * UpdaterServicePath
+ * it is now obtained from the grid manager. The settings above
+ * are no longer used.
+ *****************************************************************/
std::string channel = LLVersionInfo::getChannel();
std::string version = LLVersionInfo::getVersion();
- std::string service_path = gSavedSettings.getString("UpdaterServicePath");
+
U32 check_period = gSavedSettings.getU32("UpdaterServiceCheckPeriod");
bool willing_to_test;
LL_DEBUGS("UpdaterService") << "channel " << channel << LL_ENDL;
@@ -3037,9 +3043,7 @@ void LLAppViewer::initUpdater()
}
mUpdater->setAppExitCallback(boost::bind(&LLAppViewer::forceQuit, this));
- mUpdater->initialize(url,
- service_path,
- channel,
+ mUpdater->initialize(channel,
version,
gPlatform,
getOSInfo().getOSVersionString(),
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index 7d0331757b..b3bc0ba966 100755
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -381,7 +381,7 @@ void LLChatBar::sendChat( EChatType type )
if (!utf8_revised_text.empty())
{
// Chat with animation
- sendChatFromViewer(utf8_revised_text, type, TRUE);
+ sendChatFromViewer(utf8_revised_text, type, gSavedSettings.getBOOL("PlayChatAnim"));
}
}
}
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 163f294d2a..fea8e34729 100755
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -313,12 +313,12 @@ LLSD LLFloaterAbout::getInfo()
static std::string get_viewer_release_notes_url()
{
// return a URL to the release notes for this viewer, such as:
- // http://wiki.secondlife.com/wiki/Release_Notes/Second Life Beta Viewer/2.1.0
+ // http://wiki.secondlife.com/wiki/Release_Notes/Second Life Beta Viewer/2.1.0.123456
std::string url = LLTrans::getString("RELEASE_NOTES_BASE_URL");
if (! LLStringUtil::endsWith(url, "/"))
url += "/";
url += LLVersionInfo::getChannel() + "/";
- url += LLVersionInfo::getShortVersion();
+ url += LLVersionInfo::getVersion();
return LLWeb::escapeURL(url);
}
diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index 39b6e465f3..76f62a7880 100755
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -57,6 +57,7 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed)
mDone(FALSE)
{
mID.generate();
+ mCommitCallbackRegistrar.add("BulkPermission.Ok", boost::bind(&LLFloaterBulkPermission::onOkBtn, this));
mCommitCallbackRegistrar.add("BulkPermission.Apply", boost::bind(&LLFloaterBulkPermission::onApplyBtn, this));
mCommitCallbackRegistrar.add("BulkPermission.Close", boost::bind(&LLFloaterBulkPermission::onCloseBtn, this));
mCommitCallbackRegistrar.add("BulkPermission.CheckAll", boost::bind(&LLFloaterBulkPermission::onCheckAll, this));
@@ -66,6 +67,21 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed)
BOOL LLFloaterBulkPermission::postBuild()
{
+ mBulkChangeIncludeAnimations = gSavedSettings.getBOOL("BulkChangeIncludeAnimations");
+ mBulkChangeIncludeBodyParts = gSavedSettings.getBOOL("BulkChangeIncludeBodyParts");
+ mBulkChangeIncludeClothing = gSavedSettings.getBOOL("BulkChangeIncludeClothing");
+ mBulkChangeIncludeGestures = gSavedSettings.getBOOL("BulkChangeIncludeGestures");
+ mBulkChangeIncludeNotecards = gSavedSettings.getBOOL("BulkChangeIncludeNotecards");
+ mBulkChangeIncludeObjects = gSavedSettings.getBOOL("BulkChangeIncludeObjects");
+ mBulkChangeIncludeScripts = gSavedSettings.getBOOL("BulkChangeIncludeScripts");
+ mBulkChangeIncludeSounds = gSavedSettings.getBOOL("BulkChangeIncludeSounds");
+ mBulkChangeIncludeTextures = gSavedSettings.getBOOL("BulkChangeIncludeTextures");
+ mBulkChangeShareWithGroup = gSavedSettings.getBOOL("BulkChangeShareWithGroup");
+ mBulkChangeEveryoneCopy = gSavedSettings.getBOOL("BulkChangeEveryoneCopy");
+ mBulkChangeNextOwnerModify = gSavedSettings.getBOOL("BulkChangeNextOwnerModify");
+ mBulkChangeNextOwnerCopy = gSavedSettings.getBOOL("BulkChangeNextOwnerCopy");
+ mBulkChangeNextOwnerTransfer = gSavedSettings.getBOOL("BulkChangeNextOwnerTransfer");
+
return TRUE;
}
@@ -144,6 +160,12 @@ void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object,
}
}
+void LLFloaterBulkPermission::onOkBtn()
+{
+ doApply();
+ closeFloater();
+}
+
void LLFloaterBulkPermission::onApplyBtn()
{
doApply();
@@ -151,6 +173,20 @@ void LLFloaterBulkPermission::onApplyBtn()
void LLFloaterBulkPermission::onCloseBtn()
{
+ gSavedSettings.setBOOL("BulkChangeIncludeAnimations", mBulkChangeIncludeAnimations);
+ gSavedSettings.setBOOL("BulkChangeIncludeBodyParts", mBulkChangeIncludeBodyParts);
+ gSavedSettings.setBOOL("BulkChangeIncludeClothing", mBulkChangeIncludeClothing);
+ gSavedSettings.setBOOL("BulkChangeIncludeGestures", mBulkChangeIncludeGestures);
+ gSavedSettings.setBOOL("BulkChangeIncludeNotecards", mBulkChangeIncludeNotecards);
+ gSavedSettings.setBOOL("BulkChangeIncludeObjects", mBulkChangeIncludeObjects);
+ gSavedSettings.setBOOL("BulkChangeIncludeScripts", mBulkChangeIncludeScripts);
+ gSavedSettings.setBOOL("BulkChangeIncludeSounds", mBulkChangeIncludeSounds);
+ gSavedSettings.setBOOL("BulkChangeIncludeTextures", mBulkChangeIncludeTextures);
+ gSavedSettings.setBOOL("BulkChangeShareWithGroup", mBulkChangeShareWithGroup);
+ gSavedSettings.setBOOL("BulkChangeEveryoneCopy", mBulkChangeEveryoneCopy);
+ gSavedSettings.setBOOL("BulkChangeNextOwnerModify", mBulkChangeNextOwnerModify);
+ gSavedSettings.setBOOL("BulkChangeNextOwnerCopy", mBulkChangeNextOwnerCopy);
+ gSavedSettings.setBOOL("BulkChangeNextOwnerTransfer", mBulkChangeNextOwnerTransfer);
closeFloater();
}
diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h
index 7dd05df7ee..25e76eca65 100755
--- a/indra/newview/llfloaterbulkpermission.h
+++ b/indra/newview/llfloaterbulkpermission.h
@@ -72,6 +72,7 @@ private:
bool is_new);
void onCloseBtn();
+ void onOkBtn();
void onApplyBtn();
void onCommitCopy();
void onCheckAll() { doCheckUncheckAll(TRUE); }
@@ -94,6 +95,21 @@ private:
LLUUID mCurrentObjectID;
BOOL mDone;
+ bool mBulkChangeIncludeAnimations;
+ bool mBulkChangeIncludeBodyParts;
+ bool mBulkChangeIncludeClothing;
+ bool mBulkChangeIncludeGestures;
+ bool mBulkChangeIncludeNotecards;
+ bool mBulkChangeIncludeObjects;
+ bool mBulkChangeIncludeScripts;
+ bool mBulkChangeIncludeSounds;
+ bool mBulkChangeIncludeTextures;
+ bool mBulkChangeShareWithGroup;
+ bool mBulkChangeEveryoneCopy;
+ bool mBulkChangeNextOwnerModify;
+ bool mBulkChangeNextOwnerCopy;
+ bool mBulkChangeNextOwnerTransfer;
+
LLUUID mID;
const char* mStartString;
diff --git a/indra/newview/llfloatergotoline.cpp b/indra/newview/llfloatergotoline.cpp
new file mode 100644
index 0000000000..d66e418926
--- /dev/null
+++ b/indra/newview/llfloatergotoline.cpp
@@ -0,0 +1,160 @@
+/**
+ * @file llfloatergotoline.h
+ * @author MartinRJ
+ * @brief LLFloaterGotoLine class implementation
+ *
+ * $LicenseInfo:firstyear=2012&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2012, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llfloatergotoline.h"
+#include "llpreviewscript.h"
+#include "llfloaterreg.h"
+#include "lllineeditor.h"
+#include "llviewertexteditor.h"
+#include "llviewerwindow.h"
+
+LLFloaterGotoLine* LLFloaterGotoLine::sInstance = NULL;
+
+LLFloaterGotoLine::LLFloaterGotoLine(LLScriptEdCore* editor_core)
+: LLFloater(LLSD()),
+ mGotoBox(NULL),
+ mEditorCore(editor_core)
+{
+ buildFromFile("floater_goto_line.xml");
+
+ sInstance = this;
+
+ // find floater in which script panel is embedded
+ LLView* viewp = (LLView*)editor_core;
+ while(viewp)
+ {
+ LLFloater* floaterp = dynamic_cast<LLFloater*>(viewp);
+ if (floaterp)
+ {
+ floaterp->addDependentFloater(this);
+ break;
+ }
+ viewp = viewp->getParent();
+ }
+}
+
+BOOL LLFloaterGotoLine::postBuild()
+{
+ mGotoBox = getChild<LLLineEditor>("goto_line");
+ mGotoBox->setCommitCallback(boost::bind(&LLFloaterGotoLine::onGotoBoxCommit, this));
+ mGotoBox->setCommitOnFocusLost(FALSE);
+ getChild<LLLineEditor>("goto_line")->setPrevalidate(LLTextValidate::validateNonNegativeS32);
+ childSetAction("goto_btn", onBtnGoto,this);
+ setDefaultBtn("goto_btn");
+
+ return TRUE;
+}
+
+//static
+void LLFloaterGotoLine::show(LLScriptEdCore* editor_core)
+{
+ if (sInstance && sInstance->mEditorCore && sInstance->mEditorCore != editor_core)
+ {
+ sInstance->closeFloater();
+ delete sInstance;
+ }
+
+ if (!sInstance)
+ {
+ // sInstance will be assigned in the constructor.
+ new LLFloaterGotoLine(editor_core);
+ }
+
+ sInstance->openFloater();
+}
+
+LLFloaterGotoLine::~LLFloaterGotoLine()
+{
+ sInstance = NULL;
+}
+
+// static
+void LLFloaterGotoLine::onBtnGoto(void *userdata)
+{
+ LLFloaterGotoLine* self = (LLFloaterGotoLine*)userdata;
+ self->handleBtnGoto();
+}
+
+void LLFloaterGotoLine::handleBtnGoto()
+{
+ S32 row = 0;
+ S32 column = 0;
+ row = getChild<LLUICtrl>("goto_line")->getValue().asInteger();
+ if (row >= 0)
+ {
+ if (mEditorCore && mEditorCore->mEditor)
+ {
+ mEditorCore->mEditor->deselect();
+ mEditorCore->mEditor->setCursor(row, column);
+ mEditorCore->mEditor->setFocus(TRUE);
+ }
+ }
+}
+
+bool LLFloaterGotoLine::hasAccelerators() const
+{
+ if (mEditorCore)
+ {
+ return mEditorCore->hasAccelerators();
+ }
+ return FALSE;
+}
+
+BOOL LLFloaterGotoLine::handleKeyHere(KEY key, MASK mask)
+{
+ if (mEditorCore)
+ {
+ return mEditorCore->handleKeyHere(key, mask);
+ }
+
+ return FALSE;
+}
+
+void LLFloaterGotoLine::onGotoBoxCommit()
+{
+ S32 row = 0;
+ S32 column = 0;
+ row = getChild<LLUICtrl>("goto_line")->getValue().asInteger();
+ if (row >= 0)
+ {
+ if (mEditorCore && mEditorCore->mEditor)
+ {
+ mEditorCore->mEditor->setCursor(row, column);
+
+ S32 rownew = 0;
+ S32 columnnew = 0;
+ mEditorCore->mEditor->getCurrentLineAndColumn( &rownew, &columnnew, FALSE ); // don't include wordwrap
+ if (rownew == row && columnnew == column)
+ {
+ mEditorCore->mEditor->deselect();
+ mEditorCore->mEditor->setFocus(TRUE);
+ sInstance->closeFloater();
+ } //else do nothing (if the cursor-position didn't change)
+ }
+ }
+}
diff --git a/indra/newview/llfloatergotoline.h b/indra/newview/llfloatergotoline.h
new file mode 100644
index 0000000000..058d601752
--- /dev/null
+++ b/indra/newview/llfloatergotoline.h
@@ -0,0 +1,66 @@
+/**
+ * @file llfloatergotoline.h
+ * @author MartinRJ
+ * @brief LLFloaterGotoLine class definition
+ *
+ * $LicenseInfo:firstyear=2012&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2012, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERGOTOLINE_H
+#define LL_LLFLOATERGOTOLINE_H
+
+#include "llfloater.h"
+#include "lllineeditor.h"
+#include "llpreviewscript.h"
+
+class LLScriptEdCore;
+
+class LLFloaterGotoLine : public LLFloater
+{
+public:
+ LLFloaterGotoLine(LLScriptEdCore* editor_core);
+ ~LLFloaterGotoLine();
+
+ /*virtual*/ BOOL postBuild();
+ static void show(LLScriptEdCore* editor_core);
+
+ static void onBtnGoto(void* userdata);
+ void handleBtnGoto();
+
+ LLScriptEdCore* getEditorCore() { return mEditorCore; }
+ static LLFloaterGotoLine* getInstance() { return sInstance; }
+
+ virtual bool hasAccelerators() const;
+ virtual BOOL handleKeyHere(KEY key, MASK mask);
+
+private:
+
+ LLScriptEdCore* mEditorCore;
+
+ static LLFloaterGotoLine* sInstance;
+
+protected:
+ LLLineEditor* mGotoBox;
+ void onGotoBoxCommit();
+};
+
+#endif // LL_LLFLOATERGOTOLINE_H
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 38592b3f65..30320fc5d7 100755
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -582,7 +582,7 @@ void LLFloaterIMNearbyChat::sendChat( EChatType type )
if (!utf8_revised_text.empty())
{
// Chat with animation
- sendChatFromViewer(utf8_revised_text, type, TRUE);
+ sendChatFromViewer(utf8_revised_text, type, gSavedSettings.getBOOL("PlayChatAnim"));
}
}
diff --git a/indra/newview/llfloaterimnearbychatlistener.cpp b/indra/newview/llfloaterimnearbychatlistener.cpp
index 14a22bcd84..5a5f6c72c8 100755
--- a/indra/newview/llfloaterimnearbychatlistener.cpp
+++ b/indra/newview/llfloaterimnearbychatlistener.cpp
@@ -33,7 +33,7 @@
#include "llagent.h"
#include "llchat.h"
-
+#include "llviewercontrol.h"
LLFloaterIMNearbyChatListener::LLFloaterIMNearbyChatListener(LLFloaterIMNearbyChat & chatbar)
@@ -95,6 +95,6 @@ void LLFloaterIMNearbyChatListener::sendChat(LLSD const & chat_data) const
}
// Send it as if it was typed in
- mChatbar.sendChatFromViewer(chat_to_send, type_o_chat, (BOOL)(channel == 0));
+ mChatbar.sendChatFromViewer(chat_to_send, type_o_chat, ((BOOL)(channel == 0)) && gSavedSettings.getBOOL("PlayChatAnim"));
}
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index d79f1040bb..4cbdfde868 100755
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -1376,74 +1376,28 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
BOOL hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis);
projected_mouse -= snap_plane_center;
- S32 snap_plane = 0;
-
- F32 dot = cam_to_snap_plane * constraint_axis;
- if (llabs(dot) < 0.01f)
- {
- // looking at ring edge on, project onto view plane and check if mouse is past ring
- getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_to_snap_plane);
- projected_mouse -= snap_plane_center;
- dot = projected_mouse * constraint_axis;
- if (projected_mouse * constraint_axis > 0)
- {
- snap_plane = 1;
- }
- projected_mouse -= dot * constraint_axis;
- }
- else if (dot > 0.f)
- {
- // look for mouse position outside and in front of snap circle
- if (hit && projected_mouse.magVec() > SNAP_GUIDE_INNER_RADIUS * mRadiusMeters && projected_mouse * cam_to_snap_plane < 0.f)
- {
- snap_plane = 1;
- }
- }
- else
- {
- // look for mouse position inside or in back of snap circle
- if (projected_mouse.magVec() < SNAP_GUIDE_INNER_RADIUS * mRadiusMeters || projected_mouse * cam_to_snap_plane > 0.f || !hit)
- {
- snap_plane = 1;
- }
- }
-
- if (snap_plane == 0)
- {
- // try other plane
- snap_plane_center = (center - (constraint_axis * mRadiusMeters * 0.5f));
- if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
- {
- cam_to_snap_plane.setVec(1.f, 0.f, 0.f);
- }
- else
- {
- cam_to_snap_plane = snap_plane_center - gAgentCamera.getCameraPositionAgent();
- cam_to_snap_plane.normVec();
- }
-
- hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis);
- projected_mouse -= snap_plane_center;
-
- dot = cam_to_snap_plane * constraint_axis;
+ if (gSavedSettings.getBOOL("SnapEnabled")) {
+ S32 snap_plane = 0;
+
+ F32 dot = cam_to_snap_plane * constraint_axis;
if (llabs(dot) < 0.01f)
{
// looking at ring edge on, project onto view plane and check if mouse is past ring
getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_to_snap_plane);
projected_mouse -= snap_plane_center;
dot = projected_mouse * constraint_axis;
- if (projected_mouse * constraint_axis < 0)
+ if (projected_mouse * constraint_axis > 0)
{
- snap_plane = 2;
+ snap_plane = 1;
}
projected_mouse -= dot * constraint_axis;
}
- else if (dot < 0.f)
+ else if (dot > 0.f)
{
// look for mouse position outside and in front of snap circle
if (hit && projected_mouse.magVec() > SNAP_GUIDE_INNER_RADIUS * mRadiusMeters && projected_mouse * cam_to_snap_plane < 0.f)
{
- snap_plane = 2;
+ snap_plane = 1;
}
}
else
@@ -1451,78 +1405,136 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
// look for mouse position inside or in back of snap circle
if (projected_mouse.magVec() < SNAP_GUIDE_INNER_RADIUS * mRadiusMeters || projected_mouse * cam_to_snap_plane > 0.f || !hit)
{
- snap_plane = 2;
+ snap_plane = 1;
}
}
- }
-
- if (snap_plane > 0)
- {
- LLVector3 cam_at_axis;
- if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
- {
- cam_at_axis.setVec(1.f, 0.f, 0.f);
- }
- else
- {
- cam_at_axis = snap_plane_center - gAgentCamera.getCameraPositionAgent();
- cam_at_axis.normVec();
- }
-
- // first, project mouse onto screen plane at point tangent to rotation radius.
- getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_at_axis);
- // project that point onto rotation plane
- projected_mouse -= snap_plane_center;
- projected_mouse -= projected_vec(projected_mouse, constraint_axis);
-
- F32 mouse_lateral_dist = llmin(SNAP_GUIDE_INNER_RADIUS * mRadiusMeters, projected_mouse.magVec());
- F32 mouse_depth = SNAP_GUIDE_INNER_RADIUS * mRadiusMeters;
- if (llabs(mouse_lateral_dist) > 0.01f)
- {
- mouse_depth = sqrtf((SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) * (SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) -
- (mouse_lateral_dist * mouse_lateral_dist));
- }
- LLVector3 projected_camera_at = cam_at_axis - projected_vec(cam_at_axis, constraint_axis);
- projected_mouse -= mouse_depth * projected_camera_at;
-
- if (!mInSnapRegime)
+
+ if (snap_plane == 0)
{
- mSmoothRotate = TRUE;
+ // try other plane
+ snap_plane_center = (center - (constraint_axis * mRadiusMeters * 0.5f));
+ if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
+ {
+ cam_to_snap_plane.setVec(1.f, 0.f, 0.f);
+ }
+ else
+ {
+ cam_to_snap_plane = snap_plane_center - gAgentCamera.getCameraPositionAgent();
+ cam_to_snap_plane.normVec();
+ }
+
+ hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis);
+ projected_mouse -= snap_plane_center;
+
+ dot = cam_to_snap_plane * constraint_axis;
+ if (llabs(dot) < 0.01f)
+ {
+ // looking at ring edge on, project onto view plane and check if mouse is past ring
+ getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_to_snap_plane);
+ projected_mouse -= snap_plane_center;
+ dot = projected_mouse * constraint_axis;
+ if (projected_mouse * constraint_axis < 0)
+ {
+ snap_plane = 2;
+ }
+ projected_mouse -= dot * constraint_axis;
+ }
+ else if (dot < 0.f)
+ {
+ // look for mouse position outside and in front of snap circle
+ if (hit && projected_mouse.magVec() > SNAP_GUIDE_INNER_RADIUS * mRadiusMeters && projected_mouse * cam_to_snap_plane < 0.f)
+ {
+ snap_plane = 2;
+ }
+ }
+ else
+ {
+ // look for mouse position inside or in back of snap circle
+ if (projected_mouse.magVec() < SNAP_GUIDE_INNER_RADIUS * mRadiusMeters || projected_mouse * cam_to_snap_plane > 0.f || !hit)
+ {
+ snap_plane = 2;
+ }
+ }
}
- mInSnapRegime = TRUE;
- // 0 to 360 deg
- F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f);
- F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT);
- //fmodf(llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f);
-
- LLVector3 object_axis;
- getObjectAxisClosestToMouse(object_axis);
- object_axis = object_axis * first_object_node->mSavedRotation;
-
- // project onto constraint plane
- object_axis = object_axis - (object_axis * getConstraintAxis()) * getConstraintAxis();
- object_axis.normVec();
-
- if (relative_mouse_angle < SNAP_ANGLE_DETENTE)
+ if (snap_plane > 0)
{
- F32 quantized_mouse_angle = mouse_angle - (relative_mouse_angle - (SNAP_ANGLE_DETENTE * 0.5f));
- angle = (quantized_mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2);
+ LLVector3 cam_at_axis;
+ if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
+ {
+ cam_at_axis.setVec(1.f, 0.f, 0.f);
+ }
+ else
+ {
+ cam_at_axis = snap_plane_center - gAgentCamera.getCameraPositionAgent();
+ cam_at_axis.normVec();
+ }
+
+ // first, project mouse onto screen plane at point tangent to rotation radius.
+ getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_at_axis);
+ // project that point onto rotation plane
+ projected_mouse -= snap_plane_center;
+ projected_mouse -= projected_vec(projected_mouse, constraint_axis);
+
+ F32 mouse_lateral_dist = llmin(SNAP_GUIDE_INNER_RADIUS * mRadiusMeters, projected_mouse.magVec());
+ F32 mouse_depth = SNAP_GUIDE_INNER_RADIUS * mRadiusMeters;
+ if (llabs(mouse_lateral_dist) > 0.01f)
+ {
+ mouse_depth = sqrtf((SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) * (SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) -
+ (mouse_lateral_dist * mouse_lateral_dist));
+ }
+ LLVector3 projected_camera_at = cam_at_axis - projected_vec(cam_at_axis, constraint_axis);
+ projected_mouse -= mouse_depth * projected_camera_at;
+
+ if (!mInSnapRegime)
+ {
+ mSmoothRotate = TRUE;
+ }
+ mInSnapRegime = TRUE;
+ // 0 to 360 deg
+ F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f);
+
+ F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT);
+ //fmodf(llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f);
+
+ LLVector3 object_axis;
+ getObjectAxisClosestToMouse(object_axis);
+ object_axis = object_axis * first_object_node->mSavedRotation;
+
+ // project onto constraint plane
+ object_axis = object_axis - (object_axis * getConstraintAxis()) * getConstraintAxis();
+ object_axis.normVec();
+
+ if (relative_mouse_angle < SNAP_ANGLE_DETENTE)
+ {
+ F32 quantized_mouse_angle = mouse_angle - (relative_mouse_angle - (SNAP_ANGLE_DETENTE * 0.5f));
+ angle = (quantized_mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2);
+ }
+ else
+ {
+ angle = (mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2);
+ }
+ return LLQuaternion( -angle, constraint_axis );
}
else
{
- angle = (mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2);
+ if (mInSnapRegime)
+ {
+ mSmoothRotate = TRUE;
+ }
+ mInSnapRegime = FALSE;
}
- return LLQuaternion( -angle, constraint_axis );
}
- else
- {
+ else {
if (mInSnapRegime)
{
mSmoothRotate = TRUE;
}
mInSnapRegime = FALSE;
-
+ }
+
+ if (!mInSnapRegime)
+ {
LLVector3 up_from_axis = mCenterToCamNorm % constraint_axis;
up_from_axis.normVec();
LLVector3 cur_intersection;
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index cfdac11d26..fdcd1f5ebb 100755
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -1101,27 +1101,61 @@ void LLPanelGroupMembersSubTab::onEjectMembers(void *userdata)
}
void LLPanelGroupMembersSubTab::handleEjectMembers()
-{
- //send down an eject message
- uuid_vec_t selected_members;
-
+{
std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
if (selection.empty()) return;
-
- std::vector<LLScrollListItem*>::iterator itor;
- for (itor = selection.begin() ;
- itor != selection.end(); ++itor)
+
+ S32 selection_count = selection.size();
+ if (selection_count == 1)
{
- LLUUID member_id = (*itor)->getUUID();
- selected_members.push_back( member_id );
+ LLSD args;
+ LLUUID selected_avatar = mMembersList->getValue().asUUID();
+ std::string fullname = LLSLURL("agent", selected_avatar, "inspect").getSLURLString();
+ args["AVATAR_NAME"] = fullname;
+ LLSD payload;
+ LLNotificationsUtil::add("EjectGroupMemberWarning",
+ args,
+ payload,
+ boost::bind(&LLPanelGroupMembersSubTab::handleEjectCallback, this, _1, _2));
}
+ else
+ {
+ LLSD args;
+ args["COUNT"] = llformat("%d", selection_count);
+ LLSD payload;
+ LLNotificationsUtil::add("EjectGroupMembersWarning",
+ args,
+ payload,
+ boost::bind(&LLPanelGroupMembersSubTab::handleEjectCallback, this, _1, _2));
+ }
+}
- mMembersList->deleteSelectedItems();
-
- sendEjectNotifications(mGroupID, selected_members);
-
- LLGroupMgr::getInstance()->sendGroupMemberEjects(mGroupID,
- selected_members);
+bool LLPanelGroupMembersSubTab::handleEjectCallback(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (0 == option) // Eject button
+ {
+ //send down an eject message
+ uuid_vec_t selected_members;
+
+ std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected();
+ if (selection.empty()) return false;
+
+ std::vector<LLScrollListItem*>::iterator itor;
+ for (itor = selection.begin() ;
+ itor != selection.end(); ++itor)
+ {
+ LLUUID member_id = (*itor)->getUUID();
+ selected_members.push_back( member_id );
+ }
+
+ mMembersList->deleteSelectedItems();
+
+ sendEjectNotifications(mGroupID, selected_members);
+
+ LLGroupMgr::getInstance()->sendGroupMemberEjects(mGroupID, selected_members);
+ }
+ return false;
}
void LLPanelGroupMembersSubTab::sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members)
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index 78bb3c57a1..0cf272f3ee 100755
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -167,6 +167,7 @@ public:
static void onEjectMembers(void*);
void handleEjectMembers();
void sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members);
+ bool handleEjectCallback(const LLSD& notification, const LLSD& response);
static void onRoleCheck(LLUICtrl* check, void* user_data);
void handleRoleCheck(const LLUUID& role_id,
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 4138558bad..d7c634d619 100755
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -76,6 +76,8 @@ static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars
static const std::string COLLAPSED_BY_USER = "collapsed_by_user";
+extern S32 gMaxAgentGroups;
+
/** Comparator for comparing avatar items by last interaction date */
class LLAvatarItemRecentComparator : public LLAvatarItemComparator
{
@@ -808,6 +810,8 @@ void LLPanelPeople::updateButtons()
LLPanel* groups_panel = mTabContainer->getCurrentPanel();
groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected
+ groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count()));
+ groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.count())));
}
else
{
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 968a912ea2..e533be7f24 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -86,6 +86,7 @@
#include "lltrans.h"
#include "llviewercontrol.h"
#include "llappviewer.h"
+#include "llfloatergotoline.h"
const std::string HELLO_LSL =
"default\n"
@@ -193,12 +194,17 @@ private:
LLScriptEdCore* mEditorCore;
static LLFloaterScriptSearch* sInstance;
+
+protected:
+ LLLineEditor* mSearchBox;
+ void onSearchBoxCommit();
};
LLFloaterScriptSearch* LLFloaterScriptSearch::sInstance = NULL;
LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core)
: LLFloater(LLSD()),
+ mSearchBox(NULL),
mEditorCore(editor_core)
{
buildFromFile("floater_script_search.xml");
@@ -221,6 +227,9 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core)
BOOL LLFloaterScriptSearch::postBuild()
{
+ mSearchBox = getChild<LLLineEditor>("search_text");
+ mSearchBox->setCommitCallback(boost::bind(&LLFloaterScriptSearch::onSearchBoxCommit, this));
+ mSearchBox->setCommitOnFocusLost(FALSE);
childSetAction("search_btn", onBtnSearch,this);
childSetAction("replace_btn", onBtnReplace,this);
childSetAction("replace_all_btn", onBtnReplaceAll,this);
@@ -315,6 +324,15 @@ BOOL LLFloaterScriptSearch::handleKeyHere(KEY key, MASK mask)
return FALSE;
}
+void LLFloaterScriptSearch::onSearchBoxCommit()
+{
+ if (mEditorCore && mEditorCore->mEditor)
+ {
+ LLCheckBoxCtrl* caseChk = getChild<LLCheckBoxCtrl>("case_text");
+ mEditorCore->mEditor->selectNext(getChild<LLUICtrl>("search_text")->getValue().asString(), caseChk->get());
+ }
+}
+
/// ---------------------------------------------------------------------------
/// LLScriptEdCore
/// ---------------------------------------------------------------------------
@@ -503,6 +521,9 @@ void LLScriptEdCore::initMenu()
menuItem = getChild<LLMenuItemCallGL>("Search / Replace...");
menuItem->setClickCallback(boost::bind(&LLFloaterScriptSearch::show, this));
+ menuItem = getChild<LLMenuItemCallGL>("Go to line...");
+ menuItem->setClickCallback(boost::bind(&LLFloaterGotoLine::show, this));
+
menuItem = getChild<LLMenuItemCallGL>("Help...");
menuItem->setClickCallback(boost::bind(&LLScriptEdCore::onBtnHelp, this));
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 7563cecd9d..9fb0a4fb63 100755
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -34,6 +34,7 @@
#include "llcombobox.h"
#include "lliconctrl.h"
#include "llframetimer.h"
+#include "llfloatergotoline.h"
class LLLiveLSLFile;
class LLMessageSystem;
@@ -49,6 +50,7 @@ class LLKeywordToken;
class LLVFS;
class LLViewerInventoryItem;
class LLScriptEdContainer;
+class LLFloaterGotoLine;
// Inner, implementation class. LLPreviewScript and LLLiveLSLEditor each own one of these.
class LLScriptEdCore : public LLPanel
@@ -58,6 +60,7 @@ class LLScriptEdCore : public LLPanel
friend class LLLiveLSLEditor;
friend class LLFloaterScriptSearch;
friend class LLScriptEdContainer;
+ friend class LLFloaterGotoLine;
protected:
// Supposed to be invoked only by the container.
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ace16396db..c7901f0bd8 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5937,6 +5937,15 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
return true;
}
}
+ // HACK -- handle callbacks for specific alerts.
+ if( notificationID == "HomePositionSet" )
+ {
+ // save the home location image to disk
+ std::string snap_filename = gDirUtilp->getLindenUserDir();
+ snap_filename += gDirUtilp->getDirDelimiter();
+ snap_filename += SCREEN_HOME_FILENAME;
+ gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
+ }
LLNotificationsUtil::add(notificationID, llsdBlock);
return true;
@@ -6012,14 +6021,6 @@ void process_alert_core(const std::string& message, BOOL modal)
{
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_KILLED_COUNT);
}
- else if( message == "Home position set." )
- {
- // save the home location image to disk
- std::string snap_filename = gDirUtilp->getLindenUserDir();
- snap_filename += gDirUtilp->getDirDelimiter();
- snap_filename += SCREEN_HOME_FILENAME;
- gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
- }
const std::string ALERT_PREFIX("ALERT: ");
const std::string NOTIFY_PREFIX("NOTIFY: ");
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index 97f4c3e5fe..e7821d4b9e 100755
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -43,6 +43,8 @@ const std::string GRID_LABEL_VALUE = "label";
const std::string GRID_ID_VALUE = "grid_login_id";
/// the url for the login cgi script
const std::string GRID_LOGIN_URI_VALUE = "login_uri";
+/// url base for update queries
+const std::string GRID_UPDATE_SERVICE_URL = "update_query_url_base";
///
const std::string GRID_HELPER_URI_VALUE = "helper_uri";
/// the splash page url
@@ -63,6 +65,8 @@ const std::string DEFAULT_LOGIN_PAGE = "http://viewer-login.agni.lindenlab.com/"
const std::string MAIN_GRID_LOGIN_URI = "https://login.agni.lindenlab.com/cgi-bin/login.cgi";
+const std::string SL_UPDATE_QUERY_URL = "https://update.secondlife.com/update";
+
const std::string MAIN_GRID_SLURL_BASE = "http://maps.secondlife.com/secondlife/";
const std::string SYSTEM_GRID_APP_SLURL_BASE = "secondlife:///app";
@@ -120,12 +124,14 @@ void LLGridManager::initialize(const std::string& grid_file)
MAIN_GRID_LOGIN_URI,
"https://secondlife.com/helpers/",
DEFAULT_LOGIN_PAGE,
+ SL_UPDATE_QUERY_URL,
"Agni");
addSystemGrid("Second Life Beta Test Grid (Aditi)",
"util.aditi.lindenlab.com",
"https://login.aditi.lindenlab.com/cgi-bin/login.cgi",
"http://aditi-secondlife.webdev.lindenlab.com/helpers/",
DEFAULT_LOGIN_PAGE,
+ SL_UPDATE_QUERY_URL,
"Aditi");
LLSD other_grids;
@@ -332,6 +338,7 @@ void LLGridManager::addSystemGrid(const std::string& label,
const std::string& login_uri,
const std::string& helper,
const std::string& login_page,
+ const std::string& update_url_base,
const std::string& login_id)
{
LLSD grid = LLSD::emptyMap();
@@ -341,6 +348,7 @@ void LLGridManager::addSystemGrid(const std::string& label,
grid[GRID_LOGIN_URI_VALUE] = LLSD::emptyArray();
grid[GRID_LOGIN_URI_VALUE].append(login_uri);
grid[GRID_LOGIN_PAGE_VALUE] = login_page;
+ grid[GRID_UPDATE_SERVICE_URL] = update_url_base;
grid[GRID_IS_SYSTEM_GRID_VALUE] = true;
grid[GRID_LOGIN_IDENTIFIER_TYPES] = LLSD::emptyArray();
grid[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_AGENT);
@@ -537,6 +545,30 @@ std::string LLGridManager::getGridLoginID()
return mGridList[mGrid][GRID_ID_VALUE];
}
+std::string LLGridManager::getUpdateServiceURL()
+{
+ std::string update_url_base = gSavedSettings.getString("CmdLineUpdateService");;
+ if ( !update_url_base.empty() )
+ {
+ LL_INFOS2("UpdaterService","GridManager")
+ << "Update URL base overridden from command line: " << update_url_base
+ << LL_ENDL;
+ }
+ else if ( mGridList[mGrid].has(GRID_UPDATE_SERVICE_URL) )
+ {
+ update_url_base = mGridList[mGrid][GRID_UPDATE_SERVICE_URL].asString();
+ }
+ else
+ {
+ LL_WARNS2("UpdaterService","GridManager")
+ << "The grid property '" << GRID_UPDATE_SERVICE_URL
+ << "' is not defined for the grid '" << mGrid << "'"
+ << LL_ENDL;
+ }
+
+ return update_url_base;
+}
+
void LLGridManager::updateIsInProductionGrid()
{
mIsInProductionGrid = false;
diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h
index 3f56103b2e..8526c0ba7f 100755
--- a/indra/newview/llviewernetwork.h
+++ b/indra/newview/llviewernetwork.h
@@ -140,6 +140,14 @@ class LLGridManager : public LLSingleton<LLGridManager>
*/
//@}
+ /* ================================================================
+ * @name Update Related Properties
+ * @{
+ */
+ /// Get the update service URL base (host and path) for the selected grid
+ std::string getUpdateServiceURL();
+
+ //@}
/* ================================================================
* @name URL Construction Properties
@@ -207,6 +215,7 @@ class LLGridManager : public LLSingleton<LLGridManager>
const std::string& login,
const std::string& helper,
const std::string& login_page,
+ const std::string& update_url_base,
const std::string& login_id = "");
diff --git a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
index 4e0cfb0cd4..e7ab3cacdc 100755
--- a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
+++ b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
@@ -6,7 +6,7 @@
layout="topleft"
name="floaterbulkperms"
help_topic="floaterbulkperms"
- title="EDIT CONTENT PERMISSIONS"
+ title="ADJUST CONTENT PERMISSIONS"
width="410">
<floater.string
name="nothing_to_modify_text">
@@ -192,7 +192,7 @@
name="newperms"
top="90"
width="250">
- New Content Permissions
+ Adjust Content Permissions To
</text>
<text
type="string"
@@ -292,11 +292,22 @@
height="23"
label="OK"
layout="topleft"
- left="205"
- name="apply"
+ left="110"
+ name="ok"
top_pad="10"
width="90">
<button.commit_callback
+ function="BulkPermission.Ok"/>
+ </button>
+ <button
+ follows="left|top"
+ height="23"
+ label="Apply"
+ layout="topleft"
+ left_pad="5"
+ name="apply"
+ width="90">
+ <button.commit_callback
function="BulkPermission.Apply"/>
</button>
<button
diff --git a/indra/newview/skins/default/xui/en/floater_goto_line.xml b/indra/newview/skins/default/xui/en/floater_goto_line.xml
new file mode 100644
index 0000000000..b236888219
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_goto_line.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ default_tab_group="1"
+ height="90"
+ layout="topleft"
+ name="script goto"
+ help_topic="script_goto"
+ title="GO TO LINE"
+ width="200">
+ <button
+ height="24"
+ label="OK"
+ label_selected="OK"
+ layout="topleft"
+ left="55"
+ name="goto_btn"
+ top="53"
+ width="90" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="txt"
+ top="21"
+ width="65">
+ Go to line
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="75"
+ max_length_bytes="9"
+ name="goto_line"
+ tab_group="1"
+ top="21"
+ width="85" />
+</floater> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 9e582cf0de..50e6c16d0f 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -506,6 +506,33 @@ Add this Ability to &apos;[ROLE_NAME]&apos;?
notext="No"
yestext="Yes"/>
</notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="EjectGroupMemberWarning"
+ type="alertmodal">
+ You are about to eject [AVATAR_NAME] from the group.
+ <tag>group</tag>
+ <tag>confirm</tag>
+ <usetemplate
+ ignoretext="Confirm ejecting a participant from group"
+ name="okcancelignore"
+ notext="Cancel"
+ yestext="Eject"/>
+ </notification>
+ <notification
+ icon="alertmodal.tga"
+ name="EjectGroupMembersWarning"
+ type="alertmodal">
+ You are about to eject [COUNT] members from the group.
+ <tag>group</tag>
+ <tag>confirm</tag>
+ <usetemplate
+ ignoretext="Confirm ejecting multiple members from group"
+ name="okcancelignore"
+ notext="Cancel"
+ yestext="Eject"/>
+ </notification>
<notification
icon="alertmodal.tga"
@@ -2682,7 +2709,7 @@ Please enter a higher price.
icon="alertmodal.tga"
name="ConfirmItemDeleteHasLinks"
type="alertmodal">
-At least one of the items you has link items that point to it. If you delete this item, its links will permanently stop working. It is strongly advised to delete the links first.
+At least one of the items has links that point to it. If you delete this item, its links will permanently stop working. It is strongly advised to delete the links first.
Are you sure you want to delete these items?
<tag>confirm</tag>
@@ -2724,7 +2751,7 @@ Are you sure you want to delete these items?
icon="alertmodal.tga"
name="ConfirmObjectDeleteNoOwn"
type="alertmodal">
-You do not own least one of the items you have selected.
+You do not own at least one of the items you have selected.
Are you sure you want to delete these items?
<tag>confirm</tag>
@@ -2754,7 +2781,7 @@ Are you sure you want to delete these items?
name="ConfirmObjectDeleteLockNoOwn"
type="alertmodal">
At least one object is locked.
-You do not own least one object.
+You do not own at least one object.
Are you sure you want to delete these items?
<tag>confirm</tag>
@@ -2769,7 +2796,7 @@ Are you sure you want to delete these items?
name="ConfirmObjectDeleteNoCopyNoOwn"
type="alertmodal">
At least one object is not copyable.
-You do not own least one object.
+You do not own at least one object.
Are you sure you want to delete these items?
<tag>confirm</tag>
@@ -2785,13 +2812,13 @@ Are you sure you want to delete these items?
type="alertmodal">
At least one object is locked.
At least one object is not copyable.
-You do not own least one object.
+You do not own at least one object.
Are you sure you want to delete these items?
<tag>confirm</tag>
<usetemplate
name="okcancelbuttons"
- notext="cancel"
+ notext="Cancel"
yestext="OK"/>
</notification>
diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml
index 6d5fb51e85..c8ce5cdebf 100755
--- a/indra/newview/skins/default/xui/en/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml
@@ -202,14 +202,14 @@ Maximum 200 per group daily
Drag and drop item here to attach it:
</text>
<icon
- height="72"
+ height="48"
image_name="DropTarget"
layout="topleft"
left_pad="10"
mouse_opaque="true"
name="drop_icon"
top_delta="-10"
- width="72" />
+ width="110" />
<button
follows="left|top"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index 7ce2627be9..ed274d0233 100755
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -480,10 +480,22 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
function="People.Group.Minus" />
</dnd_button>
</panel>
+ <text
+ type="string"
+ length="1"
+ follows="all"
+ height="14"
+ layout="topleft"
+ right="-10"
+ top_pad="4"
+ left="3"
+ name="groupcount">
+ You belong to [COUNT] groups, and can join [REMAINING] more.
+ </text>
<group_list
allow_select="true"
follows="all"
- height="406"
+ height="388"
layout="topleft"
left="3"
name="group_list"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index 2cc9d9c1b0..50fd57494f 100755
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -138,7 +138,7 @@
initial_value="1"
layout="topleft"
left_pad="0"
- max_val="1.4"
+ max_val="1.5"
min_val="0.75"
name="ui_scale_slider"
top_pad="-14"
diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml
index 765b07ed8b..bcdef96138 100755
--- a/indra/newview/skins/default/xui/en/panel_script_ed.xml
+++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml
@@ -125,6 +125,10 @@
label="Search / Replace..."
layout="topleft"
name="Search / Replace..." />
+ <menu_item_call
+ label="Go to line..."
+ layout="topleft"
+ name="Go to line..." />
</menu>
<menu
top="0"
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 272a46aa8d..adeb848e03 100755
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -135,6 +135,7 @@ void LLGridManager::addSystemGrid(const std::string& label,
const std::string& login,
const std::string& helper,
const std::string& login_page,
+ const std::string& update_url_base,
const std::string& login_id)
{
}
@@ -208,9 +209,7 @@ std::string const & LLUpdaterService::pumpName(void)
return wakka;
}
bool LLUpdaterService::updateReadyToInstall(void) { return false; }
-void LLUpdaterService::initialize(const std::string& url,
- const std::string& path,
- const std::string& channel,
+void LLUpdaterService::initialize(const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index 06de1cbfa2..7ad7947ca4 100755
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -127,6 +127,7 @@ const char *gSampleGridFile =
" <array>"
" <string>myloginuri</string>"
" </array>"
+ " <key>update_query_url_base</key><string>https://update.secondlife.com/update</string>"
" <key>keyname</key><string>util.foobar.lindenlab.com</string>"
" </map>"
" </map>"
@@ -185,6 +186,9 @@ namespace tut
ensure_equals("id for agni",
std::string("Agni"),
LLGridManager::getInstance()->getGridId("util.agni.lindenlab.com"));
+ ensure_equals("update url base for Agni", // relies on agni being the default
+ std::string("https://update.secondlife.com/update"),
+ LLGridManager::getInstance()->getUpdateServiceURL());
ensure_equals("label for agni",
LLGridManager::getInstance()->getGridLabel("util.agni.lindenlab.com"),
std::string("Second Life Main Grid (Agni)"));
@@ -256,6 +260,9 @@ namespace tut
ensure_equals("id for agni",
LLGridManager::getInstance()->getGridId("util.agni.lindenlab.com"),
std::string("Agni"));
+ ensure_equals("update url base for Agni", // relies on agni being the default
+ std::string("https://update.secondlife.com/update"),
+ LLGridManager::getInstance()->getUpdateServiceURL());
ensure_equals("label for agni",
LLGridManager::getInstance()->getGridLabel("util.agni.lindenlab.com"),
std::string("Second Life Main Grid (Agni)"));
@@ -384,6 +391,9 @@ namespace tut
ensure_equals("getLoginPage",
LLGridManager::getInstance()->getLoginPage(),
std::string("http://viewer-login.agni.lindenlab.com/"));
+ ensure_equals("update url base for Agni", // relies on agni being the default
+ std::string("https://update.secondlife.com/update"),
+ LLGridManager::getInstance()->getUpdateServiceURL());
ensure("Is Agni a production grid", LLGridManager::getInstance()->isInProductionGrid());
std::vector<std::string> uris;
LLGridManager::getInstance()->getLoginURIs(uris);
diff --git a/indra/viewer_components/updater/llupdatechecker.cpp b/indra/viewer_components/updater/llupdatechecker.cpp
index 1e768f52d9..91a5f9246e 100755
--- a/indra/viewer_components/updater/llupdatechecker.cpp
+++ b/indra/viewer_components/updater/llupdatechecker.cpp
@@ -62,8 +62,7 @@ LLUpdateChecker::LLUpdateChecker(LLUpdateChecker::Client & client):
}
-void LLUpdateChecker::checkVersion(std::string const & hostUrl,
- std::string const & servicePath,
+void LLUpdateChecker::checkVersion(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,
@@ -71,7 +70,7 @@ void LLUpdateChecker::checkVersion(std::string const & hostUrl,
unsigned char uniqueid[MD5HEX_STR_SIZE],
bool willing_to_test)
{
- mImplementation->checkVersion(hostUrl, servicePath, channel, version, platform, platform_version, uniqueid, willing_to_test);
+ mImplementation->checkVersion(urlBase, channel, version, platform, platform_version, uniqueid, willing_to_test);
}
@@ -99,8 +98,7 @@ LLUpdateChecker::Implementation::~Implementation()
}
-void LLUpdateChecker::Implementation::checkVersion(std::string const & hostUrl,
- std::string const & servicePath,
+void LLUpdateChecker::Implementation::checkVersion(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,
@@ -112,8 +110,7 @@ void LLUpdateChecker::Implementation::checkVersion(std::string const & hostUrl,
{
mInProgress = true;
- mHostUrl = hostUrl;
- mServicePath = servicePath;
+ mUrlBase = urlBase;
mChannel = channel;
mVersion = version;
mPlatform = platform;
@@ -123,7 +120,7 @@ void LLUpdateChecker::Implementation::checkVersion(std::string const & hostUrl,
mProtocol = sProtocolVersion;
- std::string checkUrl = buildUrl(hostUrl, servicePath, channel, version, platform, platform_version, uniqueid, willing_to_test);
+ std::string checkUrl = buildUrl(urlBase, channel, version, platform, platform_version, uniqueid, willing_to_test);
LL_INFOS("UpdaterService") << "checking for updates at " << checkUrl << LL_ENDL;
mHttpClient.get(checkUrl, this);
@@ -158,7 +155,7 @@ void LLUpdateChecker::Implementation::completed(U32 status,
if (mProtocol == sProtocolVersion)
{
mProtocol = sLegacyProtocolVersion;
- std::string retryUrl = buildUrl(mHostUrl, mServicePath, mChannel, mVersion, mPlatform, mPlatformVersion, mUniqueId, mWillingToTest);
+ std::string retryUrl = buildUrl(mUrlBase, mChannel, mVersion, mPlatform, mPlatformVersion, mUniqueId, mWillingToTest);
LL_WARNS("UpdaterService")
<< "update response using " << sProtocolVersion
@@ -203,8 +200,7 @@ void LLUpdateChecker::Implementation::error(U32 status, const std::string & reas
}
-std::string LLUpdateChecker::Implementation::buildUrl(std::string const & hostUrl,
- std::string const & servicePath,
+std::string LLUpdateChecker::Implementation::buildUrl(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,
@@ -213,7 +209,6 @@ std::string LLUpdateChecker::Implementation::buildUrl(std::string const & hostUr
bool willing_to_test)
{
LLSD path;
- path.append(servicePath);
path.append(mProtocol);
path.append(channel);
path.append(version);
@@ -224,5 +219,5 @@ std::string LLUpdateChecker::Implementation::buildUrl(std::string const & hostUr
path.append(willing_to_test ? "testok" : "testno");
path.append((char*)uniqueid);
}
- return LLURI::buildHTTP(hostUrl, path).asString();
+ return LLURI::buildHTTP(urlBase, path).asString();
}
diff --git a/indra/viewer_components/updater/llupdatechecker.h b/indra/viewer_components/updater/llupdatechecker.h
index 8e85587490..4244007340 100755
--- a/indra/viewer_components/updater/llupdatechecker.h
+++ b/indra/viewer_components/updater/llupdatechecker.h
@@ -43,8 +43,7 @@ public:
public:
Implementation(Client & client);
~Implementation();
- void checkVersion(std::string const & hostUrl,
- std::string const & servicePath,
+ void checkVersion(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,
@@ -68,16 +67,14 @@ public:
LLHTTPClient mHttpClient;
bool mInProgress;
std::string mVersion;
- std::string mHostUrl;
- std::string mServicePath;
+ std::string mUrlBase;
std::string mChannel;
std::string mPlatform;
std::string mPlatformVersion;
unsigned char mUniqueId[MD5HEX_STR_SIZE];
bool mWillingToTest;
- std::string buildUrl(std::string const & hostUrl,
- std::string const & servicePath,
+ std::string buildUrl(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,
@@ -95,8 +92,7 @@ public:
LLUpdateChecker(Client & client);
// Check status of current app on the given host for the channel and version provided.
- void checkVersion(std::string const & hostUrl,
- std::string const & servicePath,
+ void checkVersion(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,
diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp
index 1bd9fa4fc0..16950e1d62 100755
--- a/indra/viewer_components/updater/llupdaterservice.cpp
+++ b/indra/viewer_components/updater/llupdaterservice.cpp
@@ -38,6 +38,7 @@
#include "lldir.h"
#include "llsdserialize.h"
#include "llfile.h"
+#include "llviewernetwork.h"
#if LL_WINDOWS
#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
@@ -93,8 +94,6 @@ class LLUpdaterServiceImpl :
static const std::string sListenerName;
std::string mProtocolVersion;
- std::string mUrl;
- std::string mPath;
std::string mChannel;
std::string mVersion;
std::string mPlatform;
@@ -120,9 +119,7 @@ public:
LLUpdaterServiceImpl();
virtual ~LLUpdaterServiceImpl();
- void initialize(const std::string& url,
- const std::string& path,
- const std::string& channel,
+ void initialize(const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
@@ -183,9 +180,7 @@ LLUpdaterServiceImpl::~LLUpdaterServiceImpl()
LLEventPumps::instance().obtain("mainloop").stopListening(sListenerName);
}
-void LLUpdaterServiceImpl::initialize(const std::string& url,
- const std::string& path,
- const std::string& channel,
+void LLUpdaterServiceImpl::initialize(const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
@@ -198,8 +193,6 @@ void LLUpdaterServiceImpl::initialize(const std::string& url,
"while updater is running.");
}
- mUrl = url;
- mPath = path;
mChannel = channel;
mVersion = version;
mPlatform = platform;
@@ -207,8 +200,6 @@ void LLUpdaterServiceImpl::initialize(const std::string& url,
memcpy(mUniqueId, uniqueid, MD5HEX_STR_SIZE);
mWillingToTest = willing_to_test;
LL_DEBUGS("UpdaterService")
- << "\n url: " << mUrl
- << "\n path: " << mPath
<< "\n channel: " << mChannel
<< "\n version: " << mVersion
<< "\n uniqueid: " << mUniqueId
@@ -228,7 +219,7 @@ void LLUpdaterServiceImpl::setBandwidthLimit(U64 bytesPerSecond)
void LLUpdaterServiceImpl::startChecking(bool install_if_ready)
{
- if(mUrl.empty() || mChannel.empty() || mVersion.empty())
+ if(mChannel.empty() || mVersion.empty())
{
throw LLUpdaterService::UsageError("Set params before call to "
"LLUpdaterService::startCheck().");
@@ -415,7 +406,7 @@ void LLUpdaterServiceImpl::response(LLSD const & content)
setState(LLUpdaterService::UP_TO_DATE);
}
- else
+ else if ( content.isMap() && content.has("url") )
{
// there is an update available...
stopTimer();
@@ -439,6 +430,12 @@ void LLUpdaterServiceImpl::response(LLSD const & content)
<< LL_ENDL;
mUpdateDownloader.download(url, content["hash"].asString(), mNewChannel, mNewVersion, more_info, required);
}
+ else
+ {
+ LL_WARNS("UpdaterService") << "Invalid update query response ignored; retry in "
+ << mCheckPeriod << " seconds" << LL_ENDL;
+ restartTimer(mCheckPeriod);
+ }
}
void LLUpdaterServiceImpl::downloadComplete(LLSD const & data)
@@ -565,8 +562,26 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event)
}
else
{
- mUpdateChecker.checkVersion(mUrl, mPath, mChannel, mVersion, mPlatform, mPlatformVersion, mUniqueId, mWillingToTest);
- setState(LLUpdaterService::CHECKING_FOR_UPDATE);
+ std::string query_url = LLGridManager::getInstance()->getUpdateServiceURL();
+ if ( !query_url.empty() )
+ {
+ mUpdateChecker.checkVersion(query_url, mChannel, mVersion,
+ mPlatform, mPlatformVersion, mUniqueId,
+ mWillingToTest);
+ setState(LLUpdaterService::CHECKING_FOR_UPDATE);
+ }
+ else
+ {
+ LL_WARNS("UpdaterService")
+ << "No updater service defined for grid '" << LLGridManager::getInstance()->getGrid()
+ << "' will check again in " << mCheckPeriod << " seconds"
+ << LL_ENDL;
+ // Because the grid can be changed after the viewer is started (when the first check takes place)
+ // but before the user logs in, the next check may be on a different grid, so set the retry timer
+ // even though this check did not happen. The default time is once an hour, and if we're not
+ // doing the check anyway the performance impact is completely insignificant.
+ restartTimer(mCheckPeriod);
+ }
}
}
else
@@ -610,9 +625,7 @@ LLUpdaterService::~LLUpdaterService()
{
}
-void LLUpdaterService::initialize(const std::string& url,
- const std::string& path,
- const std::string& channel,
+void LLUpdaterService::initialize(const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
@@ -620,7 +633,7 @@ void LLUpdaterService::initialize(const std::string& url,
const bool& willing_to_test
)
{
- mImpl->initialize(url, path, channel, version, platform, platform_version, uniqueid, willing_to_test);
+ mImpl->initialize(channel, version, platform, platform_version, uniqueid, willing_to_test);
}
void LLUpdaterService::setCheckPeriod(unsigned int seconds)
diff --git a/indra/viewer_components/updater/llupdaterservice.h b/indra/viewer_components/updater/llupdaterservice.h
index 982f99b861..0ddf24935b 100755
--- a/indra/viewer_components/updater/llupdaterservice.h
+++ b/indra/viewer_components/updater/llupdaterservice.h
@@ -71,9 +71,7 @@ public:
LLUpdaterService();
~LLUpdaterService();
- void initialize(const std::string& url,
- const std::string& path,
- const std::string& channel,
+ void initialize(const std::string& channel,
const std::string& version,
const std::string& platform,
const std::string& platform_version,
diff --git a/indra/viewer_components/updater/scripts/linux/update_install b/indra/viewer_components/updater/scripts/linux/update_install
index a9df9042fd..03089f192e 100755
--- a/indra/viewer_components/updater/scripts/linux/update_install
+++ b/indra/viewer_components/updater/scripts/linux/update_install
@@ -69,8 +69,11 @@ then # zenity on PATH and is executable
# clear any previous message
clear_message
# put up a new zenity box and capture its pid
- "$zenpath" --info --title "Second Life Viewer Updater" \
- --width=320 --height=120 --text="$*" &
+## "$zenpath" --info --title "Second Life Viewer Updater" \
+## --width=320 --height=120 --text="$*" &
+ # MAINT-2333: use bouncing progress bar
+ "$zenpath" --progress --pulsate --no-cancel --title "Second Life Viewer Updater" \
+ --width=320 --height=120 --text "$*" </dev/null &
statuspid=$!
}
diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp
index 4812272ebc..759e41ef4c 100755
--- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp
+++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp
@@ -44,8 +44,7 @@
*****************************************************************************/
LLUpdateChecker::LLUpdateChecker(LLUpdateChecker::Client & client)
{}
-void LLUpdateChecker::checkVersion(std::string const & hostUrl,
- std::string const & servicePath,
+void LLUpdateChecker::checkVersion(std::string const & urlBase,
std::string const & channel,
std::string const & version,
std::string const & platform,
@@ -91,6 +90,21 @@ bool LLDir::setCacheDir(const std::string &path){ return true; }
void LLDir::dumpCurrentDirectories() {}
void LLDir::updatePerAccountChatLogsDir() {}
+#include "llviewernetwork.h"
+LLGridManager::LLGridManager() :
+ mGrid("test.grid.lindenlab.com"),
+ mIsInProductionGrid(false)
+{
+}
+std::string LLGridManager::getUpdateServiceURL()
+{
+ return "https://update.secondlife.com/update";
+}
+LLGridManager::~LLGridManager()
+{
+}
+
+
std::string LLDir::getExpandedFilename(ELLPath location,
const std::string &filename) const
{
@@ -179,10 +193,10 @@ namespace tut
try
{
unsigned char id1[MD5HEX_STR_SIZE] = "11111111111111111111111111111111";
- updater.initialize(test_url, "update" ,test_channel, test_version, "win", "1.2.3", id1, true);
+ updater.initialize(test_channel, test_version, "win", "1.2.3", id1, true);
updater.startChecking();
unsigned char id2[MD5HEX_STR_SIZE] = "22222222222222222222222222222222";
- updater.initialize("other_url", "update", test_channel, test_version, "win", "4.5.6", id2, true);
+ updater.initialize(test_channel, test_version, "win", "4.5.6", id2, true);
}
catch(LLUpdaterService::UsageError)
{
@@ -197,7 +211,7 @@ namespace tut
DEBUG;
LLUpdaterService updater;
unsigned char id[MD5HEX_STR_SIZE] = "33333333333333333333333333333333";
- updater.initialize(test_url, "update", test_channel, test_version, "win", "7.8.9", id, true);
+ updater.initialize(test_channel, test_version, "win", "7.8.9", id, true);
updater.startChecking();
ensure(updater.isChecking());
updater.stopChecking();