summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-02-10 15:26:04 +0200
committerMike Antipov <mantipov@productengine.com>2010-02-10 15:26:04 +0200
commit2d1c1cbf3afed9b7a54de86f61a1a2d2ac3beba1 (patch)
tree97275b832beb3a0bc149a0728cb9e244e5a2f956 /indra
parentefee637e3bf1a13591d83e6cbf52acc483a6e61a (diff)
parent5831cb1394338cdfc45e3188a034edb54c2b785f (diff)
Merge
--HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lltexteditor.cpp2
-rw-r--r--indra/llui/lltexteditor.h2
-rw-r--r--indra/llui/lluicolortable.cpp29
-rw-r--r--indra/llui/lluicolortable.h9
-rw-r--r--indra/newview/llavataractions.cpp7
-rw-r--r--indra/newview/llcallingcard.cpp10
-rw-r--r--indra/newview/llchathistory.cpp7
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp5
-rw-r--r--indra/newview/llpanelgroup.cpp35
-rw-r--r--indra/newview/llpanelgroup.h3
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp8
-rw-r--r--indra/newview/skins/default/textures/icons/object_icon.pngbin0 -> 410 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml1
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_general.xml75
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml64
16 files changed, 148 insertions, 113 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index ad9f066539..ce5f1bd082 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -737,7 +737,7 @@ BOOL LLTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
}
if (!LLTextBase::handleRightMouseDown(x, y, mask))
{
- if(getChowContextMenu())
+ if(getShowContextMenu())
{
showContextMenu(x, y);
}
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 00c6a8b68a..71d937b2c4 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -204,7 +204,7 @@ public:
void getSelectedSegments(segment_vec_t& segments) const;
void setShowContextMenu(bool show) { mShowContextMenu = show; }
- bool getChowContextMenu() const { return mShowContextMenu; }
+ bool getShowContextMenu() const { return mShowContextMenu; }
protected:
void showContextMenu(S32 x, S32 y);
diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp
index 9be33483d0..1b64ef3abe 100644
--- a/indra/llui/lluicolortable.cpp
+++ b/indra/llui/lluicolortable.cpp
@@ -56,7 +56,7 @@ LLUIColorTable::Params::Params()
{
}
-void LLUIColorTable::insertFromParams(const Params& p)
+void LLUIColorTable::insertFromParams(const Params& p, string_color_map_t& table)
{
// this map will contain all color references after the following loop
typedef std::map<std::string, std::string> string_string_map_t;
@@ -69,14 +69,7 @@ void LLUIColorTable::insertFromParams(const Params& p)
ColorEntryParams color_entry = *it;
if(color_entry.color.value.isChosen())
{
- if(mUserSetColors.find(color_entry.name)!=mUserSetColors.end())
- {
- setColor(color_entry.name, color_entry.color.value);
- }
- else
- {
- setColor(color_entry.name, color_entry.color.value, mLoadedColors);
- }
+ setColor(color_entry.name, color_entry.color.value, table);
}
else
{
@@ -220,16 +213,16 @@ bool LLUIColorTable::loadFromSettings()
bool result = false;
std::string default_filename = gDirUtilp->getExpandedFilename(LL_PATH_DEFAULT_SKIN, "colors.xml");
- result |= loadFromFilename(default_filename);
+ result |= loadFromFilename(default_filename, mLoadedColors);
std::string current_filename = gDirUtilp->getExpandedFilename(LL_PATH_TOP_SKIN, "colors.xml");
if(current_filename != default_filename)
{
- result |= loadFromFilename(current_filename);
+ result |= loadFromFilename(current_filename, mLoadedColors);
}
std::string user_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "colors.xml");
- loadFromFilename(user_filename);
+ loadFromFilename(user_filename, mUserSetColors);
return result;
}
@@ -299,7 +292,7 @@ void LLUIColorTable::setColor(const std::string& name, const LLColor4& color, st
}
}
-bool LLUIColorTable::loadFromFilename(const std::string& filename)
+bool LLUIColorTable::loadFromFilename(const std::string& filename, string_color_map_t& table)
{
LLXMLNodePtr root;
@@ -320,7 +313,7 @@ bool LLUIColorTable::loadFromFilename(const std::string& filename)
if(params.validateBlock())
{
- insertFromParams(params);
+ insertFromParams(params, table);
}
else
{
@@ -330,3 +323,11 @@ bool LLUIColorTable::loadFromFilename(const std::string& filename)
return true;
}
+
+void LLUIColorTable::insertFromParams(const Params& p)
+{
+ insertFromParams(p, mUserSetColors);
+}
+
+// EOF
+
diff --git a/indra/llui/lluicolortable.h b/indra/llui/lluicolortable.h
index c87695f456..d401e5e724 100644
--- a/indra/llui/lluicolortable.h
+++ b/indra/llui/lluicolortable.h
@@ -45,6 +45,10 @@ class LLUIColor;
class LLUIColorTable : public LLSingleton<LLUIColorTable>
{
LOG_CLASS(LLUIColorTable);
+
+ // consider using sorted vector, can be much faster
+ typedef std::map<std::string, LLUIColor> string_color_map_t;
+
public:
struct ColorParams : LLInitParam::Choice<ColorParams>
{
@@ -91,10 +95,9 @@ public:
void saveUserSettings() const;
private:
- bool loadFromFilename(const std::string& filename);
+ bool loadFromFilename(const std::string& filename, string_color_map_t& table);
- // consider using sorted vector, can be much faster
- typedef std::map<std::string, LLUIColor> string_color_map_t;
+ void insertFromParams(const Params& p, string_color_map_t& table);
void clearTable(string_color_map_t& table);
void setColor(const std::string& name, const LLColor4& color, string_color_map_t& table);
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index bd987eac77..1d75374930 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -181,7 +181,12 @@ void LLAvatarActions::startIM(const LLUUID& id)
return;
std::string name;
- gCacheName->getFullName(id, name);
+ if (!gCacheName->getFullName(id, name))
+ {
+ gCacheName->get(id, FALSE, boost::bind(&LLAvatarActions::startIM, id));
+ return;
+ }
+
LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id);
if (session_id != LLUUID::null)
{
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index d988770f90..996139fccc 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -56,6 +56,7 @@
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llresmgr.h"
+#include "llslurl.h"
#include "llimview.h"
#include "llviewercontrol.h"
#include "llviewernetwork.h"
@@ -689,13 +690,8 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
setBuddyOnline(agent_id,online);
if(chat_notify)
{
- std::string first, last;
- if(gCacheName->getName(agent_id, first, last))
- {
- notify = TRUE;
- args["FIRST"] = first;
- args["LAST"] = last;
- }
+ notify = TRUE;
+ args["NAME_SLURL"] = LLSLURL::buildCommand("agent", agent_id, "about");
}
}
else
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index c125f84c58..13a5df353d 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -289,7 +289,12 @@ public:
if(!chat.mFromID.isNull())
{
- icon->setValue(chat.mFromID);
+ if(mSourceType != CHAT_SOURCE_AGENT)
+ icon->setValue(LLSD("OBJECT_Icon"));
+ else
+ icon->setValue(chat.mFromID);
+
+
}
else if (userName->getValue().asString()==LLTrans::getString("SECOND_LIFE"))
{
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index f772aea4bd..e164aa8fc4 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -321,7 +321,10 @@ void LLNearbyChatToastPanel::draw()
if(icon)
{
icon->setDrawTooltip(mSourceType == CHAT_SOURCE_AGENT);
- icon->setValue(mFromID);
+ if(mSourceType == CHAT_SOURCE_AGENT)
+ icon->setValue(mFromID);
+ else
+ icon->setValue(LLSD("OBJECT_Icon"));
}
mIsDirty = false;
}
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 469f1c1739..ce4078409a 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -90,6 +90,7 @@ LLPanelGroup::LLPanelGroup()
: LLPanel(),
LLGroupMgrObserver( LLUUID() ),
mSkipRefresh(FALSE),
+ mButtonJoin(NULL),
mShowingNotifyDialog(false)
{
// Set up the factory callbacks.
@@ -159,10 +160,6 @@ BOOL LLPanelGroup::postBuild()
button = getChild<LLButton>("btn_chat");
button->setClickedCallback(onBtnGroupChatClicked, this);
- button = getChild<LLButton>("btn_join");
- button->setVisible(false);
- button->setEnabled(true);
-
button = getChild<LLButton>("btn_cancel");
button->setVisible(false); button->setEnabled(true);
@@ -174,7 +171,7 @@ BOOL LLPanelGroup::postBuild()
childSetCommitCallback("back",boost::bind(&LLPanelGroup::onBackBtnClick,this),NULL);
childSetCommitCallback("btn_create",boost::bind(&LLPanelGroup::onBtnCreate,this),NULL);
- childSetCommitCallback("btn_join",boost::bind(&LLPanelGroup::onBtnJoin,this),NULL);
+
childSetCommitCallback("btn_cancel",boost::bind(&LLPanelGroup::onBtnCancel,this),NULL);
LLPanelGroupTab* panel_general = findChild<LLPanelGroupTab>("group_general_tab_panel");
@@ -188,7 +185,17 @@ BOOL LLPanelGroup::postBuild()
if(panel_land) mTabs.push_back(panel_land);
if(panel_general)
+ {
panel_general->setupCtrls(this);
+ button = panel_general->getChild<LLButton>("btn_join");
+ button->setVisible(false);
+ button->setEnabled(true);
+
+ mButtonJoin = button;
+ mButtonJoin->setCommitCallback(boost::bind(&LLPanelGroup::onBtnJoin,this));
+
+ mJoinText = panel_general->getChild<LLUICtrl>("join_cost_text");
+ }
gVoiceClient->addObserver(this);
@@ -326,16 +333,13 @@ void LLPanelGroup::update(LLGroupChange gc)
{
childSetValue("group_name", gdatap->mName);
childSetToolTip("group_name",gdatap->mName);
-
- LLButton* btn_join = getChild<LLButton>("btn_join");
- LLUICtrl* join_text = getChild<LLUICtrl>("join_cost_text");
-
+
LLGroupData agent_gdatap;
bool is_member = gAgent.getGroupData(mID,agent_gdatap);
bool join_btn_visible = !is_member && gdatap->mOpenEnrollment;
- btn_join->setVisible(join_btn_visible);
- join_text->setVisible(join_btn_visible);
+ mButtonJoin->setVisible(join_btn_visible);
+ mJoinText->setVisible(join_btn_visible);
if(join_btn_visible)
{
@@ -351,7 +355,7 @@ void LLPanelGroup::update(LLGroupChange gc)
{
fee_buff = getString("group_join_free", string_args);
}
- childSetValue("join_cost_text",fee_buff);
+ mJoinText->setValue(fee_buff);
}
}
}
@@ -380,7 +384,7 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
LLButton* button_apply = findChild<LLButton>("btn_apply");
LLButton* button_refresh = findChild<LLButton>("btn_refresh");
LLButton* button_create = findChild<LLButton>("btn_create");
- LLButton* button_join = findChild<LLButton>("btn_join");
+
LLButton* button_cancel = findChild<LLButton>("btn_cancel");
LLButton* button_call = findChild<LLButton>("btn_call");
LLButton* button_chat = findChild<LLButton>("btn_chat");
@@ -417,8 +421,8 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
if(!tab_general || !tab_roles || !tab_notices || !tab_land)
return;
- if(button_join)
- button_join->setVisible(false);
+ if(mButtonJoin)
+ mButtonJoin->setVisible(false);
if(is_null_group_id)//creating new group
@@ -478,6 +482,7 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
}
reposButtons();
+ update(GC_ALL);//show/hide "join" button if data is already ready
}
bool LLPanelGroup::apply(LLPanelGroupTab* tab)
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index 6e23eedffb..136868a60d 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -130,6 +130,9 @@ protected:
std::vector<LLPanelGroupTab* > mTabs;
+ LLButton* mButtonJoin;
+ LLUICtrl* mJoinText;
+
};
class LLPanelGroupTab : public LLPanel
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 3b303eed0f..555e277ce5 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -206,15 +206,19 @@ BOOL LLPanelGroupGeneral::postBuild()
void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group)
{
- mInsignia = panel_group->getChild<LLTextureCtrl>("insignia");
+ mInsignia = getChild<LLTextureCtrl>("insignia");
if (mInsignia)
{
mInsignia->setCommitCallback(onCommitAny, this);
mDefaultIconID = mInsignia->getImageAssetID();
}
- mFounderName = panel_group->getChild<LLNameBox>("founder_name");
+ mFounderName = getChild<LLNameBox>("founder_name");
+
+
mGroupNameEditor = panel_group->getChild<LLLineEditor>("group_name_editor");
mGroupNameEditor->setPrevalidate( LLTextValidate::validateASCII );
+
+
}
// static
diff --git a/indra/newview/skins/default/textures/icons/object_icon.png b/indra/newview/skins/default/textures/icons/object_icon.png
new file mode 100644
index 0000000000..223874e631
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/object_icon.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 309c2a5f30..18d1779702 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -515,6 +515,7 @@ with the same filename but different name
<texture name="SliderThumb_Press" file_name="widgets/SliderThumb_Press.png" />
<texture name="SL_Logo" file_name="icons/SL_Logo.png" preload="true" />
+ <texture name="OBJECT_Icon" file_name="icons/object_icon.png" preload="true" />
<texture name="Snapshot_Off" file_name="bottomtray/Snapshot_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
<texture name="Snapshot_Over" file_name="bottomtray/Snapshot_Over.png" preload="false" />
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 90381c2af4..51f0f6839c 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4307,14 +4307,14 @@ Topic: [SUBJECT], Message: [MESSAGE]
icon="notifytip.tga"
name="FriendOnline"
type="notifytip">
-[FIRST] [LAST] is Online
+[NAME_SLURL] is Online
</notification>
<notification
icon="notifytip.tga"
name="FriendOffline"
type="notifytip">
-[FIRST] [LAST] is Offline
+[NAME_SLURL] is Offline
</notification>
<notification
diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml
index 618167181f..662fd1ae73 100644
--- a/indra/newview/skins/default/xui/en/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_general.xml
@@ -20,15 +20,84 @@ Hover your mouse over the options for more help.
name="incomplete_member_data_str">
Retrieving member data
</panel.string>
+ <panel
+ name="group_info_top"
+ follows="top|left"
+ top="0"
+ left="0"
+ height="129"
+ width="313"
+ layout="topleft">
+ <texture_picker
+ follows="left|top"
+ height="110"
+ label=""
+ layout="topleft"
+ left="10"
+ name="insignia"
+ no_commit_on_selection="true"
+ tool_tip="Click to choose a picture"
+ top="5"
+ width="100" />
+ <text
+ font="SansSerifSmall"
+ text_color="White_50"
+ width="190"
+ follows="top|left"
+ layout="topleft"
+ mouse_opaque="false"
+ type="string"
+ height="16"
+ length="1"
+ left_pad="10"
+ name="prepend_founded_by"
+ top_delta="0">
+ Founder:
+ </text>
+ <name_box
+ follows="left|top"
+ height="16"
+ initial_value="(retrieving)"
+ layout="topleft"
+ left_delta="0"
+ link="true"
+ name="founder_name"
+ top_pad="2"
+ use_ellipses="true"
+ width="190" />
+ <text
+ font="SansSerifMedium"
+ text_color="EmphasisColor"
+ type="string"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left_delta="0"
+ name="join_cost_text"
+ top_pad="10"
+ visible="true"
+ width="190">
+ Free
+ </text>
+ <button
+ follows="left|top"
+ left_delta="0"
+ top_pad="6"
+ height="23"
+ label="JOIN NOW!"
+ name="btn_join"
+ visible="true"
+ width="120" />
+ </panel>
<text_editor
type="string"
follows="left|top|right"
left="5"
- height="150"
+ height="80"
layout="topleft"
max_length="511"
name="charter"
- top="5"
+ top="105"
right="-1"
bg_readonly_color="DkGray2"
text_readonly_color="White"
@@ -40,7 +109,7 @@ Hover your mouse over the options for more help.
draw_heading="true"
follows="left|top|right"
heading_height="23"
- height="200"
+ height="160"
layout="topleft"
left="0"
name="visible_members"
diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
index 9727c54c6b..375de64923 100644
--- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
@@ -31,7 +31,7 @@ background_visible="true"
follows="top|left"
top="0"
left="0"
- height="129"
+ height="29"
width="313"
layout="topleft">
<button
@@ -70,66 +70,6 @@ background_visible="true"
width="270"
height="20"
visible="false" />
- <texture_picker
- follows="left|top"
- height="113"
- label=""
- layout="topleft"
- left="10"
- name="insignia"
- no_commit_on_selection="true"
- tool_tip="Click to choose a picture"
- top_pad="5"
- width="100" />
- <text
- font="SansSerifSmall"
- text_color="White_50"
- width="190"
- follows="top|left"
- layout="topleft"
- mouse_opaque="false"
- type="string"
- height="16"
- length="1"
- left_pad="10"
- name="prepend_founded_by"
- top_delta="0">
- Founder:
- </text>
- <name_box
- follows="left|top"
- height="16"
- initial_value="(retrieving)"
- layout="topleft"
- left_delta="0"
- link="true"
- name="founder_name"
- top_pad="2"
- use_ellipses="true"
- width="190" />
- <text
- font="SansSerifMedium"
- text_color="EmphasisColor"
- type="string"
- follows="left|top"
- height="16"
- layout="topleft"
- left_delta="0"
- name="join_cost_text"
- top_pad="10"
- visible="true"
- width="190">
- Free
- </text>
- <button
- follows="left|top"
- left_delta="0"
- top_pad="6"
- height="23"
- label="JOIN NOW!"
- name="btn_join"
- visible="true"
- width="120" />
</panel>
<layout_stack
name="layout"
@@ -137,7 +77,7 @@ background_visible="true"
follows="all"
left="0"
top_pad="0"
- height="437"
+ height="537"
width="313"
border_size="0">
<layout_panel