summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorcoyot@coyot-sager-PC.hsd1.ca.comcast.net <coyot@coyot-sager-PC.hsd1.ca.comcast.net>2017-05-05 18:07:00 +0100
committercoyot@coyot-sager-PC.hsd1.ca.comcast.net <coyot@coyot-sager-PC.hsd1.ca.comcast.net>2017-05-05 18:07:00 +0100
commita1194ce6e9faaa259821611b51d4448fea49ddc1 (patch)
tree4d1c63b64ae44a2a1855d0e10f595495971a044d /indra/llui
parentc15ffb40458184002ade41ff652fab3d9ffbb761 (diff)
parent322767f98e3c3164e3be03daa85580038ca6fb52 (diff)
pull from gate
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lleditmenuhandler.h3
-rw-r--r--indra/llui/llmenugl.cpp6
-rw-r--r--indra/llui/llscrolllistctrl.cpp7
-rw-r--r--indra/llui/llscrolllistctrl.h1
-rw-r--r--indra/llui/lltextbase.cpp2
-rw-r--r--indra/llui/lltexteditor.cpp4
6 files changed, 19 insertions, 4 deletions
diff --git a/indra/llui/lleditmenuhandler.h b/indra/llui/lleditmenuhandler.h
index 0932f094ef..cd4fea8c52 100644
--- a/indra/llui/lleditmenuhandler.h
+++ b/indra/llui/lleditmenuhandler.h
@@ -58,9 +58,6 @@ public:
virtual void deselect() {};
virtual BOOL canDeselect() const { return FALSE; }
-
- virtual void duplicate() {};
- virtual BOOL canDuplicate() const { return FALSE; }
// TODO: Instead of being a public data member, it would be better to hide it altogether
// and have a "set" method and then a bunch of static versions of the cut, copy, paste
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 8425774d46..022f814bbc 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -3342,6 +3342,12 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask)
return TRUE;
}
+ if (result && !getHighlightedItem() && LLMenuGL::sMenuContainer->hasVisibleMenu())
+ {
+ // close menus originating from other menu bars
+ LLMenuGL::sMenuContainer->hideMenus();
+ }
+
return result;
}
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index db8fdc46b7..0afa8d43f1 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1808,6 +1808,7 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
registrar.add("Url.ShowProfile", boost::bind(&LLScrollListCtrl::showProfile, id, is_group));
registrar.add("Url.SendIM", boost::bind(&LLScrollListCtrl::sendIM, id));
registrar.add("Url.AddFriend", boost::bind(&LLScrollListCtrl::addFriend, id));
+ registrar.add("Url.RemoveFriend", boost::bind(&LLScrollListCtrl::removeFriend, id));
registrar.add("Url.Execute", boost::bind(&LLScrollListCtrl::showNameDetails, id, is_group));
registrar.add("Url.CopyLabel", boost::bind(&LLScrollListCtrl::copyNameToClipboard, id, is_group));
registrar.add("Url.CopyUrl", boost::bind(&LLScrollListCtrl::copySLURLToClipboard, id, is_group));
@@ -1852,6 +1853,12 @@ void LLScrollListCtrl::addFriend(std::string id)
LLUrlAction::addFriend(slurl);
}
+void LLScrollListCtrl::removeFriend(std::string id)
+{
+ std::string slurl = "secondlife:///app/agent/" + id + "/about";
+ LLUrlAction::removeFriend(slurl);
+}
+
void LLScrollListCtrl::showNameDetails(std::string id, bool is_group)
{
// open the resident's details or the group details
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 6325a79cd5..8343750a54 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -432,6 +432,7 @@ private:
static void showProfile(std::string id, bool is_group);
static void sendIM(std::string id);
static void addFriend(std::string id);
+ static void removeFriend(std::string id);
static void showNameDetails(std::string id, bool is_group);
static void copyNameToClipboard(std::string id, bool is_group);
static void copySLURLToClipboard(std::string id, bool is_group);
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 88a5c3a587..f3a99dcef2 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1522,7 +1522,7 @@ void LLTextBase::reflow()
}
S32 line_height = 0;
- S32 seg_line_offset = line_count;
+ S32 seg_line_offset = line_count + 1;
while(seg_iter != mSegments.end())
{
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 73f961b36b..1a49b94c23 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -1459,6 +1459,10 @@ void LLTextEditor::pasteHelper(bool is_primary)
// Clean up string (replace tabs and remove characters that our fonts don't support).
void LLTextEditor::cleanStringForPaste(LLWString & clean_string)
{
+ std::string clean_string_utf = wstring_to_utf8str(clean_string);
+ std::replace( clean_string_utf.begin(), clean_string_utf.end(), '\r', '\n');
+ clean_string = utf8str_to_wstring(clean_string_utf);
+
LLWStringUtil::replaceTabsWithSpaces(clean_string, SPACES_PER_TAB);
if( mAllowEmbeddedItems )
{