aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llui')
-rw-r--r--linden/indra/llui/llbutton.cpp2
-rw-r--r--linden/indra/llui/llcombobox.cpp5
-rw-r--r--linden/indra/llui/llcombobox.h2
-rw-r--r--linden/indra/llui/lliconctrl.cpp2
-rw-r--r--linden/indra/llui/lltexteditor.cpp48
-rw-r--r--linden/indra/llui/llui.cpp2
-rw-r--r--linden/indra/llui/lluistring.h12
7 files changed, 30 insertions, 43 deletions
diff --git a/linden/indra/llui/llbutton.cpp b/linden/indra/llui/llbutton.cpp
index 58c1dbc..4bc5277 100644
--- a/linden/indra/llui/llbutton.cpp
+++ b/linden/indra/llui/llbutton.cpp
@@ -34,7 +34,7 @@
34 34
35#include "llbutton.h" 35#include "llbutton.h"
36 36
37// Linden library includes 37// viewer library includes
38#include "v4color.h" 38#include "v4color.h"
39#include "llstring.h" 39#include "llstring.h"
40 40
diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp
index f3ef83e..2546c4e 100644
--- a/linden/indra/llui/llcombobox.cpp
+++ b/linden/indra/llui/llcombobox.cpp
@@ -1338,3 +1338,8 @@ void LLFlyoutButton::setToggleState(BOOL state)
1338 mToggleState = state; 1338 mToggleState = state;
1339} 1339}
1340 1340
1341void LLFlyoutButton::setLabel(const LLStringExplicit& name)
1342{
1343 mActionButton->setLabel(name);
1344}
1345
diff --git a/linden/indra/llui/llcombobox.h b/linden/indra/llui/llcombobox.h
index f92fe44..7384b87 100644
--- a/linden/indra/llui/llcombobox.h
+++ b/linden/indra/llui/llcombobox.h
@@ -225,6 +225,8 @@ public:
225 static void onActionButtonClick(void *userdata); 225 static void onActionButtonClick(void *userdata);
226 static void onSelectAction(LLUICtrl* ctrl, void *userdata); 226 static void onSelectAction(LLUICtrl* ctrl, void *userdata);
227 227
228 void setLabel(const LLStringExplicit& name);
229
228protected: 230protected:
229 LLButton* mActionButton; 231 LLButton* mActionButton;
230 LLPointer<LLUIImage> mActionButtonImage; 232 LLPointer<LLUIImage> mActionButtonImage;
diff --git a/linden/indra/llui/lliconctrl.cpp b/linden/indra/llui/lliconctrl.cpp
index 0df960e..9b01060 100644
--- a/linden/indra/llui/lliconctrl.cpp
+++ b/linden/indra/llui/lliconctrl.cpp
@@ -34,7 +34,7 @@
34 34
35#include "lliconctrl.h" 35#include "lliconctrl.h"
36 36
37// Linden library includes 37// viewer library includes
38 38
39// Project includes 39// Project includes
40#include "llcontrol.h" 40#include "llcontrol.h"
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp
index c8ca5bf..8612427 100644
--- a/linden/indra/llui/lltexteditor.cpp
+++ b/linden/indra/llui/lltexteditor.cpp
@@ -4250,10 +4250,10 @@ void LLTextEditor::appendColoredText(const std::string &new_text,
4250 const std::string& font_name) 4250 const std::string& font_name)
4251{ 4251{
4252 LLColor4 lcolor=color; 4252 LLColor4 lcolor=color;
4253 // If LindenUserDir is empty then we didn't login yet. 4253 // If ViewerUserDir is empty then we didn't login yet.
4254 // In that case we can't instantiate LLTextParser, which 4254 // In that case we can't instantiate LLTextParser, which
4255 // is initialized per user. 4255 // is initialized per user.
4256 if (mParseHighlights && !gDirUtilp->getLindenUserDir(true).empty()) 4256 if (mParseHighlights && !gDirUtilp->getViewerUserDir(true).empty())
4257 { 4257 {
4258 LLTextParser* highlight = LLTextParser::getInstance(); 4258 LLTextParser* highlight = LLTextParser::getInstance();
4259 highlight->parseFullLineHighlights(new_text, &lcolor); 4259 highlight->parseFullLineHighlights(new_text, &lcolor);
@@ -4333,10 +4333,10 @@ void LLTextEditor::appendHighlightedText(const std::string &new_text,
4333 S32 highlight_part, 4333 S32 highlight_part,
4334 LLStyleSP stylep) 4334 LLStyleSP stylep)
4335{ 4335{
4336 // If LindenUserDir is empty then we didn't login yet. 4336 // If ViewerUserDir is empty then we didn't login yet.
4337 // In that case we can't instantiate LLTextParser, which 4337 // In that case we can't instantiate LLTextParser, which
4338 // is initialized per user. 4338 // is initialized per user.
4339 if (mParseHighlights && !gDirUtilp->getLindenUserDir(true).empty()) 4339 if (mParseHighlights && !gDirUtilp->getViewerUserDir(true).empty())
4340 { 4340 {
4341 LLTextParser* highlight = LLTextParser::getInstance(); 4341 LLTextParser* highlight = LLTextParser::getInstance();
4342 4342
@@ -4804,20 +4804,20 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length )
4804 instream.getline(tbuf, MAX_STRING); 4804 instream.getline(tbuf, MAX_STRING);
4805 if( 1 != sscanf(tbuf, "Linden text version %d", &version) ) 4805 if( 1 != sscanf(tbuf, "Linden text version %d", &version) )
4806 { 4806 {
4807 llwarns << "Invalid Linden text file header " << llendl; 4807 llwarns << "Invalid Notecard text file header " << llendl;
4808 return FALSE; 4808 return FALSE;
4809 } 4809 }
4810 4810
4811 if( 1 != version ) 4811 if( 1 != version )
4812 { 4812 {
4813 llwarns << "Invalid Linden text file version: " << version << llendl; 4813 llwarns << "Invalid Notecard text file version: " << version << llendl;
4814 return FALSE; 4814 return FALSE;
4815 } 4815 }
4816 4816
4817 instream.getline(tbuf, MAX_STRING); 4817 instream.getline(tbuf, MAX_STRING);
4818 if( 0 != sscanf(tbuf, "{") ) 4818 if( 0 != sscanf(tbuf, "{") )
4819 { 4819 {
4820 llwarns << "Invalid Linden text file format" << llendl; 4820 llwarns << "Invalid Notecard text file format" << llendl;
4821 return FALSE; 4821 return FALSE;
4822 } 4822 }
4823 4823
@@ -4825,13 +4825,13 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length )
4825 instream.getline(tbuf, MAX_STRING); 4825 instream.getline(tbuf, MAX_STRING);
4826 if( 1 != sscanf(tbuf, "Text length %d", &text_len) ) 4826 if( 1 != sscanf(tbuf, "Text length %d", &text_len) )
4827 { 4827 {
4828 llwarns << "Invalid Linden text length field" << llendl; 4828 llwarns << "Invalid Notecard text length field" << llendl;
4829 return FALSE; 4829 return FALSE;
4830 } 4830 }
4831 4831
4832 if( text_len > mMaxTextByteLength ) 4832 if( text_len > mMaxTextByteLength )
4833 { 4833 {
4834 llwarns << "Invalid Linden text length: " << text_len << llendl; 4834 llwarns << "Invalid Notecard text length: " << text_len << llendl;
4835 return FALSE; 4835 return FALSE;
4836 } 4836 }
4837 4837
@@ -4854,7 +4854,7 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length )
4854 instream.getline(tbuf, MAX_STRING); 4854 instream.getline(tbuf, MAX_STRING);
4855 if( success && (0 != sscanf(tbuf, "}")) ) 4855 if( success && (0 != sscanf(tbuf, "}")) )
4856 { 4856 {
4857 llwarns << "Invalid Linden text file format: missing terminal }" << llendl; 4857 llwarns << "Invalid Notecard text file format: missing terminal }" << llendl;
4858 success = FALSE; 4858 success = FALSE;
4859 } 4859 }
4860 4860
@@ -5119,7 +5119,7 @@ S32 LLTextEditor::findHTMLToken(const std::string &line, S32 pos, BOOL reverse)
5119BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end, std::string& url) const 5119BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end, std::string& url) const
5120{ 5120{
5121 5121
5122 S32 m1,m2,m3,m4; 5122 S32 m1,m2,m3;
5123 BOOL matched = FALSE; 5123 BOOL matched = FALSE;
5124 5124
5125 m1=line.find("://",*end); 5125 m1=line.find("://",*end);
@@ -5132,11 +5132,10 @@ BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end, std::
5132 //Load_url only handles http and https so don't hilite ftp, smb, etc. 5132 //Load_url only handles http and https so don't hilite ftp, smb, etc.
5133 m2 = line.substr(*begin,(m1 - *begin)).find("http"); 5133 m2 = line.substr(*begin,(m1 - *begin)).find("http");
5134 m3 = line.substr(*begin,(m1 - *begin)).find("secondlife"); 5134 m3 = line.substr(*begin,(m1 - *begin)).find("secondlife");
5135 m4 = line.substr(*begin,(m1 - *begin)).find("inworldz");
5136 5135
5137 std::string badneighbors=".,<>?';\"][}{=-+_)(*&^%$#@!~`\t\r\n\\"; 5136 std::string badneighbors=".,<>?';\"][}{=-+_)(*&^%$#@!~`\t\r\n\\";
5138 5137
5139 if (m2 >= 0 || m3>=0 || m4>=0) 5138 if (m2 >= 0 || m3>=0)
5140 { 5139 {
5141 S32 bn = badneighbors.find(line.substr(m1+3,1)); 5140 S32 bn = badneighbors.find(line.substr(m1+3,1));
5142 5141
@@ -5180,28 +5179,9 @@ BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end, std::
5180 try 5179 try
5181 { 5180 {
5182 url = line.substr(*begin,*end - *begin); 5181 url = line.substr(*begin,*end - *begin);
5183 5182 std::string slurlID = "slurl.com/secondlife/";
5184 // see if it's an izurl
5185 std::string slurlID = "places.inworldz.com/";
5186 strpos = url.find(slurlID); 5183 strpos = url.find(slurlID);
5187 if (strpos < 0) 5184
5188 {
5189 slurlID="inworldz://";
5190 strpos = url.find(slurlID);
5191 }
5192 if (strpos < 0)
5193 {
5194 slurlID="iz://";
5195 strpos = url.find(slurlID);
5196 }
5197
5198 // see if it's an slurl
5199 if (strpos < 0)
5200 {
5201 slurlID = "slurl.com/secondlife/";
5202 strpos = url.find(slurlID);
5203 }
5204
5205 if (strpos < 0) 5185 if (strpos < 0)
5206 { 5186 {
5207 slurlID="maps.secondlife.com/secondlife/"; 5187 slurlID="maps.secondlife.com/secondlife/";
diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp
index 75a4467..dfef4bc 100644
--- a/linden/indra/llui/llui.cpp
+++ b/linden/indra/llui/llui.cpp
@@ -37,7 +37,7 @@
37#include <string> 37#include <string>
38#include <map> 38#include <map>
39 39
40// Linden library includes 40// viewer library includes
41#include "v2math.h" 41#include "v2math.h"
42#include "v4color.h" 42#include "v4color.h"
43#include "llrender.h" 43#include "llrender.h"
diff --git a/linden/indra/llui/lluistring.h b/linden/indra/llui/lluistring.h
index aedeca2..adc2e08 100644
--- a/linden/indra/llui/lluistring.h
+++ b/linden/indra/llui/lluistring.h
@@ -45,14 +45,14 @@
45// the correct result 45// the correct result
46 46
47// Example Usage: 47// Example Usage:
48// LLUIString mMessage("Welcome [USERNAME] to [SECONDLIFE]!"); 48// LLUIString mMessage("Welcome [USERNAME] to [GRIDNAME]!");
49// mMessage.setArg("[USERNAME]", "Steve"); 49// mMessage.setArg("[USERNAME]", "Steve");
50// mMessage.setArg("[SECONDLIFE]", "Second Life"); 50// mMessage.setArg("[GRIDNAME]", "This Grid");
51// llinfos << mMessage.getString() << llendl; // outputs "Welcome Steve to Second Life" 51// llinfos << mMessage.getString() << llendl; // outputs "Welcome Steve to This Grid"
52// mMessage.setArg("[USERNAME]", "Joe"); 52// mMessage.setArg("[USERNAME]", "Joe");
53// llinfos << mMessage.getString() << llendl; // outputs "Welcome Joe to Second Life" 53// llinfos << mMessage.getString() << llendl; // outputs "Welcome Joe to This Grid"
54// mMessage = "Recepci￳n a la [SECONDLIFE] [USERNAME]" 54// mMessage = "Recepci￳n a la [GRIDNAME] [USERNAME]"
55// mMessage.setArg("[SECONDLIFE]", "Segunda Vida"); 55// mMessage.setArg("[GRIDNAME]", "Segunda Vida");
56// llinfos << mMessage.getString() << llendl; // outputs "Recepci￳n a la Segunda Vida Joe" 56// llinfos << mMessage.getString() << llendl; // outputs "Recepci￳n a la Segunda Vida Joe"
57 57
58// Implementation Notes: 58// Implementation Notes: