summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt27
-rw-r--r--indra/newview/featuretable_solaris.txt6
-rw-r--r--indra/newview/installers/windows/install_icon.BMP (renamed from indra/newview/res/install_icon.BMP)bin262198 -> 262198 bytes
-rw-r--r--indra/newview/installers/windows/install_icon.icobin0 -> 25214 bytes
-rw-r--r--indra/newview/installers/windows/installer_template.nsi4
-rw-r--r--indra/newview/installers/windows/uninstall_icon.BMP (renamed from indra/newview/res/uninstall_icon.BMP)bin262198 -> 262198 bytes
-rw-r--r--indra/newview/installers/windows/uninstall_icon.icobin0 -> 25214 bytes
-rw-r--r--indra/newview/linux_tools/client-readme.txt6
-rw-r--r--indra/newview/llagent.cpp22
-rw-r--r--indra/newview/llappviewer.cpp28
-rw-r--r--indra/newview/llappviewerlinux.cpp14
-rw-r--r--indra/newview/llassetuploadresponders.cpp12
-rw-r--r--indra/newview/llchatbar.cpp3
-rw-r--r--indra/newview/lldirpicker.cpp7
-rw-r--r--indra/newview/lldirpicker.h2
-rw-r--r--indra/newview/llfasttimerview.cpp2
-rw-r--r--indra/newview/llfilepicker.cpp68
-rw-r--r--indra/newview/llfloateranimpreview.cpp20
-rw-r--r--indra/newview/llfloaterchat.cpp6
-rw-r--r--indra/newview/llfloaternamedesc.cpp14
-rw-r--r--indra/newview/llfloaterproperties.cpp4
-rw-r--r--indra/newview/llfloaterreporter.cpp5
-rw-r--r--indra/newview/llfloatersnapshot.cpp28
-rw-r--r--indra/newview/llfloatertools.cpp2
-rw-r--r--indra/newview/llfloatertopobjects.cpp2
-rw-r--r--indra/newview/llfloatertos.cpp38
-rw-r--r--indra/newview/llfloaterworldmap.cpp2
-rw-r--r--indra/newview/llinventorymodel.cpp7
-rw-r--r--indra/newview/llloginhandler.cpp17
-rw-r--r--indra/newview/llmaniptranslate.cpp2
-rw-r--r--indra/newview/llmemoryview.cpp2
-rw-r--r--indra/newview/llpanelavatar.cpp13
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp33
-rw-r--r--indra/newview/llpanellogin.cpp23
-rw-r--r--indra/newview/llpanellogin.h7
-rw-r--r--indra/newview/llpreviewgesture.cpp58
-rw-r--r--indra/newview/llpreviewgesture.h3
-rw-r--r--indra/newview/llresourcedata.h1
-rw-r--r--indra/newview/llspatialpartition.cpp2
-rw-r--r--indra/newview/llstartup.cpp115
-rw-r--r--indra/newview/llstartup.h10
-rw-r--r--indra/newview/lltextureview.cpp2
-rw-r--r--indra/newview/llviewermedia.cpp8
-rw-r--r--indra/newview/llviewermenu.cpp5
-rw-r--r--indra/newview/llviewermenufile.cpp85
-rw-r--r--indra/newview/llviewermenufile.h48
-rw-r--r--indra/newview/llviewermessage.cpp59
-rw-r--r--indra/newview/llviewerstats.cpp9
-rw-r--r--indra/newview/llvoavatar.cpp42
-rw-r--r--indra/newview/llvoiceclient.cpp2
-rw-r--r--indra/newview/llwlparamset.cpp2
-rw-r--r--indra/newview/llworldmap.cpp11
-rw-r--r--indra/newview/llworldmapview.cpp112
-rw-r--r--indra/newview/llworldmapview.h5
-rw-r--r--indra/newview/llxmlrpctransaction.cpp2
-rw-r--r--indra/newview/res/bitmap2.bmpbin25118 -> 0 bytes
-rw-r--r--indra/newview/res/loginbackground.bmpbin336054 -> 0 bytes
-rw-r--r--indra/newview/res/resource.h8
-rw-r--r--indra/newview/res/viewerRes.rc95
-rw-r--r--indra/newview/skins/default/xui/de/floater_preview_gesture.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/floater_preview_gesture.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/floater_preview_gesture.xml2
-rwxr-xr-xindra/newview/viewer_manifest.py26
63 files changed, 625 insertions, 517 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 750771f6ce..9ec838ad46 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -41,6 +41,7 @@ if (WINDOWS)
endif (WINDOWS)
include_directories(
+ ${DBUSGLIB_INCLUDE_DIRS}
${ELFIO_INCLUDE_DIR}
${LLAUDIO_INCLUDE_DIRS}
${LLCHARACTER_INCLUDE_DIRS}
@@ -937,11 +938,8 @@ if (WINDOWS)
res/arrowcop.cur
res/arrowcopmulti.cur
res/arrowdrag.cur
- res/bitmap2.bmp
res/circleandline.cur
res/icon1.ico
- res/install_icon.BMP
- res/install_icon.ico
res/llarrow.cur
res/llarrowdrag.cur
res/llarrowdragmulti.cur
@@ -963,7 +961,6 @@ if (WINDOWS)
res/lltoolzoomout.cur
res/ll_icon.BMP
res/ll_icon.ico
- res/loginbackground.bmp
res/resource.h
res/toolbuy.cur
res/toolopen.cur
@@ -973,8 +970,6 @@ if (WINDOWS)
res/toolpickobject3.cur
res/toolpipette.cur
res/toolsit.cur
- res/uninstall_icon.BMP
- res/uninstall_icon.ico
)
set_source_files_properties(${viewer_RESOURCE_FILES}
@@ -1070,7 +1065,6 @@ set(viewer_XUI_FILES
skins/default/xui/en-us/floater_html_simple.xml
skins/default/xui/en-us/floater_hud.xml
skins/default/xui/en-us/floater_image_preview.xml
- skins/default/xui/en-us/floater_import.xml
skins/default/xui/en-us/floater_im.xml
skins/default/xui/en-us/floater_inspect.xml
skins/default/xui/en-us/floater_instant_message_ad_hoc.xml
@@ -1535,6 +1529,25 @@ if (DARWIN)
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
)
+
+ add_custom_command(
+ TARGET package POST_BUILD
+ COMMAND ${PYTHON_EXECUTABLE}
+ ARGS
+ ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ --grid=${GRID}
+ --configuration=${CMAKE_CFG_INTDIR}
+ --channel=${VIEWER_CHANNEL}
+ --login_channel=${VIEWER_LOGIN_CHANNEL}
+ --source=${CMAKE_CURRENT_SOURCE_DIR}
+ --artwork=${ARTWORK_DIR}
+ --build=${CMAKE_CURRENT_BINARY_DIR}
+ --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
+ --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ )
+
endif (PACKAGE)
endif (DARWIN)
diff --git a/indra/newview/featuretable_solaris.txt b/indra/newview/featuretable_solaris.txt
index 2a514eaab1..f24cbde5e2 100644
--- a/indra/newview/featuretable_solaris.txt
+++ b/indra/newview/featuretable_solaris.txt
@@ -35,6 +35,8 @@ RenderRippleWater 1 1
RenderTerrainDetail 1 2
VertexShaderEnable 1 1
RenderTextureMemoryMultiple 1 1.0
+UseOcclusion 1 1
+RenderCubeMap 1 1
//
// Class 0 Hardware (Unknown or just old)
@@ -108,6 +110,8 @@ RenderAvatarVP 0 0
RenderLighting 1 0
RenderParticleCount 1 1024
RenderTerrainDetail 1 0
+RenderCubeMap 0 0
+UseOcclusion 0 0
list low
@@ -146,6 +150,7 @@ RenderVBO 1 0
RenderAniso 1 0
RenderLighting 1 0
RenderTerrainDetail 1 0
+RenderCubeMap 0 0
list GeForce2
RenderVBO 1 1
@@ -157,6 +162,7 @@ RenderTerrainDetail 1 0
list GeForce3
list ATI
+UseOcclusion 0 0
list Radeon8500
RenderLighting 1 0
diff --git a/indra/newview/res/install_icon.BMP b/indra/newview/installers/windows/install_icon.BMP
index 09df573870..09df573870 100644
--- a/indra/newview/res/install_icon.BMP
+++ b/indra/newview/installers/windows/install_icon.BMP
Binary files differ
diff --git a/indra/newview/installers/windows/install_icon.ico b/indra/newview/installers/windows/install_icon.ico
new file mode 100644
index 0000000000..1e00530c90
--- /dev/null
+++ b/indra/newview/installers/windows/install_icon.ico
Binary files differ
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 0a68d6badc..483568f974 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -68,8 +68,8 @@ Name ${INSTNAME}
SubCaption 0 $(LicenseSubTitleSetup) ; override "license agreement" text
BrandingText " " ; bottom of window text
-Icon %%SOURCE%%\res\install_icon.ico ; our custom icon
-UninstallIcon %%SOURCE%%\res\uninstall_icon.ico ; our custom icon
+Icon %%SOURCE%%\installers\windows\install_icon.ico
+UninstallIcon %%SOURCE%%\installers\windows\uninstall_icon.ico
WindowIcon on ; show our icon in left corner
BGGradient off ; no big background window
CRCCheck on ; make sure CRC is OK
diff --git a/indra/newview/res/uninstall_icon.BMP b/indra/newview/installers/windows/uninstall_icon.BMP
index 562b56676a..562b56676a 100644
--- a/indra/newview/res/uninstall_icon.BMP
+++ b/indra/newview/installers/windows/uninstall_icon.BMP
Binary files differ
diff --git a/indra/newview/installers/windows/uninstall_icon.ico b/indra/newview/installers/windows/uninstall_icon.ico
new file mode 100644
index 0000000000..c4ec6c70bd
--- /dev/null
+++ b/indra/newview/installers/windows/uninstall_icon.ico
Binary files differ
diff --git a/indra/newview/linux_tools/client-readme.txt b/indra/newview/linux_tools/client-readme.txt
index 543a7a1881..757e4a08cc 100644
--- a/indra/newview/linux_tools/client-readme.txt
+++ b/indra/newview/linux_tools/client-readme.txt
@@ -95,12 +95,6 @@ you wish.
4. KNOWN ISSUES
-=-=-=-=-=-=-=-
-These are the most commonly-encountered known issues which are specific to
-the Beta release of the Linux client.
-
-* UPLOAD / SAVE / COLOR-PICKER DIALOGS - These only appear when the client
- is in 'windowed' mode, not 'fullscreen' mode.
-
* UPDATING - when the client detects that a new version of Second Life
is available, it will ask you if you wish to download the new version.
This option is not implemented; to upgrade, you should manually download a
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index efa7504a48..7ef757f1ba 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4348,7 +4348,19 @@ void LLAgent::setFocusObject(LLViewerObject* object)
//-----------------------------------------------------------------------------
void LLAgent::setFocusGlobal(const LLPickInfo& pick)
{
- setFocusGlobal(pick.mPosGlobal, pick.mObjectID);
+ LLViewerObject* objectp = gObjectList.findObject(pick.mObjectID);
+
+ if (objectp)
+ {
+ // focus on object plus designated offset
+ // which may or may not be same as pick.mPosGlobal
+ setFocusGlobal(objectp->getPositionGlobal() + LLVector3d(pick.mObjectOffset), pick.mObjectID);
+ }
+ else
+ {
+ // focus directly on point where user clicked
+ setFocusGlobal(pick.mPosGlobal, pick.mObjectID);
+ }
}
@@ -5831,7 +5843,12 @@ bool LLAgent::teleportCore(bool is_local)
return false;
}
- // Stop all animation before actual teleporting
+#if 0
+ // This should not exist. It has been added, removed, added, and now removed again.
+ // This change needs to come from the simulator. Otherwise, the agent ends up out of
+ // sync with other viewers. Discuss in DEV-14145/VWR-6744 before reenabling.
+
+ // Stop all animation before actual teleporting
LLVOAvatar* avatarp = gAgent.getAvatarObject();
if (avatarp)
{
@@ -5843,6 +5860,7 @@ bool LLAgent::teleportCore(bool is_local)
}
avatarp->processAnimationStateChanges();
}
+#endif
// Don't call LLFirstUse::useTeleport because we don't know
// yet if the teleport will succeed. Look in
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 1be0644840..44b9cb2198 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -104,6 +104,7 @@
#include "llviewermenu.h"
#include "llselectmgr.h"
#include "lltrans.h"
+#include "lluitrans.h"
#include "lltracker.h"
#include "llviewerparcelmgr.h"
#include "llworldmapview.h"
@@ -604,25 +605,6 @@ bool LLAppViewer::init()
/////////////////////////////////////////////////
// OS-specific login dialogs
/////////////////////////////////////////////////
-#if LL_WINDOWS
- /*
- // Display initial login screen, comes up quickly. JC
- {
- LLSplashScreen::hide();
-
- INT_PTR result = DialogBox(hInstance, L"CONNECTBOX", NULL, login_dialog_func);
- if (result < 0)
- {
- llwarns << "Connect dialog box failed, returned " << result << llendl;
- return 1;
- }
- // success, result contains which button user clicked
- llinfos << "Connect dialog box clicked " << result << llendl;
-
- LLSplashScreen::show();
- }
- */
-#endif
//test_cached_control();
@@ -1292,6 +1274,13 @@ bool LLAppViewer::cleanup()
LLVFile::cleanupClass();
llinfos << "VFS cleaned up" << llendflush;
+ // Quitting with "Remember Password" turned off should always stomp your
+ // saved password, whether or not you successfully logged in. JC
+ if (!gSavedSettings.getBOOL("RememberPassword"))
+ {
+ LLStartUp::deletePasswordFromDisk();
+ }
+
// Store the time of our current logoff
gSavedPerAccountSettings.setU32("LastLogoff", time_corrected());
@@ -2139,6 +2128,7 @@ bool LLAppViewer::initWindow()
LLUI::sWindow = gViewerWindow->getWindow();
LLTrans::parseStrings("strings.xml");
+ LLUITrans::parseStrings("ui_strings.xml");
// Show watch cursor
gViewerWindow->setCursor(UI_CURSOR_WAIT);
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index 427f67c331..0778503a92 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -540,9 +540,11 @@ void LLAppViewerLinux::handleCrashReporting(bool reportFreeze)
cmd += gDirUtilp->getDirDelimiter();
#if LL_LINUX
cmd += "linux-crash-logger.bin";
-#else // LL_SOLARIS
- cmd += "bin/solaris-crash-logger";
-#endif // LL_LINUX
+#elif LL_SOLARIS
+ cmd += "solaris-crash-logger";
+#else
+# error Unknown platform
+#endif
if(reportFreeze)
{
@@ -623,7 +625,10 @@ void LLAppViewerLinux::handleCrashReporting(bool reportFreeze)
bool LLAppViewerLinux::beingDebugged()
{
static enum {unknown, no, yes} debugged = unknown;
-
+
+#if LL_SOLARIS
+ return debugged == no; // BUG: fix this for Solaris
+#else
if (debugged == unknown)
{
pid_t ppid = getppid();
@@ -658,6 +663,7 @@ bool LLAppViewerLinux::beingDebugged()
}
return debugged == yes;
+#endif
}
bool LLAppViewerLinux::initLogging()
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 5bdfbb0975..9dd0668787 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -206,6 +206,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
LLAssetType::EType asset_type = LLAssetType::lookup(mPostData["asset_type"].asString());
LLInventoryType::EType inventory_type = LLInventoryType::lookup(mPostData["inventory_type"].asString());
+ S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
// Update L$ and ownership credit information
// since it probably changed on the server
@@ -222,7 +223,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
gAgent.sendReliableMessage();
LLSD args;
- args["AMOUNT"] = llformat("%d",LLGlobalEconomy::Singleton::getInstance()->getPriceUpload());
+ args["AMOUNT"] = llformat("%d", expected_upload_cost);
LLNotifications::instance().add("UploadPayment", args);
}
@@ -320,9 +321,14 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
U32 everyone_perms = mPostData.has("everyone_mask") ? mPostData.get("everyone_mask" ).asInteger() : PERM_NONE;
U32 group_perms = mPostData.has("group_mask") ? mPostData.get("group_mask" ).asInteger() : PERM_NONE;
U32 next_owner_perms = mPostData.has("next_owner_mask") ? mPostData.get("next_owner_mask").asInteger() : PERM_NONE;
+ std::string display_name = LLStringUtil::null;
+ LLAssetStorage::LLStoreAssetCallback callback = NULL;
+ void *userdata = NULL;
upload_new_resource(next_file, asset_name, asset_name,
- 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE,
- next_owner_perms, group_perms, everyone_perms);
+ 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE,
+ next_owner_perms, group_perms,
+ everyone_perms, display_name,
+ callback, expected_upload_cost, userdata);
}
}
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index c76cbbeb3e..2395f3c5ae 100644
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -523,7 +523,8 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata )
{
if (self->mInputEditor)
{
- self->mInputEditor->setText(utf8_out_str);
+ std::string rest_of_match = utf8_out_str.substr(utf8_trigger.size());
+ self->mInputEditor->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part
S32 outlength = self->mInputEditor->getLength(); // in characters
// Select to end of line, starting from the character
diff --git a/indra/newview/lldirpicker.cpp b/indra/newview/lldirpicker.cpp
index c89d56474d..8b0ed39eb0 100644
--- a/indra/newview/lldirpicker.cpp
+++ b/indra/newview/lldirpicker.cpp
@@ -39,8 +39,9 @@
#include "llkeyboard.h"
#include "lldir.h"
#include "llframetimer.h"
+#include "lltrans.h"
-#if LL_LINUX
+#if LL_LINUX || LL_SOLARIS
# include "llfilepicker.h"
#endif
@@ -264,7 +265,7 @@ void LLDirPicker::reset()
mDir.clear();
}
-#elif LL_LINUX
+#elif LL_LINUX || LL_SOLARIS
LLDirPicker::LLDirPicker()
{
@@ -294,7 +295,7 @@ BOOL LLDirPicker::getDir(std::string* filename)
if (picker)
{
- gtk_window_set_title(GTK_WINDOW(picker), "Choose Directory");
+ gtk_window_set_title(GTK_WINDOW(picker), LLTrans::getString("choose_the_directory").c_str());
gtk_widget_show_all(GTK_WIDGET(picker));
gtk_main();
return (!mFilePicker->getFirstFile().empty());
diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h
index 9c36dc6750..26f76915ae 100644
--- a/indra/newview/lldirpicker.h
+++ b/indra/newview/lldirpicker.h
@@ -90,7 +90,7 @@ private:
#endif
-#if LL_LINUX
+#if LL_LINUX || LL_SOLARIS
// On Linux we just implement LLDirPicker on top of LLFilePicker
LLFilePicker *mFilePicker;
#endif
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 768a728749..25a26f05d8 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -205,7 +205,7 @@ static struct ft_display_info ft_display_table[] =
{ LLFastTimer::FTM_OTHER, " Other", &red0 }
};
static int ft_display_didcalc = 0;
-static const int FTV_DISPLAY_NUM = (sizeof(ft_display_table)/sizeof(ft_display_table[0]));
+static const int FTV_DISPLAY_NUM = LL_ARRAY_SIZE(ft_display_table);
S32 ft_display_idx[FTV_DISPLAY_NUM]; // line of table entry for display purposes (for collapse)
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index 1ad55ae35c..8f5882615f 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -38,6 +38,7 @@
#include "llkeyboard.h"
#include "lldir.h"
#include "llframetimer.h"
+#include "lltrans.h"
#if LL_SDL
#include "llwindowsdl.h" // for some X/GTK utils to help with filepickers
@@ -893,19 +894,45 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename)
return success;
}
-#elif LL_LINUX
+#elif LL_LINUX || LL_SOLARIS
# if LL_GTK
// static
void LLFilePicker::add_to_selectedfiles(gpointer data, gpointer user_data)
{
+ // We need to run g_filename_to_utf8 in the user's locale
+ std::string saved_locale(setlocale(LC_ALL, NULL));
+ setlocale(LC_ALL, "");
+
LLFilePicker* picker = (LLFilePicker*) user_data;
+ GError *error = NULL;
gchar* filename_utf8 = g_filename_to_utf8((gchar*)data,
- -1, NULL, NULL, NULL);
- picker->mFiles.push_back(std::string(filename_utf8));
- lldebugs << "ADDED FILE " << filename_utf8 << llendl;
- g_free(filename_utf8);
+ -1, NULL, NULL, &error);
+ if (error)
+ {
+ // *FIXME.
+ // This condition should really be notified to the user, e.g.
+ // through a message box. Just logging it is inappropriate.
+
+ // g_filename_display_name is ideal, but >= glib 2.6, so:
+ // a hand-rolled hacky makeASCII which disallows control chars
+ std::string display_name;
+ for (const gchar *str = (const gchar *)data; *str; str++)
+ {
+ display_name += (char)((*str >= 0x20 && *str <= 0x7E) ? *str : '?');
+ }
+ llwarns << "g_filename_to_utf8 failed on \"" << display_name << "\": " << error->message << llendl;
+ }
+
+ if (filename_utf8)
+ {
+ picker->mFiles.push_back(std::string(filename_utf8));
+ lldebugs << "ADDED FILE " << filename_utf8 << llendl;
+ g_free(filename_utf8);
+ }
+
+ setlocale(LC_ALL, saved_locale.c_str());
}
// static
@@ -934,8 +961,7 @@ void LLFilePicker::chooser_responder(GtkWidget *widget, gint response, gpointer
GtkWindow* LLFilePicker::buildFilePicker(bool is_save, bool is_folder, std::string context)
{
- if (LLWindowSDL::ll_try_gtk_init() &&
- ! gViewerWindow->getWindow()->getFullscreen())
+ if (LLWindowSDL::ll_try_gtk_init())
{
GtkWidget *win = NULL;
GtkFileChooserAction pickertype =
@@ -1017,7 +1043,7 @@ static void add_common_filters_to_gtkchooser(GtkFileFilter *gfilter,
gfilter);
GtkFileFilter *allfilter = gtk_file_filter_new();
gtk_file_filter_add_pattern(allfilter, "*");
- gtk_file_filter_set_name(allfilter, "All Files");
+ gtk_file_filter_set_name(allfilter, LLTrans::getString("all_files").c_str());
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(picker), allfilter);
gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(picker), gfilter);
}
@@ -1045,13 +1071,13 @@ static std::string add_simple_mime_filter_to_gtkchooser(GtkWindow *picker,
static std::string add_wav_filter_to_gtkchooser(GtkWindow *picker)
{
return add_simple_mime_filter_to_gtkchooser(picker, "audio/x-wav",
- "Sounds (*.wav)");
+ LLTrans::getString("sound_files") + " (*.wav)");
}
static std::string add_bvh_filter_to_gtkchooser(GtkWindow *picker)
{
return add_simple_pattern_filter_to_gtkchooser(picker, "*.bvh",
- "Animations (*.bvh)");
+ LLTrans::getString("animation_files") + " (*.bvh)");
}
static std::string add_imageload_filter_to_gtkchooser(GtkWindow *picker)
@@ -1061,7 +1087,7 @@ static std::string add_imageload_filter_to_gtkchooser(GtkWindow *picker)
gtk_file_filter_add_mime_type(gfilter, "image/jpeg");
gtk_file_filter_add_mime_type(gfilter, "image/png");
gtk_file_filter_add_mime_type(gfilter, "image/bmp");
- std::string filtername = "Images (*.tga; *.bmp; *.jpg; *.png)";
+ std::string filtername = LLTrans::getString("image_files") + " (*.tga; *.bmp; *.jpg; *.png)";
add_common_filters_to_gtkchooser(gfilter, picker, filtername);
return filtername;
}
@@ -1081,7 +1107,7 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename
{
std::string suggest_name = "untitled";
std::string suggest_ext = "";
- std::string caption = "Save ";
+ std::string caption = LLTrans::getString("save_file_verb") + " ";
switch (filter)
{
case FFSAVE_WAV:
@@ -1090,39 +1116,39 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename
break;
case FFSAVE_TGA:
caption += add_simple_pattern_filter_to_gtkchooser
- (picker, "*.tga", "Targa Images (*.tga)");
+ (picker, "*.tga", LLTrans::getString("targa_image_files") + " (*.tga)");
suggest_ext = ".tga";
break;
case FFSAVE_BMP:
caption += add_simple_mime_filter_to_gtkchooser
- (picker, "image/bmp", "Bitmap Images (*.bmp)");
+ (picker, "image/bmp", LLTrans::getString("bitmap_image_files") + " (*.bmp)");
suggest_ext = ".bmp";
break;
case FFSAVE_AVI:
caption += add_simple_mime_filter_to_gtkchooser
(picker, "video/x-msvideo",
- "AVI Movie File (*.avi)");
+ LLTrans::getString("avi_movie_file") + " (*.avi)");
suggest_ext = ".avi";
break;
case FFSAVE_ANIM:
caption += add_simple_pattern_filter_to_gtkchooser
- (picker, "*.xaf", "XAF Anim File (*.xaf)");
+ (picker, "*.xaf", LLTrans::getString("xaf_animation_file") + " (*.xaf)");
suggest_ext = ".xaf";
break;
case FFSAVE_XML:
caption += add_simple_pattern_filter_to_gtkchooser
- (picker, "*.xml", "XML File (*.xml)");
+ (picker, "*.xml", LLTrans::getString("xml_file") + " (*.xml)");
suggest_ext = ".xml";
break;
case FFSAVE_RAW:
caption += add_simple_pattern_filter_to_gtkchooser
- (picker, "*.raw", "RAW File (*.raw)");
+ (picker, "*.raw", LLTrans::getString("raw_file") + " (*.raw)");
suggest_ext = ".raw";
break;
case FFSAVE_J2C:
caption += add_simple_mime_filter_to_gtkchooser
(picker, "images/jp2",
- "Compressed Images (*.j2c)");
+ LLTrans::getString("compressed_image_files") + " (*.j2c)");
suggest_ext = ".j2c";
break;
default:;
@@ -1168,7 +1194,7 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter )
if (picker)
{
- std::string caption = "Load ";
+ std::string caption = LLTrans::getString("load_file_verb") + " ";
std::string filtername = "";
switch (filter)
{
@@ -1215,7 +1241,7 @@ BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter )
gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER(picker),
TRUE);
- gtk_window_set_title(GTK_WINDOW(picker), "Load Files");
+ gtk_window_set_title(GTK_WINDOW(picker), LLTrans::getString("load_files").c_str());
gtk_widget_show_all(GTK_WIDGET(picker));
gtk_main();
diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp
index 0cdd3f5b66..045ca6aa36 100644
--- a/indra/newview/llfloateranimpreview.cpp
+++ b/indra/newview/llfloateranimpreview.cpp
@@ -989,15 +989,19 @@ void LLFloaterAnimPreview::onBtnOK(void* userdata)
{
std::string name = floaterp->childGetValue("name_form").asString();
std::string desc = floaterp->childGetValue("description_form").asString();
+ LLAssetStorage::LLStoreAssetCallback callback = NULL;
+ S32 expected_upload_cost = sUploadAmount;
+ void *userdata = NULL;
upload_new_resource(floaterp->mTransactionID, // tid
- LLAssetType::AT_ANIMATION,
- name,
- desc,
- 0,
- LLAssetType::AT_NONE,
- LLInventoryType::IT_ANIMATION,
- LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(),
- name);
+ LLAssetType::AT_ANIMATION,
+ name,
+ desc,
+ 0,
+ LLAssetType::AT_NONE,
+ LLInventoryType::IT_ANIMATION,
+ LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(),
+ name,
+ callback, expected_upload_cost, userdata);
}
else
{
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
index 793ae954ae..f57042eedb 100644
--- a/indra/newview/llfloaterchat.cpp
+++ b/indra/newview/llfloaterchat.cpp
@@ -393,7 +393,11 @@ void LLFloaterChat::addChat(const LLChat& chat,
text_color = gSavedSettings.getColor("IMChatColor");
size = INSTANT_MSG_SIZE;
}
- gConsole->addLine(chat.mText, size, text_color);
+ // We display anything if it's not an IM. If it's an IM, check pref...
+ if ( !from_instant_message || gSavedSettings.getBOOL("IMInChatHistory") )
+ {
+ gConsole->addLine(chat.mText, size, text_color);
+ }
}
if(from_instant_message && gSavedPerAccountSettings.getBOOL("LogChatIM"))
diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp
index db9d943ed3..acfcfab445 100644
--- a/indra/newview/llfloaternamedesc.cpp
+++ b/indra/newview/llfloaternamedesc.cpp
@@ -49,6 +49,7 @@
#include "llviewermenufile.h" // upload_new_resource()
#include "lluictrlfactory.h"
#include "llstring.h"
+#include "lleconomy.h"
// linden includes
#include "llassetstorage.h"
@@ -179,11 +180,16 @@ void LLFloaterNameDesc::onBtnOK( void* userdata )
fp->childDisable("ok_btn"); // don't allow inadvertent extra uploads
+ LLAssetStorage::LLStoreAssetCallback callback = NULL;
+ S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass).
+ void *nruserdata = NULL;
+ std::string display_name = LLStringUtil::null;
upload_new_resource(fp->mFilenameAndPath, // file
- fp->childGetValue("name_form").asString(),
- fp->childGetValue("description_form").asString(),
- 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE,
- LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms());
+ fp->childGetValue("name_form").asString(),
+ fp->childGetValue("description_form").asString(),
+ 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE,
+ LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(),
+ display_name, callback, expected_upload_cost, nruserdata);
fp->close(false);
}
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index 8a057b442c..406d940cf0 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -248,7 +248,7 @@ void LLFloaterProperties::refresh()
"RadioSaleType",
"EditPrice"
};
- for(size_t t=0; t<sizeof(enableNames)/sizeof(char*); ++t)
+ for(size_t t=0; t<LL_ARRAY_SIZE(enableNames); ++t)
{
childSetEnabled(enableNames[t],false);
}
@@ -259,7 +259,7 @@ void LLFloaterProperties::refresh()
"EveryoneMaskDebug",
"NextMaskDebug"
};
- for(size_t t=0; t<sizeof(hideNames)/sizeof(char*); ++t)
+ for(size_t t=0; t<LL_ARRAY_SIZE(hideNames); ++t)
{
childSetVisible(hideNames[t],false);
}
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 1f401acc4c..3f699fda99 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -693,6 +693,9 @@ LLSD LLFloaterReporter::gatherReport()
#elif LL_LINUX
const char* platform = "Lnx";
const char* short_platform = "O:L";
+#elif LL_SOLARIS
+ const char* platform = "Sol";
+ const char* short_platform = "O:S";
#else
const char* platform = "???";
const char* short_platform = "O:?";
@@ -885,6 +888,8 @@ void LLFloaterReporter::takeScreenshot()
// create a resource data
mResourceDatap->mInventoryType = LLInventoryType::IT_NONE;
+ mResourceDatap->mNextOwnerPerm = 0; // not used
+ mResourceDatap->mExpectedUploadCost = 0; // we expect that abuse screenshots are free
mResourceDatap->mAssetInfo.mTransactionID.generate();
mResourceDatap->mAssetInfo.mUuid = mResourceDatap->mAssetInfo.mTransactionID.makeAssetID(gAgent.getSecureSessionID());
if (BUG_REPORT == mReportType)
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index dd5f2662d6..14caed9d97 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -51,6 +51,7 @@
#include "llfocusmgr.h"
#include "llbutton.h"
#include "llcombobox.h"
+#include "lleconomy.h"
#include "llsliderctrl.h"
#include "llspinctrl.h"
#include "llviewercontrol.h"
@@ -952,17 +953,21 @@ void LLSnapshotLivePreview::saveTexture()
gAgent.buildLocationString(pos_string);
std::string who_took_it;
gAgent.buildFullname(who_took_it);
+ LLAssetStorage::LLStoreAssetCallback callback = NULL;
+ S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ void *userdata = NULL;
upload_new_resource(tid, // tid
- LLAssetType::AT_TEXTURE,
- "Snapshot : " + pos_string,
- "Taken by " + who_took_it + " at " + pos_string,
- 0,
- LLAssetType::AT_SNAPSHOT_CATEGORY,
- LLInventoryType::IT_SNAPSHOT,
- PERM_ALL, // Note: Snapshots to inventory is a special case of content upload
- PERM_NONE, // that ignores the user's premissions preferences and continues to
- PERM_NONE, // always use these fairly permissive hard-coded initial perms. - MG
- "Snapshot : " + pos_string);
+ LLAssetType::AT_TEXTURE,
+ "Snapshot : " + pos_string,
+ "Taken by " + who_took_it + " at " + pos_string,
+ 0,
+ LLAssetType::AT_SNAPSHOT_CATEGORY,
+ LLInventoryType::IT_SNAPSHOT,
+ PERM_ALL, // Note: Snapshots to inventory is a special case of content upload
+ PERM_NONE, // that ignores the user's premissions preferences and continues to
+ PERM_NONE, // always use these fairly permissive hard-coded initial perms. - MG
+ "Snapshot : " + pos_string,
+ callback, expected_upload_cost, userdata);
gViewerWindow->playSnapshotAnimAndSound();
}
else
@@ -1271,6 +1276,9 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
LLLocale locale(LLLocale::USER_LOCALE);
std::string bytes_string;
LLResMgr::getInstance()->getIntegerString(bytes_string, (previewp->getDataSize()) >> 10 );
+ S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ floater->childSetLabelArg("texture", "[AMOUNT]", llformat("%d",upload_cost));
+ floater->childSetLabelArg("upload_btn", "[AMOUNT]", llformat("%d",upload_cost));
floater->childSetTextArg("file_size_label", "[SIZE]", got_snap ? bytes_string : floater->getString("unknown"));
floater->childSetColor("file_size_label",
shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 9a0d831be4..704b53e816 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -271,7 +271,7 @@ BOOL LLFloaterTools::postBuild()
&LLToolPlacerPanel::sTriangleTorus,
&LLToolPlacerPanel::sTree,
&LLToolPlacerPanel::sGrass};
- for(size_t t=0; t<sizeof(toolNames)/sizeof(toolNames[0]); ++t)
+ for(size_t t=0; t<LL_ARRAY_SIZE(toolNames); ++t)
{
LLButton *found = getChild<LLButton>(toolNames[t]);
if(found)
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index a9c182455c..16428ce6d1 100644
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -185,7 +185,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
{
have_extended_data = true;
msg->getU32("DataExtended", "TimeStamp", time_stamp, block);
- msg->getF32(_PREHASH_ReportData, "MonoScore", mono_score, block);
+ msg->getF32("DataExtended", "MonoScore", mono_score, block);
}
LLSD element;
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 1ba85e6e53..6a392e03fb 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -34,21 +34,25 @@
#include "llfloatertos.h"
-#include "llbutton.h"
-#include "llradiogroup.h"
-#include "llvfile.h"
-#include "lltextbox.h"
-#include "llviewertexteditor.h"
+// viewer includes
+#include "llagent.h"
#include "llappviewer.h"
#include "llstartup.h"
-#include "message.h"
-#include "llagent.h"
-#include "lluictrlfactory.h"
-#include "llviewerwindow.h"
#include "llviewerstats.h"
-#include "llui.h"
+#include "llviewertexteditor.h"
+#include "llviewerwindow.h"
+
+// linden library includes
+#include "llbutton.h"
#include "llhttpclient.h"
+#include "llhttpstatuscodes.h" // for HTTP_FOUND
#include "llradiogroup.h"
+#include "lltextbox.h"
+#include "llui.h"
+#include "lluictrlfactory.h"
+#include "llvfile.h"
+#include "message.h"
+
// static
LLFloaterTOS* LLFloaterTOS::sInstance = NULL;
@@ -115,7 +119,13 @@ class LLIamHere : public LLHTTPClient::Responder
virtual void error( U32 status, const std::string& reason )
{
if ( mParent )
- mParent->setSiteIsAlive( false );
+ {
+ // *HACK: For purposes of this alive check, 302 Found
+ // (aka Moved Temporarily) is considered alive. The web site
+ // redirects this link to a "cache busting" temporary URL. JC
+ bool alive = (status == HTTP_FOUND);
+ mParent->setSiteIsAlive( alive );
+ }
};
};
@@ -185,12 +195,6 @@ void LLFloaterTOS::setSiteIsAlive( bool alive )
// but if the page is unavailable, we need to do this now
LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
tos_agreement->setEnabled( true );
-
- if ( web_browser )
- {
- // hide browser control (revealing default text message)
- web_browser->setVisible( FALSE );
- };
};
};
}
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 7f2321aafb..d59f513925 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -742,7 +742,7 @@ void LLFloaterWorldMap::updateLocation()
void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S32 y_coord, S32 z_coord)
{
LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromName(region_name);
- z_coord = llclamp(z_coord, 0, 1000);
+ z_coord = llclamp(z_coord, 0, 4096);
if (sim_info)
{
LLVector3 local_pos;
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 48d9a8a76b..f98a3f9ee5 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1067,7 +1067,7 @@ void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content)
S32 count = content["items"].size();
bool all_one_folder = true;
LLUUID folder_id;
- // Does this loop ever execute more than once? -Gigs
+ // Does this loop ever execute more than once?
for(S32 i = 0; i < count; ++i)
{
LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
@@ -2645,7 +2645,7 @@ void LLInventoryModel::processFetchInventoryReply(LLMessageSystem* msg, void**)
bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account)
{
- //make sure our added inventory observer is active -Gigs
+ //make sure our added inventory observer is active
start_new_inventory_observer();
LLUUID agent_id;
@@ -2661,7 +2661,7 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account)
S32 count = msg->getNumberOfBlocksFast(_PREHASH_InventoryData);
bool all_one_folder = true;
LLUUID folder_id;
- // Does this loop ever execute more than once? -Gigs
+ // Does this loop ever execute more than once?
for(S32 i = 0; i < count; ++i)
{
LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
@@ -3791,7 +3791,6 @@ void LLInventoryAddedObserver::changed(U32 mask)
// *HACK: If this was in response to a packet off
// the network, figure out which item was updated.
- // Code from Gigs Taggert, sin allowed by JC.
LLMessageSystem* msg = gMessageSystem;
std::string msg_name;
diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp
index d298f8e0e7..053f798882 100644
--- a/indra/newview/llloginhandler.cpp
+++ b/indra/newview/llloginhandler.cpp
@@ -192,27 +192,18 @@ bool LLLoginHandler::handle(const LLSD& tokens,
LLMD5 pass((unsigned char*)password.c_str());
char md5pass[33]; /* Flawfinder: ignore */
pass.hex_digest(md5pass);
- password = ll_safe_string(md5pass, 32);
- save_password_to_disk(password.c_str());
+ std::string hashed_password = ll_safe_string(md5pass, 32);
+ LLStartUp::savePasswordToDisk(hashed_password);
}
}
- else
- {
- save_password_to_disk(NULL);
- gSavedSettings.setBOOL("RememberPassword", FALSE);
- }
if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) //on splash page
{
if (!mFirstName.empty() || !mLastName.empty())
{
- // Fill in the name, and maybe the password, preserving the
- // remember-password setting. JC
- std::string ignore;
- BOOL remember;
- LLPanelLogin::getFields(ignore, ignore, ignore, remember);
- LLPanelLogin::setFields(mFirstName, mLastName, password, remember);
+ // Fill in the name, and maybe the password
+ LLPanelLogin::setFields(mFirstName, mLastName, password);
}
if (mWebLoginKey.isNull())
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index b9a700991e..959a575950 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -1635,7 +1635,7 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal,
}
U32 types[] = { LLRenderPass::PASS_SIMPLE, LLRenderPass::PASS_ALPHA, LLRenderPass::PASS_FULLBRIGHT, LLRenderPass::PASS_SHINY };
- U32 num_types = sizeof(types)/sizeof(U32);
+ U32 num_types = LL_ARRAY_SIZE(types);
GLuint stencil_mask = 0xFFFFFFFF;
//stencil in volumes
diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp
index 2a8fa2bf35..97dc373b07 100644
--- a/indra/newview/llmemoryview.cpp
+++ b/indra/newview/llmemoryview.cpp
@@ -138,7 +138,7 @@ static const struct mtv_display_info mtv_display_table[] =
{ LLMemType::MTYPE_OTHER, "Other", &red0 },
};
-static const int MTV_DISPLAY_NUM = (sizeof(mtv_display_table)/sizeof(mtv_display_table[0]));
+static const int MTV_DISPLAY_NUM = LL_ARRAY_SIZE(mtv_display_table);
void LLMemoryView::draw()
{
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 8b5cb94221..41f8f3941a 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -78,9 +78,6 @@
#include "llweb.h"
#include "llinventorymodel.h"
#include "roles_constants.h"
-
-#define kArraySize( _kArray ) ( sizeof( (_kArray) ) / sizeof( _kArray[0] ) )
-
#include "lluictrlfactory.h"
// Statics
@@ -504,17 +501,17 @@ BOOL LLPanelAvatarPicks::postBuild(void)
BOOL LLPanelAvatarAdvanced::postBuild()
{
- for(size_t ii = 0; ii < kArraySize(mWantToCheck); ++ii)
+ for(size_t ii = 0; ii < LL_ARRAY_SIZE(mWantToCheck); ++ii)
mWantToCheck[ii] = NULL;
- for(size_t ii = 0; ii < kArraySize(mSkillsCheck); ++ii)
+ for(size_t ii = 0; ii < LL_ARRAY_SIZE(mSkillsCheck); ++ii)
mSkillsCheck[ii] = NULL;
- mWantToCount = (8>kArraySize(mWantToCheck))?kArraySize(mWantToCheck):8;
+ mWantToCount = (8>LL_ARRAY_SIZE(mWantToCheck))?LL_ARRAY_SIZE(mWantToCheck):8;
for(S32 tt=0; tt < mWantToCount; ++tt)
{
std::string ctlname = llformat("chk%d", tt);
mWantToCheck[tt] = getChild<LLCheckBoxCtrl>(ctlname);
}
- mSkillsCount = (6>kArraySize(mSkillsCheck))?kArraySize(mSkillsCheck):6;
+ mSkillsCount = (6>LL_ARRAY_SIZE(mSkillsCheck))?LL_ARRAY_SIZE(mSkillsCheck):6;
for(S32 tt=0; tt < mSkillsCount; ++tt)
{
@@ -1817,7 +1814,7 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**)
"AcctTypeCharterMember",
"AcctTypeEmployee"
};
- caption_index = llclamp(caption_index, (U8)0, (U8)(sizeof(ACCT_TYPE)/sizeof(ACCT_TYPE[0])-1));
+ caption_index = llclamp(caption_index, (U8)0, (U8)(LL_ARRAY_SIZE(ACCT_TYPE)-1));
args["[ACCTTYPE]"] = self->mPanelSecondLife->getString(ACCT_TYPE[caption_index]);
std::string payment_text = " ";
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index ceca360967..cbf4a8740c 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -195,6 +195,7 @@ BOOL LLPanelGroupGeneral::postBuild()
mSpinEnrollmentFee->setCommitCallback(onCommitAny);
mSpinEnrollmentFee->setCallbackUserData(this);
mSpinEnrollmentFee->setPrecision(0);
+ mSpinEnrollmentFee->resetDirty();
}
BOOL accept_notices = FALSE;
@@ -221,6 +222,7 @@ BOOL LLPanelGroupGeneral::postBuild()
mCtrlListGroup->setCallbackUserData(this);
mCtrlListGroup->set(list_in_profile);
mCtrlListGroup->setEnabled(data.mID.notNull());
+ mCtrlListGroup->resetDirty();
}
mActiveTitleLabel = getChild<LLTextBox>("active_title_label", recurse);
@@ -230,6 +232,7 @@ BOOL LLPanelGroupGeneral::postBuild()
{
mComboActiveTitle->setCommitCallback(onCommitTitle);
mComboActiveTitle->setCallbackUserData(this);
+ mComboActiveTitle->resetDirty();
}
mIncompleteMemberDataStr = getString("incomplete_member_data_str");
@@ -259,7 +262,7 @@ BOOL LLPanelGroupGeneral::postBuild()
void LLPanelGroupGeneral::onFocusEdit(LLFocusableElement* ctrl, void* data)
{
LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data;
- self->mChanged = TRUE;
+ self->updateChanged();
self->notifyObservers();
}
@@ -317,6 +320,7 @@ void LLPanelGroupGeneral::onCommitTitle(LLUICtrl* ctrl, void* data)
if (self->mGroupID.isNull() || !self->mAllowEdit) return;
LLGroupMgr::getInstance()->sendGroupTitleUpdate(self->mGroupID,self->mComboActiveTitle->getCurrentID());
self->update(GC_TITLES);
+ self->mComboActiveTitle->resetDirty();
}
// static
@@ -398,6 +402,7 @@ void LLPanelGroupGeneral::openProfile(void* data)
bool LLPanelGroupGeneral::needsApply(std::string& mesg)
{
+ updateChanged();
mesg = getString("group_info_unchanged");
return mChanged || mGroupID.isNull();
}
@@ -660,6 +665,8 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
mComboActiveTitle->setCurrentByID(LLUUID::null);
}
}
+
+ mComboActiveTitle->resetDirty();
}
// If this was just a titles update, we are done.
@@ -674,6 +681,8 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
{
mCtrlShowInGroupList->set(gdatap->mShowInList);
mCtrlShowInGroupList->setEnabled(mAllowEdit && can_change_ident);
+ mCtrlShowInGroupList->resetDirty();
+
}
if (mComboMature)
{
@@ -687,24 +696,29 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
}
mComboMature->setEnabled(mAllowEdit && can_change_ident);
mComboMature->setVisible( !gAgent.isTeen() );
+ mComboMature->resetDirty();
}
if (mCtrlOpenEnrollment)
{
mCtrlOpenEnrollment->set(gdatap->mOpenEnrollment);
mCtrlOpenEnrollment->setEnabled(mAllowEdit && can_change_member_opts);
+ mCtrlOpenEnrollment->resetDirty();
}
if (mCtrlEnrollmentFee)
{
mCtrlEnrollmentFee->set(gdatap->mMembershipFee > 0);
mCtrlEnrollmentFee->setEnabled(mAllowEdit && can_change_member_opts);
+ mCtrlEnrollmentFee->resetDirty();
}
if (mSpinEnrollmentFee)
{
S32 fee = gdatap->mMembershipFee;
mSpinEnrollmentFee->set((F32)fee);
- mSpinEnrollmentFee->setEnabled( mAllowEdit
- && (fee > 0) && can_change_member_opts);
+ mSpinEnrollmentFee->setEnabled( mAllowEdit &&
+ (fee > 0) &&
+ can_change_member_opts);
+ mSpinEnrollmentFee->resetDirty();
}
if ( mBtnJoinGroup )
{
@@ -733,8 +747,9 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
{
mCtrlReceiveNotices->setEnabled(mAllowEdit);
}
+ mCtrlReceiveNotices->resetDirty();
}
-
+
if (mInsignia) mInsignia->setEnabled(mAllowEdit && can_change_ident);
if (mEditCharter) mEditCharter->setEnabled(mAllowEdit && can_change_ident);
@@ -750,11 +765,15 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
}
else
{
-
mInsignia->setImageAssetID(mDefaultIconID);
}
}
- if (mEditCharter) mEditCharter->setText(gdatap->mCharter);
+
+ if (mEditCharter)
+ {
+ mEditCharter->setText(gdatap->mCharter);
+ mEditCharter->resetDirty();
+ }
if (mListVisibleMembers)
{
@@ -882,7 +901,7 @@ void LLPanelGroupGeneral::updateChanged()
mChanged = FALSE;
- for( int i= 0; i< sizeof(check_list)/sizeof(*check_list); i++ )
+ for( int i= 0; i< LL_ARRAY_SIZE(check_list); i++ )
{
if( check_list[i] && check_list[i]->isDirty() )
{
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 46ced60b44..bc5e8f2482 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -546,8 +546,9 @@ void LLPanelLogin::show(const LLRect &rect,
}
// static
-void LLPanelLogin::setFields(const std::string& firstname, const std::string& lastname, const std::string& password,
- BOOL remember)
+void LLPanelLogin::setFields(const std::string& firstname,
+ const std::string& lastname,
+ const std::string& password)
{
if (!sInstance)
{
@@ -581,8 +582,6 @@ void LLPanelLogin::setFields(const std::string& firstname, const std::string& la
pass.hex_digest(munged_password);
sInstance->mMungedPassword = munged_password;
}
-
- sInstance->childSetValue("remember_check", remember);
}
@@ -601,8 +600,9 @@ void LLPanelLogin::addServer(const std::string& server, S32 domain_name)
}
// static
-void LLPanelLogin::getFields(std::string &firstname, std::string &lastname, std::string &password,
- BOOL &remember)
+void LLPanelLogin::getFields(std::string *firstname,
+ std::string *lastname,
+ std::string *password)
{
if (!sInstance)
{
@@ -610,14 +610,13 @@ void LLPanelLogin::getFields(std::string &firstname, std::string &lastname, std:
return;
}
- firstname = sInstance->childGetText("first_name_edit");
- LLStringUtil::trim(firstname);
+ *firstname = sInstance->childGetText("first_name_edit");
+ LLStringUtil::trim(*firstname);
- lastname = sInstance->childGetText("last_name_edit");
- LLStringUtil::trim(lastname);
+ *lastname = sInstance->childGetText("last_name_edit");
+ LLStringUtil::trim(*lastname);
- password = sInstance->mMungedPassword;
- remember = sInstance->childGetValue("remember_check");
+ *password = sInstance->mMungedPassword;
}
// static
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index 5dffaa8323..47d42da7f1 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -59,14 +59,15 @@ public:
void (*callback)(S32 option, void* user_data),
void* callback_data);
+ // Remember password checkbox is set via gSavedSettings "RememberPassword"
static void setFields(const std::string& firstname, const std::string& lastname,
- const std::string& password, BOOL remember);
+ const std::string& password);
static void addServer(const std::string& server, S32 domain_name);
static void refreshLocation( bool force_visible );
- static void getFields(std::string& firstname, std::string& lastname,
- std::string& password, BOOL& remember);
+ static void getFields(std::string *firstname, std::string *lastname,
+ std::string *password);
static BOOL isGridComboDirty();
static void getLocation(std::string &location);
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 09cdfabfc1..ff3b9433f4 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -236,14 +236,14 @@ BOOL LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
LLScrollListItem* line = NULL;
if (cargo_type == DAD_ANIMATION)
{
- line = addStep("Animation");
+ line = addStep( STEP_ANIMATION );
LLGestureStepAnimation* anim = (LLGestureStepAnimation*)line->getUserdata();
anim->mAnimAssetID = item->getAssetUUID();
anim->mAnimName = item->getName();
}
else if (cargo_type == DAD_SOUND)
{
- line = addStep("Sound");
+ line = addStep( STEP_SOUND );
LLGestureStepSound* sound = (LLGestureStepSound*)line->getUserdata();
sound->mSoundAssetID = item->getAssetUUID();
sound->mSoundName = item->getName();
@@ -847,18 +847,18 @@ void LLPreviewGesture::refresh()
void LLPreviewGesture::initDefaultGesture()
{
LLScrollListItem* item;
- item = addStep("Animation");
+ item = addStep( STEP_ANIMATION );
LLGestureStepAnimation* anim = (LLGestureStepAnimation*)item->getUserdata();
anim->mAnimAssetID = ANIM_AGENT_HELLO;
anim->mAnimName = "Wave";
updateLabel(item);
- item = addStep("Wait");
+ item = addStep( STEP_WAIT );
LLGestureStepWait* wait = (LLGestureStepWait*)item->getUserdata();
wait->mFlags = WAIT_FLAG_ALL_ANIM;
updateLabel(item);
- item = addStep("Chat");
+ item = addStep( STEP_CHAT );
LLGestureStepChat* chat_step = (LLGestureStepChat*)item->getUserdata();
chat_step->mChatText = "Hello, avatar!";
updateLabel(item);
@@ -1597,38 +1597,44 @@ void LLPreviewGesture::onClickAdd(void* data)
LLScrollListItem* library_item = self->mLibraryList->getFirstSelected();
if (!library_item) return;
+ S32 library_item_index = self->mLibraryList->getFirstSelectedIndex();
+
const LLScrollListCell* library_cell = library_item->getColumn(0);
const std::string& library_text = library_cell->getValue().asString();
- self->addStep(library_text);
+ if( library_item_index >= STEP_EOF )
+ {
+ llerrs << "Unknown step type: " << library_text << llendl;
+ return;
+ }
+ self->addStep( (EStepType)library_item_index );
self->mDirty = TRUE;
self->refresh();
}
-LLScrollListItem* LLPreviewGesture::addStep(const std::string& library_text)
+LLScrollListItem* LLPreviewGesture::addStep( const EStepType step_type )
{
+ // Order of enum EStepType MUST match the library_list element in floater_preview_gesture.xml
+
LLGestureStep* step = NULL;
- if (!LLStringUtil::compareInsensitive(library_text, "Animation"))
- {
- step = new LLGestureStepAnimation();
- }
- else if (!LLStringUtil::compareInsensitive(library_text, "Sound"))
- {
- step = new LLGestureStepSound();
- }
- else if (!LLStringUtil::compareInsensitive(library_text, "Chat"))
+ switch( step_type)
{
- step = new LLGestureStepChat();
- }
- else if (!LLStringUtil::compareInsensitive(library_text, "Wait"))
- {
- step = new LLGestureStepWait();
- }
- else
- {
- llerrs << "Unknown step type: " << library_text << llendl;;
- return NULL;
+ case STEP_ANIMATION:
+ step = new LLGestureStepAnimation();
+ break;
+ case STEP_SOUND:
+ step = new LLGestureStepSound();
+ break;
+ case STEP_CHAT:
+ step = new LLGestureStepChat();
+ break;
+ case STEP_WAIT:
+ step = new LLGestureStepWait();
+ break;
+ default:
+ llerrs << "Unknown step type: " << (S32)step_type << llendl;
+ return NULL;
}
// Create an enabled item with this step
diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h
index 91c214be62..c245c0e8da 100644
--- a/indra/newview/llpreviewgesture.h
+++ b/indra/newview/llpreviewgesture.h
@@ -34,6 +34,7 @@
#define LL_LLPREVIEWGESTURE_H
#include "llpreview.h"
+#include "llmultigesture.h"
class LLMultiGesture;
class LLLineEditor;
@@ -109,7 +110,7 @@ protected:
// Add a step. Pass the name of the step, like "Animation",
// "Sound", "Chat", or "Wait"
- LLScrollListItem* addStep(const std::string& step_name);
+ LLScrollListItem* addStep(const enum EStepType step_type);
static void updateLabel(LLScrollListItem* item);
diff --git a/indra/newview/llresourcedata.h b/indra/newview/llresourcedata.h
index 2609775794..46b79150bb 100644
--- a/indra/newview/llresourcedata.h
+++ b/indra/newview/llresourcedata.h
@@ -42,6 +42,7 @@ struct LLResourceData
LLAssetType::EType mPreferredLocation;
LLInventoryType::EType mInventoryType;
U32 mNextOwnerPerm;
+ S32 mExpectedUploadCost;
void *mUserData;
};
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index ebbc49fbd6..dc4b8134dc 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1896,7 +1896,7 @@ void pushVertsColorCoded(LLSpatialGroup* group, U32 mask)
LLColor4::green6
};
- static const U32 col_count = sizeof(colors)/sizeof(LLColor4);
+ static const U32 col_count = LL_ARRAY_SIZE(colors);
U32 col = 0;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 6663b5ec19..b4f8f6b71e 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -232,8 +232,6 @@ EStartupState LLStartUp::gStartupState = STATE_FIRST;
void login_show();
void login_callback(S32 option, void* userdata);
-std::string load_password_from_disk();
-void save_password_to_disk(const char* hashed_password);
bool is_hex_string(U8* str, S32 len);
void show_first_run_dialog();
bool first_run_dialog_callback(const LLSD& notification, const LLSD& response);
@@ -351,7 +349,6 @@ bool idle_startup()
static S32 location_which = START_LOCATION_ID_LAST;
static bool show_connect_box = true;
- static BOOL remember_password = TRUE;
static bool stipend_since_login = false;
@@ -684,7 +681,6 @@ bool idle_startup()
char md5pass[33]; /* Flawfinder: ignore */
pass.hex_digest(md5pass);
password = md5pass;
- remember_password = gSavedSettings.getBOOL("RememberPassword");
#ifdef USE_VIEWER_AUTH
show_connect_box = true;
@@ -697,9 +693,8 @@ bool idle_startup()
{
firstname = gSavedSettings.getString("FirstName");
lastname = gSavedSettings.getString("LastName");
- password = load_password_from_disk();
+ password = LLStartUp::loadPasswordFromDisk();
gSavedSettings.setBOOL("RememberPassword", TRUE);
- remember_password = TRUE;
#ifdef USE_VIEWER_AUTH
show_connect_box = true;
@@ -713,8 +708,7 @@ bool idle_startup()
// a valid grid is selected
firstname = gSavedSettings.getString("FirstName");
lastname = gSavedSettings.getString("LastName");
- password = load_password_from_disk();
- remember_password = gSavedSettings.getBOOL("RememberPassword");
+ password = LLStartUp::loadPasswordFromDisk();
show_connect_box = true;
}
@@ -753,7 +747,7 @@ bool idle_startup()
// Load all the name information out of the login view
// NOTE: Hits "Attempted getFields with no login view shown" warning, since we don't
// show the login view until login_show() is called below.
- // LLPanelLogin::getFields(firstname, lastname, password, remember_password);
+ // LLPanelLogin::getFields(firstname, lastname, password);
if (gNoRender)
{
@@ -765,7 +759,7 @@ bool idle_startup()
// Show the login dialog
login_show();
// connect dialog is already shown, so fill in the names
- LLPanelLogin::setFields( firstname, lastname, password, remember_password );
+ LLPanelLogin::setFields( firstname, lastname, password);
LLPanelLogin::giveFocus();
@@ -834,7 +828,7 @@ bool idle_startup()
{
// TODO if not use viewer auth
// Load all the name information out of the login view
- LLPanelLogin::getFields(firstname, lastname, password, remember_password);
+ LLPanelLogin::getFields(&firstname, &lastname, &password);
// end TODO
// HACK: Try to make not jump on login
@@ -846,16 +840,6 @@ bool idle_startup()
gSavedSettings.setString("FirstName", firstname);
gSavedSettings.setString("LastName", lastname);
- if (remember_password)
- {
- save_password_to_disk(password.c_str());
- }
- else
- {
- save_password_to_disk(NULL);
- }
- gSavedSettings.setBOOL("RememberPassword", remember_password);
-
LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << LL_ENDL;
gDebugInfo["LoginName"] = firstname + " " + lastname;
}
@@ -1362,15 +1346,17 @@ bool idle_startup()
gSavedSettings.setString("FirstName", firstname);
gSavedSettings.setString("LastName", lastname);
- if (remember_password)
+ if (gSavedSettings.getBOOL("RememberPassword"))
{
- save_password_to_disk(password.c_str());
+ // Successful login means the password is valid, so save it.
+ LLStartUp::savePasswordToDisk(password);
}
else
{
- save_password_to_disk(NULL);
+ // Don't leave password from previous session sitting around
+ // during this login session.
+ LLStartUp::deletePasswordFromDisk();
}
- gSavedSettings.setBOOL("RememberPassword", remember_password);
text = LLUserAuth::getInstance()->getResponse("agent_access");
if(!text.empty() && (text[0] == 'M'))
@@ -1563,7 +1549,7 @@ bool idle_startup()
// Pass the user information to the voice chat server interface.
gVoiceClient->userAuthorized(firstname, lastname, gAgentID);
}
- else
+ else // if(successful_login)
{
if (gNoRender)
{
@@ -1578,8 +1564,6 @@ bool idle_startup()
reset_login();
gSavedSettings.setBOOL("AutoLogin", FALSE);
show_connect_box = true;
- // Don't save an incorrect password to disk.
- save_password_to_disk(NULL);
}
return FALSE;
}
@@ -2571,16 +2555,11 @@ void login_callback(S32 option, void *userdata)
{
// Make sure we don't save the password if the user is trying to clear it.
std::string first, last, password;
- BOOL remember = TRUE;
- LLPanelLogin::getFields(first, last, password, remember);
- if (!remember)
+ LLPanelLogin::getFields(&first, &last, &password);
+ if (!gSavedSettings.getBOOL("RememberPassword"))
{
// turn off the setting and write out to disk
- gSavedSettings.setBOOL("RememberPassword", FALSE);
gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE );
-
- // stomp the saved password on disk
- save_password_to_disk(NULL);
}
// Next iteration through main loop should shut down the app cleanly.
@@ -2598,8 +2577,18 @@ void login_callback(S32 option, void *userdata)
}
}
-std::string load_password_from_disk()
+
+// static
+std::string LLStartUp::loadPasswordFromDisk()
{
+ // Only load password if we also intend to save it (otherwise the user
+ // wonders what we're doing behind his back). JC
+ BOOL remember_password = gSavedSettings.getBOOL("RememberPassword");
+ if (!remember_password)
+ {
+ return std::string("");
+ }
+
std::string hashed_password("");
// Look for legacy "marker" password from settings.ini
@@ -2651,41 +2640,45 @@ std::string load_password_from_disk()
return hashed_password;
}
-void save_password_to_disk(const char* hashed_password)
+
+// static
+void LLStartUp::savePasswordToDisk(const std::string& hashed_password)
{
std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,
"password.dat");
- if (!hashed_password)
+ LLFILE* fp = LLFile::fopen(filepath, "wb"); /* Flawfinder: ignore */
+ if (!fp)
{
- // No password, remove the file.
- LLFile::remove(filepath);
+ return;
}
- else
- {
- LLFILE* fp = LLFile::fopen(filepath, "wb"); /* Flawfinder: ignore */
- if (!fp)
- {
- return;
- }
-
- // Encipher with MAC address
- const S32 HASHED_LENGTH = 32;
- U8 buffer[HASHED_LENGTH+1];
- LLStringUtil::copy((char*)buffer, hashed_password, HASHED_LENGTH+1);
+ // Encipher with MAC address
+ const S32 HASHED_LENGTH = 32;
+ U8 buffer[HASHED_LENGTH+1];
- LLXORCipher cipher(gMACAddress, 6);
- cipher.encrypt(buffer, HASHED_LENGTH);
+ LLStringUtil::copy((char*)buffer, hashed_password.c_str(), HASHED_LENGTH+1);
- if (fwrite(buffer, HASHED_LENGTH, 1, fp) != 1)
- {
- LL_WARNS("AppInit") << "Short write" << LL_ENDL;
- }
+ LLXORCipher cipher(gMACAddress, 6);
+ cipher.encrypt(buffer, HASHED_LENGTH);
- fclose(fp);
+ if (fwrite(buffer, HASHED_LENGTH, 1, fp) != 1)
+ {
+ LL_WARNS("AppInit") << "Short write" << LL_ENDL;
}
+
+ fclose(fp);
}
+
+// static
+void LLStartUp::deletePasswordFromDisk()
+{
+ std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,
+ "password.dat");
+ LLFile::remove(filepath);
+}
+
+
bool is_hex_string(U8* str, S32 len)
{
bool rv = true;
@@ -2869,6 +2862,8 @@ bool update_dialog_callback(const LLSD& notification, const LLSD& response)
query_map["os"] = "mac";
#elif LL_LINUX
query_map["os"] = "lnx";
+#elif LL_SOLARIS
+ query_map["os"] = "sol";
#endif
// *TODO change userserver to be grid on both viewer and sim, since
// userserver no longer exists.
@@ -2952,7 +2947,7 @@ bool update_dialog_callback(const LLSD& notification, const LLSD& response)
// Run the auto-updater.
system(LLAppViewer::sUpdaterInfo->mUpdateExePath.c_str()); /* Flawfinder: ignore */
-#elif LL_LINUX
+#elif LL_LINUX || LL_SOLARIS
OSMessageBox("Automatic updating is not yet implemented for Linux.\n"
"Please download the latest version from www.secondlife.com.",
LLStringUtil::null, OSMB_OK);
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index e455c4aed1..fe347e9efe 100644
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -37,7 +37,6 @@
// functions
bool idle_startup();
-std::string load_password_from_disk();
void release_start_screen();
bool login_alert_done(const LLSD& notification, const LLSD& response);
@@ -99,6 +98,15 @@ public:
static void loadInitialOutfit( const std::string& outfit_folder_name,
const std::string& gender_name );
+ // Load MD5 of user's password from local disk file.
+ static std::string loadPasswordFromDisk();
+
+ // Record MD5 of user's password for subsequent login.
+ static void savePasswordToDisk(const std::string& hashed_password);
+
+ // Delete the saved password local disk file.
+ static void deletePasswordFromDisk();
+
static bool dispatchURL();
// if we have a SLURL or sim string ("Ahern/123/45") that started
// the viewer, dispatch it
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index b1ad80cdd9..450e5d83af 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -235,7 +235,7 @@ void LLTextureBar::draw()
{ "MIS", LLColor4::red }, // LAST_STATE+4
{ "---", LLColor4::white }, // LAST_STATE+5
};
- const S32 fetch_state_desc_size = (S32)(sizeof(fetch_state_desc)/sizeof(fetch_state_desc[0]));
+ const S32 fetch_state_desc_size = (S32)LL_ARRAY_SIZE(fetch_state_desc);
S32 state =
mImagep->mNeedsCreateTexture ? LAST_STATE+1 :
mImagep->mFullyLoaded ? LAST_STATE+2 :
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index fe94863f2d..70fc78d277 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -526,6 +526,14 @@ void LLViewerMedia::buildMediaManagerData( LLMediaManagerData* init_data )
std::string component_dir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) );
component_dir += gDirUtilp->getDirDelimiter();
component_dir += "mozilla-runtime-linux-i686";
+#elif LL_SOLARIS
+ std::string component_dir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) );
+ component_dir += gDirUtilp->getDirDelimiter();
+ #ifdef __sparc
+ component_dir += "mozilla-solaris-sparc";
+ #else
+ component_dir += "mozilla-solaris-i686";
+ #endif
#else
std::string component_dir( gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "" ) );
component_dir += gDirUtilp->getDirDelimiter();
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 17f59595f6..e0b7b233ec 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -285,9 +285,6 @@ typedef LLMemberListener<LLView> view_listener_t;
void handle_leave_group(void *);
// File Menu
-const char* upload_pick(void* data);
-void handle_upload(void* data);
-//void handle_upload_object(void* data);
void handle_compress_image(void*);
BOOL enable_save_as(void *);
@@ -654,7 +651,7 @@ void init_menus()
gViewerWindow->setMenuBackgroundColor(false,
LLViewerLogin::getInstance()->isInProductionGrid());
- // *TODO:Get the cost info from the server
+ // Assume L$10 for now, the server will tell us the real cost at login
const std::string upload_cost("10");
gMenuHolder->childSetLabelArg("Upload Image", "[COST]", upload_cost);
gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", upload_cost);
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index ff8d717b12..a6dede1e38 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -274,6 +274,7 @@ class LLFileUploadSound : public view_listener_t
{
LLFloaterNameDesc* floaterp = new LLFloaterNameDesc(filename);
LLUICtrlFactory::getInstance()->buildFloater(floaterp, "floater_sound_preview.xml");
+ floaterp->childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d", LLGlobalEconomy::Singleton::getInstance()->getPriceUpload() ));
}
return true;
}
@@ -324,8 +325,14 @@ class LLFileUploadBulk : public view_listener_t
LLStringUtil::stripNonprintable(asset_name);
LLStringUtil::trim(asset_name);
+ std::string display_name = LLStringUtil::null;
+ LLAssetStorage::LLStoreAssetCallback callback = NULL;
+ S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+ void *userdata = NULL;
upload_new_resource(filename, asset_name, asset_name, 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE,
- LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms());
+ LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(),
+ display_name,
+ callback, expected_upload_cost, userdata);
// *NOTE: Ew, we don't iterate over the file list here,
// we handle the next files in upload_done_callback()
@@ -482,6 +489,7 @@ void handle_upload(void* data)
{
LLFloaterNameDesc* floaterp = new LLFloaterNameDesc(filename);
LLUICtrlFactory::getInstance()->buildFloater(floaterp, "floater_name_description.xml");
+ floaterp->childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d", LLGlobalEconomy::Singleton::getInstance()->getPriceUpload() ));
}
}
@@ -517,15 +525,16 @@ void handle_compress_image(void*)
}
void upload_new_resource(const std::string& src_filename, std::string name,
- std::string desc, S32 compression_info,
- LLAssetType::EType destination_folder_type,
- LLInventoryType::EType inv_type,
- U32 next_owner_perms,
- U32 group_perms,
- U32 everyone_perms,
- const std::string& display_name,
- LLAssetStorage::LLStoreAssetCallback callback,
- void *userdata)
+ std::string desc, S32 compression_info,
+ LLAssetType::EType destination_folder_type,
+ LLInventoryType::EType inv_type,
+ U32 next_owner_perms,
+ U32 group_perms,
+ U32 everyone_perms,
+ const std::string& display_name,
+ LLAssetStorage::LLStoreAssetCallback callback,
+ S32 expected_upload_cost,
+ void *userdata)
{
// Generate the temporary UUID.
std::string filename = gDirUtilp->getTempFilename();
@@ -809,8 +818,8 @@ void upload_new_resource(const std::string& src_filename, std::string name,
t_disp_name = src_filename;
}
upload_new_resource(tid, asset_type, name, desc, compression_info, // tid
- destination_folder_type, inv_type, next_owner_perms, group_perms, everyone_perms,
- display_name, callback, userdata);
+ destination_folder_type, inv_type, next_owner_perms, group_perms, everyone_perms,
+ display_name, callback, expected_upload_cost, userdata);
}
else
{
@@ -829,8 +838,10 @@ void upload_new_resource(const std::string& src_filename, std::string name,
void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLResourceData* data = (LLResourceData*)user_data;
+ S32 expected_upload_cost = data ? data->mExpectedUploadCost : 0;
//LLAssetType::EType pref_loc = data->mPreferredLocation;
BOOL is_balance_sufficient = TRUE;
+
if(result >= 0)
{
LLAssetType::EType dest_loc = (data->mPreferredLocation == LLAssetType::AT_NONE) ? data->mAssetInfo.mType : data->mPreferredLocation;
@@ -841,20 +852,19 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt
{
// Charge the user for the upload.
LLViewerRegion* region = gAgent.getRegion();
- S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
- if(!(can_afford_transaction(upload_cost)))
+ if(!(can_afford_transaction(expected_upload_cost)))
{
LLFloaterBuyCurrency::buyCurrency(
llformat("Uploading %s costs",
data->mAssetInfo.getName().c_str()), // *TODO: Translate
- upload_cost);
+ expected_upload_cost);
is_balance_sufficient = FALSE;
}
else if(region)
{
// Charge user for upload
- gStatusBar->debitBalance(upload_cost);
+ gStatusBar->debitBalance(expected_upload_cost);
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_MoneyTransferRequest);
@@ -865,7 +875,9 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt
msg->addUUIDFast(_PREHASH_SourceID, gAgent.getID());
msg->addUUIDFast(_PREHASH_DestID, LLUUID::null);
msg->addU8("Flags", 0);
- msg->addS32Fast(_PREHASH_Amount, upload_cost);
+ // we tell the sim how much we were expecting to pay so it
+ // can respond to any discrepancy
+ msg->addS32Fast(_PREHASH_Amount, expected_upload_cost);
msg->addU8Fast(_PREHASH_AggregatePermNextOwner, (U8)LLAggregatePermissions::AP_EMPTY);
msg->addU8Fast(_PREHASH_AggregatePermInventory, (U8)LLAggregatePermissions::AP_EMPTY);
msg->addS32Fast(_PREHASH_TransactionType, TRANS_UPLOAD_CHARGE);
@@ -921,22 +933,31 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt
LLStringUtil::stripNonprintable(asset_name);
LLStringUtil::trim(asset_name);
+ std::string display_name = LLStringUtil::null;
+ LLAssetStorage::LLStoreAssetCallback callback = NULL;
+ void *userdata = NULL;
upload_new_resource(next_file, asset_name, asset_name, // file
- 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE);
+ 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE,
+ PERM_NONE, PERM_NONE, PERM_NONE,
+ display_name,
+ callback,
+ expected_upload_cost, // assuming next in a group of uploads is of roughly the same type, i.e. same upload cost
+ userdata);
}
}
void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_type,
- std::string name,
- std::string desc, S32 compression_info,
- LLAssetType::EType destination_folder_type,
- LLInventoryType::EType inv_type,
- U32 next_owner_perms,
- U32 group_perms,
- U32 everyone_perms,
- const std::string& display_name,
- LLAssetStorage::LLStoreAssetCallback callback,
- void *userdata)
+ std::string name,
+ std::string desc, S32 compression_info,
+ LLAssetType::EType destination_folder_type,
+ LLInventoryType::EType inv_type,
+ U32 next_owner_perms,
+ U32 group_perms,
+ U32 everyone_perms,
+ const std::string& display_name,
+ LLAssetStorage::LLStoreAssetCallback callback,
+ S32 expected_upload_cost,
+ void *userdata)
{
if(gDisconnected)
{
@@ -985,6 +1006,7 @@ void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_ty
llinfos << "UUID: " << uuid << llendl;
llinfos << "Name: " << name << llendl;
llinfos << "Desc: " << desc << llendl;
+ llinfos << "Expected Upload Cost: " << expected_upload_cost << llendl;
lldebugs << "Folder: " << gInventory.findCategoryUUIDForType((destination_folder_type == LLAssetType::AT_NONE) ? asset_type : destination_folder_type) << llendl;
lldebugs << "Asset Type: " << LLAssetType::lookup(asset_type) << llendl;
std::string url = gAgent.getRegion()->getCapability("NewFileAgentInventory");
@@ -1000,6 +1022,7 @@ void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_ty
body["next_owner_mask"] = LLSD::Integer(next_owner_perms);
body["group_mask"] = LLSD::Integer(group_perms);
body["everyone_mask"] = LLSD::Integer(everyone_perms);
+ body["expected_upload_cost"] = LLSD::Integer(expected_upload_cost);
//std::ostringstream llsdxml;
//LLSDSerialize::toPrettyXML(body, llsdxml);
@@ -1016,12 +1039,11 @@ void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_ty
LLAssetType::AT_TEXTURE == asset_type ||
LLAssetType::AT_ANIMATION == asset_type)
{
- S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
S32 balance = gStatusBar->getBalance();
- if (balance < upload_cost)
+ if (balance < expected_upload_cost)
{
// insufficient funds, bail on this upload
- LLFloaterBuyCurrency::buyCurrency("Uploading costs", upload_cost);
+ LLFloaterBuyCurrency::buyCurrency("Uploading costs", expected_upload_cost);
return;
}
}
@@ -1033,6 +1055,7 @@ void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_ty
data->mAssetInfo.mCreatorID = gAgentID;
data->mInventoryType = inv_type;
data->mNextOwnerPerm = next_owner_perms;
+ data->mExpectedUploadCost = expected_upload_cost;
data->mUserData = userdata;
data->mAssetInfo.setName(name);
data->mAssetInfo.setDescription(desc);
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index 5a7aa427b4..bf21292082 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -42,30 +42,32 @@ class LLTransactionID;
void init_menu_file();
void upload_new_resource(const std::string& src_filename,
- std::string name,
- std::string desc,
- S32 compression_info,
- LLAssetType::EType destination_folder_type,
- LLInventoryType::EType inv_type,
- U32 next_owner_perms = 0x0, // PERM_NONE
- U32 group_perms = 0x0, // PERM_NONE
- U32 everyone_perms = 0x0, // PERM_NONE
- const std::string& display_name = LLStringUtil::null,
- LLAssetStorage::LLStoreAssetCallback callback = NULL,
- void *userdata = NULL);
+ std::string name,
+ std::string desc,
+ S32 compression_info,
+ LLAssetType::EType destination_folder_type,
+ LLInventoryType::EType inv_type,
+ U32 next_owner_perms,
+ U32 group_perms,
+ U32 everyone_perms,
+ const std::string& display_name,
+ LLAssetStorage::LLStoreAssetCallback callback,
+ S32 expected_upload_cost,
+ void *userdata);
void upload_new_resource(const LLTransactionID &tid,
- LLAssetType::EType type,
- std::string name,
- std::string desc,
- S32 compression_info,
- LLAssetType::EType destination_folder_type,
- LLInventoryType::EType inv_type,
- U32 next_owner_perms = 0x0, // PERM_NONE
- U32 group_perms = 0x0, // PERM_NONE
- U32 everyone_perms = 0x0, // PERM_NONE
- const std::string& display_name = LLStringUtil::null,
- LLAssetStorage::LLStoreAssetCallback callback = NULL,
- void *userdata = NULL);
+ LLAssetType::EType type,
+ std::string name,
+ std::string desc,
+ S32 compression_info,
+ LLAssetType::EType destination_folder_type,
+ LLInventoryType::EType inv_type,
+ U32 next_owner_perms,
+ U32 group_perms,
+ U32 everyone_perms,
+ const std::string& display_name,
+ LLAssetStorage::LLStoreAssetCallback callback,
+ S32 expected_upload_cost,
+ void *userdata);
#endif
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 08dbc5b3b8..c840557f01 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -73,6 +73,7 @@
#include "lldrawpool.h"
#include "llfirstuse.h"
#include "llfloateractivespeakers.h"
+#include "llfloateranimpreview.h"
#include "llfloaterbuycurrency.h"
#include "llfloaterbuyland.h"
#include "llfloaterchat.h"
@@ -133,7 +134,6 @@
#include "pipeline.h"
#include "llappviewer.h"
#include "llfloaterworldmap.h"
-#include "llkeythrottle.h"
#include "llviewerdisplay.h"
#include "llkeythrottle.h"
@@ -227,6 +227,8 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
break;
case 1:
// decline
+ // We no longer notify other viewers, but we DO still send
+ // the rejection to the simulator to delete the pending userop.
msg->newMessageFast(_PREHASH_DeclineFriendship);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
@@ -721,7 +723,7 @@ private:
//instance of the AddedObserver for TaskOffers
//and it never dies. We do this because we don't know the UUID of
//task offers until they are accepted, so we don't wouldn't
-//know what to watch for, so instead we just watch for all additions. -Gigs
+//know what to watch for, so instead we just watch for all additions.
class LLOpenTaskOffer : public LLInventoryAddedObserver
{
protected:
@@ -797,7 +799,7 @@ protected:
//Returns TRUE if we are OK, FALSE if we are throttled
//Set check_only true if you want to know the throttle status
-//without registering a hit -Gigs
+//without registering a hit
bool check_offer_throttle(const std::string& from_name, bool check_only)
{
static U32 throttle_count;
@@ -824,14 +826,14 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
{
LL_DEBUGS("Messaging") << "Throttle Not Expired, Count: " << throttle_count << LL_ENDL;
// When downloading the initial inventory we get a lot of new items
- // coming in and can't tell that from spam. JC
+ // coming in and can't tell that from spam.
if (LLStartUp::getStartupState() >= STATE_STARTED
&& throttle_count >= OFFER_THROTTLE_MAX_COUNT)
{
if (!throttle_logged)
{
// Use the name of the last item giver, who is probably the person
- // spamming you. JC
+ // spamming you.
std::ostringstream message;
message << LLAppViewer::instance()->getSecondLifeTitle();
if (!from_name.empty())
@@ -879,10 +881,10 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
}
LLAssetType::EType asset_type = item->getType();
- //if we are throttled, don't display them - Gigs
+ //if we are throttled, don't display them
if (check_offer_throttle(from_name, false))
{
- // I'm not sure this is a good idea. JC
+ // I'm not sure this is a good idea.
bool show_keep_discard = item->getPermissions().getCreator() != gAgent.getID();
//bool show_keep_discard = true;
switch(asset_type)
@@ -934,7 +936,7 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
return;
}
- //Not sure about this check. Could make it easy to miss incoming items. -Gigs
+ //Not sure about this check. Could make it easy to miss incoming items.
//don't dick with highlight while the user is working
//if(inventory_has_focus && !user_is_away)
// break;
@@ -1037,7 +1039,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
// This must be done here because:
// * callback may be called immediately,
// * adding the mute sends a message,
- // * we can't build two messages at once. JC
+ // * we can't build two messages at once.
if (2 == button)
{
gCacheName->get(mFromID, mFromGroup, inventory_offer_mute_callback, this);
@@ -1301,7 +1303,7 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
}
// Name cache callbacks don't store userdata, so can't save
- // off the LLOfferInfo. Argh. JC
+ // off the LLOfferInfo. Argh.
BOOL name_found = FALSE;
if (info->mFromGroup)
{
@@ -1948,6 +1950,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
<< LLURI::mapToQueryString(query_string);
chat.mURL = link.str();
+ chat.mText = name + separator_string + message.substr(message_offset);
// Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because
// IMs from objcts don't open IM sessions.
@@ -2092,11 +2095,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
break;
- case IM_FRIENDSHIP_DECLINED:
- args["NAME"] = name;
- LLNotifications::instance().add("FriendshipDeclined", args);
- break;
-
+ case IM_FRIENDSHIP_DECLINED_DEPRECATED:
default:
LL_WARNS("Messaging") << "Instant message calling for unknown dialog "
<< (S32)dialog << LL_ENDL;
@@ -2769,7 +2768,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
if (!avatarp)
{
// Could happen if you were immediately god-teleported away on login,
- // maybe other cases. Continue, but warn. JC
+ // maybe other cases. Continue, but warn.
LL_WARNS("Messaging") << "agent_movement_complete() with NULL avatarp." << LL_ENDL;
}
@@ -2809,7 +2808,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
if( is_teleport )
{
- // Force the camera back onto the agent, don't animate. JC
+ // Force the camera back onto the agent, don't animate.
gAgent.setFocusOnAvatar(TRUE, FALSE);
gAgent.slamLookAt(look_at);
gAgent.updateCamera();
@@ -4261,7 +4260,7 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use
{
if (gAgent.inPrelude())
{
- // JC: In prelude, bumping is OK. This dialog is rather confusing to
+ // In prelude, bumping is OK. This dialog is rather confusing to
// newbies, so we don't show it. Drop the packet on the floor.
return;
}
@@ -4336,7 +4335,11 @@ void process_economy_data(LLMessageSystem *msg, void** /*user_data*/)
LLGlobalEconomy::processEconomyData(msg, LLGlobalEconomy::Singleton::getInstance());
S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
+
+ LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is L$" << upload_cost << LL_ENDL;
+
LLFloaterImagePreview::setUploadAmount(upload_cost);
+ LLFloaterAnimPreview::setUploadAmount(upload_cost);
gMenuHolder->childSetLabelArg("Upload Image", "[COST]", llformat("%d", upload_cost));
gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", llformat("%d", upload_cost));
@@ -4521,14 +4524,26 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
msg->getStringFast(_PREHASH_Data, _PREHASH_ObjectOwner, owner_name);
msg->getS32Fast(_PREHASH_Data, _PREHASH_Questions, questions );
- // don't display permission requests if this object is muted - JS.
+ // Special case. If the objects are owned by this agent, throttle per-object instead
+ // of per-owner. It's common for residents to reset a ton of scripts that re-request
+ // permissions, as with tier boxes. UUIDs can't be valid agent names and vice-versa,
+ // so we'll reuse the same namespace for both throttle types.
+ std::string throttle_name = owner_name;
+ std::string self_name;
+ gAgent.getName( self_name );
+ if( owner_name == self_name )
+ {
+ throttle_name = taskid.getString();
+ }
+
+ // don't display permission requests if this object is muted
if (LLMuteList::getInstance()->isMuted(taskid)) return;
-
+
// throttle excessive requests from any specific user's scripts
typedef LLKeyThrottle<std::string> LLStringThrottle;
static LLStringThrottle question_throttle( LLREQUEST_PERMISSION_THROTTLE_LIMIT, LLREQUEST_PERMISSION_THROTTLE_INTERVAL );
- switch (question_throttle.noteAction(owner_name))
+ switch (question_throttle.noteAction(throttle_name))
{
case LLStringThrottle::THROTTLE_NEWLY_BLOCKED:
LL_INFOS("Messaging") << "process_script_question throttled"
@@ -5426,7 +5441,7 @@ void invalid_message_callback(LLMessageSystem* msg,
}
// Please do not add more message handlers here. This file is huge.
-// Put them in a file related to the functionality you are implementing. JC
+// Put them in a file related to the functionality you are implementing.
void LLOfferInfo::forceResponse(InventoryOfferResponse response)
{
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 1b4517372d..07569a5e54 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -58,6 +58,7 @@
#include "llviewerwindow.h" // *TODO: remove, only used for width/height
#include "llworld.h"
#include "llfeaturemanager.h"
+#include "llviewernetwork.h"
#if LL_LCD_COMPILE
#include "lllcd.h"
#endif
@@ -662,7 +663,7 @@ void send_stats()
time(&ltime);
F32 run_time = F32(LLFrameTimer::getElapsedSeconds());
- agent["start_time"] = ltime - run_time;
+ agent["start_time"] = S32(ltime - S32(run_time));
// The first stat set must have a 0 run time if it doesn't actually
// contain useful data in terms of FPS, etc. We use half the
@@ -701,7 +702,11 @@ void send_stats()
system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB();
system["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
system["cpu"] = gSysCPU.getCPUString();
-
+ std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x",
+ gMACAddress[0],gMACAddress[1],gMACAddress[2],
+ gMACAddress[3],gMACAddress[4],gMACAddress[5]);
+ system["mac_address"] = macAddressString;
+ system["serial_number"] = LLAppViewer::instance()->getSerialNumber();
std::string gpu_desc = llformat(
"%-6s Class %d ",
gGLManager.mGLVendorShort.substr(0,6).c_str(),
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 597513ba0c..4f2504fc17 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3216,69 +3216,69 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
(is_away != mNameAway || is_busy != mNameBusy || is_muted != mNameMute)
|| is_appearance != mNameAppearance)
{
- char line[MAX_STRING]; /* Flawfinder: ignore */
+ std::string line;
if (!sRenderGroupTitles)
{
// If all group titles are turned off, stack first name
// on a line above last name
- strncpy(line, firstname->getString(), MAX_STRING -1 ); /* Flawfinder: ignore */
- line[MAX_STRING -1] = '\0';
- strcat(line, "\n");
+ line += firstname->getString();
+ line += "\n";
}
else if (title && title->getString() && title->getString()[0] != '\0')
{
- strncpy(line, title->getString(), MAX_STRING -1 ); /* Flawfinder: ignore */
- line[MAX_STRING -1] = '\0';
- strcat(line, "\n"); /* Flawfinder: ignore */
- strncat(line, firstname->getString(), MAX_STRING - strlen(line) -1 ); /* Flawfinder: ignore */
+ line += title->getString();
+ LLStringFn::replace_ascii_controlchars(line,LL_UNKNOWN_CHAR);
+ line += "\n";
+ line += firstname->getString();
}
else
{
- strncpy(line, firstname->getString(), MAX_STRING -1 ); /* Flawfinder: ignore */
- line[MAX_STRING -1] = '\0';
+ line += firstname->getString();
}
- strcat(line, " "); /* Flawfinder: ignore */
- strncat(line, lastname->getString(), MAX_STRING - strlen(line) -1); /* Flawfinder: ignore */
+ line += " ";
+ line += lastname->getString();
BOOL need_comma = FALSE;
if (is_away || is_muted || is_busy)
{
- strcat(line, " ("); /* Flawfinder: ignore */
+ line += " (";
if (is_away)
{
- strcat(line, "Away"); /* Flawfinder: ignore */
+ line += "Away";
need_comma = TRUE;
}
if (is_busy)
{
if (need_comma)
{
- strcat(line, ", "); /* Flawfinder: ignore */
+ line += ", ";
}
- strcat(line, "Busy"); /* Flawfinder: ignore */
+ line += "Busy";
need_comma = TRUE;
}
if (is_muted)
{
if (need_comma)
{
- strcat(line, ", "); /* Flawfinder: ignore */
+ line += ", ";
}
- strcat(line, "Muted"); /* Flawfinder: ignore */
+ line += "Muted";
need_comma = TRUE;
}
- strcat(line,")"); /* Flawfinder: ignore */
+ line += ")";
}
if (is_appearance)
{
- strcat(line, "\n(Editing Appearance)"); /* Flawfinder: ignore */
+ line += "\n";
+ line += "(Editing Appearance)";
}
mNameAway = is_away;
mNameBusy = is_busy;
mNameMute = is_muted;
mNameAppearance = is_appearance;
mTitle = title ? title->getString() : "";
+ LLStringFn::replace_ascii_controlchars(mTitle,LL_UNKNOWN_CHAR);
mNameString = utf8str_to_wstring(line);
new_name = TRUE;
}
@@ -3915,7 +3915,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
// Generate footstep sounds when feet hit the ground
//-------------------------------------------------------------------------
const LLUUID AGENT_FOOTSTEP_ANIMS[] = {ANIM_AGENT_WALK, ANIM_AGENT_RUN, ANIM_AGENT_LAND};
- const S32 NUM_AGENT_FOOTSTEP_ANIMS = sizeof(AGENT_FOOTSTEP_ANIMS) / sizeof(LLUUID);
+ const S32 NUM_AGENT_FOOTSTEP_ANIMS = LL_ARRAY_SIZE(AGENT_FOOTSTEP_ANIMS);
if ( gAudiop && isAnyAnimationSignaled(AGENT_FOOTSTEP_ANIMS, NUM_AGENT_FOOTSTEP_ANIMS) )
{
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 6a6064e0a2..1a4f28a8aa 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -863,7 +863,7 @@ LLVoiceClient::LLVoiceClient()
// This now happens when init() is called instead.
mPump = NULL;
-#if LL_DARWIN || LL_LINUX
+#if LL_DARWIN || LL_LINUX || LL_SOLARIS
// MBW -- XXX -- THIS DOES NOT BELONG HERE
// When the vivox daemon dies, the next write attempt on our socket generates a SIGPIPE, which kills us.
// This should cause us to ignore SIGPIPE and handle the error through proper channels.
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index 1cb5ee7754..ea9c00ae81 100644
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -69,7 +69,7 @@ LLWLParamSet::LLWLParamSet(void) :
std::make_pair("gamma", LLVector4(2.0f, 2.0f, 2.0f, 0.0f)),
};
std::map<std::string, LLVector4>::value_type const * endHardcodedPreset =
- hardcodedPreset + sizeof(hardcodedPreset)/sizeof(hardcodedPreset[0]);
+ hardcodedPreset + LL_ARRAY_SIZE(hardcodedPreset);
mParamValues.insert(hardcodedPreset, endHardcodedPreset);
*/
diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp
index e01e595747..4d46ff19cc 100644
--- a/indra/newview/llworldmap.cpp
+++ b/indra/newview/llworldmap.cpp
@@ -49,6 +49,13 @@
const F32 REQUEST_ITEMS_TIMER = 10.f * 60.f; // 10 minutes
+// For DEV-17507, do lazy image loading in llworldmapview.cpp instead,
+// limiting requests to currently visible regions and minimizing the
+// number of textures being requested simultaneously.
+//
+// Uncomment IMMEDIATE_IMAGE_LOAD to restore the old behavior
+//
+//#define IMMEDIATE_IMAGE_LOAD
LLItemInfo::LLItemInfo(F32 global_x, F32 global_y,
const std::string& name,
LLUUID id,
@@ -611,13 +618,17 @@ void LLWorldMap::processMapBlockReply(LLMessageSystem* msg, void**)
siminfo->mRegionFlags = region_flags;
siminfo->mWaterHeight = (F32) water_height;
siminfo->mMapImageID[agent_flags] = image_id;
+#ifdef IMMEDIATE_IMAGE_LOAD
siminfo->mCurrentImage = gImageList.getImage(siminfo->mMapImageID[LLWorldMap::getInstance()->mCurrentMap], MIPMAP_TRUE, FALSE);
gGL.getTexUnit(0)->bind(siminfo->mCurrentImage.get());
siminfo->mCurrentImage->setClamp(TRUE, TRUE);
+#endif
if (siminfo->mMapImageID[2].notNull())
{
+#ifdef IMMEDIATE_IMAGE_LOAD
siminfo->mOverlayImage = gImageList.getImage(siminfo->mMapImageID[2], MIPMAP_TRUE, FALSE);
+#endif
}
else
{
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 685ca8bba5..1cf8755e62 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -61,6 +61,7 @@
#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "llworldmap.h"
+#include "lltexturefetch.h"
#include "llappviewer.h" // Only for constants!
#include "lltrans.h"
@@ -422,30 +423,24 @@ void LLWorldMapView::draw()
F32 sim_alpha = 1.f;
// Draw one image per region, centered on the camera position.
+ const S32 MAX_SIMULTANEOUS_TEX = 100;
+ const S32 MAX_REQUEST_PER_TICK = 5;
+ const S32 MIN_REQUEST_PER_TICK = 1;
+ S32 textures_requested_this_tick = 0;
+
for (LLWorldMap::sim_info_map_t::iterator it = LLWorldMap::getInstance()->mSimInfoMap.begin();
it != LLWorldMap::getInstance()->mSimInfoMap.end(); ++it)
{
U64 handle = (*it).first;
LLSimInfo* info = (*it).second;
- if (info->mCurrentImage.isNull())
- {
- info->mCurrentImage = gImageList.getImage(info->mMapImageID[LLWorldMap::getInstance()->mCurrentMap], MIPMAP_TRUE, FALSE);
- }
- if (info->mOverlayImage.isNull() && info->mMapImageID[2].notNull())
- {
- info->mOverlayImage = gImageList.getImage(info->mMapImageID[2], MIPMAP_TRUE, FALSE);
- gGL.getTexUnit(0)->bind(info->mOverlayImage.get());
- info->mOverlayImage->setClamp(TRUE, TRUE);
- }
-
LLViewerImage* simimage = info->mCurrentImage;
LLViewerImage* overlayimage = info->mOverlayImage;
if (gMapScale < SIM_MAP_SCALE)
{
- simimage->setBoostLevel(0);
- if (overlayimage) overlayimage->setBoostLevel(0);
+ if (simimage != NULL) simimage->setBoostLevel(0);
+ if (overlayimage != NULL) overlayimage->setBoostLevel(0);
continue;
}
@@ -476,6 +471,7 @@ void LLWorldMapView::draw()
bool sim_visible =
(gMapScale >= map_scale_cutoff) &&
+ (simimage != NULL) &&
(simimage->getHasGLTexture());
if (sim_visible)
@@ -502,11 +498,38 @@ void LLWorldMapView::draw()
right < 0.f ||
left > width )
{
- simimage->setBoostLevel(0);
- if (overlayimage) overlayimage->setBoostLevel(0);
+ if (simimage != NULL) simimage->setBoostLevel(0);
+ if (overlayimage != NULL) overlayimage->setBoostLevel(0);
continue;
}
+ if (info->mCurrentImage.isNull())
+ {
+ if ((textures_requested_this_tick < MIN_REQUEST_PER_TICK) ||
+ ((LLAppViewer::getTextureFetch()->getNumRequests() < MAX_SIMULTANEOUS_TEX) &&
+ (textures_requested_this_tick < MAX_REQUEST_PER_TICK)))
+ {
+ textures_requested_this_tick++;
+ info->mCurrentImage = gImageList.getImage(info->mMapImageID[LLWorldMap::getInstance()->mCurrentMap], MIPMAP_TRUE, FALSE);
+ info->mCurrentImage->setClamp(TRUE, TRUE);
+ simimage = info->mCurrentImage;
+ gGL.getTexUnit(0)->bind(simimage);
+ }
+ }
+ if (info->mOverlayImage.isNull() && info->mMapImageID[2].notNull())
+ {
+ if ((textures_requested_this_tick < MIN_REQUEST_PER_TICK) ||
+ ((LLAppViewer::getTextureFetch()->getNumRequests() < MAX_SIMULTANEOUS_TEX) &&
+ (textures_requested_this_tick < MAX_REQUEST_PER_TICK)))
+ {
+ textures_requested_this_tick++;
+ info->mOverlayImage = gImageList.getImage(info->mMapImageID[2], MIPMAP_TRUE, FALSE);
+ info->mOverlayImage->setClamp(TRUE, TRUE);
+ overlayimage = info->mOverlayImage;
+ gGL.getTexUnit(0)->bind(overlayimage);
+ }
+ }
+
mVisibleRegions.push_back(handle);
// See if the agents need updating
if (current_time - info->mAgentsUpdateTime > AGENTS_UPDATE_TIME)
@@ -521,10 +544,13 @@ void LLWorldMapView::draw()
center_global.mdV[VY] += 128.0;
S32 draw_size = llround(gMapScale);
- simimage->setBoostLevel(LLViewerImage::BOOST_MAP);
- simimage->setKnownDrawSize(llround(draw_size * LLUI::sGLScaleFactor.mV[VX]), llround(draw_size * LLUI::sGLScaleFactor.mV[VY]));
+ if (simimage != NULL)
+ {
+ simimage->setBoostLevel(LLViewerImage::BOOST_MAP);
+ simimage->setKnownDrawSize(llround(draw_size * LLUI::sGLScaleFactor.mV[VX]), llround(draw_size * LLUI::sGLScaleFactor.mV[VY]));
+ }
- if (overlayimage)
+ if (overlayimage != NULL)
{
overlayimage->setBoostLevel(LLViewerImage::BOOST_MAP);
overlayimage->setKnownDrawSize(llround(draw_size * LLUI::sGLScaleFactor.mV[VX]), llround(draw_size * LLUI::sGLScaleFactor.mV[VY]));
@@ -537,7 +563,8 @@ void LLWorldMapView::draw()
// Draw using the texture. If we don't clamp we get artifact at
// the edge.
LLGLSUIDefault gls_ui;
- gGL.getTexUnit(0)->bind(simimage);
+ if (simimage != NULL)
+ gGL.getTexUnit(0)->bind(simimage);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
F32 alpha = sim_alpha * info->mAlpha;
@@ -663,7 +690,8 @@ void LLWorldMapView::draw()
// If map texture is still loading,
// display "Loading" placeholder text.
- if (simimage->getDiscardLevel() != 1 &&
+ if ((simimage != NULL) &&
+ simimage->getDiscardLevel() != 1 &&
simimage->getDiscardLevel() != 0)
{
font->renderUTF8(
@@ -1658,43 +1686,59 @@ BOOL LLWorldMapView::handleMouseUp( S32 x, S32 y, MASK mask )
return FALSE;
}
-void LLWorldMapView::updateBlock(S32 block_x, S32 block_y)
+U32 LLWorldMapView::updateBlock(S32 block_x, S32 block_y)
{
+ U32 blocks_requested = 0;
S32 offset = block_x | (block_y * MAP_BLOCK_RES);
if (!LLWorldMap::getInstance()->mMapBlockLoaded[LLWorldMap::getInstance()->mCurrentMap][offset])
{
// llinfos << "Loading Block (" << block_x << "," << block_y << ")" << llendl;
LLWorldMap::getInstance()->sendMapBlockRequest(block_x << 3, block_y << 3, (block_x << 3) + 7, (block_y << 3) + 7);
LLWorldMap::getInstance()->mMapBlockLoaded[LLWorldMap::getInstance()->mCurrentMap][offset] = TRUE;
+ blocks_requested++;
}
+ return blocks_requested;
}
-void LLWorldMapView::updateVisibleBlocks()
+U32 LLWorldMapView::updateVisibleBlocks()
{
if (gMapScale < SIM_MAP_SCALE)
{
// We don't care what is loaded if we're zoomed out
- return;
+ return 0;
}
- // check if we've loaded the 9 potentially visible zones
- LLVector3d camera_global = gAgent.getCameraPositionGlobal();
+ LLVector3d camera_global = gAgent.getCameraPositionGlobal();
+
+ F32 pixels_per_region = gMapScale;
+ const S32 width = getRect().getWidth();
+ const S32 height = getRect().getHeight();
// Convert pan to sim coordinates
- S32 world_center_x = S32((-sPanX / gMapScale) + (camera_global.mdV[0] / REGION_WIDTH_METERS));
- S32 world_center_y = S32((-sPanY / gMapScale) + (camera_global.mdV[1] / REGION_WIDTH_METERS));
-
+ S32 world_center_x_lo = S32(((-sPanX - width/2) / pixels_per_region) + (camera_global.mdV[0] / REGION_WIDTH_METERS));
+ S32 world_center_x_hi = S32(((-sPanX + width/2) / pixels_per_region) + (camera_global.mdV[0] / REGION_WIDTH_METERS));
+ S32 world_center_y_lo = S32(((-sPanY - height/2) / pixels_per_region) + (camera_global.mdV[1] / REGION_WIDTH_METERS));
+ S32 world_center_y_hi = S32(((-sPanY + height/2)/ pixels_per_region) + (camera_global.mdV[1] / REGION_WIDTH_METERS));
+
// Find the corresponding 8x8 block
- S32 world_block_x = world_center_x >> 3;
- S32 world_block_y = world_center_y >> 3;
+ S32 world_block_x_lo = world_center_x_lo >> 3;
+ S32 world_block_x_hi = world_center_x_hi >> 3;
+ S32 world_block_y_lo = world_center_y_lo >> 3;
+ S32 world_block_y_hi = world_center_y_hi >> 3;
+
+ U32 blocks_requested = 0;
+ const U32 max_blocks_requested = 9;
- for (S32 block_x = llmax(world_block_x-1, 0); block_x <= llmin(world_block_x+1, MAP_BLOCK_RES-1); ++block_x)
+ for (S32 block_x = llmax(world_block_x_lo, 0); block_x <= llmin(world_block_x_hi, MAP_BLOCK_RES-1); ++block_x)
{
- for (S32 block_y = llmax(world_block_y-1, 0); block_y <= llmin(world_block_y+1, MAP_BLOCK_RES-1); ++block_y)
+ for (S32 block_y = llmax(world_block_y_lo, 0); block_y <= llmin(world_block_y_hi, MAP_BLOCK_RES-1); ++block_y)
{
- updateBlock(block_x, block_y);
+ blocks_requested += updateBlock(block_x, block_y);
+ if (blocks_requested >= max_blocks_requested)
+ return blocks_requested;
}
}
-}
+ return blocks_requested;
+}
BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask )
{
diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h
index 566468fa0c..980ddf9c73 100644
--- a/indra/newview/llworldmapview.h
+++ b/indra/newview/llworldmapview.h
@@ -127,8 +127,9 @@ public:
static void clearLastClick() { sHandledLastClick = FALSE; }
// if the view changes, download additional sim info as needed
- void updateBlock(S32 block_x, S32 block_y);
- void updateVisibleBlocks();
+ // return value is number of blocks newly requested.
+ U32 updateBlock(S32 block_x, S32 block_y);
+ U32 updateVisibleBlocks();
protected:
void setDirectionPos( LLTextBox* text_box, F32 rotation );
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 0a7dd17ef5..a2fd0f0d9c 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -414,7 +414,7 @@ void LLXMLRPCTransaction::Impl::setStatus(Status status,
default:
// Usually this means that there's a problem with the login server,
- // not with the client. Direct user to status page. JC
+ // not with the client. Direct user to status page.
mStatusMessage =
"Despite our best efforts, something unexpected has gone wrong. \n"
" \n"
diff --git a/indra/newview/res/bitmap2.bmp b/indra/newview/res/bitmap2.bmp
deleted file mode 100644
index 770b07558c..0000000000
--- a/indra/newview/res/bitmap2.bmp
+++ /dev/null
Binary files differ
diff --git a/indra/newview/res/loginbackground.bmp b/indra/newview/res/loginbackground.bmp
deleted file mode 100644
index 288a0b0398..0000000000
--- a/indra/newview/res/loginbackground.bmp
+++ /dev/null
Binary files differ
diff --git a/indra/newview/res/resource.h b/indra/newview/res/resource.h
index 1a1ace82ae..da27e47dfb 100644
--- a/indra/newview/res/resource.h
+++ b/indra/newview/res/resource.h
@@ -36,17 +36,9 @@
#define IDREMOVE 3
#define IDI_LL_ICON 103
#define IDC_GRABHAND 104
-#define IDR_MENU1 112
-#define IDD_DIALOG1 113
-#define IDI_INSTALL_ICON 133
#define IDC_CURSOR1 134
#define IDC_CURSOR2 136
-#define IDB_BITMAP1 138
-#define IDB_BITMAP2 140
-#define IDB_BITMAP3 144
#define IDC_CURSOR3 147
-#define IDB_BITMAP4 148
-#define IDB_BITMAP5 149
#define IDB_LOGIN 149
#define IDC_CURSOR4 153
#define IDC_CURSOR5 154
diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc
index b360871f20..908c4e1da3 100644
--- a/indra/newview/res/viewerRes.rc
+++ b/indra/newview/res/viewerRes.rc
@@ -62,7 +62,6 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_LL_ICON ICON "ll_icon.ico"
-IDI_INSTALL_ICON ICON "install_icon.ico"
IDI_LCD_LL_ICON ICON "icon1.ico"
/////////////////////////////////////////////////////////////////////////////
@@ -70,55 +69,6 @@ IDI_LCD_LL_ICON ICON "icon1.ico"
// Dialog
//
-CONNECTBOX DIALOGEX 32, 32, 187, 246
-STYLE DS_SETFONT | DS_SETFOREGROUND | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
- WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-FONT 8, "MS Sans Serif", 0, 0, 0x0
-BEGIN
- CONTROL 149,IDC_STATIC,"Static",SS_BITMAP,0,0,187,246
- EDITTEXT IDC_EDIT_FIRSTNAME,9,180,80,13,ES_AUTOHSCROLL
- EDITTEXT IDC_EDIT_LASTNAME,98,180,80,13,ES_AUTOHSCROLL
- EDITTEXT IDC_EDIT_PASSWORD,9,210,80,13,ES_PASSWORD |
- ES_AUTOHSCROLL
- CONTROL "Remember password",IDC_REMEMBER_PASSWORD,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,9,229,80,10
- DEFPUSHBUTTON "Connect...",IDOK,98,210,80,13
- CONTROL "Full screen",IDC_FULL_SCREEN,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,100,229,50,10
- COMBOBOX IDC_COMBO_SERVER,98,6,84,30,CBS_DROPDOWNLIST | CBS_SORT |
- WS_VSCROLL | WS_TABSTOP
-END
-
-CONNECTBOXIP DIALOG 32, 32, 282, 174
-STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP |
- WS_VISIBLE
-FONT 8, "MS Sans Serif"
-BEGIN
- LTEXT "First name:",IDC_STATIC_FIRSTNAME,152,24,36,10,NOT
- WS_GROUP
- EDITTEXT IDC_EDIT_FIRSTNAME,152,37,58,13,ES_AUTOHSCROLL
- LTEXT "Last name:",IDC_STATIC_LASTNAME,218,24,38,10,NOT
- WS_GROUP
- EDITTEXT IDC_EDIT_LASTNAME,218,37,57,13,ES_AUTOHSCROLL
- LTEXT "Password:",IDC_STATIC_PASSWORD,152,55,38,10
- EDITTEXT IDC_EDIT_PASSWORD,152,71,123,13,ES_PASSWORD |
- ES_AUTOHSCROLL
- CONTROL "Remember password for next time",IDC_REMEMBER_PASSWORD,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,152,84,123,10
- LTEXT "Return to:",IDC_STATIC,152,97,32,8
- CONTROL "Last location",IDC_RADIO_LAST,"Button",
- BS_AUTORADIOBUTTON | WS_TABSTOP,152,109,56,10
- CONTROL "Home",IDC_RADIO_HOME,"Button",BS_AUTORADIOBUTTON |
- WS_TABSTOP,218,109,35,10
- LTEXT "Server:",IDC_STATIC_SERVER,152,119,38,10,NOT WS_GROUP
- COMBOBOX IDC_COMBO_SERVER,152,134,88,43,CBS_DROPDOWN | WS_VSCROLL |
- WS_TABSTOP
- PUSHBUTTON "Quit",IDCANCEL,152,152,50,14
- DEFPUSHBUTTON "Connect...",IDOK,225,152,50,14
- CONTROL 140,IDB_BITMAP1,"Static",SS_BITMAP,8,7,133,157
- LTEXT "Connect to Second Life",IDC_STATIC,152,7,78,8
-END
-
SPLASHSCREEN DIALOG 32, 32, 144, 34
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE
FONT 8, "MS Sans Serif"
@@ -136,35 +86,6 @@ END
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
- "CONNECTBOX", DIALOG
- BEGIN
- LEFTMARGIN, 8
- RIGHTMARGIN, 180
- VERTGUIDE, 152
- TOPMARGIN, 7
- BOTTOMMARGIN, 239
- HORZGUIDE, 44
- HORZGUIDE, 57
- HORZGUIDE, 123
- END
-
- "CONNECTBOXIP", DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 275
- VERTGUIDE, 152
- VERTGUIDE, 218
- TOPMARGIN, 7
- BOTTOMMARGIN, 166
- HORZGUIDE, 12
- HORZGUIDE, 17
- HORZGUIDE, 24
- HORZGUIDE, 50
- HORZGUIDE, 55
- HORZGUIDE, 84
- HORZGUIDE, 105
- HORZGUIDE, 119
- END
"SPLASHSCREEN", DIALOG
BEGIN
@@ -180,20 +101,6 @@ END
/////////////////////////////////////////////////////////////////////////////
//
-// Menu
-//
-
-IDR_MENU1 MENU
-BEGIN
- POPUP "testmenu"
- BEGIN
- MENUITEM "test", ID_TESTMENU_TEST
- END
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
// Cursor
//
@@ -269,8 +176,6 @@ END
// Bitmap
//
-IDB_BITMAP2 BITMAP "bitmap2.bmp"
-IDB_LOGIN BITMAP "loginbackground.bmp"
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/skins/default/xui/de/floater_preview_gesture.xml b/indra/newview/skins/default/xui/de/floater_preview_gesture.xml
index da385b72d6..327d0b70f1 100644
--- a/indra/newview/skins/default/xui/de/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/de/floater_preview_gesture.xml
@@ -30,14 +30,12 @@
<text name="steps_label">
Schritte:
</text>
- <!-- Revert translations as interim fix to VWR-9985 while the code is not properly internationalized
<scroll_list name="library_list">
Animation
Ton
Chat
Warten
</scroll_list>
- -->
<button label="Hinzufügen &gt;&gt;" name="add_btn"/>
<button label="Nach oben" name="up_btn"/>
<button label="Nach unten" name="down_btn"/>
diff --git a/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml b/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml
index 3f7d0973b9..6c373030ad 100644
--- a/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml
@@ -33,14 +33,12 @@
<text name="steps_label">
Étapes :
</text>
- <!-- Revert translations as interim fix to VWR-9985 while the code is not properly internationalized
<scroll_list name="library_list">
Animation
Son
Chat
Attendre
</scroll_list>
- -->
<button label="Ajouter &gt;&gt;" name="add_btn" />
<button label="Monter" name="up_btn" />
<button label="Descendre" name="down_btn" />
diff --git a/indra/newview/skins/default/xui/ja/floater_preview_gesture.xml b/indra/newview/skins/default/xui/ja/floater_preview_gesture.xml
index 61665a124a..177895f44e 100644
--- a/indra/newview/skins/default/xui/ja/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/ja/floater_preview_gesture.xml
@@ -30,14 +30,12 @@
<text name="steps_label">
手順:
</text>
- <!-- Revert translations as interim fix to VWR-9985 while the code is not properly internationalized
<scroll_list name="library_list">
アニメーション
サウンド
チャット
待機
</scroll_list>
- -->
<button label="追加>>" name="add_btn"/>
<button label="上に移動" name="up_btn"/>
<button label="下に移動" name="down_btn"/>
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index be17f1f390..f72e4a8b7c 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -171,7 +171,7 @@ class WindowsManifest(ViewerManifest):
'../../libraries/i686-win32/lib/release/llkdu.dll'),
dst='llkdu.dll')
except:
- print "Skipping llkdu,.dll"
+ print "Skipping llkdu.dll"
self.path(src="licenses-win32.txt", dst="licenses.txt")
self.path("featuretable.txt")
@@ -578,13 +578,6 @@ class LinuxManifest(ViewerManifest):
def package_finish(self):
- # stripping all the libs removes a few megabytes from the end-user package
- for s,d in self.file_list:
- if re.search("lib/lib.+\.so.*", d):
- self.run_command('strip -S %s' % d)
- if re.search("app_settings/mozilla-runtime-.*/lib.+\.so.*", d):
- self.run_command('strip %s' % d)
-
if 'installer_name' in self.args:
installer_name = self.args['installer_name']
else:
@@ -628,6 +621,17 @@ class LinuxManifest(ViewerManifest):
class Linux_i686Manifest(LinuxManifest):
def construct(self):
super(Linux_i686Manifest, self).construct()
+
+ # install either the libllkdu we just built, or a prebuilt one, in
+ # decreasing order of preference. for linux package, this goes to bin/
+ try:
+ self.path(self.find_existing_file(
+ '../llkdu/libllkdu.so',
+ '../../libraries/i686-linux/lib_release_client/libllkdu.so'),
+ dst='bin/libllkdu.so')
+ except:
+ print "Skipping libllkdu.so - not found"
+
self.path("secondlife-stripped","bin/do-not-directly-run-secondlife-bin")
self.path("../linux_crash_logger/linux-crash-logger-stripped","linux-crash-logger.bin")
self.path("linux_tools/launch_url.sh","launch_url.sh")
@@ -642,7 +646,7 @@ class Linux_i686Manifest(LinuxManifest):
self.path("app_settings/mozilla-runtime-linux-i686")
if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"):
- self.path("libkdu_v42R.so")
+ self.path("libkdu_v42R.so", "libkdu.so")
self.path("libfmod-3.75.so")
self.path("libapr-1.so.0")
self.path("libaprutil-1.so.0")
@@ -650,12 +654,10 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libcrypto.so.0.9.7")
self.path("libexpat.so.1")
self.path("libssl.so.0.9.7")
- self.path("libstdc++.so.6")
self.path("libuuid.so", "libuuid.so.1")
self.path("libSDL-1.2.so.0")
self.path("libELFIO.so")
- self.path("libopenjpeg.so.2")
- self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason
+ self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3")
self.path("libalut.so")
self.path("libopenal.so", "libopenal.so.1")
self.end_prefix("lib")