summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llappearance/llwearabletype.cpp17
-rw-r--r--indra/llappearance/llwearabletype.h1
-rw-r--r--indra/llmath/llvolume.cpp4
-rw-r--r--indra/llrender/llrender2dutils.cpp2
-rw-r--r--indra/llui/llcheckboxctrl.cpp64
-rw-r--r--indra/llui/llcheckboxctrl.h17
-rw-r--r--indra/llui/lltextbase.h2
-rw-r--r--indra/newview/CMakeLists.txt8
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rw-r--r--indra/newview/app_settings/commands.xml20
-rw-r--r--indra/newview/llagentcamera.cpp2
-rw-r--r--indra/newview/llagentwearables.cpp4
-rw-r--r--indra/newview/llappearancemgr.cpp2
-rw-r--r--indra/newview/llappviewer.cpp15
-rw-r--r--indra/newview/llappviewer.h4
-rw-r--r--indra/newview/llflickrconnect.cpp538
-rw-r--r--indra/newview/llflickrconnect.h108
-rw-r--r--indra/newview/llfloaterbigpreview.h2
-rw-r--r--indra/newview/llfloaterflickr.cpp787
-rw-r--r--indra/newview/llfloaterflickr.h134
-rw-r--r--indra/newview/llfloaterforgetuser.cpp298
-rw-r--r--indra/newview/llfloaterforgetuser.h12
-rw-r--r--indra/newview/llfloateroutfitsnapshot.cpp2
-rw-r--r--indra/newview/llfloatersnapshot.cpp7
-rw-r--r--indra/newview/llfloatertwitter.cpp810
-rw-r--r--indra/newview/llfloatertwitter.h138
-rw-r--r--indra/newview/llfloaterwebcontent.cpp22
-rw-r--r--indra/newview/llimagefiltersmanager.cpp2
-rw-r--r--indra/newview/llimagefiltersmanager.h2
-rw-r--r--indra/newview/llimprocessing.cpp41
-rw-r--r--indra/newview/llpanellogin.cpp139
-rw-r--r--indra/newview/llpanellogin.h4
-rw-r--r--indra/newview/llpanelobjectinventory.cpp9
-rw-r--r--indra/newview/llpanelsnapshotoptions.cpp30
-rw-r--r--indra/newview/llsecapi.h4
-rw-r--r--indra/newview/llsechandler_basic.cpp13
-rw-r--r--indra/newview/llsechandler_basic.h4
-rw-r--r--indra/newview/llselectmgr.cpp2
-rw-r--r--indra/newview/llsidepanelappearance.cpp2
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp2
-rw-r--r--indra/newview/llstartup.cpp9
-rw-r--r--indra/newview/llstartup.h1
-rw-r--r--indra/newview/lltexturecache.cpp31
-rw-r--r--indra/newview/lltexturecache.h7
-rw-r--r--indra/newview/lltwitterconnect.cpp576
-rw-r--r--indra/newview/lltwitterconnect.h107
-rw-r--r--indra/newview/llviewerfloaterreg.cpp7
-rw-r--r--indra/newview/llviewerjointattachment.cpp16
-rw-r--r--indra/newview/llviewerjointattachment.h2
-rw-r--r--indra/newview/llviewermenu.cpp8
-rw-r--r--indra/newview/llviewerobject.cpp1
-rw-r--r--indra/newview/llviewerobjectlist.cpp2
-rw-r--r--indra/newview/llviewerregion.cpp2
-rw-r--r--indra/newview/llvoavatar.cpp118
-rw-r--r--indra/newview/llvoavatar.h2
-rw-r--r--indra/newview/pipeline.cpp22
-rw-r--r--indra/newview/skins/default/textures/textures.xml2
-rw-r--r--indra/newview/skins/default/xui/de/floater_merchant_outbox.xml32
-rw-r--r--indra/newview/skins/default/xui/de/panel_outbox_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_flickr.xml90
-rw-r--r--indra/newview/skins/default/xui/en/floater_forget_user.xml3
-rw-r--r--indra/newview/skins/default/xui/en/floater_twitter.xml75
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml15
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml50
-rw-r--r--indra/newview/skins/default/xui/en/panel_flickr_account.xml79
-rw-r--r--indra/newview/skins/default/xui/en/panel_flickr_photo.xml259
-rw-r--r--indra/newview/skins/default/xui/en/panel_login.xml12
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_sound.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_snapshot_options.xml34
-rw-r--r--indra/newview/skins/default/xui/en/panel_twitter_account.xml81
-rw-r--r--indra/newview/skins/default/xui/en/panel_twitter_photo.xml196
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml27
-rw-r--r--indra/newview/skins/default/xui/es/floater_merchant_outbox.xml32
-rw-r--r--indra/newview/skins/default/xui/es/panel_outbox_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/floater_merchant_outbox.xml32
-rw-r--r--indra/newview/skins/default/xui/fr/panel_outbox_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/it/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/it/floater_merchant_outbox.xml32
-rw-r--r--indra/newview/skins/default/xui/it/panel_outbox_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/floater_merchant_outbox.xml32
-rw-r--r--indra/newview/skins/default/xui/ja/panel_outbox_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/pl/floater_merchant_outbox.xml29
-rw-r--r--indra/newview/skins/default/xui/pl/panel_outbox_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/floater_merchant_outbox.xml32
-rw-r--r--indra/newview/skins/default/xui/pt/panel_outbox_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/ru/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/ru/floater_merchant_outbox.xml32
-rw-r--r--indra/newview/skins/default/xui/ru/panel_outbox_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/tr/floater_merchant_outbox.xml32
-rw-r--r--indra/newview/skins/default/xui/tr/panel_outbox_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/zh/floater_merchant_outbox.xml32
-rw-r--r--indra/newview/skins/default/xui/zh/panel_outbox_inventory.xml2
-rw-r--r--indra/newview/tests/llsecapi_test.cpp1
94 files changed, 725 insertions, 4733 deletions
diff --git a/indra/llappearance/llwearabletype.cpp b/indra/llappearance/llwearabletype.cpp
index 6b7dc41ffd..dc02b5e225 100644
--- a/indra/llappearance/llwearabletype.cpp
+++ b/indra/llappearance/llwearabletype.cpp
@@ -56,7 +56,7 @@ struct WearableEntry : public LLDictionaryEntry
BOOL mAllowMultiwear;
};
-class LLWearableDictionary : public LLParamSingleton<LLWearableDictionary>,
+class LLWearableDictionary : public LLSingleton<LLWearableDictionary>,
public LLDictionary<LLWearableType::EType, WearableEntry>
{
LLSINGLETON(LLWearableDictionary);
@@ -64,6 +64,12 @@ class LLWearableDictionary : public LLParamSingleton<LLWearableDictionary>,
LLWearableDictionary::LLWearableDictionary()
{
+ if (!LLWearableType::instanceExists())
+ {
+ // LLWearableType is effectively a wrapper around LLWearableDictionary and is used as storage for LLTranslationBridge
+ // Todo: consider merging LLWearableType and LLWearableDictionary
+ LL_WARNS() << "Initing LLWearableDictionary without LLWearableType" << LL_ENDL;
+ }
addEntry(LLWearableType::WT_SHAPE, new WearableEntry("shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, FALSE, FALSE));
addEntry(LLWearableType::WT_SKIN, new WearableEntry("skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, FALSE, FALSE));
addEntry(LLWearableType::WT_HAIR, new WearableEntry("hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, FALSE, FALSE));
@@ -92,6 +98,7 @@ LLWearableDictionary::LLWearableDictionary()
LLWearableType::LLWearableType(LLTranslationBridge* trans)
{
+ // LLTranslationBridge exists, but is not ready at this point in time since strings.xml is not yet loaded
mTrans = trans;
}
@@ -100,14 +107,6 @@ LLWearableType::~LLWearableType()
delete mTrans;
}
-void LLWearableType::initSingleton()
-{
- // To make sure all wrapping functions will crash without initing LLWearableType;
- LLWearableDictionary::initParamSingleton();
-
- // Todo: consider merging LLWearableType and LLWearableDictionary
-}
-
// static
LLWearableType::EType LLWearableType::typeNameToType(const std::string& type_name)
{
diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h
index 80bb9a10b4..5fe969822a 100644
--- a/indra/llappearance/llwearabletype.h
+++ b/indra/llappearance/llwearabletype.h
@@ -47,7 +47,6 @@ class LLWearableType : public LLParamSingleton<LLWearableType>
LLSINGLETON(LLWearableType, LLTranslationBridge* trans);
~LLWearableType();
friend struct WearableEntry;
- void initSingleton();
public:
enum EType
{
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index ac02364a67..c37d1d36b4 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2419,7 +2419,7 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
if (idx.empty() || face.mNumIndices < 3)
{ //why is there an empty index list?
- LL_WARNS() <<"Empty face present!" << LL_ENDL;
+ LL_WARNS() << "Empty face present! Face index: " << i << " Total: " << face_count << LL_ENDL;
continue;
}
@@ -5244,7 +5244,7 @@ bool LLVolumeFace::cacheOptimize()
LLVCacheLRU cache;
- if (mNumVertices < 3)
+ if (mNumVertices < 3 || mNumIndices < 3)
{ //nothing to do
return true;
}
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index 4eb0203245..801b945806 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -1650,7 +1650,7 @@ LLPointer<LLUIImage> LLRender2D::getUIImage(const std::string& name, S32 priorit
// static
void LLRender2D::resetProvider()
{
- if (LLRender2D::instanceExists)
+ if (LLRender2D::instanceExists())
{
LLRender2D::getInstance()->mImageProvider = NULL;
}
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp
index eee6339caf..6a51c4240b 100644
--- a/indra/llui/llcheckboxctrl.cpp
+++ b/indra/llui/llcheckboxctrl.cpp
@@ -47,10 +47,18 @@ static LLDefaultChildRegistry::Register<LLCheckBoxCtrl> r("check_box");
template class LLCheckBoxCtrl* LLView::getChild<class LLCheckBoxCtrl>(
const std::string& name, BOOL recurse) const;
+void LLCheckBoxCtrl::WordWrap::declareValues()
+{
+ declare("none", EWordWrap::WRAP_NONE);
+ declare("down", EWordWrap::WRAP_DOWN);
+ declare("up", EWordWrap::WRAP_UP);
+}
+
LLCheckBoxCtrl::Params::Params()
: initial_value("initial_value", false),
label_text("label_text"),
check_button("check_button"),
+ word_wrap("word_wrap", EWordWrap::WRAP_NONE),
radio_style("radio_style")
{}
@@ -59,14 +67,14 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
: LLUICtrl(p),
mTextEnabledColor(p.label_text.text_color()),
mTextDisabledColor(p.label_text.text_readonly_color()),
- mFont(p.font())
+ mFont(p.font()),
+ mWordWrap(p.word_wrap)
{
mViewModel->setValue(LLSD(p.initial_value));
mViewModel->resetDirty();
static LLUICachedControl<S32> llcheckboxctrl_spacing ("UICheckboxctrlSpacing", 0);
static LLUICachedControl<S32> llcheckboxctrl_hpad ("UICheckboxctrlHPad", 0);
static LLUICachedControl<S32> llcheckboxctrl_vpad ("UICheckboxctrlVPad", 0);
- static LLUICachedControl<S32> llcheckboxctrl_btn_size ("UICheckboxctrlBtnSize", 0);
// must be big enough to hold all children
setUseBoundingRect(TRUE);
@@ -85,20 +93,47 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
{
tbparams.font(p.font);
}
- mLabel = LLUICtrlFactory::create<LLTextBox> (tbparams);
+
+ mLabel = LLUICtrlFactory::create<LLTextBox>(tbparams);
+ if (mWordWrap != WRAP_NONE)
+ {
+ // Not setWordWrap(mWordWrap != WRAP_NONE) because there might be some old lurking code that sets it manually
+ mLabel->setWordWrap(true);
+ S32 new_width = getRect().getWidth() - p.check_button.rect().getWidth() - llcheckboxctrl_hpad;
+ LLRect label_rect = mLabel->getRect();
+ label_rect.mRight = label_rect.mLeft + new_width;
+ mLabel->setRect(label_rect);
+ }
mLabel->reshapeToFitText();
- addChild(mLabel);
LLRect label_rect = mLabel->getRect();
+ if (mLabel->getLineCount() > 1)
+ {
+ if (mWordWrap == WRAP_DOWN)
+ {
+ // reshapeToFitText uses LLView::reshape() which always reshapes
+ // from bottom to top, but we want to extend the bottom
+ // Note: might be better idea to use getRect().mTop of LLCheckBoxCtrl (+pad) as top point of new rect
+ S32 delta = ll_round((F32)mLabel->getFont()->getLineHeight() * mLabel->getLineSpacingMult()) - label_rect.getHeight();
+ label_rect.translate(0, delta);
+ mLabel->setRect(label_rect);
+ }
+ // else
+ // WRAP_UP is essentially done by reshapeToFitText() (extends from bottom to top)
+ // howhever it doesn't respect rect of checkbox
+ // todo: this should be fixed, but there are at least couple checkboxes that use this feature as is.
+ }
+
+ addChild(mLabel);
// Button
- // Note: button cover the label by extending all the way to the right.
+ // Note: button cover the label by extending all the way to the right and down.
LLRect btn_rect = p.check_button.rect();
btn_rect.setOriginAndSize(
btn_rect.mLeft,
- btn_rect.mBottom,
+ llmin(btn_rect.mBottom, label_rect.mBottom),
llmax(btn_rect.mRight, label_rect.mRight - btn_rect.mLeft),
- llmax( label_rect.getHeight(), btn_rect.mTop));
+ llmax(label_rect.getHeight(), btn_rect.mTop));
std::string active_true_id, active_false_id;
std::string inactive_true_id, inactive_false_id;
@@ -152,17 +187,26 @@ void LLCheckBoxCtrl::clear()
void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
{
-
+ S32 label_top = mLabel->getRect().mTop;
mLabel->reshapeToFitText();
LLRect label_rect = mLabel->getRect();
+ if (label_top != label_rect.mTop && mWordWrap == WRAP_DOWN)
+ {
+ // reshapeToFitText uses LLView::reshape() which always reshapes
+ // from bottom to top, but we want to extend the bottom so
+ // reposition control
+ S32 delta = label_top - label_rect.mTop;
+ label_rect.translate(0, delta);
+ mLabel->setRect(label_rect);
+ }
// Button
- // Note: button cover the label by extending all the way to the right.
+ // Note: button cover the label by extending all the way to the right and down.
LLRect btn_rect = mButton->getRect();
btn_rect.setOriginAndSize(
btn_rect.mLeft,
- btn_rect.mBottom,
+ llmin(btn_rect.mBottom, label_rect.mBottom),
llmax(btn_rect.getWidth(), label_rect.mRight - btn_rect.mLeft),
llmax(label_rect.mTop - btn_rect.mBottom, btn_rect.getHeight()));
mButton->setShape(btn_rect);
diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h
index 07ae9c3b18..eb5bd5b6da 100644
--- a/indra/llui/llcheckboxctrl.h
+++ b/indra/llui/llcheckboxctrl.h
@@ -50,6 +50,19 @@ class LLCheckBoxCtrl
, public ll::ui::SearchableControl
{
public:
+
+ enum EWordWrap
+ {
+ WRAP_NONE,
+ WRAP_UP,
+ WRAP_DOWN
+ };
+
+ struct WordWrap : public LLInitParam::TypeValuesHelper<EWordWrap, WordWrap>
+ {
+ static void declareValues();
+ };
+
struct Params
: public LLInitParam::Block<Params, LLUICtrl::Params>
{
@@ -58,6 +71,8 @@ public:
Optional<LLTextBox::Params> label_text;
Optional<LLButton::Params> check_button;
+ Optional<EWordWrap, WordWrap> word_wrap;
+
Ignored radio_style;
Params();
@@ -129,6 +144,8 @@ protected:
LLUIColor mTextEnabledColor;
LLUIColor mTextDisabledColor;
+
+ EWordWrap mWordWrap; // off, shifts text up, shifts text down
};
// Build time optimization, generate once in .cpp file
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 4239cdf43c..058b804714 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -441,6 +441,8 @@ public:
S32 getVPad() { return mVPad; }
S32 getHPad() { return mHPad; }
+ F32 getLineSpacingMult() { return mLineSpacingMult; }
+ S32 getLineSpacingPixels() { return mLineSpacingPixels; } // only for multiline
S32 getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, bool hit_past_end_of_line = true) const;
LLRect getLocalRectFromDocIndex(S32 pos) const;
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 5a872f2aac..ef02a4ba55 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -208,7 +208,6 @@ set(viewer_SOURCE_FILES
llfilteredwearablelist.cpp
llfirstuse.cpp
llflexibleobject.cpp
- llflickrconnect.cpp
llfloaterabout.cpp
llfloaterbvhpreview.cpp
llfloaterauction.cpp
@@ -244,7 +243,6 @@ set(viewer_SOURCE_FILES
llfloaterexperiencepicker.cpp
llfloaterexperienceprofile.cpp
llfloaterexperiences.cpp
- llfloaterflickr.cpp
llfloaterfonttest.cpp
llfloaterforgetuser.cpp
llfloatergesture.cpp
@@ -318,7 +316,6 @@ set(viewer_SOURCE_FILES
llfloatertos.cpp
llfloatertoybox.cpp
llfloatertranslationsettings.cpp
- llfloatertwitter.cpp
llfloateruipreview.cpp
llfloaterurlentry.cpp
llfloatervoiceeffect.cpp
@@ -618,7 +615,6 @@ set(viewer_SOURCE_FILES
lltransientdockablefloater.cpp
lltransientfloatermgr.cpp
lltranslate.cpp
- lltwitterconnect.cpp
lluiavatar.cpp
lluilistener.cpp
lluploaddialog.cpp
@@ -837,7 +833,6 @@ set(viewer_HEADER_FILES
llfilteredwearablelist.h
llfirstuse.h
llflexibleobject.h
- llflickrconnect.h
llfloaterabout.h
llfloaterbvhpreview.h
llfloaterauction.h
@@ -873,7 +868,6 @@ set(viewer_HEADER_FILES
llfloaterexperiencepicker.h
llfloaterexperienceprofile.h
llfloaterexperiences.h
- llfloaterflickr.h
llfloaterfonttest.h
llfloaterforgetuser.h
llfloatergesture.h
@@ -950,7 +944,6 @@ set(viewer_HEADER_FILES
llfloatertos.h
llfloatertoybox.h
llfloatertranslationsettings.h
- llfloatertwitter.h
llfloateruipreview.h
llfloaterurlentry.h
llfloatervoiceeffect.h
@@ -1240,7 +1233,6 @@ set(viewer_HEADER_FILES
lltransientdockablefloater.h
lltransientfloatermgr.h
lltranslate.h
- lltwitterconnect.h
lluiconstants.h
lluiavatar.h
lluilistener.h
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index b98d1d3fa7..c44315e3f0 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-6.3.5
+6.3.7
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index dae397a3b6..98143bbce6 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -218,26 +218,6 @@
is_running_function="Floater.IsOpen"
is_running_parameters="snapshot"
/>
- <command name="flickr"
- available_in_toybox="true"
- icon="Command_Flickr_Icon"
- label_ref="Command_Flickr_Label"
- tooltip_ref="Command_Flickr_Tooltip"
- execute_function="Floater.ToggleOrBringToFront"
- execute_parameters="flickr"
- is_running_function="Floater.IsOpen"
- is_running_parameters="flickr"
- />
- <command name="twitter"
- available_in_toybox="true"
- icon="Command_Twitter_Icon"
- label_ref="Command_Twitter_Label"
- tooltip_ref="Command_Twitter_Tooltip"
- execute_function="Floater.ToggleOrBringToFront"
- execute_parameters="twitter"
- is_running_function="Floater.IsOpen"
- is_running_parameters="twitter"
- />
<command name="speak"
available_in_toybox="true"
icon="Command_Speak_Icon"
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index c55c12e670..85b7d7b06f 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -1460,7 +1460,7 @@ void LLAgentCamera::updateCamera()
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- LLViewerObject *attached_object = (*attachment_iter);
+ LLViewerObject *attached_object = attachment_iter->get();
if (attached_object && !attached_object->isDead() && attached_object->mDrawable.notNull())
{
// clear any existing "early" movements of attachment
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 15e4de8f69..013c40f557 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1323,7 +1323,7 @@ void LLAgentWearables::findAttachmentsAddRemoveInfo(LLInventoryModel::item_array
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- LLViewerObject *objectp = (*attachment_iter);
+ LLViewerObject *objectp = attachment_iter->get();
if (objectp)
{
LLUUID object_item_id = objectp->getAttachmentItemID();
@@ -1387,7 +1387,7 @@ std::vector<LLViewerObject*> LLAgentWearables::getTempAttachments()
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- LLViewerObject *objectp = (*attachment_iter);
+ LLViewerObject *objectp = attachment_iter->get();
if (objectp && objectp->isTempAttachment())
{
temp_attachs.push_back(objectp);
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index fb864f18c1..3c3dda1765 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2929,7 +2929,7 @@ void LLAppearanceMgr::removeAllAttachmentsFromAvatar()
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- LLViewerObject *attached_object = (*attachment_iter);
+ LLViewerObject *attached_object = attachment_iter->get();
if (attached_object)
{
objects_to_remove.push_back(attached_object);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 3e33815b20..7206e43321 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -673,7 +673,8 @@ LLAppViewer::LLAppViewer()
mReportedCrash(false),
mNumSessions(0),
mPurgeCache(false),
- mPurgeOnExit(false),
+ mPurgeCacheOnExit(false),
+ mPurgeUserDataOnExit(false),
mSecondInstance(false),
mSavedFinalSnapshot(false),
mSavePerAccountSettings(false), // don't save settings on logout unless login succeeded.
@@ -1952,7 +1953,7 @@ bool LLAppViewer::cleanup()
LLConversationLog::instance().cache();
}
- if (mPurgeOnExit)
+ if (mPurgeCacheOnExit)
{
LL_INFOS() << "Purging all cache files on exit" << LL_ENDL;
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""), "*.*");
@@ -1993,6 +1994,14 @@ bool LLAppViewer::cleanup()
}
}
+ if (mPurgeUserDataOnExit)
+ {
+ // Ideally we should not save anything from this session since it is going to be purged now,
+ // but this is a very 'rare' case (user deleting himself), not worth overcomplicating 'save&cleanup' code
+ std::string user_path = gDirUtilp->getOSUserAppDir() + gDirUtilp->getDirDelimiter() + LLStartUp::getUserId();
+ gDirUtilp->deleteDirAndContents(user_path);
+ }
+
// Delete workers first
// shotdown all worker threads before deleting them in case of co-dependencies
mAppCoreHttp.requestStop();
@@ -4467,7 +4476,7 @@ void LLAppViewer::badNetworkHandler()
// Flush all of our caches on exit in the case of disconnect due to
// invalid packets.
- mPurgeOnExit = TRUE;
+ mPurgeCacheOnExit = TRUE;
std::ostringstream message;
message <<
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 788fe6a19b..1298ba51e2 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -190,6 +190,7 @@ public:
void addOnIdleCallback(const boost::function<void()>& cb); // add a callback to fire (once) when idle
+ void purgeUserDataOnExit() { mPurgeUserDataOnExit = true; }
void purgeCache(); // Clear the local cache.
void purgeCacheImmediate(); //clear local cache immediately.
S32 updateTextureThreads(F32 max_time);
@@ -281,7 +282,8 @@ private:
std::string mSerialNumber;
bool mPurgeCache;
- bool mPurgeOnExit;
+ bool mPurgeCacheOnExit;
+ bool mPurgeUserDataOnExit;
LLViewerJoystick* joystick;
bool mSavedFinalSnapshot;
diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp
deleted file mode 100644
index d7d161f239..0000000000
--- a/indra/newview/llflickrconnect.cpp
+++ /dev/null
@@ -1,538 +0,0 @@
-/**
- * @file llflickrconnect.h
- * @author Merov, Cho
- * @brief Connection to Flickr Service
- *
- * $LicenseInfo:firstyear=2013&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2013, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llflickrconnect.h"
-
-#include "llagent.h"
-#include "llcallingcard.h" // for LLAvatarTracker
-#include "llcommandhandler.h"
-#include "llnotificationsutil.h"
-#include "llurlaction.h"
-#include "llimagepng.h"
-#include "llimagejpeg.h"
-#include "lltrans.h"
-#include "llevents.h"
-#include "llviewerregion.h"
-
-#include "llfloaterwebcontent.h"
-#include "llfloaterreg.h"
-#include "llcorehttputil.h"
-
-boost::scoped_ptr<LLEventPump> LLFlickrConnect::sStateWatcher(new LLEventStream("FlickrConnectState"));
-boost::scoped_ptr<LLEventPump> LLFlickrConnect::sInfoWatcher(new LLEventStream("FlickrConnectInfo"));
-boost::scoped_ptr<LLEventPump> LLFlickrConnect::sContentWatcher(new LLEventStream("FlickrConnectContent"));
-
-// Local functions
-void log_flickr_connect_error(const std::string& request, U32 status, const std::string& reason, const std::string& code, const std::string& description)
-{
- // Note: 302 (redirect) is *not* an error that warrants logging
- if (status != 302)
- {
- LL_WARNS("FlickrConnect") << request << " request failed with a " << status << " " << reason << ". Reason: " << code << " (" << description << ")" << LL_ENDL;
- }
-}
-
-void toast_user_for_flickr_success()
-{
- LLSD args;
- args["MESSAGE"] = LLTrans::getString("flickr_post_success");
- LLNotificationsUtil::add("FlickrConnect", args);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-void LLFlickrConnect::flickrConnectCoro(std::string requestToken, std::string oauthVerifier)
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
-
- httpOpts->setWantHeaders(true);
- httpOpts->setFollowRedirects(false);
-
- LLSD body;
- if (!requestToken.empty())
- body["request_token"] = requestToken;
- if (!oauthVerifier.empty())
- body["oauth_verifier"] = oauthVerifier;
-
- setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_IN_PROGRESS);
-
- LLSD result = httpAdapter->putAndSuspend(httpRequest, getFlickrConnectURL("/connection"), body, httpOpts);
-
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- if (!status)
- {
- if ( status == LLCore::HttpStatus(HTTP_FOUND) )
- {
- std::string location = httpResults[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_HEADERS][HTTP_IN_HEADER_LOCATION];
- if (location.empty())
- {
- LL_WARNS("FlickrConnect") << "Missing Location header " << LL_ENDL;
- }
- else
- {
- openFlickrWeb(location);
- }
- }
- else
- {
- LL_WARNS("FlickrConnect") << "Connection failed " << status.toString() << LL_ENDL;
- setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_FAILED);
- log_flickr_connect_error("Connect", status.getStatus(), status.toString(),
- result.get("error_code"), result.get("error_description"));
- }
- }
- else
- {
- LL_DEBUGS("FlickrConnect") << "Connect successful. " << LL_ENDL;
- setConnectionState(LLFlickrConnect::FLICKR_CONNECTED);
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-bool LLFlickrConnect::testShareStatus(LLSD &result)
-{
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- if (status)
- return true;
-
- if (status == LLCore::HttpStatus(HTTP_FOUND))
- {
- std::string location = httpResults[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_HEADERS][HTTP_IN_HEADER_LOCATION];
- if (location.empty())
- {
- LL_WARNS("FlickrConnect") << "Missing Location header " << LL_ENDL;
- }
- else
- {
- openFlickrWeb(location);
- }
- }
- if (status == LLCore::HttpStatus(HTTP_NOT_FOUND))
- {
- LL_DEBUGS("FlickrConnect") << "Not connected. " << LL_ENDL;
- connectToFlickr();
- }
- else
- {
- LL_WARNS("FlickrConnect") << "HTTP Status error " << status.toString() << LL_ENDL;
- setConnectionState(LLFlickrConnect::FLICKR_POST_FAILED);
- log_flickr_connect_error("Share", status.getStatus(), status.toString(),
- result.get("error_code"), result.get("error_description"));
- }
- return false;
-}
-
-void LLFlickrConnect::flickrShareCoro(LLSD share)
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
-
- httpOpts->setWantHeaders(true);
- httpOpts->setFollowRedirects(false);
-
- LLSD result = httpAdapter->postAndSuspend(httpRequest, getFlickrConnectURL("/share/photo", true), share, httpOpts);
-
- if (testShareStatus(result))
- {
- toast_user_for_flickr_success();
- LL_DEBUGS("FlickrConnect") << "Post successful. " << LL_ENDL;
- setConnectionState(LLFlickrConnect::FLICKR_POSTED);
- }
-
-}
-
-void LLFlickrConnect::flickrShareImageCoro(LLPointer<LLImageFormatted> image, std::string title, std::string description, std::string tags, int safetyLevel)
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
-
- httpOpts->setWantHeaders(true);
- httpOpts->setFollowRedirects(false);
-
- std::string imageFormat;
- if (dynamic_cast<LLImagePNG*>(image.get()))
- {
- imageFormat = "png";
- }
- else if (dynamic_cast<LLImageJPEG*>(image.get()))
- {
- imageFormat = "jpg";
- }
- else
- {
- LL_WARNS() << "Image to upload is not a PNG or JPEG" << LL_ENDL;
- return;
- }
-
- // All this code is mostly copied from LLWebProfile::post()
- const std::string boundary = "----------------------------0123abcdefab";
-
- std::string contentType = "multipart/form-data; boundary=" + boundary;
- httpHeaders->append("Content-Type", contentType.c_str());
-
- LLCore::BufferArray::ptr_t raw = LLCore::BufferArray::ptr_t(new LLCore::BufferArray()); //
- LLCore::BufferArrayStream body(raw.get());
-
- // *NOTE: The order seems to matter.
- body << "--" << boundary << "\r\n"
- << "Content-Disposition: form-data; name=\"title\"\r\n\r\n"
- << title << "\r\n";
-
- body << "--" << boundary << "\r\n"
- << "Content-Disposition: form-data; name=\"description\"\r\n\r\n"
- << description << "\r\n";
-
- body << "--" << boundary << "\r\n"
- << "Content-Disposition: form-data; name=\"tags\"\r\n\r\n"
- << tags << "\r\n";
-
- body << "--" << boundary << "\r\n"
- << "Content-Disposition: form-data; name=\"safety_level\"\r\n\r\n"
- << safetyLevel << "\r\n";
-
- body << "--" << boundary << "\r\n"
- << "Content-Disposition: form-data; name=\"image\"; filename=\"Untitled." << imageFormat << "\"\r\n"
- << "Content-Type: image/" << imageFormat << "\r\n\r\n";
-
- // Insert the image data.
- // *FIX: Treating this as a string will probably screw it up ...
- U8* image_data = image->getData();
- for (S32 i = 0; i < image->getDataSize(); ++i)
- {
- body << image_data[i];
- }
-
- body << "\r\n--" << boundary << "--\r\n";
-
- LLSD result = httpAdapter->postAndSuspend(httpRequest, getFlickrConnectURL("/share/photo", true), raw, httpOpts, httpHeaders);
-
- if (testShareStatus(result))
- {
- toast_user_for_flickr_success();
- LL_DEBUGS("FlickrConnect") << "Post successful. " << LL_ENDL;
- setConnectionState(LLFlickrConnect::FLICKR_POSTED);
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-void LLFlickrConnect::flickrDisconnectCoro()
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
-
- setConnectionState(LLFlickrConnect::FLICKR_DISCONNECTING);
- httpOpts->setFollowRedirects(false);
-
- LLSD result = httpAdapter->deleteAndSuspend(httpRequest, getFlickrConnectURL("/connection"), httpOpts);
-
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- if (!status && (status != LLCore::HttpStatus(HTTP_NOT_FOUND)))
- {
- LL_WARNS("FlickrConnect") << "Disconnect failed!" << LL_ENDL;
- setConnectionState(LLFlickrConnect::FLICKR_DISCONNECT_FAILED);
-
- log_flickr_connect_error("Disconnect", status.getStatus(), status.toString(),
- result.get("error_code"), result.get("error_description"));
- }
- else
- {
- LL_DEBUGS("FlickrConnect") << "Disconnect successful. " << LL_ENDL;
- clearInfo();
- setConnectionState(LLFlickrConnect::FLICKR_NOT_CONNECTED);
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-void LLFlickrConnect::flickrConnectedCoro(bool autoConnect)
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
-
- setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_IN_PROGRESS);
-
- httpOpts->setFollowRedirects(false);
-
- LLSD result = httpAdapter->getAndSuspend(httpRequest, getFlickrConnectURL("/connection", true), httpOpts);
-
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- if (!status)
- {
- if (status == LLCore::HttpStatus(HTTP_NOT_FOUND))
- {
- LL_DEBUGS("FlickrConnect") << "Not connected. " << LL_ENDL;
- if (autoConnect)
- {
- connectToFlickr();
- }
- else
- {
- setConnectionState(LLFlickrConnect::FLICKR_NOT_CONNECTED);
- }
- }
- else
- {
- LL_WARNS("FlickrConnect") << "Failed to test connection:" << status.toTerseString() << LL_ENDL;
-
- setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_FAILED);
- log_flickr_connect_error("Connected", status.getStatus(), status.toString(),
- result.get("error_code"), result.get("error_description"));
- }
- }
- else
- {
- LL_DEBUGS("FlickrConnect") << "Connect successful. " << LL_ENDL;
- setConnectionState(LLFlickrConnect::FLICKR_CONNECTED);
- }
-
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-void LLFlickrConnect::flickrInfoCoro()
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
-
- httpOpts->setWantHeaders(true);
- httpOpts->setFollowRedirects(false);
-
- LLSD result = httpAdapter->getAndSuspend(httpRequest, getFlickrConnectURL("/info", true), httpOpts);
-
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- if (status == LLCore::HttpStatus(HTTP_FOUND))
- {
- std::string location = httpResults[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_HEADERS][HTTP_IN_HEADER_LOCATION];
- if (location.empty())
- {
- LL_WARNS("FlickrConnect") << "Missing Location header " << LL_ENDL;
- }
- else
- {
- openFlickrWeb(location);
- }
- }
- else if (!status)
- {
- LL_WARNS("FlickrConnect") << "Flickr Info failed: " << status.toString() << LL_ENDL;
- log_flickr_connect_error("Info", status.getStatus(), status.toString(),
- result.get("error_code"), result.get("error_description"));
- }
- else
- {
- LL_INFOS("FlickrConnect") << "Flickr: Info received" << LL_ENDL;
- result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
- storeInfo(result);
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-LLFlickrConnect::LLFlickrConnect()
-: mConnectionState(FLICKR_NOT_CONNECTED),
- mConnected(false),
- mInfo(),
- mRefreshInfo(false),
- mReadFromMaster(false)
-{
-}
-
-void LLFlickrConnect::openFlickrWeb(std::string url)
-{
- LLFloaterWebContent::Params p;
- p.url(url);
- p.show_chrome(true);
- p.allow_back_forward_navigation(false);
- p.clean_browser(true);
- LLFloater *floater = LLFloaterReg::showInstance("flickr_web", p);
- //the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems).
- //So when showing the internal web browser, set focus to it's containing floater "flickr_web". When a mouse event
- //occurs on the "webbrowser" panel part of the floater, a mouse cursor will properly show and the "webbrowser" will gain focus.
- //flickr_web floater contains the "webbrowser" panel. JIRA: ACME-744
- gFocusMgr.setKeyboardFocus( floater );
-
- //LLUrlAction::openURLExternal(url);
-}
-
-std::string LLFlickrConnect::getFlickrConnectURL(const std::string& route, bool include_read_from_master)
-{
- std::string url("");
- LLViewerRegion *regionp = gAgent.getRegion();
- if (regionp)
- {
- //url = "http://pdp15.lindenlab.com/flickr/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO
- url = regionp->getCapability("FlickrConnect");
- url += route;
-
- if (include_read_from_master && mReadFromMaster)
- {
- url += "?read_from_master=true";
- }
- }
- return url;
-}
-
-void LLFlickrConnect::connectToFlickr(const std::string& request_token, const std::string& oauth_verifier)
-{
- LLCoros::instance().launch("LLFlickrConnect::flickrConnectCoro",
- boost::bind(&LLFlickrConnect::flickrConnectCoro, this, request_token, oauth_verifier));
-}
-
-void LLFlickrConnect::disconnectFromFlickr()
-{
- LLCoros::instance().launch("LLFlickrConnect::flickrDisconnectCoro",
- boost::bind(&LLFlickrConnect::flickrDisconnectCoro, this));
-}
-
-void LLFlickrConnect::checkConnectionToFlickr(bool auto_connect)
-{
- LLCoros::instance().launch("LLFlickrConnect::flickrConnectedCoro",
- boost::bind(&LLFlickrConnect::flickrConnectedCoro, this, auto_connect));
-}
-
-void LLFlickrConnect::loadFlickrInfo()
-{
- if(mRefreshInfo)
- {
- LLCoros::instance().launch("LLFlickrConnect::flickrInfoCoro",
- boost::bind(&LLFlickrConnect::flickrInfoCoro, this));
- }
-}
-
-void LLFlickrConnect::uploadPhoto(const std::string& image_url, const std::string& title, const std::string& description, const std::string& tags, int safety_level)
-{
- LLSD body;
- body["image"] = image_url;
- body["title"] = title;
- body["description"] = description;
- body["tags"] = tags;
- body["safety_level"] = safety_level;
-
- setConnectionState(LLFlickrConnect::FLICKR_POSTING);
-
- LLCoros::instance().launch("LLFlickrConnect::flickrShareCoro",
- boost::bind(&LLFlickrConnect::flickrShareCoro, this, body));
-}
-
-void LLFlickrConnect::uploadPhoto(LLPointer<LLImageFormatted> image, const std::string& title, const std::string& description, const std::string& tags, int safety_level)
-{
- setConnectionState(LLFlickrConnect::FLICKR_POSTING);
-
- LLCoros::instance().launch("LLFlickrConnect::flickrShareImageCoro",
- boost::bind(&LLFlickrConnect::flickrShareImageCoro, this, image,
- title, description, tags, safety_level));
-}
-
-void LLFlickrConnect::storeInfo(const LLSD& info)
-{
- mInfo = info;
- mRefreshInfo = false;
-
- sInfoWatcher->post(info);
-}
-
-const LLSD& LLFlickrConnect::getInfo() const
-{
- return mInfo;
-}
-
-void LLFlickrConnect::clearInfo()
-{
- mInfo = LLSD();
-}
-
-void LLFlickrConnect::setDataDirty()
-{
- mRefreshInfo = true;
-}
-
-void LLFlickrConnect::setConnectionState(LLFlickrConnect::EConnectionState connection_state)
-{
- if(connection_state == FLICKR_CONNECTED)
- {
- mReadFromMaster = true;
- setConnected(true);
- setDataDirty();
- }
- else if(connection_state == FLICKR_NOT_CONNECTED)
- {
- setConnected(false);
- }
- else if(connection_state == FLICKR_POSTED)
- {
- mReadFromMaster = false;
- }
-
- if (mConnectionState != connection_state)
- {
- // set the connection state before notifying watchers
- mConnectionState = connection_state;
-
- LLSD state_info;
- state_info["enum"] = connection_state;
- sStateWatcher->post(state_info);
- }
-}
-
-void LLFlickrConnect::setConnected(bool connected)
-{
- mConnected = connected;
-}
diff --git a/indra/newview/llflickrconnect.h b/indra/newview/llflickrconnect.h
deleted file mode 100644
index 43cadca708..0000000000
--- a/indra/newview/llflickrconnect.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * @file llflickrconnect.h
- * @author Merov, Cho
- * @brief Connection to Flickr Service
- *
- * $LicenseInfo:firstyear=2013&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2013, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLFLICKRCONNECT_H
-#define LL_LLFLICKRCONNECT_H
-
-#include "llsingleton.h"
-#include "llimage.h"
-#include "llcoros.h"
-#include "lleventcoro.h"
-
-class LLEventPump;
-
-/**
- * @class LLFlickrConnect
- *
- * Manages authentication to, and interaction with, a web service allowing the
- * the viewer to upload photos to Flickr.
- */
-class LLFlickrConnect : public LLSingleton<LLFlickrConnect>
-{
- LLSINGLETON(LLFlickrConnect);
- ~LLFlickrConnect() {};
- LOG_CLASS(LLFlickrConnect);
-public:
- enum EConnectionState
- {
- FLICKR_NOT_CONNECTED = 0,
- FLICKR_CONNECTION_IN_PROGRESS = 1,
- FLICKR_CONNECTED = 2,
- FLICKR_CONNECTION_FAILED = 3,
- FLICKR_POSTING = 4,
- FLICKR_POSTED = 5,
- FLICKR_POST_FAILED = 6,
- FLICKR_DISCONNECTING = 7,
- FLICKR_DISCONNECT_FAILED = 8
- };
-
- void connectToFlickr(const std::string& request_token = "", const std::string& oauth_verifier = ""); // Initiate the complete Flickr connection. Please use checkConnectionToFlickr() in normal use.
- void disconnectFromFlickr(); // Disconnect from the Flickr service.
- void checkConnectionToFlickr(bool auto_connect = false); // Check if an access token is available on the Flickr service. If not, call connectToFlickr().
-
- void loadFlickrInfo();
- void uploadPhoto(const std::string& image_url, const std::string& title, const std::string& description, const std::string& tags, int safety_level);
- void uploadPhoto(LLPointer<LLImageFormatted> image, const std::string& title, const std::string& description, const std::string& tags, int safety_level);
-
- void storeInfo(const LLSD& info);
- const LLSD& getInfo() const;
- void clearInfo();
- void setDataDirty();
-
- void setConnectionState(EConnectionState connection_state);
- void setConnected(bool connected);
- bool isConnected() { return mConnected; }
- bool isTransactionOngoing() { return ((mConnectionState == FLICKR_CONNECTION_IN_PROGRESS) || (mConnectionState == FLICKR_POSTING) || (mConnectionState == FLICKR_DISCONNECTING)); }
- EConnectionState getConnectionState() { return mConnectionState; }
-
- void openFlickrWeb(std::string url);
-
-private:
-
- std::string getFlickrConnectURL(const std::string& route = "", bool include_read_from_master = false);
-
- EConnectionState mConnectionState;
- BOOL mConnected;
- LLSD mInfo;
- bool mRefreshInfo;
- bool mReadFromMaster;
-
- static boost::scoped_ptr<LLEventPump> sStateWatcher;
- static boost::scoped_ptr<LLEventPump> sInfoWatcher;
- static boost::scoped_ptr<LLEventPump> sContentWatcher;
-
- bool testShareStatus(LLSD &result);
- void flickrConnectCoro(std::string requestToken, std::string oauthVerifier);
- void flickrShareCoro(LLSD share);
- void flickrShareImageCoro(LLPointer<LLImageFormatted> image, std::string title, std::string description, std::string tags, int safetyLevel);
- void flickrDisconnectCoro();
- void flickrConnectedCoro(bool autoConnect);
- void flickrInfoCoro();
-
-};
-
-#endif // LL_LLFLICKRCONNECT_H
diff --git a/indra/newview/llfloaterbigpreview.h b/indra/newview/llfloaterbigpreview.h
index 63c6784d36..513ed8da6e 100644
--- a/indra/newview/llfloaterbigpreview.h
+++ b/indra/newview/llfloaterbigpreview.h
@@ -1,6 +1,6 @@
/**
* @file llfloaterbigpreview.h
-* @brief Display of extended (big) preview for snapshots and SL Share
+* @brief Display of extended (big) preview for snapshots
* @author merov@lindenlab.com
*
* $LicenseInfo:firstyear=2013&license=viewerlgpl$
diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp
deleted file mode 100644
index 69a92b2b54..0000000000
--- a/indra/newview/llfloaterflickr.cpp
+++ /dev/null
@@ -1,787 +0,0 @@
-/**
-* @file llfloaterflickr.cpp
-* @brief Implementation of llfloaterflickr
-* @author cho@lindenlab.com
-*
-* $LicenseInfo:firstyear=2013&license=viewerlgpl$
-* Second Life Viewer Source Code
-* Copyright (C) 2013, Linden Research, Inc.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation;
-* version 2.1 of the License only.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-* $/LicenseInfo$
-*/
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloaterflickr.h"
-
-#include "llagent.h"
-#include "llagentui.h"
-#include "llcheckboxctrl.h"
-#include "llcombobox.h"
-#include "llflickrconnect.h"
-#include "llfloaterreg.h"
-#include "lliconctrl.h"
-#include "llimagefiltersmanager.h"
-#include "llresmgr.h" // LLLocale
-#include "llsdserialize.h"
-#include "llloadingindicator.h"
-#include "llslurl.h"
-#include "lltrans.h"
-#include "llsnapshotlivepreview.h"
-#include "llfloaterbigpreview.h"
-#include "llviewerregion.h"
-#include "llviewercontrol.h"
-#include "llviewermedia.h"
-#include "lltabcontainer.h"
-#include "llviewerparcelmgr.h"
-#include "llviewerregion.h"
-#include <boost/regex.hpp>
-static LLPanelInjector<LLFlickrPhotoPanel> t_panel_photo("llflickrphotopanel");
-static LLPanelInjector<LLFlickrAccountPanel> t_panel_account("llflickraccountpanel");
-
-const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=flickr&utm_medium=photo&utm_campaign=slshare";
-const std::string DEFAULT_TAG_TEXT = "secondlife ";
-const std::string FLICKR_MACHINE_TAGS_NAMESPACE = "secondlife";
-
-///////////////////////////
-//LLFlickrPhotoPanel///////
-///////////////////////////
-
-LLFlickrPhotoPanel::LLFlickrPhotoPanel() :
-mResolutionComboBox(NULL),
-mRefreshBtn(NULL),
-mBtnPreview(NULL),
-mWorkingLabel(NULL),
-mThumbnailPlaceholder(NULL),
-mTitleTextBox(NULL),
-mDescriptionTextBox(NULL),
-mLocationCheckbox(NULL),
-mTagsTextBox(NULL),
-mRatingComboBox(NULL),
-mBigPreviewFloater(NULL),
-mPostButton(NULL)
-{
- mCommitCallbackRegistrar.add("SocialSharing.SendPhoto", boost::bind(&LLFlickrPhotoPanel::onSend, this));
- mCommitCallbackRegistrar.add("SocialSharing.RefreshPhoto", boost::bind(&LLFlickrPhotoPanel::onClickNewSnapshot, this));
- mCommitCallbackRegistrar.add("SocialSharing.BigPreview", boost::bind(&LLFlickrPhotoPanel::onClickBigPreview, this));
-}
-
-LLFlickrPhotoPanel::~LLFlickrPhotoPanel()
-{
- if(mPreviewHandle.get())
- {
- mPreviewHandle.get()->die();
- }
-}
-
-BOOL LLFlickrPhotoPanel::postBuild()
-{
- setVisibleCallback(boost::bind(&LLFlickrPhotoPanel::onVisibilityChange, this, _2));
-
- mResolutionComboBox = getChild<LLUICtrl>("resolution_combobox");
- mResolutionComboBox->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, TRUE));
- mFilterComboBox = getChild<LLUICtrl>("filters_combobox");
- mFilterComboBox->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, TRUE));
- mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn");
- mBtnPreview = getChild<LLButton>("big_preview_btn");
- mWorkingLabel = getChild<LLUICtrl>("working_lbl");
- mThumbnailPlaceholder = getChild<LLUICtrl>("thumbnail_placeholder");
- mTitleTextBox = getChild<LLUICtrl>("photo_title");
- mDescriptionTextBox = getChild<LLUICtrl>("photo_description");
- mLocationCheckbox = getChild<LLUICtrl>("add_location_cb");
- mTagsTextBox = getChild<LLUICtrl>("photo_tags");
- mTagsTextBox->setValue(DEFAULT_TAG_TEXT);
- mRatingComboBox = getChild<LLUICtrl>("rating_combobox");
- mPostButton = getChild<LLUICtrl>("post_photo_btn");
- mCancelButton = getChild<LLUICtrl>("cancel_photo_btn");
- mBigPreviewFloater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview"));
-
- // Update filter list
- std::vector<std::string> filter_list = LLImageFiltersManager::getInstance()->getFiltersList();
- LLComboBox* filterbox = static_cast<LLComboBox *>(mFilterComboBox);
- for (U32 i = 0; i < filter_list.size(); i++)
- {
- filterbox->add(filter_list[i]);
- }
-
- return LLPanel::postBuild();
-}
-
-// virtual
-S32 LLFlickrPhotoPanel::notify(const LLSD& info)
-{
- if (info.has("snapshot-updating"))
- {
- // Disable the Post button and whatever else while the snapshot is not updated
- // updateControls();
- return 1;
- }
-
- if (info.has("snapshot-updated"))
- {
- // Enable the send/post/save buttons.
- updateControls();
-
- // The refresh button is initially hidden. We show it after the first update,
- // i.e. after snapshot is taken
- LLUICtrl * refresh_button = getRefreshBtn();
- if (!refresh_button->getVisible())
- {
- refresh_button->setVisible(true);
- }
- return 1;
- }
-
- return 0;
-}
-
-void LLFlickrPhotoPanel::draw()
-{
- LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get());
-
- // Enable interaction only if no transaction with the service is on-going (prevent duplicated posts)
- bool no_ongoing_connection = !(LLFlickrConnect::instance().isTransactionOngoing());
- mCancelButton->setEnabled(no_ongoing_connection);
- mTitleTextBox->setEnabled(no_ongoing_connection);
- mDescriptionTextBox->setEnabled(no_ongoing_connection);
- mTagsTextBox->setEnabled(no_ongoing_connection);
- mRatingComboBox->setEnabled(no_ongoing_connection);
- mResolutionComboBox->setEnabled(no_ongoing_connection);
- mFilterComboBox->setEnabled(no_ongoing_connection);
- mRefreshBtn->setEnabled(no_ongoing_connection);
- mBtnPreview->setEnabled(no_ongoing_connection);
- mLocationCheckbox->setEnabled(no_ongoing_connection);
-
- // Reassign the preview floater if we have the focus and the preview exists
- if (hasFocus() && isPreviewVisible())
- {
- attachPreview();
- }
-
- // Toggle the button state as appropriate
- bool preview_active = (isPreviewVisible() && mBigPreviewFloater->isFloaterOwner(getParentByType<LLFloater>()));
- mBtnPreview->setToggleState(preview_active);
-
- // Display the preview if one is available
- if (previewp && previewp->getThumbnailImage())
- {
- const LLRect& thumbnail_rect = mThumbnailPlaceholder->getRect();
- const S32 thumbnail_w = previewp->getThumbnailWidth();
- const S32 thumbnail_h = previewp->getThumbnailHeight();
-
- // calc preview offset within the preview rect
- const S32 local_offset_x = (thumbnail_rect.getWidth() - thumbnail_w) / 2 ;
- const S32 local_offset_y = (thumbnail_rect.getHeight() - thumbnail_h) / 2 ;
- S32 offset_x = thumbnail_rect.mLeft + local_offset_x;
- S32 offset_y = thumbnail_rect.mBottom + local_offset_y;
-
- gGL.matrixMode(LLRender::MM_MODELVIEW);
- // Apply floater transparency to the texture unless the floater is focused.
- F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
- LLColor4 color = LLColor4::white;
- gl_draw_scaled_image(offset_x, offset_y,
- thumbnail_w, thumbnail_h,
- previewp->getThumbnailImage(), color % alpha);
- }
-
- // Update the visibility of the working (computing preview) label
- mWorkingLabel->setVisible(!(previewp && previewp->getSnapshotUpToDate()));
-
- // Enable Post if we have a preview to send and no on going connection being processed
- mPostButton->setEnabled(no_ongoing_connection && (previewp && previewp->getSnapshotUpToDate()));
-
- // Draw the rest of the panel on top of it
- LLPanel::draw();
-}
-
-LLSnapshotLivePreview* LLFlickrPhotoPanel::getPreviewView()
-{
- LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)mPreviewHandle.get();
- return previewp;
-}
-
-void LLFlickrPhotoPanel::onVisibilityChange(BOOL visible)
-{
- if (visible)
- {
- if (mPreviewHandle.get())
- {
- LLSnapshotLivePreview* preview = getPreviewView();
- if(preview)
- {
- LL_DEBUGS() << "opened, updating snapshot" << LL_ENDL;
- preview->updateSnapshot(TRUE);
- }
- }
- else
- {
- LLRect full_screen_rect = getRootView()->getRect();
- LLSnapshotLivePreview::Params p;
- p.rect(full_screen_rect);
- LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(p);
- mPreviewHandle = previewp->getHandle();
-
- previewp->setContainer(this);
- previewp->setSnapshotType(LLSnapshotModel::SNAPSHOT_WEB);
- previewp->setSnapshotFormat(LLSnapshotModel::SNAPSHOT_FORMAT_PNG);
- previewp->setThumbnailSubsampled(TRUE); // We want the preview to reflect the *saved* image
- previewp->setAllowRenderUI(FALSE); // We do not want the rendered UI in our snapshots
- previewp->setAllowFullScreenPreview(FALSE); // No full screen preview in SL Share mode
- previewp->setThumbnailPlaceholderRect(mThumbnailPlaceholder->getRect());
-
- updateControls();
- }
- }
-}
-
-void LLFlickrPhotoPanel::onClickNewSnapshot()
-{
- LLSnapshotLivePreview* previewp = getPreviewView();
- if (previewp)
- {
- previewp->updateSnapshot(TRUE);
- }
-}
-
-void LLFlickrPhotoPanel::onClickBigPreview()
-{
- // Toggle the preview
- if (isPreviewVisible())
- {
- LLFloaterReg::hideInstance("big_preview");
- }
- else
- {
- attachPreview();
- LLFloaterReg::showInstance("big_preview");
- }
-}
-
-bool LLFlickrPhotoPanel::isPreviewVisible()
-{
- return (mBigPreviewFloater && mBigPreviewFloater->getVisible());
-}
-
-void LLFlickrPhotoPanel::attachPreview()
-{
- if (mBigPreviewFloater)
- {
- LLSnapshotLivePreview* previewp = getPreviewView();
- mBigPreviewFloater->setPreview(previewp);
- mBigPreviewFloater->setFloaterOwner(getParentByType<LLFloater>());
- }
-}
-
-void LLFlickrPhotoPanel::onSend()
-{
- LLEventPumps::instance().obtain("FlickrConnectState").stopListening("LLFlickrPhotoPanel"); // just in case it is already listening
- LLEventPumps::instance().obtain("FlickrConnectState").listen("LLFlickrPhotoPanel", boost::bind(&LLFlickrPhotoPanel::onFlickrConnectStateChange, this, _1));
-
- // Connect to Flickr if necessary and then post
- if (LLFlickrConnect::instance().isConnected())
- {
- sendPhoto();
- }
- else
- {
- LLFlickrConnect::instance().checkConnectionToFlickr(true);
- }
-}
-
-bool LLFlickrPhotoPanel::onFlickrConnectStateChange(const LLSD& data)
-{
- switch (data.get("enum").asInteger())
- {
- case LLFlickrConnect::FLICKR_CONNECTED:
- sendPhoto();
- break;
-
- case LLFlickrConnect::FLICKR_POSTED:
- LLEventPumps::instance().obtain("FlickrConnectState").stopListening("LLFlickrPhotoPanel");
- clearAndClose();
- break;
- }
-
- return false;
-}
-
-void LLFlickrPhotoPanel::sendPhoto()
-{
- // Get the title, description, and tags
- std::string title = mTitleTextBox->getValue().asString();
- std::string description = mDescriptionTextBox->getValue().asString();
- std::string tags = mTagsTextBox->getValue().asString();
-
- // Add the location if required
- bool add_location = mLocationCheckbox->getValue().asBoolean();
- if (add_location)
- {
- // Get the SLURL for the location
- LLSLURL slurl;
- LLAgentUI::buildSLURL(slurl);
- std::string slurl_string = slurl.getSLURLString();
-
- // Add query parameters so Google Analytics can track incoming clicks!
- slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS;
-
- std::string photo_link_text = "Visit this location";// at [] in Second Life";
- std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName();
- if (!parcel_name.empty())
- {
- boost::regex pattern = boost::regex("\\S\\.[a-zA-Z]{2,}");
- boost::match_results<std::string::const_iterator> matches;
- if(!boost::regex_search(parcel_name, matches, pattern))
- {
- photo_link_text += " at " + parcel_name;
- }
- }
- photo_link_text += " in Second Life";
-
- slurl_string = "<a href=\"" + slurl_string + "\">" + photo_link_text + "</a>";
-
- // Add it to the description (pretty crude, but we don't have a better option with photos)
- if (description.empty())
- description = slurl_string;
- else
- description = description + "\n\n" + slurl_string;
-
- // Also add special "machine tags" with location metadata
- const LLVector3& agent_pos_region = gAgent.getPositionAgent();
- LLViewerRegion* region = gAgent.getRegion();
- LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if (region && parcel)
- {
- S32 pos_x = S32(agent_pos_region.mV[VX]);
- S32 pos_y = S32(agent_pos_region.mV[VY]);
- S32 pos_z = S32(agent_pos_region.mV[VZ]);
-
- std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName();
- std::string region_name = region->getName();
-
- if (!region_name.empty())
- {
- tags += llformat(" \"%s:region=%s\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), region_name.c_str());
- }
- if (!parcel_name.empty())
- {
- tags += llformat(" \"%s:parcel=%s\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), parcel_name.c_str());
- }
- tags += llformat(" \"%s:x=%d\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), pos_x);
- tags += llformat(" \"%s:y=%d\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), pos_y);
- tags += llformat(" \"%s:z=%d\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), pos_z);
- }
- }
-
- // Get the content rating
- int content_rating = mRatingComboBox->getValue().asInteger();
-
- // Get the image
- LLSnapshotLivePreview* previewp = getPreviewView();
-
- // Post to Flickr
- LLFlickrConnect::instance().uploadPhoto(previewp->getFormattedImage(), title, description, tags, content_rating);
-
- updateControls();
-}
-
-void LLFlickrPhotoPanel::clearAndClose()
-{
- mTitleTextBox->setValue("");
- mDescriptionTextBox->setValue("");
-
- LLFloater* floater = getParentByType<LLFloater>();
- if (floater)
- {
- floater->closeFloater();
- if (mBigPreviewFloater)
- {
- mBigPreviewFloater->closeOnFloaterOwnerClosing(floater);
- }
- }
-}
-
-void LLFlickrPhotoPanel::updateControls()
-{
- LLSnapshotLivePreview* previewp = getPreviewView();
- BOOL got_snap = previewp && previewp->getSnapshotUpToDate();
-
- // *TODO: Separate maximum size for Web images from postcards
- LL_DEBUGS() << "Is snapshot up-to-date? " << got_snap << LL_ENDL;
-
- updateResolution(FALSE);
-}
-
-void LLFlickrPhotoPanel::updateResolution(BOOL do_update)
-{
- LLComboBox* combobox = static_cast<LLComboBox *>(mResolutionComboBox);
- LLComboBox* filterbox = static_cast<LLComboBox *>(mFilterComboBox);
-
- std::string sdstring = combobox->getSelectedValue();
- LLSD sdres;
- std::stringstream sstream(sdstring);
- LLSDSerialize::fromNotation(sdres, sstream, sdstring.size());
-
- S32 width = sdres[0];
- S32 height = sdres[1];
-
- // Note : index 0 of the filter drop down is assumed to be "No filter" in whichever locale
- std::string filter_name = (filterbox->getCurrentIndex() ? filterbox->getSimple() : "");
-
- LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get());
- if (previewp && combobox->getCurrentIndex() >= 0)
- {
- S32 original_width = 0 , original_height = 0 ;
- previewp->getSize(original_width, original_height) ;
-
- if (width == 0 || height == 0)
- {
- // take resolution from current window size
- LL_DEBUGS() << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << LL_ENDL;
- previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw());
- }
- else
- {
- // use the resolution from the selected pre-canned drop-down choice
- LL_DEBUGS() << "Setting preview res selected from combo: " << width << "x" << height << LL_ENDL;
- previewp->setSize(width, height);
- }
-
- checkAspectRatio(width);
-
- previewp->getSize(width, height);
- if ((original_width != width) || (original_height != height))
- {
- previewp->setSize(width, height);
- if (do_update)
- {
- previewp->updateSnapshot(TRUE);
- updateControls();
- }
- }
- // Get the old filter, compare to the current one "filter_name" and set if changed
- std::string original_filter = previewp->getFilter();
- if (original_filter != filter_name)
- {
- previewp->setFilter(filter_name);
- if (do_update)
- {
- previewp->updateSnapshot(FALSE, TRUE);
- updateControls();
- }
- }
- }
-}
-
-void LLFlickrPhotoPanel::checkAspectRatio(S32 index)
-{
- LLSnapshotLivePreview *previewp = getPreviewView() ;
-
- BOOL keep_aspect = FALSE;
-
- if (0 == index) // current window size
- {
- keep_aspect = TRUE;
- }
- else // predefined resolution
- {
- keep_aspect = FALSE;
- }
-
- if (previewp)
- {
- previewp->mKeepAspectRatio = keep_aspect;
- }
-}
-
-LLUICtrl* LLFlickrPhotoPanel::getRefreshBtn()
-{
- return mRefreshBtn;
-}
-
-///////////////////////////
-//LLFlickrAccountPanel//////
-///////////////////////////
-
-LLFlickrAccountPanel::LLFlickrAccountPanel() :
-mAccountCaptionLabel(NULL),
-mAccountNameLabel(NULL),
-mPanelButtons(NULL),
-mConnectButton(NULL),
-mDisconnectButton(NULL)
-{
- mCommitCallbackRegistrar.add("SocialSharing.Connect", boost::bind(&LLFlickrAccountPanel::onConnect, this));
- mCommitCallbackRegistrar.add("SocialSharing.Disconnect", boost::bind(&LLFlickrAccountPanel::onDisconnect, this));
-
- setVisibleCallback(boost::bind(&LLFlickrAccountPanel::onVisibilityChange, this, _2));
-}
-
-BOOL LLFlickrAccountPanel::postBuild()
-{
- mAccountCaptionLabel = getChild<LLTextBox>("account_caption_label");
- mAccountNameLabel = getChild<LLTextBox>("account_name_label");
- mPanelButtons = getChild<LLUICtrl>("panel_buttons");
- mConnectButton = getChild<LLUICtrl>("connect_btn");
- mDisconnectButton = getChild<LLUICtrl>("disconnect_btn");
-
- return LLPanel::postBuild();
-}
-
-void LLFlickrAccountPanel::draw()
-{
- LLFlickrConnect::EConnectionState connection_state = LLFlickrConnect::instance().getConnectionState();
-
- //Disable the 'disconnect' button and the 'use another account' button when disconnecting in progress
- bool disconnecting = connection_state == LLFlickrConnect::FLICKR_DISCONNECTING;
- mDisconnectButton->setEnabled(!disconnecting);
-
- //Disable the 'connect' button when a connection is in progress
- bool connecting = connection_state == LLFlickrConnect::FLICKR_CONNECTION_IN_PROGRESS;
- mConnectButton->setEnabled(!connecting);
-
- LLPanel::draw();
-}
-
-void LLFlickrAccountPanel::onVisibilityChange(BOOL visible)
-{
- if(visible)
- {
- LLEventPumps::instance().obtain("FlickrConnectState").stopListening("LLFlickrAccountPanel");
- LLEventPumps::instance().obtain("FlickrConnectState").listen("LLFlickrAccountPanel", boost::bind(&LLFlickrAccountPanel::onFlickrConnectStateChange, this, _1));
-
- LLEventPumps::instance().obtain("FlickrConnectInfo").stopListening("LLFlickrAccountPanel");
- LLEventPumps::instance().obtain("FlickrConnectInfo").listen("LLFlickrAccountPanel", boost::bind(&LLFlickrAccountPanel::onFlickrConnectInfoChange, this));
-
- //Connected
- if(LLFlickrConnect::instance().isConnected())
- {
- showConnectedLayout();
- }
- //Check if connected (show disconnected layout in meantime)
- else
- {
- showDisconnectedLayout();
- }
- if ((LLFlickrConnect::instance().getConnectionState() == LLFlickrConnect::FLICKR_NOT_CONNECTED) ||
- (LLFlickrConnect::instance().getConnectionState() == LLFlickrConnect::FLICKR_CONNECTION_FAILED))
- {
- LLFlickrConnect::instance().checkConnectionToFlickr();
- }
- }
- else
- {
- LLEventPumps::instance().obtain("FlickrConnectState").stopListening("LLFlickrAccountPanel");
- LLEventPumps::instance().obtain("FlickrConnectInfo").stopListening("LLFlickrAccountPanel");
- }
-}
-
-bool LLFlickrAccountPanel::onFlickrConnectStateChange(const LLSD& data)
-{
- if(LLFlickrConnect::instance().isConnected())
- {
- //In process of disconnecting so leave the layout as is
- if(data.get("enum").asInteger() != LLFlickrConnect::FLICKR_DISCONNECTING)
- {
- showConnectedLayout();
- }
- }
- else
- {
- showDisconnectedLayout();
- }
-
- return false;
-}
-
-bool LLFlickrAccountPanel::onFlickrConnectInfoChange()
-{
- LLSD info = LLFlickrConnect::instance().getInfo();
- std::string clickable_name;
-
- //Strings of format [http://www.somewebsite.com Click Me] become clickable text
- if(info.has("link") && info.has("name"))
- {
- clickable_name = "[" + info["link"].asString() + " " + info["name"].asString() + "]";
- }
-
- mAccountNameLabel->setText(clickable_name);
-
- return false;
-}
-
-void LLFlickrAccountPanel::showConnectButton()
-{
- if(!mConnectButton->getVisible())
- {
- mConnectButton->setVisible(TRUE);
- mDisconnectButton->setVisible(FALSE);
- }
-}
-
-void LLFlickrAccountPanel::hideConnectButton()
-{
- if(mConnectButton->getVisible())
- {
- mConnectButton->setVisible(FALSE);
- mDisconnectButton->setVisible(TRUE);
- }
-}
-
-void LLFlickrAccountPanel::showDisconnectedLayout()
-{
- mAccountCaptionLabel->setText(getString("flickr_disconnected"));
- mAccountNameLabel->setText(std::string(""));
- showConnectButton();
-}
-
-void LLFlickrAccountPanel::showConnectedLayout()
-{
- LLFlickrConnect::instance().loadFlickrInfo();
-
- mAccountCaptionLabel->setText(getString("flickr_connected"));
- hideConnectButton();
-}
-
-void LLFlickrAccountPanel::onConnect()
-{
- LLFlickrConnect::instance().checkConnectionToFlickr(true);
-}
-
-void LLFlickrAccountPanel::onDisconnect()
-{
- LLFlickrConnect::instance().disconnectFromFlickr();
-}
-
-////////////////////////
-//LLFloaterFlickr///////
-////////////////////////
-
-LLFloaterFlickr::LLFloaterFlickr(const LLSD& key) : LLFloater(key),
- mFlickrPhotoPanel(NULL),
- mStatusErrorText(NULL),
- mStatusLoadingText(NULL),
- mStatusLoadingIndicator(NULL)
-{
- mCommitCallbackRegistrar.add("SocialSharing.Cancel", boost::bind(&LLFloaterFlickr::onCancel, this));
-}
-
-void LLFloaterFlickr::onClose(bool app_quitting)
-{
- LLFloaterBigPreview* big_preview_floater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview"));
- if (big_preview_floater)
- {
- big_preview_floater->closeOnFloaterOwnerClosing(this);
- }
- LLFloater::onClose(app_quitting);
-}
-
-void LLFloaterFlickr::onCancel()
-{
- LLFloaterBigPreview* big_preview_floater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview"));
- if (big_preview_floater)
- {
- big_preview_floater->closeOnFloaterOwnerClosing(this);
- }
- closeFloater();
-}
-
-BOOL LLFloaterFlickr::postBuild()
-{
- // Keep tab of the Photo Panel
- mFlickrPhotoPanel = static_cast<LLFlickrPhotoPanel*>(getChild<LLUICtrl>("panel_flickr_photo"));
- // Connection status widgets
- mStatusErrorText = getChild<LLTextBox>("connection_error_text");
- mStatusLoadingText = getChild<LLTextBox>("connection_loading_text");
- mStatusLoadingIndicator = getChild<LLUICtrl>("connection_loading_indicator");
- return LLFloater::postBuild();
-}
-
-void LLFloaterFlickr::showPhotoPanel()
-{
- LLTabContainer* parent = dynamic_cast<LLTabContainer*>(mFlickrPhotoPanel->getParent());
- if (!parent)
- {
- LL_WARNS() << "Cannot find panel container" << LL_ENDL;
- return;
- }
-
- parent->selectTabPanel(mFlickrPhotoPanel);
-}
-
-void LLFloaterFlickr::draw()
-{
- if (mStatusErrorText && mStatusLoadingText && mStatusLoadingIndicator)
- {
- mStatusErrorText->setVisible(false);
- mStatusLoadingText->setVisible(false);
- mStatusLoadingIndicator->setVisible(false);
- LLFlickrConnect::EConnectionState connection_state = LLFlickrConnect::instance().getConnectionState();
- std::string status_text;
-
- switch (connection_state)
- {
- case LLFlickrConnect::FLICKR_NOT_CONNECTED:
- // No status displayed when first opening the panel and no connection done
- case LLFlickrConnect::FLICKR_CONNECTED:
- // When successfully connected, no message is displayed
- case LLFlickrConnect::FLICKR_POSTED:
- // No success message to show since we actually close the floater after successful posting completion
- break;
- case LLFlickrConnect::FLICKR_CONNECTION_IN_PROGRESS:
- // Connection loading indicator
- mStatusLoadingText->setVisible(true);
- status_text = LLTrans::getString("SocialFlickrConnecting");
- mStatusLoadingText->setValue(status_text);
- mStatusLoadingIndicator->setVisible(true);
- break;
- case LLFlickrConnect::FLICKR_POSTING:
- // Posting indicator
- mStatusLoadingText->setVisible(true);
- status_text = LLTrans::getString("SocialFlickrPosting");
- mStatusLoadingText->setValue(status_text);
- mStatusLoadingIndicator->setVisible(true);
- break;
- case LLFlickrConnect::FLICKR_CONNECTION_FAILED:
- // Error connecting to the service
- mStatusErrorText->setVisible(true);
- status_text = LLTrans::getString("SocialFlickrErrorConnecting");
- mStatusErrorText->setValue(status_text);
- break;
- case LLFlickrConnect::FLICKR_POST_FAILED:
- // Error posting to the service
- mStatusErrorText->setVisible(true);
- status_text = LLTrans::getString("SocialFlickrErrorPosting");
- mStatusErrorText->setValue(status_text);
- break;
- case LLFlickrConnect::FLICKR_DISCONNECTING:
- // Disconnecting loading indicator
- mStatusLoadingText->setVisible(true);
- status_text = LLTrans::getString("SocialFlickrDisconnecting");
- mStatusLoadingText->setValue(status_text);
- mStatusLoadingIndicator->setVisible(true);
- break;
- case LLFlickrConnect::FLICKR_DISCONNECT_FAILED:
- // Error disconnecting from the service
- mStatusErrorText->setVisible(true);
- status_text = LLTrans::getString("SocialFlickrErrorDisconnecting");
- mStatusErrorText->setValue(status_text);
- break;
- }
- }
- LLFloater::draw();
-}
-
diff --git a/indra/newview/llfloaterflickr.h b/indra/newview/llfloaterflickr.h
deleted file mode 100644
index 74da3bcea9..0000000000
--- a/indra/newview/llfloaterflickr.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
-* @file llfloaterflickr.h
-* @brief Header file for llfloaterflickr
-* @author cho@lindenlab.com
-*
-* $LicenseInfo:firstyear=2013&license=viewerlgpl$
-* Second Life Viewer Source Code
-* Copyright (C) 2013, Linden Research, Inc.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation;
-* version 2.1 of the License only.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-* $/LicenseInfo$
-*/
-#ifndef LL_LLFLOATERFLICKR_H
-#define LL_LLFLOATERFLICKR_H
-
-#include "llfloater.h"
-#include "lltextbox.h"
-#include "llviewertexture.h"
-
-class LLIconCtrl;
-class LLCheckBoxCtrl;
-class LLSnapshotLivePreview;
-class LLFloaterBigPreview;
-
-class LLFlickrPhotoPanel : public LLPanel
-{
-public:
- LLFlickrPhotoPanel();
- ~LLFlickrPhotoPanel();
-
- BOOL postBuild();
- S32 notify(const LLSD& info);
- void draw();
-
- LLSnapshotLivePreview* getPreviewView();
- void onVisibilityChange(BOOL new_visibility);
- void onClickNewSnapshot();
- void onClickBigPreview();
- void onSend();
- bool onFlickrConnectStateChange(const LLSD& data);
-
- void sendPhoto();
- void clearAndClose();
-
- void updateControls();
- void updateResolution(BOOL do_update);
- void checkAspectRatio(S32 index);
- LLUICtrl* getRefreshBtn();
-
-private:
- bool isPreviewVisible();
- void attachPreview();
-
- LLHandle<LLView> mPreviewHandle;
-
- LLUICtrl * mResolutionComboBox;
- LLUICtrl * mFilterComboBox;
- LLUICtrl * mRefreshBtn;
- LLUICtrl * mWorkingLabel;
- LLUICtrl * mThumbnailPlaceholder;
- LLUICtrl * mTitleTextBox;
- LLUICtrl * mDescriptionTextBox;
- LLUICtrl * mLocationCheckbox;
- LLUICtrl * mTagsTextBox;
- LLUICtrl * mRatingComboBox;
- LLUICtrl * mPostButton;
- LLUICtrl * mCancelButton;
- LLButton * mBtnPreview;
-
- LLFloaterBigPreview * mBigPreviewFloater;
-};
-
-class LLFlickrAccountPanel : public LLPanel
-{
-public:
- LLFlickrAccountPanel();
- BOOL postBuild();
- void draw();
-
-private:
- void onVisibilityChange(BOOL new_visibility);
- bool onFlickrConnectStateChange(const LLSD& data);
- bool onFlickrConnectInfoChange();
- void onConnect();
- void onUseAnotherAccount();
- void onDisconnect();
-
- void showConnectButton();
- void hideConnectButton();
- void showDisconnectedLayout();
- void showConnectedLayout();
-
- LLTextBox * mAccountCaptionLabel;
- LLTextBox * mAccountNameLabel;
- LLUICtrl * mPanelButtons;
- LLUICtrl * mConnectButton;
- LLUICtrl * mDisconnectButton;
-};
-
-
-class LLFloaterFlickr : public LLFloater
-{
-public:
- LLFloaterFlickr(const LLSD& key);
- BOOL postBuild();
- void draw();
- void onClose(bool app_quitting);
- void onCancel();
-
- void showPhotoPanel();
-
-private:
- LLFlickrPhotoPanel* mFlickrPhotoPanel;
- LLTextBox* mStatusErrorText;
- LLTextBox* mStatusLoadingText;
- LLUICtrl* mStatusLoadingIndicator;
-};
-
-#endif // LL_LLFLOATERFLICKR_H
-
diff --git a/indra/newview/llfloaterforgetuser.cpp b/indra/newview/llfloaterforgetuser.cpp
index 5659cb2f79..97b022699f 100644
--- a/indra/newview/llfloaterforgetuser.cpp
+++ b/indra/newview/llfloaterforgetuser.cpp
@@ -29,11 +29,15 @@
#include "llfloaterforgetuser.h"
+#include "llappviewer.h"
#include "llcheckboxctrl.h"
#include "llfavoritesbar.h"
+#include "llnotificationsutil.h"
#include "llpanellogin.h" // for helper function getUserName() and to repopulate list if nessesary
#include "llscrolllistctrl.h"
#include "llsecapi.h"
+#include "llstartup.h"
+#include "llviewercontrol.h"
#include "llviewernetwork.h"
@@ -54,52 +58,69 @@ LLFloaterForgetUser::~LLFloaterForgetUser()
BOOL LLFloaterForgetUser::postBuild()
{
- // Note, storage works per grid, watever is selected currently in login screen or logged in.
- // Since login screen can change grid, store the value.
- mGrid = LLGridManager::getInstance()->getGrid();
+ mScrollList = getChild<LLScrollListCtrl>("user_list");
- LLScrollListCtrl *scroll_list = getChild<LLScrollListCtrl>("user_list");
- if (gSecAPIHandler->hasCredentialMap("login_list", mGrid))
- {
- LLSecAPIHandler::credential_map_t credencials;
- gSecAPIHandler->loadCredentialMap("login_list", mGrid, credencials);
- LLSecAPIHandler::credential_map_t::iterator cr_iter = credencials.begin();
- LLSecAPIHandler::credential_map_t::iterator cr_end = credencials.end();
- while (cr_iter != cr_end)
+ bool show_grid_marks = gSavedSettings.getBOOL("ForceShowGrid");
+ show_grid_marks |= !LLGridManager::getInstance()->isInProductionGrid();
+
+ std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids();
+
+ if (!show_grid_marks)
+ {
+ // Figure out if there are records for more than one grid in storage
+ for (std::map<std::string, std::string>::iterator grid_iter = known_grids.begin();
+ grid_iter != known_grids.end();
+ grid_iter++)
{
- if (cr_iter->second.notNull()) // basic safety
+ if (!grid_iter->first.empty()
+ && grid_iter->first != MAINGRID) // a workaround since 'mIsInProductionGrid' might not be set
{
- LLScrollListItem::Params item_params;
- item_params.value(cr_iter->first);
- item_params.columns.add()
- .value(LLPanelLogin::getUserName(cr_iter->second))
- .column("user")
- .font(LLFontGL::getFontSansSerifSmall());
- scroll_list->addRow(item_params, ADD_BOTTOM);
+ if (!gSecAPIHandler->emptyCredentialMap("login_list", grid_iter->first))
+ {
+ show_grid_marks = true;
+ break;
+ }
+
+ // "Legacy" viewer support
+ LLPointer<LLCredential> cred = gSecAPIHandler->loadCredential(grid_iter->first);
+ if (cred.notNull())
+ {
+ const LLSD &ident = cred->getIdentifier();
+ if (ident.isMap() && ident.has("type"))
+ {
+ show_grid_marks = true;
+ break;
+ }
+ }
}
- cr_iter++;
}
- scroll_list->selectFirstItem();
+ }
+
+ mUserGridsCount.clear();
+ if (!show_grid_marks)
+ {
+ // just load maingrid
+ loadGridToList(MAINGRID, false);
}
else
{
- LLPointer<LLCredential> cred = gSecAPIHandler->loadCredential(mGrid);
- if (cred.notNull())
+ for (std::map<std::string, std::string>::iterator grid_iter = known_grids.begin();
+ grid_iter != known_grids.end();
+ grid_iter++)
{
- LLScrollListItem::Params item_params;
- item_params.value(cred->userID());
- item_params.columns.add()
- .value(LLPanelLogin::getUserName(cred))
- .column("user")
- .font(LLFontGL::getFontSansSerifSmall());
- scroll_list->addRow(item_params, ADD_BOTTOM);
- scroll_list->selectFirstItem();
+ if (!grid_iter->first.empty())
+ {
+ loadGridToList(grid_iter->first, true);
+ }
}
}
- bool enable_button = scroll_list->getFirstSelectedIndex() != -1;
- getChild<LLView>("delete_data")->setEnabled(enable_button);
+ mScrollList->selectFirstItem();
+ bool enable_button = mScrollList->getFirstSelectedIndex() != -1;
+ LLCheckBoxCtrl *chk_box = getChild<LLCheckBoxCtrl>("delete_data");
+ chk_box->setEnabled(enable_button);
+ chk_box->set(FALSE);
LLButton *button = getChild<LLButton>("forget");
button->setEnabled(enable_button);
button->setCommitCallback(boost::bind(&LLFloaterForgetUser::onForgetClicked, this));
@@ -109,36 +130,88 @@ BOOL LLFloaterForgetUser::postBuild()
void LLFloaterForgetUser::onForgetClicked()
{
- mLoginPanelDirty = true;
LLScrollListCtrl *scroll_list = getChild<LLScrollListCtrl>("user_list");
- std::string user_key = scroll_list->getSelectedValue();
+ LLSD user_data = scroll_list->getSelectedValue();
+ const std::string user_id = user_data["user_id"];
- // remove creds
- gSecAPIHandler->removeFromCredentialMap("login_list", mGrid, user_key);
+ LLCheckBoxCtrl *chk_box = getChild<LLCheckBoxCtrl>("delete_data");
+ BOOL delete_data = chk_box->getValue();
- LLPointer<LLCredential> cred = gSecAPIHandler->loadCredential(mGrid);
- if (cred.notNull() && cred->userID() == user_key)
+ if (delete_data && mUserGridsCount[user_id] > 1)
{
- gSecAPIHandler->deleteCredential(cred);
+ // more than 1 grid uses this id
+ LLNotificationsUtil::add("LoginRemoveMultiGridUserData", LLSD(), LLSD(), boost::bind(&LLFloaterForgetUser::onConfirmForget, this, _1, _2));
+ return;
}
- // Clean data
- LLCheckBoxCtrl *chk_box = getChild<LLCheckBoxCtrl>("delete_data");
- BOOL delete_data = chk_box->getValue();
- if (delete_data)
+ processForgetUser();
+}
+
+bool LLFloaterForgetUser::onConfirmForget(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option == 0)
{
- // key is edentical to one we use for name of user's folder
- std::string user_path = gDirUtilp->getOSUserAppDir() + gDirUtilp->getDirDelimiter() + user_key;
- gDirUtilp->deleteDirAndContents(user_path);
+ processForgetUser();
+ }
+ return false;
+}
- // Clean favorites, label is edentical to username
- LLFavoritesOrderStorage::removeFavoritesRecordOfUser(scroll_list->getSelectedItemLabel(), mGrid);
+// static
+bool LLFloaterForgetUser::onConfirmLogout(const LLSD& notification, const LLSD& response, const std::string &fav_id, const std::string &grid)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option == 0)
+ {
+ // Remove creds
+ gSecAPIHandler->removeFromCredentialMap("login_list", grid, LLStartUp::getUserId());
- // Note: we do not clean user-related files from cache because there are id dependent (inventory)
- // files and cache has separate cleaning mechanism either way.
- // Also this only cleans user from current grid, not all of them.
+ LLPointer<LLCredential> cred = gSecAPIHandler->loadCredential(grid);
+ if (cred.notNull() && cred->userID() == LLStartUp::getUserId())
+ {
+ gSecAPIHandler->deleteCredential(cred);
+ }
+
+ // Clean favorites
+ LLFavoritesOrderStorage::removeFavoritesRecordOfUser(fav_id, grid);
+
+ // mark data for removal
+ LLAppViewer::instance()->purgeUserDataOnExit();
+ LLAppViewer::instance()->requestQuit();
}
+ return false;
+}
+
+void LLFloaterForgetUser::processForgetUser()
+{
+ LLScrollListCtrl *scroll_list = getChild<LLScrollListCtrl>("user_list");
+ LLCheckBoxCtrl *chk_box = getChild<LLCheckBoxCtrl>("delete_data");
+ BOOL delete_data = chk_box->getValue();
+ LLSD user_data = scroll_list->getSelectedValue();
+ const std::string user_id = user_data["user_id"];
+ const std::string grid = user_data["grid"];
+ const std::string user_name = user_data["label"]; // for favorites
+ if (delete_data && user_id == LLStartUp::getUserId() && LLStartUp::getStartupState() > STATE_LOGIN_WAIT)
+ {
+ // we can't delete data for user that is currently logged in
+ // we need to pass grid because we are deleting data universal to grids, but specific grid's user
+ LLNotificationsUtil::add("LoginCantRemoveCurUsername", LLSD(), LLSD(), boost::bind(onConfirmLogout, _1, _2, user_name, grid));
+ return;
+ }
+
+ // key is used for name of user's folder and in credencials
+ // user_name is edentical to favorite's username
+ forgetUser(user_id, user_name, grid, delete_data);
+ mLoginPanelDirty = true;
+ if (delete_data)
+ {
+ mUserGridsCount[user_id] = 0; //no data left to care about
+ }
+ else
+ {
+ mUserGridsCount[user_id]--;
+ }
// Update UI
scroll_list->deleteSelectedItems();
@@ -151,4 +224,125 @@ void LLFloaterForgetUser::onForgetClicked()
}
}
+//static
+void LLFloaterForgetUser::forgetUser(const std::string &userid, const std::string &fav_id, const std::string &grid, bool delete_data)
+{
+ // Remove creds
+ gSecAPIHandler->removeFromCredentialMap("login_list", grid, userid);
+
+ LLPointer<LLCredential> cred = gSecAPIHandler->loadCredential(grid);
+ if (cred.notNull() && cred->userID() == userid)
+ {
+ gSecAPIHandler->deleteCredential(cred);
+ }
+
+ // Clean data
+ if (delete_data)
+ {
+ std::string user_path = gDirUtilp->getOSUserAppDir() + gDirUtilp->getDirDelimiter() + userid;
+ gDirUtilp->deleteDirAndContents(user_path);
+
+ // Clean favorites
+ LLFavoritesOrderStorage::removeFavoritesRecordOfUser(fav_id, grid);
+
+ // Note: we do not clean user-related files from cache because there are id dependent (inventory)
+ // files and cache has separate cleaning mechanism either way.
+ // Also this only cleans user from current grid, not all of them.
+ }
+}
+
+void LLFloaterForgetUser::loadGridToList(const std::string &grid, bool show_grid_name)
+{
+ std::string grid_label;
+ if (show_grid_name)
+ {
+ grid_label = LLGridManager::getInstance()->getGridId(grid); //login id (shortened label)
+ }
+ if (gSecAPIHandler->hasCredentialMap("login_list", grid))
+ {
+ LLSecAPIHandler::credential_map_t credencials;
+ gSecAPIHandler->loadCredentialMap("login_list", grid, credencials);
+
+ LLSecAPIHandler::credential_map_t::iterator cr_iter = credencials.begin();
+ LLSecAPIHandler::credential_map_t::iterator cr_end = credencials.end();
+ while (cr_iter != cr_end)
+ {
+ if (cr_iter->second.notNull()) // basic safety
+ {
+ std::string user_label = LLPanelLogin::getUserName(cr_iter->second);
+ LLSD user_data;
+ user_data["user_id"] = cr_iter->first;
+ user_data["label"] = user_label;
+ user_data["grid"] = grid;
+
+ if (show_grid_name)
+ {
+ user_label += " (" + grid_label + ")";
+ }
+
+ LLScrollListItem::Params item_params;
+ item_params.value(user_data);
+ item_params.columns.add()
+ .value(user_label)
+ .column("user")
+ .font(LLFontGL::getFontSansSerifSmall());
+ mScrollList->addRow(item_params, ADD_BOTTOM);
+
+ // Add one to grid count
+ std::map<std::string, S32>::iterator found = mUserGridsCount.find(cr_iter->first);
+ if (found != mUserGridsCount.end())
+ {
+ found->second++;
+ }
+ else
+ {
+ mUserGridsCount[cr_iter->first] = 1;
+ }
+ }
+ cr_iter++;
+ }
+ }
+ else
+ {
+ // "Legacy" viewer support
+ LLPointer<LLCredential> cred = gSecAPIHandler->loadCredential(grid);
+ if (cred.notNull())
+ {
+ const LLSD &ident = cred->getIdentifier();
+ if (ident.isMap() && ident.has("type"))
+ {
+ std::string user_label = LLPanelLogin::getUserName(cred);
+ LLSD user_data;
+ user_data["user_id"] = cred->userID();
+ user_data["label"] = user_label;
+ user_data["grid"] = grid;
+
+ if (show_grid_name)
+ {
+ user_label += " (" + grid_label + ")";
+ }
+
+ LLScrollListItem::Params item_params;
+ item_params.value(user_data);
+ item_params.columns.add()
+ .value(user_label)
+ .column("user")
+ .font(LLFontGL::getFontSansSerifSmall());
+ mScrollList->addRow(item_params, ADD_BOTTOM);
+
+ // Add one to grid count
+ std::map<std::string, S32>::iterator found = mUserGridsCount.find(cred->userID());
+ if (found != mUserGridsCount.end())
+ {
+ found->second++;
+ }
+ else
+ {
+ mUserGridsCount[cred->userID()] = 1;
+ }
+ }
+ }
+ }
+}
+
diff --git a/indra/newview/llfloaterforgetuser.h b/indra/newview/llfloaterforgetuser.h
index 119aece2d1..801fcbb412 100644
--- a/indra/newview/llfloaterforgetuser.h
+++ b/indra/newview/llfloaterforgetuser.h
@@ -29,6 +29,8 @@
#include "llfloater.h"
+class LLScrollListCtrl;
+
class LLFloaterForgetUser : public LLFloater
{
public:
@@ -39,8 +41,16 @@ public:
void onForgetClicked();
private:
+ bool onConfirmForget(const LLSD& notification, const LLSD& response);
+ static bool onConfirmLogout(const LLSD& notification, const LLSD& response, const std::string &favorites_id, const std::string &grid);
+ void processForgetUser();
+ static void forgetUser(const std::string &userid, const std::string &fav_id, const std::string &grid, bool delete_data);
+ void loadGridToList(const std::string &grid, bool show_grid_name);
+
+ LLScrollListCtrl *mScrollList;
+
bool mLoginPanelDirty;
- std::string mGrid;
+ std::map<std::string, S32> mUserGridsCount;
};
#endif
diff --git a/indra/newview/llfloateroutfitsnapshot.cpp b/indra/newview/llfloateroutfitsnapshot.cpp
index bfcd1b8b47..dccef88e41 100644
--- a/indra/newview/llfloateroutfitsnapshot.cpp
+++ b/indra/newview/llfloateroutfitsnapshot.cpp
@@ -31,8 +31,6 @@
#include "llagent.h"
#include "llfloaterreg.h"
-#include "llfloaterflickr.h"
-#include "llfloatertwitter.h"
#include "llimagefiltersmanager.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 2798e375c7..ef7a9fd536 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -29,8 +29,6 @@
#include "llfloatersnapshot.h"
#include "llfloaterreg.h"
-#include "llfloaterflickr.h"
-#include "llfloatertwitter.h"
#include "llimagefiltersmanager.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
@@ -1240,10 +1238,7 @@ BOOL LLFloaterSnapshot::isWaitingState()
BOOL LLFloaterSnapshotBase::ImplBase::updatePreviewList(bool initialized)
{
- LLFloaterFlickr* floater_flickr = LLFloaterReg::findTypedInstance<LLFloaterFlickr>("flickr");
- LLFloaterTwitter* floater_twitter = LLFloaterReg::findTypedInstance<LLFloaterTwitter>("twitter");
-
- if (!initialized && !floater_flickr && !floater_twitter)
+ if (!initialized)
return FALSE;
BOOL changed = FALSE;
diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp
deleted file mode 100644
index 2b33bc6935..0000000000
--- a/indra/newview/llfloatertwitter.cpp
+++ /dev/null
@@ -1,810 +0,0 @@
-/**
-* @file llfloatertwitter.cpp
-* @brief Implementation of llfloatertwitter
-* @author cho@lindenlab.com
-*
-* $LicenseInfo:firstyear=2013&license=viewerlgpl$
-* Second Life Viewer Source Code
-* Copyright (C) 2013, Linden Research, Inc.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation;
-* version 2.1 of the License only.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-* $/LicenseInfo$
-*/
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloatertwitter.h"
-
-#include "llagent.h"
-#include "llagentui.h"
-#include "llcheckboxctrl.h"
-#include "llcombobox.h"
-#include "lltwitterconnect.h"
-#include "llfloaterbigpreview.h"
-#include "llfloaterreg.h"
-#include "lliconctrl.h"
-#include "llimagefiltersmanager.h"
-#include "llresmgr.h" // LLLocale
-#include "llsdserialize.h"
-#include "llloadingindicator.h"
-#include "llslurl.h"
-#include "lltrans.h"
-#include "llsnapshotlivepreview.h"
-#include "llviewerregion.h"
-#include "llviewercontrol.h"
-#include "llviewermedia.h"
-#include "lltabcontainer.h"
-#include "lltexteditor.h"
-
-static LLPanelInjector<LLTwitterPhotoPanel> t_panel_photo("lltwitterphotopanel");
-static LLPanelInjector<LLTwitterAccountPanel> t_panel_account("lltwitteraccountpanel");
-
-const std::string DEFAULT_PHOTO_LOCATION_URL = "http://maps.secondlife.com/";
-const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=twitter&utm_medium=photo&utm_campaign=slshare";
-const std::string DEFAULT_STATUS_TEXT = " #SecondLife";
-
-///////////////////////////
-//LLTwitterPhotoPanel///////
-///////////////////////////
-
-LLTwitterPhotoPanel::LLTwitterPhotoPanel() :
-mResolutionComboBox(NULL),
-mRefreshBtn(NULL),
-mBtnPreview(NULL),
-mWorkingLabel(NULL),
-mThumbnailPlaceholder(NULL),
-mStatusCounterLabel(NULL),
-mStatusTextBox(NULL),
-mLocationCheckbox(NULL),
-mPhotoCheckbox(NULL),
-mBigPreviewFloater(NULL),
-mPostButton(NULL)
-{
- mCommitCallbackRegistrar.add("SocialSharing.SendPhoto", boost::bind(&LLTwitterPhotoPanel::onSend, this));
- mCommitCallbackRegistrar.add("SocialSharing.RefreshPhoto", boost::bind(&LLTwitterPhotoPanel::onClickNewSnapshot, this));
- mCommitCallbackRegistrar.add("SocialSharing.BigPreview", boost::bind(&LLTwitterPhotoPanel::onClickBigPreview, this));
-}
-
-LLTwitterPhotoPanel::~LLTwitterPhotoPanel()
-{
- if(mPreviewHandle.get())
- {
- mPreviewHandle.get()->die();
- }
-}
-
-BOOL LLTwitterPhotoPanel::postBuild()
-{
- setVisibleCallback(boost::bind(&LLTwitterPhotoPanel::onVisibilityChange, this, _2));
-
- mResolutionComboBox = getChild<LLUICtrl>("resolution_combobox");
- mResolutionComboBox->setValue("[i800,i600]"); // hardcoded defaults ftw!
- mResolutionComboBox->setCommitCallback(boost::bind(&LLTwitterPhotoPanel::updateResolution, this, TRUE));
- mFilterComboBox = getChild<LLUICtrl>("filters_combobox");
- mFilterComboBox->setCommitCallback(boost::bind(&LLTwitterPhotoPanel::updateResolution, this, TRUE));
- mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn");
- mBtnPreview = getChild<LLButton>("big_preview_btn");
- mWorkingLabel = getChild<LLUICtrl>("working_lbl");
- mThumbnailPlaceholder = getChild<LLUICtrl>("thumbnail_placeholder");
- mStatusCounterLabel = getChild<LLUICtrl>("status_counter_label");
- mStatusTextBox = getChild<LLUICtrl>("photo_status");
- mStatusTextBox->setValue(DEFAULT_STATUS_TEXT);
- mLocationCheckbox = getChild<LLUICtrl>("add_location_cb");
- mLocationCheckbox->setCommitCallback(boost::bind(&LLTwitterPhotoPanel::onAddLocationToggled, this));
- mPhotoCheckbox = getChild<LLUICtrl>("add_photo_cb");
- mPhotoCheckbox->setCommitCallback(boost::bind(&LLTwitterPhotoPanel::onAddPhotoToggled, this));
- mPostButton = getChild<LLUICtrl>("post_photo_btn");
- mCancelButton = getChild<LLUICtrl>("cancel_photo_btn");
- mBigPreviewFloater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview"));
-
- // Update filter list
- std::vector<std::string> filter_list = LLImageFiltersManager::getInstance()->getFiltersList();
- LLComboBox* filterbox = static_cast<LLComboBox *>(mFilterComboBox);
- for (U32 i = 0; i < filter_list.size(); i++)
- {
- filterbox->add(filter_list[i]);
- }
-
- return LLPanel::postBuild();
-}
-
-// virtual
-S32 LLTwitterPhotoPanel::notify(const LLSD& info)
-{
- if (info.has("snapshot-updating"))
- {
- // Disable the Post button and whatever else while the snapshot is not updated
- // updateControls();
- return 1;
- }
-
- if (info.has("snapshot-updated"))
- {
- // Enable the send/post/save buttons.
- updateControls();
-
- // The refresh button is initially hidden. We show it after the first update,
- // i.e. after snapshot is taken
- LLUICtrl * refresh_button = getRefreshBtn();
- if (!refresh_button->getVisible())
- {
- refresh_button->setVisible(true);
- }
- return 1;
- }
-
- return 0;
-}
-
-void LLTwitterPhotoPanel::draw()
-{
- LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get());
-
- // Enable interaction only if no transaction with the service is on-going (prevent duplicated posts)
- bool no_ongoing_connection = !(LLTwitterConnect::instance().isTransactionOngoing());
- bool photo_checked = mPhotoCheckbox->getValue().asBoolean();
- mCancelButton->setEnabled(no_ongoing_connection);
- mStatusTextBox->setEnabled(no_ongoing_connection);
- mResolutionComboBox->setEnabled(no_ongoing_connection && photo_checked);
- mFilterComboBox->setEnabled(no_ongoing_connection && photo_checked);
- mRefreshBtn->setEnabled(no_ongoing_connection && photo_checked);
- mBtnPreview->setEnabled(no_ongoing_connection);
- mLocationCheckbox->setEnabled(no_ongoing_connection);
- mPhotoCheckbox->setEnabled(no_ongoing_connection);
-
- bool add_location = mLocationCheckbox->getValue().asBoolean();
- bool add_photo = mPhotoCheckbox->getValue().asBoolean();
- updateStatusTextLength(false);
-
- // Reassign the preview floater if we have the focus and the preview exists
- if (hasFocus() && isPreviewVisible())
- {
- attachPreview();
- }
-
- // Toggle the button state as appropriate
- bool preview_active = (isPreviewVisible() && mBigPreviewFloater->isFloaterOwner(getParentByType<LLFloater>()));
- mBtnPreview->setToggleState(preview_active);
-
- // Display the preview if one is available
- if (previewp && previewp->getThumbnailImage())
- {
- const LLRect& thumbnail_rect = mThumbnailPlaceholder->getRect();
- const S32 thumbnail_w = previewp->getThumbnailWidth();
- const S32 thumbnail_h = previewp->getThumbnailHeight();
-
- // calc preview offset within the preview rect
- const S32 local_offset_x = (thumbnail_rect.getWidth() - thumbnail_w) / 2 ;
- const S32 local_offset_y = (thumbnail_rect.getHeight() - thumbnail_h) / 2 ;
- S32 offset_x = thumbnail_rect.mLeft + local_offset_x;
- S32 offset_y = thumbnail_rect.mBottom + local_offset_y;
-
- gGL.matrixMode(LLRender::MM_MODELVIEW);
- // Apply floater transparency to the texture unless the floater is focused.
- F32 alpha = (add_photo ? (getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency()) : 0.5f);
- LLColor4 color = LLColor4::white;
- gl_draw_scaled_image(offset_x, offset_y,
- thumbnail_w, thumbnail_h,
- previewp->getThumbnailImage(), color % alpha);
- }
-
- // Update the visibility of the working (computing preview) label
- mWorkingLabel->setVisible(!(previewp && previewp->getSnapshotUpToDate()));
-
- // Enable Post if we have a preview to send and no on going connection being processed
- mPostButton->setEnabled(no_ongoing_connection && (previewp && previewp->getSnapshotUpToDate()) && (add_photo || add_location || !mStatusTextBox->getValue().asString().empty()));
-
- // Draw the rest of the panel on top of it
- LLPanel::draw();
-}
-
-LLSnapshotLivePreview* LLTwitterPhotoPanel::getPreviewView()
-{
- LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)mPreviewHandle.get();
- return previewp;
-}
-
-void LLTwitterPhotoPanel::onVisibilityChange(BOOL visible)
-{
- if (visible)
- {
- if (mPreviewHandle.get())
- {
- LLSnapshotLivePreview* preview = getPreviewView();
- if(preview)
- {
- LL_DEBUGS() << "opened, updating snapshot" << LL_ENDL;
- preview->updateSnapshot(TRUE);
- }
- }
- else
- {
- LLRect full_screen_rect = getRootView()->getRect();
- LLSnapshotLivePreview::Params p;
- p.rect(full_screen_rect);
- LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(p);
- mPreviewHandle = previewp->getHandle();
-
- previewp->setContainer(this);
- previewp->setSnapshotType(LLSnapshotModel::SNAPSHOT_WEB);
- previewp->setSnapshotFormat(LLSnapshotModel::SNAPSHOT_FORMAT_JPEG);
- previewp->setThumbnailSubsampled(TRUE); // We want the preview to reflect the *saved* image
- previewp->setAllowRenderUI(FALSE); // We do not want the rendered UI in our snapshots
- previewp->setAllowFullScreenPreview(FALSE); // No full screen preview in SL Share mode
- previewp->setThumbnailPlaceholderRect(mThumbnailPlaceholder->getRect());
-
- updateControls();
- }
- }
-}
-
-void LLTwitterPhotoPanel::onAddLocationToggled()
-{
- bool add_location = mLocationCheckbox->getValue().asBoolean();
- updateStatusTextLength(!add_location);
-}
-
-void LLTwitterPhotoPanel::onAddPhotoToggled()
-{
- bool add_photo = mPhotoCheckbox->getValue().asBoolean();
- updateStatusTextLength(!add_photo);
-}
-
-void LLTwitterPhotoPanel::onClickNewSnapshot()
-{
- LLSnapshotLivePreview* previewp = getPreviewView();
- if (previewp)
- {
- previewp->updateSnapshot(TRUE);
- }
-}
-
-void LLTwitterPhotoPanel::onClickBigPreview()
-{
- // Toggle the preview
- if (isPreviewVisible())
- {
- LLFloaterReg::hideInstance("big_preview");
- }
- else
- {
- attachPreview();
- LLFloaterReg::showInstance("big_preview");
- }
-}
-
-bool LLTwitterPhotoPanel::isPreviewVisible()
-{
- return (mBigPreviewFloater && mBigPreviewFloater->getVisible());
-}
-
-void LLTwitterPhotoPanel::attachPreview()
-{
- if (mBigPreviewFloater)
- {
- LLSnapshotLivePreview* previewp = getPreviewView();
- mBigPreviewFloater->setPreview(previewp);
- mBigPreviewFloater->setFloaterOwner(getParentByType<LLFloater>());
- }
-}
-
-void LLTwitterPhotoPanel::onSend()
-{
- LLEventPumps::instance().obtain("TwitterConnectState").stopListening("LLTwitterPhotoPanel"); // just in case it is already listening
- LLEventPumps::instance().obtain("TwitterConnectState").listen("LLTwitterPhotoPanel", boost::bind(&LLTwitterPhotoPanel::onTwitterConnectStateChange, this, _1));
-
- // Connect to Twitter if necessary and then post
- if (LLTwitterConnect::instance().isConnected())
- {
- sendPhoto();
- }
- else
- {
- LLTwitterConnect::instance().checkConnectionToTwitter(true);
- }
-}
-
-bool LLTwitterPhotoPanel::onTwitterConnectStateChange(const LLSD& data)
-{
- switch (data.get("enum").asInteger())
- {
- case LLTwitterConnect::TWITTER_CONNECTED:
- sendPhoto();
- break;
-
- case LLTwitterConnect::TWITTER_POSTED:
- LLEventPumps::instance().obtain("TwitterConnectState").stopListening("LLTwitterPhotoPanel");
- clearAndClose();
- break;
- }
-
- return false;
-}
-
-void LLTwitterPhotoPanel::sendPhoto()
-{
- // Get the status text
- std::string status = mStatusTextBox->getValue().asString();
-
- // Add the location if required
- bool add_location = mLocationCheckbox->getValue().asBoolean();
- if (add_location)
- {
- // Get the SLURL for the location
- LLSLURL slurl;
- LLAgentUI::buildSLURL(slurl);
- std::string slurl_string = slurl.getSLURLString();
-
- // Use a valid http:// URL if the scheme is secondlife://
- LLURI slurl_uri(slurl_string);
- if (slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME)
- {
- slurl_string = DEFAULT_PHOTO_LOCATION_URL;
- }
-
- // Add query parameters so Google Analytics can track incoming clicks!
- slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS;
-
- // Add it to the status (pretty crude, but we don't have a better option with photos)
- if (status.empty())
- status = slurl_string;
- else
- status = status + " " + slurl_string;
- }
-
- // Add the photo if required
- bool add_photo = mPhotoCheckbox->getValue().asBoolean();
- if (add_photo)
- {
- // Get the image
- LLSnapshotLivePreview* previewp = getPreviewView();
-
- // Post to Twitter
- LLTwitterConnect::instance().uploadPhoto(previewp->getFormattedImage(), status);
- }
- else
- {
- // Just post the status to Twitter
- LLTwitterConnect::instance().updateStatus(status);
- }
-
- updateControls();
-}
-
-void LLTwitterPhotoPanel::clearAndClose()
-{
- mStatusTextBox->setValue(DEFAULT_STATUS_TEXT);
-
- LLFloater* floater = getParentByType<LLFloater>();
- if (floater)
- {
- floater->closeFloater();
- if (mBigPreviewFloater)
- {
- mBigPreviewFloater->closeOnFloaterOwnerClosing(floater);
- }
- }
-}
-
-void LLTwitterPhotoPanel::updateStatusTextLength(BOOL restore_old_status_text)
-{
- bool add_location = mLocationCheckbox->getValue().asBoolean();
-
- // Restrict the status text length to Twitter's character limit
- LLTextEditor* status_text_box = dynamic_cast<LLTextEditor*>(mStatusTextBox);
- if (status_text_box)
- {
- int max_status_length = 280 - (add_location ? 40 : 0);
- status_text_box->setMaxTextLength(max_status_length);
- if (restore_old_status_text)
- {
- if (mOldStatusText.length() > status_text_box->getText().length() && status_text_box->getText() == mOldStatusText.substr(0, status_text_box->getText().length()))
- {
- status_text_box->setText(mOldStatusText);
- }
- if (mOldStatusText.length() <= max_status_length)
- {
- mOldStatusText = "";
- }
- }
- if (status_text_box->getText().length() > max_status_length)
- {
- if (mOldStatusText.length() < status_text_box->getText().length() || status_text_box->getText() != mOldStatusText.substr(0, status_text_box->getText().length()))
- {
- mOldStatusText = status_text_box->getText();
- }
- status_text_box->setText(mOldStatusText.substr(0, max_status_length));
- }
-
- // Update the status character counter
- int characters_remaining = max_status_length - status_text_box->getText().length();
- mStatusCounterLabel->setValue(characters_remaining);
- }
-
-}
-
-void LLTwitterPhotoPanel::updateControls()
-{
- LLSnapshotLivePreview* previewp = getPreviewView();
- BOOL got_snap = previewp && previewp->getSnapshotUpToDate();
-
- // *TODO: Separate maximum size for Web images from postcards
- LL_DEBUGS() << "Is snapshot up-to-date? " << got_snap << LL_ENDL;
-
- updateResolution(FALSE);
-}
-
-void LLTwitterPhotoPanel::updateResolution(BOOL do_update)
-{
- LLComboBox* combobox = static_cast<LLComboBox *>(mResolutionComboBox);
- LLComboBox* filterbox = static_cast<LLComboBox *>(mFilterComboBox);
-
- std::string sdstring = combobox->getSelectedValue();
- LLSD sdres;
- std::stringstream sstream(sdstring);
- LLSDSerialize::fromNotation(sdres, sstream, sdstring.size());
-
- S32 width = sdres[0];
- S32 height = sdres[1];
-
- // Note : index 0 of the filter drop down is assumed to be "No filter" in whichever locale
- std::string filter_name = (filterbox->getCurrentIndex() ? filterbox->getSimple() : "");
-
- LLSnapshotLivePreview * previewp = static_cast<LLSnapshotLivePreview *>(mPreviewHandle.get());
- if (previewp && combobox->getCurrentIndex() >= 0)
- {
- S32 original_width = 0 , original_height = 0 ;
- previewp->getSize(original_width, original_height) ;
-
- if (width == 0 || height == 0)
- {
- // take resolution from current window size
- LL_DEBUGS() << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << LL_ENDL;
- previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw());
- }
- else
- {
- // use the resolution from the selected pre-canned drop-down choice
- LL_DEBUGS() << "Setting preview res selected from combo: " << width << "x" << height << LL_ENDL;
- previewp->setSize(width, height);
- }
-
- checkAspectRatio(width);
-
- previewp->getSize(width, height);
-
- if (original_width != width || original_height != height)
- {
- previewp->setSize(width, height);
- if (do_update)
- {
- previewp->updateSnapshot(TRUE);
- updateControls();
- }
- }
- // Get the old filter, compare to the current one "filter_name" and set if changed
- std::string original_filter = previewp->getFilter();
- if (original_filter != filter_name)
- {
- previewp->setFilter(filter_name);
- if (do_update)
- {
- previewp->updateSnapshot(FALSE, TRUE);
- updateControls();
- }
- }
- }
-}
-
-void LLTwitterPhotoPanel::checkAspectRatio(S32 index)
-{
- LLSnapshotLivePreview *previewp = getPreviewView() ;
-
- BOOL keep_aspect = FALSE;
-
- if (0 == index) // current window size
- {
- keep_aspect = TRUE;
- }
- else // predefined resolution
- {
- keep_aspect = FALSE;
- }
-
- if (previewp)
- {
- previewp->mKeepAspectRatio = keep_aspect;
- }
-}
-
-LLUICtrl* LLTwitterPhotoPanel::getRefreshBtn()
-{
- return mRefreshBtn;
-}
-
-///////////////////////////
-//LLTwitterAccountPanel//////
-///////////////////////////
-
-LLTwitterAccountPanel::LLTwitterAccountPanel() :
-mAccountCaptionLabel(NULL),
-mAccountNameLabel(NULL),
-mPanelButtons(NULL),
-mConnectButton(NULL),
-mDisconnectButton(NULL)
-{
- mCommitCallbackRegistrar.add("SocialSharing.Connect", boost::bind(&LLTwitterAccountPanel::onConnect, this));
- mCommitCallbackRegistrar.add("SocialSharing.Disconnect", boost::bind(&LLTwitterAccountPanel::onDisconnect, this));
-
- setVisibleCallback(boost::bind(&LLTwitterAccountPanel::onVisibilityChange, this, _2));
-}
-
-BOOL LLTwitterAccountPanel::postBuild()
-{
- mAccountCaptionLabel = getChild<LLTextBox>("account_caption_label");
- mAccountNameLabel = getChild<LLTextBox>("account_name_label");
- mPanelButtons = getChild<LLUICtrl>("panel_buttons");
- mConnectButton = getChild<LLUICtrl>("connect_btn");
- mDisconnectButton = getChild<LLUICtrl>("disconnect_btn");
-
- return LLPanel::postBuild();
-}
-
-void LLTwitterAccountPanel::draw()
-{
- LLTwitterConnect::EConnectionState connection_state = LLTwitterConnect::instance().getConnectionState();
-
- //Disable the 'disconnect' button and the 'use another account' button when disconnecting in progress
- bool disconnecting = connection_state == LLTwitterConnect::TWITTER_DISCONNECTING;
- mDisconnectButton->setEnabled(!disconnecting);
-
- //Disable the 'connect' button when a connection is in progress
- bool connecting = connection_state == LLTwitterConnect::TWITTER_CONNECTION_IN_PROGRESS;
- mConnectButton->setEnabled(!connecting);
-
- LLPanel::draw();
-}
-
-void LLTwitterAccountPanel::onVisibilityChange(BOOL visible)
-{
- if(visible)
- {
- LLEventPumps::instance().obtain("TwitterConnectState").stopListening("LLTwitterAccountPanel");
- LLEventPumps::instance().obtain("TwitterConnectState").listen("LLTwitterAccountPanel", boost::bind(&LLTwitterAccountPanel::onTwitterConnectStateChange, this, _1));
-
- LLEventPumps::instance().obtain("TwitterConnectInfo").stopListening("LLTwitterAccountPanel");
- LLEventPumps::instance().obtain("TwitterConnectInfo").listen("LLTwitterAccountPanel", boost::bind(&LLTwitterAccountPanel::onTwitterConnectInfoChange, this));
-
- //Connected
- if(LLTwitterConnect::instance().isConnected())
- {
- showConnectedLayout();
- }
- //Check if connected (show disconnected layout in meantime)
- else
- {
- showDisconnectedLayout();
- }
- if ((LLTwitterConnect::instance().getConnectionState() == LLTwitterConnect::TWITTER_NOT_CONNECTED) ||
- (LLTwitterConnect::instance().getConnectionState() == LLTwitterConnect::TWITTER_CONNECTION_FAILED))
- {
- LLTwitterConnect::instance().checkConnectionToTwitter();
- }
- }
- else
- {
- LLEventPumps::instance().obtain("TwitterConnectState").stopListening("LLTwitterAccountPanel");
- LLEventPumps::instance().obtain("TwitterConnectInfo").stopListening("LLTwitterAccountPanel");
- }
-}
-
-bool LLTwitterAccountPanel::onTwitterConnectStateChange(const LLSD& data)
-{
- if(LLTwitterConnect::instance().isConnected())
- {
- //In process of disconnecting so leave the layout as is
- if(data.get("enum").asInteger() != LLTwitterConnect::TWITTER_DISCONNECTING)
- {
- showConnectedLayout();
- }
- }
- else
- {
- showDisconnectedLayout();
- }
-
- return false;
-}
-
-bool LLTwitterAccountPanel::onTwitterConnectInfoChange()
-{
- LLSD info = LLTwitterConnect::instance().getInfo();
- std::string clickable_name;
-
- //Strings of format [http://www.somewebsite.com Click Me] become clickable text
- if(info.has("link") && info.has("name"))
- {
- clickable_name = "[" + info["link"].asString() + " " + info["name"].asString() + "]";
- }
-
- mAccountNameLabel->setText(clickable_name);
-
- return false;
-}
-
-void LLTwitterAccountPanel::showConnectButton()
-{
- if(!mConnectButton->getVisible())
- {
- mConnectButton->setVisible(TRUE);
- mDisconnectButton->setVisible(FALSE);
- }
-}
-
-void LLTwitterAccountPanel::hideConnectButton()
-{
- if(mConnectButton->getVisible())
- {
- mConnectButton->setVisible(FALSE);
- mDisconnectButton->setVisible(TRUE);
- }
-}
-
-void LLTwitterAccountPanel::showDisconnectedLayout()
-{
- mAccountCaptionLabel->setText(getString("twitter_disconnected"));
- mAccountNameLabel->setText(std::string(""));
- showConnectButton();
-}
-
-void LLTwitterAccountPanel::showConnectedLayout()
-{
- LLTwitterConnect::instance().loadTwitterInfo();
-
- mAccountCaptionLabel->setText(getString("twitter_connected"));
- hideConnectButton();
-}
-
-void LLTwitterAccountPanel::onConnect()
-{
- LLTwitterConnect::instance().checkConnectionToTwitter(true);
-}
-
-void LLTwitterAccountPanel::onDisconnect()
-{
- LLTwitterConnect::instance().disconnectFromTwitter();
-}
-
-////////////////////////
-//LLFloaterTwitter///////
-////////////////////////
-
-LLFloaterTwitter::LLFloaterTwitter(const LLSD& key) : LLFloater(key),
- mTwitterPhotoPanel(NULL),
- mStatusErrorText(NULL),
- mStatusLoadingText(NULL),
- mStatusLoadingIndicator(NULL)
-{
- mCommitCallbackRegistrar.add("SocialSharing.Cancel", boost::bind(&LLFloaterTwitter::onCancel, this));
-}
-
-void LLFloaterTwitter::onClose(bool app_quitting)
-{
- LLFloaterBigPreview* big_preview_floater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview"));
- if (big_preview_floater)
- {
- big_preview_floater->closeOnFloaterOwnerClosing(this);
- }
- LLFloater::onClose(app_quitting);
-}
-
-void LLFloaterTwitter::onCancel()
-{
- LLFloaterBigPreview* big_preview_floater = dynamic_cast<LLFloaterBigPreview*>(LLFloaterReg::getInstance("big_preview"));
- if (big_preview_floater)
- {
- big_preview_floater->closeOnFloaterOwnerClosing(this);
- }
- closeFloater();
-}
-
-BOOL LLFloaterTwitter::postBuild()
-{
- // Keep tab of the Photo Panel
- mTwitterPhotoPanel = static_cast<LLTwitterPhotoPanel*>(getChild<LLUICtrl>("panel_twitter_photo"));
- // Connection status widgets
- mStatusErrorText = getChild<LLTextBox>("connection_error_text");
- mStatusLoadingText = getChild<LLTextBox>("connection_loading_text");
- mStatusLoadingIndicator = getChild<LLUICtrl>("connection_loading_indicator");
- return LLFloater::postBuild();
-}
-
-void LLFloaterTwitter::showPhotoPanel()
-{
- LLTabContainer* parent = dynamic_cast<LLTabContainer*>(mTwitterPhotoPanel->getParent());
- if (!parent)
- {
- LL_WARNS() << "Cannot find panel container" << LL_ENDL;
- return;
- }
-
- parent->selectTabPanel(mTwitterPhotoPanel);
-}
-
-void LLFloaterTwitter::draw()
-{
- if (mStatusErrorText && mStatusLoadingText && mStatusLoadingIndicator)
- {
- mStatusErrorText->setVisible(false);
- mStatusLoadingText->setVisible(false);
- mStatusLoadingIndicator->setVisible(false);
- LLTwitterConnect::EConnectionState connection_state = LLTwitterConnect::instance().getConnectionState();
- std::string status_text;
-
- switch (connection_state)
- {
- case LLTwitterConnect::TWITTER_NOT_CONNECTED:
- // No status displayed when first opening the panel and no connection done
- case LLTwitterConnect::TWITTER_CONNECTED:
- // When successfully connected, no message is displayed
- case LLTwitterConnect::TWITTER_POSTED:
- // No success message to show since we actually close the floater after successful posting completion
- break;
- case LLTwitterConnect::TWITTER_CONNECTION_IN_PROGRESS:
- // Connection loading indicator
- mStatusLoadingText->setVisible(true);
- status_text = LLTrans::getString("SocialTwitterConnecting");
- mStatusLoadingText->setValue(status_text);
- mStatusLoadingIndicator->setVisible(true);
- break;
- case LLTwitterConnect::TWITTER_POSTING:
- // Posting indicator
- mStatusLoadingText->setVisible(true);
- status_text = LLTrans::getString("SocialTwitterPosting");
- mStatusLoadingText->setValue(status_text);
- mStatusLoadingIndicator->setVisible(true);
- break;
- case LLTwitterConnect::TWITTER_CONNECTION_FAILED:
- // Error connecting to the service
- mStatusErrorText->setVisible(true);
- status_text = LLTrans::getString("SocialTwitterErrorConnecting");
- mStatusErrorText->setValue(status_text);
- break;
- case LLTwitterConnect::TWITTER_POST_FAILED:
- // Error posting to the service
- mStatusErrorText->setVisible(true);
- status_text = LLTrans::getString("SocialTwitterErrorPosting");
- mStatusErrorText->setValue(status_text);
- break;
- case LLTwitterConnect::TWITTER_DISCONNECTING:
- // Disconnecting loading indicator
- mStatusLoadingText->setVisible(true);
- status_text = LLTrans::getString("SocialTwitterDisconnecting");
- mStatusLoadingText->setValue(status_text);
- mStatusLoadingIndicator->setVisible(true);
- break;
- case LLTwitterConnect::TWITTER_DISCONNECT_FAILED:
- // Error disconnecting from the service
- mStatusErrorText->setVisible(true);
- status_text = LLTrans::getString("SocialTwitterErrorDisconnecting");
- mStatusErrorText->setValue(status_text);
- break;
- }
- }
- LLFloater::draw();
-}
-
diff --git a/indra/newview/llfloatertwitter.h b/indra/newview/llfloatertwitter.h
deleted file mode 100644
index d586799d18..0000000000
--- a/indra/newview/llfloatertwitter.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/**
-* @file llfloatertwitter.h
-* @brief Header file for llfloatertwitter
-* @author cho@lindenlab.com
-*
-* $LicenseInfo:firstyear=2013&license=viewerlgpl$
-* Second Life Viewer Source Code
-* Copyright (C) 2013, Linden Research, Inc.
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation;
-* version 2.1 of the License only.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*
-* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-* $/LicenseInfo$
-*/
-#ifndef LL_LLFLOATERTWITTER_H
-#define LL_LLFLOATERTWITTER_H
-
-#include "llfloater.h"
-#include "lltextbox.h"
-#include "llviewertexture.h"
-
-class LLIconCtrl;
-class LLCheckBoxCtrl;
-class LLSnapshotLivePreview;
-class LLFloaterBigPreview;
-
-class LLTwitterPhotoPanel : public LLPanel
-{
-public:
- LLTwitterPhotoPanel();
- ~LLTwitterPhotoPanel();
-
- BOOL postBuild();
- void draw();
-
- LLSnapshotLivePreview* getPreviewView();
- void onVisibilityChange(BOOL new_visibility);
- void onAddLocationToggled();
- void onAddPhotoToggled();
- void onClickBigPreview();
- void onClickNewSnapshot();
- void onSend();
- S32 notify(const LLSD& info);
- bool onTwitterConnectStateChange(const LLSD& data);
-
- void sendPhoto();
- void clearAndClose();
-
- void updateStatusTextLength(BOOL restore_old_status_text);
- void updateControls();
- void updateResolution(BOOL do_update);
- void checkAspectRatio(S32 index);
- LLUICtrl* getRefreshBtn();
-
-private:
- bool isPreviewVisible();
- void attachPreview();
-
- LLHandle<LLView> mPreviewHandle;
-
- LLUICtrl * mResolutionComboBox;
- LLUICtrl * mFilterComboBox;
- LLUICtrl * mRefreshBtn;
- LLUICtrl * mWorkingLabel;
- LLUICtrl * mThumbnailPlaceholder;
- LLUICtrl * mStatusCounterLabel;
- LLUICtrl * mStatusTextBox;
- LLUICtrl * mLocationCheckbox;
- LLUICtrl * mPhotoCheckbox;
- LLUICtrl * mPostButton;
- LLUICtrl * mCancelButton;
- LLButton * mBtnPreview;
-
- LLFloaterBigPreview * mBigPreviewFloater;
-
- std::string mOldStatusText;
-};
-
-class LLTwitterAccountPanel : public LLPanel
-{
-public:
- LLTwitterAccountPanel();
- BOOL postBuild();
- void draw();
-
-private:
- void onVisibilityChange(BOOL new_visibility);
- bool onTwitterConnectStateChange(const LLSD& data);
- bool onTwitterConnectInfoChange();
- void onConnect();
- void onUseAnotherAccount();
- void onDisconnect();
-
- void showConnectButton();
- void hideConnectButton();
- void showDisconnectedLayout();
- void showConnectedLayout();
-
- LLTextBox * mAccountCaptionLabel;
- LLTextBox * mAccountNameLabel;
- LLUICtrl * mPanelButtons;
- LLUICtrl * mConnectButton;
- LLUICtrl * mDisconnectButton;
-};
-
-
-class LLFloaterTwitter : public LLFloater
-{
-public:
- LLFloaterTwitter(const LLSD& key);
- BOOL postBuild();
- void draw();
- void onClose(bool app_quitting);
- void onCancel();
-
- void showPhotoPanel();
-
-private:
- LLTwitterPhotoPanel* mTwitterPhotoPanel;
- LLTextBox* mStatusErrorText;
- LLTextBox* mStatusLoadingText;
- LLUICtrl* mStatusLoadingIndicator;
-};
-
-#endif // LL_LLFLOATERTWITTER_H
-
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index c591dfacaf..23fd6d9c8e 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -30,8 +30,6 @@
#include "lliconctrl.h"
#include "llfloaterreg.h"
#include "llhttpconstants.h"
-#include "llflickrconnect.h"
-#include "lltwitterconnect.h"
#include "lllayoutstack.h"
#include "llpluginclassmedia.h"
#include "llprogressbar.h"
@@ -288,26 +286,6 @@ void LLFloaterWebContent::onOpen(const LLSD& key)
//virtual
void LLFloaterWebContent::onClose(bool app_quitting)
{
- // If we close the web browsing window showing the Flickr login, we need to signal to this object that the connection will not happen
- // MAINT-3440 note change here to use findInstance and not getInstance - latter creates an instance if it's not there which is bad.
- LLFloater* flickr_web = LLFloaterReg::findInstance("flickr_web");
- if (flickr_web == this)
- {
- if (!LLFlickrConnect::instance().isConnected())
- {
- LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_FAILED);
- }
- }
- // Same with Twitter
- // MAINT-3440 note change here to use findInstance and not getInstance - latter creates an instance if it's not there which is bad.
- LLFloater* twitter_web = LLFloaterReg::findInstance("twitter_web");
- if (twitter_web == this)
- {
- if (!LLTwitterConnect::instance().isConnected())
- {
- LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_FAILED);
- }
- }
LLViewerMedia::getInstance()->proxyWindowClosed(mUUID);
destroy();
}
diff --git a/indra/newview/llimagefiltersmanager.cpp b/indra/newview/llimagefiltersmanager.cpp
index c23cdc8103..3b8adc1610 100644
--- a/indra/newview/llimagefiltersmanager.cpp
+++ b/indra/newview/llimagefiltersmanager.cpp
@@ -1,6 +1,6 @@
/**
* @file llimagefiltersmanager.cpp
- * @brief Load image filters list and retrieve their path. Mostly used for Flickr UI at the moment.
+ * @brief Load image filters list and retrieve their path.
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
diff --git a/indra/newview/llimagefiltersmanager.h b/indra/newview/llimagefiltersmanager.h
index f1ed3cf1c3..d06212d85a 100644
--- a/indra/newview/llimagefiltersmanager.h
+++ b/indra/newview/llimagefiltersmanager.h
@@ -1,6 +1,6 @@
/**
* @file llimagefiltersmanager.h
- * @brief Load image filters list and retrieve their path. Mostly used for Flickr UI at the moment.
+ * @brief Load image filters list and retrieve their path.
*
* $LicenseInfo:firstyear=2000&license=viewerlgpl$
* Second Life Viewer Source Code
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index 48101bf0d9..6da7bbe263 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -857,18 +857,39 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
}
else // IM_TASK_INVENTORY_OFFERED
{
- info->mType = (LLAssetType::EType) binary_bucket[0];
- info->mObjectID = LLUUID::null;
- info->mFromObject = TRUE;
- }
+ if (offline == IM_OFFLINE && session_id.isNull() && aux_id.notNull() && binary_bucket_size > sizeof(S8)* 5)
+ {
+ // cap received offline message
+ std::string str_bucket = ll_safe_string((char*)binary_bucket, binary_bucket_size);
+ typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
+ boost::char_separator<char> sep("|", "", boost::keep_empty_tokens);
+ tokenizer tokens(str_bucket, sep);
+ tokenizer::iterator iter = tokens.begin();
- // In the case of an offline message, the transaction id will be in aux_id and th session_id will be null
- // (conversely when online the transaction id is passed as session_id)
- info->mTransactionID = session_id.isNull() ? aux_id : session_id;
+ info->mType = (LLAssetType::EType)(atoi((*(iter++)).c_str()));
+ // Note There is more elements in 'tokens' ...
+
+ info->mObjectID = LLUUID::null;
+ info->mFromObject = TRUE;
+ }
+ else
+ {
+ if (sizeof(S8) != binary_bucket_size)
+ {
+ LL_WARNS("Messaging") << "Malformed inventory offer from object" << LL_ENDL;
+ delete info;
+ break;
+ }
+ info->mType = (LLAssetType::EType) binary_bucket[0];
+ info->mObjectID = LLUUID::null;
+ info->mFromObject = TRUE;
+ }
+ }
info->mIM = dialog;
info->mFromID = from_id;
info->mFromGroup = from_group;
+ info->mTransactionID = session_id;
info->mFolderID = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(info->mType));
info->mFromName = name;
@@ -1548,6 +1569,12 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url)
return;
}
+ if (gAgent.getRegion() == NULL)
+ {
+ LL_WARNS("Messaging") << "Region null while attempting to load messages." << LL_ENDL;
+ return;
+ }
+
LL_INFOS("Messaging") << "Processing offline messages." << LL_ENDL;
std::vector<U8> data;
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index fd76a36044..602654971a 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -552,18 +552,20 @@ void LLPanelLogin::populateFields(LLPointer<LLCredential> credential, bool remem
LL_WARNS() << "Attempted fillFields with no login view shown" << LL_ENDL;
return;
}
- LLUICtrl* remember_check = sInstance->getChild<LLUICtrl>("remember_check");
- remember_check->setValue(remember_psswrd);
if (sInstance->mFirstLoginThisInstall)
{
+ LLUICtrl* remember_check = sInstance->getChild<LLUICtrl>("remember_check");
+ remember_check->setValue(remember_psswrd);
// no list to populate
- setFields(credential, remember_psswrd);
+ setFields(credential);
}
else
{
sInstance->getChild<LLUICtrl>("remember_name")->setValue(remember_user);
- sInstance->populateUserList(credential, remember_psswrd);
- remember_check->setEnabled(remember_user);
+ LLUICtrl* remember_password = sInstance->getChild<LLUICtrl>("remember_password");
+ remember_password->setValue(remember_psswrd);
+ remember_password->setEnabled(remember_user);
+ sInstance->populateUserList(credential);
}
}
@@ -583,16 +585,13 @@ void LLPanelLogin::resetFields()
}
else
{
- LLUICtrl* remember_check = sInstance->getChild<LLUICtrl>("remember_check");
- bool remember_psswrd = remember_check->getValue();
LLPointer<LLCredential> cred = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid());
- sInstance->populateUserList(cred, remember_psswrd);
+ sInstance->populateUserList(cred);
}
}
// static
-void LLPanelLogin::setFields(LLPointer<LLCredential> credential,
- bool remember_psswrd)
+void LLPanelLogin::setFields(LLPointer<LLCredential> credential)
{
if (!sInstance)
{
@@ -616,15 +615,19 @@ void LLPanelLogin::setFields(LLPointer<LLCredential> credential,
login_id += " ";
login_id += lastname;
}
- sInstance->getChild<LLComboBox>("username_combo")->setLabel(login_id);
+ sInstance->getChild<LLComboBox>("username_combo")->setLabel(login_id);
+ sInstance->mUsernameLength = login_id.length();
}
else if(identifier.has("type") && (std::string)identifier["type"] == "account")
{
- sInstance->getChild<LLComboBox>("username_combo")->setLabel((std::string)identifier["account_name"]);
+ std::string login_id = identifier["account_name"].asString();
+ sInstance->getChild<LLComboBox>("username_combo")->setLabel(login_id);
+ sInstance->mUsernameLength = login_id.length();
}
else
{
- sInstance->getChild<LLComboBox>("username_combo")->setLabel(std::string());
+ sInstance->getChild<LLComboBox>("username_combo")->setLabel(std::string());
+ sInstance->mUsernameLength = 0;
}
sInstance->addFavoritesToStartLocation();
@@ -634,7 +637,7 @@ void LLPanelLogin::setFields(LLPointer<LLCredential> credential,
LL_INFOS("Credentials") << "Setting authenticator field " << authenticator["type"].asString() << LL_ENDL;
if(authenticator.isMap() &&
authenticator.has("secret") &&
- (authenticator["secret"].asString().size() > 0) && remember_psswrd)
+ (authenticator["secret"].asString().size() > 0))
{
// This is a MD5 hex digest of a password.
@@ -648,7 +651,8 @@ void LLPanelLogin::setFields(LLPointer<LLCredential> credential,
}
else
{
- sInstance->getChild<LLUICtrl>("password_edit")->setValue(std::string());
+ sInstance->getChild<LLUICtrl>("password_edit")->setValue(std::string());
+ sInstance->mPasswordLength = 0;
}
}
@@ -666,7 +670,7 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
LLSD identifier = LLSD::emptyMap();
LLSD authenticator = LLSD::emptyMap();
- std::string username = sInstance->getChild<LLComboBox>("username_combo")->getValue().asString();
+ std::string username = sInstance->getChild<LLComboBox>("username_combo")->getSimple();
std::string password = sInstance->getChild<LLUICtrl>("password_edit")->getValue().asString();
LLStringUtil::trim(username);
@@ -748,14 +752,15 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
}
}
credential = gSecAPIHandler->createCredential(LLGridManager::getInstance()->getGrid(), identifier, authenticator);
- remember_psswrd = sInstance->getChild<LLUICtrl>("remember_check")->getValue();
if (!sInstance->mFirstLoginThisInstall)
{
+ remember_psswrd = sInstance->getChild<LLUICtrl>("remember_password")->getValue();
remember_user = sInstance->getChild<LLUICtrl>("remember_name")->getValue();
}
else
{
- remember_user = true;
+ remember_psswrd = sInstance->getChild<LLUICtrl>("remember_check")->getValue();
+ remember_user = remember_psswrd; // on panel_login_first "remember_check" is named as 'remember me'
}
}
@@ -769,11 +774,8 @@ BOOL LLPanelLogin::areCredentialFieldsDirty()
}
else
{
- std::string username = sInstance->getChild<LLUICtrl>("username_combo")->getValue().asString();
- LLStringUtil::trim(username);
- std::string password = sInstance->getChild<LLUICtrl>("password_edit")->getValue().asString();
LLComboBox* combo = sInstance->getChild<LLComboBox>("username_combo");
- if(combo && combo->isDirty())
+ if (combo && combo->getCurrentIndex() == -1 && !combo->getValue().asString().empty())
{
return true;
}
@@ -1085,6 +1087,7 @@ void LLPanelLogin::onUserNameTextEnty(void*)
{
sInstance->mPasswordModified = true;
sInstance->getChild<LLUICtrl>("password_edit")->setValue(std::string());
+ sInstance->mPasswordLength = 0;
sInstance->addFavoritesToStartLocation(); //will call updateLoginButtons()
}
@@ -1099,8 +1102,7 @@ void LLPanelLogin::onUserListCommit(void*)
{
std::string user_key = username_combo->getSelectedValue();
LLPointer<LLCredential> cred = gSecAPIHandler->loadFromCredentialMap("login_list", LLGridManager::getInstance()->getGrid(), user_key);
- bool remember_psswrd = sInstance->getChild<LLUICtrl>("remember_check")->getValue();
- setFields(cred, remember_psswrd);
+ setFields(cred);
sInstance->mPasswordModified = false;
}
else
@@ -1119,14 +1121,22 @@ void LLPanelLogin::onUserListCommit(void*)
}
// static
+// At the moment only happens if !mFirstLoginThisInstall
void LLPanelLogin::onRememberUserCheck(void*)
{
- if (sInstance)
+ if (sInstance && !sInstance->mFirstLoginThisInstall)
{
LLCheckBoxCtrl* remember_name(sInstance->getChild<LLCheckBoxCtrl>("remember_name"));
- LLCheckBoxCtrl* remember_psswrd(sInstance->getChild<LLCheckBoxCtrl>("remember_check"));
+ LLCheckBoxCtrl* remember_psswrd(sInstance->getChild<LLCheckBoxCtrl>("remember_password"));
+ LLComboBox* user_combo(sInstance->getChild<LLComboBox>("username_combo"));
bool remember = remember_name->getValue().asBoolean();
+ if (user_combo->getCurrentIndex() != -1 && !remember)
+ {
+ remember = true;
+ remember_name->setValue(true);
+ LLNotificationsUtil::add("LoginCantRemoveUsername");
+ }
remember_psswrd->setEnabled(remember);
}
}
@@ -1155,14 +1165,37 @@ void LLPanelLogin::updateServer()
try
{
// if they've selected another grid, we should load the credentials
- // for that grid and set them to the UI.
- if(!sInstance->areCredentialFieldsDirty())
+ // for that grid and set them to the UI. But if there were any modifications to
+ // fields, modifications should carry over.
+ // Not sure if it should carry over password but it worked like this before login changes
+ // Example: you started typing in and found that your are under wrong grid,
+ // you switch yet don't lose anything
+ if (sInstance->areCredentialFieldsDirty())
+ {
+ // save modified creds
+ LLComboBox* user_combo = sInstance->getChild<LLComboBox>("username_combo");
+ LLLineEditor* pswd_edit = sInstance->getChild<LLLineEditor>("password_edit");
+ std::string username = user_combo->getSimple();
+ LLStringUtil::trim(username);
+ std::string password = pswd_edit->getValue().asString();
+
+ // populate dropbox and setFields
+ // Note: following call is related to initializeLoginInfo()
+ LLPointer<LLCredential> credential = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid());
+ sInstance->populateUserList(credential);
+
+ // restore creds
+ user_combo->setTextEntry(username);
+ pswd_edit->setValue(password);
+ sInstance->mUsernameLength = username.length();
+ sInstance->mPasswordLength = password.length();
+ }
+ else
{
// populate dropbox and setFields
- bool remember_psswrd = sInstance->getChild<LLUICtrl>("remember_check")->getValue();
// Note: following call is related to initializeLoginInfo()
LLPointer<LLCredential> credential = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid());
- sInstance->populateUserList(credential, remember_psswrd);
+ sInstance->populateUserList(credential);
}
// update the login panel links
@@ -1193,19 +1226,28 @@ void LLPanelLogin::updateLoginButtons()
login_btn->setEnabled(mUsernameLength != 0 && mPasswordLength != 0);
- if (!mFirstLoginThisInstall)
- {
- LLComboBox* user_combo = getChild<LLComboBox>("username_combo");
- LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>("remember_name");
- remember_name->setEnabled(user_combo->getCurrentIndex() == -1);
- }
+ if (!mFirstLoginThisInstall)
+ {
+ LLComboBox* user_combo = getChild<LLComboBox>("username_combo");
+ LLCheckBoxCtrl* remember_name = getChild<LLCheckBoxCtrl>("remember_name");
+ if (user_combo->getCurrentIndex() != -1)
+ {
+ remember_name->setValue(true);
+ LLCheckBoxCtrl* remember_pass = getChild<LLCheckBoxCtrl>("remember_password");
+ remember_pass->setEnabled(TRUE);
+ } // Note: might be good idea to do "else remember_name->setValue(mRememberedState)" but it might behave 'weird' to user
+ }
}
-void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential, bool remember_psswrd)
+void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential)
{
LLComboBox* user_combo = getChild<LLComboBox>("username_combo");
user_combo->removeall();
user_combo->clear();
+ user_combo->setValue(std::string());
+ getChild<LLUICtrl>("password_edit")->setValue(std::string());
+ mUsernameLength = 0;
+ mPasswordLength = 0;
if (gSecAPIHandler->hasCredentialMap("login_list", LLGridManager::getInstance()->getGrid()))
{
@@ -1226,20 +1268,33 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential, bool rem
if (credential.isNull() || !user_combo->setSelectedByValue(LLSD(credential->userID()), true))
{
- // selection failed, just deselect whatever might be selected
- user_combo->setValue(std::string());
+ // selection failed, fields will be mepty
+ updateLoginButtons();
}
else
{
- setFields(credential, remember_psswrd);
+ setFields(credential);
}
}
else
{
if (credential.notNull())
{
- user_combo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE);
- setFields(credential, remember_psswrd);
+ const LLSD &ident = credential->getIdentifier();
+ if (ident.isMap() && ident.has("type"))
+ {
+ // this llsd might hold invalid credencial (failed login), so
+ // do not add to the list, just set field.
+ setFields(credential);
+ }
+ else
+ {
+ updateLoginButtons();
+ }
+ }
+ else
+ {
+ updateLoginButtons();
}
}
}
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index 3eb7b68949..c9b8e1b6fc 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -96,7 +96,7 @@ private:
void onSelectServer();
void onLocationSLURL();
- static void setFields(LLPointer<LLCredential> credential, bool remember_psswrd);
+ static void setFields(LLPointer<LLCredential> credential);
static void onClickConnect(void*);
static void onClickNewAccount(void*);
@@ -113,7 +113,7 @@ private:
boost::scoped_ptr<LLPanelLoginListener> mListener;
void updateLoginButtons();
- void populateUserList(LLPointer<LLCredential> credential, bool remember_psswrd);
+ void populateUserList(LLPointer<LLCredential> credential);
void (*mCallback)(S32 option, void *userdata);
void* mCallbackData;
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 6702dae4d6..7756b92a3a 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1561,12 +1561,13 @@ void LLPanelObjectInventory::refresh()
//LL_INFOS() << "LLPanelObjectInventory::refresh()" << LL_ENDL;
BOOL has_inventory = FALSE;
const BOOL non_root_ok = TRUE;
- LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, non_root_ok);
- if(node)
+ LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
+ LLSelectNode* node = selection->getFirstRootNode(NULL, non_root_ok);
+ if(node && node->mValid)
{
LLViewerObject* object = node->getObject();
- if(object && ((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1)
- || (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)))
+ if(object && ((selection->getRootObjectCount() == 1)
+ || (selection->getObjectCount() == 1)))
{
// determine if we need to make a request. Start with a
// default based on if we have inventory at all.
diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp
index 23747a8efd..1a3e946127 100644
--- a/indra/newview/llpanelsnapshotoptions.cpp
+++ b/indra/newview/llpanelsnapshotoptions.cpp
@@ -32,8 +32,6 @@
#include "llfloatersnapshot.h" // FIXME: create a snapshot model
#include "llfloaterreg.h"
-#include "llfloaterflickr.h"
-#include "llfloatertwitter.h"
/**
* Provides several ways to save a snapshot.
@@ -58,8 +56,6 @@ private:
void onSaveToEmail();
void onSaveToInventory();
void onSaveToComputer();
- void onSendToTwitter();
- void onSendToFlickr();
LLFloaterSnapshotBase* mSnapshotFloater;
};
@@ -72,8 +68,7 @@ LLPanelSnapshotOptions::LLPanelSnapshotOptions()
mCommitCallbackRegistrar.add("Snapshot.SaveToEmail", boost::bind(&LLPanelSnapshotOptions::onSaveToEmail, this));
mCommitCallbackRegistrar.add("Snapshot.SaveToInventory", boost::bind(&LLPanelSnapshotOptions::onSaveToInventory, this));
mCommitCallbackRegistrar.add("Snapshot.SaveToComputer", boost::bind(&LLPanelSnapshotOptions::onSaveToComputer, this));
- mCommitCallbackRegistrar.add("Snapshot.SendToTwitter", boost::bind(&LLPanelSnapshotOptions::onSendToTwitter, this));
- mCommitCallbackRegistrar.add("Snapshot.SendToFlickr", boost::bind(&LLPanelSnapshotOptions::onSendToFlickr, this));
+
LLGlobalEconomy::getInstance()->addObserver(this);
}
@@ -135,26 +130,3 @@ void LLPanelSnapshotOptions::onSaveToComputer()
openPanel("panel_snapshot_local");
}
-void LLPanelSnapshotOptions::onSendToTwitter()
-{
- LLFloaterReg::hideInstance("snapshot");
-
- LLFloaterTwitter* twitter_floater = dynamic_cast<LLFloaterTwitter*>(LLFloaterReg::getInstance("twitter"));
- if (twitter_floater)
- {
- twitter_floater->showPhotoPanel();
- }
- LLFloaterReg::showInstance("twitter");
-}
-
-void LLPanelSnapshotOptions::onSendToFlickr()
-{
- LLFloaterReg::hideInstance("snapshot");
-
- LLFloaterFlickr* flickr_floater = dynamic_cast<LLFloaterFlickr*>(LLFloaterReg::getInstance("flickr"));
- if (flickr_floater)
- {
- flickr_floater->showPhotoPanel();
- }
- LLFloaterReg::showInstance("flickr");
-}
diff --git a/indra/newview/llsecapi.h b/indra/newview/llsecapi.h
index c0f0a367c7..69b6b32923 100644
--- a/indra/newview/llsecapi.h
+++ b/indra/newview/llsecapi.h
@@ -491,6 +491,10 @@ public:
virtual bool hasCredentialMap(const std::string& storage,
const std::string& grid)=0;
+ // returns true if map is empty or does not exist
+ virtual bool emptyCredentialMap(const std::string& storage,
+ const std::string& grid)=0;
+
// load map of credentials from specific storage
typedef std::map<std::string, LLPointer<LLCredential> > credential_map_t;
virtual void loadCredentialMap(const std::string& storage,
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index a8bb54a90e..55e49100c3 100644
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -1664,6 +1664,19 @@ bool LLSecAPIBasicHandler::hasCredentialMap(const std::string& storage, const st
return credential.isMap();
}
+// returns true if map is empty or does not exist
+bool LLSecAPIBasicHandler::emptyCredentialMap(const std::string& storage, const std::string& grid)
+{
+ if (storage == DEFAULT_CREDENTIAL_STORAGE)
+ {
+ LL_ERRS() << "Storing maps in default, single-items storage is not allowed" << LL_ENDL;
+ }
+
+ LLSD credential = getProtectedData(storage, grid);
+
+ return !credential.isMap() || credential.size() == 0;
+}
+
// Load map of credentials from specified credential store, given the grid
void LLSecAPIBasicHandler::loadCredentialMap(const std::string& storage, const std::string& grid, credential_map_t& credential_map)
{
diff --git a/indra/newview/llsechandler_basic.h b/indra/newview/llsechandler_basic.h
index 426b5d392a..0bc7f5230f 100644
--- a/indra/newview/llsechandler_basic.h
+++ b/indra/newview/llsechandler_basic.h
@@ -293,6 +293,10 @@ public:
virtual bool hasCredentialMap(const std::string& storage,
const std::string& grid);
+ // returns true if map is empty or does not exist
+ virtual bool emptyCredentialMap(const std::string& storage,
+ const std::string& grid);
+
// load map of credentials from specific storage
virtual void loadCredentialMap(const std::string& storage,
const std::string& grid,
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index f849fecaf6..aee6bcb05e 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -5426,7 +5426,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
}
else
{
- if (node->mInventorySerial != inv_serial)
+ if (node->mInventorySerial != inv_serial && node->getObject())
{
node->getObject()->dirtyInventory();
}
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 4ebcffa554..6e2b4a00fc 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -485,7 +485,7 @@ void LLSidepanelAppearance::fetchInventory()
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- LLViewerObject* attached_object = (*attachment_iter);
+ LLViewerObject* attached_object = attachment_iter->get();
if (!attached_object) continue;
const LLUUID& item_id = attached_object->getAttachmentItemID();
if (item_id.isNull()) continue;
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 43dc676a63..6be2ccad17 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -34,8 +34,6 @@
#include "lleconomy.h"
#include "llfloaterperms.h"
#include "llfloaterreg.h"
-#include "llfloaterflickr.h"
-#include "llfloatertwitter.h"
#include "llimagefilter.h"
#include "llimagefiltersmanager.h"
#include "llimagebmp.h"
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 008dfe2a45..f8745fe85d 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2714,6 +2714,15 @@ std::string& LLStartUp::getInitialOutfitName()
return sInitialOutfit;
}
+std::string LLStartUp::getUserId()
+{
+ if (gUserCredential.isNull())
+ {
+ return "";
+ }
+ return gUserCredential->userID();
+}
+
// Loads a bitmap to display during load
void init_start_screen(S32 location_id)
{
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index db37207022..5ce74b8fae 100644
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -115,6 +115,7 @@ public:
static void saveInitialOutfit();
static std::string& getInitialOutfitName();
+ static std::string getUserId();
static bool dispatchURL();
// if we have a SLURL or sim string ("Ahern/123/45") that started
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index f3bb574191..e2deb7ce1d 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -838,6 +838,7 @@ LLTextureCache::LLTextureCache(bool threaded)
mFastCachePoolp(NULL),
mFastCachePadBuffer(NULL)
{
+ mHeaderAPRFilePoolp = new LLVolatileAPRPool(); // is_local = true, because this pool is for headers, headers are under own mutex
}
LLTextureCache::~LLTextureCache()
@@ -846,6 +847,7 @@ LLTextureCache::~LLTextureCache()
writeUpdatedEntries() ;
delete mFastCachep;
delete mFastCachePoolp;
+ delete mHeaderAPRFilePoolp;
ll_aligned_free_16(mFastCachePadBuffer);
}
@@ -1014,10 +1016,11 @@ void LLTextureCache::purgeCache(ELLPath location, bool remove_dir)
if(LLFile::isdir(mTexturesDirName))
{
std::string file_name = gDirUtilp->getExpandedFilename(location, entries_filename);
- LLAPRFile::remove(file_name, getLocalAPRFilePool());
+ // mHeaderAPRFilePoolp because we are under header mutex, and can be in main thread
+ LLAPRFile::remove(file_name, mHeaderAPRFilePoolp);
file_name = gDirUtilp->getExpandedFilename(location, cache_filename);
- LLAPRFile::remove(file_name, getLocalAPRFilePool());
+ LLAPRFile::remove(file_name, mHeaderAPRFilePoolp);
purgeAllTextures(true);
}
@@ -1094,7 +1097,7 @@ LLAPRFile* LLTextureCache::openHeaderEntriesFile(bool readonly, S32 offset)
{
llassert_always(mHeaderAPRFile == NULL);
apr_int32_t flags = readonly ? APR_READ|APR_BINARY : APR_READ|APR_WRITE|APR_BINARY;
- mHeaderAPRFile = new LLAPRFile(mHeaderEntriesFileName, flags, getLocalAPRFilePool());
+ mHeaderAPRFile = new LLAPRFile(mHeaderEntriesFileName, flags, mHeaderAPRFilePoolp);
if(offset > 0)
{
mHeaderAPRFile->seek(APR_SET, offset);
@@ -1117,10 +1120,10 @@ void LLTextureCache::readEntriesHeader()
{
// mHeaderEntriesInfo initializes to default values so safe not to read it
llassert_always(mHeaderAPRFile == NULL);
- if (LLAPRFile::isExist(mHeaderEntriesFileName, getLocalAPRFilePool()))
+ if (LLAPRFile::isExist(mHeaderEntriesFileName, mHeaderAPRFilePoolp))
{
LLAPRFile::readEx(mHeaderEntriesFileName, (U8*)&mHeaderEntriesInfo, 0, sizeof(EntriesInfo),
- getLocalAPRFilePool());
+ mHeaderAPRFilePoolp);
}
else //create an empty entries header.
{
@@ -1152,7 +1155,7 @@ void LLTextureCache::writeEntriesHeader()
if (!mReadOnly)
{
LLAPRFile::writeEx(mHeaderEntriesFileName, (U8*)&mHeaderEntriesInfo, 0, sizeof(EntriesInfo),
- getLocalAPRFilePool());
+ mHeaderAPRFilePoolp);
}
}
@@ -1832,7 +1835,8 @@ void LLTextureCache::purgeTextures(bool validate)
if (uuididx == validate_idx)
{
LL_DEBUGS("TextureCache") << "Validating: " << filename << "Size: " << entries[idx].mBodySize << LL_ENDL;
- S32 bodysize = LLAPRFile::size(filename, getLocalAPRFilePool());
+ // mHeaderAPRFilePoolp because this is under header mutex in main thread
+ S32 bodysize = LLAPRFile::size(filename, mHeaderAPRFilePoolp);
if (bodysize != entries[idx].mBodySize)
{
LL_WARNS("TextureCache") << "TEXTURE CACHE BODY HAS BAD SIZE: " << bodysize << " != " << entries[idx].mBodySize
@@ -2231,7 +2235,7 @@ void LLTextureCache::openFastCache(bool first_time)
{
mFastCachePadBuffer = (U8*)ll_aligned_malloc_16(TEXTURE_FAST_CACHE_ENTRY_SIZE);
}
- mFastCachePoolp = new LLVolatileAPRPool();
+ mFastCachePoolp = new LLVolatileAPRPool(); // is_local= true by default, so not thread safe by default
if (LLAPRFile::isExist(mFastCacheFileName, mFastCachePoolp))
{
mFastCachep = new LLAPRFile(mFastCacheFileName, APR_READ|APR_WRITE|APR_BINARY, mFastCachePoolp) ;
@@ -2315,7 +2319,9 @@ void LLTextureCache::removeCachedTexture(const LLUUID& id)
mTexturesSizeMap.erase(id);
}
mHeaderIDMap.erase(id);
- LLAPRFile::remove(getTextureFileName(id), getLocalAPRFilePool());
+ // We are inside header's mutex so mHeaderAPRFilePoolp is safe to use,
+ // but getLocalAPRFilePool() is not safe, it might be in use by worker
+ LLAPRFile::remove(getTextureFileName(id), mHeaderAPRFilePoolp);
}
//called after mHeaderMutex is locked.
@@ -2327,7 +2333,10 @@ void LLTextureCache::removeEntry(S32 idx, Entry& entry, std::string& filename)
{
if (entry.mBodySize == 0) // Always attempt to remove when mBodySize > 0.
{
- if (LLAPRFile::isExist(filename, getLocalAPRFilePool())) // Sanity check. Shouldn't exist when body size is 0.
+ // Sanity check. Shouldn't exist when body size is 0.
+ // We are inside header's mutex so mHeaderAPRFilePoolp is safe to use,
+ // but getLocalAPRFilePool() is not safe, it might be in use by worker
+ if (LLAPRFile::isExist(filename, mHeaderAPRFilePoolp))
{
LL_WARNS("TextureCache") << "Entry has body size of zero but file " << filename << " exists. Deleting this file, too." << LL_ENDL;
}
@@ -2347,7 +2356,7 @@ void LLTextureCache::removeEntry(S32 idx, Entry& entry, std::string& filename)
if (file_maybe_exists)
{
- LLAPRFile::remove(filename, getLocalAPRFilePool());
+ LLAPRFile::remove(filename, mHeaderAPRFilePoolp);
}
}
diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h
index da59290930..6046f2b9df 100644
--- a/indra/newview/lltexturecache.h
+++ b/indra/newview/lltexturecache.h
@@ -139,7 +139,7 @@ public:
U32 getEntries() { return mHeaderEntriesInfo.mEntries; }
U32 getMaxEntries() { return sCacheMaxEntries; };
BOOL isInCache(const LLUUID& id) ;
- BOOL isInLocal(const LLUUID& id) ;
+ BOOL isInLocal(const LLUUID& id) ; //not thread safe at the moment
protected:
// Accessed by LLTextureCacheWorker
@@ -190,6 +190,11 @@ private:
LLMutex mFastCacheMutex;
LLAPRFile* mHeaderAPRFile;
LLVolatileAPRPool* mFastCachePoolp;
+
+ // mLocalAPRFilePoolp is not thread safe and is meant only for workers
+ // howhever mHeaderEntriesFileName is accessed not from workers' threads
+ // so it needs own pool (not thread safe by itself, relies onto header's mutex)
+ LLVolatileAPRPool* mHeaderAPRFilePoolp;
typedef std::map<handle_t, LLTextureCacheWorker*> handle_map_t;
handle_map_t mReaders;
diff --git a/indra/newview/lltwitterconnect.cpp b/indra/newview/lltwitterconnect.cpp
deleted file mode 100644
index b2d2fa9d77..0000000000
--- a/indra/newview/lltwitterconnect.cpp
+++ /dev/null
@@ -1,576 +0,0 @@
-/**
- * @file lltwitterconnect.h
- * @author Merov, Cho
- * @brief Connection to Twitter Service
- *
- * $LicenseInfo:firstyear=2013&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2013, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "lltwitterconnect.h"
-#include "llflickrconnect.h"
-
-#include "llagent.h"
-#include "llcallingcard.h" // for LLAvatarTracker
-#include "llcommandhandler.h"
-#include "llnotificationsutil.h"
-#include "llurlaction.h"
-#include "llimagepng.h"
-#include "llimagejpeg.h"
-#include "lltrans.h"
-#include "llevents.h"
-#include "llviewerregion.h"
-
-#include "llfloaterwebcontent.h"
-#include "llfloaterreg.h"
-#include "llcorehttputil.h"
-
-boost::scoped_ptr<LLEventPump> LLTwitterConnect::sStateWatcher(new LLEventStream("TwitterConnectState"));
-boost::scoped_ptr<LLEventPump> LLTwitterConnect::sInfoWatcher(new LLEventStream("TwitterConnectInfo"));
-boost::scoped_ptr<LLEventPump> LLTwitterConnect::sContentWatcher(new LLEventStream("TwitterConnectContent"));
-
-// Local functions
-void log_twitter_connect_error(const std::string& request, U32 status, const std::string& reason, const std::string& code, const std::string& description)
-{
- // Note: 302 (redirect) is *not* an error that warrants logging
- if (status != 302)
- {
- LL_WARNS("TwitterConnect") << request << " request failed with a " << status << " " << reason << ". Reason: " << code << " (" << description << ")" << LL_ENDL;
- }
-}
-
-void toast_user_for_twitter_success()
-{
- LLSD args;
- args["MESSAGE"] = LLTrans::getString("twitter_post_success");
- LLNotificationsUtil::add("TwitterConnect", args);
-}
-
-class LLTwitterConnectHandler : public LLCommandHandler
-{
-public:
- LLTwitterConnectHandler() : LLCommandHandler("fbc", UNTRUSTED_THROTTLE) {}
-
- bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web)
- {
- if (tokens.size() >= 1)
- {
- if (tokens[0].asString() == "connect")
- {
- if (tokens.size() >= 2 && tokens[1].asString() == "twitter")
- {
- // this command probably came from the twitter_web browser, so close it
- LLFloaterReg::hideInstance("twitter_web");
-
- // connect to twitter
- if (query_map.has("oauth_token"))
- {
- LLTwitterConnect::instance().connectToTwitter(query_map["oauth_token"], query_map.get("oauth_verifier"));
- }
- return true;
- }
- else if (tokens.size() >= 2 && tokens[1].asString() == "flickr")
- {
- // this command probably came from the flickr_web browser, so close it
- LLFloaterReg::hideInstance("flickr_web");
-
- // connect to flickr
- if (query_map.has("oauth_token"))
- {
- LLFlickrConnect::instance().connectToFlickr(query_map["oauth_token"], query_map.get("oauth_verifier"));
- }
- return true;
- }
- }
- }
- return false;
- }
-};
-LLTwitterConnectHandler gTwitterConnectHandler;
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-void LLTwitterConnect::twitterConnectCoro(std::string requestToken, std::string oauthVerifier)
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TwitterConnect", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
-
- httpOpts->setWantHeaders(true);
- httpOpts->setFollowRedirects(false);
-
- LLSD body;
- if (!requestToken.empty())
- body["request_token"] = requestToken;
- if (!oauthVerifier.empty())
- body["oauth_verifier"] = oauthVerifier;
-
- LLSD result = httpAdapter->putAndSuspend(httpRequest, getTwitterConnectURL("/connection"), body, httpOpts);
-
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- if (!status)
- {
- if ( status == LLCore::HttpStatus(HTTP_FOUND) )
- {
- std::string location = httpResults[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_HEADERS][HTTP_IN_HEADER_LOCATION];
- if (location.empty())
- {
- LL_WARNS("FlickrConnect") << "Missing Location header " << LL_ENDL;
- }
- else
- {
- openTwitterWeb(location);
- }
- }
- else
- {
- LL_WARNS("TwitterConnect") << "Connection failed " << status.toString() << LL_ENDL;
- setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_FAILED);
- log_twitter_connect_error("Connect", status.getStatus(), status.toString(),
- result.get("error_code"), result.get("error_description"));
- }
- }
- else
- {
- LL_DEBUGS("TwitterConnect") << "Connect successful. " << LL_ENDL;
- setConnectionState(LLTwitterConnect::TWITTER_CONNECTED);
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-bool LLTwitterConnect::testShareStatus(LLSD &result)
-{
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- if (status)
- return true;
-
- if (status == LLCore::HttpStatus(HTTP_FOUND))
- {
- std::string location = httpResults[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_HEADERS][HTTP_IN_HEADER_LOCATION];
- if (location.empty())
- {
- LL_WARNS("TwitterConnect") << "Missing Location header " << LL_ENDL;
- }
- else
- {
- openTwitterWeb(location);
- }
- }
- if (status == LLCore::HttpStatus(HTTP_NOT_FOUND))
- {
- LL_DEBUGS("TwitterConnect") << "Not connected. " << LL_ENDL;
- connectToTwitter();
- }
- else
- {
- LL_WARNS("TwitterConnect") << "HTTP Status error " << status.toString() << LL_ENDL;
- setConnectionState(LLTwitterConnect::TWITTER_POST_FAILED);
- log_twitter_connect_error("Share", status.getStatus(), status.toString(),
- result.get("error_code"), result.get("error_description"));
- }
- return false;
-}
-
-void LLTwitterConnect::twitterShareCoro(std::string route, LLSD share)
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TwitterConnect", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
-
- httpOpts->setWantHeaders(true);
- httpOpts->setFollowRedirects(false);
-
- LLSD result = httpAdapter->postAndSuspend(httpRequest, getTwitterConnectURL(route, true), share, httpOpts);
-
- if (testShareStatus(result))
- {
- toast_user_for_twitter_success();
- LL_DEBUGS("TwitterConnect") << "Post successful. " << LL_ENDL;
- setConnectionState(LLTwitterConnect::TWITTER_POSTED);
- }
-}
-
-void LLTwitterConnect::twitterShareImageCoro(LLPointer<LLImageFormatted> image, std::string status)
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
-
- httpOpts->setWantHeaders(true);
- httpOpts->setFollowRedirects(false);
-
- std::string imageFormat;
- if (dynamic_cast<LLImagePNG*>(image.get()))
- {
- imageFormat = "png";
- }
- else if (dynamic_cast<LLImageJPEG*>(image.get()))
- {
- imageFormat = "jpg";
- }
- else
- {
- LL_WARNS() << "Image to upload is not a PNG or JPEG" << LL_ENDL;
- return;
- }
-
- // All this code is mostly copied from LLWebProfile::post()
- const std::string boundary = "----------------------------0123abcdefab";
-
- std::string contentType = "multipart/form-data; boundary=" + boundary;
- httpHeaders->append("Content-Type", contentType.c_str());
-
- LLCore::BufferArray::ptr_t raw = LLCore::BufferArray::ptr_t(new LLCore::BufferArray()); //
- LLCore::BufferArrayStream body(raw.get());
-
- // *NOTE: The order seems to matter.
- body << "--" << boundary << "\r\n"
- << "Content-Disposition: form-data; name=\"status\"\r\n\r\n"
- << status << "\r\n";
-
- body << "--" << boundary << "\r\n"
- << "Content-Disposition: form-data; name=\"image\"; filename=\"Untitled." << imageFormat << "\"\r\n"
- << "Content-Type: image/" << imageFormat << "\r\n\r\n";
-
- // Insert the image data.
- // *FIX: Treating this as a string will probably screw it up ...
- U8* image_data = image->getData();
- for (S32 i = 0; i < image->getDataSize(); ++i)
- {
- body << image_data[i];
- }
-
- body << "\r\n--" << boundary << "--\r\n";
-
- LLSD result = httpAdapter->postAndSuspend(httpRequest, getTwitterConnectURL("/share/photo", true), raw, httpOpts, httpHeaders);
-
- if (testShareStatus(result))
- {
- toast_user_for_twitter_success();
- LL_DEBUGS("TwitterConnect") << "Post successful. " << LL_ENDL;
- setConnectionState(LLTwitterConnect::TWITTER_POSTED);
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-void LLTwitterConnect::twitterDisconnectCoro()
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TwitterConnect", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
-
- httpOpts->setFollowRedirects(false);
-
- LLSD result = httpAdapter->deleteAndSuspend(httpRequest, getTwitterConnectURL("/connection"), httpOpts);
-
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- if (!status && (status != LLCore::HttpStatus(HTTP_NOT_FOUND)))
- {
- LL_WARNS("TwitterConnect") << "Disconnect failed!" << LL_ENDL;
- setConnectionState(LLTwitterConnect::TWITTER_DISCONNECT_FAILED);
-
- log_twitter_connect_error("Disconnect", status.getStatus(), status.toString(),
- result.get("error_code"), result.get("error_description"));
- }
- else
- {
- LL_DEBUGS("TwitterConnect") << "Disconnect successful. " << LL_ENDL;
- clearInfo();
- setConnectionState(LLTwitterConnect::TWITTER_NOT_CONNECTED);
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-void LLTwitterConnect::twitterConnectedCoro(bool autoConnect)
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TwitterConnect", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
-
- httpOpts->setFollowRedirects(false);
- setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_IN_PROGRESS);
-
- LLSD result = httpAdapter->getAndSuspend(httpRequest, getTwitterConnectURL("/connection", true), httpOpts);
-
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- if (!status)
- {
- if (status == LLCore::HttpStatus(HTTP_NOT_FOUND))
- {
- LL_DEBUGS("TwitterConnect") << "Not connected. " << LL_ENDL;
- if (autoConnect)
- {
- connectToTwitter();
- }
- else
- {
- setConnectionState(LLTwitterConnect::TWITTER_NOT_CONNECTED);
- }
- }
- else
- {
- LL_WARNS("TwitterConnect") << "Failed to test connection:" << status.toTerseString() << LL_ENDL;
-
- setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_FAILED);
- log_twitter_connect_error("Connected", status.getStatus(), status.toString(),
- result.get("error_code"), result.get("error_description"));
- }
- }
- else
- {
- LL_DEBUGS("TwitterConnect") << "Connect successful. " << LL_ENDL;
- setConnectionState(LLTwitterConnect::TWITTER_CONNECTED);
- }
-
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-void LLTwitterConnect::twitterInfoCoro()
-{
- LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
- LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
- httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TwitterConnect", httpPolicy));
- LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
- LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
-
- httpOpts->setWantHeaders(true);
- httpOpts->setFollowRedirects(false);
-
- LLSD result = httpAdapter->getAndSuspend(httpRequest, getTwitterConnectURL("/info", true), httpOpts);
-
- LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
- LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
-
- if (status == LLCore::HttpStatus(HTTP_FOUND))
- {
- std::string location = httpResults[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_HEADERS][HTTP_IN_HEADER_LOCATION];
- if (location.empty())
- {
- LL_WARNS("TwitterConnect") << "Missing Location header " << LL_ENDL;
- }
- else
- {
- openTwitterWeb(location);
- }
- }
- else if (!status)
- {
- LL_WARNS("TwitterConnect") << "Twitter Info failed: " << status.toString() << LL_ENDL;
- log_twitter_connect_error("Info", status.getStatus(), status.toString(),
- result.get("error_code"), result.get("error_description"));
- }
- else
- {
- LL_INFOS("TwitterConnect") << "Twitter: Info received" << LL_ENDL;
- result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
- storeInfo(result);
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-LLTwitterConnect::LLTwitterConnect()
-: mConnectionState(TWITTER_NOT_CONNECTED),
- mConnected(false),
- mInfo(),
- mRefreshInfo(false),
- mReadFromMaster(false)
-{
-}
-
-void LLTwitterConnect::openTwitterWeb(std::string url)
-{
- LLFloaterWebContent::Params p;
- p.url(url);
- p.show_chrome(true);
- p.allow_back_forward_navigation(false);
- p.clean_browser(true);
- LLFloater *floater = LLFloaterReg::showInstance("twitter_web", p);
- //the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems).
- //So when showing the internal web browser, set focus to it's containing floater "twitter_web". When a mouse event
- //occurs on the "webbrowser" panel part of the floater, a mouse cursor will properly show and the "webbrowser" will gain focus.
- //twitter_web floater contains the "webbrowser" panel. JIRA: ACME-744
- gFocusMgr.setKeyboardFocus( floater );
-
- //LLUrlAction::openURLExternal(url);
-}
-
-std::string LLTwitterConnect::getTwitterConnectURL(const std::string& route, bool include_read_from_master)
-{
- std::string url("");
- LLViewerRegion *regionp = gAgent.getRegion();
- if (regionp)
- {
- //url = "http://pdp15.lindenlab.com/twitter/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO
- url = regionp->getCapability("TwitterConnect");
- url += route;
-
- if (include_read_from_master && mReadFromMaster)
- {
- url += "?read_from_master=true";
- }
- }
- return url;
-}
-
-void LLTwitterConnect::connectToTwitter(const std::string& request_token, const std::string& oauth_verifier)
-{
- setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_IN_PROGRESS);
-
- LLCoros::instance().launch("LLTwitterConnect::twitterConnectCoro",
- boost::bind(&LLTwitterConnect::twitterConnectCoro, this, request_token, oauth_verifier));
-}
-
-void LLTwitterConnect::disconnectFromTwitter()
-{
- setConnectionState(LLTwitterConnect::TWITTER_DISCONNECTING);
-
- LLCoros::instance().launch("LLTwitterConnect::twitterDisconnectCoro",
- boost::bind(&LLTwitterConnect::twitterDisconnectCoro, this));
-}
-
-void LLTwitterConnect::checkConnectionToTwitter(bool auto_connect)
-{
- LLCoros::instance().launch("LLTwitterConnect::twitterConnectedCoro",
- boost::bind(&LLTwitterConnect::twitterConnectedCoro, this, auto_connect));
-}
-
-void LLTwitterConnect::loadTwitterInfo()
-{
- if(mRefreshInfo)
- {
- LLCoros::instance().launch("LLTwitterConnect::twitterInfoCoro",
- boost::bind(&LLTwitterConnect::twitterInfoCoro, this));
- }
-}
-
-void LLTwitterConnect::uploadPhoto(const std::string& image_url, const std::string& status)
-{
- LLSD body;
- body["image"] = image_url;
- body["status"] = status;
-
- setConnectionState(LLTwitterConnect::TWITTER_POSTING);
-
- LLCoros::instance().launch("LLTwitterConnect::twitterShareCoro",
- boost::bind(&LLTwitterConnect::twitterShareCoro, this, "/share/photo", body));
-}
-
-void LLTwitterConnect::uploadPhoto(LLPointer<LLImageFormatted> image, const std::string& status)
-{
- setConnectionState(LLTwitterConnect::TWITTER_POSTING);
-
- LLCoros::instance().launch("LLTwitterConnect::twitterShareImageCoro",
- boost::bind(&LLTwitterConnect::twitterShareImageCoro, this, image, status));
-}
-
-void LLTwitterConnect::updateStatus(const std::string& status)
-{
- LLSD body;
- body["status"] = status;
-
- setConnectionState(LLTwitterConnect::TWITTER_POSTING);
-
- LLCoros::instance().launch("LLTwitterConnect::twitterShareCoro",
- boost::bind(&LLTwitterConnect::twitterShareCoro, this, "/share/status", body));
-}
-
-void LLTwitterConnect::storeInfo(const LLSD& info)
-{
- mInfo = info;
- mRefreshInfo = false;
-
- sInfoWatcher->post(info);
-}
-
-const LLSD& LLTwitterConnect::getInfo() const
-{
- return mInfo;
-}
-
-void LLTwitterConnect::clearInfo()
-{
- mInfo = LLSD();
-}
-
-void LLTwitterConnect::setDataDirty()
-{
- mRefreshInfo = true;
-}
-
-void LLTwitterConnect::setConnectionState(LLTwitterConnect::EConnectionState connection_state)
-{
- if(connection_state == TWITTER_CONNECTED)
- {
- mReadFromMaster = true;
- setConnected(true);
- setDataDirty();
- }
- else if(connection_state == TWITTER_NOT_CONNECTED)
- {
- setConnected(false);
- }
- else if(connection_state == TWITTER_POSTED)
- {
- mReadFromMaster = false;
- }
-
- if (mConnectionState != connection_state)
- {
- // set the connection state before notifying watchers
- mConnectionState = connection_state;
-
- LLSD state_info;
- state_info["enum"] = connection_state;
- sStateWatcher->post(state_info);
- }
-}
-
-void LLTwitterConnect::setConnected(bool connected)
-{
- mConnected = connected;
-}
diff --git a/indra/newview/lltwitterconnect.h b/indra/newview/lltwitterconnect.h
deleted file mode 100644
index e77048cc35..0000000000
--- a/indra/newview/lltwitterconnect.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * @file lltwitterconnect.h
- * @author Merov, Cho
- * @brief Connection to Twitter Service
- *
- * $LicenseInfo:firstyear=2013&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2013, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLTWITTERCONNECT_H
-#define LL_LLTWITTERCONNECT_H
-
-#include "llsingleton.h"
-#include "llimage.h"
-#include "llcoros.h"
-#include "lleventcoro.h"
-
-class LLEventPump;
-
-/**
- * @class LLTwitterConnect
- *
- * Manages authentication to, and interaction with, a web service allowing the
- * the viewer to post status updates and upload photos to Twitter.
- */
-class LLTwitterConnect : public LLSingleton<LLTwitterConnect>
-{
- LLSINGLETON(LLTwitterConnect);
- LOG_CLASS(LLTwitterConnect);
-public:
- enum EConnectionState
- {
- TWITTER_NOT_CONNECTED = 0,
- TWITTER_CONNECTION_IN_PROGRESS = 1,
- TWITTER_CONNECTED = 2,
- TWITTER_CONNECTION_FAILED = 3,
- TWITTER_POSTING = 4,
- TWITTER_POSTED = 5,
- TWITTER_POST_FAILED = 6,
- TWITTER_DISCONNECTING = 7,
- TWITTER_DISCONNECT_FAILED = 8
- };
-
- void connectToTwitter(const std::string& request_token = "", const std::string& oauth_verifier = ""); // Initiate the complete Twitter connection. Please use checkConnectionToTwitter() in normal use.
- void disconnectFromTwitter(); // Disconnect from the Twitter service.
- void checkConnectionToTwitter(bool auto_connect = false); // Check if an access token is available on the Twitter service. If not, call connectToTwitter().
-
- void loadTwitterInfo();
- void uploadPhoto(const std::string& image_url, const std::string& status);
- void uploadPhoto(LLPointer<LLImageFormatted> image, const std::string& status);
- void updateStatus(const std::string& status);
-
- void storeInfo(const LLSD& info);
- const LLSD& getInfo() const;
- void clearInfo();
- void setDataDirty();
-
- void setConnectionState(EConnectionState connection_state);
- void setConnected(bool connected);
- bool isConnected() { return mConnected; }
- bool isTransactionOngoing() { return ((mConnectionState == TWITTER_CONNECTION_IN_PROGRESS) || (mConnectionState == TWITTER_POSTING) || (mConnectionState == TWITTER_DISCONNECTING)); }
- EConnectionState getConnectionState() { return mConnectionState; }
-
- void openTwitterWeb(std::string url);
-
-private:
-
- std::string getTwitterConnectURL(const std::string& route = "", bool include_read_from_master = false);
-
- EConnectionState mConnectionState;
- BOOL mConnected;
- LLSD mInfo;
- bool mRefreshInfo;
- bool mReadFromMaster;
-
- static boost::scoped_ptr<LLEventPump> sStateWatcher;
- static boost::scoped_ptr<LLEventPump> sInfoWatcher;
- static boost::scoped_ptr<LLEventPump> sContentWatcher;
-
- bool testShareStatus(LLSD &result);
- void twitterConnectCoro(std::string requestToken, std::string oauthVerifier);
- void twitterDisconnectCoro();
- void twitterConnectedCoro(bool autoConnect);
- void twitterInfoCoro();
- void twitterShareCoro(std::string route, LLSD share);
- void twitterShareImageCoro(LLPointer<LLImageFormatted> image, std::string status);
-};
-
-#endif // LL_LLTWITTERCONNECT_H
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 846a8e62a1..bbd5251ed2 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -67,7 +67,6 @@
#include "llfloaterexperiences.h"
#include "llfloaterexperiencepicker.h"
#include "llfloaterevent.h"
-#include "llfloaterflickr.h"
#include "llfloaterfonttest.h"
#include "llfloaterforgetuser.h"
#include "llfloatergesture.h"
@@ -133,7 +132,6 @@
#include "llfloatertos.h"
#include "llfloatertoybox.h"
#include "llfloatertranslationsettings.h"
-#include "llfloatertwitter.h"
#include "llfloateruipreview.h"
#include "llfloatervoiceeffect.h"
#include "llfloaterwebcontent.h"
@@ -354,11 +352,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("profile", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create);
LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
- LLFloaterReg::add("flickr_web", "floater_fbc_web.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
- LLFloaterReg::add("twitter_web", "floater_fbc_web.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
-
- LLFloaterReg::add("flickr", "floater_flickr.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFlickr>);
- LLFloaterReg::add("twitter", "floater_twitter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTwitter>);
LLFloaterReg::add("big_preview", "floater_big_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBigPreview>);
LLFloaterUIPreviewUtil::registerFloater();
diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp
index cf9243a871..8a597ed7e6 100644
--- a/indra/newview/llviewerjointattachment.cpp
+++ b/indra/newview/llviewerjointattachment.cpp
@@ -225,7 +225,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object)
iter != mAttachedObjects.end();
++iter)
{
- LLViewerObject *attached_object = (*iter);
+ LLViewerObject *attached_object = iter->get();
if (attached_object == object)
{
break;
@@ -327,7 +327,7 @@ void LLViewerJointAttachment::setAttachmentVisibility(BOOL visible)
iter != mAttachedObjects.end();
++iter)
{
- LLViewerObject *attached_obj = (*iter);
+ LLViewerObject *attached_obj = iter->get();
if (!attached_obj || attached_obj->mDrawable.isNull() ||
!(attached_obj->mDrawable->getSpatialBridge()))
continue;
@@ -366,7 +366,7 @@ S32 LLViewerJointAttachment::getNumAnimatedObjects() const
iter != mAttachedObjects.end();
++iter)
{
- const LLViewerObject *attached_object = *iter;
+ const LLViewerObject *attached_object = iter->get();
if (attached_object->isAnimatedObject())
{
count++;
@@ -384,7 +384,7 @@ void LLViewerJointAttachment::clampObjectPosition()
iter != mAttachedObjects.end();
++iter)
{
- if (LLViewerObject *attached_object = (*iter))
+ if (LLViewerObject *attached_object = iter->get())
{
// *NOTE: object can drift when hitting maximum radius
LLVector3 attachmentPos = attached_object->getPosition();
@@ -406,7 +406,7 @@ void LLViewerJointAttachment::calcLOD()
iter != mAttachedObjects.end();
++iter)
{
- if (LLViewerObject *attached_object = (*iter))
+ if (LLViewerObject *attached_object = iter->get())
{
maxarea = llmax(maxarea,attached_object->getMaxScale() * attached_object->getMidScale());
LLViewerObject::const_child_list_t& child_list = attached_object->getChildren();
@@ -445,7 +445,7 @@ BOOL LLViewerJointAttachment::isObjectAttached(const LLViewerObject *viewer_obje
iter != mAttachedObjects.end();
++iter)
{
- const LLViewerObject* attached_object = (*iter);
+ const LLViewerObject* attached_object = iter->get();
if (attached_object == viewer_object)
{
return TRUE;
@@ -460,7 +460,7 @@ const LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &o
iter != mAttachedObjects.end();
++iter)
{
- const LLViewerObject* attached_object = (*iter);
+ const LLViewerObject* attached_object = iter->get();
if (attached_object->getAttachmentItemID() == object_id)
{
return attached_object;
@@ -475,7 +475,7 @@ LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &object_
iter != mAttachedObjects.end();
++iter)
{
- LLViewerObject* attached_object = (*iter);
+ LLViewerObject* attached_object = iter->get();
if (attached_object->getAttachmentItemID() == object_id)
{
return attached_object;
diff --git a/indra/newview/llviewerjointattachment.h b/indra/newview/llviewerjointattachment.h
index 9641ab4208..e5edf2c06b 100644
--- a/indra/newview/llviewerjointattachment.h
+++ b/indra/newview/llviewerjointattachment.h
@@ -95,7 +95,7 @@ public:
LLViewerObject *getAttachedObject(const LLUUID &object_id);
// list of attachments for this joint
- typedef std::vector<LLViewerObject *> attachedobjs_vec_t;
+ typedef std::vector<LLPointer<LLViewerObject> > attachedobjs_vec_t;
attachedobjs_vec_t mAttachedObjects;
protected:
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index a49218858b..52cc1cf0b1 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6837,7 +6837,7 @@ class LLAttachmentDetachFromPoint : public view_listener_t
iter != attachment->mAttachedObjects.end();
iter++)
{
- LLViewerObject *attached_object = (*iter);
+ LLViewerObject *attached_object = iter->get();
ids_to_remove.push_back(attached_object->getAttachmentItemID());
}
}
@@ -6863,7 +6863,7 @@ static bool onEnableAttachmentLabel(LLUICtrl* ctrl, const LLSD& data)
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- const LLViewerObject* attached_object = (*attachment_iter);
+ const LLViewerObject* attached_object = attachment_iter->get();
if (attached_object)
{
LLViewerInventoryItem* itemp = gInventory.getItem(attached_object->getAttachmentItemID());
@@ -6976,7 +6976,7 @@ class LLAttachmentEnableDrop : public view_listener_t
{
// make sure item is in your inventory (it could be a delayed attach message being sent from the sim)
// so check to see if the item is in the inventory already
- item = gInventory.getItem((*attachment_iter)->getAttachmentItemID());
+ item = gInventory.getItem(attachment_iter->get()->getAttachmentItemID());
if (!item)
{
// Item does not exist, make an observer to enable the pie menu
@@ -7358,7 +7358,7 @@ void handle_dump_attachments(void*)
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- LLViewerObject *attached_object = (*attachment_iter);
+ LLViewerObject *attached_object = attachment_iter->get();
BOOL visible = (attached_object != NULL &&
attached_object->mDrawable.notNull() &&
!attached_object->mDrawable->isRenderType(0));
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 05230c17e0..fe3e4cdd61 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2987,6 +2987,7 @@ void LLViewerObject::fetchInventoryFromServer()
if (!isInventoryPending())
{
delete mInventory;
+ mInventory = NULL;
// Results in processTaskInv
LLMessageSystem* msg = gMessageSystem;
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 2bf04dc204..63e48d1dd0 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -1921,7 +1921,7 @@ void LLViewerObjectList::generatePickList(LLCamera &camera)
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- if (LLViewerObject* attached_object = (*attachment_iter))
+ if (LLViewerObject* attached_object = attachment_iter->get())
{
mSelectPickList.insert(attached_object);
LLViewerObject::const_child_list_t& child_list = attached_object->getChildren();
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 5b227c641b..75e707aaa3 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -2895,8 +2895,6 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("EstateAccess");
capabilityNames.append("EstateChangeInfo");
capabilityNames.append("EventQueueGet");
- capabilityNames.append("FlickrConnect");
- capabilityNames.append("TwitterConnect");
capabilityNames.append("FetchLib2");
capabilityNames.append("FetchLibDescendents2");
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 3c4c785a42..8f6733886a 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -197,6 +197,8 @@ const F32 NAMETAG_VERT_OFFSET_WEIGHT = 0.17f;
const U32 LLVOAvatar::VISUAL_COMPLEXITY_UNKNOWN = 0;
const F64 HUD_OVERSIZED_TEXTURE_DATA_SIZE = 1024 * 1024;
+const F32 MAX_TEXTURE_WAIT_TIME_SEC = 60;
+
enum ERenderName
{
RENDER_NAME_NEVER,
@@ -663,6 +665,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mFullyLoadedInitialized(FALSE),
mVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN),
mLoadedCallbacksPaused(FALSE),
+ mLoadedCallbackTextures(0),
mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar", false)),
mLastRezzedStatus(-1),
mIsEditingAppearance(FALSE),
@@ -1378,7 +1381,7 @@ void LLVOAvatar::calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
++attachment_iter)
{
// Don't we need to look at children of attached_object as well?
- const LLViewerObject* attached_object = (*attachment_iter);
+ const LLViewerObject* attached_object = attachment_iter->get();
if (attached_object && !attached_object->isHUDAttachment())
{
const LLVOVolume *vol = dynamic_cast<const LLVOVolume*>(attached_object);
@@ -1801,7 +1804,7 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- LLViewerObject* attached_object = (*attachment_iter);
+ LLViewerObject* attached_object = attachment_iter->get();
if (attached_object && !attached_object->isDead() && attachment->getValid())
{
@@ -1865,7 +1868,7 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- LLViewerObject* attached_object = (*attachment_iter);
+ LLViewerObject* attached_object = attachment_iter->get();
if (attached_object->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent))
{
@@ -2691,7 +2694,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- LLViewerObject* attached_object = (*attachment_iter);
+ LLViewerObject* attached_object = attachment_iter->get();
BOOL visibleAttachment = visible || (attached_object &&
!(attached_object->mDrawable->getSpatialBridge() &&
attached_object->mDrawable->getSpatialBridge()->getRadius() < 2.0));
@@ -4572,7 +4575,7 @@ void LLVOAvatar::updateVisibility()
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- if (LLViewerObject *attached_object = (*attachment_iter))
+ if (LLViewerObject *attached_object = attachment_iter->get())
{
if(attached_object->mDrawable->isVisible())
{
@@ -5336,6 +5339,7 @@ void LLVOAvatar::checkTextureLoading()
if(mCallbackTextureList.empty()) //when is self or no callbacks. Note: this list for self is always empty.
{
mLoadedCallbacksPaused = pause ;
+ mLoadedCallbackTextures = 0;
return ; //nothing to check.
}
@@ -5343,7 +5347,9 @@ void LLVOAvatar::checkTextureLoading()
{
return ; //have not been invisible for enough time.
}
-
+
+ mLoadedCallbackTextures = pause ? mCallbackTextureList.size() : 0;
+
for(LLLoadedCallbackEntry::source_callback_list_t::iterator iter = mCallbackTextureList.begin();
iter != mCallbackTextureList.end(); ++iter)
{
@@ -5364,9 +5370,14 @@ void LLVOAvatar::checkTextureLoading()
tex->unpauseLoadedCallbacks(&mCallbackTextureList) ;
tex->addTextureStats(START_AREA); //jump start the fetching again
+
+ if (tex->isFullyLoaded())
+ {
+ mLoadedCallbackTextures++; // consider it loaded
+ }
}
- }
- }
+ }
+ }
if(!pause)
{
@@ -6005,7 +6016,7 @@ void LLVOAvatar::rebuildAttachmentOverrides()
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator at_it = attachment_pt->mAttachedObjects.begin();
at_it != attachment_pt->mAttachedObjects.end(); ++at_it)
{
- LLViewerObject *vo = *at_it;
+ LLViewerObject *vo = at_it->get();
// Attached animated objects affect joints in their control
// avs, not the avs to which they are attached.
if (vo && !vo->isAnimatedObject())
@@ -6056,7 +6067,7 @@ void LLVOAvatar::updateAttachmentOverrides()
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator at_it = attachment_pt->mAttachedObjects.begin();
at_it != attachment_pt->mAttachedObjects.end(); ++at_it)
{
- LLViewerObject *vo = *at_it;
+ LLViewerObject *vo = at_it->get();
// Attached animated objects affect joints in their control
// avs, not the avs to which they are attached.
if (vo && !vo->isAnimatedObject())
@@ -7159,29 +7170,33 @@ void LLVOAvatar::lazyAttach()
for (U32 i = 0; i < mPendingAttachment.size(); i++)
{
LLPointer<LLViewerObject> cur_attachment = mPendingAttachment[i];
- if (cur_attachment->mDrawable)
+ // Object might have died while we were waiting for drawable
+ if (!cur_attachment->isDead())
{
- if (isSelf())
+ if (cur_attachment->mDrawable)
{
- const LLUUID& item_id = cur_attachment->getAttachmentItemID();
- LLViewerInventoryItem *item = gInventory.getItem(item_id);
- LL_DEBUGS("Avatar") << "ATT attaching object "
- << (item ? item->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL;
+ if (isSelf())
+ {
+ const LLUUID& item_id = cur_attachment->getAttachmentItemID();
+ LLViewerInventoryItem *item = gInventory.getItem(item_id);
+ LL_DEBUGS("Avatar") << "ATT attaching object "
+ << (item ? item->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL;
+ }
+ if (!attachObject(cur_attachment))
+ { // Drop it
+ LL_WARNS() << "attachObject() failed for "
+ << cur_attachment->getID()
+ << " item " << cur_attachment->getAttachmentItemID()
+ << LL_ENDL;
+ // MAINT-3312 backout
+ //still_pending.push_back(cur_attachment);
+ }
}
- if (!attachObject(cur_attachment))
- { // Drop it
- LL_WARNS() << "attachObject() failed for "
- << cur_attachment->getID()
- << " item " << cur_attachment->getAttachmentItemID()
- << LL_ENDL;
- // MAINT-3312 backout
- //still_pending.push_back(cur_attachment);
+ else
+ {
+ still_pending.push_back(cur_attachment);
}
}
- else
- {
- still_pending.push_back(cur_attachment);
- }
}
mPendingAttachment = still_pending;
@@ -7201,7 +7216,7 @@ void LLVOAvatar::resetHUDAttachments()
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- const LLViewerObject* attached_object = (*attachment_iter);
+ const LLViewerObject* attached_object = attachment_iter->get();
if (attached_object && attached_object->mDrawable.notNull())
{
gPipeline.markMoved(attached_object->mDrawable);
@@ -7531,7 +7546,7 @@ LLViewerObject * LLVOAvatar::findAttachmentByID( const LLUUID & target_id ) cons
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- LLViewerObject *attached_object = (*attachment_iter);
+ LLViewerObject *attached_object = attachment_iter->get();
if (attached_object &&
attached_object->getID() == target_id)
{
@@ -7804,9 +7819,17 @@ BOOL LLVOAvatar::updateIsFullyLoaded()
{
S32 rez_status = getRezzedStatus();
bool loading = getIsCloud();
- if (mFirstFullyVisible && !mIsControlAvatar && rez_status < 3)
- {
- loading = ((rez_status < 2) || !isFullyBaked());
+ if (mFirstFullyVisible && !mIsControlAvatar)
+ {
+ loading = ((rez_status < 2)
+ // Wait at least 60s for unfinished textures to finish on first load,
+ // don't wait forever, it might fail. Even if it will eventually load by
+ // itself and update mLoadedCallbackTextures (or fail and clean the list),
+ // avatars are more time-sensitive than textures and can't wait that long.
+ || (mLoadedCallbackTextures < mCallbackTextureList.size() && mLastTexCallbackAddedTime.getElapsedTimeF32() < MAX_TEXTURE_WAIT_TIME_SEC)
+ || !mPendingAttachment.empty()
+ || (rez_status < 3 && !isFullyBaked())
+ );
}
updateRezzedStatusTimers(rez_status);
updateRuthTimer(loading);
@@ -7966,7 +7989,7 @@ void LLVOAvatar::updateMeshVisibility()
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- LLViewerObject *objectp = (*attachment_iter);
+ LLViewerObject *objectp = attachment_iter->get();
if (objectp)
{
for (int face_index = 0; face_index < objectp->getNumTEs(); face_index++)
@@ -8190,6 +8213,14 @@ void LLVOAvatar::updateMeshTextures()
}
baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, FALSE, FALSE, new LLUUID( mID ),
src_callback_list, paused );
+ if (!baked_img->isFullyLoaded() && !paused)
+ {
+ mLastTexCallbackAddedTime.reset();
+ }
+ else
+ {
+ mLoadedCallbackTextures++; // consider it loaded
+ }
// this could add paused texture callbacks
mLoadedCallbacksPaused |= paused;
@@ -8283,7 +8314,7 @@ void LLVOAvatar::updateMeshTextures()
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- LLViewerObject* attached_object = (*attachment_iter);
+ LLViewerObject* attached_object = attachment_iter->get();
if (attached_object && !attached_object->isDead())
{
attached_object->refreshBakeTexture();
@@ -8521,7 +8552,7 @@ LLBBox LLVOAvatar::getHUDBBox() const
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- const LLViewerObject* attached_object = (*attachment_iter);
+ const LLViewerObject* attached_object = attachment_iter->get();
if (attached_object == NULL)
{
LL_WARNS() << "HUD attached object is NULL!" << LL_ENDL;
@@ -8583,7 +8614,14 @@ void LLVOAvatar::onFirstTEMessageReceived()
LL_DEBUGS("Avatar") << avString() << "layer_baked, setting onInitialBakedTextureLoaded as callback" << LL_ENDL;
image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ),
src_callback_list, paused );
-
+ if (!image->isFullyLoaded() && !paused)
+ {
+ mLastTexCallbackAddedTime.reset();
+ }
+ else
+ {
+ mLoadedCallbackTextures++; // consider it loaded
+ }
// this could add paused texture callbacks
mLoadedCallbacksPaused |= paused;
}
@@ -9887,7 +9925,7 @@ void LLVOAvatar::getAssociatedVolumes(std::vector<LLVOVolume*>& volumes)
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attach_iter = attachment->mAttachedObjects.begin();
attach_iter != attach_end; ++attach_iter)
{
- LLViewerObject* attached_object = *attach_iter;
+ LLViewerObject* attached_object = attach_iter->get();
LLVOVolume *volume = dynamic_cast<LLVOVolume*>(attached_object);
if (volume)
{
@@ -10356,7 +10394,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
// Diagnostic list of all textures on our avatar
static std::set<LLUUID> all_textures;
- if (mVisualComplexityStale)
+ if (mVisualComplexityStale)
{
U32 cost = VISUAL_COMPLEXITY_UNKNOWN;
LLVOVolume::texture_cost_t textures;
@@ -10405,7 +10443,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- const LLViewerObject* attached_object = (*attachment_iter);
+ const LLViewerObject* attached_object = attachment_iter->get();
accountRenderComplexityForObject(attached_object, max_attachment_complexity,
textures, cost, hud_complexity_list);
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index e352a6c1fa..3526142ff5 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -629,6 +629,8 @@ protected:
LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ;
BOOL mLoadedCallbacksPaused;
+ S32 mLoadedCallbackTextures; // count of fully loaded textures filled from mCallbackTextureList
+ LLFrameTimer mLastTexCallbackAddedTime;
std::set<LLUUID> mTextureIDs;
//--------------------------------------------------------------------
// Local Textures
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index eb2d3bf873..bec33790bd 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8685,10 +8685,24 @@ void LLPipeline::renderDeferredLighting()
}
const LLViewerObject *vobj = drawablep->getVObj();
- if((vobj && vobj->getAvatar() && (vobj->getAvatar()->isTooComplex() || vobj->getAvatar()->isInMuteList()))
- || (vobj && dist_vec(vobj->getPosition(), LLViewerCamera::getInstance()->getOrigin()) > RenderFarClip))
+ if (vobj)
{
- continue;
+ LLVOAvatar *av = vobj->getAvatar();
+ if (av)
+ {
+ if (av->isTooComplex() || av->isInMuteList() || dist_vec(av->getPosition(), LLViewerCamera::getInstance()->getOrigin()) > RenderFarClip)
+ {
+ continue;
+ }
+ }
+ else
+ {
+ const LLViewerObject *root_obj = drawablep->getParent() ? drawablep->getParent()->getVObj() : vobj;
+ if (root_obj && dist_vec(root_obj->getPosition(), LLViewerCamera::getInstance()->getOrigin()) > RenderFarClip)
+ {
+ continue;
+ }
+ }
}
LLVector4a center;
@@ -11434,7 +11448,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- if (LLViewerObject* attached_object = (*attachment_iter))
+ if (LLViewerObject* attached_object = attachment_iter->get())
{
markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
}
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 9b18dbc2e2..17340e0858 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -133,7 +133,6 @@ with the same filename but different name
<texture name="Command_Chat_Icon" file_name="toolbar_icons/chat.png" preload="true" />
<texture name="Command_Compass_Icon" file_name="toolbar_icons/land.png" preload="true" />
<texture name="Command_Destinations_Icon" file_name="toolbar_icons/destinations.png" preload="true" />
- <texture name="Command_Flickr_Icon" file_name="toolbar_icons/flickr.png" preload="true" />
<texture name="Command_Gestures_Icon" file_name="toolbar_icons/gestures.png" preload="true" />
<texture name="Command_Grid_Status_Icon" file_name="toolbar_icons/grid_status.png" preload="true" />
<texture name="Command_HowTo_Icon" file_name="toolbar_icons/howto.png" preload="true" />
@@ -153,7 +152,6 @@ with the same filename but different name
<texture name="Command_Search_Icon" file_name="toolbar_icons/search.png" preload="true" />
<texture name="Command_Snapshot_Icon" file_name="toolbar_icons/snapshot.png" preload="true" />
<texture name="Command_Speak_Icon" file_name="toolbar_icons/speak.png" preload="true" />
- <texture name="Command_Twitter_Icon" file_name="toolbar_icons/twitter.png" preload="true" />
<texture name="Command_View_Icon" file_name="toolbar_icons/view.png" preload="true" />
<texture name="Command_Voice_Icon" file_name="toolbar_icons/nearbyvoice.png" preload="true" />
<texture name="Caret_Bottom_Icon" file_name="toolbar_icons/caret_bottom.png" preload="true" scale.left="1" scale.top="23" scale.right="15" scale.bottom="1" />
diff --git a/indra/newview/skins/default/xui/de/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/de/floater_merchant_outbox.xml
deleted file mode 100644
index 4070dee84c..0000000000
--- a/indra/newview/skins/default/xui/de/floater_merchant_outbox.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_merchant_outbox" title="HÄNDLER-OUTBOX">
- <string name="OutboxFolderCount1">
- 1 Ordner
- </string>
- <string name="OutboxFolderCountN">
- [NUM] Ordner
- </string>
- <string name="OutboxImporting">
- Ordner übertragen...
- </string>
- <string name="OutboxInitializing">
- Initialisieren...
- </string>
- <panel label="" name="panel_1">
- <panel name="panel_2">
- <panel name="outbox_inventory_placeholder_panel">
- <text name="outbox_inventory_placeholder_title">
- Laden...
- </text>
- </panel>
- </panel>
- <panel name="panel_3">
- <panel name="outbox_generic_drag_target">
- <text name="text_1">
- Artikel hierher ziehen, um Ordner zu erstellen
- </text>
- </panel>
- <button label="In Marktplatz übertragen" name="outbox_import_btn" tool_tip="In meinen Marktplatz-Laden verschieben"/>
- </panel>
- </panel>
-</floater>
diff --git a/indra/newview/skins/default/xui/de/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/de/panel_outbox_inventory.xml
deleted file mode 100644
index 4006022ffc..0000000000
--- a/indra/newview/skins/default/xui/de/panel_outbox_inventory.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<outbox_inventory_panel name="inventory_outbox" tool_tip="Legen Sie Artikel hier ab, um sie zum Verkauf in Ihrem Laden vorzubereiten"/>
diff --git a/indra/newview/skins/default/xui/en/floater_flickr.xml b/indra/newview/skins/default/xui/en/floater_flickr.xml
deleted file mode 100644
index 3b9c4894c1..0000000000
--- a/indra/newview/skins/default/xui/en/floater_flickr.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<floater
- positioning="cascading"
- can_close="true"
- can_resize="false"
- help_topic="floater_flickr"
- layout="topleft"
- name="floater_flickr"
- save_rect="true"
- single_instance="true"
- reuse_instance="true"
- title="SHARE TO FLICKR"
- height="590"
- width="272">
- <panel
- height="590"
- width="272"
- visible="true"
- name="background"
- follows="all"
- top="0"
- left="0">
- <tab_container
- name="tabs"
- tab_group="1"
- tab_min_width="70"
- tab_height="21"
- tab_position="top"
- top="7"
- height="555"
- follows="all"
- halign="center">
- <panel
- filename="panel_flickr_photo.xml"
- class="llflickrphotopanel"
- follows="all"
- label="PHOTO"
- name="panel_flickr_photo"/>
- <panel
- filename="panel_flickr_account.xml"
- class="llflickraccountpanel"
- follows="all"
- label="ACCOUNT"
- name="panel_flickr_account"/>
- </tab_container>
- <panel
- name="connection_status_panel"
- follows="left|bottom|right"
- height="24">
- <text
- name="connection_error_text"
- type="string"
- follows="left|bottom|right"
- bottom="-5"
- left="10"
- width="250"
- height="20"
- wrap="true"
- halign="left"
- valign="center"
- text_color="DrYellow"
- font="SansSerif">
- Error
- </text>
- <loading_indicator
- follows="left|bottom|right"
- height="24"
- width="24"
- name="connection_loading_indicator"
- top_delta="-2"
- left="10"
- visible="true"/>
- <text
- name="connection_loading_text"
- type="string"
- follows="left|bottom|right"
- top_delta="2"
- left_pad="5"
- width="250"
- height="20"
- wrap="true"
- halign="left"
- valign="center"
- text_color="EmphasisColor"
- font="SansSerif">
- Loading...
- </text>
- </panel>
- </panel>
-</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_forget_user.xml b/indra/newview/skins/default/xui/en/floater_forget_user.xml
index f2e894733f..a9ec1b74a3 100644
--- a/indra/newview/skins/default/xui/en/floater_forget_user.xml
+++ b/indra/newview/skins/default/xui/en/floater_forget_user.xml
@@ -35,6 +35,5 @@
name="delete_data"
top_pad="5"
width="260"
- initial_value="1"
- tooltip="Deletes local files: chat history, last session screenshot, browser cookies, teleport history, toolbar settings, e t c"/>
+ tool_tip="Deletes local files: chat history, last session screenshot, browser cookies, teleport history, toolbar settings, e t c. Some of local files are shared between grids."/>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_twitter.xml b/indra/newview/skins/default/xui/en/floater_twitter.xml
deleted file mode 100644
index 5e8dfb8a52..0000000000
--- a/indra/newview/skins/default/xui/en/floater_twitter.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<floater
- positioning="cascading"
- can_close="true"
- can_resize="false"
- help_topic="floater_twitter"
- layout="topleft"
- name="floater_twitter"
- save_rect="true"
- single_instance="true"
- reuse_instance="true"
- title="TWITTER"
- height="462"
- width="272">
- <tab_container
- name="tabs"
- tab_group="1"
- tab_min_width="70"
- tab_height="21"
- tab_position="top"
- top="7"
- height="457"
- halign="center">
- <panel
- filename="panel_twitter_photo.xml"
- class="lltwitterphotopanel"
- follows="all"
- label="COMPOSE"
- name="panel_twitter_photo"/>
- <panel
- filename="panel_twitter_account.xml"
- class="lltwitteraccountpanel"
- follows="all"
- label="ACCOUNT"
- name="panel_twitter_account"/>
- </tab_container>
- <text
- name="connection_error_text"
- type="string"
- follows="left|bottom|right"
- bottom="-5"
- left="10"
- width="252"
- height="20"
- wrap="true"
- halign="left"
- valign="center"
- text_color="DrYellow"
- font="SansSerif">
- Error
- </text>
- <loading_indicator
- follows="left|bottom|right"
- height="24"
- width="24"
- name="connection_loading_indicator"
- top_delta="-2"
- left="10"
- visible="true"/>
- <text
- name="connection_loading_text"
- type="string"
- follows="left|bottom|right"
- top_delta="2"
- left_pad="5"
- width="223"
- height="20"
- wrap="true"
- halign="left"
- valign="center"
- text_color="EmphasisColor"
- font="SansSerif">
- Loading...
- </text>
-</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index af185d43b0..04b5d808ec 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -311,21 +311,6 @@
parameter="conversation" />
</menu_item_check>
<menu_item_separator/>
- <menu_item_call
- label="Twitter..."
- name="Twitter">
- <menu_item_call.on_click
- function="Floater.Toggle"
- parameter="twitter"/>
- </menu_item_call>
- <menu_item_call
- label="Flickr..."
- name="Flickr">
- <menu_item_call.on_click
- function="Floater.Toggle"
- parameter="flickr"/>
- </menu_item_call>
- <menu_item_separator/>
<menu
label="Voice morphing"
name="VoiceMorphing"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 92711d4397..9f103ea51a 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3552,6 +3552,26 @@ If this is your first time using [SECOND_LIFE], you will need to create an accou
<notification
icon="alertmodal.tga"
+ name="LoginCantRemoveUsername"
+ type="alertmodal">
+ <tag>fail</tag>
+Already remembered user can be forgotten from Me &gt; Preferences &gt; Advanced &gt; Remembered Usernames.
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="LoginCantRemoveCurUsername"
+ type="alertmodal">
+ <tag>confirm</tag>
+Forgetting the logged-in user requires you to log out.
+ <usetemplate
+ name="okcancelbuttons"
+ notext="Cancel"
+ yestext="Confirm and log out"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="LoginPacketNeverReceived"
type="alertmodal">
<tag>fail</tag>
@@ -3605,6 +3625,18 @@ You can either check your Internet connection and try again in a few minutes or
<notification
icon="alertmodal.tga"
+ name="LoginRemoveMultiGridUserData"
+ type="alertmodal">
+ <tag>confirm</tag>
+Local Data you are deleting is shared between multiple grids, are you sure you want to delete it?
+ <usetemplate
+ name="okcancelbuttons"
+ notext="Cancel"
+ yestext="Confirm"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="WelcomeChooseSex"
type="alertmodal">
Your character will appear in a moment.
@@ -6062,7 +6094,7 @@ Would you like to turn off Do Not Disturb before completing this transaction?
name="ParcelPlayingMedia"
persist="false"
type="notify">
-This land has media:
+This location plays media:
[URL]
Would you like to play it?
<tag>confirm</tag>
@@ -6080,7 +6112,7 @@ Would you like to play it?
ignore="Ignore Media"
index="0"
name="No"
- text="Ignore"/>
+ text="Don't play"/>
</form>
</notification>
@@ -6811,20 +6843,6 @@ Please select at least one type of content to search (General, Moderate, or Adul
<notification
icon="notify.tga"
- name="FlickrConnect"
- type="notifytip">
- [MESSAGE]
- </notification>
-
- <notification
- icon="notify.tga"
- name="TwitterConnect"
- type="notifytip">
- [MESSAGE]
- </notification>
-
- <notification
- icon="notify.tga"
name="PaymentReceived"
log_to_im="true"
persist="true"
diff --git a/indra/newview/skins/default/xui/en/panel_flickr_account.xml b/indra/newview/skins/default/xui/en/panel_flickr_account.xml
deleted file mode 100644
index 5c2f335780..0000000000
--- a/indra/newview/skins/default/xui/en/panel_flickr_account.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<panel
- height="540"
- width="272"
- layout="topleft"
- name="panel_flickr_account">
- <string
- name="flickr_connected"
- value="You are connected to Flickr as:" />
- <string
- name="flickr_disconnected"
- value="Not connected to Flickr" />
- <text
- layout="topleft"
- length="1"
- follows="top|left"
- font="SansSerif"
- height="16"
- left="10"
- name="account_caption_label"
- top="5"
- type="string">
- Not connected to Flickr.
- </text>
- <text
- layout="topleft"
- top_pad="2"
- length="1"
- follows="top|left"
- font="SansSerif"
- height="16"
- left="10"
- name="account_name_label"
- parse_urls="true"
- type="string"/>
- <panel
- layout="topleft"
- name="panel_buttons"
- height="345"
- left="0">
- <button
- layout="topleft"
- follows="left|top|right"
- top_pad="9"
- visible="true"
- left="10"
- right="-10"
- height="23"
- label="Connect..."
- name="connect_btn"
- width="210">
- <commit_callback function="SocialSharing.Connect"/>
- </button>
-
- <button
- layout="topleft"
- follows="left|top|right"
- top_delta="0"
- left="10"
- right="-10"
- height="23"
- label="Disconnect"
- name="disconnect_btn"
- width="210"
- visible="false">
- <commit_callback function="SocialSharing.Disconnect"/>
- </button>
- <text
- layout="topleft"
- length="1"
- follows="top|left"
- height="16"
- left="10"
- name="account_learn_more_label"
- top_pad="5"
- type="string">
- [http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-Share-Flickr/ta-p/2435609 Learn about posting to Flickr]
- </text>
- </panel>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml
deleted file mode 100644
index 7fb2291423..0000000000
--- a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml
+++ /dev/null
@@ -1,259 +0,0 @@
- <panel
- height="540"
- width="272"
- follows="all"
- layout="topleft"
- name="panel_flickr_photo">
- <combo_box
- control_name="FlickrPhotoResolution"
- follows="left|top"
- layout="topleft"
- top="7"
- left="10"
- name="resolution_combobox"
- tool_tip="Image resolution"
- height="21"
- width="124">
- <combo_box.item
- label="Current Window"
- name="CurrentWindow"
- value="[i0,i0]" />
- <combo_box.item
- label="640x480"
- name="640x480"
- value="[i640,i480]" />
- <combo_box.item
- label="800x600"
- name="800x600"
- value="[i800,i600]" />
- <combo_box.item
- label="1024x768"
- name="1024x768"
- value="[i1024,i768]" />
- </combo_box>
- <combo_box
- control_name="FlickrPhotoFilters"
- follows="left|top"
- layout="topleft"
- name="filters_combobox"
- tool_tip="Image filters"
- top_delta="0"
- left_pad="4"
- height="21"
- width="124">
- <combo_box.item
- label="No Filter"
- name="NoFilter"
- value="NoFilter" />
- </combo_box>
- <panel
- height="150"
- width="250"
- visible="true"
- name="thumbnail_placeholder"
- top_pad="5"
- follows="left|top|right"
- layout="topleft"
- right="-10"
- left="10">
- </panel>
- <text
- follows="left|top"
- layout="topleft"
- font="SansSerif"
- text_color="EmphasisColor"
- height="14"
- top_pad="2"
- left="10"
- length="1"
- halign="center"
- name="working_lbl"
- translate="false"
- type="string"
- visible="true"
- width="251">
- Refreshing...
- </text>
- <view_border
- bevel_style="in"
- follows="left|top"
- layout="topleft"
- height="1"
- left="10"
- name="refresh_border"
- width="250"
- top_pad="0"/>
- <button
- follows="left|top"
- layout="topleft"
- height="23"
- label="Refresh"
- left="10"
- top_pad="5"
- name="new_snapshot_btn"
- tool_tip="Click to refresh"
- visible="true"
- width="100" >
- <button.commit_callback
- function="SocialSharing.RefreshPhoto" />
- </button>
- <button
- follows="right|top"
- layout="topleft"
- height="23"
- label="Preview"
- right="-10"
- top_delta="0"
- name="big_preview_btn"
- tool_tip="Click to toggle preview"
- is_toggle="true"
- visible="true"
- width="100" >
- <button.commit_callback
- function="SocialSharing.BigPreview" />
- </button>
- <text
- length="1"
- follows="top|left|right"
- layout="topleft"
- font="SansSerif"
- height="16"
- left="10"
- name="title_label"
- top_pad="10"
- type="string">
- Title:
- </text>
- <line_editor
- follows="left|top"
- layout="topleft"
- height="20"
- width="250"
- left="10"
- length="1"
- max_length="256"
- name="photo_title"
- type="string">
- </line_editor>
- <text
- length="1"
- follows="top|left|right"
- layout="topleft"
- font="SansSerif"
- height="16"
- left="10"
- right="-10"
- name="description_label"
- top_pad="10"
- width="25"
- type="string">
- Description:
- </text>
- <text_editor
- follows="left|top"
- layout="topleft"
- height="50"
- width="249"
- left="10"
- length="1"
- max_length="700"
- name="photo_description"
- spellcheck="true"
- type="string"
- word_wrap="true">
- </text_editor>
- <check_box
- follows="left|top"
- layout="topleft"
- initial_value="true"
- label="Include SL location at end of description"
- name="add_location_cb"
- left="9"
- height="16"
- top_pad="8"/>
- <text
- length="1"
- follows="top|left"
- layout="topleft"
- font="SansSerif"
- height="16"
- left="10"
- name="tags_label"
- top_pad="6"
- type="string">
- Tags:
- </text>
- <text
- length="1"
- follows="top|left"
- layout="topleft"
- font="SansSerifSmall"
- text_color="White_50"
- height="30"
- name="tags_help_label"
- left="51"
- top_pad="-16"
- type="string">
-Separate tags with spaces
-Use "" for multi-word tags
- </text>
- <text_editor
- follows="left|top"
- layout="topleft"
- height="50"
- width="249"
- left="10"
- length="1"
- max_length="700"
- name="photo_tags"
- type="string"
- word_wrap="true">
- </text_editor>
- <combo_box
- control_name="FlickrPhotoRating"
- follows="left|top"
- layout="topleft"
- top_pad="7"
- left="10"
- name="rating_combobox"
- tool_tip="Flickr content rating"
- height="21"
- width="250">
- <combo_box.item
- label="Safe Flickr rating"
- name="SafeRating"
- value="1" />
- <combo_box.item
- label="Moderate Flickr rating"
- name="ModerateRating"
- value="2" />
- <combo_box.item
- label="Restricted Flickr rating"
- name="RestrictedRating"
- value="3" />
- </combo_box>
- <button
- follows="left|top"
- layout="topleft"
- top_pad="7"
- left="10"
- height="23"
- label="Share"
- name="post_photo_btn"
- width="100">
- <button.commit_callback
- function="SocialSharing.SendPhoto" />
- </button>
- <button
- follows="right|top"
- layout="topleft"
- height="23"
- label="Cancel"
- name="cancel_photo_btn"
- right="-10"
- top_delta="0"
- width="100">
- <button.commit_callback
- function="SocialSharing.Cancel" />
- </button>
- </panel>
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index d601b36ce5..ade004f9d0 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -33,7 +33,7 @@
auto_resize="false"
follows="left|right|top"
name="ui_container"
- width="1000"
+ width="1011"
left="0"
top="0"
height="172">
@@ -135,10 +135,11 @@
bottom_delta="21"
height="24"
label="Remember me"
+ word_wrap="down"
check_button.bottom="3"
name="remember_name"
- tooltip="Already recorded user can be forgotten from preferences."
- width="145" />
+ tool_tip="Already remembered user can be forgotten from Me &gt; Preferences &gt; Advanced &gt; Remembered Usernames."
+ width="198" />
<check_box
control_name="RememberPassword"
follows="left|top"
@@ -148,9 +149,10 @@
left="408"
bottom_delta="0"
label="Remember password"
+ word_wrap="down"
check_button.bottom="3"
- name="remember_check"
- width="145" />
+ name="remember_password"
+ width="165" />
<combo_box
allow_text_entry="false"
font="SansSerifTiny"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
index c2995393fd..74c9b10cff 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -344,11 +344,11 @@
name="media_auto_play_combo"
width="100">
<item
- label="Disabled"
+ label="No"
name="autoplay_disabled"
value="0"/>
<item
- label="Enabled"
+ label="Yes"
name="autoplay_enabled"
value="1"/>
<item
diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_options.xml b/indra/newview/skins/default/xui/en/panel_snapshot_options.xml
index 981b9ab881..2fe4cf8183 100644
--- a/indra/newview/skins/default/xui/en/panel_snapshot_options.xml
+++ b/indra/newview/skins/default/xui/en/panel_snapshot_options.xml
@@ -61,40 +61,6 @@
font="SansSerif"
halign="left"
height="22"
- image_overlay="Command_Twitter_Icon"
- image_overlay_alignment="left"
- image_top_pad="0"
- imgoverlay_label_space="10"
- label="Share to Twitter"
- layout="topleft"
- left_delta="0"
- name="send_to_twitter_btn"
- top_pad="5">
- <button.commit_callback
- function="Snapshot.SendToTwitter"/>
- </button>
- <button
- follows="left|top"
- font="SansSerif"
- halign="left"
- height="22"
- image_overlay="Command_Flickr_Icon"
- image_overlay_alignment="left"
- image_top_pad="0"
- imgoverlay_label_space="10"
- label="Share to Flickr"
- layout="topleft"
- left_delta="0"
- name="send_to_flickr_btn"
- top_pad="5">
- <button.commit_callback
- function="Snapshot.SendToFlickr"/>
- </button>
- <button
- follows="left|top"
- font="SansSerif"
- halign="left"
- height="22"
image_overlay="Snapshot_Email"
image_overlay_alignment="left"
image_top_pad="0"
diff --git a/indra/newview/skins/default/xui/en/panel_twitter_account.xml b/indra/newview/skins/default/xui/en/panel_twitter_account.xml
deleted file mode 100644
index b9049a0bba..0000000000
--- a/indra/newview/skins/default/xui/en/panel_twitter_account.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<panel
- height="400"
- width="272"
- layout="topleft"
- name="panel_twitter_account">
- <string
- name="twitter_connected"
- value="You are connected to Twitter as:" />
- <string
- name="twitter_disconnected"
- value="Not connected to Twitter" />
- <text
- layout="topleft"
- length="1"
- follows="top|left"
- font="SansSerif"
- height="16"
- left="10"
- name="account_caption_label"
- top="5"
- type="string">
- Not connected to Twitter.
- </text>
- <text
- layout="topleft"
- top_pad="2"
- length="1"
- follows="top|left"
- font="SansSerif"
- height="16"
- left="10"
- name="account_name_label"
- parse_urls="true"
- type="string"/>
- <panel
- layout="topleft"
- follows="top|left"
- name="panel_buttons"
- height="345"
- top_pad="3"
- left="0">
- <button
- layout="topleft"
- follows="left|top|right"
- top_pad="9"
- left="10"
- right="-10"
- visible="true"
- height="23"
- label="Connect..."
- name="connect_btn"
- width="210">
- <commit_callback function="SocialSharing.Connect"/>
- </button>
-
- <button
- layout="topleft"
- follows="left|top|right"
- top_delta="0"
- left="10"
- right="-10"
- height="23"
- label="Disconnect"
- name="disconnect_btn"
- width="210"
- visible="false">
- <commit_callback function="SocialSharing.Disconnect"/>
- </button>
- <text
- layout="topleft"
- length="1"
- follows="top|left"
- height="16"
- left="10"
- name="account_learn_more_label"
- top_pad="5"
- type="string">
- [http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-Share-Twitter/ta-p/2435453 Learn about posting to Twitter]
- </text>
- </panel>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_twitter_photo.xml b/indra/newview/skins/default/xui/en/panel_twitter_photo.xml
deleted file mode 100644
index 8774d09a03..0000000000
--- a/indra/newview/skins/default/xui/en/panel_twitter_photo.xml
+++ /dev/null
@@ -1,196 +0,0 @@
- <panel
- height="420"
- width="304"
- layout="topleft"
- name="panel_twitter_photo">
- <text
- length="1"
- layout="topleft"
- follows="top|left|right"
- font="SansSerif"
- height="16"
- left="10"
- name="status_label"
- top="5"
- type="string">
- What's happening?
- </text>
- <text
- length="1"
- follows="top|left"
- layout="topleft"
- font="SansSerif"
- text_color="EmphasisColor"
- halign="right"
- height="16"
- width="30"
- left="227"
- name="status_counter_label"
- top="5"
- type="string">
- 140
- </text>
- <text_editor
- follows="left|top"
- layout="topleft"
- height="87"
- width="250"
- left="10"
- length="1"
- max_length="140"
- name="photo_status"
- spellcheck="true"
- type="string"
- word_wrap="true">
- </text_editor>
- <check_box
- follows="left|top"
- layout="topleft"
- initial_value="true"
- label="Include SL location"
- name="add_location_cb"
- left="10"
- height="16"
- top_pad="8"/>
- <check_box
- follows="left|top"
- layout="topleft"
- initial_value="true"
- label="Include a photo"
- name="add_photo_cb"
- left="10"
- height="16"
- top_pad="1"/>
- <combo_box
- control_name="TwitterPhotoResolution"
- follows="left|top"
- layout="topleft"
- top_pad="5"
- left="10"
- name="resolution_combobox"
- tool_tip="Image resolution"
- height="21"
- width="124">
- <combo_box.item
- label="Current Window"
- name="CurrentWindow"
- value="[i0,i0]" />
- <combo_box.item
- label="640x480"
- name="640x480"
- value="[i640,i480]" />
- <combo_box.item
- label="800x600"
- name="800x600"
- value="[i800,i600]" />
- <combo_box.item
- label="1024x768"
- name="1024x768"
- value="[i1024,i768]" />
- </combo_box>
- <combo_box
- control_name="TwitterPhotoFilters"
- follows="right|top"
- layout="topleft"
- name="filters_combobox"
- tool_tip="Image filters"
- top_delta="0"
- right="-10"
- height="21"
- width="124">
- <combo_box.item
- label="No Filter"
- name="NoFilter"
- value="NoFilter" />
- </combo_box>
- <panel
- layout="topleft"
- height="150"
- width="250"
- visible="true"
- name="thumbnail_placeholder"
- top_pad="5"
- right="-10"
- follows="left|top|right"
- left="10">
- </panel>
- <text
- follows="left|top"
- layout="topleft"
- font="SansSerif"
- text_color="EmphasisColor"
- height="14"
- top_pad="2"
- left="10"
- length="1"
- halign="center"
- name="working_lbl"
- translate="false"
- type="string"
- visible="true"
- width="251">
- Refreshing...
- </text>
- <view_border
- bevel_style="in"
- follows="left|top"
- layout="topleft"
- height="1"
- left="10"
- name="refresh_border"
- width="250"
- top_pad="0"/>
- <button
- follows="left|top"
- layout="topleft"
- height="23"
- label="Refresh"
- left="10"
- top_pad="5"
- name="new_snapshot_btn"
- tool_tip="Click to refresh"
- visible="true"
- width="100" >
- <button.commit_callback
- function="SocialSharing.RefreshPhoto" />
- </button>
- <button
- follows="right|top"
- layout="topleft"
- height="23"
- label="Preview"
- right="-10"
- top_delta="0"
- name="big_preview_btn"
- tool_tip="Click to toggle preview"
- is_toggle="true"
- visible="true"
- width="100" >
- <button.commit_callback
- function="SocialSharing.BigPreview" />
- </button>
- <button
- follows="left|top"
- layout="topleft"
- top_pad="3"
- left="10"
- height="23"
- label="Tweet"
- name="post_photo_btn"
- width="100">
- <button.commit_callback
- function="SocialSharing.SendPhoto" />
- </button>
- <button
- follows="right|top"
- layout="topleft"
- height="23"
- label="Cancel"
- name="cancel_photo_btn"
- right="-10"
- top_delta="0"
- width="100">
- <button.commit_callback
- function="SocialSharing.Cancel" />
- </button>
- </panel>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 0594e18c96..e1554d2a20 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -201,21 +201,7 @@ Please try logging in again in a minute.</string>
<string name="YouHaveBeenDisconnected">You have been disconnected from the region you were in.</string>
<string name="SentToInvalidRegion">You were sent to an invalid region.</string>
<string name="TestingDisconnect">Testing viewer disconnect</string>
-
- <!-- SLShare: Flickr and Twitter -->
- <string name="SocialFlickrConnecting">Connecting to Flickr...</string>
- <string name="SocialFlickrPosting">Posting...</string>
- <string name="SocialFlickrDisconnecting">Disconnecting from Flickr...</string>
- <string name="SocialFlickrErrorConnecting">Problem connecting to Flickr</string>
- <string name="SocialFlickrErrorPosting">Problem posting to Flickr</string>
- <string name="SocialFlickrErrorDisconnecting">Problem disconnecting from Flickr</string>
- <string name="SocialTwitterConnecting">Connecting to Twitter...</string>
- <string name="SocialTwitterPosting">Posting...</string>
- <string name="SocialTwitterDisconnecting">Disconnecting from Twitter...</string>
- <string name="SocialTwitterErrorConnecting">Problem connecting to Twitter</string>
- <string name="SocialTwitterErrorPosting">Problem posting to Twitter</string>
- <string name="SocialTwitterErrorDisconnecting">Problem disconnecting from Twitter</string>
-
+
<!-- SLShare: User Friendly Filter Names Translation -->
<string name="BlackAndWhite">Black &amp; White</string>
<string name="Colors1970">1970&apos;s Colors</string>
@@ -3656,13 +3642,6 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
Drag items from inventory here
</string>
- <string name="flickr_post_success">
- You posted to Flickr.
- </string>
- <string name="twitter_post_success">
- You posted to Twitter.
- </string>
-
<string name="no_session_message">
(IM Session Doesn't Exist)
</string>
@@ -4097,7 +4076,6 @@ Try enclosing path to the editor with double quotes.
<string name="Command_Conversations_Label">Conversations</string>
<string name="Command_Compass_Label">Compass</string>
<string name="Command_Destinations_Label">Destinations</string>
- <string name="Command_Flickr_Label">Flickr</string>
<string name="Command_Gestures_Label">Gestures</string>
<string name="Command_Grid_Status_Label">Grid status</string>
<string name="Command_HowTo_Label">How to</string>
@@ -4116,7 +4094,6 @@ Try enclosing path to the editor with double quotes.
<string name="Command_Search_Label">Search</string>
<string name="Command_Snapshot_Label">Snapshot</string>
<string name="Command_Speak_Label">Speak</string>
- <string name="Command_Twitter_Label">Twitter</string>
<string name="Command_View_Label">Camera controls</string>
<string name="Command_Voice_Label">Voice settings</string>
@@ -4128,7 +4105,6 @@ Try enclosing path to the editor with double quotes.
<string name="Command_Conversations_Tooltip">Converse with everyone</string>
<string name="Command_Compass_Tooltip">Compass</string>
<string name="Command_Destinations_Tooltip">Destinations of interest</string>
- <string name="Command_Flickr_Tooltip">Upload to Flickr</string>
<string name="Command_Gestures_Tooltip">Gestures for your avatar</string>
<string name="Command_Grid_Status_Tooltip">Show current Grid status</string>
<string name="Command_HowTo_Tooltip">How to do common tasks</string>
@@ -4147,7 +4123,6 @@ Try enclosing path to the editor with double quotes.
<string name="Command_Search_Tooltip">Find places, events, people</string>
<string name="Command_Snapshot_Tooltip">Take a picture</string>
<string name="Command_Speak_Tooltip">Speak with people nearby using your microphone</string>
- <string name="Command_Twitter_Tooltip">Twitter</string>
<string name="Command_View_Tooltip">Changing camera angle</string>
<string name="Command_Voice_Tooltip">Volume controls for calls and people near you in world</string>
diff --git a/indra/newview/skins/default/xui/es/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/es/floater_merchant_outbox.xml
deleted file mode 100644
index b74c5fca5c..0000000000
--- a/indra/newview/skins/default/xui/es/floater_merchant_outbox.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_merchant_outbox" title="BUZÓN DE SALIDA DE COMERCIANTE">
- <string name="OutboxFolderCount1">
- 1 carpeta
- </string>
- <string name="OutboxFolderCountN">
- [NUM] carpetas
- </string>
- <string name="OutboxImporting">
- Enviando carpetas...
- </string>
- <string name="OutboxInitializing">
- Inicializando...
- </string>
- <panel label="" name="panel_1">
- <panel name="panel_2">
- <panel name="outbox_inventory_placeholder_panel">
- <text name="outbox_inventory_placeholder_title">
- Cargando...
- </text>
- </panel>
- </panel>
- <panel name="panel_3">
- <panel name="outbox_generic_drag_target">
- <text name="text_1">
- Arrastra aquí artículos para crear carpetas
- </text>
- </panel>
- <button label="Enviar al Mercado" name="outbox_import_btn" tool_tip="Poner en el escaparate de Mi Mercado"/>
- </panel>
- </panel>
-</floater>
diff --git a/indra/newview/skins/default/xui/es/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/es/panel_outbox_inventory.xml
deleted file mode 100644
index 9e2f3c3adc..0000000000
--- a/indra/newview/skins/default/xui/es/panel_outbox_inventory.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<outbox_inventory_panel name="inventory_outbox" tool_tip="Arrastra y coloca aquí los objetos que desees preparar para venderlos en tu tienda"/>
diff --git a/indra/newview/skins/default/xui/fr/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/fr/floater_merchant_outbox.xml
deleted file mode 100644
index 0f657e9e5b..0000000000
--- a/indra/newview/skins/default/xui/fr/floater_merchant_outbox.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_merchant_outbox" title="BOÎTE D&apos;ENVOI VENDEUR">
- <string name="OutboxFolderCount1">
- 1 dossier
- </string>
- <string name="OutboxFolderCountN">
- [NUM] dossiers
- </string>
- <string name="OutboxImporting">
- Envoi de dossiers...
- </string>
- <string name="OutboxInitializing">
- Initialisation...
- </string>
- <panel label="" name="panel_1">
- <panel name="panel_2">
- <panel name="outbox_inventory_placeholder_panel">
- <text name="outbox_inventory_placeholder_title">
- Chargement...
- </text>
- </panel>
- </panel>
- <panel name="panel_3">
- <panel name="outbox_generic_drag_target">
- <text name="text_1">
- Faites glisser des éléments ici pour créer des dossiers
- </text>
- </panel>
- <button label="Envoyer vers la Place du marché" name="outbox_import_btn" tool_tip="Vers ma vitrine de la Place du marché"/>
- </panel>
- </panel>
-</floater>
diff --git a/indra/newview/skins/default/xui/fr/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/fr/panel_outbox_inventory.xml
deleted file mode 100644
index d947dbceb8..0000000000
--- a/indra/newview/skins/default/xui/fr/panel_outbox_inventory.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<outbox_inventory_panel name="inventory_outbox" tool_tip="Glisser-déposer des articles ici afin de les préparer à la vente sur votre vitrine."/>
diff --git a/indra/newview/skins/default/xui/it/floater_about_land.xml b/indra/newview/skins/default/xui/it/floater_about_land.xml
index 50e2d1a8de..70909b1f7c 100644
--- a/indra/newview/skins/default/xui/it/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/it/floater_about_land.xml
@@ -371,7 +371,7 @@ Solamente terreni più grandi possono essere abilitati nella ricerca.
Gli avatar di altri lotti possono vedere gli avatar che si trovano in questo lotto e chattare con loro
</text>
<check_box label="Vedi avatar" top="170" name="SeeAvatarsCheck" tool_tip="Consente ad avatar in altri lotti di vedere e chattare con avatar in questo lotto e viceversa."/>
- <text name="landing_point">
+ <text name="landing_point" width="225">
Punto di atterraggio: [LANDING]
</text>
<button label="Imposta" label_selected="Imposta" name="Set" tool_tip="Imposta il punto di atterraggio dove arrivano i visitatori. Impostalo nel punto dove si trova il tuo avatar in questo terreno." width="60"/>
diff --git a/indra/newview/skins/default/xui/it/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/it/floater_merchant_outbox.xml
deleted file mode 100644
index 7a1f7f0a0c..0000000000
--- a/indra/newview/skins/default/xui/it/floater_merchant_outbox.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_merchant_outbox" title="CASELLA IN USCITA DEL RIVENDITORE">
- <string name="OutboxFolderCount1">
- 1 cartella
- </string>
- <string name="OutboxFolderCountN">
- [NUM] cartelle
- </string>
- <string name="OutboxImporting">
- Invio cartelle...
- </string>
- <string name="OutboxInitializing">
- Inizializzazione...
- </string>
- <panel label="" name="panel_1">
- <panel name="panel_2">
- <panel name="outbox_inventory_placeholder_panel">
- <text name="outbox_inventory_placeholder_title">
- Caricamento in corso...
- </text>
- </panel>
- </panel>
- <panel name="panel_3">
- <panel name="outbox_generic_drag_target">
- <text name="text_1">
- Trascina elementi qui per creare cartelle
- </text>
- </panel>
- <button label="Invia a Marketplace" name="outbox_import_btn" tool_tip="Push su negozio Marketplace"/>
- </panel>
- </panel>
-</floater>
diff --git a/indra/newview/skins/default/xui/it/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/it/panel_outbox_inventory.xml
deleted file mode 100644
index af5e05336e..0000000000
--- a/indra/newview/skins/default/xui/it/panel_outbox_inventory.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<outbox_inventory_panel name="inventory_outbox" tool_tip="Trascina gli oggetti qui per prepararli per la vendita nel tuo negozio"/>
diff --git a/indra/newview/skins/default/xui/ja/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/ja/floater_merchant_outbox.xml
deleted file mode 100644
index 2edb3c624c..0000000000
--- a/indra/newview/skins/default/xui/ja/floater_merchant_outbox.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_merchant_outbox" title="マーチャントアウトボックス">
- <string name="OutboxFolderCount1">
- 1 個のフォルダ
- </string>
- <string name="OutboxFolderCountN">
- [NUM] 個のフォルダ
- </string>
- <string name="OutboxImporting">
- フォルダを送信中...
- </string>
- <string name="OutboxInitializing">
- 初期化中...
- </string>
- <panel label="" name="panel_1">
- <panel name="panel_2">
- <panel name="outbox_inventory_placeholder_panel">
- <text name="outbox_inventory_placeholder_title">
- ロード中...
- </text>
- </panel>
- </panel>
- <panel name="panel_3">
- <panel name="outbox_generic_drag_target">
- <text name="text_1">
- ここにアイテムをドラッグして、フォルダを作成する
- </text>
- </panel>
- <button label="マーケットプレイスに送信" name="outbox_import_btn" tool_tip="自分のマーケットプレイス店頭に移動"/>
- </panel>
- </panel>
-</floater>
diff --git a/indra/newview/skins/default/xui/ja/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/ja/panel_outbox_inventory.xml
deleted file mode 100644
index 1a14283113..0000000000
--- a/indra/newview/skins/default/xui/ja/panel_outbox_inventory.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<outbox_inventory_panel name="inventory_outbox" tool_tip="アイテムをここにドラッグアンドドロップすると、あなたの店頭に並びます"/>
diff --git a/indra/newview/skins/default/xui/pl/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/pl/floater_merchant_outbox.xml
deleted file mode 100644
index 9cc88ba288..0000000000
--- a/indra/newview/skins/default/xui/pl/floater_merchant_outbox.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<floater name="floater_merchant_outbox" title="SKRZYNKA NADAWCZA KUPCA">
- <string name="OutboxFolderCountN">
- Folderów: [NUM]
- </string>
- <string name="OutboxImporting">
- Wysyłanie folderów...
- </string>
- <string name="OutboxInitializing">
- Inicjalizacja...
- </string>
- <panel name="panel_1">
- <panel name="panel_2">
- <panel name="outbox_inventory_placeholder_panel">
- <text name="outbox_inventory_placeholder_title">
- Ładowanie...
- </text>
- </panel>
- </panel>
- <panel name="panel_3">
- <panel name="outbox_generic_drag_target">
- <text name="text_1">
- Przeciągaj tu przedmioty by tworzyć foldery
- </text>
- </panel>
- <button label="Wyślij na Marketplace" tool_tip="Wyślij na witrynę Marketplace" name="outbox_import_btn" />
- </panel>
- </panel>
-</floater>
diff --git a/indra/newview/skins/default/xui/pl/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/pl/panel_outbox_inventory.xml
deleted file mode 100644
index 01d0455215..0000000000
--- a/indra/newview/skins/default/xui/pl/panel_outbox_inventory.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<inventory_panel name="inventory_outbox" tool_tip="Przeciągnij i upuść tutaj przedmioty, aby przygotować je do sprzedaży na Twojej witrynie Marketplace" />
diff --git a/indra/newview/skins/default/xui/pt/floater_about_land.xml b/indra/newview/skins/default/xui/pt/floater_about_land.xml
index 96e54bb9bc..0e7d0798c7 100644
--- a/indra/newview/skins/default/xui/pt/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/pt/floater_about_land.xml
@@ -366,7 +366,7 @@ Apenas lotes maiores podem ser listados na busca.
Avatares em outros lotes podem ver e conversar com avatares neste lote
</text>
<check_box label="Ver avatares" name="SeeAvatarsCheck" top="170" tool_tip="Permite que os avatares em outros lotes vejam e batam papo com avatares neste lote. Você poderá vê-los e conversar com eles."/>
- <text name="landing_point">
+ <text name="landing_point" width="225">
Ponto de Aterrissagem: [LANDING]
</text>
<button label="Definir" label_selected="Definir" name="Set" tool_tip="Define o ponto de aterrissagem de visitantes. Define para o ponto em que seu avatar se encontra neste lote."/>
diff --git a/indra/newview/skins/default/xui/pt/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/pt/floater_merchant_outbox.xml
deleted file mode 100644
index 3beada1fc0..0000000000
--- a/indra/newview/skins/default/xui/pt/floater_merchant_outbox.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_merchant_outbox" title="CAIXA DE SAÍDA DO LOJISTA">
- <string name="OutboxFolderCount1">
- 1 pasta
- </string>
- <string name="OutboxFolderCountN">
- [NUM] pasta(s)
- </string>
- <string name="OutboxImporting">
- Enviando pastas...
- </string>
- <string name="OutboxInitializing">
- Iniciando...
- </string>
- <panel label="" name="panel_1">
- <panel name="panel_2">
- <panel name="outbox_inventory_placeholder_panel">
- <text name="outbox_inventory_placeholder_title">
- Carregando...
- </text>
- </panel>
- </panel>
- <panel name="panel_3">
- <panel name="outbox_generic_drag_target">
- <text name="text_1">
- Arraste itens para cá para criar pastas
- </text>
- </panel>
- <button label="Enviar para Mercado" name="outbox_import_btn" tool_tip="Enviar para a frente da minha loja do mercado"/>
- </panel>
- </panel>
-</floater>
diff --git a/indra/newview/skins/default/xui/pt/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/pt/panel_outbox_inventory.xml
deleted file mode 100644
index 442622035a..0000000000
--- a/indra/newview/skins/default/xui/pt/panel_outbox_inventory.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<outbox_inventory_panel name="inventory_outbox" tool_tip="Arraste e solte os itens aqui para prepará-los para venda na frente da sua loja"/>
diff --git a/indra/newview/skins/default/xui/ru/floater_about_land.xml b/indra/newview/skins/default/xui/ru/floater_about_land.xml
index 222572b4bf..fb17896551 100644
--- a/indra/newview/skins/default/xui/ru/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/ru/floater_about_land.xml
@@ -364,7 +364,7 @@
Аватары с других участков могут видеть аватары на этом участке и общаться с ними
</text>
<check_box label="Видны аватары" left="262" name="SeeAvatarsCheck" tool_tip="Аватары с других участков смогут видеть аватары на этом участке и общаться с ними в чате, а вы также сможете видеть их и общаться с ними."/>
- <text name="landing_point">
+ <text name="landing_point" width="225">
В точку телепортации: [LANDING]
</text>
<button label="Задать" label_selected="Задать" name="Set" tool_tip="Установить точку телепортации, в которую будут прибывать посетители, Ставится в месте вашего аватара на этом участке."/>
diff --git a/indra/newview/skins/default/xui/ru/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/ru/floater_merchant_outbox.xml
deleted file mode 100644
index 1d3ff3f5ed..0000000000
--- a/indra/newview/skins/default/xui/ru/floater_merchant_outbox.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_merchant_outbox" title="ТОРГОВЫЕ ИСХОДЯЩИЕ">
- <string name="OutboxFolderCount1">
- 1 папка
- </string>
- <string name="OutboxFolderCountN">
- [NUM] папки
- </string>
- <string name="OutboxImporting">
- Отправка папок....
- </string>
- <string name="OutboxInitializing">
- Инициализация...
- </string>
- <panel label="" name="panel_1">
- <panel name="panel_2">
- <panel name="outbox_inventory_placeholder_panel">
- <text name="outbox_inventory_placeholder_title">
- Загрузка...
- </text>
- </panel>
- </panel>
- <panel name="panel_3">
- <panel name="outbox_generic_drag_target">
- <text name="text_1">
- Перетаскивайте предметы для создания папок
- </text>
- </panel>
- <button label="Отправить в торговый центр" name="outbox_import_btn" tool_tip="Выставить на витрину моего магазина"/>
- </panel>
- </panel>
-</floater>
diff --git a/indra/newview/skins/default/xui/ru/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/ru/panel_outbox_inventory.xml
deleted file mode 100644
index 0095d48af9..0000000000
--- a/indra/newview/skins/default/xui/ru/panel_outbox_inventory.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<outbox_inventory_panel name="inventory_outbox" tool_tip="Перетащите вещи сюда, чтобы подготовить их для размещения на витрине вашего магазина"/>
diff --git a/indra/newview/skins/default/xui/tr/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/tr/floater_merchant_outbox.xml
deleted file mode 100644
index e5643f3bf6..0000000000
--- a/indra/newview/skins/default/xui/tr/floater_merchant_outbox.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_merchant_outbox" title="SATICI GİDEN KUTUSU">
- <string name="OutboxFolderCount1">
- 1 klasör
- </string>
- <string name="OutboxFolderCountN">
- [NUM] klasör
- </string>
- <string name="OutboxImporting">
- Klasörler gönderiliyor...
- </string>
- <string name="OutboxInitializing">
- Başlatılıyor...
- </string>
- <panel label="" name="panel_1">
- <panel name="panel_2">
- <panel name="outbox_inventory_placeholder_panel">
- <text name="outbox_inventory_placeholder_title">
- Yükleniyor...
- </text>
- </panel>
- </panel>
- <panel name="panel_3">
- <panel name="outbox_generic_drag_target">
- <text name="text_1">
- Klasör oluşturmak için öğeleri buraya sürükleyin
- </text>
- </panel>
- <button label="Pazaryerine Gönder" name="outbox_import_btn" tool_tip="Pazaryeri Vitrinime Gönder"/>
- </panel>
- </panel>
-</floater>
diff --git a/indra/newview/skins/default/xui/tr/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/tr/panel_outbox_inventory.xml
deleted file mode 100644
index a947eee150..0000000000
--- a/indra/newview/skins/default/xui/tr/panel_outbox_inventory.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<outbox_inventory_panel name="inventory_outbox" tool_tip="Öğeleri vitrininizde satışa hazırlamak için sürükleyip buraya bırakın"/>
diff --git a/indra/newview/skins/default/xui/zh/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/zh/floater_merchant_outbox.xml
deleted file mode 100644
index e6a70a7724..0000000000
--- a/indra/newview/skins/default/xui/zh/floater_merchant_outbox.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="floater_merchant_outbox" title="商家發件匣">
- <string name="OutboxFolderCount1">
- 1 個資料夾
- </string>
- <string name="OutboxFolderCountN">
- [NUM] 個資料夾
- </string>
- <string name="OutboxImporting">
- 正在傳送資料夾…
- </string>
- <string name="OutboxInitializing">
- 正在初始化…
- </string>
- <panel label="" name="panel_1">
- <panel name="panel_2">
- <panel name="outbox_inventory_placeholder_panel">
- <text name="outbox_inventory_placeholder_title">
- 載入中…
- </text>
- </panel>
- </panel>
- <panel name="panel_3">
- <panel name="outbox_generic_drag_target">
- <text name="text_1">
- 把物項拖曳到這裡,可建立資料夾
- </text>
- </panel>
- <button label="送往第二人生購物市集" name="outbox_import_btn" tool_tip="推到我第二人生購物市集的店面"/>
- </panel>
- </panel>
-</floater>
diff --git a/indra/newview/skins/default/xui/zh/panel_outbox_inventory.xml b/indra/newview/skins/default/xui/zh/panel_outbox_inventory.xml
deleted file mode 100644
index 8de0bb0e4d..0000000000
--- a/indra/newview/skins/default/xui/zh/panel_outbox_inventory.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<outbox_inventory_panel name="inventory_outbox" tool_tip="將物項拖曳並置放到這裡,準備在你的商店出售"/>
diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp
index a1005c654c..caa3016d2e 100644
--- a/indra/newview/tests/llsecapi_test.cpp
+++ b/indra/newview/tests/llsecapi_test.cpp
@@ -69,6 +69,7 @@ LLPointer<LLCredential> LLSecAPIBasicHandler::loadCredential(const std::string&
void LLSecAPIBasicHandler::saveCredential(LLPointer<LLCredential> cred, bool save_authenticator) {}
void LLSecAPIBasicHandler::deleteCredential(LLPointer<LLCredential> cred) {}
bool LLSecAPIBasicHandler::hasCredentialMap(const std::string& storage, const std::string& grid) { return false; }
+bool LLSecAPIBasicHandler::emptyCredentialMap(const std::string& storage, const std::string& grid) { return false; }
void LLSecAPIBasicHandler::loadCredentialMap(const std::string& storage, const std::string& grid, credential_map_t& credential_map) {}
LLPointer<LLCredential> LLSecAPIBasicHandler::loadFromCredentialMap(const std::string& storage, const std::string& grid, const std::string& userkey) { return NULL; }
void LLSecAPIBasicHandler::addToCredentialMap(const std::string& storage, LLPointer<LLCredential> cred, bool save_authenticator) {}