summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-06-18 10:52:24 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-06-18 10:52:24 -0700
commit5985ea0f98013741a3313d67cda430152171e611 (patch)
tree038778966d7134071b726536c0501243f0a2ce35 /indra
parentd8ec78e325ee3add1a5968ea0a3051de16958404 (diff)
parent005986d19c46008ae53c56e827b2603cd3d2ae92 (diff)
Merge
Diffstat (limited to 'indra')
-rw-r--r--indra/llcharacter/llmultigesture.cpp4
-rw-r--r--indra/llcommon/llapp.cpp47
-rw-r--r--indra/llcommon/llfasttimer_class.cpp3
-rw-r--r--indra/llui/llaccordionctrl.h2
-rw-r--r--indra/llui/llaccordionctrltab.cpp27
-rw-r--r--indra/llui/llaccordionctrltab.h4
-rw-r--r--indra/llui/lltextbase.cpp39
-rw-r--r--indra/llui/lltextbase.h7
-rw-r--r--indra/newview/app_settings/settings.xml37
-rw-r--r--indra/newview/llagentwearables.cpp20
-rw-r--r--indra/newview/llagentwearables.h7
-rw-r--r--indra/newview/llappearancemgr.cpp41
-rw-r--r--indra/newview/llappearancemgr.h6
-rw-r--r--indra/newview/llappviewer.cpp12
-rw-r--r--indra/newview/llchatbar.cpp1
-rw-r--r--indra/newview/llchathistory.cpp5
-rw-r--r--indra/newview/llcofwearables.cpp4
-rw-r--r--indra/newview/llcolorswatch.cpp6
-rw-r--r--indra/newview/llface.cpp3
-rw-r--r--indra/newview/llfloaterhardwaresettings.cpp7
-rw-r--r--indra/newview/llfloaterpreference.cpp27
-rw-r--r--indra/newview/llinventorybridge.cpp15
-rw-r--r--indra/newview/llinventorybridge.h1
-rw-r--r--indra/newview/llinventoryfunctions.cpp30
-rw-r--r--indra/newview/llinventoryfunctions.h24
-rw-r--r--indra/newview/llinventoryitemslist.cpp22
-rw-r--r--indra/newview/llinventoryitemslist.h7
-rw-r--r--indra/newview/llnearbychatbar.cpp1
-rw-r--r--indra/newview/lloutfitslist.cpp170
-rw-r--r--indra/newview/lloutfitslist.h33
-rw-r--r--indra/newview/llpanelobjectinventory.cpp21
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp25
-rw-r--r--indra/newview/llpaneloutfitsinventory.h2
-rw-r--r--indra/newview/llpreviewgesture.cpp52
-rw-r--r--indra/newview/llpreviewgesture.h8
-rw-r--r--indra/newview/llsidepanelappearance.cpp8
-rw-r--r--indra/newview/llstartup.cpp6
-rw-r--r--indra/newview/llstartup.h3
-rw-r--r--indra/newview/lltoastalertpanel.cpp83
-rw-r--r--indra/newview/lltoolbar.cpp27
-rw-r--r--indra/newview/lltoolgrab.cpp22
-rw-r--r--indra/newview/llviewermenu.cpp12
-rw-r--r--indra/newview/llviewerwindow.cpp282
-rw-r--r--indra/newview/llviewerwindow.h18
-rw-r--r--indra/newview/llwearableitemslist.cpp13
-rw-r--r--indra/newview/llwearableitemslist.h8
-rw-r--r--indra/newview/llworldmapmessage.cpp3
-rw-r--r--indra/newview/skins/default/textures/textures.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_gesture.xml76
-rw-r--r--indra/newview/skins/default/xui/en/floater_voice_controls.xml6
-rw-r--r--indra/newview/skins/default/xui/en/floater_voice_effect.xml60
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_tab.xml8
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_general.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_voice_effect.xml6
56 files changed, 636 insertions, 733 deletions
diff --git a/indra/llcharacter/llmultigesture.cpp b/indra/llcharacter/llmultigesture.cpp
index 05d1bc0cd9..ee60430d97 100644
--- a/indra/llcharacter/llmultigesture.cpp
+++ b/indra/llcharacter/llmultigesture.cpp
@@ -498,6 +498,10 @@ std::vector<std::string> LLGestureStepWait::getLabel() const
strings.push_back("until animations are done");
// label += "until animations are done";
}
+ else
+ {
+ strings.push_back("");
+ }
return strings;
}
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp
index eedec0b24e..0447ca93f5 100644
--- a/indra/llcommon/llapp.cpp
+++ b/indra/llcommon/llapp.cpp
@@ -32,6 +32,12 @@
#include <cstdlib>
+#ifdef LL_DARWIN
+#include <sys/types.h>
+#include <unistd.h>
+#include <sys/sysctl.h>
+#endif
+
#include "linden_common.h"
#include "llapp.h"
@@ -306,7 +312,42 @@ void LLApp::setupErrorHandling()
setup_signals();
// Add google breakpad exception handler configured for Darwin/Linux.
- if(mExceptionHandler == 0)
+ bool installHandler = true;
+#ifdef LL_DARWIN
+ // For the special case of Darwin, we do not want to install the handler if
+ // the process is being debugged as the app will exit with value ABRT (6) if
+ // we do. Unfortunately, the code below which performs that test relies on
+ // the structure kinfo_proc which has been tagged by apple as an unstable
+ // API. We disable this test for shipping versions to avoid conflicts with
+ // future releases of Darwin. This test is really only needed for developers
+ // starting the app from a debugger anyway.
+ #ifndef LL_RELEASE_FOR_DOWNLOAD
+ int mib[4];
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_PID;
+ mib[3] = getpid();
+
+ struct kinfo_proc info;
+ memset(&info, 0, sizeof(info));
+
+ size_t size = sizeof(info);
+ int result = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0);
+ if((result == 0) || (errno == ENOMEM))
+ {
+ // P_TRACED flag is set, so this process is being debugged; do not install
+ // the handler
+ if(info.kp_proc.p_flag & P_TRACED) installHandler = false;
+ }
+ else
+ {
+ // Failed to discover if the process is being debugged; default to
+ // installing the handler.
+ installHandler = true;
+ }
+ #endif
+#endif
+ if(installHandler && (mExceptionHandler == 0))
{
std::string dumpPath = "/tmp/";
mExceptionHandler = new google_breakpad::ExceptionHandler(dumpPath, 0, &unix_post_minidump_callback, 0, true);
@@ -364,7 +405,7 @@ void LLApp::setError()
void LLApp::setMiniDumpDir(const std::string &path)
{
- llassert(mExceptionHandler);
+ if(mExceptionHandler == 0) return;
#ifdef LL_WINDOWS
wchar_t buffer[MAX_MINDUMP_PATH_LENGTH];
mbstowcs(buffer, path.c_str(), MAX_MINDUMP_PATH_LENGTH);
@@ -376,7 +417,7 @@ void LLApp::setMiniDumpDir(const std::string &path)
void LLApp::writeMiniDump()
{
- llassert(mExceptionHandler);
+ if(mExceptionHandler == 0) return;
mExceptionHandler->WriteMinidump();
}
diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer_class.cpp
index 20727dd76e..dfbae09864 100644
--- a/indra/llcommon/llfasttimer_class.cpp
+++ b/indra/llcommon/llfasttimer_class.cpp
@@ -238,7 +238,8 @@ U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer
#else // windows or x86-mac or x86-linux or x86-solaris
U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer
{
- static U64 sCPUClockFrequency = U64(LLProcessorInfo().getCPUFrequency());
+ //getCPUFrequency returns MHz and sCPUClockFrequency wants to be in Hz
+ static U64 sCPUClockFrequency = U64(LLProcessorInfo().getCPUFrequency()*1000000.0);
// we drop the low-order byte in our timers, so report a lower frequency
return sCPUClockFrequency >> 8;
diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h
index 3ad5274085..b5fdf796cd 100644
--- a/indra/llui/llaccordionctrl.h
+++ b/indra/llui/llaccordionctrl.h
@@ -138,6 +138,8 @@ public:
*/
const LLAccordionCtrlTab* getExpandedTab() const;
+ const LLAccordionCtrlTab* getSelectedTab() const { return mSelectedTab; }
+
private:
void initNoTabsWidget(const LLTextBox::Params& tb_params);
void updateNoTabsHelpTextVisibility();
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index 54bb328a18..20e4b7867c 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -76,6 +76,8 @@ public:
std::string getTitle();
void setTitle(const std::string& title, const std::string& hl);
+ void setTitleFontStyle(std::string style);
+
void setSelected(bool is_selected) { mIsSelected = is_selected; }
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
@@ -102,6 +104,9 @@ private:
LLPointer<LLUIImage> mImageHeaderPressed;
LLPointer<LLUIImage> mImageHeaderFocused;
+ // style saved when applying it in setTitleFontStyle
+ LLStyle::Params mStyleParams;
+
LLUIColor mHeaderBGColor;
bool mNeedsHighlight;
@@ -170,12 +175,23 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitle(const std::string& t
{
LLTextUtil::textboxSetHighlightedVal(
mHeaderTextbox,
- LLStyle::Params(),
+ mStyleParams,
title,
hl);
}
}
+void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::setTitleFontStyle(std::string style)
+{
+ if (mHeaderTextbox)
+ {
+ std::string text = mHeaderTextbox->getText();
+ mStyleParams.font(mHeaderTextbox->getDefaultFont());
+ mStyleParams.font.style(style);
+ mHeaderTextbox->setText(text, mStyleParams);
+ }
+}
+
void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw()
{
S32 width = getRect().getWidth();
@@ -495,6 +511,15 @@ void LLAccordionCtrlTab::setTitle(const std::string& title, const std::string& h
}
}
+void LLAccordionCtrlTab::setTitleFontStyle(std::string style)
+{
+ LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME);
+ if (header)
+ {
+ header->setTitleFontStyle(style);
+ }
+}
+
boost::signals2::connection LLAccordionCtrlTab::setFocusReceivedCallback(const focus_signal_t::slot_type& cb)
{
LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME);
diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h
index 7bf7eeef8f..e17ecc5319 100644
--- a/indra/llui/llaccordionctrltab.h
+++ b/indra/llui/llaccordionctrltab.h
@@ -37,6 +37,7 @@
#include "llrect.h"
#include "lluictrl.h"
#include "lluicolor.h"
+#include "llstyle.h"
class LLUICtrlFactory;
class LLUIImage;
@@ -120,6 +121,9 @@ public:
// Set text and highlight substring in LLAccordionCtrlTabHeader
void setTitle(const std::string& title, const std::string& hl = LLStringUtil::null);
+ // Set text font style in LLAccordionCtrlTabHeader
+ void setTitleFontStyle(std::string style);
+
boost::signals2::connection setFocusReceivedCallback(const focus_signal_t::slot_type& cb);
boost::signals2::connection setFocusLostCallback(const focus_signal_t::slot_type& cb);
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 3c6c7d3e82..2d0d5c12cb 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -152,6 +152,7 @@ LLTextBase::Params::Params()
bg_writeable_color("bg_writeable_color"),
bg_focus_color("bg_focus_color"),
allow_scroll("allow_scroll", true),
+ plain_text("plain_text",false),
track_end("track_end", false),
read_only("read_only", false),
v_pad("v_pad", 0),
@@ -200,6 +201,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p)
mSelectionStart( 0 ),
mSelectionEnd( 0 ),
mIsSelecting( FALSE ),
+ mPlainText ( p.plain_text ),
mWordWrap(p.wrap),
mUseEllipses( p.use_ellipses ),
mParseHTML(p.allow_html),
@@ -1614,7 +1616,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
part = (S32)LLTextParser::MIDDLE;
}
std::string subtext=text.substr(0,start);
- appendAndHighlightTextImpl(subtext, part, style_params);
+ appendAndHighlightText(subtext, part, style_params);
}
// output an optional icon before the Url
@@ -1635,11 +1637,11 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
// output the styled Url (unless we've been asked to suppress hyperlinking)
if (match.isLinkDisabled())
{
- appendAndHighlightTextImpl(match.getLabel(), part, style_params);
+ appendAndHighlightText(match.getLabel(), part, style_params);
}
else
{
- appendAndHighlightTextImpl(match.getLabel(), part, link_params);
+ appendAndHighlightText(match.getLabel(), part, link_params);
// set the tooltip for the Url label
if (! match.getTooltip().empty())
@@ -1667,11 +1669,11 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
if (part != (S32)LLTextParser::WHOLE)
part=(S32)LLTextParser::END;
if (end < (S32)text.length())
- appendAndHighlightTextImpl(text, part, style_params);
+ appendAndHighlightText(text, part, style_params);
}
else
{
- appendAndHighlightTextImpl(new_text, part, style_params);
+ appendAndHighlightText(new_text, part, style_params);
}
}
@@ -1682,23 +1684,7 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c
if(prepend_newline)
appendLineBreakSegment(input_params);
- std::string::size_type start = 0;
- std::string::size_type pos = new_text.find("\n",start);
-
- while(pos!=-1)
- {
- if(pos!=start)
- {
- std::string str = std::string(new_text,start,pos-start);
- appendTextImpl(str,input_params);
- }
- appendLineBreakSegment(input_params);
- start = pos+1;
- pos = new_text.find("\n",start);
- }
-
- std::string str = std::string(new_text,start,new_text.length()-start);
- appendTextImpl(str,input_params);
+ appendTextImpl(new_text,input_params);
}
void LLTextBase::needsReflow(S32 index)
@@ -1718,6 +1704,10 @@ void LLTextBase::appendLineBreakSegment(const LLStyle::Params& style_params)
void LLTextBase::appendImageSegment(S32 highlight_part, const LLStyle::Params& style_params)
{
+ if(getPlainText())
+ {
+ return;
+ }
segment_vec_t segments;
LLStyleConstSP sp(new LLStyle(style_params));
segments.push_back(new LLImageTextSegment(sp, getLength(),*this));
@@ -1797,13 +1787,10 @@ void LLTextBase::appendAndHighlightTextImpl(const std::string &new_text, S32 hig
}
}
-void LLTextBase::appendAndHighlightText(const std::string &new_text, bool prepend_newline, S32 highlight_part, const LLStyle::Params& style_params)
+void LLTextBase::appendAndHighlightText(const std::string &new_text, S32 highlight_part, const LLStyle::Params& style_params)
{
if (new_text.empty()) return;
- if(prepend_newline)
- appendLineBreakSegment(style_params);
-
std::string::size_type start = 0;
std::string::size_type pos = new_text.find("\n",start);
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 89ce5cdc8e..92876e20d6 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -86,6 +86,7 @@ public:
track_end,
read_only,
allow_scroll,
+ plain_text,
wrap,
use_ellipses,
allow_html,
@@ -177,6 +178,9 @@ public:
void setReadOnly(bool read_only) { mReadOnly = read_only; }
bool getReadOnly() { return mReadOnly; }
+ void setPlainText(bool value) { mPlainText = value;}
+ bool getPlainText() const { return mPlainText; }
+
// cursor manipulation
bool setCursor(S32 row, S32 column);
bool setCursorPos(S32 cursor_pos, bool keep_cursor_offset = false);
@@ -274,7 +278,7 @@ protected:
S32 insertStringNoUndo(S32 pos, const LLWString &wstr, segment_vec_t* segments = NULL); // returns num of chars actually inserted
S32 removeStringNoUndo(S32 pos, S32 length);
S32 overwriteCharNoUndo(S32 pos, llwchar wc);
- void appendAndHighlightText(const std::string &new_text, bool prepend_newline, S32 highlight_part, const LLStyle::Params& stylep);
+ void appendAndHighlightText(const std::string &new_text, S32 highlight_part, const LLStyle::Params& stylep);
// manage segments
@@ -366,6 +370,7 @@ protected:
bool mReadOnly;
bool mBGVisible; // render background?
bool mClipPartial; // false if we show lines that are partially inside bounding rect
+ bool mPlainText; // didn't use Image or Icon segments
S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes
// support widgets
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index fe6bd8eef0..2244f05104 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3589,17 +3589,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>FullScreen</key>
- <map>
- <key>Comment</key>
- <string>Run SL in fullscreen mode</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>FullScreenAspectRatio</key>
<map>
<key>Comment</key>
@@ -3609,7 +3598,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>1.33329999447</real>
+ <real>3</real>
</map>
<key>FullScreenAutoDetectAspectRatio</key>
<map>
@@ -3620,29 +3609,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>1</integer>
- </map>
- <key>FullScreenHeight</key>
- <map>
- <key>Comment</key>
- <string>Fullscreen resolution in height</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>768</integer>
- </map>
- <key>FullScreenWidth</key>
- <map>
- <key>Comment</key>
- <string>Fullscreen resolution in width</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>1024</integer>
+ <integer>0</integer>
</map>
<key>GesturesMarketplaceURL</key>
<map>
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 557b3b0a77..3923749e64 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -166,6 +166,7 @@ struct LLAgentDumper
LLAgentWearables::LLAgentWearables() :
mWearablesLoaded(FALSE)
+, mCOFChangeInProgress(false)
{
}
@@ -920,13 +921,18 @@ BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id) const
// static
// ! BACKWARDS COMPATIBILITY ! When we stop supporting viewer1.23, we can assume
// that viewers have a Current Outfit Folder and won't need this message, and thus
-// we can remove/ignore this whole function.
+// we can remove/ignore this whole function. EXCEPT gAgentWearables.notifyLoadingStarted
void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data)
{
// We should only receive this message a single time. Ignore subsequent AgentWearablesUpdates
// that may result from AgentWearablesRequest having been sent more than once.
if (mInitialWearablesUpdateReceived)
return;
+
+ // notify subscribers that wearables started loading. See EXT-7777
+ // *TODO: find more proper place to not be called from deprecated method.
+ gAgentWearables.notifyLoadingStarted();
+
mInitialWearablesUpdateReceived = true;
LLUUID agent_id;
@@ -1208,7 +1214,7 @@ void LLAgentWearables::createStandardWearablesAllDone()
mWearablesLoaded = TRUE;
checkWearablesLoaded();
- mLoadedSignal();
+ notifyLoadingFinished();
updateServer();
@@ -1460,7 +1466,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
// Start rendering & update the server
mWearablesLoaded = TRUE;
checkWearablesLoaded();
- mLoadedSignal();
+ notifyLoadingFinished();
queryWearableCache();
updateServer();
@@ -1945,7 +1951,7 @@ void LLAgentWearables::updateWearablesLoaded()
mWearablesLoaded = (itemUpdatePendingCount()==0);
if (mWearablesLoaded)
{
- mLoadedSignal();
+ notifyLoadingFinished();
}
}
@@ -2111,7 +2117,13 @@ boost::signals2::connection LLAgentWearables::addLoadedCallback(loaded_callback_
void LLAgentWearables::notifyLoadingStarted()
{
+ mCOFChangeInProgress = true;
mLoadingStartedSignal();
}
+void LLAgentWearables::notifyLoadingFinished()
+{
+ mCOFChangeInProgress = false;
+ mLoadedSignal();
+}
// EOF
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 3295544e04..05913825dd 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -75,6 +75,7 @@ public:
BOOL isWearableCopyable(LLWearableType::EType type, U32 index /*= 0*/) const;
BOOL areWearablesLoaded() const;
+ bool isCOFChangeInProgress() const { return mCOFChangeInProgress; }
void updateWearablesLoaded();
void checkWearablesLoaded() const;
bool canMoveWearable(const LLUUID& item_id, bool closer_to_body);
@@ -233,6 +234,7 @@ public:
boost::signals2::connection addLoadedCallback(loaded_callback_t cb);
void notifyLoadingStarted();
+ void notifyLoadingFinished();
private:
loading_started_signal_t mLoadingStartedSignal; // should be called before wearables are changed
@@ -249,6 +251,11 @@ private:
static BOOL mInitialWearablesUpdateReceived;
BOOL mWearablesLoaded;
std::set<LLUUID> mItemsAwaitingWearableUpdate;
+
+ /**
+ * True if agent's outfit is being changed now.
+ */
+ BOOL mCOFChangeInProgress;
//--------------------------------------------------------------------------------
// Support classes
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 52a5587a16..4e96372da9 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -923,6 +923,14 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up
{
if (item_id_to_wear.isNull()) return false;
+ // *TODO: issue with multi-wearable should be fixed:
+ // in this case this method will be called N times - loading started for each item
+ // and than N times will be called - loading completed for each item.
+ // That means subscribers will be notified that loading is done after first item in a batch is worn.
+ // (loading indicator disappears for example before all selected items are worn)
+ // Have not fix this issue for 2.1 because of stability reason. EXT-7777.
+ gAgentWearables.notifyLoadingStarted();
+
LLViewerInventoryItem* item_to_wear = gInventory.getItem(item_id_to_wear);
if (!item_to_wear) return false;
@@ -1060,7 +1068,7 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id)
{
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
- LLFindWorn collector;
+ LLFindWearablesEx collector(/*is_worn=*/ true, /*include_body_parts=*/ false);
gInventory.collectDescendentsIf(cat_id, cats, items, FALSE, collector);
@@ -1216,6 +1224,34 @@ bool LLAppearanceMgr::getCanRemoveOutfit(const LLUUID& outfit_cat_id)
return true;
}
+// static
+bool LLAppearanceMgr::getCanRemoveFromCOF(const LLUUID& outfit_cat_id)
+{
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ LLFindWearablesEx is_worn(/*is_worn=*/ true, /*include_body_parts=*/ false);
+ gInventory.collectDescendentsIf(outfit_cat_id,
+ cats,
+ items,
+ LLInventoryModel::EXCLUDE_TRASH,
+ is_worn);
+ return items.size() > 0;
+}
+
+// static
+bool LLAppearanceMgr::getCanAddToCOF(const LLUUID& outfit_cat_id)
+{
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
+ gInventory.collectDescendentsIf(outfit_cat_id,
+ cats,
+ items,
+ LLInventoryModel::EXCLUDE_TRASH,
+ not_worn);
+ return items.size() > 0;
+}
+
void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category)
{
LLInventoryModel::cat_array_t cats;
@@ -1330,9 +1366,12 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
// - Body parts: always include COF contents as a fallback in case any
// required parts are missing.
+ // Preserve body parts from COF if appending.
LLInventoryModel::item_array_t body_items;
getDescendentsOfAssetType(cof, body_items, LLAssetType::AT_BODYPART, false);
getDescendentsOfAssetType(category, body_items, LLAssetType::AT_BODYPART, false);
+ if (append)
+ reverse(body_items.begin(), body_items.end());
// Reduce body items to max of one per type.
removeDuplicateItems(body_items);
filterWearableItems(body_items, 1);
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index e42f9f7d6f..8ded32a53d 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -75,6 +75,12 @@ public:
// Determine whether a given outfit can be removed.
bool getCanRemoveOutfit(const LLUUID& outfit_cat_id);
+ // Determine whether we're wearing any of the outfit contents (excluding body parts).
+ static bool getCanRemoveFromCOF(const LLUUID& outfit_cat_id);
+
+ // Determine whether we can add anything (but body parts) from the outfit contents to COF.
+ static bool getCanAddToCOF(const LLUUID& outfit_cat_id);
+
// Copy all items in a category.
void shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id,
LLPointer<LLInventoryCallback> cb);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 7be69ba04d..1ed63555b0 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2366,16 +2366,9 @@ bool LLAppViewer::initWindow()
LLNotificationsUI::LLNotificationManager::getInstance();
- if (gSavedSettings.getBOOL("FullScreen"))
- {
- // request to go full screen... which will be delayed until login
- gViewerWindow->toggleFullscreen(FALSE);
- }
-
if (gSavedSettings.getBOOL("WindowMaximized"))
{
gViewerWindow->mWindow->maximize();
- gViewerWindow->getWindow()->setNativeAspectRatio(gSavedSettings.getF32("FullScreenAspectRatio"));
}
if (!gNoRender)
@@ -2449,11 +2442,10 @@ void LLAppViewer::cleanupSavedSettings()
}
}
- // save window position if not fullscreen
+ // save window position if not maximized
// as we don't track it in callbacks
- BOOL fullscreen = gViewerWindow->mWindow->getFullscreen();
BOOL maximized = gViewerWindow->mWindow->getMaximized();
- if (!fullscreen && !maximized)
+ if (!maximized)
{
LLCoordScreen window_pos;
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index 67d5d21b2a..cd279fa10a 100644
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -149,7 +149,6 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask )
{
BOOL handled = FALSE;
- // ALT-RETURN is reserved for windowed/fullscreen toggle
if( KEY_RETURN == key )
{
if (mask == MASK_CONTROL)
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 18c69b5130..ab97dbb695 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -557,6 +557,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
{
bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean();
+ if(mEditor)
+ {
+ mEditor->setPlainText(use_plain_text_chat_history);
+ }
+
if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID() && !chat.mFromName.empty())
{
mUnreadChatSources.insert(chat.mFromName);
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 46d2e0a5db..aa8cc01f7d 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -208,7 +208,7 @@ protected:
}
else if ("edit" == param)
{
- return gAgentWearables.isWearableModifiable(selected_id);
+ return mUUIDs.size() == 1 && gAgentWearables.isWearableModifiable(selected_id);
}
return true;
}
@@ -264,7 +264,7 @@ protected:
if ("edit" == param)
{
- return gAgentWearables.isWearableModifiable(selected_id);
+ return mUUIDs.size() == 1 && gAgentWearables.isWearableModifiable(selected_id);
}
return true;
diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp
index d079da3b36..b83e4fe830 100644
--- a/indra/newview/llcolorswatch.cpp
+++ b/indra/newview/llcolorswatch.cpp
@@ -338,7 +338,11 @@ void LLColorSwatchCtrl::showPicker(BOOL take_focus)
if (!pickerp)
{
pickerp = new LLFloaterColorPicker(this, mCanApplyImmediately);
- //gFloaterView->getParentFloater(this)->addDependentFloater(pickerp);
+ LLFloater* parent = gFloaterView->getParentFloater(this);
+ if (parent)
+ {
+ parent->addDependentFloater(pickerp);
+ }
mPickerHandle = pickerp->getHandle();
}
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index e0e5b32299..dbbcb6e7c4 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -862,11 +862,14 @@ void LLFace::updateRebuildFlags()
}
}
+static LLFastTimer::DeclareTimer FTM_FACE_GET_GEOM("Face Geom");
+
BOOL LLFace::getGeometryVolume(const LLVolume& volume,
const S32 &f,
const LLMatrix4& mat_vert, const LLMatrix3& mat_normal,
const U16 &index_offset)
{
+ LLFastTimer t(FTM_FACE_GET_GEOM);
const LLVolumeFace &vf = volume.getVolumeFace(f);
S32 num_vertices = (S32)vf.mVertices.size();
S32 num_indices = LLPipeline::sUseTriStrips ? (S32)vf.mTriStrip.size() : (S32) vf.mIndices.size();
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp
index b2564eb2b6..480e4ce3a4 100644
--- a/indra/newview/llfloaterhardwaresettings.cpp
+++ b/indra/newview/llfloaterhardwaresettings.cpp
@@ -143,10 +143,9 @@ void LLFloaterHardwareSettings::apply()
LLWindow* window = gViewerWindow->getWindow();
LLCoordScreen size;
window->getSize(&size);
- gViewerWindow->changeDisplaySettings(window->getFullscreen(),
- size,
- gSavedSettings.getBOOL("DisableVerticalSync"),
- logged_in);
+ gViewerWindow->changeDisplaySettings(size,
+ gSavedSettings.getBOOL("DisableVerticalSync"),
+ logged_in);
}
else if (old_anisotropic != LLImageGL::sGlobalUseAnisotropic)
{
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 2299cd719c..f450b199c8 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -465,8 +465,6 @@ void LLFloaterPreference::apply()
gAgent.sendAgentUpdateUserInfo(new_im_via_email,mDirectoryVisibility);
}
}
-
- applyResolution();
}
void LLFloaterPreference::cancel()
@@ -1213,31 +1211,6 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b
}
}
-void LLFloaterPreference::applyResolution()
-{
- gGL.flush();
-
- // Screen resolution
- S32 num_resolutions;
- LLWindow::LLWindowResolution* supported_resolutions =
- gViewerWindow->getWindow()->getSupportedResolutions(num_resolutions);
- S32 resIndex = getChild<LLComboBox>("fullscreen combo")->getCurrentIndex();
- if (resIndex == -1)
- {
- // use highest resolution if nothing selected
- resIndex = num_resolutions - 1;
- }
- gSavedSettings.setS32("FullScreenWidth", supported_resolutions[resIndex].mWidth);
- gSavedSettings.setS32("FullScreenHeight", supported_resolutions[resIndex].mHeight);
-
- gViewerWindow->requestResolutionUpdate(gSavedSettings.getBOOL("FullScreen"));
-
- send_agent_update(TRUE);
-
- // Update enable/disable
- refresh();
-}
-
void LLFloaterPreference::onChangeMaturity()
{
U8 sim_access = gSavedSettings.getU32("PreferredMaturity");
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index c8d66549b7..afaeddaaeb 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2489,7 +2489,7 @@ void LLFolderBridge::folderOptionsMenu()
mItems.push_back(std::string("Wear As Ensemble"));
}
mItems.push_back(std::string("Remove From Outfit"));
- if (!areAnyContentsWorn(model))
+ if (!LLAppearanceMgr::getCanRemoveFromCOF(mUUID))
{
disabled_items.push_back(std::string("Remove From Outfit"));
}
@@ -2514,19 +2514,6 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv
return ((item_array.count() > 0) ? TRUE : FALSE );
}
-BOOL LLFolderBridge::areAnyContentsWorn(LLInventoryModel* model) const
-{
- LLInventoryModel::cat_array_t cat_array;
- LLInventoryModel::item_array_t item_array;
- LLFindWorn is_worn;
- model->collectDescendentsIf(mUUID,
- cat_array,
- item_array,
- LLInventoryModel::EXCLUDE_TRASH,
- is_worn);
- return (item_array.size() > 0);
-}
-
// Flags unused
void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 757808eb93..64d0f8d254 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -295,7 +295,6 @@ protected:
static void createNewEyes(void* user_data);
BOOL checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck);
- BOOL areAnyContentsWorn(LLInventoryModel* model) const;
void modifyOutfit(BOOL append);
void determineFolderType();
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index c784ca3a9c..37088064c6 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -578,6 +578,31 @@ bool LLFindWearables::operator()(LLInventoryCategory* cat,
return FALSE;
}
+LLFindWearablesEx::LLFindWearablesEx(bool is_worn, bool include_body_parts)
+: mIsWorn(is_worn)
+, mIncludeBodyParts(include_body_parts)
+{}
+
+bool LLFindWearablesEx::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+{
+ LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item);
+ if (!vitem) return false;
+
+ // Skip non-wearables.
+ if (!vitem->isWearableType() && vitem->getType() != LLAssetType::AT_OBJECT)
+ {
+ return false;
+ }
+
+ // Skip body parts if requested.
+ if (!mIncludeBodyParts && vitem->getType() == LLAssetType::AT_BODYPART)
+ {
+ return false;
+ }
+
+ return (bool) get_is_item_worn(item->getUUID()) == mIsWorn;
+}
+
bool LLFindWearablesOfType::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
{
if (!item) return false;
@@ -598,11 +623,6 @@ void LLFindWearablesOfType::setType(LLWearableType::EType type)
mWearableType = type;
}
-bool LLFindWorn::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
-{
- return item && get_is_item_worn(item->getUUID());
-}
-
bool LLFindNonRemovableObjects::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
{
if (item)
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index aa4ac98241..6619a50d28 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -338,6 +338,21 @@ public:
LLInventoryItem* item);
};
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLFindWearablesEx
+//
+// Collects wearables based on given criteria.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+class LLFindWearablesEx : public LLInventoryCollectFunctor
+{
+public:
+ LLFindWearablesEx(bool is_worn, bool include_body_parts = true);
+ virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item);
+private:
+ bool mIncludeBodyParts;
+ bool mIsWorn;
+};
+
//Inventory collect functor collecting wearables of a specific wearable type
class LLFindWearablesOfType : public LLInventoryCollectFunctor
{
@@ -364,15 +379,6 @@ public:
}
};
-// Find worn items.
-class LLFindWorn : public LLInventoryCollectFunctor
-{
-public:
- LLFindWorn() {}
- virtual ~LLFindWorn() {}
- virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item);
-};
-
// Collect non-removable folders and items.
class LLFindNonRemovableObjects : public LLInventoryCollectFunctor
{
diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp
index 384b24210c..14de5442d6 100644
--- a/indra/newview/llinventoryitemslist.cpp
+++ b/indra/newview/llinventoryitemslist.cpp
@@ -80,10 +80,11 @@ void LLPanelInventoryListItemBase::draw()
}
// virtual
-void LLPanelInventoryListItemBase::updateItem(const std::string& name)
+void LLPanelInventoryListItemBase::updateItem(const std::string& name,
+ const LLStyle::Params& input_params)
{
setIconImage(mIconImage);
- setTitle(name, mHighlightedText);
+ setTitle(name, mHighlightedText, input_params);
}
void LLPanelInventoryListItemBase::addWidgetToLeftSide(const std::string& name, bool show_widget/* = true*/)
@@ -286,25 +287,28 @@ void LLPanelInventoryListItemBase::setIconImage(const LLUIImagePtr& image)
}
}
-void LLPanelInventoryListItemBase::setTitle(const std::string& title, const std::string& highlit_text)
+void LLPanelInventoryListItemBase::setTitle(const std::string& title,
+ const std::string& highlit_text,
+ const LLStyle::Params& input_params)
{
- setToolTip(title);
+ mTitleCtrl->setToolTip(title);
LLTextUtil::textboxSetHighlightedVal(
mTitleCtrl,
- LLStyle::Params(),
+ input_params,
title,
highlit_text);
}
BOOL LLPanelInventoryListItemBase::handleToolTip( S32 x, S32 y, MASK mask)
{
- LLTextBox* item_name = getChild<LLTextBox>("item_name");
- if (item_name->getRect().getWidth() < item_name->getTextPixelWidth())
+ LLRect text_box_rect = mTitleCtrl->getRect();
+ if (text_box_rect.pointInRect(x, y) &&
+ mTitleCtrl->getTextPixelWidth() <= text_box_rect.getWidth())
{
- return LLPanel::handleToolTip(x,y,mask);
+ return FALSE;
}
- return FALSE;
+ return LLPanel::handleToolTip(x, y, mask);
}
void LLPanelInventoryListItemBase::reshapeLeftWidgets()
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index 489a82829c..5dc0bfe3de 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -152,7 +152,8 @@ protected:
/**
* Called after inventory item was updated, update panel widgets to reflect inventory changes.
*/
- virtual void updateItem(const std::string& name);
+ virtual void updateItem(const std::string& name,
+ const LLStyle::Params& input_params = LLStyle::Params());
/** setter for mIconCtrl */
void setIconCtrl(LLIconCtrl* icon) { mIconCtrl = icon; }
@@ -177,7 +178,9 @@ protected:
void setIconImage(const LLUIImagePtr& image);
/** Set item title - inventory item name usually */
- virtual void setTitle(const std::string& title, const std::string& highlit_text);
+ virtual void setTitle(const std::string& title,
+ const std::string& highlit_text,
+ const LLStyle::Params& input_params = LLStyle::Params());
/**
* Show tool tip if item name text size > panel size
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 46f531fdd9..a300e15edd 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -433,7 +433,6 @@ BOOL LLNearbyChatBar::handleKeyHere( KEY key, MASK mask )
{
BOOL handled = FALSE;
- // ALT-RETURN is reserved for windowed/fullscreen toggle
if( KEY_RETURN == key && mask == MASK_CONTROL)
{
// shout
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index de074d6aaf..c5043e1c3d 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -103,6 +103,14 @@ protected:
{
return get_is_category_renameable(&gInventory, outfit_cat_id);
}
+ else if ("wear_add" == param)
+ {
+ return LLAppearanceMgr::getCanAddToCOF(outfit_cat_id);
+ }
+ else if ("take_off" == param)
+ {
+ return LLAppearanceMgr::getCanRemoveFromCOF(outfit_cat_id);
+ }
return true;
}
@@ -120,14 +128,6 @@ protected:
{
return !is_worn;
}
- else if ("wear_add" == param)
- {
- return !is_worn;
- }
- else if ("take_off" == param)
- {
- return is_worn;
- }
else if ("delete" == param)
{
return LLAppearanceMgr::instance().getCanRemoveOutfit(outfit_cat_id);
@@ -161,6 +161,7 @@ LLOutfitsList::LLOutfitsList()
, mAccordion(NULL)
, mListCommands(NULL)
, mIsInitialized(false)
+ , mItemSelected(false)
{
mCategoriesObserver = new LLInventoryCategoriesObserver();
@@ -208,8 +209,13 @@ void LLOutfitsList::onOpen(const LLSD& /*info*/)
mCategoriesObserver->addCategory(outfits,
boost::bind(&LLOutfitsList::refreshList, this, outfits));
- // Start observing changes in Current Outfit to update items worn state.
- LLOutfitObserver::instance().addCOFChangedCallback(boost::bind(&LLOutfitsList::onCOFChanged, this));
+ const LLUUID cof = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
+
+ // Start observing changes in Current Outfit category.
+ mCategoriesObserver->addCategory(cof, boost::bind(&LLOutfitsList::onCOFChanged, this));
+
+ LLOutfitObserver::instance().addBOFChangedCallback(boost::bind(&LLOutfitsList::highlightBaseOutfit, this));
+ LLOutfitObserver::instance().addBOFReplacedCallback(boost::bind(&LLOutfitsList::highlightBaseOutfit, this));
// Fetch "My Outfits" contents and refresh the list to display
// initially fetched items. If not all items are fetched now
@@ -217,6 +223,7 @@ void LLOutfitsList::onOpen(const LLSD& /*info*/)
// arrive.
category->fetch();
refreshList(outfits);
+ highlightBaseOutfit();
mIsInitialized = true;
}
@@ -325,19 +332,13 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
// 1. Remove outfit category from observer to stop monitoring its changes.
mCategoriesObserver->removeCategory(outfit_id);
- // 2. Remove selected lists map entry.
- mSelectedListsMap.erase(outfit_id);
-
- // 3. Reset currently selected outfit id if it is being removed.
- if (outfit_id == mSelectedOutfitUUID)
- {
- setSelectedOutfitUUID(LLUUID());
- }
+ // 2. Remove the outfit from selection.
+ deselectOutfit(outfit_id);
- // 4. Remove category UUID to accordion tab mapping.
+ // 3. Remove category UUID to accordion tab mapping.
mOutfitsMap.erase(outfits_iter);
- // 5. Remove outfit tab from accordion.
+ // 4. Remove outfit tab from accordion.
mAccordion->removeCollapsibleCtrl(tab);
}
}
@@ -355,6 +356,25 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
mAccordion->sort();
}
+void LLOutfitsList::highlightBaseOutfit()
+{
+ // id of base outfit
+ LLUUID base_id = LLAppearanceMgr::getInstance()->getBaseOutfitUUID();
+ if (base_id != mHighlightedOutfitUUID)
+ {
+ if (mOutfitsMap[mHighlightedOutfitUUID])
+ {
+ mOutfitsMap[mHighlightedOutfitUUID]->setTitleFontStyle("NORMAL");
+ }
+
+ mHighlightedOutfitUUID = base_id;
+ }
+ if (mOutfitsMap[base_id])
+ {
+ mOutfitsMap[base_id]->setTitleFontStyle("BOLD");
+ }
+}
+
void LLOutfitsList::onSelectionChange(LLUICtrl* ctrl)
{
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(ctrl);
@@ -399,6 +419,11 @@ boost::signals2::connection LLOutfitsList::addSelectionChangeCallback(selection_
return mSelectionChangeSignal.connect(cb);
}
+bool LLOutfitsList::hasItemSelected()
+{
+ return mItemSelected;
+}
+
//////////////////////////////////////////////////////////////////////////
// Private methods
//////////////////////////////////////////////////////////////////////////
@@ -484,6 +509,8 @@ void LLOutfitsList::changeOutfitSelection(LLWearableItemsList* list, const LLUUI
mSelectedListsMap.clear();
}
+ mItemSelected = list && (list->getSelectedItem() != NULL);
+
mSelectedListsMap.insert(wearables_lists_map_value_t(category_id, list));
setSelectedOutfitUUID(category_id);
}
@@ -493,6 +520,27 @@ void LLOutfitsList::setSelectedOutfitUUID(const LLUUID& category_id)
mSelectionChangeSignal(mSelectedOutfitUUID = category_id);
}
+void LLOutfitsList::deselectOutfit(const LLUUID& category_id)
+{
+ // Remove selected lists map entry.
+ mSelectedListsMap.erase(category_id);
+
+ // Reset selection if the outfit is selected.
+ if (category_id == mSelectedOutfitUUID)
+ {
+ setSelectedOutfitUUID(LLUUID::null);
+ }
+}
+
+void LLOutfitsList::restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id)
+{
+ // Try restoring outfit selection after filtering.
+ if (mAccordion->getSelectedTab() == tab)
+ {
+ setSelectedOutfitUUID(category_id);
+ }
+}
+
void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl)
{
if (!ctrl || mFilterSubString.empty())
@@ -509,26 +557,7 @@ void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl)
LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
if (list != ctrl) continue;
- std::string title = tab->getTitle();
- LLStringUtil::toUpper(title);
-
- std::string cur_filter = mFilterSubString;
- LLStringUtil::toUpper(cur_filter);
-
- if (std::string::npos == title.find(cur_filter))
- {
- // hide tab if its title doesn't pass filter
- // and it has no visible items
- tab->setVisible(list->size() != 0);
-
- // remove title highlighting because it might
- // have been previously highlighted by less restrictive filter
- tab->setTitle(tab->getTitle());
- }
- else
- {
- tab->setTitle(tab->getTitle(), cur_filter);
- }
+ applyFilterToTab(iter->first, tab, mFilterSubString);
}
}
@@ -567,26 +596,7 @@ void LLOutfitsList::applyFilter(const std::string& new_filter_substring)
if (!new_filter_substring.empty())
{
- std::string title = tab->getTitle();
- LLStringUtil::toUpper(title);
-
- std::string cur_filter = new_filter_substring;
- LLStringUtil::toUpper(cur_filter);
-
- if (std::string::npos == title.find(cur_filter))
- {
- // hide tab if its title doesn't pass filter
- // and it has no visible items
- tab->setVisible(list->size() != 0);
-
- // remove title highlighting because it might
- // have been previously highlighted by less restrictive filter
- tab->setTitle(tab->getTitle());
- }
- else
- {
- tab->setTitle(tab->getTitle(), cur_filter);
- }
+ applyFilterToTab(iter->first, tab, new_filter_substring);
if (tab->getVisible())
{
@@ -607,10 +617,50 @@ void LLOutfitsList::applyFilter(const std::string& new_filter_substring)
//restore accordion state after all those accodrion tab manipulations
tab->notifyChildren(LLSD().with("action","restore_state"));
+
+ // Try restoring the tab selection.
+ restoreOutfitSelection(tab, iter->first);
}
}
}
+void LLOutfitsList::applyFilterToTab(
+ const LLUUID& category_id,
+ LLAccordionCtrlTab* tab,
+ const std::string& filter_substring)
+{
+ if (!tab) return;
+ LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(tab->getAccordionView());
+ if (!list) return;
+
+ std::string title = tab->getTitle();
+ LLStringUtil::toUpper(title);
+
+ std::string cur_filter = filter_substring;
+ LLStringUtil::toUpper(cur_filter);
+
+ tab->setTitle(tab->getTitle(), cur_filter);
+
+ if (std::string::npos == title.find(cur_filter))
+ {
+ // hide tab if its title doesn't pass filter
+ // and it has no visible items
+ tab->setVisible(list->size() > 0);
+
+ // remove title highlighting because it might
+ // have been previously highlighted by less restrictive filter
+ tab->setTitle(tab->getTitle());
+
+ // Remove the tab from selection.
+ deselectOutfit(category_id);
+ }
+ else
+ {
+ // Try restoring the tab selection.
+ restoreOutfitSelection(tab, category_id);
+ }
+}
+
void LLOutfitsList::onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id)
{
LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl);
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 5605044f41..df65f7187b 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -83,6 +83,9 @@ public:
void refreshList(const LLUUID& category_id);
+ // highlits currently worn outfit tab text and unhighlights previously worn
+ void highlightBaseOutfit();
+
void performAction(std::string action);
void setFilterSubString(const std::string& string);
@@ -91,6 +94,11 @@ public:
boost::signals2::connection addSelectionChangeCallback(selection_change_callback_t cb);
+ /**
+ * Returns true if there is a selection inside currently selected outfit
+ */
+ bool hasItemSelected();
+
private:
/**
* Reads xml with accordion tab and Flat list from xml file.
@@ -120,6 +128,18 @@ private:
void setSelectedOutfitUUID(const LLUUID& category_id);
/**
+ * Removes the outfit from selection.
+ */
+ void deselectOutfit(const LLUUID& category_id);
+
+ /**
+ * Try restoring selection for a temporary hidden tab.
+ *
+ * A tab may be hidden if it doesn't match current filter.
+ */
+ void restoreOutfitSelection(LLAccordionCtrlTab* tab, const LLUUID& category_id);
+
+ /**
* Called upon list refresh event to update tab visibility depending on
* the results of applying filter to the title and list items of the tab.
*/
@@ -130,6 +150,13 @@ private:
*/
void applyFilter(const std::string& new_filter_substring);
+ /**
+ * Applies filter to the given tab
+ *
+ * @see applyFilter()
+ */
+ void applyFilterToTab(const LLUUID& category_id, LLAccordionCtrlTab* tab, const std::string& filter_substring);
+
void onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id);
void onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y);
void onCOFChanged();
@@ -148,6 +175,8 @@ private:
wearables_lists_map_t mSelectedListsMap;
LLUUID mSelectedOutfitUUID;
+ // id of currently highlited outfit
+ LLUUID mHighlightedOutfitUUID;
selection_change_signal_t mSelectionChangeSignal;
std::string mFilterSubString;
@@ -159,6 +188,10 @@ private:
LLListContextMenu* mOutfitMenu;
bool mIsInitialized;
+ /**
+ * True if there is a selection inside currently selected outfit
+ */
+ bool mItemSelected;
};
#endif //LL_LLOUTFITSLIST_H
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index f683cbc8d0..ca1361c84b 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -114,6 +114,7 @@ public:
virtual time_t getCreationDate() const;
virtual LLUIImagePtr getIcon() const;
virtual void openItem();
+ virtual BOOL canOpenItem() const { return FALSE; }
virtual void closeItem() {}
virtual void previewItem();
virtual void selectItem() {}
@@ -667,7 +668,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
}
}
- else
+ else if (canOpenItem())
{
items.push_back(std::string("Task Open"));
if (!isItemCopyable())
@@ -713,6 +714,8 @@ public:
virtual BOOL dragOrDrop(MASK mask, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data);
+ virtual BOOL canOpenItem() const { return TRUE; }
+ virtual void openItem();
};
LLTaskCategoryBridge::LLTaskCategoryBridge(
@@ -747,7 +750,8 @@ void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
std::vector<std::string> items;
std::vector<std::string> disabled_items;
- items.push_back(std::string("Task Open"));
+ items.push_back(std::string("--no options--"));
+ disabled_items.push_back(std::string("--no options--"));
hide_context_entries(menu, items, disabled_items);
}
@@ -758,6 +762,10 @@ BOOL LLTaskCategoryBridge::hasChildren() const
return FALSE;
}
+void LLTaskCategoryBridge::openItem()
+{
+}
+
BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
{
//llinfos << "LLTaskInvFVBridge::startDrag()" << llendl;
@@ -864,6 +872,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
};
@@ -890,6 +899,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual void performAction(LLInventoryModel* model, std::string action);
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
@@ -966,9 +976,8 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
}
}
- else
+ else if (canOpenItem())
{
- items.push_back(std::string("Task Open"));
if (!isItemCopyable())
{
disabled_items.push_back(std::string("Task Open"));
@@ -1053,6 +1062,7 @@ public:
const std::string& name) :
LLTaskScriptBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
//virtual void buildContextMenu(LLMenuGL& menu);
@@ -1114,6 +1124,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};
@@ -1153,6 +1164,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};
@@ -1186,6 +1198,7 @@ public:
const std::string& name) :
LLTaskInvFVBridge(panel, uuid, name) {}
+ virtual BOOL canOpenItem() const { return TRUE; }
virtual void openItem();
virtual BOOL removeItem();
};
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 7e1bff0961..714d9cd4c5 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -191,6 +191,10 @@ private:
{
return LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit_id);
}
+ else if ("take_off" == param)
+ {
+ return LLAppearanceMgr::getCanRemoveFromCOF(selected_outfit_id);
+ }
return true;
}
@@ -209,10 +213,6 @@ private:
{
return !is_worn;
}
- else if ("take_off" == param)
- {
- return is_worn;
- }
return true;
}
@@ -224,7 +224,6 @@ private:
LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
mMyOutfitsPanel(NULL),
mCurrentOutfitPanel(NULL),
- mParent(NULL),
mGearMenu(NULL),
mInitialized(false)
{
@@ -314,11 +313,6 @@ void LLPanelOutfitsInventory::updateVerbs()
}
}
-void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent)
-{
- mParent = parent;
-}
-
// virtual
void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)
{
@@ -548,7 +542,7 @@ void LLPanelOutfitsInventory::initListCommandsHandlers()
void LLPanelOutfitsInventory::updateListCommands()
{
bool trash_enabled = isActionEnabled("delete");
- bool wear_enabled = isActionEnabled("wear");
+ bool wear_enabled = !gAgentWearables.isCOFChangeInProgress() && isActionEnabled("wear");
bool wear_visible = !isCOFPanelActive();
bool make_outfit_enabled = isActionEnabled("save_outfit");
@@ -667,7 +661,8 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata)
else // "My Outfits" tab active
{
const LLUUID& selected_outfit = mMyOutfitsPanel->getSelectedOutfitUUID();
- can_delete = LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit);
+ // first condition prevents trash btn from enabling when items are selected inside outfit (EXT-7847)
+ can_delete = !mMyOutfitsPanel->hasItemSelected() && LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit);
}
return can_delete;
@@ -827,12 +822,6 @@ BOOL LLPanelOutfitsInventory::isCOFPanelActive() const
void LLPanelOutfitsInventory::setWearablesLoading(bool val)
{
mListCommands->childSetEnabled("wear_btn", !val);
-
- llassert(mParent);
- if (mParent)
- {
- mParent->setWearablesLoading(val);
- }
}
void LLPanelOutfitsInventory::onWearablesLoaded()
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 863dc9dd7c..eabfda7f8c 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -72,7 +72,6 @@ public:
// If a compatible listener type is selected, then return a pointer to that.
// Otherwise, return NULL.
LLFolderViewEventListener* getCorrectListenerForAction();
- void setParent(LLSidepanelAppearance *parent);
LLFolderView* getRootFolder();
static LLSidepanelAppearance* getAppearanceSP();
@@ -84,7 +83,6 @@ protected:
bool getIsCorrectType(const LLFolderViewEventListener *listenerp) const;
private:
- LLSidepanelAppearance* mParent;
LLSaveFolderState* mSavedFolderState;
LLTabContainer* mAppearanceTabs;
std::string mFilterSubString;
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 2e061b235d..ff315d3c53 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -31,55 +31,31 @@
*/
#include "llviewerprecompiledheaders.h"
-
#include "llpreviewgesture.h"
-#include <algorithm>
-
-// libraries
-#include "lldatapacker.h"
-#include "lldarray.h"
-#include "llstring.h"
-#include "lldir.h"
+#include "llagent.h"
+#include "llanimstatelabels.h"
+#include "llanimationstates.h"
+#include "llappviewer.h" // gVFS
+#include "llassetuploadresponders.h"
+#include "llcheckboxctrl.h"
+#include "llcombobox.h"
+#include "lldelayedgestureerror.h"
#include "llfloaterreg.h"
+#include "llgesturemgr.h"
#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llmultigesture.h"
#include "llnotificationsutil.h"
-#include "llvfile.h"
-
-// newview
-#include "llagent.h" // todo: remove
-#include "llanimationstates.h"
-#include "llassetuploadresponders.h"
-#include "llbutton.h"
-#include "llcheckboxctrl.h"
-#include "llcombobox.h"
-#include "lldelayedgestureerror.h"
-#include "llfloatergesture.h" // for some label constants
-#include "llgesturemgr.h"
-#include "llkeyboard.h"
-#include "lllineeditor.h"
#include "llradiogroup.h"
-#include "llscrolllistctrl.h"
-#include "llscrolllistitem.h"
-#include "llscrolllistcell.h"
-#include "lltextbox.h"
-#include "lluictrlfactory.h"
-#include "llviewerinventory.h"
-#include "llviewerobject.h"
+#include "llresmgr.h"
+#include "lltrans.h"
+#include "llvfile.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
#include "llviewerstats.h"
-#include "llviewerwindow.h" // busycount
-#include "llvoavatarself.h"
-#include "llappviewer.h" // gVFS
-#include "llanimstatelabels.h"
-#include "llresmgr.h"
-#include "lltrans.h"
-
std::string NONE_LABEL;
std::string SHIFT_LABEL;
@@ -832,7 +808,9 @@ void LLPreviewGesture::loadAsset()
const LLInventoryItem* item = getItem();
if (!item)
{
- mAssetStatus = PREVIEW_ASSET_ERROR;
+ // Don't set asset status here; we may not have set the item id yet
+ // (e.g. when this gets called initially)
+ //mAssetStatus = PREVIEW_ASSET_ERROR;
return;
}
diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h
index 5968e936ef..b141b14445 100644
--- a/indra/newview/llpreviewgesture.h
+++ b/indra/newview/llpreviewgesture.h
@@ -34,10 +34,9 @@
#define LL_LLPREVIEWGESTURE_H
#include "llassettype.h"
-#include "llmultigesture.h"
#include "llpreview.h"
+#include "llmultigesture.h"
-class LLMultiGesture;
class LLLineEditor;
class LLTextBox;
class LLCheckBoxCtrl;
@@ -45,7 +44,6 @@ class LLComboBox;
class LLScrollListCtrl;
class LLScrollListItem;
class LLButton;
-class LLGestureStep;
class LLRadioGroup;
class LLVFS;
@@ -140,7 +138,7 @@ protected:
static void onDonePreview(LLMultiGesture* gesture, void* data);
-protected:
+private:
// LLPreview contains mDescEditor
LLLineEditor* mTriggerEditor;
LLTextBox* mReplaceText;
@@ -173,4 +171,4 @@ protected:
BOOL mDirty;
};
-#endif
+#endif // LL_LLPREVIEWGESTURE_H
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index e2d4f5ad45..0d1be91125 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -86,6 +86,9 @@ LLSidepanelAppearance::LLSidepanelAppearance() :
outfit_observer.addBOFReplacedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, ""));
outfit_observer.addBOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, ""));
outfit_observer.addCOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, ""));
+
+ gAgentWearables.addLoadingStartedCallback(boost::bind(&LLSidepanelAppearance::setWearablesLoading, this, true));
+ gAgentWearables.addLoadedCallback(boost::bind(&LLSidepanelAppearance::setWearablesLoading, this, false));
}
LLSidepanelAppearance::~LLSidepanelAppearance()
@@ -114,7 +117,6 @@ BOOL LLSidepanelAppearance::postBuild()
}
mPanelOutfitsInventory = dynamic_cast<LLPanelOutfitsInventory *>(getChild<LLPanel>("panel_outfits_inventory"));
- mPanelOutfitsInventory->setParent(this);
mOutfitEdit = dynamic_cast<LLPanelOutfitEdit*>(getChild<LLPanel>("panel_outfit_edit"));
if (mOutfitEdit)
@@ -387,7 +389,9 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name)
mCurrentLookName->setText(outfit_name);
return;
}
- mCurrentLookName->setText(getString("No Outfit"));
+
+ std::string look_name = gAgentWearables.isCOFChangeInProgress() ? "" : getString("No Outfit");
+ mCurrentLookName->setText(look_name);
mOpenOutfitBtn->setEnabled(FALSE);
}
else
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 3ef190f766..d25e8444cf 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2639,12 +2639,6 @@ void reset_login()
//---------------------------------------------------------------------------
-
-bool LLStartUp::canGoFullscreen()
-{
- return gStartupState >= STATE_WORLD_INIT;
-}
-
// Initialize all plug-ins except the web browser (which was initialized
// early, before the login screen). JC
void LLStartUp::multimediaInit()
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index e1e108ca6a..b2868378bc 100644
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -81,9 +81,6 @@ extern LLPointer<LLViewerTexture> gStartTexture;
class LLStartUp
{
public:
- static bool canGoFullscreen();
- // returns true if we are far enough along in startup to allow
- // going full screen
// Always use this to set gStartupState so changes are logged
static void setStartupState( EStartupState state );
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index db1f4dc4cb..7ba256c870 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -247,35 +247,6 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
msg_box->setRect( rect );
LLToastPanel::addChild(msg_box);
- // Buttons
- S32 button_left = (LLToastPanel::getRect().getWidth() - btn_total_width) / 2;
-
- for( S32 i = 0; i < num_options; i++ )
- {
- LLRect button_rect;
-
- LLButton* btn = LLUICtrlFactory::getInstance()->createFromFile<LLButton>("alert_button.xml", this, LLPanel::child_registry_t::instance());
- if(btn)
- {
- btn->setName(options[i].first);
- btn->setRect(button_rect.setOriginAndSize( button_left, VPAD, button_width, BTN_HEIGHT ));
- btn->setLabel(options[i].second);
- btn->setFont(font);
-
- btn->setClickedCallback(boost::bind(&LLToastAlertPanel::onButtonPressed, this, _2, i));
-
- mButtonData[i].mButton = btn;
-
- LLToastPanel::addChild(btn);
-
- if( i == mDefaultOption )
- {
- btn->setFocus(TRUE);
- }
- }
- button_left += button_width + BTN_HPAD;
- }
-
// (Optional) Edit Box
if (!edit_text_name.empty())
{
@@ -307,9 +278,63 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal
mLineEditor->setDrawAsterixes(is_password);
setEditTextArgs(notification->getSubstitutions());
+
+ mLineEditor->setFollowsLeft();
+ mLineEditor->setFollowsRight();
+
+ // find form text input field
+ LLSD form_text;
+ for (LLSD::array_const_iterator it = form_sd.beginArray(); it != form_sd.endArray(); ++it)
+ {
+ std::string type = (*it)["type"].asString();
+ if (type == "text")
+ {
+ form_text = (*it);
+ }
+ }
+
+ // if form text input field has width attribute
+ if (form_text.has("width"))
+ {
+ // adjust floater width to fit line editor
+ S32 editor_width = form_text["width"];
+ LLRect editor_rect = mLineEditor->getRect();
+ U32 width_delta = editor_width - editor_rect.getWidth();
+ LLRect toast_rect = getRect();
+ reshape(toast_rect.getWidth() + width_delta, toast_rect.getHeight());
+ }
}
}
+ // Buttons
+ S32 button_left = (LLToastPanel::getRect().getWidth() - btn_total_width) / 2;
+
+ for( S32 i = 0; i < num_options; i++ )
+ {
+ LLRect button_rect;
+
+ LLButton* btn = LLUICtrlFactory::getInstance()->createFromFile<LLButton>("alert_button.xml", this, LLPanel::child_registry_t::instance());
+ if(btn)
+ {
+ btn->setName(options[i].first);
+ btn->setRect(button_rect.setOriginAndSize( button_left, VPAD, button_width, BTN_HEIGHT ));
+ btn->setLabel(options[i].second);
+ btn->setFont(font);
+
+ btn->setClickedCallback(boost::bind(&LLToastAlertPanel::onButtonPressed, this, _2, i));
+
+ mButtonData[i].mButton = btn;
+
+ LLToastPanel::addChild(btn);
+
+ if( i == mDefaultOption )
+ {
+ btn->setFocus(TRUE);
+ }
+ }
+ button_left += button_width + BTN_HPAD;
+ }
+
std::string ignore_label;
if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE)
diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp
index 404eab9249..d45915499a 100644
--- a/indra/newview/lltoolbar.cpp
+++ b/indra/newview/lltoolbar.cpp
@@ -212,23 +212,16 @@ void LLToolBar::layoutButtons()
// this function may be called before postBuild(), in which case mResizeHandle won't have been set up yet.
if(mResizeHandle != NULL)
{
- if(!gViewerWindow->getWindow()->getFullscreen())
- {
- // Only when running in windowed mode on the Mac, leave room for a resize widget on the right edge of the bar.
- width -= RESIZE_HANDLE_WIDTH;
-
- LLRect r;
- r.mLeft = width - pad;
- r.mBottom = 0;
- r.mRight = r.mLeft + RESIZE_HANDLE_WIDTH;
- r.mTop = r.mBottom + RESIZE_HANDLE_HEIGHT;
- mResizeHandle->setRect(r);
- mResizeHandle->setVisible(TRUE);
- }
- else
- {
- mResizeHandle->setVisible(FALSE);
- }
+ // Only when running in windowed mode on the Mac, leave room for a resize widget on the right edge of the bar.
+ width -= RESIZE_HANDLE_WIDTH;
+
+ LLRect r;
+ r.mLeft = width - pad;
+ r.mBottom = 0;
+ r.mRight = r.mLeft + RESIZE_HANDLE_WIDTH;
+ r.mTop = r.mBottom + RESIZE_HANDLE_HEIGHT;
+ mResizeHandle->setRect(r);
+ mResizeHandle->setVisible(TRUE);
}
#endif // LL_DARWIN
}
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index cae5e93545..9bd08287f3 100644
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -886,28 +886,6 @@ void LLToolGrab::handleHoverNonPhysical(S32 x, S32 y, MASK mask)
// Not dragging. Just showing affordances
void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask)
{
- const F32 ROTATE_ANGLE_PER_SECOND = 40.f * DEG_TO_RAD;
- const F32 rotate_angle = ROTATE_ANGLE_PER_SECOND / gFPSClamped;
-
- // Look for cursor against the edge of the screen
- // Only works in fullscreen
- if (gSavedSettings.getBOOL("FullScreen"))
- {
- if (gAgentCamera.cameraThirdPerson() )
- {
- if (x == 0)
- {
- gAgent.yaw(rotate_angle);
- //gAgent.setControlFlags(AGENT_CONTROL_YAW_POS);
- }
- else if (x == (gViewerWindow->getWorldViewWidthScaled() - 1) )
- {
- gAgent.yaw(-rotate_angle);
- //gAgent.setControlFlags(AGENT_CONTROL_YAW_NEG);
- }
- }
- }
-
// JC - TODO - change cursor based on gGrabBtnVertical, gGrabBtnSpin
lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGrab (inactive-not over editable object)" << llendl;
gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 9290b4c5a6..36650af6cb 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3778,17 +3778,6 @@ class LLViewMouselook : public view_listener_t
}
};
-class LLViewFullscreen : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- // we no longer permit full screen mode EXT-6775
- // gViewerWindow->toggleFullscreen(TRUE);
- llwarns << "full screen mode no longer supported" << llendl;
- return true;
- }
-};
-
class LLViewDefaultUISize : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -7783,7 +7772,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLZoomer(1.2f), "View.ZoomOut");
view_listener_t::addMenu(new LLZoomer(1/1.2f), "View.ZoomIn");
view_listener_t::addMenu(new LLZoomer(DEFAULT_FIELD_OF_VIEW, false), "View.ZoomDefault");
- view_listener_t::addMenu(new LLViewFullscreen(), "View.Fullscreen");
view_listener_t::addMenu(new LLViewDefaultUISize(), "View.DefaultUISize");
view_listener_t::addMenu(new LLViewEnableMouselook(), "View.EnableMouselook");
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index c4135f9409..c9c0b72528 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1118,28 +1118,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated)
mActive = TRUE;
send_agent_resume();
gAgent.clearAFK();
- if (mWindow->getFullscreen() && !mIgnoreActivate)
- {
- if (!LLApp::isExiting() )
- {
- if (LLStartUp::getStartupState() >= STATE_STARTED)
- {
- // if we're in world, show a progress bar to hide reloading of textures
- llinfos << "Restoring GL during activate" << llendl;
- restoreGL(LLTrans::getString("ProgressRestoring"));
- }
- else
- {
- // otherwise restore immediately
- restoreGL();
- }
- }
- else
- {
- llwarns << "Activating while quitting" << llendl;
- }
- }
-
+
// Unmute audio
audio_update_volume();
}
@@ -1159,12 +1138,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated)
}
send_agent_pause();
-
- if (mWindow->getFullscreen() && !mIgnoreActivate)
- {
- llinfos << "Stopping GL during deactivation" << llendl;
- stopGL();
- }
+
// Mute audio
audio_update_volume();
}
@@ -1331,12 +1305,10 @@ LLViewerWindow::LLViewerWindow(
const std::string& title, const std::string& name,
S32 x, S32 y,
S32 width, S32 height,
- BOOL fullscreen, BOOL ignore_pixel_depth)
+ BOOL fullscreen, BOOL ignore_pixel_depth) // fullscreen is no longer used
:
mWindow(NULL),
mActive(TRUE),
- mWantFullscreen(fullscreen),
- mShowFullscreenProgress(FALSE),
mWindowRectRaw(0, height, width, 0),
mWindowRectScaled(0, height, width, 0),
mWorldViewRectRaw(0, height, width, 0),
@@ -1351,7 +1323,6 @@ LLViewerWindow::LLViewerWindow(
mIgnoreActivate( FALSE ),
mResDirty(false),
mStatesDirty(false),
- mIsFullscreenChecked(false),
mCurrResolutionIndex(0),
mViewerWindowListener(new LLViewerWindowListener(this)),
mProgressView(NULL)
@@ -1911,24 +1882,17 @@ void LLViewerWindow::reshape(S32 width, S32 height)
sendShapeToSim();
-
- // store the mode the user wants (even if not there yet)
- gSavedSettings.setBOOL("FullScreen", mWantFullscreen);
-
// store new settings for the mode we are in, regardless
- if (!mWindow->getFullscreen())
- {
- // Only save size if not maximized
- BOOL maximized = mWindow->getMaximized();
- gSavedSettings.setBOOL("WindowMaximized", maximized);
+ // Only save size if not maximized
+ BOOL maximized = mWindow->getMaximized();
+ gSavedSettings.setBOOL("WindowMaximized", maximized);
- LLCoordScreen window_size;
- if (!maximized
- && mWindow->getSize(&window_size))
- {
- gSavedSettings.setS32("WindowWidth", window_size.mX);
- gSavedSettings.setS32("WindowHeight", window_size.mY);
- }
+ LLCoordScreen window_size;
+ if (!maximized
+ && mWindow->getSize(&window_size))
+ {
+ gSavedSettings.setS32("WindowWidth", window_size.mX);
+ gSavedSettings.setS32("WindowHeight", window_size.mY);
}
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width);
@@ -3806,18 +3770,7 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height)
BORDERHEIGHT = size.mY- y;
LLCoordScreen new_size(new_width + BORDERWIDTH,
new_height + BORDERHEIGHT);
- BOOL disable_sync = gSavedSettings.getBOOL("DisableVerticalSync");
- if (gViewerWindow->mWindow->getFullscreen())
- {
- gViewerWindow->changeDisplaySettings(FALSE,
- new_size,
- disable_sync,
- TRUE);
- }
- else
- {
- gViewerWindow->mWindow->setSize(new_size);
- }
+ gViewerWindow->mWindow->setSize(new_size);
}
}
@@ -4603,51 +4556,12 @@ void LLViewerWindow::initFonts(F32 zoom_factor)
LLFontGL::loadDefaultFonts();
}
-void LLViewerWindow::toggleFullscreen(BOOL show_progress)
-{
- if (mWindow)
- {
- mWantFullscreen = mWindow->getFullscreen() ? FALSE : TRUE;
- mIsFullscreenChecked = mWindow->getFullscreen() ? FALSE : TRUE;
- mShowFullscreenProgress = show_progress;
- }
-}
-
-void LLViewerWindow::getTargetWindow(BOOL& fullscreen, S32& width, S32& height) const
-{
- fullscreen = mWantFullscreen;
-
- if (mWindow
- && mWindow->getFullscreen() == mWantFullscreen)
- {
- width = getWindowWidthRaw();
- height = getWindowHeightRaw();
- }
- else if (mWantFullscreen)
- {
- width = gSavedSettings.getS32("FullScreenWidth");
- height = gSavedSettings.getS32("FullScreenHeight");
- }
- else
- {
- width = gSavedSettings.getS32("WindowWidth");
- height = gSavedSettings.getS32("WindowHeight");
- }
-}
-
void LLViewerWindow::requestResolutionUpdate()
{
mResDirty = true;
}
-void LLViewerWindow::requestResolutionUpdate(bool fullscreen_checked)
-{
- mResDirty = true;
- mWantFullscreen = fullscreen_checked;
- mIsFullscreenChecked = fullscreen_checked;
-}
-
-BOOL LLViewerWindow::checkSettings()
+void LLViewerWindow::checkSettings()
{
if (mStatesDirty)
{
@@ -4659,70 +4573,9 @@ BOOL LLViewerWindow::checkSettings()
// We want to update the resolution AFTER the states getting refreshed not before.
if (mResDirty)
{
- if (gSavedSettings.getBOOL("FullScreenAutoDetectAspectRatio"))
- {
- getWindow()->setNativeAspectRatio(0.f);
- }
- else
- {
- getWindow()->setNativeAspectRatio(gSavedSettings.getF32("FullScreenAspectRatio"));
- }
-
reshape(getWindowWidthRaw(), getWindowHeightRaw());
-
- // force aspect ratio
- if (mIsFullscreenChecked)
- {
- LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() );
- }
-
mResDirty = false;
- }
-
- BOOL is_fullscreen = mWindow->getFullscreen();
- if(mWantFullscreen)
- {
- LLCoordScreen screen_size;
- LLCoordScreen desired_screen_size(gSavedSettings.getS32("FullScreenWidth"),
- gSavedSettings.getS32("FullScreenHeight"));
- getWindow()->getSize(&screen_size);
- if(!is_fullscreen ||
- screen_size.mX != desired_screen_size.mX
- || screen_size.mY != desired_screen_size.mY)
- {
- if (!LLStartUp::canGoFullscreen())
- {
- return FALSE;
- }
-
- LLGLState::checkStates();
- LLGLState::checkTextureChannels();
- changeDisplaySettings(TRUE,
- desired_screen_size,
- gSavedSettings.getBOOL("DisableVerticalSync"),
- mShowFullscreenProgress);
-
- LLGLState::checkStates();
- LLGLState::checkTextureChannels();
- mStatesDirty = true;
- return TRUE;
- }
- }
- else
- {
- if(is_fullscreen)
- {
- // Changing to windowed mode.
- changeDisplaySettings(FALSE,
- LLCoordScreen(gSavedSettings.getS32("WindowWidth"),
- gSavedSettings.getS32("WindowHeight")),
- TRUE,
- mShowFullscreenProgress);
- mStatesDirty = true;
- return TRUE;
- }
- }
- return FALSE;
+ }
}
void LLViewerWindow::restartDisplay(BOOL show_progress_bar)
@@ -4739,38 +4592,23 @@ void LLViewerWindow::restartDisplay(BOOL show_progress_bar)
}
}
-BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, BOOL disable_vsync, BOOL show_progress_bar)
+BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL disable_vsync, BOOL show_progress_bar)
{
BOOL was_maximized = gSavedSettings.getBOOL("WindowMaximized");
- mWantFullscreen = fullscreen;
- mShowFullscreenProgress = show_progress_bar;
- gSavedSettings.setBOOL("FullScreen", mWantFullscreen);
//gResizeScreenTexture = TRUE;
- BOOL old_fullscreen = mWindow->getFullscreen();
- if (!old_fullscreen && fullscreen && !LLStartUp::canGoFullscreen())
- {
- // Not allowed to switch to fullscreen now, so exit early.
- // *NOTE: This case should never be reached, but just-in-case.
- return TRUE;
- }
-
U32 fsaa = gSavedSettings.getU32("RenderFSAASamples");
U32 old_fsaa = mWindow->getFSAASamples();
- // going from windowed to windowed
- if (!old_fullscreen && !fullscreen)
+ // if not maximized, use the request size
+ if (!mWindow->getMaximized())
{
- // if not maximized, use the request size
- if (!mWindow->getMaximized())
- {
- mWindow->setSize(size);
- }
+ mWindow->setSize(size);
+ }
- if (fsaa == old_fsaa)
- {
- return TRUE;
- }
+ if (fsaa == old_fsaa)
+ {
+ return TRUE;
}
// Close floaters that don't handle settings change
@@ -4787,23 +4625,15 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size,
LLCoordScreen old_size;
LLCoordScreen old_pos;
mWindow->getSize(&old_size);
- BOOL got_position = mWindow->getPosition(&old_pos);
- if (!old_fullscreen && fullscreen && got_position)
- {
- // switching from windowed to fullscreen, so save window position
- gSavedSettings.setS32("WindowX", old_pos.mX);
- gSavedSettings.setS32("WindowY", old_pos.mY);
- }
-
mWindow->setFSAASamples(fsaa);
- result_first_try = mWindow->switchContext(fullscreen, size, disable_vsync);
+ result_first_try = mWindow->switchContext(false, size, disable_vsync);
if (!result_first_try)
{
// try to switch back
mWindow->setFSAASamples(old_fsaa);
- result_second_try = mWindow->switchContext(old_fullscreen, old_size, disable_vsync);
+ result_second_try = mWindow->switchContext(false, old_size, disable_vsync);
if (!result_second_try)
{
@@ -4835,19 +4665,8 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size,
}
BOOL success = result_first_try || result_second_try;
- if (success)
- {
-#if LL_WINDOWS
- // Only trigger a reshape after switching to fullscreen; otherwise rely on the windows callback
- // (otherwise size is wrong; this is the entire window size, reshape wants the visible window size)
- if (fullscreen && result_first_try)
-#endif
- {
- reshape(size.mX, size.mY);
- }
- }
- if (!mWindow->getFullscreen() && success)
+ if (success)
{
// maximize window if was maximized, else reposition
if (was_maximized)
@@ -4865,45 +4684,14 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size,
mIgnoreActivate = FALSE;
gFocusMgr.setKeyboardFocus(keyboard_focus);
- mWantFullscreen = mWindow->getFullscreen();
- mShowFullscreenProgress = FALSE;
return success;
}
-
-F32 LLViewerWindow::getDisplayAspectRatio() const
-{
- if (mWindow->getFullscreen())
- {
- if (gSavedSettings.getBOOL("FullScreenAutoDetectAspectRatio"))
- {
- return mWindow->getNativeAspectRatio();
- }
- else
- {
- return gSavedSettings.getF32("FullScreenAspectRatio");
- }
- }
- else
- {
- return mWindow->getNativeAspectRatio();
- }
-}
-
-
F32 LLViewerWindow::getWorldViewAspectRatio() const
{
F32 world_aspect = (F32)mWorldViewRectRaw.getWidth() / (F32)mWorldViewRectRaw.getHeight();
- //F32 window_aspect = (F32)mWindowRectRaw.getWidth() / (F32)mWindowRectRaw.getHeight();
- if (mWindow->getFullscreen())
- {
- return world_aspect * mWindow->getPixelAspectRatio();
- }
- else
- {
- return world_aspect;
- }
+ return world_aspect;
}
void LLViewerWindow::calcDisplayScale()
@@ -4911,27 +4699,13 @@ void LLViewerWindow::calcDisplayScale()
F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor");
LLVector2 display_scale;
display_scale.setVec(llmax(1.f / mWindow->getPixelAspectRatio(), 1.f), llmax(mWindow->getPixelAspectRatio(), 1.f));
- F32 height_normalization = gSavedSettings.getBOOL("UIAutoScale") ? ((F32)mWindowRectRaw.getHeight() / display_scale.mV[VY]) / 768.f : 1.f;
- if(mWindow->getFullscreen())
- {
- display_scale *= (ui_scale_factor * height_normalization);
- }
- else
- {
- display_scale *= ui_scale_factor;
- }
+ display_scale *= ui_scale_factor;
// limit minimum display scale
if (display_scale.mV[VX] < MIN_DISPLAY_SCALE || display_scale.mV[VY] < MIN_DISPLAY_SCALE)
{
display_scale *= MIN_DISPLAY_SCALE / llmin(display_scale.mV[VX], display_scale.mV[VY]);
}
-
- if (mWindow->getFullscreen())
- {
- display_scale.mV[0] = llround(display_scale.mV[0], 2.0f/(F32) mWindowRectRaw.getWidth());
- display_scale.mV[1] = llround(display_scale.mV[1], 2.0f/(F32) mWindowRectRaw.getHeight());
- }
if (display_scale != mDisplayScale)
{
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 410445d97f..1e0200a075 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -262,10 +262,6 @@ public:
// Is window of our application frontmost?
BOOL getActive() const { return mActive; }
- void getTargetWindow(BOOL& fullscreen, S32& width, S32& height) const;
- // The 'target' is where the user wants the window to be. It may not be
- // there yet, because we may be supressing fullscreen prior to login.
-
const std::string& getInitAlert() { return mInitAlert; }
//
@@ -380,17 +376,12 @@ public:
// Prints window implementation details
void dumpState();
- // Request display setting changes
- void toggleFullscreen(BOOL show_progress);
-
// handle shutting down GL and bringing it back up
- void requestResolutionUpdate(bool fullscreen_checked);
- void requestResolutionUpdate(); // doesn't affect fullscreen
- BOOL checkSettings();
+ void requestResolutionUpdate();
+ void checkSettings();
void restartDisplay(BOOL show_progress_bar);
- BOOL changeDisplaySettings(BOOL fullscreen, LLCoordScreen size, BOOL disable_vsync, BOOL show_progress_bar);
+ BOOL changeDisplaySettings(LLCoordScreen size, BOOL disable_vsync, BOOL show_progress_bar);
BOOL getIgnoreDestroyWindow() { return mIgnoreActivate; }
- F32 getDisplayAspectRatio() const;
F32 getWorldViewAspectRatio() const;
const LLVector2& getDisplayScale() const { return mDisplayScale; }
void calcDisplayScale();
@@ -415,8 +406,6 @@ public:
protected:
BOOL mActive;
- BOOL mWantFullscreen;
- BOOL mShowFullscreenProgress;
LLRect mWindowRectRaw; // whole window, including UI
LLRect mWindowRectScaled; // whole window, scaled by UI size
@@ -470,7 +459,6 @@ protected:
bool mResDirty;
bool mStatesDirty;
- bool mIsFullscreenChecked; // Did the user check the fullscreen checkbox in the display settings
U32 mCurrResolutionIndex;
boost::scoped_ptr<LLViewerWindowListener> mViewerWindowListener;
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index ea0c5f1d0f..9c308359fa 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -112,16 +112,19 @@ LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item
}
// virtual
-void LLPanelWearableOutfitItem::updateItem(const std::string& name)
+void LLPanelWearableOutfitItem::updateItem(const std::string& name,
+ const LLStyle::Params& input_params)
{
std::string search_label = name;
+ LLStyle::Params style_params = input_params;
if (mItem && get_is_item_worn(mItem->getUUID()))
{
search_label += LLTrans::getString("worn");
+ style_params.font.style("BOLD");
}
- LLPanelInventoryListItemBase::updateItem(search_label);
+ LLPanelInventoryListItemBase::updateItem(search_label, style_params);
}
//////////////////////////////////////////////////////////////////////////
@@ -261,7 +264,9 @@ LLPanelAttachmentListItem* LLPanelAttachmentListItem::create(LLViewerInventoryIt
return list_item;
}
-void LLPanelAttachmentListItem::setTitle(const std::string& title, const std::string& highlit_text)
+void LLPanelAttachmentListItem::setTitle(const std::string& title,
+ const std::string& highlit_text,
+ const LLStyle::Params& input_params)
{
std::string title_joint = title;
@@ -271,7 +276,7 @@ void LLPanelAttachmentListItem::setTitle(const std::string& title, const std::st
title_joint = title + " (" + joint + ")";
}
- LLPanelDeletableWearableListItem::setTitle(title_joint, highlit_text);
+ LLPanelDeletableWearableListItem::setTitle(title_joint, highlit_text, input_params);
}
//////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index 69134dd646..5dc06284c3 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -86,8 +86,8 @@ public:
/**
* Updates item name and (worn) suffix.
*/
- /*virtual*/ void updateItem(const std::string& name);
-
+ /*virtual*/ void updateItem(const std::string& name,
+ const LLStyle::Params& input_params = LLStyle::Params());
protected:
LLPanelWearableOutfitItem(LLViewerInventoryItem* item);
@@ -124,7 +124,9 @@ public:
virtual ~LLPanelAttachmentListItem() {};
/** Set item title. Joint name is added to the title in parenthesis */
- /*virtual*/ void setTitle(const std::string& title, const std::string& highlit_text);
+ /*virtual*/ void setTitle(const std::string& title,
+ const std::string& highlit_text,
+ const LLStyle::Params& input_params = LLStyle::Params());
protected:
LLPanelAttachmentListItem(LLViewerInventoryItem* item) : LLPanelDeletableWearableListItem(item) {};
diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp
index 06040a574c..09c5b9b196 100644
--- a/indra/newview/llworldmapmessage.cpp
+++ b/indra/newview/llworldmapmessage.cpp
@@ -193,6 +193,9 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
U32 x_world = (U32)(x_regions) * REGION_WIDTH_UNITS;
U32 y_world = (U32)(y_regions) * REGION_WIDTH_UNITS;
+ // name shouldn't be empty, see EXT-4568
+ llassert(!name.empty());
+
// Insert that region in the world map, if failure, flag it as a "null_sim"
if (!(LLWorldMap::getInstance()->insertRegion(x_world, y_world, name, image_id, (U32)accesscode, region_flags)))
{
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index c02bf5741e..cf632c085f 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -114,7 +114,7 @@ with the same filename but different name
<texture name="DisclosureArrow_Opened_Off" file_name="widgets/DisclosureArrow_Opened_Off.png" preload="true" />
<texture name="DownArrow" file_name="bottomtray/DownArrow.png" preload="false" />
- <texture name="DownArrow_Off" file_name="icons/DownArrow_off.png" preload="false" />
+ <texture name="DownArrow_Off" file_name="icons/DownArrow_Off.png" preload="false" />
<texture name="Dragbar" file_name="windows/Dragbar.png" preload="false" scale.left="35" scale.top="5" scale.right="29" scale.bottom="5" />
<texture name="DropDown_Disabled" file_name="widgets/DropDown_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" />
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 54ef6d65a7..b9489895ae 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -825,7 +825,7 @@ Leyla Linden </text>
name="Simulator primitive usage:"
top_pad="4"
width="364">
- Primative usage:
+ Primitive usage:
</text>
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
index f766fe5a5d..6281bc5272 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
@@ -39,28 +39,6 @@
name="Title">
Gesture: [NAME]
</floater.string>
- <text
- type="string"
- length="1"
- follows="top|left"
- font="SansSerifSmall"
- height="10"
- layout="topleft"
- left="10"
- name="name_text"
- top="20"
- font.style="BOLD"
- width="100">
- Name:
- </text>
- <line_editor
- follows="left|top"
- height="20"
- layout="topleft"
- left_delta="84"
- name="name"
- top_delta="-4"
- width="180" />
<text
type="string"
length="1"
@@ -70,7 +48,7 @@
layout="topleft"
left="10"
name="desc_label"
- top_pad="10"
+ top_pad="25"
font.style="BOLD"
width="100">
Description:
@@ -79,10 +57,10 @@
follows="left|top"
height="20"
layout="topleft"
- left_delta="84"
+ left_delta="89"
name="desc"
top_delta="-4"
- width="180" />
+ width="175" />
<text
type="string"
length="1"
@@ -101,11 +79,11 @@
follows="left|top"
height="20"
layout="topleft"
- left_delta="84"
+ left_delta="89"
max_length="31"
name="trigger_editor"
top_delta="-4"
- width="180" />
+ width="175" />
<text
type="string"
length="1"
@@ -125,12 +103,12 @@
follows="left|top"
height="20"
layout="topleft"
- left_delta="84"
+ left_delta="89"
max_length="31"
name="replace_editor"
tool_tip="Replace the trigger word(s) with these words. For example, trigger &apos;hello&apos; replace with &apos;howdy&apos; will turn the chat &apos;I wanted to say hello&apos; into &apos;I wanted to say howdy&apos; as well as playing the gesture"
top_delta="-4"
- width="180" />
+ width="175" />
<text
type="string"
length="1"
@@ -149,7 +127,7 @@
height="20"
label="None"
layout="topleft"
- left_delta="84"
+ left_delta="89"
name="modifier_combo"
top_delta="-4"
width="75" />
@@ -171,7 +149,7 @@
left="10"
font.style="BOLD"
name="library_label"
- top="135"
+ top_delta="25"
width="100">
Library:
</text>
@@ -181,7 +159,7 @@
layout="topleft"
left="10"
name="library_list"
- top="150"
+ top_delta="15"
width="180">
<scroll_list.rows
value="Animation" />
@@ -199,7 +177,7 @@
layout="topleft"
left_pad="10"
name="add_btn"
- top_delta="0"
+ top_delta="-1"
width="70" />
<text
type="string"
@@ -230,7 +208,7 @@
layout="topleft"
left_pad="10"
name="up_btn"
- top_delta="0"
+ top_delta="-1"
width="70" />
<button
follows="top|left"
@@ -256,23 +234,25 @@
layout="topleft"
left="15"
name="options_text"
- top="330"
- width="205" />
+ top="315"
+ width="205">
+ (options)
+ </text>
<combo_box
follows="top|left"
height="20"
layout="topleft"
left_delta="15"
name="animation_list"
- top="345"
- width="100" />
+ top="330"
+ width="100"/>
<combo_box
follows="top|left"
height="20"
layout="topleft"
left_delta="0"
name="sound_list"
- top_delta="0"
+ top="330"
width="100" />
<line_editor
follows="top|left"
@@ -281,7 +261,7 @@
left_delta="0"
max_length="127"
name="chat_editor"
- top_delta="0"
+ top="330"
width="100" />
<radio_group
draw_border="false"
@@ -290,7 +270,7 @@
layout="topleft"
left_pad="8"
name="animation_trigger_type"
- top_delta="0"
+ top="330"
width="80">
<radio_item
height="16"
@@ -298,7 +278,7 @@
layout="topleft"
left="3"
name="start"
- top="-51"
+ top_delta="45"
width="80" />
<radio_item
height="16"
@@ -306,7 +286,7 @@
layout="topleft"
left_delta="0"
name="stop"
- top_pad="10"
+ top_pad="3"
width="80" />
</radio_group>
<check_box
@@ -314,14 +294,14 @@
height="20"
label="until animations are done"
layout="topleft"
- left="16"
+ left="28"
name="wait_anim_check"
- top="340"
+ top="330"
width="100" />
<check_box
follows="top|left"
height="20"
- label="time in seconds"
+ label="time in seconds:"
layout="topleft"
left_delta="0"
name="wait_time_check"
@@ -331,10 +311,10 @@
follows="top|left"
height="20"
layout="topleft"
- left_pad="5"
+ left_pad="10"
max_length="15"
name="wait_time_editor"
- top_delta="0"
+ top_delta="1"
width="50" />
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
index 0569b4d515..bf5bd87ad6 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
@@ -47,8 +47,8 @@
width="263">
<layout_panel
follows="top|left|right"
- user_resize="false"
- auto_resize="false"
+ user_resize="false"
+ auto_resize="false"
layout="topleft"
height="20"
name="my_panel">
@@ -123,7 +123,7 @@
layout="topleft"
left="2"
top_pad="0"
- height="132"
+ height="132"
name="callers_panel"
user_resize="false"
width="280">
diff --git a/indra/newview/skins/default/xui/en/floater_voice_effect.xml b/indra/newview/skins/default/xui/en/floater_voice_effect.xml
index edc25348e4..44ab15a3f2 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_effect.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_effect.xml
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- legacy_header_height="18"
+ legacy_header_height="27"
can_resize="true"
- height="420"
+ height="500"
name="voice_effects"
help_topic="voice_effects"
- title="PREVIEW VOICE MORPHING"
+ title="VOICE MORPHING"
background_visible="true"
follows="all"
label="Places"
layout="topleft"
- min_height="350"
- min_width="330"
- width="455">
+ min_height="360"
+ min_width="200"
+ width="300">
<string name="no_voice_effect">
(No Voice Morph)
</string>
@@ -25,31 +25,43 @@
<string name="new_voice_effect">
(New!)
</string>
- <text
- height="68"
+ <text
+ height="16"
word_wrap="true"
use_ellipses="true"
type="string"
follows="left|top|right"
layout="topleft"
+ font="SansSerifBold"
+ color="White"
left="10"
name="status_text"
right="-10"
- top="25">
-To preview any of the Voice Morphing effects, click the Record button to record a short snippet of voice, then click any Voice Morph in the list to hear how it will sound.
-
-To reconnect to Nearby Voice simply close this window.
+ top="27">To Preview
+ </text>
+ <text
+ height="23"
+ word_wrap="true"
+ use_ellipses="true"
+ type="string"
+ follows="left|top|right"
+ layout="topleft"
+ left="10"
+ name="status_text"
+ right="-5"
+ top_pad="0">
+Record a sample, then click on a voice to hear how it will sound.
</text>
<button
follows="left|top"
height="23"
- label="Record Sample"
+ label="Record"
layout="topleft"
left="10"
name="record_btn"
tool_tip="Record a sample of your voice."
top_pad="5"
- width="150">
+ width="100">
<button.commit_callback
function="VoiceEffect.Record" />
</button>
@@ -61,22 +73,22 @@ To reconnect to Nearby Voice simply close this window.
left_delta="0"
name="record_stop_btn"
top_delta="0"
- width="150">
+ width="100">
<button.commit_callback
function="VoiceEffect.Stop" />
</button>
<text
- height="18"
+ height="23"
halign="right"
use_ellipses="true"
type="string"
follows="left|top|right"
layout="topleft"
left_pad="10"
+ top_delta="10"
name="voice_morphing_link"
- right="-10"
- top_delta="5">
- [[URL] Get Voice Morphing]
+ right="-10">
+ [[URL] Subscribe Now]
</text>
<scroll_list
bottom="-10"
@@ -88,14 +100,16 @@ To reconnect to Nearby Voice simply close this window.
name="voice_effect_list"
right="-10"
tool_tip="Record a sample of your voice, then click an effect to preview."
- top="128">
+ top="95">
<scroll_list.columns
- label="Voice Morph"
- name="name" relative_width="0.41"/>
+ label="Voice Name"
+ name="name"
+ relative_width="0.60" />
<scroll_list.columns
dynamic_width="true"
label="Expires"
name="expires"
- relative_width="0.59" />
+ relative_width="0.30" />
</scroll_list>
+
</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
index e084216a69..9c3151fe07 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
@@ -18,6 +18,9 @@
name="wear_add">
<on_click
function="Outfit.WearAdd" />
+ <on_enable
+ function="Outfit.OnEnable"
+ parameter="wear_add" />
<on_visible
function="Outfit.OnVisible"
parameter="wear_add" />
@@ -28,6 +31,9 @@
name="take_off">
<on_click
function="Outfit.TakeOff" />
+ <on_enable
+ function="Outfit.OnEnable"
+ parameter="take_off" />
<on_visible
function="Outfit.OnVisible"
parameter="take_off" />
@@ -44,7 +50,7 @@
</menu_item_call>
<menu_item_separator />
<menu_item_call
- label="Rename"
+ label="Rename Outfit"
layout="topleft"
name="rename">
<on_click
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 20a2a7d954..673c095826 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -2098,7 +2098,7 @@ Would you be my friend?
type="alertmodal">
New outfit name:
<form name="form">
- <input name="new_name" type="text">
+ <input name="new_name" type="text" width="300">
[NAME]
</input>
<button
diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml
index e79ae34627..2af1a84400 100644
--- a/indra/newview/skins/default/xui/en/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_general.xml
@@ -243,7 +243,7 @@ Hover your mouse over the options for more help.
top_pad="4"
width="190">
<combo_item name="select_mature" value="Select">
- - Select Mature -
+ - Select maturity rating -
</combo_item>
<combo_box.item
label="Moderate Content"
diff --git a/indra/newview/skins/default/xui/en/panel_voice_effect.xml b/indra/newview/skins/default/xui/en/panel_voice_effect.xml
index c575ca468c..93e79b7328 100644
--- a/indra/newview/skins/default/xui/en/panel_voice_effect.xml
+++ b/indra/newview/skins/default/xui/en/panel_voice_effect.xml
@@ -6,7 +6,7 @@
name="panel_voice_effect"
width="200">
<string name="no_voice_effect">
- No Voice Morph
+ Voice Morphing Off
</string>
<string name="preview_voice_effects">
Preview Voice Morphing ▶
@@ -19,11 +19,11 @@
follows="left|top|right"
height="23"
name="voice_effect"
- tool_tip="Select a Voice Morphing effect to change your voice."
+ tool_tip="Select a Voice Morph to change your voice"
top_pad="0"
width="200">
<combo_box.item
- label="No Voice Morph"
+ label="Voice Morphing Off"
name="no_voice_effect"
top_pad="0"
value="0" />