summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-03 19:27:15 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-03 19:27:15 +0000
commit69a36cb5ce03d7631162117e471dc37bc8e8f4b6 (patch)
treeb7600112c0bd3dc33af759057d9b0c78bcc880b3 /indra/newview
parent78553cce481e0f05485033ff9a64d53d13893d97 (diff)
parent917841120f8932af112896344c7f25be7bc32773 (diff)
PE merge.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfavoritesbar.cpp7
-rw-r--r--indra/newview/llfavoritesbar.h3
-rw-r--r--indra/newview/llslurl.cpp12
-rw-r--r--indra/newview/llslurl.h1
-rw-r--r--indra/newview/lltoastimpanel.cpp89
-rw-r--r--indra/newview/lltoastimpanel.h3
-rw-r--r--indra/newview/llviewermessage.cpp5
-rw-r--r--indra/newview/llviewerparcelmgr.cpp8
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_currency.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_instant_message.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_navigation_bar.xml26
11 files changed, 119 insertions, 50 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index f5bb777419..a5b62439f4 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -370,7 +370,8 @@ struct LLFavoritesSort
LLFavoritesBarCtrl::Params::Params()
: image_drag_indication("image_drag_indication"),
- chevron_button("chevron_button")
+ chevron_button("chevron_button"),
+ label("label")
{
}
@@ -401,6 +402,10 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p)
chevron_button_params.click_callback.function(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this));
mChevronButton = LLUICtrlFactory::create<LLButton> (chevron_button_params);
addChild(mChevronButton);
+
+ LLTextBox::Params label_param(p.label);
+ mBarLabel = LLUICtrlFactory::create<LLTextBox> (label_param);
+ addChild(mBarLabel);
}
LLFavoritesBarCtrl::~LLFavoritesBarCtrl()
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 40dd551eef..2c6d8d1580 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -35,6 +35,7 @@
#include "llbutton.h"
#include "lluictrl.h"
+#include "lltextbox.h"
#include "llinventoryobserver.h"
#include "llinventorymodel.h"
@@ -46,6 +47,7 @@ public:
{
Optional<LLUIImage*> image_drag_indication;
Optional<LLButton::Params> chevron_button;
+ Optional<LLTextBox::Params> label;
Params();
};
@@ -139,6 +141,7 @@ private:
LLUICtrl* mLandingTab;
LLUICtrl* mLastTab;
LLButton* mChevronButton;
+ LLTextBox* mBarLabel;
LLUUID mDragItemId;
BOOL mStartDrag;
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp
index 37e268ad34..3343ee88bd 100644
--- a/indra/newview/llslurl.cpp
+++ b/indra/newview/llslurl.cpp
@@ -39,7 +39,8 @@
const std::string LLSLURL::PREFIX_SL_HELP = "secondlife://app.";
const std::string LLSLURL::PREFIX_SL = "sl://";
const std::string LLSLURL::PREFIX_SECONDLIFE = "secondlife://";
-const std::string LLSLURL::PREFIX_SLURL = "http://slurl.com/secondlife/";
+const std::string LLSLURL::PREFIX_SLURL_OLD = "http://slurl.com/secondlife/";
+const std::string LLSLURL::PREFIX_SLURL = "http://maps.secondlife.com/secondlife/";
const std::string LLSLURL::APP_TOKEN = "app/";
@@ -63,6 +64,11 @@ std::string LLSLURL::stripProtocol(const std::string& url)
{
stripped.erase(0, PREFIX_SLURL.length());
}
+ else if (matchPrefix(stripped, PREFIX_SLURL_OLD))
+ {
+ stripped.erase(0, PREFIX_SLURL_OLD.length());
+ }
+
return stripped;
}
@@ -74,6 +80,7 @@ bool LLSLURL::isSLURL(const std::string& url)
if (matchPrefix(url, PREFIX_SL)) return true;
if (matchPrefix(url, PREFIX_SECONDLIFE)) return true;
if (matchPrefix(url, PREFIX_SLURL)) return true;
+ if (matchPrefix(url, PREFIX_SLURL_OLD)) return true;
return false;
}
@@ -83,7 +90,8 @@ bool LLSLURL::isSLURLCommand(const std::string& url)
{
if (matchPrefix(url, PREFIX_SL + APP_TOKEN) ||
matchPrefix(url, PREFIX_SECONDLIFE + "/" + APP_TOKEN) ||
- matchPrefix(url, PREFIX_SLURL + APP_TOKEN) )
+ matchPrefix(url, PREFIX_SLURL + APP_TOKEN) ||
+ matchPrefix(url, PREFIX_SLURL_OLD + APP_TOKEN) )
{
return true;
}
diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h
index 05b0143e72..21b32ce409 100644
--- a/indra/newview/llslurl.h
+++ b/indra/newview/llslurl.h
@@ -50,6 +50,7 @@ public:
static const std::string PREFIX_SL;
static const std::string PREFIX_SECONDLIFE;
static const std::string PREFIX_SLURL;
+ static const std::string PREFIX_SLURL_OLD;
static const std::string APP_TOKEN;
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index a436dc0546..7ae2404203 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -37,6 +37,7 @@
#include "llfloaterreg.h"
#include "llgroupactions.h"
#include "llgroupiconctrl.h"
+#include "llimview.h"
#include "llnotifications.h"
#include "llinstantmessage.h"
#include "lltooltip.h"
@@ -52,9 +53,9 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_instant_message.xml");
- LLIconCtrl* sys_msg_icon = getChild<LLIconCtrl>("sys_msg_icon");
mGroupIcon = getChild<LLGroupIconCtrl>("group_icon");
mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon");
+ mAdhocIcon = getChild<LLAvatarIconCtrl>("adhoc_icon");
mAvatarName = getChild<LLTextBox>("user_name");
mTime = getChild<LLTextBox>("time_box");
mMessage = getChild<LLTextBox>("message");
@@ -90,27 +91,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
mAvatarID = p.avatar_id;
mNotification = p.notification;
- mAvatarIcon->setVisible(FALSE);
- mGroupIcon->setVisible(FALSE);
- sys_msg_icon->setVisible(FALSE);
-
- if(p.from == SYSTEM_FROM)
- {
- sys_msg_icon->setVisible(TRUE);
- }
- else
- {
- if(LLGroupActions::isInGroup(mSessionID))
- {
- mGroupIcon->setVisible(TRUE);
- mGroupIcon->setValue(p.session_id);
- }
- else
- {
- mAvatarIcon->setVisible(TRUE);
- mAvatarIcon->setValue(p.avatar_id);
- }
- }
+ initIcon();
S32 maxLinesCount;
std::istringstream ss( getString("message_max_lines_count") );
@@ -162,13 +143,27 @@ BOOL LLToastIMPanel::handleToolTip(S32 x, S32 y, MASK mask)
void LLToastIMPanel::showInspector()
{
- if(LLGroupActions::isInGroup(mSessionID))
+ LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mSessionID);
+ if(!im_session)
{
- LLFloaterReg::showInstance("inspect_group", LLSD().with("group_id", mSessionID));
+ llwarns << "Invalid IM session" << llendl;
+ return;
}
- else
+
+ switch(im_session->mSessionType)
{
+ case LLIMModel::LLIMSession::P2P_SESSION:
LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mAvatarID));
+ break;
+ case LLIMModel::LLIMSession::GROUP_SESSION:
+ LLFloaterReg::showInstance("inspect_group", LLSD().with("group_id", mSessionID));
+ break;
+ case LLIMModel::LLIMSession::ADHOC_SESSION:
+ LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", im_session->mOtherParticipantID));
+ break;
+ default:
+ llwarns << "Unknown IM session type" << llendl;
+ break;
}
}
@@ -217,4 +212,48 @@ void LLToastIMPanel::spawnGroupIconToolTip()
LLToolTipMgr::getInstance()->show(params);
}
+void LLToastIMPanel::initIcon()
+{
+ LLIconCtrl* sys_msg_icon = getChild<LLIconCtrl>("sys_msg_icon");
+
+ mAvatarIcon->setVisible(FALSE);
+ mGroupIcon->setVisible(FALSE);
+ sys_msg_icon->setVisible(FALSE);
+ mAdhocIcon->setVisible(FALSE);
+
+ if(mAvatarName->getValue().asString() == SYSTEM_FROM)
+ {
+ sys_msg_icon->setVisible(TRUE);
+ }
+ else
+ {
+ LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mSessionID);
+ if(!im_session)
+ {
+ llwarns << "Invalid IM session" << llendl;
+ return;
+ }
+
+ switch(im_session->mSessionType)
+ {
+ case LLIMModel::LLIMSession::P2P_SESSION:
+ mAvatarIcon->setVisible(TRUE);
+ mAvatarIcon->setValue(mAvatarID);
+ break;
+ case LLIMModel::LLIMSession::GROUP_SESSION:
+ mGroupIcon->setVisible(TRUE);
+ mGroupIcon->setValue(mSessionID);
+ break;
+ case LLIMModel::LLIMSession::ADHOC_SESSION:
+ mAdhocIcon->setVisible(TRUE);
+ mAdhocIcon->setValue(im_session->mOtherParticipantID);
+ mAdhocIcon->setToolTip(im_session->mName);
+ break;
+ default:
+ llwarns << "Unknown IM session type" << llendl;
+ break;
+ }
+ }
+}
+
// EOF
diff --git a/indra/newview/lltoastimpanel.h b/indra/newview/lltoastimpanel.h
index 444c0af144..cf4ad80637 100644
--- a/indra/newview/lltoastimpanel.h
+++ b/indra/newview/lltoastimpanel.h
@@ -66,6 +66,8 @@ private:
void spawnNameToolTip();
void spawnGroupIconToolTip();
+ void initIcon();
+
static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT;
LLNotificationPtr mNotification;
@@ -73,6 +75,7 @@ private:
LLUUID mAvatarID;
LLAvatarIconCtrl* mAvatarIcon;
LLGroupIconCtrl* mGroupIcon;
+ LLAvatarIconCtrl* mAdhocIcon;
LLTextBox* mAvatarName;
LLTextBox* mTime;
LLTextBox* mMessage;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index e525561b7d..143d95d27e 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1478,6 +1478,11 @@ void inventory_offer_handler(LLOfferInfo* info)
// Strip any SLURL from the message display. (DEV-2754)
std::string msg = info->mDesc;
int indx = msg.find(" ( http://slurl.com/secondlife/");
+ if(indx == std::string::npos)
+ {
+ // try to find new slurl host
+ indx = msg.find(" ( http://maps.secondlife.com/secondlife/");
+ }
if(indx >= 0)
{
LLStringUtil::truncate(msg, indx);
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 7ec650629d..a075a706e1 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1597,14 +1597,6 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
instance->mTeleportInProgress = FALSE;
instance->mTeleportFinishedSignal(gAgent.getPositionGlobal());
}
-
- // HACK: This makes agents drop from the sky if they enter a parcel
- // which is set to no fly.
- BOOL was_flying = gAgent.getFlying();
- if (was_flying && !parcel->getAllowFly())
- {
- gAgent.setFlying(gAgent.canFly());
- }
}
}
diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml
index 703a02d995..961bd6b5e4 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml
@@ -178,8 +178,8 @@
follows="top|left"
height="16"
halign="right"
- left="150"
- width="170"
+ left="140"
+ width="180"
layout="topleft"
name="buy_action">
[NAME] L$ [PRICE]
diff --git a/indra/newview/skins/default/xui/en/panel_instant_message.xml b/indra/newview/skins/default/xui/en/panel_instant_message.xml
index 5a1bc32db0..a0ad38cf76 100644
--- a/indra/newview/skins/default/xui/en/panel_instant_message.xml
+++ b/indra/newview/skins/default/xui/en/panel_instant_message.xml
@@ -45,6 +45,17 @@
name="group_icon"
top="3"
width="18" />
+ <avatar_icon
+ color="Green"
+ follows="right"
+ height="18"
+ image_name="Generic_Person"
+ layout="topleft"
+ left="3"
+ mouse_opaque="false"
+ name="adhoc_icon"
+ top="3"
+ width="18" />
<!--<icon
follows="right"
height="20"
diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index 02eddc9212..b2ed51abf3 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -141,12 +141,25 @@
font="SansSerifSmall"
height="15"
layout="topleft"
- left="102"
+ left="0"
name="favorite"
image_drag_indication="Accordion_ArrowOpened_Off"
bottom="55"
tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!"
width="590">
+ <label
+ follows="left|top"
+ font.style="BOLD"
+ height="15"
+ layout="topleft"
+ left="10"
+ name="favorites_bar_label"
+ text_color="LtGray"
+ tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!"
+ top="12"
+ width="102">
+ Favorites Bar
+ </label>
<chevron_button name=">>"
image_unselected="TabIcon_Close_Off"
image_selected="TabIcon_Close_Off"
@@ -157,15 +170,4 @@
top="15"
height="15"/>
</favorites_bar>
- <text
- follows="left|top"
- font.style="BOLD"
- height="15"
- layout="topleft"
- left="10"
- top_pad="-12"
- name="favorites_bar_label"
- text_color="LtGray"
- tool_tip="Drag Landmarks here for quick access to your favorite places in Second Life!"
- width="102">Favorites Bar</text>
</panel>