summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/lleventapi.h13
-rw-r--r--indra/llcommon/lleventdispatcher.cpp14
-rw-r--r--indra/llcommon/lleventdispatcher.h65
-rw-r--r--indra/llcommon/llpreprocessor.h1
-rw-r--r--indra/llcommon/tests/lltreeiterators_test.cpp3
-rw-r--r--indra/llui/lltextbase.cpp4
-rw-r--r--indra/llui/lltextbase.h2
-rw-r--r--indra/llui/lltextbox.cpp4
-rw-r--r--indra/llui/lltextbox.h2
-rw-r--r--indra/llui/lltexteditor.cpp4
-rw-r--r--indra/llui/lltexteditor.h2
-rw-r--r--indra/llui/lluicolortable.cpp10
-rw-r--r--indra/llui/lluictrl.cpp4
-rw-r--r--indra/llui/lluictrlfactory.cpp2
-rw-r--r--indra/media_plugins/quicktime/media_plugin_quicktime.cpp16
-rw-r--r--indra/newview/CMakeLists.txt2
-rwxr-xr-xindra/newview/linux_tools/wrapper.sh2
-rw-r--r--indra/newview/llchathistory.cpp15
-rw-r--r--indra/newview/llchathistory.h4
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp57
-rw-r--r--indra/newview/llchatitemscontainerctrl.h6
-rw-r--r--indra/newview/llchatmsgbox.cpp4
-rw-r--r--indra/newview/llchatmsgbox.h2
-rw-r--r--indra/newview/llexpandabletextbox.cpp4
-rw-r--r--indra/newview/llexpandabletextbox.h2
-rw-r--r--indra/newview/llfloatertestinspectors.cpp3
-rw-r--r--indra/newview/llfolderviewitem.cpp4
-rw-r--r--indra/newview/llfolderviewitem.h2
-rw-r--r--indra/newview/llimfloater.cpp24
-rw-r--r--indra/newview/llinspectgroup.cpp3
-rw-r--r--indra/newview/llinventorypanel.cpp3
-rw-r--r--indra/newview/lllogininstance.cpp6
-rw-r--r--indra/newview/llnearbychat.cpp107
-rw-r--r--indra/newview/llnearbychat.h6
-rw-r--r--indra/newview/llnearbychathandler.cpp9
-rw-r--r--indra/newview/llnotificationtiphandler.cpp1
-rw-r--r--indra/newview/llpanelobjectinventory.cpp4
-rw-r--r--indra/newview/llstatusbar.cpp27
-rw-r--r--indra/newview/llstatusbar.h6
-rw-r--r--indra/newview/llviewerchat.cpp203
-rw-r--r--indra/newview/llviewerchat.h53
-rw-r--r--indra/newview/llviewermessage.cpp9
-rw-r--r--indra/newview/skins/default/textures/textures.xml2
-rw-r--r--indra/newview/skins/default/xui/en/inspect_group.xml2
-rw-r--r--indra/newview/skins/default/xui/en/main_view.xml14
-rw-r--r--indra/newview/skins/default/xui/en/menu_login.xml7
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml18
47 files changed, 551 insertions, 206 deletions
diff --git a/indra/llcommon/lleventapi.h b/indra/llcommon/lleventapi.h
index 2cd3b5bf89..96d1b03be8 100644
--- a/indra/llcommon/lleventapi.h
+++ b/indra/llcommon/lleventapi.h
@@ -46,6 +46,19 @@ public:
/// Get the documentation string
std::string getDesc() const { return mDesc; }
+ /**
+ * Publish only selected add() methods from LLEventDispatcher.
+ * Every LLEventAPI add() @em must have a description string.
+ */
+ template <typename CALLABLE>
+ void add(const std::string& name,
+ const std::string& desc,
+ CALLABLE callable,
+ const LLSD& required=LLSD())
+ {
+ LLEventDispatcher::add(name, desc, callable, required);
+ }
+
private:
std::string mDesc;
};
diff --git a/indra/llcommon/lleventdispatcher.cpp b/indra/llcommon/lleventdispatcher.cpp
index 017bf3a521..5fa6059718 100644
--- a/indra/llcommon/lleventdispatcher.cpp
+++ b/indra/llcommon/lleventdispatcher.cpp
@@ -121,6 +121,20 @@ LLEventDispatcher::Callable LLEventDispatcher::get(const std::string& name) cons
return found->second.mFunc;
}
+LLSD LLEventDispatcher::getMetadata(const std::string& name) const
+{
+ DispatchMap::const_iterator found = mDispatch.find(name);
+ if (found == mDispatch.end())
+ {
+ return LLSD();
+ }
+ LLSD meta;
+ meta["name"] = name;
+ meta["desc"] = found->second.mDesc;
+ meta["required"] = found->second.mRequired;
+ return meta;
+}
+
LLDispatchListener::LLDispatchListener(const std::string& pumpname, const std::string& key):
LLEventDispatcher(pumpname, key),
mPump(pumpname, true), // allow tweaking for uniqueness
diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h
index eba7b607f1..c8c4fe0c3c 100644
--- a/indra/llcommon/lleventdispatcher.h
+++ b/indra/llcommon/lleventdispatcher.h
@@ -19,6 +19,7 @@
#include <map>
#include <boost/function.hpp>
#include <boost/bind.hpp>
+#include <boost/iterator/transform_iterator.hpp>
#include <typeinfo>
#include "llevents.h"
@@ -73,6 +74,16 @@ public:
addMethod<CLASS>(name, desc, method, required);
}
+ /// Convenience: for LLEventDispatcher, not every callable needs a
+ /// documentation string.
+ template <typename CALLABLE>
+ void add(const std::string& name,
+ CALLABLE callable,
+ const LLSD& required=LLSD())
+ {
+ add(name, "", callable, required);
+ }
+
/// Unregister a callable
bool remove(const std::string& name);
@@ -87,10 +98,47 @@ public:
/// @a required prototype specified at add() time, die with LL_ERRS.
void operator()(const LLSD& event) const;
+ /// @name Iterate over defined names
+ //@{
+ typedef std::pair<std::string, std::string> NameDesc;
+
+private:
+ struct DispatchEntry
+ {
+ DispatchEntry(const Callable& func, const std::string& desc, const LLSD& required):
+ mFunc(func),
+ mDesc(desc),
+ mRequired(required)
+ {}
+ Callable mFunc;
+ std::string mDesc;
+ LLSD mRequired;
+ };
+ typedef std::map<std::string, DispatchEntry> DispatchMap;
+
+public:
+ /// We want the flexibility to redefine what data we store per name,
+ /// therefore our public interface doesn't expose DispatchMap iterators,
+ /// or DispatchMap itself, or DispatchEntry. Instead we explicitly
+ /// transform each DispatchMap item to NameDesc on dereferencing.
+ typedef boost::transform_iterator<NameDesc(*)(const DispatchMap::value_type&), DispatchMap::const_iterator> const_iterator;
+ const_iterator begin() const
+ {
+ return boost::make_transform_iterator(mDispatch.begin(), makeNameDesc);
+ }
+ const_iterator end() const
+ {
+ return boost::make_transform_iterator(mDispatch.end(), makeNameDesc);
+ }
+ //@}
+
/// Fetch the Callable for the specified name. If no such name was
/// registered, return an empty() Callable.
Callable get(const std::string& name) const;
+ /// Get information about a specific Callable
+ LLSD getMetadata(const std::string& name) const;
+
private:
template <class CLASS, typename METHOD>
void addMethod(const std::string& name, const std::string& desc,
@@ -111,19 +159,12 @@ private:
bool attemptCall(const std::string& name, const LLSD& event) const;
std::string mDesc, mKey;
- struct DispatchEntry
- {
- DispatchEntry(const Callable& func, const std::string& desc, const LLSD& required):
- mFunc(func),
- mDesc(desc),
- mRequired(required)
- {}
- Callable mFunc;
- std::string mDesc;
- LLSD mRequired;
- };
- typedef std::map<std::string, DispatchEntry> DispatchMap;
DispatchMap mDispatch;
+
+ static NameDesc makeNameDesc(const DispatchMap::value_type& item)
+ {
+ return NameDesc(item.first, item.second.mDesc);
+ }
};
/**
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index 48244480b1..bb3301df9f 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -122,6 +122,7 @@
#pragma warning( 3 : 4264 ) // "'virtual_function' : no override available for virtual member function from base 'class'; function is hidden"
#pragma warning( 3 : 4265 ) // "class has virtual functions, but destructor is not virtual"
#pragma warning( 3 : 4266 ) // 'function' : no override available for virtual member function from base 'type'; function is hidden
+#pragma warning (disable : 4180) // qualifier applied to function type has no meaning; ignored
#pragma warning( disable : 4284 ) // silly MS warning deep inside their <map> include file
#pragma warning( disable : 4503 ) // 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation.
#pragma warning( disable : 4800 ) // 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
diff --git a/indra/llcommon/tests/lltreeiterators_test.cpp b/indra/llcommon/tests/lltreeiterators_test.cpp
index d6d9f68110..31c70b4daa 100644
--- a/indra/llcommon/tests/lltreeiterators_test.cpp
+++ b/indra/llcommon/tests/lltreeiterators_test.cpp
@@ -35,9 +35,6 @@
// Precompiled header
#include "linden_common.h"
-#if LL_WINDOWS
-#pragma warning (disable : 4180) // qualifier applied to function type has no meaning; ignored
-#endif
// STL headers
// std headers
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 9706878a57..7b1aaac35c 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1451,7 +1451,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url)
}
}
-void LLTextBase::setText(const LLStringExplicit &utf8str)
+void LLTextBase::setText(const LLStringExplicit &utf8str ,const LLStyle::Params& input_params)
{
// clear out the existing text and segments
getViewModel()->setDisplay(LLWStringUtil::null);
@@ -1466,7 +1466,7 @@ void LLTextBase::setText(const LLStringExplicit &utf8str)
std::string text(utf8str);
LLStringUtil::removeCRLF(text);
- appendText(text, false);
+ appendText(text, false, input_params);
onValueChange(0, getLength());
}
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index fb01cd1e7c..70d78c77cd 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -137,7 +137,7 @@ public:
// Text accessors
// TODO: add optional style parameter
- virtual void setText(const LLStringExplicit &utf8str); // uses default style
+ virtual void setText(const LLStringExplicit &utf8str , const LLStyle::Params& input_params = LLStyle::Params()); // uses default style
virtual std::string getText() const;
// wide-char versions
diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp
index 00f1d833a3..4c4123cf45 100644
--- a/indra/llui/lltextbox.cpp
+++ b/indra/llui/lltextbox.cpp
@@ -112,12 +112,12 @@ BOOL LLTextBox::handleHover(S32 x, S32 y, MASK mask)
return handled;
}
-void LLTextBox::setText(const LLStringExplicit& text)
+void LLTextBox::setText(const LLStringExplicit& text , const LLStyle::Params& input_params )
{
// does string argument insertion
mText.assign(text);
- LLTextBase::setText(mText.getString());
+ LLTextBase::setText(mText.getString(), input_params );
}
void LLTextBox::setClickedCallback( boost::function<void (void*)> cb, void* userdata /*= NULL */ )
diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h
index 73f8a7c299..01b4bfa5ed 100644
--- a/indra/llui/lltextbox.h
+++ b/indra/llui/lltextbox.h
@@ -58,7 +58,7 @@ public:
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
- /*virtual*/ void setText( const LLStringExplicit& text );
+ /*virtual*/ void setText( const LLStringExplicit& text, const LLStyle::Params& input_params = LLStyle::Params() );
void setRightAlign() { mHAlign = LLFontGL::RIGHT; }
void setHAlign( LLFontGL::HAlign align ) { mHAlign = align; }
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index d136c6b49d..224f066968 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -311,12 +311,12 @@ LLTextEditor::~LLTextEditor()
// LLTextEditor
// Public methods
-void LLTextEditor::setText(const LLStringExplicit &utf8str)
+void LLTextEditor::setText(const LLStringExplicit &utf8str, const LLStyle::Params& input_params)
{
blockUndo();
deselect();
- LLTextBase::setText(utf8str);
+ LLTextBase::setText(utf8str, input_params);
resetDirty();
}
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 10fc94dedc..fb014b86bf 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -168,7 +168,7 @@ public:
void appendWidget(const LLInlineViewSegment::Params& params, const std::string& text, bool allow_undo);
// Non-undoable
- void setText(const LLStringExplicit &utf8str);
+ void setText(const LLStringExplicit &utf8str, const LLStyle::Params& input_params = LLStyle::Params());
// Removes text from the end of document
diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp
index f1e3000547..9be33483d0 100644
--- a/indra/llui/lluicolortable.cpp
+++ b/indra/llui/lluicolortable.cpp
@@ -192,19 +192,27 @@ void LLUIColorTable::clear()
LLUIColor LLUIColorTable::getColor(const std::string& name, const LLColor4& default_color) const
{
string_color_map_t::const_iterator iter = mUserSetColors.find(name);
+
if(iter != mUserSetColors.end())
{
return LLUIColor(&iter->second);
}
iter = mLoadedColors.find(name);
- return (iter != mLoadedColors.end() ? LLUIColor(&iter->second) : LLUIColor(default_color));
+
+ if(iter != mLoadedColors.end())
+ {
+ return LLUIColor(&iter->second);
+ }
+
+ return LLUIColor(default_color);
}
// update user color, loaded colors are parsed on initialization
void LLUIColorTable::setColor(const std::string& name, const LLColor4& color)
{
setColor(name, color, mUserSetColors);
+ setColor(name, color, mLoadedColors);
}
bool LLUIColorTable::loadFromSettings()
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index aaadc1b58d..08fc8fb784 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -38,10 +38,6 @@
#include "llpanel.h"
#include "lluictrlfactory.h"
-// This breaks the ability to construct dummy LLUICtrls for calls like
-// getChild<LLUICtrl>("not-there")
-//static LLWidgetNameRegistry::StaticRegistrar r(&typeid(LLUICtrl::Params), "ui_ctrl");
-// This doesn't appear to read/apply ui_ctrl.xml
static LLDefaultChildRegistry::Register<LLUICtrl> r("ui_ctrl");
LLUICtrl::Params::Params()
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index adfbb41feb..1c1450d7e9 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -433,8 +433,8 @@ void LLUICtrlFactory::registerWidget(const std::type_info* widget_type, const st
LLWidgetNameRegistry ::instance().defaultRegistrar().add(param_block_type, tag);
// associate widget type with factory function
LLDefaultWidgetRegistry::instance().defaultRegistrar().add(widget_type, creator_func);
- LLWidgetTypeRegistry::instance().defaultRegistrar().add(tag, widget_type);
//FIXME: comment this in when working on schema generation
+ //LLWidgetTypeRegistry::instance().defaultRegistrar().add(tag, widget_type);
//LLDefaultParamBlockRegistry::instance().defaultRegistrar().add(widget_type, &getEmptyParamBlock<T>);
}
diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
index de927de1cd..dac0509531 100644
--- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
+++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
@@ -528,11 +528,17 @@ private:
if ( ! mMovieController )
return;
- // service QuickTime
- // Calling it this way doesn't have good behavior on Windows...
-// MoviesTask( mMovieHandle, milliseconds );
- // This was the original, but I think using both MoviesTask and MCIdle is redundant. Trying with only MCIdle.
-// MoviesTask( mMovieHandle, 0 );
+ // this wasn't required in 1.xx viewer but we have to manually
+ // work the Windows message pump now
+ #if defined( LL_WINDOWS )
+ MSG msg;
+ while ( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) )
+ {
+ GetMessage( &msg, NULL, 0, 0 );
+ TranslateMessage( &msg );
+ DispatchMessage( &msg );
+ };
+ #endif
MCIdle( mMovieController );
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 9d44f34ea8..4adef84cd3 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -447,6 +447,7 @@ set(viewer_SOURCE_FILES
llviewerassettype.cpp
llvieweraudio.cpp
llviewercamera.cpp
+ llviewerchat.cpp
llviewercontrol.cpp
llviewercontrollistener.cpp
llviewerdisplay.cpp
@@ -946,6 +947,7 @@ set(viewer_HEADER_FILES
llvieweraudio.h
llviewerbuild.h
llviewercamera.h
+ llviewerchat.h
llviewercontrol.h
llviewercontrollistener.h
llviewerdisplay.h
diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh
index 3209654498..f84102e1fb 100755
--- a/indra/newview/linux_tools/wrapper.sh
+++ b/indra/newview/linux_tools/wrapper.sh
@@ -118,7 +118,7 @@ if [ -n "$LL_TCMALLOC" ]; then
fi
fi
-export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}"'
+export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"${LD_LIBRARY_PATH}"'
export SL_CMD='$LL_WRAPPER bin/do-not-directly-run-secondlife-bin'
export SL_OPT="`cat etc/gridargs.dat` $@"
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 046e1d92dc..0070e654ee 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -341,16 +341,28 @@ LLView* LLChatHistory::getHeader(const LLChat& chat,const LLStyle::Params& style
return header;
}
-void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& style_params)
+void LLChatHistory::appendWidgetMessage(const LLChat& chat)
{
LLView* view = NULL;
std::string view_text = "\n[" + formatCurrentTime() + "] " + chat.mFromName + ": ";
+
LLInlineViewSegment::Params p;
p.force_newline = true;
p.left_pad = mLeftWidgetPad;
p.right_pad = mRightWidgetPad;
+
+ LLColor4 txt_color = LLUIColorTable::instance().getColor("White");
+ LLViewerChat::getChatColor(chat,txt_color);
+ LLFontGL* fontp = LLViewerChat::getChatFont();
+
+ LLStyle::Params style_params;
+ style_params.color(txt_color);
+ style_params.readonly_color(txt_color);
+ style_params.font(fontp);
+
+
if (mLastFromName == chat.mFromName)
{
view = getSeparator();
@@ -365,6 +377,7 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& sty
else
p.top_pad = mTopHeaderPad;
p.bottom_pad = mBottomHeaderPad;
+
}
p.view = view;
diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h
index f0944042af..f689a225fe 100644
--- a/indra/newview/llchathistory.h
+++ b/indra/newview/llchathistory.h
@@ -34,7 +34,7 @@
#define LLCHATHISTORY_H_
#include "lltexteditor.h"
-#include "llchat.h"
+#include "llviewerchat.h"
//Chat log widget allowing addition of a message as a widget
class LLChatHistory : public LLTextEditor
@@ -109,7 +109,7 @@ class LLChatHistory : public LLTextEditor
* @param time time of a message.
* @param message message itself.
*/
- void appendWidgetMessage(const LLChat& chat, LLStyle::Params& style_params);
+ void appendWidgetMessage(const LLChat& chat);
private:
std::string mLastFromName;
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 63b9fd8e66..d2e3247250 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -120,10 +120,10 @@ std::string LLNearbyChatToastPanel::appendTime()
-void LLNearbyChatToastPanel::addText (const std::string& message)
+void LLNearbyChatToastPanel::addText (const std::string& message , const LLStyle::Params& input_params)
{
LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text", false);
- msg_text->addText(message);
+ msg_text->addText(message , input_params);
mMessages.push_back(message);
}
@@ -134,9 +134,34 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
mText = notification["message"].asString(); // UTF-8 line of text
mFromName = notification["from"].asString(); // agent or object name
mFromID = notification["from_id"].asUUID(); // agent id or object id
+
int sType = notification["source"].asInteger();
mSourceType = (EChatSourceType)sType;
-
+
+ std::string color_name = notification["text_color"].asString();
+
+ mTextColor = LLUIColorTable::instance().getColor(color_name);
+ mTextColor.mV[VALPHA] =notification["color_alpha"].asReal();
+
+ S32 font_size = notification["font_size"].asInteger();
+ switch(font_size)
+ {
+ case 0:
+ mFont = LLFontGL::getFontSansSerifSmall();
+ break;
+ default:
+ case 1:
+ mFont = LLFontGL::getFontSansSerif();
+ break;
+ case 2:
+ mFont = LLFontGL::getFontSansSerifBig();
+ break;
+ }
+
+ LLStyle::Params style_params;
+ style_params.color(mTextColor);
+ style_params.font(mFont);
+
std::string str_sender;
if(gAgentID != mFromID)
@@ -144,13 +169,13 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
else
str_sender = LLTrans::getString("You");;
- caption->getChild<LLTextBox>("sender_name", false)->setText(str_sender);
+ caption->getChild<LLTextBox>("sender_name", false)->setText(str_sender , style_params);
- caption->getChild<LLTextBox>("msg_time", false)->setText(appendTime());
+ caption->getChild<LLTextBox>("msg_time", false)->setText(appendTime() , style_params );
LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text", false);
- msg_text->setText(mText);
+ msg_text->setText(mText, style_params);
LLUICtrl* msg_inspector = caption->getChild<LLUICtrl>("msg_inspector");
if(mSourceType != CHAT_SOURCE_AGENT)
@@ -171,7 +196,15 @@ void LLNearbyChatToastPanel::setMessage (const LLChat& chat_msg)
notification["from_id"] = chat_msg.mFromID;
notification["time"] = chat_msg.mTime;
notification["source"] = (S32)chat_msg.mSourceType;
-
+
+ std::string r_color_name="White";
+ F32 r_color_alpha = 1.0f;
+ LLViewerChat::getChatColor( chat_msg, r_color_name, r_color_alpha);
+
+ notification["text_color"] = r_color_name;
+ notification["color_alpha"] = r_color_alpha;
+
+ notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ;
init(notification);
}
@@ -201,11 +234,17 @@ void LLNearbyChatToastPanel::setWidth(S32 width)
text_box->reshape(width - msg_left_offset - msg_right_offset,100/*its not magic number, we just need any number*/);
LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text", false);
+
+ LLStyle::Params style_params;
+ style_params.color(mTextColor);
+ style_params.font(mFont);
+
+
if(mText.length())
- msg_text->setText(mText);
+ msg_text->setText(mText, style_params);
for(size_t i=0;i<mMessages.size();++i)
- msg_text->addText(mMessages[i]);
+ msg_text->addText(mMessages[i] , style_params);
setRect(LLRect(getRect().mLeft, getRect().mTop, getRect().mLeft + width , getRect().mBottom));
snapToMessageHeight ();
diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h
index 8fb045b6d9..a65bfedd09 100644
--- a/indra/newview/llchatitemscontainerctrl.h
+++ b/indra/newview/llchatitemscontainerctrl.h
@@ -36,7 +36,7 @@
#include "llpanel.h"
#include "llscrollbar.h"
#include "string"
-#include "llchat.h"
+#include "llviewerchat.h"
#include "lltoastpanel.h"
typedef enum e_show_item_header
@@ -59,7 +59,7 @@ public:
const LLUUID& getFromID() const { return mFromID;}
- void addText (const std::string& message);
+ void addText (const std::string& message , const LLStyle::Params& input_params = LLStyle::Params());
void setMessage (const LLChat& msg);
void setWidth (S32 width);
void snapToMessageHeight ();
@@ -89,6 +89,8 @@ private:
std::string mFromName; // agent or object name
LLUUID mFromID; // agent id or object id
EChatSourceType mSourceType;
+ LLColor4 mTextColor;
+ LLFontGL* mFont;
std::vector<std::string> mMessages;
diff --git a/indra/newview/llchatmsgbox.cpp b/indra/newview/llchatmsgbox.cpp
index 12626e3b43..bb0ec2db27 100644
--- a/indra/newview/llchatmsgbox.cpp
+++ b/indra/newview/llchatmsgbox.cpp
@@ -84,7 +84,7 @@ LLChatMsgBox::LLChatMsgBox(const Params& p) :
mBlockSpacing(p.block_spacing)
{}
-void LLChatMsgBox::addText( const LLStringExplicit& text )
+void LLChatMsgBox::addText( const LLStringExplicit& text , const LLStyle::Params& input_params )
{
S32 length = getLength();
// if there is existing text, add a separator
@@ -94,5 +94,5 @@ void LLChatMsgBox::addText( const LLStringExplicit& text )
insertSegment(new ChatSeparator(length - 1, length - 1));
}
// prepend newline only if there is some existing text
- appendText(text, length > 0);
+ appendText(text, length > 0, input_params);
}
diff --git a/indra/newview/llchatmsgbox.h b/indra/newview/llchatmsgbox.h
index df29db58c3..9e16616729 100644
--- a/indra/newview/llchatmsgbox.h
+++ b/indra/newview/llchatmsgbox.h
@@ -61,7 +61,7 @@ protected:
friend class LLUICtrlFactory;
public:
- void addText(const LLStringExplicit &text);
+ void addText(const LLStringExplicit &text, const LLStyle::Params& input_params = LLStyle::Params());
private:
S32 mBlockSpacing;
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp
index 424d635321..6d7da107ac 100644
--- a/indra/newview/llexpandabletextbox.cpp
+++ b/indra/newview/llexpandabletextbox.cpp
@@ -129,12 +129,12 @@ void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, BOOL calle
}
}
-void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text)
+void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,const LLStyle::Params& input_params)
{
// LLTextBox::setText will obliterate the expander segment, so make sure
// we generate it again by clearing mExpanderVisible
mExpanderVisible = false;
- LLTextBox::setText(text);
+ LLTextBox::setText(text, input_params);
// text contents have changed, segments are cleared out
// so hide the expander and determine if we need it
diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h
index 3fe646c29c..7c989cfa50 100644
--- a/indra/newview/llexpandabletextbox.h
+++ b/indra/newview/llexpandabletextbox.h
@@ -60,7 +60,7 @@ protected:
// adds or removes "More" link as needed
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
- /*virtual*/ void setText(const LLStringExplicit& text);
+ /*virtual*/ void setText(const LLStringExplicit& text, const LLStyle::Params& input_params = LLStyle::Params());
/**
* Returns difference between text box height and text height.
diff --git a/indra/newview/llfloatertestinspectors.cpp b/indra/newview/llfloatertestinspectors.cpp
index 8af011c17a..09996b0b92 100644
--- a/indra/newview/llfloatertestinspectors.cpp
+++ b/indra/newview/llfloatertestinspectors.cpp
@@ -53,6 +53,9 @@ LLFloaterTestInspectors::~LLFloaterTestInspectors()
BOOL LLFloaterTestInspectors::postBuild()
{
+ // Test the dummy widget construction code
+ getChild<LLUICtrl>("intentionally-not-found")->setEnabled(true);
+
// getChild<LLUICtrl>("avatar_2d_btn")->setCommitCallback(
// boost::bind(&LLFloaterTestInspectors::onClickAvatar2D, this));
getChild<LLUICtrl>("avatar_3d_btn")->setCommitCallback(
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 6fdaefd21a..5db35d5f70 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -388,7 +388,9 @@ BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* roo
// makes sure that this view and it's children are the right size.
S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation)
{
- mIndentation = mParentFolder ? mParentFolder->getIndentation() + LEFT_INDENTATION : 0;
+ mIndentation = getParentFolder() && getParentFolder()->getParentFolder()
+ ? mParentFolder->getIndentation() + LEFT_INDENTATION
+ : 0;
if (mLabelWidthDirty)
{
mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mSearchableLabel);
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index 62a4b9a187..7c429fc76e 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -110,7 +110,7 @@ public:
// layout constants
static const S32 LEFT_PAD = 5;
- static const S32 LEFT_INDENTATION = 13;
+ static const S32 LEFT_INDENTATION = 8;
static const S32 ICON_PAD = 2;
static const S32 ICON_WIDTH = 16;
static const S32 TEXT_PAD = 1;
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 5ea900e46d..0f32d0b313 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -462,7 +462,7 @@ void LLIMFloater::updateMessages()
if (messages.size())
{
- LLUIColor chat_color = LLUIColorTable::instance().getColor("IMChatColor");
+// LLUIColor chat_color = LLUIColorTable::instance().getColor("IMChatColor");
std::ostringstream message;
std::list<LLSD>::const_reverse_iterator iter = messages.rbegin();
@@ -475,32 +475,12 @@ void LLIMFloater::updateMessages()
LLUUID from_id = msg["from_id"].asUUID();
std::string from = from_id != gAgentID ? msg["from"].asString() : LLTrans::getString("You");
std::string message = msg["message"].asString();
- LLStyle::Params style_params;
- style_params.color(chat_color);
LLChat chat;
chat.mFromID = from_id;
chat.mFromName = from;
- //Handle IRC styled /me messages.
- std::string prefix = message.substr(0, 4);
- if (prefix == "/me " || prefix == "/me'")
- {
- if (from.size() > 0)
- {
- style_params.font.style = "ITALIC";
- chat.mText = from + " ";
- mChatHistory->appendWidgetMessage(chat, style_params);
- }
- message = message.substr(3);
- style_params.font.style = "UNDERLINE";
- mChatHistory->appendText(message, FALSE, style_params);
- }
- else
- {
- chat.mText = message;
- mChatHistory->appendWidgetMessage(chat, style_params);
- }
+ mChatHistory->appendWidgetMessage(chat);
mLastMessageIndex = msg["index"].asInteger();
}
diff --git a/indra/newview/llinspectgroup.cpp b/indra/newview/llinspectgroup.cpp
index c78bcd6afe..7fd7b69021 100644
--- a/indra/newview/llinspectgroup.cpp
+++ b/indra/newview/llinspectgroup.cpp
@@ -216,7 +216,8 @@ void LLInspectGroup::requestUpdate()
getChild<LLUICtrl>("group_details")->setValue("");
getChild<LLUICtrl>("group_cost")->setValue("");
// Must have a visible button so the inspector can take focus
- getChild<LLUICtrl>("leave_btn")->setVisible(true);
+ getChild<LLUICtrl>("view_profile_btn")->setVisible(true);
+ getChild<LLUICtrl>("leave_btn")->setVisible(false);
getChild<LLUICtrl>("join_btn")->setVisible(false);
// Make a new request for properties
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index dfd4af5c28..97f90ac845 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -139,6 +139,7 @@ BOOL LLInventoryPanel::postBuild()
p.name = getName();
p.rect = folder_rect;
p.parent_panel = this;
+ p.tool_tip = p.name;
mFolders = LLUICtrlFactory::create<LLFolderView>(p);
mFolders->setAllowMultiSelect(mAllowMultiSelect);
}
@@ -492,6 +493,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
p.icon = new_listener->getIcon();
p.root = mFolders;
p.listener = new_listener;
+ p.tool_tip = p.name;
LLFolderViewFolder* folderp = LLUICtrlFactory::create<LLFolderViewFolder>(p);
folderp->setItemSortOrder(mFolders->getSortOrder());
@@ -518,6 +520,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
params.root(mFolders);
params.listener(new_listener);
params.rect(LLRect (0, 0, 0, 0));
+ params.tool_tip = params.name;
itemp = LLUICtrlFactory::create<LLFolderViewItem> (params);
}
}
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index a01426ea87..955347bce2 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -73,9 +73,9 @@ LLLoginInstance::LLLoginInstance() :
{
mLoginModule->getEventPump().listen("lllogininstance",
boost::bind(&LLLoginInstance::handleLoginEvent, this, _1));
- mDispatcher.add("fail.login", "", boost::bind(&LLLoginInstance::handleLoginFailure, this, _1));
- mDispatcher.add("connect", "", boost::bind(&LLLoginInstance::handleLoginSuccess, this, _1));
- mDispatcher.add("disconnect", "", boost::bind(&LLLoginInstance::handleDisconnect, this, _1));
+ mDispatcher.add("fail.login", boost::bind(&LLLoginInstance::handleLoginFailure, this, _1));
+ mDispatcher.add("connect", boost::bind(&LLLoginInstance::handleLoginSuccess, this, _1));
+ mDispatcher.add("disconnect", boost::bind(&LLLoginInstance::handleDisconnect, this, _1));
}
LLLoginInstance::~LLLoginInstance()
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index ac806d7106..85db69174d 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -132,120 +132,31 @@ void LLNearbyChat::applySavedVariables()
}
}
-LLColor4 nearbychat_get_text_color(const LLChat& chat)
-{
- LLColor4 text_color;
-
- if(chat.mMuted)
- {
- text_color.setVec(0.8f, 0.8f, 0.8f, 1.f);
- }
- else
- {
- switch(chat.mSourceType)
- {
- case CHAT_SOURCE_SYSTEM:
- text_color = LLUIColorTable::instance().getColor("SystemChatColor");
- break;
- case CHAT_SOURCE_AGENT:
- if (chat.mFromID.isNull())
- {
- text_color = LLUIColorTable::instance().getColor("SystemChatColor");
- }
- else
- {
- if(gAgentID == chat.mFromID)
- {
- text_color = LLUIColorTable::instance().getColor("UserChatColor");
- }
- else
- {
- text_color = LLUIColorTable::instance().getColor("AgentChatColor");
- }
- }
- break;
- case CHAT_SOURCE_OBJECT:
- if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
- {
- text_color = LLUIColorTable::instance().getColor("ScriptErrorColor");
- }
- else if ( chat.mChatType == CHAT_TYPE_OWNER )
- {
- text_color = LLUIColorTable::instance().getColor("llOwnerSayChatColor");
- }
- else
- {
- text_color = LLUIColorTable::instance().getColor("ObjectChatColor");
- }
- break;
- default:
- text_color.setToWhite();
- }
-
- if (!chat.mPosAgent.isExactlyZero())
- {
- LLVector3 pos_agent = gAgent.getPositionAgent();
- F32 distance = dist_vec(pos_agent, chat.mPosAgent);
- if (distance > gAgent.getNearChatRadius())
- {
- // diminish far-off chat
- text_color.mV[VALPHA] = 0.8f;
- }
- }
- }
-
- return text_color;
-}
-
-void LLNearbyChat::add_timestamped_line(const LLChat& chat, const LLColor4& color)
-{
- S32 font_size = gSavedSettings.getS32("ChatFontSize");
-
- const LLFontGL* fontp = NULL;
- switch(font_size)
- {
- case 0:
- fontp = LLFontGL::getFontSansSerifSmall();
- break;
- default:
- case 1:
- fontp = LLFontGL::getFontSansSerif();
- break;
- case 2:
- fontp = LLFontGL::getFontSansSerifBig();
- break;
- }
-
- LLStyle::Params style_params;
- style_params.color(color);
- style_params.font(fontp);
- LLUUID uuid = chat.mFromID;
- std::string from = chat.mFromName;
- std::string message = chat.mText;
- mChatHistory->appendWidgetMessage(chat, style_params);
-}
-
void LLNearbyChat::addMessage(const LLChat& chat)
{
- LLColor4 color = nearbychat_get_text_color(chat);
-
if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
{
if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE)
return;
if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat"))
{
+
+ LLColor4 txt_color;
+
+ LLViewerChat::getChatColor(chat,txt_color);
+
LLFloaterScriptDebug::addScriptLine(chat.mText,
chat.mFromName,
- color,
+ txt_color,
chat.mFromID);
return;
}
}
- // could flash the chat button in the status bar here. JC
if (!chat.mMuted)
- add_timestamped_line(chat, color);
+ {
+ mChatHistory->appendWidgetMessage(chat);
+ }
}
void LLNearbyChat::onNearbySpeakers()
diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h
index cb4654654a..3303c388af 100644
--- a/indra/newview/llnearbychat.h
+++ b/indra/newview/llnearbychat.h
@@ -35,7 +35,7 @@
#include "lldockablefloater.h"
#include "llscrollbar.h"
-#include "llchat.h"
+#include "llviewerchat.h"
class LLResizeBar;
class LLChatHistory;
@@ -47,8 +47,7 @@ public:
~LLNearbyChat();
BOOL postBuild ();
- void addMessage (const LLChat& message);
-
+ void addMessage (const LLChat& message);
void onNearbyChatContextMenuItemClicked(const LLSD& userdata);
bool onNearbyChatCheckContextMenuItem(const LLSD& userdata);
@@ -64,7 +63,6 @@ private:
void getAllowedRect (LLRect& rect);
void onNearbySpeakers ();
- void add_timestamped_line(const LLChat& chat, const LLColor4& color);
private:
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index b4e0ab198a..e6665a935e 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -351,7 +351,14 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
notification["time"] = chat_msg.mTime;
notification["source"] = (S32)chat_msg.mSourceType;
notification["chat_type"] = (S32)chat_msg.mChatType;
-
+
+ std::string r_color_name = "White";
+ F32 r_color_alpha = 1.0f;
+ LLViewerChat::getChatColor( chat_msg, r_color_name, r_color_alpha);
+
+ notification["text_color"] = r_color_name;
+ notification["color_alpha"] = r_color_alpha;
+ notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ;
channel->addNotification(notification);
}
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index 823c92a94e..60a27d5154 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -91,6 +91,7 @@ bool LLTipHandler::processNotification(const LLSD& notify)
if(nearby_chat)
{
LLChat chat_msg(notification->getMessage());
+ chat_msg.mSourceType = CHAT_SOURCE_SYSTEM;
nearby_chat->addMessage(chat_msg);
// don't show toast if Nearby Chat is opened
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index a5e9407a41..b1fbf789c6 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1570,6 +1570,7 @@ void LLPanelObjectInventory::reset()
p.name = "task inventory";
p.task_id = getTaskUUID();
p.parent_panel = this;
+ p.tool_tip= p.name;
mFolders = LLUICtrlFactory::create<LLFolderView>(p);
// this ensures that we never say "searching..." or "no items found"
mFolders->getFilter()->setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS);
@@ -1711,6 +1712,7 @@ void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root
p.icon_open = LLUI::getUIImage("Inv_FolderOpen");
p.root = mFolders;
p.listener = bridge;
+ p.tool_tip = p.name;
new_folder = LLUICtrlFactory::create<LLFolderViewFolder>(p);
new_folder->addToFolder(mFolders, mFolders);
new_folder->toggleOpen();
@@ -1751,6 +1753,7 @@ void LLPanelObjectInventory::createViewsForCategory(InventoryObjectList* invento
p.icon_open = LLUI::getUIImage("Inv_FolderOpen");
p.root = mFolders;
p.listener = bridge;
+ p.tool_tip = p.name;
view = LLUICtrlFactory::create<LLFolderViewFolder>(p);
child_categories.put(new obj_folder_pair(obj,
(LLFolderViewFolder*)view));
@@ -1764,6 +1767,7 @@ void LLPanelObjectInventory::createViewsForCategory(InventoryObjectList* invento
params.root(mFolders);
params.listener(bridge);
params.rect(LLRect());
+ params.tool_tip = params.name;
view = LLUICtrlFactory::create<LLFolderViewItem> (params);
}
view->addToFolder(folder, mFolders);
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 4dccdfd7e6..b649a0c38e 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -109,6 +109,7 @@ const S32 TEXT_HEIGHT = 18;
static void onClickBuyCurrency(void*);
static void onClickHealth(void*);
static void onClickScriptDebug(void*);
+static void onClickVolume(void*);
std::vector<std::string> LLStatusBar::sDays;
std::vector<std::string> LLStatusBar::sMonths;
@@ -116,6 +117,12 @@ const U32 LLStatusBar::MAX_DATE_STRING_LENGTH = 2000;
LLStatusBar::LLStatusBar(const LLRect& rect)
: LLPanel(),
+ mTextHealth(NULL),
+ mTextTime(NULL),
+ mSGBandwidth(NULL),
+ mSGPacketLoss(NULL),
+ mBtnBuyCurrency(NULL),
+ mBtnVolume(NULL),
mBalance(0),
mHealth(100),
mSquareMetersCredit(0),
@@ -148,6 +155,11 @@ LLStatusBar::LLStatusBar(const LLRect& rect)
mBtnBuyCurrency = getChild<LLButton>( "buycurrency" );
mBtnBuyCurrency->setClickedCallback( onClickBuyCurrency, this );
+ mBtnVolume = getChild<LLButton>( "volume_btn" );
+ mBtnVolume->setClickedCallback( onClickVolume, this );
+
+ gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2));
+
childSetAction("scriptout", onClickScriptDebug, this);
childSetAction("health", onClickHealth, this);
@@ -333,6 +345,10 @@ void LLStatusBar::refresh()
mSGBandwidth->setVisible(net_stats_visible);
mSGPacketLoss->setVisible(net_stats_visible);
childSetEnabled("stat_btn", net_stats_visible);
+
+ // update the master volume button state
+ BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio");
+ mBtnVolume->setToggleState(mute_audio);
}
void LLStatusBar::setVisibleForMouselook(bool visible)
@@ -488,6 +504,13 @@ static void onClickScriptDebug(void*)
LLFloaterScriptDebug::show(LLUUID::null);
}
+static void onClickVolume(void* data)
+{
+ // toggle the master mute setting
+ BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio");
+ gSavedSettings.setBOOL("MuteAudio", !mute_audio);
+}
+
// sets the static variables necessary for the date
void LLStatusBar::setupDate()
{
@@ -562,6 +585,10 @@ BOOL can_afford_transaction(S32 cost)
return((cost <= 0)||((gStatusBar) && (gStatusBar->getBalance() >=cost)));
}
+void LLStatusBar::onVolumeChanged(const LLSD& newvalue)
+{
+ refresh();
+}
// Implements secondlife:///app/balance/request to request a L$ balance
// update via UDP message system. JC
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index d5629e6f1e..3ce3549961 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -91,9 +91,10 @@ private:
// simple method to setup the part that holds the date
void setupDate();
- static void onCommitSearch(LLUICtrl*, void* data);
- static void onClickSearch(void* data);
+ void onVolumeChanged(const LLSD& newvalue);
+
static void onClickStatGraph(void* data);
+
private:
LLTextBox *mTextHealth;
@@ -103,6 +104,7 @@ private:
LLStatGraph *mSGPacketLoss;
LLButton *mBtnBuyCurrency;
+ LLButton *mBtnVolume;
S32 mBalance;
S32 mHealth;
diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp
new file mode 100644
index 0000000000..d65a060bbc
--- /dev/null
+++ b/indra/newview/llviewerchat.cpp
@@ -0,0 +1,203 @@
+/**
+ * @file llviewerchat.cpp
+ * @brief Builds menus out of items.
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ *
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llviewerchat.h"
+
+// newview includes
+#include "llagent.h" // gAgent
+#include "lluicolortable.h"
+#include "llviewercontrol.h" // gSavedSettings
+
+// LLViewerChat
+
+//static
+void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color)
+{
+ if(chat.mMuted)
+ {
+ r_color= LLUIColorTable::instance().getColor("LtGray");
+ }
+ else
+ {
+ switch(chat.mSourceType)
+ {
+ case CHAT_SOURCE_SYSTEM:
+ r_color = LLUIColorTable::instance().getColor("SystemChatColor");
+ break;
+ case CHAT_SOURCE_AGENT:
+ if (chat.mFromID.isNull())
+ {
+ r_color = LLUIColorTable::instance().getColor("SystemChatColor");
+ }
+ else
+ {
+ if(gAgentID == chat.mFromID)
+ {
+ r_color = LLUIColorTable::instance().getColor("UserChatColor");
+ }
+ else
+ {
+ r_color = LLUIColorTable::instance().getColor("AgentChatColor");
+ }
+ }
+ break;
+ case CHAT_SOURCE_OBJECT:
+ if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
+ {
+ r_color = LLUIColorTable::instance().getColor("ScriptErrorColor");
+ }
+ else if ( chat.mChatType == CHAT_TYPE_OWNER )
+ {
+ r_color = LLUIColorTable::instance().getColor("llOwnerSayChatColor");
+ }
+ else
+ {
+ r_color = LLUIColorTable::instance().getColor("ObjectChatColor");
+ }
+ break;
+ default:
+ r_color.setToWhite();
+ }
+
+ if (!chat.mPosAgent.isExactlyZero())
+ {
+ LLVector3 pos_agent = gAgent.getPositionAgent();
+ F32 distance = dist_vec(pos_agent, chat.mPosAgent);
+ if (distance > gAgent.getNearChatRadius())
+ {
+ // diminish far-off chat
+ r_color.mV[VALPHA] = 0.8f;
+ }
+ }
+ }
+}
+
+
+//static
+void LLViewerChat::getChatColor(const LLChat& chat, std::string& r_color_name, F32& r_color_alpha)
+{
+ if(chat.mMuted)
+ {
+ r_color_name = "LtGray";
+ }
+ else
+ {
+ switch(chat.mSourceType)
+ {
+ case CHAT_SOURCE_SYSTEM:
+ r_color_name = "SystemChatColor";
+ break;
+
+ case CHAT_SOURCE_AGENT:
+ if (chat.mFromID.isNull())
+ {
+ r_color_name = "SystemChatColor";
+ }
+ else
+ {
+ if(gAgentID == chat.mFromID)
+ {
+ r_color_name = "UserChatColor";
+ }
+ else
+ {
+ r_color_name = "AgentChatColor";
+ }
+ }
+ break;
+
+ case CHAT_SOURCE_OBJECT:
+ if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
+ {
+ r_color_name = "ScriptErrorColor";
+ }
+ else if ( chat.mChatType == CHAT_TYPE_OWNER )
+ {
+ r_color_name = "llOwnerSayChatColor";
+ }
+ else
+ {
+ r_color_name = "ObjectChatColor";
+ }
+ break;
+ default:
+ r_color_name = "White";
+ }
+
+ if (!chat.mPosAgent.isExactlyZero())
+ {
+ LLVector3 pos_agent = gAgent.getPositionAgent();
+ F32 distance = dist_vec(pos_agent, chat.mPosAgent);
+ if (distance > gAgent.getNearChatRadius())
+ {
+ // diminish far-off chat
+ r_color_alpha = 0.8f;
+ }
+ else
+ {
+ r_color_alpha = 1.0f;
+ }
+ }
+ }
+
+}
+
+
+//static
+LLFontGL* LLViewerChat::getChatFont()
+{
+ S32 font_size = gSavedSettings.getS32("ChatFontSize");
+ LLFontGL* fontp = NULL;
+ switch(font_size)
+ {
+ case 0:
+ fontp = LLFontGL::getFontSansSerifSmall();
+ break;
+ default:
+ case 1:
+ fontp = LLFontGL::getFontSansSerif();
+ break;
+ case 2:
+ fontp = LLFontGL::getFontSansSerifBig();
+ break;
+ }
+
+ return fontp;
+
+}
+
+//static
+S32 LLViewerChat::getChatFontSize()
+{
+ return gSavedSettings.getS32("ChatFontSize");
+}
diff --git a/indra/newview/llviewerchat.h b/indra/newview/llviewerchat.h
new file mode 100644
index 0000000000..d8840d5dd2
--- /dev/null
+++ b/indra/newview/llviewerchat.h
@@ -0,0 +1,53 @@
+/**
+ * @file llviewerchat.h
+ * @brief wrapper of LLChat in viewer
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ *
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLVIEWERCHAT_H
+#define LL_LLVIEWERCHAT_H
+
+#include "llchat.h"
+#include "llfontgl.h"
+#include "v4color.h"
+
+
+class LLViewerChat
+{
+public:
+ static void getChatColor(const LLChat& chat, LLColor4& r_color);
+ static void getChatColor(const LLChat& chat, std::string& r_color_name, F32& r_color_alpha);
+ static LLFontGL* getChatFont();
+ static S32 getChatFontSize();
+
+
+
+};
+
+#endif
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 4088eafe16..1890e0bf1d 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -43,7 +43,7 @@
#include "llfloaterbump.h"
#include "llassetstorage.h"
#include "llcachename.h"
-#include "llchat.h"
+
#include "lldbstrings.h"
#include "lleconomy.h"
#include "llfilepicker.h"
@@ -115,6 +115,7 @@
#include "llui.h" // for make_ui_sound
#include "lluploaddialog.h"
#include "llviewercamera.h"
+#include "llviewerchat.h"
#include "llviewergenericmessage.h"
#include "llviewerinventory.h"
#include "llviewermenu.h"
@@ -2248,7 +2249,7 @@ void process_decline_callingcard(LLMessageSystem* msg, void**)
void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
{
- LLChat chat;
+ LLChat chat;
std::string mesg;
std::string from_name;
U8 source_temp;
@@ -2848,7 +2849,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
// Chat the "back" SLURL. (DEV-4907)
LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL());
chat.mSourceType = CHAT_SOURCE_SYSTEM;
- LLFloaterChat::addChatHistory(chat);
+ LLFloaterChat::addChatHistory(chat);
// Set the new position
avatarp->setPositionAgent(agent_pos);
@@ -4620,7 +4621,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
if (caution)
{
LLChat chat(notice.getString());
- LLFloaterChat::addChat(chat, FALSE, FALSE);
+ // LLFloaterChat::addChat(chat, FALSE, FALSE);
}
}
}
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 4c4b6a3899..eea2dfb1a1 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -532,7 +532,7 @@
<texture name="Toolbar_Right_Press" file_name="containers/Toolbar_Right_Press.png" preload="false" />
<texture name="Toolbar_Right_Selected" file_name="containers/Toolbar_Right_Selected.png" preload="false" />
- <texture name="Tooltip" file_name="widgets/Tooltip.png" preload="true" scale.left="2" scale.top="1" scale.right="99" scale.bottom="14" />
+ <texture name="Tooltip" file_name="widgets/Tooltip.png" preload="true" scale.left="2" scale.top="16" scale.right="100" scale.bottom="3" />
<texture name="TrashItem_Disabled" file_name="icons/TrashItem_Disabled.png" preload="false" />
<texture name="TrashItem_Off" file_name="icons/TrashItem_Off.png" preload="false" />
diff --git a/indra/newview/skins/default/xui/en/inspect_group.xml b/indra/newview/skins/default/xui/en/inspect_group.xml
index e5e5007c56..f48af2f97e 100644
--- a/indra/newview/skins/default/xui/en/inspect_group.xml
+++ b/indra/newview/skins/default/xui/en/inspect_group.xml
@@ -31,7 +31,7 @@
use_ellipses="true"
width="240"
word_wrap="false">
- Grumpity's Grumpy Group of Moose
+ Grumpity&apos;s Grumpy Group of Moose
</text>
<text
follows="all"
diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml
index 08f7ee456e..9e35c95d45 100644
--- a/indra/newview/skins/default/xui/en/main_view.xml
+++ b/indra/newview/skins/default/xui/en/main_view.xml
@@ -51,6 +51,13 @@
name="main_view"
user_resize="true"
width="500">
+ <view bottom="500"
+ follows="all"
+ height="500"
+ left="0"
+ mouse_opaque="false"
+ name="world_view_rect"
+ width="500"/>
<layout_stack border_size="0"
bottom="500"
follows="all"
@@ -66,13 +73,6 @@
mouse_opaque="false"
name="hud container"
width="500">
- <view bottom="500"
- follows="all"
- height="500"
- left="0"
- mouse_opaque="false"
- name="world_view_rect"
- width="500"/>
<panel follows="right|top|bottom"
height="500"
mouse_opaque="false"
diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml
index bd60574a95..07940e18b6 100644
--- a/indra/newview/skins/default/xui/en/menu_login.xml
+++ b/indra/newview/skins/default/xui/en/menu_login.xml
@@ -193,6 +193,13 @@
function="ShowFloater"
parameter="test_widgets" />
</menu_item_call>
+ <menu_item_call
+ label="Inspectors Test"
+ name="Inspectors Test">
+ <menu_item_call.on_click
+ function="ShowFloater"
+ parameter="test_inspectors" />
+ </menu_item_call>
<menu_item_check
label="Reg In Client Test (restart)"
name="Reg In Client Test (restart)">
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index 1171a8f0b5..8fc78c6701 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -46,14 +46,24 @@
font="SansSerifSmall"
image_selected="BuyArrow_Over"
image_unselected="BuyArrow_Off"
- image_pressed="BuyArrow_Press"
+ image_pressed="BuyArrow_Press"
height="16"
- left="-220"
+ left="-245"
name="buycurrency"
pad_right="22px"
tool_tip="My Balance: Click to buy more L$"
top="1"
width="117" />
+ <button
+ follows="right|bottom"
+ height="16"
+ image_selected="parcel_drk_VoiceNo"
+ image_unselected="parcel_drk_Voice"
+ is_toggle="true"
+ left_pad="15"
+ top="1"
+ name="volume_btn"
+ width="16" />
<text
type="string"
length="1"
@@ -61,9 +71,9 @@
follows="right|bottom"
halign="right"
height="16"
- top="3"
+ top="5"
layout="topleft"
- left_pad="15"
+ left_pad="7"
name="TimeText"
text_color="TimeTextColor"
tool_tip="Current time (Pacific)"