summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp6
-rw-r--r--indra/newview/lldrawpoolterrain.cpp17
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp25
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp6
-rw-r--r--indra/newview/llfloaterimsessiontab.h2
-rw-r--r--indra/newview/llstartup.cpp15
-rw-r--r--indra/newview/llviewertexturelist.cpp27
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml1
8 files changed, 68 insertions, 31 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b6d02ea2f8..6bc1f67e32 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3438,6 +3438,12 @@ std::string LLAppViewer::getViewerInfoString() const
{
support << '\n' << LLTrans::getString("AboutTraffic", args);
}
+
+ // SLT timestamp
+ LLSD substitution;
+ substitution["datetime"] = (S32)time(NULL);//(S32)time_corrected();
+ support << "\n" << LLTrans::getString("AboutTime", substitution);
+
return support.str();
}
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 33675bd261..b716a76543 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -62,28 +62,15 @@ LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) :
LLFacePool(POOL_TERRAIN),
mTexturep(texturep)
{
- U32 format = GL_ALPHA8;
- U32 int_format = GL_ALPHA;
-
// Hack!
sDetailScale = 1.f/gSavedSettings.getF32("RenderTerrainScale");
sDetailMode = gSavedSettings.getS32("RenderTerrainDetail");
- mAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient.tga",
- FTT_LOCAL_FILE,
- TRUE, LLGLTexture::BOOST_UI,
- LLViewerTexture::FETCHED_TEXTURE,
- format, int_format,
- LLUUID("e97cf410-8e61-7005-ec06-629eba4cd1fb"));
+ mAlphaRampImagep = LLViewerTextureManager::getFetchedTexture(IMG_ALPHA_GRAD);
//gGL.getTexUnit(0)->bind(mAlphaRampImagep.get());
mAlphaRampImagep->setAddressMode(LLTexUnit::TAM_CLAMP);
- m2DAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient_2d.j2c",
- FTT_LOCAL_FILE,
- TRUE, LLGLTexture::BOOST_UI,
- LLViewerTexture::FETCHED_TEXTURE,
- format, int_format,
- LLUUID("38b86f85-2575-52a9-a531-23108d8da837"));
+ m2DAlphaRampImagep = LLViewerTextureManager::getFetchedTexture(IMG_ALPHA_GRAD_2D);
//gGL.getTexUnit(0)->bind(m2DAlphaRampImagep.get());
m2DAlphaRampImagep->setAddressMode(LLTexUnit::TAM_CLAMP);
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 1f85c5ac1b..9fd731ed56 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -601,12 +601,31 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
toast_msg = chat_msg.mText;
}
+ bool chat_overlaps = false;
+ if(nearby_chat->getChatHistory())
+ {
+ LLRect chat_rect = nearby_chat->getChatHistory()->calcScreenRect();
+ for (std::list<LLView*>::const_iterator child_iter = gFloaterView->getChildList()->begin();
+ child_iter != gFloaterView->getChildList()->end(); ++child_iter)
+ {
+ LLView *view = *child_iter;
+ const LLRect& rect = view->getRect();
+ if(view->isInVisibleChain() && (rect.overlaps(chat_rect)))
+ {
+ if(!nearby_chat->getChatHistory()->hasAncestor(view))
+ {
+ chat_overlaps = true;
+ }
+ break;
+ }
+ }
+ }
//Don't show nearby toast, if conversation is visible and selected
if ((nearby_chat->hasFocus()) ||
(LLFloater::isVisible(nearby_chat) && nearby_chat->isTornOff() && !nearby_chat->isMinimized()) ||
- ((im_box->getSelectedSession().isNull() &&
- ((LLFloater::isVisible(im_box) && !im_box->isMinimized() && im_box->isFrontmost())
- || (LLFloater::isVisible(nearby_chat) && !nearby_chat->isMinimized() && nearby_chat->isFrontmost())))))
+ ((im_box->getSelectedSession().isNull() && !chat_overlaps &&
+ ((LLFloater::isVisible(im_box) && !nearby_chat->isTornOff() && !im_box->isMinimized())
+ || (LLFloater::isVisible(nearby_chat) && nearby_chat->isTornOff() && !nearby_chat->isMinimized())))))
{
if(nearby_chat->isMessagePaneExpanded())
{
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 357b635594..2cd94c592a 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -1094,6 +1094,12 @@ void LLFloaterIMSessionTab::saveCollapsedState()
gSavedPerAccountSettings.setBOOL("NearbyChatIsNotCollapsed", isMessagePaneExpanded());
}
}
+
+LLView* LLFloaterIMSessionTab::getChatHistory()
+{
+ return mChatHistory;
+}
+
BOOL LLFloaterIMSessionTab::handleKeyHere(KEY key, MASK mask )
{
BOOL handled = FALSE;
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index e7b05a584b..1b4922fd73 100644
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -103,6 +103,8 @@ public:
void restoreFloater();
void saveCollapsedState();
+ LLView* getChatHistory();
+
protected:
// callback for click on any items of the visual states menu
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 88fbd233b8..a2c8e7772e 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -687,6 +687,11 @@ bool idle_startup()
gRememberPassword = gSavedSettings.getBOOL("RememberPassword");
show_connect_box = TRUE;
}
+
+ //setup map of datetime strings to codes and slt & local time offset from utc
+ // *TODO: Does this need to be here?
+ LLStringOps::setupDatetimeInfo(false);
+
// Go to the next startup state
LLStartUp::setStartupState( STATE_BROWSER_INIT );
return FALSE;
@@ -1139,9 +1144,6 @@ bool idle_startup()
LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done);
}
}
- //setup map of datetime strings to codes and slt & local time offset from utc
- // *TODO: Does this need to be here?
- LLStringOps::setupDatetimeInfo (false);
transition_back_to_login_panel(emsg.str());
show_connect_box = true;
}
@@ -3310,6 +3312,13 @@ bool process_login_success_response()
{
time_t now = time(NULL);
gUTCOffset = (server_utc_time - now);
+
+ // Print server timestamp
+ LLSD substitution;
+ substitution["datetime"] = (S32)server_utc_time;
+ std::string timeStr = "[month, datetime, slt] [day, datetime, slt] [year, datetime, slt] [hour, datetime, slt]:[min, datetime, slt]:[second, datetime, slt]";
+ LLStringUtil::format(timeStr, substitution);
+ LL_INFOS("AppInit") << "Server SLT timestamp: " << timeStr << ". Server-viewer time offset before correction: " << gUTCOffset << "s" << LL_ENDL;
}
}
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 08f6143861..93650ddb1a 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -171,24 +171,31 @@ void LLViewerTextureList::doPreloadImages()
mImagePreloads.insert(image);
}
image = LLViewerTextureManager::getFetchedTextureFromFile("transparent.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE,
- 0,0,LLUUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"));
+ 0, 0, IMG_TRANSPARENT);
if (image)
{
image->setAddressMode(LLTexUnit::TAM_WRAP);
mImagePreloads.insert(image);
}
-
- LLPointer<LLImageRaw> img_blak_square_tex(new LLImageRaw(2, 2, 3));
- memset(img_blak_square_tex->getData(), 0, img_blak_square_tex->getDataSize());
- LLPointer<LLViewerFetchedTexture> img_blak_square(new LLViewerFetchedTexture(img_blak_square_tex, FTT_DEFAULT, FALSE));
- gBlackSquareID = img_blak_square->getID();
- img_blak_square->setUnremovable(TRUE);
- addImage(img_blak_square, TEX_LIST_STANDARD);
+ image = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient.tga", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE,
+ GL_ALPHA8, GL_ALPHA, IMG_ALPHA_GRAD);
+ if (image)
+ {
+ image->setAddressMode(LLTexUnit::TAM_CLAMP);
+ mImagePreloads.insert(image);
+ }
+ image = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient_2d.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE,
+ GL_ALPHA8, GL_ALPHA, IMG_ALPHA_GRAD_2D);
+ if (image)
+ {
+ image->setAddressMode(LLTexUnit::TAM_CLAMP);
+ mImagePreloads.insert(image);
+ }
}
static std::string get_texture_list_name()
{
- return gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "texture_list_" + gSavedSettings.getString("LoginLocation") + ".xml");
+ return gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "texture_list_" + gSavedSettings.getString("LoginLocation") + "." + gDirUtilp->getUserName() + ".xml");
}
void LLViewerTextureList::doPrefetchImages()
@@ -293,7 +300,7 @@ void LLViewerTextureList::shutdown()
break;
}
- if (count > 0 && !gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "").empty())
+ if (count > 0 && !gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "").empty())
{
std::string filename = get_texture_list_name();
llofstream file;
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index ae63546082..b19c6756bc 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -54,6 +54,7 @@ LLCEFLib/CEF Version: [LLCEFLIB_VERSION]
Voice Server Version: [VOICE_VERSION]
</string>
<string name="AboutTraffic">Packets Lost: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%)</string>
+ <string name="AboutTime">[month, datetime, slt] [day, datetime, slt] [year, datetime, slt] [hour, datetime, slt]:[min, datetime, slt]:[second,datetime,slt]</string>
<string name="ErrorFetchingServerReleaseNotesURL">Error fetching server release notes URL.</string>
<string name="BuildConfiguration">Build Configuration</string>