summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorcallum_linden <none@none>2014-03-28 15:36:50 -0700
committercallum_linden <none@none>2014-03-28 15:36:50 -0700
commitef095034d17bfa71dbd8525fcdda8a520bd7e20f (patch)
tree63b09aab669b1cc2acb3bb02c5ca1910ba9f0c09 /indra
parent62d0ad23f905100ee823cb11bc6fa95ebcd5cb98 (diff)
MAINT-3880 FIX Show favorite landmarks on login screen checkbox, is checked in preferences after being unchecked
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llfloaterpreference.cpp13
-rwxr-xr-xindra/newview/llfloaterpreference.h3
-rwxr-xr-xindra/newview/llpanellogin.cpp14
-rwxr-xr-xindra/newview/llpanellogin.h4
4 files changed, 32 insertions, 2 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index b50a2e6f85..1846f3c568 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -752,6 +752,16 @@ void LLFloaterPreference::initDoNotDisturbResponse()
}
}
+//static
+void LLFloaterPreference::updateShowFavoritesCheckbox(bool val)
+{
+ LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
+ if (instance)
+ {
+ instance->getChild<LLUICtrl>("favorites_on_login_check")->setValue(val);
+ }
+}
+
void LLFloaterPreference::setHardwareDefaults()
{
LLFeatureManager::getInstance()->applyRecommendedSettings();
@@ -1602,6 +1612,7 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
getChildView("chat_font_size")->setEnabled(TRUE);
}
+
void LLFloaterPreference::refreshUI()
{
refresh();
@@ -1889,6 +1900,8 @@ BOOL LLPanelPreference::postBuild()
if (hasChild("favorites_on_login_check", TRUE))
{
getChild<LLCheckBoxCtrl>("favorites_on_login_check")->setCommitCallback(boost::bind(&showFavoritesOnLoginWarning, _1, _2));
+ bool show_favorites_at_login = LLPanelLogin::getShowFavorites();
+ getChild<LLCheckBoxCtrl>("favorites_on_login_check")->setValue(show_favorites_at_login);
}
//////////////////////PanelAdvanced ///////////////////
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index cb180f6f1e..f6a41529e0 100755
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -84,6 +84,9 @@ public:
// translate user's do not disturb response message according to current locale if message is default, otherwise do nothing
static void initDoNotDisturbResponse();
+ // update Show Favorites checkbox
+ static void updateShowFavoritesCheckbox(bool val);
+
void processProperties( void* pData, EAvatarProcessorType type );
void processProfileProperties(const LLAvatarData* pAvatarData );
void storeAvatarProperties( const LLAvatarData* pAvatarData );
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 8bd5602f48..9baa443b55 100755
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -176,7 +176,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
mUsernameLength(0),
mPasswordLength(0),
mLocationLength(0),
- mFavoriteSelected(false)
+ mFavoriteSelected(false),
+ mShowFavorites(false)
{
setBackgroundVisible(FALSE);
setBackgroundOpaque(TRUE);
@@ -317,7 +318,8 @@ void LLPanelLogin::addUsersWithFavoritesToUsername()
LLSD fav_llsd;
llifstream file;
file.open(filename);
- if (!file.is_open()) return;
+ if (!file.is_open())
+ return;
LLSDSerialize::fromXML(fav_llsd, file);
for (LLSD::map_const_iterator iter = fav_llsd.beginMap();
iter != fav_llsd.endMap(); ++iter)
@@ -350,6 +352,7 @@ void LLPanelLogin::addFavoritesToStartLocation()
file.open(filename);
if (!file.is_open()) return;
LLSDSerialize::fromXML(fav_llsd, file);
+
for (LLSD::map_const_iterator iter = fav_llsd.beginMap();
iter != fav_llsd.endMap(); ++iter)
{
@@ -373,6 +376,7 @@ void LLPanelLogin::addFavoritesToStartLocation()
std::string value = (*iter1)["slurl"].asString();
if(label != "" && value != "")
{
+ mShowFavorites = true;
combo->add(label, value);
}
}
@@ -1119,3 +1123,9 @@ void LLPanelLogin::onLocationSLURL()
LLStartUp::setStartSLURL(location); // calls onUpdateStartSLURL, above
}
+
+// static
+bool LLPanelLogin::getShowFavorites()
+{
+ return sInstance->mShowFavorites;
+}
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index be06967195..0e68ae3ccf 100755
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -81,6 +81,9 @@ public:
/// to be called from LLStartUp::setStartSLURL
static void onUpdateStartSLURL(const LLSLURL& new_start_slurl);
+ // called from prefs when initializing panel
+ static bool getShowFavorites();
+
private:
friend class LLPanelLoginListener;
void addFavoritesToStartLocation();
@@ -110,6 +113,7 @@ private:
void* mCallbackData;
BOOL mPasswordModified;
+ bool mShowFavorites;
static LLPanelLogin* sInstance;
static BOOL sCapslockDidNotification;