summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--[-rwxr-xr-x]indra/newview/CMakeLists.txt0
-rw-r--r--[-rwxr-xr-x]indra/newview/app_settings/settings.xml0
-rw-r--r--[-rwxr-xr-x]indra/newview/installers/windows/installer_template.nsi0
-rw-r--r--[-rwxr-xr-x]indra/newview/installers/windows/lang_en-us.nsibin7542 -> 7542 bytes
-rw-r--r--[-rwxr-xr-x]indra/newview/llagent.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/llagentpilot.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/llagentpilot.h0
-rw-r--r--[-rwxr-xr-x]indra/newview/llappviewer.cpp0
-rw-r--r--indra/newview/lldateutil.cpp4
-rw-r--r--[-rwxr-xr-x]indra/newview/llfasttimerview.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/llfloatermodelpreview.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/llfloatermodelpreview.h0
-rw-r--r--indra/newview/llfloaterpreference.cpp38
-rw-r--r--indra/newview/llfloaterpreference.h4
-rw-r--r--[-rwxr-xr-x]indra/newview/llmeshrepository.cpp0
-rw-r--r--indra/newview/llnearbychatbar.cpp14
-rw-r--r--indra/newview/llnearbychatbar.h1
-rw-r--r--indra/newview/llpanellogin.cpp37
-rw-r--r--[-rwxr-xr-x]indra/newview/llstartup.cpp0
-rw-r--r--indra/newview/llviewerchat.cpp14
-rw-r--r--indra/newview/llviewerchat.h6
-rw-r--r--indra/newview/llviewerinventory.cpp29
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewermenu.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewerstats.h0
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewertexture.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/pipeline.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/xui/en/floater_model_preview.xml0
27 files changed, 105 insertions, 42 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 1d155add51..1d155add51 100755..100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 80dfe16ee9..80dfe16ee9 100755..100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index b5d43021ec..b5d43021ec 100755..100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi
index da0d7f54d2..da0d7f54d2 100755..100644
--- a/indra/newview/installers/windows/lang_en-us.nsi
+++ b/indra/newview/installers/windows/lang_en-us.nsi
Binary files differ
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 790f98e75d..790f98e75d 100755..100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp
index 734c502fcf..734c502fcf 100755..100644
--- a/indra/newview/llagentpilot.cpp
+++ b/indra/newview/llagentpilot.cpp
diff --git a/indra/newview/llagentpilot.h b/indra/newview/llagentpilot.h
index dd1709ec0c..dd1709ec0c 100755..100644
--- a/indra/newview/llagentpilot.h
+++ b/indra/newview/llagentpilot.h
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 5dc803e287..5dc803e287 100755..100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
diff --git a/indra/newview/lldateutil.cpp b/indra/newview/lldateutil.cpp
index fcc73a07bc..18ae6107e7 100644
--- a/indra/newview/lldateutil.cpp
+++ b/indra/newview/lldateutil.cpp
@@ -32,9 +32,9 @@
#include "llui.h"
static S32 DAYS_PER_MONTH_NOLEAP[] =
- { 31, 28, 21, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+ { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
static S32 DAYS_PER_MONTH_LEAP[] =
- { 31, 29, 21, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+ { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
static S32 days_from_month(S32 year, S32 month)
{
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 35712163eb..35712163eb 100755..100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index c66b2255eb..c66b2255eb 100755..100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 186bf114d1..186bf114d1 100755..100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 240f5e02fe..dd95782161 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -286,8 +286,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mOriginalIMViaEmail(false),
mLanguageChanged(false),
mAvatarDataInitialized(false),
- mDoubleClickActionDirty(false),
- mFavoritesRecordMayExist(false)
+ mDoubleClickActionDirty(false)
{
//Build Floater is now Called from LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
@@ -412,6 +411,8 @@ BOOL LLFloaterPreference::postBuild()
gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2));
+ gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLViewerChat::signalChatFontChanged));
+
gSavedSettings.getControl("ChatBubbleOpacity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onNameTagOpacityChange, this, _2));
LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
@@ -565,34 +566,6 @@ void LLFloaterPreference::apply()
updateDoubleClickSettings();
mDoubleClickActionDirty = false;
}
-
- if (mFavoritesRecordMayExist && !gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin"))
- {
- removeFavoritesRecordOfUser();
- }
-}
-
-void LLFloaterPreference::removeFavoritesRecordOfUser()
-{
- mFavoritesRecordMayExist = false;
- std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
- LLSD fav_llsd;
- llifstream file;
- file.open(filename);
- if (!file.is_open()) return;
- LLSDSerialize::fromXML(fav_llsd, file);
-
- LLAvatarName av_name;
- LLAvatarNameCache::get( gAgentID, &av_name );
- if (fav_llsd.has(av_name.getLegacyName()))
- {
- fav_llsd.erase(av_name.getLegacyName());
- }
-
- llofstream out_file;
- out_file.open(filename);
- LLSDSerialize::toPrettyXML(fav_llsd, out_file);
-
}
void LLFloaterPreference::cancel()
@@ -678,11 +651,6 @@ void LLFloaterPreference::onOpen(const LLSD& key)
getChildView("maturity_desired_combobox")->setVisible( false);
}
- if (LLStartUp::getStartupState() == STATE_STARTED)
- {
- mFavoritesRecordMayExist = gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin");
- }
-
// Forget previous language changes.
mLanguageChanged = false;
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 5d5e066ec5..4d8a2489be 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -159,8 +159,6 @@ public:
void buildPopupLists();
static void refreshSkin(void* data);
- // Remove record of current user's favorites from file on disk.
- void removeFavoritesRecordOfUser();
private:
static std::string sSkin;
// set true if state of double-click action checkbox or radio-group was changed by user
@@ -172,8 +170,6 @@ private:
bool mAvatarDataInitialized;
bool mOriginalHideOnlineStatus;
- // Record of current user's favorites may be stored in file on disk.
- bool mFavoritesRecordMayExist;
std::string mDirectoryVisibility;
LLAvatarData mAvatarProperties;
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index e20e918a2a..e20e918a2a 100755..100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 162e465fef..d3fd959152 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -47,6 +47,7 @@
#include "llwindow.h"
#include "llviewerwindow.h"
#include "llrootview.h"
+#include "llviewerchat.h"
S32 LLNearbyChatBar::sLastSpecialChatChannel = 0;
@@ -433,13 +434,26 @@ BOOL LLNearbyChatBar::postBuild()
mChatBox->setPassDelete(TRUE);
mChatBox->setReplaceNewlinesWithSpaces(FALSE);
mChatBox->setEnableLineHistory(TRUE);
+ mChatBox->setFont(LLViewerChat::getChatFont());
mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator");
mOutputMonitor->setVisible(FALSE);
+ // Register for font change notifications
+ LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1));
+
return TRUE;
}
+void LLNearbyChatBar::onChatFontChange(LLFontGL* fontp)
+{
+ // Update things with the new font whohoo
+ if (mChatBox)
+ {
+ mChatBox->setFont(fontp);
+ }
+}
+
//static
LLNearbyChatBar* LLNearbyChatBar::getInstance()
{
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index 96ab45071b..efddec942f 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -127,6 +127,7 @@ protected:
void sendChat( EChatType type );
void onChatBoxCommit();
+ void onChatFontChange(LLFontGL* fontp);
static LLWString stripChannelNumber(const LLWString &mesg, S32* channel);
EChatType processChatTypeTriggers(EChatType type, std::string &str);
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 7820ac3ecd..979d96ca0d 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -81,6 +81,9 @@ const S32 MAX_PASSWORD = 16;
LLPanelLogin *LLPanelLogin::sInstance = NULL;
BOOL LLPanelLogin::sCapslockDidNotification = FALSE;
+// Helper for converting a user name into the canonical "Firstname Lastname" form.
+// For new accounts without a last name "Resident" is added as a last name.
+static std::string canonicalize_username(const std::string& name);
class LLLoginRefreshHandler : public LLCommandHandler
{
@@ -302,7 +305,14 @@ void LLPanelLogin::addFavoritesToStartLocation()
for (LLSD::map_const_iterator iter = fav_llsd.beginMap();
iter != fav_llsd.endMap(); ++iter)
{
- if(iter->first != getChild<LLComboBox>("username_combo")->getSimple()) continue;
+ std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple();
+
+ // The account name in stored_favorites.xml has Resident last name even if user has
+ // a single word account name, so it can be compared case-insensitive with the
+ // user defined "firstname lastname".
+ S32 res = LLStringUtil::compareInsensitive(canonicalize_username(user_defined_name), iter->first);
+ if (res != 0) continue;
+
combo->addSeparator();
LLSD user_llsd = iter->second;
for (LLSD::array_const_iterator iter1 = user_llsd.beginArray();
@@ -1186,3 +1196,28 @@ void LLPanelLogin::onModeChangeConfirm(const LLSD& original_value, const LLSD& n
break;
}
}
+
+std::string canonicalize_username(const std::string& name)
+{
+ std::string cname = name;
+ LLStringUtil::trim(cname);
+
+ // determine if the username is a first/last form or not.
+ size_t separator_index = cname.find_first_of(" ._");
+ std::string first = cname.substr(0, separator_index);
+ std::string last;
+ if (separator_index != cname.npos)
+ {
+ last = cname.substr(separator_index+1, cname.npos);
+ LLStringUtil::trim(last);
+ }
+ else
+ {
+ // ...on Linden grids, single username users as considered to have
+ // last name "Resident"
+ last = "Resident";
+ }
+
+ // Username in traditional "firstname lastname" form.
+ return first + ' ' + last;
+}
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 277d2430ce..277d2430ce 100755..100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp
index 286b16bab2..f5484ff010 100644
--- a/indra/newview/llviewerchat.cpp
+++ b/indra/newview/llviewerchat.cpp
@@ -36,6 +36,7 @@
#include "llinstantmessage.h" //SYSTEM_FROM
// LLViewerChat
+LLViewerChat::font_change_signal_t LLViewerChat::sChatFontChangedSignal;
//static
void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color)
@@ -256,3 +257,16 @@ std::string LLViewerChat::getObjectImSLURL(const LLChat& chat, const LLSD& args)
return url;
}
+
+//static
+boost::signals2::connection LLViewerChat::setFontChangedCallback(const font_change_signal_t::slot_type& cb)
+{
+ return sChatFontChangedSignal.connect(cb);
+}
+
+//static
+void LLViewerChat::signalChatFontChanged()
+{
+ // Notify all observers that our font has changed
+ sChatFontChangedSignal(getChatFont());
+}
diff --git a/indra/newview/llviewerchat.h b/indra/newview/llviewerchat.h
index 0f15d29f04..c05caf0a95 100644
--- a/indra/newview/llviewerchat.h
+++ b/indra/newview/llviewerchat.h
@@ -35,6 +35,8 @@
class LLViewerChat
{
public:
+ typedef boost::signals2::signal<void (LLFontGL*)> font_change_signal_t;
+
static void getChatColor(const LLChat& chat, LLColor4& r_color);
static void getChatColor(const LLChat& chat, std::string& r_color_name, F32& r_color_alpha);
static LLFontGL* getChatFont();
@@ -42,8 +44,12 @@ public:
static void formatChatMsg(const LLChat& chat, std::string& formated_msg);
static std::string getSenderSLURL(const LLChat& chat, const LLSD& args);
+ static boost::signals2::connection setFontChangedCallback(const font_change_signal_t::slot_type& cb);
+ static void signalChatFontChanged();
+
private:
static std::string getObjectImSLURL(const LLChat& chat, const LLSD& args);
+ static font_change_signal_t sChatFontChangedSignal;
};
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 519514d99c..42750f8b3f 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1450,6 +1450,9 @@ private:
void saveFavoritesSLURLs();
+ // Remove record of current user's favorites from file on disk.
+ void removeFavoritesRecordOfUser();
+
void onLandmarkLoaded(const LLUUID& asset_id, LLLandmark* landmark);
void storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl);
@@ -1534,6 +1537,10 @@ void LLFavoritesOrderStorage::destroyClass()
{
LLFavoritesOrderStorage::instance().saveFavoritesSLURLs();
}
+ else
+ {
+ LLFavoritesOrderStorage::instance().removeFavoritesRecordOfUser();
+ }
}
void LLFavoritesOrderStorage::load()
@@ -1602,6 +1609,28 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs()
LLSDSerialize::toPrettyXML(fav_llsd, file);
}
+void LLFavoritesOrderStorage::removeFavoritesRecordOfUser()
+{
+ std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml");
+ LLSD fav_llsd;
+ llifstream file;
+ file.open(filename);
+ if (!file.is_open()) return;
+ LLSDSerialize::fromXML(fav_llsd, file);
+
+ LLAvatarName av_name;
+ LLAvatarNameCache::get( gAgentID, &av_name );
+ if (fav_llsd.has(av_name.getLegacyName()))
+ {
+ fav_llsd.erase(av_name.getLegacyName());
+ }
+
+ llofstream out_file;
+ out_file.open(filename);
+ LLSDSerialize::toPrettyXML(fav_llsd, out_file);
+
+}
+
void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmark* landmark)
{
if (!landmark) return;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 1764db48a2..1764db48a2 100755..100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index f91a1241fe..f91a1241fe 100755..100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index af06421bf9..af06421bf9 100755..100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index bd3b5d05f6..bd3b5d05f6 100755..100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index d08c3e7078..d08c3e7078 100755..100644
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml