summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/CMakeLists.txt8
-rw-r--r--indra/llui/llconsole.cpp1
-rw-r--r--indra/llui/llfolderview.cpp6
-rw-r--r--indra/llui/llfunctorregistry.h2
-rw-r--r--indra/llui/llkeywords.cpp4
-rw-r--r--indra/llui/lllayoutstack.cpp1
-rw-r--r--indra/llui/lllocalcliprect.cpp10
-rw-r--r--indra/llui/llspellcheck.cpp8
-rw-r--r--indra/llui/lltexteditor.cpp1
-rw-r--r--indra/llui/lltoolbar.cpp4
-rw-r--r--indra/llui/llurlaction.cpp14
-rw-r--r--indra/llui/llurlaction.h1
-rw-r--r--indra/llui/tests/llurlentry_test.cpp2
-rw-r--r--indra/llui/tests/llurlmatch_test.cpp2
14 files changed, 34 insertions, 30 deletions
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 9c961d67d6..01c42e07a2 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -25,6 +25,10 @@ include_directories(
${LLXML_INCLUDE_DIRS}
${LIBS_PREBUILD_DIR}/include/hunspell
)
+include_directories(SYSTEM
+ ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
+ ${LLXML_SYSTEM_INCLUDE_DIRS}
+ )
set(llui_SOURCE_FILES
llaccordionctrl.cpp
@@ -113,7 +117,7 @@ set(llui_SOURCE_FILES
lluicolortable.cpp
lluictrl.cpp
lluictrlfactory.cpp
- lluiimage.cpp
+ lluiimage.cpp
lluistring.cpp
llundo.cpp
llurlaction.cpp
@@ -227,7 +231,7 @@ set(llui_HEADER_FILES
lluifwd.h
llui.h
lluicolor.h
- lluiimage.h
+ lluiimage.h
lluistring.h
llundo.h
llurlaction.h
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index 161496b1f5..c216d593a2 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -243,7 +243,6 @@ void LLConsole::draw()
void LLConsole::Paragraph::makeParagraphColorSegments (const LLColor4 &color)
{
LLSD paragraph_color_segments;
- LLColor4 lcolor=color;
paragraph_color_segments[0]["text"] =wstring_to_utf8str(mParagraphText);
LLSD color_sd = color.getValue();
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 8feaf654f0..8aa1eb7cd5 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -1055,12 +1055,6 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask )
LLMenuGL::sMenuContainer->hideMenus();
}
- LLView *item = NULL;
- if (getChildCount() > 0)
- {
- item = *(getChildList()->begin());
- }
-
switch( key )
{
case KEY_F2:
diff --git a/indra/llui/llfunctorregistry.h b/indra/llui/llfunctorregistry.h
index 899cc3a326..beac212441 100644
--- a/indra/llui/llfunctorregistry.h
+++ b/indra/llui/llfunctorregistry.h
@@ -69,7 +69,6 @@ public:
bool registerFunctor(const std::string& name, ResponseFunctor f)
{
bool retval = true;
- typename FunctorMap::iterator it = mMap.find(name);
if (mMap.count(name) == 0)
{
mMap[name] = f;
@@ -96,7 +95,6 @@ public:
FUNCTOR_TYPE getFunctor(const std::string& name)
{
- typename FunctorMap::iterator it = mMap.find(name);
if (mMap.count(name) != 0)
{
return mMap[name];
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index c1cd04186b..795dacdbb0 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -367,7 +367,6 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
const llwchar* base = wtext.c_str();
const llwchar* cur = base;
- const llwchar* line = NULL;
while( *cur )
{
@@ -385,9 +384,6 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
}
}
- // Start of a new line
- line = cur;
-
// Skip white space
while( *cur && isspace(*cur) && (*cur != '\n') )
{
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index e642883991..e33ac1d5c2 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -476,7 +476,6 @@ void LLLayoutStack::createResizeBar(LLLayoutPanel* panelp)
if (lp->mResizeBar == NULL)
{
LLResizeBar::Side side = (mOrientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM;
- LLRect resize_bar_rect = getRect();
LLResizeBar::Params resize_params;
resize_params.name("resize");
diff --git a/indra/llui/lllocalcliprect.cpp b/indra/llui/lllocalcliprect.cpp
index 6841301219..31ceb0766a 100644
--- a/indra/llui/lllocalcliprect.cpp
+++ b/indra/llui/lllocalcliprect.cpp
@@ -33,7 +33,7 @@
LLScreenClipRect::LLScreenClipRect(const LLRect& rect, BOOL enabled)
-: mScissorState(GL_SCISSOR_TEST),
+ : mScissorState(GL_SCISSOR_TEST),
mEnabled(enabled)
{
if (mEnabled)
@@ -100,10 +100,10 @@ void LLScreenClipRect::updateScissorRegion()
// LLLocalClipRect
//---------------------------------------------------------------------------
LLLocalClipRect::LLLocalClipRect(const LLRect& rect, BOOL enabled /* = TRUE */)
-: LLScreenClipRect(LLRect(rect.mLeft + LLFontGL::sCurOrigin.mX,
- rect.mTop + LLFontGL::sCurOrigin.mY,
- rect.mRight + LLFontGL::sCurOrigin.mX,
- rect.mBottom + LLFontGL::sCurOrigin.mY), enabled)
+ : LLScreenClipRect(LLRect(rect.mLeft + LLFontGL::sCurOrigin.mX,
+ rect.mTop + LLFontGL::sCurOrigin.mY,
+ rect.mRight + LLFontGL::sCurOrigin.mX,
+ rect.mBottom + LLFontGL::sCurOrigin.mY), enabled)
{}
LLLocalClipRect::~LLLocalClipRect()
diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp
index a189375fbe..250372da5b 100644
--- a/indra/llui/llspellcheck.cpp
+++ b/indra/llui/llspellcheck.cpp
@@ -145,10 +145,14 @@ void LLSpellChecker::refreshDictionaryMap()
// Load dictionary information (file name, friendly name, ...)
llifstream user_file(user_path + DICT_FILE_MAIN, std::ios::binary);
- if ( (!user_file.is_open()) || (0 == LLSDSerialize::fromXMLDocument(sDictMap, user_file)) || (0 == sDictMap.size()) )
+ if ( (!user_file.is_open())
+ || (LLSDParser::PARSE_FAILURE == LLSDSerialize::fromXMLDocument(sDictMap, user_file))
+ || (0 == sDictMap.size()) )
{
llifstream app_file(app_path + DICT_FILE_MAIN, std::ios::binary);
- if ( (!app_file.is_open()) || (0 == LLSDSerialize::fromXMLDocument(sDictMap, app_file)) || (0 == sDictMap.size()) )
+ if ( (!app_file.is_open())
+ || (LLSDParser::PARSE_FAILURE == LLSDSerialize::fromXMLDocument(sDictMap, app_file))
+ || (0 == sDictMap.size()) )
{
return;
}
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 2f120479d9..d5e08fa29b 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -2515,7 +2515,6 @@ void LLTextEditor::updateSegments()
mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this);
clearSegments();
- segment_set_t::iterator insert_it = mSegments.begin();
for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it)
{
insertSegment(*list_it);
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index b9256dd890..f9703256c4 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -653,7 +653,6 @@ void LLToolBar::updateLayoutAsNeeded()
S32 max_row_length = 0;
S32 max_length;
- S32 max_total_girth;
S32 cur_start;
S32 cur_row ;
S32 row_pad_start;
@@ -664,7 +663,6 @@ void LLToolBar::updateLayoutAsNeeded()
if (orientation == LLLayoutStack::HORIZONTAL)
{
max_length = getRect().getWidth() - mPadLeft - mPadRight;
- max_total_girth = getRect().getHeight() - mPadTop - mPadBottom;
row_pad_start = mPadLeft;
row_pad_end = mPadRight;
cur_row = mPadTop;
@@ -673,7 +671,6 @@ void LLToolBar::updateLayoutAsNeeded()
else // VERTICAL
{
max_length = getRect().getHeight() - mPadTop - mPadBottom;
- max_total_girth = getRect().getWidth() - mPadLeft - mPadRight;
row_pad_start = mPadTop;
row_pad_end = mPadBottom;
cur_row = mPadLeft;
@@ -841,7 +838,6 @@ void LLToolBar::draw()
if (mDragAndDropTarget && !mButtonCommands.empty())
{
LLRect caret_rect = caret->getRect();
- LLRect toolbar_rect = getRect();
if (getOrientation(mSideType) == LLLayoutStack::HORIZONTAL)
{
caret->setRect(LLRect(mDragx-caret_rect.getWidth()/2+1,
diff --git a/indra/llui/llurlaction.cpp b/indra/llui/llurlaction.cpp
index fd9b3d9a6d..fd872eca4b 100644
--- a/indra/llui/llurlaction.cpp
+++ b/indra/llui/llurlaction.cpp
@@ -157,3 +157,17 @@ void LLUrlAction::showProfile(std::string url)
}
}
}
+
+void LLUrlAction::sendIM(std::string url)
+{
+ LLURI uri(url);
+ LLSD path_array = uri.pathArray();
+ if (path_array.size() == 4)
+ {
+ std::string id_str = path_array.get(2).asString();
+ if (LLUUID::validate(id_str))
+ {
+ executeSLURL("secondlife:///app/agent/" + id_str + "/im");
+ }
+ }
+}
diff --git a/indra/llui/llurlaction.h b/indra/llui/llurlaction.h
index c34960b826..f5f2ceba72 100644
--- a/indra/llui/llurlaction.h
+++ b/indra/llui/llurlaction.h
@@ -76,6 +76,7 @@ public:
/// if the Url specifies an SL command in the form like 'app/{cmd}/{id}/*', show its profile
static void showProfile(std::string url);
+ static void sendIM(std::string url);
/// specify the callbacks to enable this class's functionality
typedef boost::function<void (const std::string&)> url_callback_t;
diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp
index 8f0a48018f..438a2ca8ea 100644
--- a/indra/llui/tests/llurlentry_test.cpp
+++ b/indra/llui/tests/llurlentry_test.cpp
@@ -31,7 +31,7 @@
#include "llurlentry_stub.cpp"
#include "lltut.h"
#include "../lluicolortable.h"
-#include "../lluiimage.h"
+#include "../llui/lluiimage.h"
#include <boost/regex.hpp>
diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp
index 109d3ca7bb..2f99212fa0 100644
--- a/indra/llui/tests/llurlmatch_test.cpp
+++ b/indra/llui/tests/llurlmatch_test.cpp
@@ -28,7 +28,7 @@
#include "linden_common.h"
#include "../llurlmatch.h"
-#include "../lluiimage.h"
+#include "../llui/lluiimage.h"
#include "lltut.h"
// link seams