summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llchathistory.cpp18
-rw-r--r--indra/newview/llgroupactions.cpp4
-rw-r--r--indra/newview/llnamebox.cpp24
-rw-r--r--indra/newview/llnamebox.h5
-rw-r--r--indra/newview/llpanelgrouproles.cpp61
-rw-r--r--indra/newview/llpanelgrouproles.h13
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_roles.xml55
-rw-r--r--indra/newview/skins/default/xui/en/panel_my_profile.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile.xml1
9 files changed, 122 insertions, 60 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 4f2dbe9fb1..9a1572364f 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -503,11 +503,20 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
//whether to show colon after a name in header copy/past and in plain text mode
bool show_colon = chat.mChatType != CHAT_TYPE_SHOUT && chat.mChatType != CHAT_TYPE_WHISPER;
+ //IRC styled /me messages.
+ bool irc_me = false;
+
+ std::string prefix = chat.mText.substr(0, 4);
+ if (prefix == "/me " || prefix == "/me'")
+ {
+ irc_me = true;
+ }
+
if (use_plain_text_chat_history)
{
mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, style_params);
- if (utf8str_trim(chat.mFromName).size() != 0)
+ if (utf8str_trim(chat.mFromName).size() != 0 && !irc_me)
{
// Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text.
if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() )
@@ -572,14 +581,13 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
mLastFromID = chat.mFromID;
mLastMessageTime = new_message_time;
}
- //Handle IRC styled /me messages.
- std::string prefix = chat.mText.substr(0, 4);
- if (prefix == "/me " || prefix == "/me'")
+
+ if (irc_me)
{
style_params.font.style = "ITALIC";
if (chat.mFromName.size() > 0)
- mEditor->appendText(chat.mFromName, TRUE, style_params);
+ mEditor->appendText(chat.mFromName, FALSE, style_params);
// Ensure that message ends with NewLine, to avoid losing of new lines
// while copy/paste from text chat. See EXT-3263.
mEditor->appendText(chat.mText.substr(3) + NEW_LINE, FALSE, style_params);
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index a78a0a43b4..d6e2bb0445 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -232,7 +232,9 @@ void LLGroupActions::activate(const LLUUID& group_id)
static bool isGroupUIVisible()
{
- LLPanel* panel = LLSideTray::getInstance()->findChild<LLPanel>("panel_group_info_sidetray");
+ static LLPanel* panel = 0;
+ if(!panel)
+ panel = LLSideTray::getInstance()->findChild<LLPanel>("panel_group_info_sidetray");
if(!panel)
return false;
return panel->isInVisibleChain();
diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp
index 2f4a266198..d434017804 100644
--- a/indra/newview/llnamebox.cpp
+++ b/indra/newview/llnamebox.cpp
@@ -52,6 +52,7 @@ LLNameBox::LLNameBox(const Params& p)
: LLTextBox(p)
{
mNameID = LLUUID::null;
+ mLink = p.link;
LLNameBox::sInstances.insert(this);
setText(LLStringUtil::null);
}
@@ -76,7 +77,7 @@ void LLNameBox::setNameID(const LLUUID& name_id, BOOL is_group)
gCacheName->getGroupName(name_id, name);
}
- setText(name);
+ setName(name, is_group);
}
void LLNameBox::refresh(const LLUUID& id, const std::string& firstname,
@@ -93,7 +94,7 @@ void LLNameBox::refresh(const LLUUID& id, const std::string& firstname,
{
name = firstname;
}
- setText(name);
+ setName(name, is_group);
}
}
@@ -109,3 +110,22 @@ void LLNameBox::refreshAll(const LLUUID& id, const std::string& firstname,
box->refresh(id, firstname, lastname, is_group);
}
}
+
+void LLNameBox::setName(const std::string& name, BOOL is_group)
+{
+ if (mLink)
+ {
+ std::string url;
+
+ if (is_group)
+ url = "[secondlife:///app/group/" + LLURI::escape(name) + "/about " + name + "]";
+ else
+ url = "[secondlife:///app/agent/" + mNameID.asString() + "/about " + name + "]";
+
+ setText(url);
+ }
+ else
+ {
+ setText(name);
+ }
+}
diff --git a/indra/newview/llnamebox.h b/indra/newview/llnamebox.h
index 3edb36883f..0109525e85 100644
--- a/indra/newview/llnamebox.h
+++ b/indra/newview/llnamebox.h
@@ -47,9 +47,11 @@ public:
struct Params : public LLInitParam::Block<Params, LLTextBox::Params>
{
Optional<bool> is_group;
+ Optional<bool> link;
Params()
: is_group("is_group", false)
+ , link("link", false)
{}
};
@@ -67,10 +69,13 @@ protected:
friend class LLUICtrlFactory;
private:
+ void setName(const std::string& name, BOOL is_group);
+
static std::set<LLNameBox*> sInstances;
private:
LLUUID mNameID;
+ BOOL mLink;
};
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 29b647415c..0e55ff3214 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -460,17 +460,8 @@ LLPanelGroupSubTab::~LLPanelGroupSubTab()
{
}
-BOOL LLPanelGroupSubTab::postBuild()
-{
- // Hook up the search widgets.
- bool recurse = true;
- mSearchEditor = getChild<LLFilterEditor>("filter_input", recurse);
-
- if (!mSearchEditor)
- return FALSE;
-
- mSearchEditor->setCommitCallback(boost::bind(&LLPanelGroupSubTab::setSearchFilter, this, _2));
-
+BOOL LLPanelGroupSubTab::postBuildSubTab(LLView* root)
+{
// Get icons for later use.
mActionIcons.clear();
@@ -488,6 +479,19 @@ BOOL LLPanelGroupSubTab::postBuild()
{
mActionIcons["partial"] = getString("power_partial_icon");
}
+ return TRUE;
+}
+
+BOOL LLPanelGroupSubTab::postBuild()
+{
+ // Hook up the search widgets.
+ bool recurse = true;
+ mSearchEditor = getChild<LLFilterEditor>("filter_input", recurse);
+
+ if (!mSearchEditor)
+ return FALSE;
+
+ mSearchEditor->setCommitCallback(boost::bind(&LLPanelGroupSubTab::setSearchFilter, this, _2));
return LLPanelGroupTab::postBuild();
}
@@ -567,7 +571,6 @@ bool LLPanelGroupSubTab::matchesActionSearchFilter(std::string action)
void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl,
U64 allowed_by_some,
U64 allowed_by_all,
- icon_map_t& icons,
LLUICtrl::commit_callback_t commit_callback,
BOOL show_all,
BOOL filter,
@@ -588,7 +591,6 @@ void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl,
allowed_by_some,
allowed_by_all,
(*ras_it),
- icons,
commit_callback,
show_all,
filter,
@@ -600,7 +602,6 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
U64 allowed_by_some,
U64 allowed_by_all,
LLRoleActionSet* action_set,
- icon_map_t& icons,
LLUICtrl::commit_callback_t commit_callback,
BOOL show_all,
BOOL filter,
@@ -614,26 +615,26 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
LLSD row;
row["columns"][0]["column"] = "icon";
- icon_map_t::iterator iter = icons.find("folder");
- if (iter != icons.end())
+ row["columns"][0]["type"] = "icon";
+
+ icon_map_t::iterator iter = mActionIcons.find("folder");
+ if (iter != mActionIcons.end())
{
- row["columns"][0]["type"] = "icon";
row["columns"][0]["value"] = (*iter).second;
}
row["columns"][1]["column"] = "action";
+ row["columns"][1]["type"] = "text";
row["columns"][1]["value"] = action_set->mActionSetData->mName;
row["columns"][1]["font"]["name"] = "SANSSERIF_SMALL";
- row["columns"][1]["font"]["style"] = "BOLD";
+
LLScrollListItem* title_row = ctrl->addElement(row, ADD_BOTTOM, action_set->mActionSetData);
- LLScrollListText* name_textp = dynamic_cast<LLScrollListText*>(title_row->getColumn(1));
+ LLScrollListText* name_textp = dynamic_cast<LLScrollListText*>(title_row->getColumn(2)); //?? I have no idea fix getColumn(1) return column spacer...
if (name_textp)
name_textp->setFontStyle(LLFontGL::BOLD);
-
-
bool category_matches_filter = (filter) ? matchesActionSearchFilter(action_set->mActionSetData->mName) : true;
std::vector<LLRoleAction*>::iterator ra_it = action_set->mActions.begin();
@@ -686,8 +687,8 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
{
if (show_full_strength)
{
- icon_map_t::iterator iter = icons.find("full");
- if (iter != icons.end())
+ icon_map_t::iterator iter = mActionIcons.find("full");
+ if (iter != mActionIcons.end())
{
row["columns"][column_index]["column"] = "checkbox";
row["columns"][column_index]["type"] = "icon";
@@ -697,8 +698,8 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
}
else
{
- icon_map_t::iterator iter = icons.find("partial");
- if (iter != icons.end())
+ icon_map_t::iterator iter = mActionIcons.find("partial");
+ if (iter != mActionIcons.end())
{
row["columns"][column_index]["column"] = "checkbox";
row["columns"][column_index]["type"] = "icon";
@@ -792,6 +793,8 @@ LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab()
BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)
{
+ LLPanelGroupSubTab::postBuildSubTab(root);
+
// Upcast parent so we can ask it for sibling controls.
LLPanelGroupRoles* parent = (LLPanelGroupRoles*) root;
@@ -888,7 +891,6 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
buildActionsList(mAllowedActionsList,
allowed_by_some,
allowed_by_all,
- mActionIcons,
NULL,
FALSE,
FALSE,
@@ -1211,7 +1213,6 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id,
buildActionsList(mAllowedActionsList,
powers_some_have,
powers_all_have,
- mActionIcons,
NULL,
FALSE,
FALSE,
@@ -1684,6 +1685,8 @@ LLPanelGroupRolesSubTab::~LLPanelGroupRolesSubTab()
BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)
{
+ LLPanelGroupSubTab::postBuildSubTab(root);
+
// Upcast parent so we can ask it for sibling controls.
LLPanelGroupRoles* parent = (LLPanelGroupRoles*) root;
@@ -1994,7 +1997,6 @@ void LLPanelGroupRolesSubTab::handleRoleSelect()
buildActionsList(mAllowedActionsList,
rd.mRolePowers,
0LL,
- mActionIcons,
boost::bind(&LLPanelGroupRolesSubTab::handleActionCheck, this, _1, false),
TRUE,
FALSE,
@@ -2381,6 +2383,8 @@ LLPanelGroupActionsSubTab::~LLPanelGroupActionsSubTab()
BOOL LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root)
{
+ LLPanelGroupSubTab::postBuildSubTab(root);
+
// Upcast parent so we can ask it for sibling controls.
LLPanelGroupRoles* parent = (LLPanelGroupRoles*) root;
@@ -2448,7 +2452,6 @@ void LLPanelGroupActionsSubTab::update(LLGroupChange gc)
buildActionsList(mActionList,
GP_ALL_POWERS,
GP_ALL_POWERS,
- mActionIcons,
NULL,
FALSE,
TRUE,
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index bb3c9096cf..2f81900e60 100644
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -108,7 +108,7 @@ public:
virtual BOOL postBuild();
// This allows sub-tabs to collect child widgets from a higher level in the view hierarchy.
- virtual BOOL postBuildSubTab(LLView* root) { return TRUE; }
+ virtual BOOL postBuildSubTab(LLView* root);
virtual void setSearchFilter( const std::string& filter );
@@ -117,10 +117,15 @@ public:
// Helper functions
bool matchesActionSearchFilter(std::string action);
+
+
+ void setFooterEnabled(BOOL enable);
+
+ virtual void setGroupID(const LLUUID& id);
+protected:
void buildActionsList(LLScrollListCtrl* ctrl,
U64 allowed_by_some,
U64 allowed_by_all,
- icon_map_t& icons,
LLUICtrl::commit_callback_t commit_callback,
BOOL show_all,
BOOL filter,
@@ -129,15 +134,11 @@ public:
U64 allowed_by_some,
U64 allowed_by_all,
LLRoleActionSet* action_set,
- icon_map_t& icons,
LLUICtrl::commit_callback_t commit_callback,
BOOL show_all,
BOOL filter,
BOOL is_owner_role);
- void setFooterEnabled(BOOL enable);
-
- virtual void setGroupID(const LLUUID& id);
protected:
LLPanel* mHeader;
LLPanel* mFooter;
diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml
index a5bab3232c..6b3fb04549 100644
--- a/indra/newview/skins/default/xui/en/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml
@@ -210,6 +210,18 @@ including the Everyone and Owner Roles.
Abilities allow Members in Roles to do specific
things in this group. There&apos;s a broad variety of Abilities.
</panel.string>
+ <panel.string
+ name="power_folder_icon">
+ Inv_FolderClosed
+ </panel.string>
+ <panel.string
+ name="power_all_have_icon">
+ Checkbox_On
+ </panel.string>
+ <panel.string
+ name="power_partial_icon">
+ Checkbox_Off
+ </panel.string>
<filter_editor
layout="topleft"
top="5"
@@ -220,23 +232,32 @@ things in this group. There&apos;s a broad variety of Abilities.
max_length="250"
label="Filter Abilities"
name="filter_input" />
- <scroll_list
- column_padding="0"
- draw_stripes="false"
- follows="left|top"
- height="200"
- layout="topleft"
- left="0"
- multi_select="true"
- name="action_list"
- search_column="1"
- tool_tip="Select an Ability to view more details"
- top_pad="5"
- width="300">
- <scroll_list.columns
- name="action"
- width="300" />
- </scroll_list>
+
+ <scroll_list
+ column_padding="0"
+ draw_stripes="true"
+ height="200"
+ follows="left|top"
+ layout="topleft"
+ left="0"
+ name="action_list"
+ search_column="2"
+ tool_tip="Select an Ability to view more details"
+ top_pad="5"
+ width="300">
+ <scroll_list.columns
+ label=""
+ name="icon"
+ width="2" />
+ <scroll_list.columns
+ label=""
+ name="checkbox"
+ width="20" />
+ <scroll_list.columns
+ label=""
+ name="action"
+ width="270" />
+ </scroll_list>
</panel>
</tab_container>
<panel
diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml
index 038d48cdd6..a9ff9362a0 100644
--- a/indra/newview/skins/default/xui/en/panel_my_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml
@@ -269,6 +269,7 @@
height="10"
layout="topleft"
left="0"
+ link="true"
name="partner_text"
top="0"
width="300"
diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml
index ec697838f6..2cd8940014 100644
--- a/indra/newview/skins/default/xui/en/panel_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile.xml
@@ -249,6 +249,7 @@
height="10"
layout="topleft"
left="0"
+ link="true"
name="partner_text"
top="0"
width="300"