diff options
30 files changed, 988 insertions, 595 deletions
diff --git a/indra/llmath/llinterp.h b/indra/llmath/llinterp.h index 8beeef480b..36ca2e9865 100644 --- a/indra/llmath/llinterp.h +++ b/indra/llmath/llinterp.h @@ -32,6 +32,13 @@ #ifndef LL_LLINTERP_H #define LL_LLINTERP_H +#if defined(LL_WINDOWS) +// macro definitions for common math constants (e.g. M_PI) are declared under the _USE_MATH_DEFINES +// on Windows system. +// So, let's define _USE_MATH_DEFINES before including math.h + #define _USE_MATH_DEFINES +#endif + #include "math.h" // Class from which different types of interpolators can be derived diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index 0ee3e78409..46902006a6 100644 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -195,14 +195,6 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p) { LLIconCtrl::setValue("default_profile_picture.j2c"); } - - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; - - registrar.add("AvatarIcon.Action", boost::bind(&LLAvatarIconCtrl::onAvatarIconContextMenuItemClicked, this, _2)); - - LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - - mPopupMenuHandle = menu->getHandle(); } LLAvatarIconCtrl::~LLAvatarIconCtrl() @@ -212,8 +204,6 @@ LLAvatarIconCtrl::~LLAvatarIconCtrl() LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarId, this); // Name callbacks will be automatically disconnected since LLUICtrl is trackable } - - LLView::deleteViewByHandle(mPopupMenuHandle); } //virtual @@ -295,32 +285,6 @@ void LLAvatarIconCtrl::processProperties(void* data, EAvatarProcessorType type) } } -BOOL LLAvatarIconCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) -{ - LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get(); - - if(menu) - { - bool is_friend = LLAvatarTracker::instance().getBuddyInfo(mAvatarId) != NULL; - - menu->setItemEnabled("Add Friend", !is_friend); - menu->setItemEnabled("Remove Friend", is_friend); - - if(gAgentID == mAvatarId) - { - menu->setItemEnabled("Add Friend", false); - menu->setItemEnabled("Send IM", false); - menu->setItemEnabled("Remove Friend", false); - } - - menu->buildDrawLabels(); - menu->updateParent(LLMenuGL::sMenuContainer); - LLMenuGL::showPopup(this, menu, x, y); - } - - return TRUE; -} - void LLAvatarIconCtrl::nameUpdatedCallback( const LLUUID& id, const std::string& first, @@ -338,40 +302,3 @@ void LLAvatarIconCtrl::nameUpdatedCallback( } } } - -void LLAvatarIconCtrl::onAvatarIconContextMenuItemClicked(const LLSD& userdata) -{ - std::string level = userdata.asString(); - LLUUID id = getAvatarId(); - - if (level == "profile") - { - LLAvatarActions::showProfile(id); - } - else if (level == "im") - { - std::string name; - name.assign(getFirstName()); - name.append(" "); - name.append(getLastName()); - - LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id); - if (session_id != LLUUID::null) - { - LLIMFloater::show(session_id); - } - } - else if (level == "add") - { - std::string name; - name.assign(getFirstName()); - name.append(" "); - name.append(getLastName()); - - LLAvatarActions::requestFriendshipDialog(id, name); - } - else if (level == "remove") - { - LLAvatarActions::removeFriendDialog(id); - } -} diff --git a/indra/newview/llavatariconctrl.h b/indra/newview/llavatariconctrl.h index 65b5c86ed5..5eb830df4b 100644 --- a/indra/newview/llavatariconctrl.h +++ b/indra/newview/llavatariconctrl.h @@ -81,8 +81,6 @@ protected: LLAvatarIconCtrl(const Params&); friend class LLUICtrlFactory; - void onAvatarIconContextMenuItemClicked(const LLSD& userdata); - public: virtual ~LLAvatarIconCtrl(); @@ -91,8 +89,6 @@ public: // LLAvatarPropertiesProcessor observer trigger virtual void processProperties(void* data, EAvatarProcessorType type); - BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); - void nameUpdatedCallback( const LLUUID& id, const std::string& first, @@ -109,7 +105,6 @@ protected: LLUUID mAvatarId; std::string mFirstName; std::string mLastName; - LLHandle<LLView> mPopupMenuHandle; bool mDrawTooltip; diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 53c4bb32ca..97447a85c6 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -55,6 +55,10 @@ static LLDefaultChildRegistry::Register<LLNotificationChiclet> t2("chiclet_notif static LLDefaultChildRegistry::Register<LLIMP2PChiclet> t3("chiclet_im_p2p"); static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t4("chiclet_im_group"); +static const LLRect CHICLET_RECT(0, 25, 25, 0); +static const LLRect CHICLET_ICON_RECT(0, 24, 24, 0); +static const LLRect VOICE_INDICATOR_RECT(25, 25, 45, 0); + S32 LLNotificationChiclet::mUreadSystemNotifications = 0; boost::signals2::signal<LLChiclet* (const LLUUID&), @@ -199,7 +203,9 @@ void LLChiclet::setValue(const LLSD& value) LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p) : LLChiclet(p) +, mShowSpeaker(false) , mNewMessagesIcon(NULL) +, mSpeakerCtrl(NULL) , mCounterCtrl(NULL) { // initialize an overlay icon for new messages @@ -218,6 +224,40 @@ LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p) setShowCounter(false); } +void LLIMChiclet::setShowSpeaker(bool show) +{ + bool needs_resize = getShowSpeaker() != show; + if(needs_resize) + { + mShowSpeaker = show; + toggleSpeakerControl(); + onChicletSizeChanged(); + } +} +void LLIMChiclet::initSpeakerControl() +{ + // virtual +} + +void LLIMChiclet::toggleSpeakerControl() +{ + LLRect speaker_rect = mSpeakerCtrl->getRect(); + S32 required_width = getRect().getWidth(); + + if(getShowSpeaker()) + { + required_width = required_width + speaker_rect.getWidth(); + initSpeakerControl(); + } + else + { + required_width = required_width - speaker_rect.getWidth(); + } + + reshape(required_width, getRect().getHeight()); + mSpeakerCtrl->setVisible(getShowSpeaker()); +} + void LLIMChiclet::setShowNewMessagesIcon(bool show) { if(mNewMessagesIcon) @@ -300,7 +340,7 @@ LLIMP2PChiclet::Params::Params() , show_speaker("show_speaker") { // *TODO Vadim: Get rid of hardcoded values. - rect(LLRect(0, 25, 25, 0)); + rect(CHICLET_RECT); avatar_icon.name("avatar_icon"); avatar_icon.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_BOTTOM); @@ -309,11 +349,10 @@ LLIMP2PChiclet::Params::Params() // Changed icon height from 25 to 24 to fix ticket EXT-794. // In some cases(after changing UI scale) 25 pixel height icon was // drawn incorrectly, i'm not sure why. - avatar_icon.rect(LLRect(0, 24, 25, 0)); + avatar_icon.rect(CHICLET_ICON_RECT); avatar_icon.mouse_opaque(false); unread_notifications.name("unread"); - unread_notifications.rect(LLRect(25, 25, 45, 0)); unread_notifications.font(LLFontGL::getFontSansSerif()); unread_notifications.font_halign(LLFontGL::HCENTER); unread_notifications.v_pad(5); @@ -322,7 +361,9 @@ LLIMP2PChiclet::Params::Params() unread_notifications.visible(false); speaker.name("speaker"); - speaker.rect(LLRect(45, 25, 65, 0)); + speaker.rect(VOICE_INDICATOR_RECT); + speaker.auto_update(true); + speaker.draw_border(false); show_speaker = false; } @@ -330,7 +371,6 @@ LLIMP2PChiclet::Params::Params() LLIMP2PChiclet::LLIMP2PChiclet(const Params& p) : LLIMChiclet(p) , mChicletIconCtrl(NULL) -, mSpeakerCtrl(NULL) , mPopupMenu(NULL) { LLChicletAvatarIconCtrl::Params avatar_params = p.avatar_icon; @@ -358,18 +398,9 @@ void LLIMP2PChiclet::setCounter(S32 counter) setShowNewMessagesIcon(counter); } -LLRect LLIMP2PChiclet::getRequiredRect() +void LLIMP2PChiclet::initSpeakerControl() { - LLRect rect(0, 0, mChicletIconCtrl->getRect().getWidth(), 0); - if(getShowCounter()) - { - rect.mRight += mCounterCtrl->getRequiredRect().getWidth(); - } - if(getShowSpeaker()) - { - rect.mRight += mSpeakerCtrl->getRect().getWidth(); - } - return rect; + mSpeakerCtrl->setSpeakerId(getOtherParticipantId()); } void LLIMP2PChiclet::setOtherParticipantId(const LLUUID& other_participant_id) @@ -446,18 +477,6 @@ void LLIMP2PChiclet::onMenuItemClicked(const LLSD& user_data) } } -void LLIMP2PChiclet::setShowSpeaker(bool show) -{ - LLIMChiclet::setShowSpeaker(show); - - bool needs_resize = getShowSpeaker() != show; - mSpeakerCtrl->setVisible(getShowSpeaker()); - if(needs_resize) - { - onChicletSizeChanged(); - } -} - ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -470,7 +489,7 @@ LLAdHocChiclet::Params::Params() , avatar_icon_color("avatar_icon_color", LLColor4::green) { // *TODO Vadim: Get rid of hardcoded values. - rect(LLRect(0, 25, 25, 0)); + rect(CHICLET_RECT); avatar_icon.name("avatar_icon"); avatar_icon.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_BOTTOM); @@ -479,11 +498,10 @@ LLAdHocChiclet::Params::Params() // Changed icon height from 25 to 24 to fix ticket EXT-794. // In some cases(after changing UI scale) 25 pixel height icon was // drawn incorrectly, i'm not sure why. - avatar_icon.rect(LLRect(0, 24, 25, 0)); + avatar_icon.rect(CHICLET_ICON_RECT); avatar_icon.mouse_opaque(false); unread_notifications.name("unread"); - unread_notifications.rect(LLRect(25, 25, 45, 0)); unread_notifications.font(LLFontGL::getFontSansSerif()); unread_notifications.font_halign(LLFontGL::HCENTER); unread_notifications.v_pad(5); @@ -493,7 +511,9 @@ LLAdHocChiclet::Params::Params() speaker.name("speaker"); - speaker.rect(LLRect(45, 25, 65, 0)); + speaker.rect(VOICE_INDICATOR_RECT); + speaker.auto_update(true); + speaker.draw_border(false); show_speaker = false; } @@ -501,7 +521,6 @@ LLAdHocChiclet::Params::Params() LLAdHocChiclet::LLAdHocChiclet(const Params& p) : LLIMChiclet(p) , mChicletIconCtrl(NULL) -, mSpeakerCtrl(NULL) , mPopupMenu(NULL) { LLChicletAvatarIconCtrl::Params avatar_params = p.avatar_icon; @@ -532,24 +551,40 @@ void LLAdHocChiclet::setSessionId(const LLUUID& session_id) mChicletIconCtrl->setValue(im_session->mOtherParticipantID); } -void LLAdHocChiclet::setCounter(S32 counter) +void LLAdHocChiclet::draw() { - mCounterCtrl->setCounter(counter); - setShowNewMessagesIcon(counter); + switchToCurrentSpeaker(); + LLIMChiclet::draw(); } -LLRect LLAdHocChiclet::getRequiredRect() +void LLAdHocChiclet::initSpeakerControl() { - LLRect rect(0, 0, mChicletIconCtrl->getRect().getWidth(), 0); - if(getShowCounter()) - { - rect.mRight += mCounterCtrl->getRequiredRect().getWidth(); - } - if(getShowSpeaker()) + switchToCurrentSpeaker(); +} + +void LLAdHocChiclet::switchToCurrentSpeaker() +{ + LLUUID speaker_id; + LLSpeakerMgr::speaker_list_t speaker_list; + + LLIMModel::getInstance()->findIMSession(getSessionId())->mSpeakers->getSpeakerList(&speaker_list, FALSE); + for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i) { - rect.mRight += mSpeakerCtrl->getRect().getWidth(); + LLPointer<LLSpeaker> s = *i; + if (s->mSpeechVolume > 0 || s->mStatus == LLSpeaker::STATUS_SPEAKING) + { + speaker_id = s->mID; + break; + } } - return rect; + + mSpeakerCtrl->setSpeakerId(speaker_id); +} + +void LLAdHocChiclet::setCounter(S32 counter) +{ + mCounterCtrl->setCounter(counter); + setShowNewMessagesIcon(counter); } BOOL LLAdHocChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) @@ -564,7 +599,7 @@ BOOL LLAdHocChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) LLIMGroupChiclet::Params::Params() : group_icon("group_icon") { - rect(LLRect(0, 25, 25, 0)); + rect(CHICLET_RECT); group_icon.name("group_icon"); @@ -572,10 +607,9 @@ LLIMGroupChiclet::Params::Params() // Changed icon height from 25 to 24 to fix ticket EXT-794. // In some cases(after changing UI scale) 25 pixel height icon was // drawn incorrectly, i'm not sure why. - group_icon.rect(LLRect(0, 24, 25, 0)); + group_icon.rect(CHICLET_ICON_RECT); unread_notifications.name("unread"); - unread_notifications.rect(LLRect(25, 25, 45, 0)); unread_notifications.font(LLFontGL::getFontSansSerif()); unread_notifications.font_halign(LLFontGL::HCENTER); unread_notifications.v_pad(5); @@ -583,7 +617,9 @@ LLIMGroupChiclet::Params::Params() unread_notifications.visible(false); speaker.name("speaker"); - speaker.rect(LLRect(45, 25, 65, 0)); + speaker.rect(VOICE_INDICATOR_RECT); + speaker.auto_update(true); + speaker.draw_border(false); show_speaker = false; } @@ -592,7 +628,6 @@ LLIMGroupChiclet::LLIMGroupChiclet(const Params& p) : LLIMChiclet(p) , LLGroupMgrObserver(LLUUID::null) , mChicletIconCtrl(NULL) -, mSpeakerCtrl(NULL) , mPopupMenu(NULL) { LLChicletGroupIconCtrl::Params avatar_params = p.group_icon; @@ -625,18 +660,34 @@ void LLIMGroupChiclet::setCounter(S32 counter) setShowNewMessagesIcon(counter); } -LLRect LLIMGroupChiclet::getRequiredRect() +void LLIMGroupChiclet::draw() { - LLRect rect(0, 0, mChicletIconCtrl->getRect().getWidth(), 0); - if(getShowCounter()) - { - rect.mRight += mCounterCtrl->getRequiredRect().getWidth(); - } - if(getShowSpeaker()) + switchToCurrentSpeaker(); + LLIMChiclet::draw(); +} + +void LLIMGroupChiclet::initSpeakerControl() +{ + switchToCurrentSpeaker(); +} + +void LLIMGroupChiclet::switchToCurrentSpeaker() +{ + LLUUID speaker_id; + LLSpeakerMgr::speaker_list_t speaker_list; + + LLIMModel::getInstance()->findIMSession(getSessionId())->mSpeakers->getSpeakerList(&speaker_list, FALSE); + for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i) { - rect.mRight += mSpeakerCtrl->getRect().getWidth(); + LLPointer<LLSpeaker> s = *i; + if (s->mSpeechVolume > 0 || s->mStatus == LLSpeaker::STATUS_SPEAKING) + { + speaker_id = s->mID; + break; + } } - return rect; + + mSpeakerCtrl->setSpeakerId(speaker_id); } void LLIMGroupChiclet::setSessionId(const LLUUID& session_id) @@ -723,17 +774,6 @@ void LLIMGroupChiclet::onMenuItemClicked(const LLSD& user_data) } } -void LLIMGroupChiclet::setShowSpeaker(bool show) -{ - LLIMChiclet::setShowSpeaker(show); - - bool needs_resize = getShowSpeaker() != show; - mSpeakerCtrl->setVisible(getShowSpeaker()); - if(needs_resize) - { - onChicletSizeChanged(); - } -} ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -742,8 +782,6 @@ void LLIMGroupChiclet::setShowSpeaker(bool show) LLChicletPanel::Params::Params() : chiclet_padding("chiclet_padding") , scrolling_offset("scrolling_offset") -, left_scroll_button("left_scroll_button") -, right_scroll_button("right_scroll_button") , min_width("min_width") { chiclet_padding = 3; @@ -754,24 +792,6 @@ LLChicletPanel::Params::Params() // min_width = 4 chiclets + 3 paddings min_width = 179 + 3*chiclet_padding; } - - LLRect scroll_button_rect(0, 25, 19, 5); - - left_scroll_button.name("left_scroll"); - left_scroll_button.label(LLStringUtil::null); - left_scroll_button.rect(scroll_button_rect); - left_scroll_button.tab_stop(false); - left_scroll_button.image_selected(LLUI::getUIImage("bottom_tray_scroll_left.tga")); - left_scroll_button.image_unselected(LLUI::getUIImage("bottom_tray_scroll_left.tga")); - left_scroll_button.image_hover_selected(LLUI::getUIImage("bottom_tray_scroll_left.tga")); - - right_scroll_button.name("right_scroll"); - right_scroll_button.label(LLStringUtil::null); - right_scroll_button.rect(scroll_button_rect); - right_scroll_button.tab_stop(false); - right_scroll_button.image_selected(LLUI::getUIImage("bottom_tray_scroll_right.tga")); - right_scroll_button.image_unselected(LLUI::getUIImage("bottom_tray_scroll_right.tga")); - right_scroll_button.image_hover_selected(LLUI::getUIImage("bottom_tray_scroll_right.tga")); }; LLChicletPanel::LLChicletPanel(const Params&p) @@ -784,23 +804,6 @@ LLChicletPanel::LLChicletPanel(const Params&p) , mMinWidth(p.min_width) , mShowControls(true) { - LLButton::Params scroll_button_params = p.left_scroll_button; - - mLeftScrollButton = LLUICtrlFactory::create<LLButton>(scroll_button_params); - addChild(mLeftScrollButton); - LLTransientFloaterMgr::getInstance()->addControlView(mLeftScrollButton); - - mLeftScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onLeftScrollClick,this)); - mLeftScrollButton->setEnabled(false); - - scroll_button_params = p.right_scroll_button; - mRightScrollButton = LLUICtrlFactory::create<LLButton>(scroll_button_params); - addChild(mRightScrollButton); - LLTransientFloaterMgr::getInstance()->addControlView(mRightScrollButton); - - mRightScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onRightScrollClick,this)); - mRightScrollButton->setEnabled(false); - LLPanel::Params panel_params; mScrollArea = LLUICtrlFactory::create<LLPanel>(panel_params,this); @@ -849,10 +852,38 @@ BOOL LLChicletPanel::postBuild() LLIMModel::instance().addNewMsgCallback(boost::bind(im_chiclet_callback, this, _1)); LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(im_chiclet_callback, this, _1)); LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLChicletPanel::findChiclet<LLChiclet>, this, _1)); + LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLChicletPanel::onCurrentVoiceChannelChanged, this, _1)); + + mLeftScrollButton=getChild<LLButton>("chicklet_left_scroll_button"); + LLTransientFloaterMgr::getInstance()->addControlView(mLeftScrollButton); + mLeftScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onLeftScrollClick,this)); + mLeftScrollButton->setEnabled(false); + + mRightScrollButton=getChild<LLButton>("chicklet_right_scroll_button"); + LLTransientFloaterMgr::getInstance()->addControlView(mRightScrollButton); + mRightScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onRightScrollClick,this)); + mRightScrollButton->setEnabled(false); return TRUE; } +void LLChicletPanel::onCurrentVoiceChannelChanged(const LLUUID& session_id) +{ + for(chiclet_list_t::iterator it = mChicletList.begin(); it != mChicletList.end(); ++it) + { + LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it); + if(chiclet) + { + if(chiclet->getSessionId() == session_id) + { + chiclet->setShowSpeaker(true); + continue; + } + chiclet->setShowSpeaker(false); + } + } +} + S32 LLChicletPanel::calcChickletPanleWidth() { S32 res = 0; @@ -896,23 +927,7 @@ bool LLChicletPanel::addChiclet(LLChiclet* chiclet, S32 index) void LLChicletPanel::onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param) { - S32 chiclet_width = ctrl->getRect().getWidth(); - S32 chiclet_new_width = ctrl->getRequiredRect().getWidth(); - - if(chiclet_new_width == chiclet_width) - { - return; - } - - LLRect chiclet_rect = ctrl->getRect(); - chiclet_rect.mRight = chiclet_rect.mLeft + chiclet_new_width; - - ctrl->setRect(chiclet_rect); - - S32 offset = chiclet_new_width - chiclet_width; - S32 index = getChicletIndex(ctrl); - - shiftChiclets(offset, index + 1); + arrange(); trimChiclets(); showScrollButtonsIfNeeded(); } @@ -1024,23 +1039,24 @@ void LLChicletPanel::reshape(S32 width, S32 height, BOOL called_from_parent ) static const S32 SCROLL_BUTTON_PAD = 5; + //Needed once- to avoid error at first call of reshape() before postBuild() + if(!mLeftScrollButton||!mRightScrollButton) + return; + LLRect scroll_button_rect = mLeftScrollButton->getRect(); - mLeftScrollButton->setRect(LLRect(0,height,scroll_button_rect.getWidth(), - height - scroll_button_rect.getHeight())); - + mLeftScrollButton->setRect(LLRect(0,scroll_button_rect.mTop,scroll_button_rect.getWidth(), + scroll_button_rect.mBottom)); scroll_button_rect = mRightScrollButton->getRect(); - mRightScrollButton->setRect(LLRect(width - scroll_button_rect.getWidth(),height, - width, height - scroll_button_rect.getHeight())); - + mRightScrollButton->setRect(LLRect(width - scroll_button_rect.getWidth(),scroll_button_rect.mTop, + width, scroll_button_rect.mBottom)); mScrollArea->setRect(LLRect(scroll_button_rect.getWidth() + SCROLL_BUTTON_PAD, height, width - scroll_button_rect.getWidth() - SCROLL_BUTTON_PAD, 0)); - mShowControls = width > mMinWidth; mScrollArea->setVisible(mShowControls); trimChiclets(); - showScrollButtonsIfNeeded(); + } void LLChicletPanel::arrange() @@ -1327,6 +1343,6 @@ void LLChicletGroupIconCtrl::setValue(const LLSD& value ) ////////////////////////////////////////////////////////////////////////// LLChicletSpeakerCtrl::LLChicletSpeakerCtrl(const Params&p) - : LLIconCtrl(p) + : LLOutputMonitorCtrl(p) { } diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index b50702205c..97af82fe2f 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -147,13 +147,13 @@ protected: }; /* - * Class for displaying status of Voice Chat + * Class for displaying of speaker's voice indicator */ -class LLChicletSpeakerCtrl : public LLIconCtrl +class LLChicletSpeakerCtrl : public LLOutputMonitorCtrl { public: - struct Params : public LLInitParam::Block<Params, LLIconCtrl::Params> + struct Params : public LLInitParam::Block<Params, LLOutputMonitorCtrl::Params> { Params(){}; }; @@ -266,8 +266,6 @@ private: * Base class for Instant Message chiclets. * IMChiclet displays icon, number of unread messages(optional) * and voice chat status(optional). -* Every chiclet should override LLUICtrl::getRequiredRect and return -* desired width. */ class LLIMChiclet : public LLChiclet { @@ -306,9 +304,14 @@ public: virtual LLUUID getOtherParticipantId() { return mOtherParticipantId; } /* - * Shows/hides voice chat status control. + * Init Speaker Control with speaker's ID */ - virtual void setShowSpeaker(bool show) { mShowSpeaker = show; } + virtual void initSpeakerControl(); + + /* + * set status (Shows/Hide) for voice control. + */ + virtual void setShowSpeaker(bool show); /* * Returns voice chat status control visibility. @@ -316,6 +319,11 @@ public: virtual bool getShowSpeaker() {return mShowSpeaker;}; /* + * Shows/Hides for voice control for a chiclet. + */ + virtual void toggleSpeakerControl(); + + /* * Shows/hides overlay icon concerning new unread messages. */ virtual void setShowNewMessagesIcon(bool show); @@ -325,10 +333,7 @@ public: */ virtual bool getShowNewMessagesIcon(); - /* - * Draws border around chiclet. - */ - /*virtual*/ void draw(); + virtual void draw(); /** * Determine whether given ID refers to a group or an IM chat session. @@ -363,6 +368,8 @@ protected: LLIconCtrl* mNewMessagesIcon; LLChicletNotificationCounterCtrl* mCounterCtrl; + LLChicletSpeakerCtrl* mSpeakerCtrl; + /** the id of another participant, either an avatar id or a group id*/ LLUUID mOtherParticipantId; @@ -410,8 +417,6 @@ public: /* virtual */ void setOtherParticipantId(const LLUUID& other_participant_id); - /*virtual*/ void setShowSpeaker(bool show); - /* * Sets number of unread messages. Will update chiclet's width if number text * exceeds size of counter and notify it's parent about size change. @@ -419,15 +424,14 @@ public: /*virtual*/ void setCounter(S32); /* - * Returns number of unread messages. + * Init Speaker Control with speaker's ID */ - /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } + /*virtual*/ void initSpeakerControl(); /* - * Returns rect, required to display chiclet. - * Width is the only valid value. + * Returns number of unread messages. */ - /*virtual*/ LLRect getRequiredRect(); + /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } protected: LLIMP2PChiclet(const Params& p); @@ -457,7 +461,6 @@ protected: private: LLChicletAvatarIconCtrl* mChicletIconCtrl; - LLChicletSpeakerCtrl* mSpeakerCtrl; LLMenuGL* mPopupMenu; }; @@ -495,15 +498,19 @@ public: /*virtual*/ void setCounter(S32); /* - * Returns number of unread messages. + * Keep Speaker Control with actual speaker's ID */ - /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } + /*virtual*/ void draw(); /* - * Returns rect, required to display chiclet. - * Width is the only valid value. + * Init Speaker Control with speaker's ID */ - /*virtual*/ LLRect getRequiredRect(); + /*virtual*/ void initSpeakerControl(); + + /* + * Returns number of unread messages. + */ + /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } protected: LLAdHocChiclet(const Params& p); @@ -514,10 +521,14 @@ protected: */ virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + /* + * Finds a current speaker and resets the SpeakerControl with speaker's ID + */ + /*virtual*/ void switchToCurrentSpeaker(); + private: LLChicletAvatarIconCtrl* mChicletIconCtrl; - LLChicletSpeakerCtrl* mSpeakerCtrl; LLMenuGL* mPopupMenu; }; @@ -547,14 +558,17 @@ public: */ /*virtual*/ void setSessionId(const LLUUID& session_id); + /* + * Keep Speaker Control with actual speaker's ID + */ + /*virtual*/ void draw(); + /** * Callback for LLGroupMgrObserver, we get this when group data is available or changed. * Sets group icon. */ /*virtual*/ void changed(LLGroupChange gc); - /*virtual*/ void setShowSpeaker(bool show); - /* * Sets number of unread messages. Will update chiclet's width if number text * exceeds size of counter and notify it's parent about size change. @@ -562,15 +576,14 @@ public: /*virtual*/ void setCounter(S32); /* - * Returns number of unread messages. + * Init Speaker Control with speaker's ID */ - /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } + /*virtual*/ void initSpeakerControl(); /* - * Returns rect, required to display chiclet. - * Width is the only valid value. + * Returns number of unread messages. */ - /*virtual*/ LLRect getRequiredRect(); + /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); } ~LLIMGroupChiclet(); @@ -579,6 +592,11 @@ protected: friend class LLUICtrlFactory; /* + * Finds a current speaker and resets the SpeakerControl with speaker's ID + */ + /*virtual*/ void switchToCurrentSpeaker(); + + /* * Creates chiclet popup menu. Will create P2P or Group IM Chat menu * based on other participant's id. */ @@ -597,7 +615,6 @@ protected: private: LLChicletGroupIconCtrl* mChicletIconCtrl; - LLChicletSpeakerCtrl* mSpeakerCtrl; LLMenuGL* mPopupMenu; }; @@ -660,9 +677,6 @@ public: Optional<S32> chiclet_padding, scrolling_offset; - Optional<LLButton::Params> left_scroll_button, - right_scroll_button; - Optional<S32> min_width; Params(); @@ -736,6 +750,11 @@ public: /*virtual*/ BOOL postBuild(); /* + * Handler for the Voice Client's signal. Finds a corresponding chiclet and toggles its SpeakerControl + */ + void onCurrentVoiceChannelChanged(const LLUUID& session_id); + + /* * Reshapes controls and rearranges chiclets if needed. */ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE ); diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 663bd232f7..3613ac803e 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -849,6 +849,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) { LLUICtrlFactory::getInstance()->buildFloater(*floaterp, path, NULL); // just build it (*floaterp)->openFloater((*floaterp)->getKey()); + (*floaterp)->setCanResize((*floaterp)->isResizable()); } } diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 010ed23918..cdb85f5b1c 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -181,13 +181,9 @@ void LLGroupList::addNewItem(const LLUUID& id, const std::string& name, const LL // item->setContextMenu(mContextMenu); item->childSetVisible("info_btn", false); + item->childSetVisible("profile_btn", false); item->setGroupIconVisible(mShowIcons); - if (id.isNull()) - { - item->childSetVisible("profile_btn", false); - } - addItem(item, id, pos); // setCommentVisible(false); @@ -254,7 +250,10 @@ void LLGroupListItem::onMouseEnter(S32 x, S32 y, MASK mask) { childSetVisible("hovered_icon", true); if (mGroupID.notNull()) // don't show the info button for the "none" group + { mInfoBtn->setVisible(true); + childSetVisible("profile_btn", true); + } LLPanel::onMouseEnter(x, y, mask); } @@ -263,6 +262,7 @@ void LLGroupListItem::onMouseLeave(S32 x, S32 y, MASK mask) { childSetVisible("hovered_icon", false); mInfoBtn->setVisible(false); + childSetVisible("profile_btn", false); LLPanel::onMouseLeave(x, y, mask); } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8fb7027e82..476d312c69 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1157,6 +1157,9 @@ void LLIncomingCallDialog::onStartIM(void* user_data) void LLIncomingCallDialog::processCallResponse(S32 response) { + if (!gIMMgr) + return; + LLUUID session_id = mPayload["session_id"].asUUID(); EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger(); LLIMMgr::EInvitationType inv_type = (LLIMMgr::EInvitationType)mPayload["inv_type"].asInteger(); @@ -1254,6 +1257,9 @@ void LLIncomingCallDialog::processCallResponse(S32 response) bool inviteUserResponse(const LLSD& notification, const LLSD& response) { + if (!gIMMgr) + return false; + const LLSD& payload = notification["payload"]; LLUUID session_id = payload["session_id"].asUUID(); EInstantMessage type = (EInstantMessage)payload["type"].asInteger(); diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 4985663833..f94a59ecef 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -35,6 +35,7 @@ #include "llpanellandmarkinfo.h" #include "llcombobox.h" +#include "lliconctrl.h" #include "lllineeditor.h" #include "lltextbox.h" #include "lltexteditor.h" @@ -58,6 +59,11 @@ static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats); static LLRegisterPanelClassWrapper<LLPanelLandmarkInfo> t_landmark_info("panel_landmark_info"); +// Statics for textures filenames +static std::string icon_pg; +static std::string icon_m; +static std::string icon_r; + LLPanelLandmarkInfo::LLPanelLandmarkInfo() : LLPanelPlaceInfo() {} @@ -79,6 +85,10 @@ BOOL LLPanelLandmarkInfo::postBuild() mNotesEditor = getChild<LLTextEditor>("notes_editor"); mFolderCombo = getChild<LLComboBox>("folder_combo"); + icon_pg = getString("icon_PG"); + icon_m = getString("icon_M"); + icon_r = getString("icon_R"); + return TRUE; } @@ -101,9 +111,8 @@ void LLPanelLandmarkInfo::setInfoType(INFO_TYPE type) LLPanel* landmark_info_panel = getChild<LLPanel>("landmark_info_panel"); bool is_info_type_create_landmark = type == CREATE_LANDMARK; - bool is_info_type_landmark = type == LANDMARK; - landmark_info_panel->setVisible(is_info_type_landmark); + landmark_info_panel->setVisible(type == LANDMARK); getChild<LLTextBox>("folder_label")->setVisible(is_info_type_create_landmark); mFolderCombo->setVisible(is_info_type_create_landmark); @@ -136,6 +145,24 @@ void LLPanelLandmarkInfo::processParcelInfo(const LLParcelData& parcel_data) { LLPanelPlaceInfo::processParcelInfo(parcel_data); + // HACK: Flag 0x2 == adult region, + // Flag 0x1 == mature region, otherwise assume PG + if (parcel_data.flags & 0x2) + { + mMaturityRatingIcon->setValue(icon_r); + mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_ADULT)); + } + else if (parcel_data.flags & 0x1) + { + mMaturityRatingIcon->setValue(icon_m); + mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_MATURE)); + } + else + { + mMaturityRatingIcon->setValue(icon_pg); + mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_PG)); + } + S32 region_x; S32 region_y; S32 region_z; diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 0c66e7155c..005a00df75 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -60,6 +60,7 @@ #include "llviewermenu.h" // for gMenuHolder #include "llvoiceclient.h" #include "llworld.h" +#include "llspeakers.h" #define FRIEND_LIST_UPDATE_TIMEOUT 0.5 #define NEARBY_LIST_UPDATE_INTERVAL 1 @@ -119,8 +120,84 @@ protected: } }; +/** Compares avatar items by distance between you and them */ +class LLAvatarItemDistanceComparator : public LLAvatarItemComparator +{ +public: + typedef std::map < LLUUID, LLVector3d > id_to_pos_map_t; + LLAvatarItemDistanceComparator() {}; + + void updateAvatarsPositions(std::vector<LLVector3d>& positions, std::vector<LLUUID>& uuids) + { + std::vector<LLVector3d>::const_iterator + pos_it = positions.begin(), + pos_end = positions.end(); + + std::vector<LLUUID>::const_iterator + id_it = uuids.begin(), + id_end = uuids.end(); + + LLAvatarItemDistanceComparator::id_to_pos_map_t pos_map; + + mAvatarsPositions.clear(); + + for (;pos_it != pos_end && id_it != id_end; ++pos_it, ++id_it ) + { + mAvatarsPositions[*id_it] = *pos_it; + } + }; + +protected: + virtual bool doCompare(const LLAvatarListItem* item1, const LLAvatarListItem* item2) const + { + const LLVector3d& me_pos = gAgent.getPositionGlobal(); + const LLVector3d& item1_pos = mAvatarsPositions.find(item1->getAvatarId())->second; + const LLVector3d& item2_pos = mAvatarsPositions.find(item2->getAvatarId())->second; + F32 dist1 = dist_vec(item1_pos, me_pos); + F32 dist2 = dist_vec(item2_pos, me_pos); + return dist1 < dist2; + } +private: + id_to_pos_map_t mAvatarsPositions; +}; + +/** Comparator for comparing nearby avatar items by last spoken time */ +class LLAvatarItemRecentSpeakerComparator : public LLAvatarItemNameComparator +{ +public: + LLAvatarItemRecentSpeakerComparator() {}; + virtual ~LLAvatarItemRecentSpeakerComparator() {}; + +protected: + virtual bool doCompare(const LLAvatarListItem* item1, const LLAvatarListItem* item2) const + { + LLPointer<LLSpeaker> lhs = LLLocalSpeakerMgr::instance().findSpeaker(item1->getAvatarId()); + LLPointer<LLSpeaker> rhs = LLLocalSpeakerMgr::instance().findSpeaker(item2->getAvatarId()); + if ( lhs.notNull() && rhs.notNull() ) + { + // Compare by last speaking time + if( lhs->mLastSpokeTime != rhs->mLastSpokeTime ) + return ( lhs->mLastSpokeTime > rhs->mLastSpokeTime ); + } + else if ( lhs.notNull() ) + { + // True if only item1 speaker info available + return true; + } + else if ( rhs.notNull() ) + { + // False if only item2 speaker info available + return false; + } + // By default compare by name. + return LLAvatarItemNameComparator::doCompare(item1, item2); + } +}; + static const LLAvatarItemRecentComparator RECENT_COMPARATOR; static const LLAvatarItemStatusComparator STATUS_COMPARATOR; +static LLAvatarItemDistanceComparator DISTANCE_COMPARATOR; +static const LLAvatarItemRecentSpeakerComparator RECENT_SPEAKER_COMPARATOR; static LLRegisterPanelClassWrapper<LLPanelPeople> t_people("panel_people"); @@ -431,9 +508,12 @@ BOOL LLPanelPeople::postBuild() mNearbyList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); mRecentList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); + mAllFriendList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); + mOnlineFriendList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); setSortOrder(mRecentList, (ESortOrder)gSavedSettings.getU32("RecentPeopleSortOrder"), false); setSortOrder(mAllFriendList, (ESortOrder)gSavedSettings.getU32("FriendsSortOrder"), false); + setSortOrder(mNearbyList, (ESortOrder)gSavedSettings.getU32("NearbyPeopleSortOrder"), false); LLPanel* groups_panel = getChild<LLPanel>(GROUP_TAB_NAME); groups_panel->childSetAction("activate_btn", boost::bind(&LLPanelPeople::onActivateButtonClicked, this)); @@ -494,7 +574,8 @@ BOOL LLPanelPeople::postBuild() enable_registrar.add("People.Friends.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemCheck, this, _2)); enable_registrar.add("People.Recent.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemCheck, this, _2)); - + enable_registrar.add("People.Nearby.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemCheck, this, _2)); + LLMenuGL* plus_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_group_plus.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mGroupPlusMenuHandle = plus_menu->getHandle(); @@ -573,8 +654,13 @@ void LLPanelPeople::updateNearbyList() if (!mNearbyList) return; - LLWorld::getInstance()->getAvatars(&mNearbyList->getIDs(), NULL, gAgent.getPositionGlobal(), gSavedSettings.getF32("NearMeRange")); + std::vector<LLVector3d> positions; + + LLWorld::getInstance()->getAvatars(&mNearbyList->getIDs(), &positions, gAgent.getPositionGlobal(), gSavedSettings.getF32("NearMeRange")); mNearbyList->setDirty(); + + DISTANCE_COMPARATOR.updateAvatarsPositions(positions, mNearbyList->getIDs()); + LLLocalSpeakerMgr::instance().update(TRUE); } void LLPanelPeople::updateRecentList() @@ -607,6 +693,12 @@ void LLPanelPeople::buttonSetAction(const std::string& btn_name, const commit_si button->setClickedCallback(cb); } +bool LLPanelPeople::isFriendOnline(const LLUUID& id) +{ + LLAvatarList::uuid_vector_t ids = mOnlineFriendList->getIDs(); + return std::find(ids.begin(), ids.end(), id) != ids.end(); +} + void LLPanelPeople::updateButtons() { std::string cur_tab = getActiveTabName(); @@ -659,7 +751,7 @@ void LLPanelPeople::updateButtons() childSetEnabled("add_friend_btn", !is_friend); } - buttonSetEnabled("teleport_btn", friends_tab_active && item_selected); + buttonSetEnabled("teleport_btn", friends_tab_active && item_selected && isFriendOnline(selected_uuids.front())); buttonSetEnabled("view_profile_btn", item_selected); buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection buttonSetEnabled("call_btn", item_selected); @@ -757,6 +849,14 @@ void LLPanelPeople::setSortOrder(LLAvatarList* list, ESortOrder order, bool save list->setComparator(&RECENT_COMPARATOR); list->sort(); break; + case E_SORT_BY_RECENT_SPEAKERS: + list->setComparator(&RECENT_SPEAKER_COMPARATOR); + list->sort(); + break; + case E_SORT_BY_DISTANCE: + list->setComparator(&DISTANCE_COMPARATOR); + list->sort(); + break; default: llwarns << "Unrecognized people sort order for " << list->getName() << llendl; return; @@ -771,7 +871,7 @@ void LLPanelPeople::setSortOrder(LLAvatarList* list, ESortOrder order, bool save else if (list == mRecentList) setting = "RecentPeopleSortOrder"; else if (list == mNearbyList) - setting = "NearbyPeopleSortOrder"; // *TODO: unused by current implementation + setting = "NearbyPeopleSortOrder"; if (!setting.empty()) gSavedSettings.setU32(setting, order); @@ -1007,12 +1107,13 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata) { std::string chosen_item = userdata.asString(); - if (chosen_item == "sort_recent") + if (chosen_item == "sort_by_recent_speakers") { + setSortOrder(mNearbyList, E_SORT_BY_RECENT_SPEAKERS); } else if (chosen_item == "sort_name") { - mNearbyList->sortByName(); + setSortOrder(mNearbyList, E_SORT_BY_NAME); } else if (chosen_item == "view_icons") { @@ -1020,8 +1121,25 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata) } else if (chosen_item == "sort_distance") { + setSortOrder(mNearbyList, E_SORT_BY_DISTANCE); } } + +bool LLPanelPeople::onNearbyViewSortMenuItemCheck(const LLSD& userdata) +{ + std::string item = userdata.asString(); + U32 sort_order = gSavedSettings.getU32("NearbyPeopleSortOrder"); + + if (item == "sort_by_recent_speakers") + return sort_order == E_SORT_BY_RECENT_SPEAKERS; + if (item == "sort_name") + return sort_order == E_SORT_BY_NAME; + if (item == "sort_distance") + return sort_order == E_SORT_BY_DISTANCE; + + return false; +} + void LLPanelPeople::onRecentViewSortMenuItemClicked(const LLSD& userdata) { std::string chosen_item = userdata.asString(); diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 9bf9befe90..a369bcd3e2 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -62,6 +62,8 @@ private: E_SORT_BY_NAME = 0, E_SORT_BY_STATUS = 1, E_SORT_BY_MOST_RECENT = 2, + E_SORT_BY_DISTANCE = 3, + E_SORT_BY_RECENT_SPEAKERS = 4, } ESortOrder; // methods indirectly called by the updaters @@ -69,6 +71,8 @@ private: void updateNearbyList(); void updateRecentList(); + bool isFriendOnline(const LLUUID& id); + void updateButtons(); std::string getActiveTabName() const; LLUUID getCurrentItemID() const; @@ -115,6 +119,7 @@ private: bool onFriendsViewSortMenuItemCheck(const LLSD& userdata); bool onRecentViewSortMenuItemCheck(const LLSD& userdata); + bool onNearbyViewSortMenuItemCheck(const LLSD& userdata); // misc callbacks static void onAvatarPicked( diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index c600651015..963d39de8a 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -40,7 +40,7 @@ #include "llsdutil_math.h" -#include "llscrollcontainer.h" +#include "lliconctrl.h" #include "lltextbox.h" #include "llagent.h" @@ -57,8 +57,7 @@ LLPanelPlaceInfo::LLPanelPlaceInfo() : LLPanel(), mParcelID(), mRequestedID(), - mPosRegion(), - mMinHeight(0) + mPosRegion() {} //virtual @@ -81,12 +80,9 @@ BOOL LLPanelPlaceInfo::postBuild() mParcelName = getChild<LLTextBox>("parcel_title"); mDescEditor = getChild<LLExpandableTextBox>("description"); + mMaturityRatingIcon = getChild<LLIconCtrl>("maturity_icon"); mMaturityRatingText = getChild<LLTextBox>("maturity_value"); - LLScrollContainer* scroll_container = getChild<LLScrollContainer>("place_scroll"); - scroll_container->setBorderVisible(FALSE); - mMinHeight = scroll_container->getScrolledViewRect().getHeight(); - return TRUE; } @@ -98,6 +94,7 @@ void LLPanelPlaceInfo::resetLocation() mPosRegion.clearVec(); std::string not_available = getString("not_available"); + mMaturityRatingIcon->setValue(not_available); mMaturityRatingText->setValue(not_available); mRegionName->setText(not_available); mParcelName->setText(not_available); @@ -204,20 +201,6 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data) mDescEditor->setText(parcel_data.desc); } - // HACK: Flag 0x2 == adult region, - // Flag 0x1 == mature region, otherwise assume PG - std::string rating = LLViewerRegion::accessToString(SIM_ACCESS_PG); - if (parcel_data.flags & 0x2) - { - rating = LLViewerRegion::accessToString(SIM_ACCESS_ADULT); - } - else if (parcel_data.flags & 0x1) - { - rating = LLViewerRegion::accessToString(SIM_ACCESS_MATURE); - } - - mMaturityRatingText->setValue(rating); - S32 region_x; S32 region_y; S32 region_z; diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index ec30397cff..133933a880 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -41,6 +41,7 @@ #include "llremoteparcelrequest.h" class LLExpandableTextBox; +class LLIconCtrl; class LLInventoryItem; class LLPanelPickEdit; class LLParcel; @@ -109,7 +110,6 @@ protected: LLUUID mRequestedID; LLVector3 mPosRegion; std::string mCurrentTitle; - S32 mMinHeight; INFO_TYPE mInfoType; LLTextBox* mTitle; @@ -117,6 +117,7 @@ protected: LLTextBox* mRegionName; LLTextBox* mParcelName; LLExpandableTextBox* mDescEditor; + LLIconCtrl* mMaturityRatingIcon; LLTextBox* mMaturityRatingText; }; diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 2a9ba4697d..61501cc1b1 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -97,7 +97,6 @@ BOOL LLPanelPlaceProfile::postBuild() setMouseDownCallback(boost::bind(&LLPanelPlaceProfile::onForSaleBannerClick, this)); mParcelOwner = getChild<LLTextBox>("owner_value"); - mLastVisited = getChild<LLTextBox>("last_visited_value"); mParcelRatingIcon = getChild<LLIconCtrl>("rating_icon"); mParcelRatingText = getChild<LLTextBox>("rating_value"); @@ -165,7 +164,6 @@ void LLPanelPlaceProfile::resetLocation() std::string not_available = getString("not_available"); mParcelOwner->setValue(not_available); - mLastVisited->setValue(not_available); mParcelRatingIcon->setValue(not_available); mParcelRatingText->setText(not_available); @@ -209,17 +207,13 @@ void LLPanelPlaceProfile::resetLocation() void LLPanelPlaceProfile::setInfoType(INFO_TYPE type) { bool is_info_type_agent = type == AGENT; - bool is_info_type_teleport_history = type == TELEPORT_HISTORY; - getChild<LLTextBox>("maturity_label")->setVisible(!is_info_type_agent); + mMaturityRatingIcon->setVisible(!is_info_type_agent); mMaturityRatingText->setVisible(!is_info_type_agent); getChild<LLTextBox>("owner_label")->setVisible(is_info_type_agent); mParcelOwner->setVisible(is_info_type_agent); - getChild<LLTextBox>("last_visited_label")->setVisible(is_info_type_teleport_history); - mLastVisited->setVisible(is_info_type_teleport_history); - getChild<LLAccordionCtrl>("advanced_info_accordion")->setVisible(is_info_type_agent); switch(type) @@ -238,6 +232,30 @@ void LLPanelPlaceProfile::setInfoType(INFO_TYPE type) LLPanelPlaceInfo::setInfoType(type); } +// virtual +void LLPanelPlaceProfile::processParcelInfo(const LLParcelData& parcel_data) +{ + LLPanelPlaceInfo::processParcelInfo(parcel_data); + + // HACK: Flag 0x2 == adult region, + // Flag 0x1 == mature region, otherwise assume PG + if (parcel_data.flags & 0x2) + { + mMaturityRatingIcon->setValue(icon_r); + mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_ADULT)); + } + else if (parcel_data.flags & 0x1) + { + mMaturityRatingIcon->setValue(icon_m); + mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_MATURE)); + } + else + { + mMaturityRatingIcon->setValue(icon_pg); + mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_PG)); + } +} + void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, LLViewerRegion* region, const LLVector3d& pos_global, @@ -521,22 +539,6 @@ void LLPanelPlaceProfile::updateCovenantText(const std::string &text) mCovenantText->setText(text); } -void LLPanelPlaceProfile::updateLastVisitedText(const LLDate &date) -{ - if (date.isNull()) - { - mLastVisited->setText(getString("unknown")); - } - else - { - std::string timeStr = getString("acquired_date"); - LLSD substitution; - substitution["datetime"] = (S32) date.secondsSinceEpoch(); - LLStringUtil::format (timeStr, substitution); - mLastVisited->setText(timeStr); - } -} - void LLPanelPlaceProfile::onForSaleBannerClick() { LLViewerParcelMgr* mgr = LLViewerParcelMgr::getInstance(); diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index b3ef4acf51..8c30ca92fb 100644 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -50,6 +50,8 @@ public: /*virtual*/ void setInfoType(INFO_TYPE type); + /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); + // Displays information about the currently selected parcel // without sending a request to the server. // If is_current_parcel true shows "You Are Here" banner. @@ -61,7 +63,6 @@ public: void updateEstateName(const std::string& name); void updateEstateOwnerName(const std::string& name); void updateCovenantText(const std::string &text); - void updateLastVisitedText(const LLDate &date); private: void onForSaleBannerClick(); @@ -78,7 +79,6 @@ private: LLPanel* mYouAreHerePanel; LLTextBox* mParcelOwner; - LLTextBox* mLastVisited; LLIconCtrl* mParcelRatingIcon; LLTextBox* mParcelRatingText; diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 8d117afcfe..3d0fba9426 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -293,7 +293,6 @@ void LLPanelPlaces::onOpen(const LLSD& key) mPosGlobal = hist_items[index].mGlobalPos; mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY); - mPlaceProfile->updateLastVisitedText(hist_items[index].mDate); mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); } diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 2be0781487..8155766b49 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -36,10 +36,12 @@ #include "lltrans.h" #include "llavataractions.h" #include "llagent.h" +#include "llimview.h" #include "llparticipantlist.h" #include "llavatarlist.h" #include "llspeakers.h" +#include "llviewermenu.h" //LLParticipantList retrieves add, clear and remove events and updates view accordingly #if LL_MSVC @@ -64,6 +66,9 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av mAvatarList->setDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList)); mAvatarList->setRefreshCompleteCallback(boost::bind(&LLParticipantList::onAvatarListRefreshed, this, _1, _2)); + mParticipantListMenu = new LLParticipantListMenu(*this); + mAvatarList->setContextMenu(mParticipantListMenu); + //Lets fill avatarList with existing speakers LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs(); @@ -83,6 +88,8 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av LLParticipantList::~LLParticipantList() { + delete mParticipantListMenu; + mParticipantListMenu = NULL; } void LLParticipantList::onAvatarListDoubleClicked(LLAvatarList* list) @@ -265,3 +272,139 @@ bool LLParticipantList::SpeakerModeratorUpdateListener::handleEvent(LLPointer<LL { return mParent.onModeratorUpdateEvent(event, userdata); } + +LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() +{ + // set up the callbacks for all of the avatar menu items + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; + + registrar.add("ParticipantList.ToggleAllowTextChat", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleAllowTextChat, this, _2)); + registrar.add("ParticipantList.ToggleMuteText", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleMuteText, this, _2)); + + enable_registrar.add("ParticipantList.EnableItem", boost::bind(&LLParticipantList::LLParticipantListMenu::enableContextMenuItem, this, _2)); + enable_registrar.add("ParticipantList.CheckItem", boost::bind(&LLParticipantList::LLParticipantListMenu::checkContextMenuItem, this, _2)); + + // create the context menu from the XUI + return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( + "menu_participant_list.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); +} + +void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& userdata) +{ + const LLUUID speaker_id = mUUIDs.front(); + + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "mute update"; + data["session-id"] = mParent.mSpeakerMgr->getSessionID(); + data["params"] = LLSD::emptyMap(); + data["params"]["agent_id"] = speaker_id; + data["params"]["mute_info"] = LLSD::emptyMap(); + //current value represents ability to type, so invert + data["params"]["mute_info"]["text"] = !mParent.mSpeakerMgr->findSpeaker(speaker_id)->mModeratorMutedText; + + class MuteTextResponder : public LLHTTPClient::Responder + { + public: + MuteTextResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + + if ( gIMMgr ) + { + //403 == you're not a mod + //should be disabled if you're not a moderator + if ( 403 == status ) + { + gIMMgr->showSessionEventError( + "mute", + "not_a_moderator", + mSessionID); + } + else + { + gIMMgr->showSessionEventError( + "mute", + "generic", + mSessionID); + } + } + } + + private: + LLUUID mSessionID; + }; + + LLHTTPClient::post( + url, + data, + new MuteTextResponder(mParent.mSpeakerMgr->getSessionID())); +} + +void LLParticipantList::LLParticipantListMenu::toggleMuteText(const LLSD& userdata) +{ + const LLUUID speaker_id = mUUIDs.front(); + BOOL is_muted = LLMuteList::getInstance()->isMuted(speaker_id, LLMute::flagTextChat); + std::string name; + + //fill in name using voice client's copy of name cache + LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(speaker_id); + if (speakerp.isNull()) + { + return; + } + + name = speakerp->mDisplayName; + + LLMute mute(speaker_id, name, speakerp->mType == LLSpeaker::SPEAKER_AGENT ? LLMute::AGENT : LLMute::OBJECT); + + if (!is_muted) + { + LLMuteList::getInstance()->add(mute, LLMute::flagTextChat); + } + else + { + LLMuteList::getInstance()->remove(mute, LLMute::flagTextChat); + } +} + +bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata) +{ + std::string item = userdata.asString(); + if (item == "can_mute_text") + { + return mUUIDs.front() != gAgentID; + } + else + if (item == "can_allow_text_chat") + { + LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mParent.mSpeakerMgr->getSessionID()); + return im_session->mType == IM_SESSION_GROUP_START && mParent.mSpeakerMgr->findSpeaker(gAgentID)->mIsModerator; + } + return true; +} + +bool LLParticipantList::LLParticipantListMenu::checkContextMenuItem(const LLSD& userdata) +{ + std::string item = userdata.asString(); + const LLUUID& id = mUUIDs.front(); + if (item == "is_muted") + return LLMuteList::getInstance()->isMuted(id, LLMute::flagTextChat); + else + if (item == "is_allowed_text_chat") + { + LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(id); + + if (selected_speakerp.notNull()) + { + return !selected_speakerp->mModeratorMutedText; + } + } + return false; +} diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index fc34dd308b..1ff1515d16 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -32,6 +32,8 @@ #include "llviewerprecompiledheaders.h" #include "llevent.h" +#include "llpanelpeoplemenus.h" +#include "llimview.h" class LLSpeakerMgr; class LLAvatarList; @@ -105,6 +107,25 @@ class LLParticipantList SpeakerModeratorUpdateListener(LLParticipantList& parent) : BaseSpeakerListner(parent) {} /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); }; + + /** + * Menu used in the participant list. + */ + class LLParticipantListMenu : public LLPanelPeopleMenus::ContextMenu + { + public: + LLParticipantListMenu(LLParticipantList& parent):mParent(parent){}; + /*virtual*/ LLContextMenu* createMenu(); + protected: + LLParticipantList& mParent; + private: + bool enableContextMenuItem(const LLSD& userdata); + bool checkContextMenuItem(const LLSD& userdata); + + void toggleAllowTextChat(const LLSD& userdata); + void toggleMuteText(const LLSD& userdata); + + }; private: void onAvatarListDoubleClicked(LLAvatarList* list); @@ -121,5 +142,7 @@ class LLParticipantList LLPointer<SpeakerClearListener> mSpeakerClearListener; LLPointer<SpeakerModeratorUpdateListener> mSpeakerModeratorListener; + LLParticipantListMenu* mParticipantListMenu; + EParticipantSortOrder mSortOrder; }; diff --git a/indra/newview/llrecentpeople.cpp b/indra/newview/llrecentpeople.cpp index b491c7e109..bd46b5b56a 100644 --- a/indra/newview/llrecentpeople.cpp +++ b/indra/newview/llrecentpeople.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llrecentpeople.h" +#include "llgroupmgr.h" #include "llagent.h" @@ -43,12 +44,18 @@ bool LLRecentPeople::add(const LLUUID& id) if (id == gAgent.getID()) return false; - LLDate date_added = LLDate::now(); + bool is_not_group_id = LLGroupMgr::getInstance()->getGroupData(id) == NULL; - //[] instead of insert to replace existing id->date with new date value - mPeople[id] = date_added; - mChangedSignal(); - return true; + if (is_not_group_id) + { + LLDate date_added = LLDate::now(); + + //[] instead of insert to replace existing id->date with new date value + mPeople[id] = date_added; + mChangedSignal(); + } + + return is_not_group_id; } bool LLRecentPeople::contains(const LLUUID& id) const diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index cefc88ebee..89649407ff 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -46,6 +46,7 @@ LLVoiceChannel::voice_channel_map_t LLVoiceChannel::sVoiceChannelMap; LLVoiceChannel::voice_channel_map_uri_t LLVoiceChannel::sVoiceChannelURIMap; LLVoiceChannel* LLVoiceChannel::sCurrentVoiceChannel = NULL; LLVoiceChannel* LLVoiceChannel::sSuspendedVoiceChannel = NULL; +LLVoiceChannel::channel_changed_signal_t LLVoiceChannel::sCurrentVoiceChannelChangedSignal; BOOL LLVoiceChannel::sSuspended = FALSE; @@ -320,6 +321,8 @@ void LLVoiceChannel::activate() { setState(STATE_CALL_STARTED); } + + sCurrentVoiceChannelChangedSignal(this->mSessionID); } void LLVoiceChannel::getChannelInfo() diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 8f1e9ff02d..20b6157b48 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -54,6 +54,13 @@ public: typedef boost::function<void(const EState& old_state, const EState& new_state)> state_changed_callback_t; + // on current channel changed signal + typedef boost::function<void(const LLUUID& session_id)> channel_changed_callback_t; + typedef boost::signals2::signal<void(const LLUUID& session_id)> channel_changed_signal_t; + static channel_changed_signal_t sCurrentVoiceChannelChangedSignal; + static boost::signals2::connection setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb) { return sCurrentVoiceChannelChangedSignal.connect(cb); } + + LLVoiceChannel(const LLUUID& session_id, const std::string& session_name); virtual ~LLVoiceChannel(); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index fba8e0b06c..0e533b1c0e 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -30,6 +30,8 @@ <texture name="Blank" file_name="Blank.png" preload="false" /> <texture name="BottomTray_BG" file_name="bottomtray/BottomTray_BG.png" preload="false" /> + <texture name="BottomTray_Scroll_Right" file_name="navbar/Arrow_Right_Off.png" preload="false" /> + <texture name="BottomTray_Scroll_Left" file_name="navbar/Arrow_Left_Off.png" preload="false" /> <texture name="BuyArrow_Off" file_name="navbar/BuyArrow_Off.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> <texture name="BuyArrow_Over" file_name="navbar/BuyArrow_Over.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml new file mode 100644 index 0000000000..c3283c6014 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="Participant List Context Menu"> + <menu_item_check + label="Mute Text" + layout="topleft" + name="MuteText"> + <on_check + function="ParticipantList.CheckItem" + parameter="is_muted" /> + <on_click + function="ParticipantList.ToggleMuteText" /> + <on_enable + function="ParticipantList.EnableItem" + parameter="can_mute_text" /> + </menu_item_check> + <menu_item_check + label="Allow text chat" + layout="topleft" + name="AllowTextChat"> + <on_check + function="ParticipantList.CheckItem" + parameter="is_allowed_text_chat" /> + <on_click + function="ParticipantList.ToggleAllowTextChat" /> + <on_enable + function="ParticipantList.EnableItem" + parameter="can_allow_text_chat" /> + </menu_item_check> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml index c002cd078f..39f9e48609 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml @@ -2,15 +2,36 @@ <menu name="menu_group_plus" left="0" bottom="0" visible="false" mouse_opaque="false" opaque="true" color="MenuDefaultBgColor" drop_shadow="false"> - <menu_item_call name="sort_recent" label="Sort by Recent Speakers"> - <menu_item_call.on_click function="People.Nearby.ViewSort.Action" userdata="sort_recent" /> - </menu_item_call> - <menu_item_call name="sort_name" label="Sort by Name"> - <menu_item_call.on_click function="People.Nearby.ViewSort.Action" userdata="sort_name" /> - </menu_item_call> - <menu_item_call name="sort_distance" label="Sort by Distance"> - <menu_item_call.on_click function="People.Nearby.ViewSort.Action" userdata="sort_distance" /> - </menu_item_call> + <menu_item_check + label="Sort by Recent Speakers" + name="sort_by_recent_speakers"> + <menu_item_check.on_click + function="People.Nearby.ViewSort.Action" + parameter="sort_by_recent_speakers"/> + <menu_item_check.on_check + function="People.Nearby.ViewSort.CheckItem" + parameter="sort_by_recent_speakers"/> + </menu_item_check> + <menu_item_check + label="Sort by Name" + name="sort_name"> + <menu_item_check.on_click + function="People.Nearby.ViewSort.Action" + parameter="sort_name"/> + <menu_item_check.on_check + function="People.Nearby.ViewSort.CheckItem" + parameter="sort_name"/> + </menu_item_check> + <menu_item_check + label="Sort by Distance" + name="sort_distance"> + <menu_item_check.on_click + function="People.Nearby.ViewSort.Action" + parameter="sort_distance"/> + <menu_item_check.on_check + function="People.Nearby.ViewSort.CheckItem" + parameter="sort_distance"/> + </menu_item_check> <menu_item_separator layout="topleft" /> <menu_item_check name="view_icons" label="View People Icons"> <menu_item_check.on_click diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index c5e129cf2f..34fa7dbef2 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -236,7 +236,32 @@ top="0" chiclet_padding="3" scrolling_offset="40" - width="189" /> + width="189"> + <button + auto_resize="true" + follows="right" + height="23" + image_selected="BottomTray_Scroll_Left" + image_unselected="BottomTray_Scroll_Left" + layout="topleft" + name="chicklet_left_scroll_button" + tab_stop="false" + top="3" + visible="false" + width="20" /> + <button + auto_resize="true" + follows="right" + height="23" + image_selected="BottomTray_Scroll_Right" + image_unselected="BottomTray_Scroll_Right" + layout="topleft" + name="chicklet_right_scroll_button" + tab_stop="false" + top="3" + visible="false" + width="20" /> + </chiclet_panel> </layout_panel> <icon auto_resize="false" diff --git a/indra/newview/skins/default/xui/en/panel_edit_pick.xml b/indra/newview/skins/default/xui/en/panel_edit_pick.xml index f4a212ba0a..d6de5af32d 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml @@ -53,7 +53,7 @@ layout="topleft" top="0" background_visible="false" - height="470" + height="510" left="0" width="295"> <texture_picker diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index 0c24adfad5..b01ddbf75a 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -43,6 +43,16 @@ name="acquired_date"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] </string> + <!-- Texture names for rating icons --> + <string + name="icon_PG" + value="parcel_drk_PG" /> + <string + name="icon_M" + value="parcel_drk_M" /> + <string + name="icon_R" + value="parcel_drk_R" /> <button follows="top|right" height="23" @@ -125,6 +135,24 @@ top_pad="10" value="Du waltz die spritz" width="300" /> + <icon + follows="top|left" + height="16" + image_name="unknown" + layout="topleft" + left="10" + name="maturity_icon" + top_pad="10" + width="18" /> + <text + follows="right|top" + height="16" + layout="topleft" + left_pad="8" + name="maturity_value" + top_delta="0" + value="unknown" + width="268" /> <panel follows="left|top|right" height="55" diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index 65f150b33c..e6084202d7 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -179,7 +179,6 @@ min_height="300" name="scrolling_panel" top="0" - value=">" width="313"> <texture_picker enabled="false" @@ -296,6 +295,24 @@ top_delta="0" value="Alex Superduperlongenamenton" width="205" /> + <icon + follows="top|left" + height="16" + image_name="unknown" + layout="topleft" + left="10" + name="maturity_icon" + top_delta="0" + width="18" /> + <text + follows="right|top" + height="16" + layout="topleft" + left_pad="8" + name="maturity_value" + top_delta="0" + value="unknown" + width="268" /> <accordion follows="all" height="230" @@ -308,222 +325,211 @@ layout="topleft" name="parcel_characteristics_tab" title="Parcel"> - <scroll_container - color="DkGray2" + <panel follows="all" - height="132" + height="160" layout="topleft" left="0" - name="parcel_scroll" - opaque="true" top="0" - width="290"> - <panel - follows="all" - height="165" + width="275"> + <icon + follows="top|left" + height="16" + image_name="parcel_drk_PG" layout="topleft" - left="0" + left="10" + name="rating_icon" top="0" - width="275"> - <icon - follows="top|left" - height="16" - image_name="parcel_drk_PG" - layout="topleft" - left="20" - name="rating_icon" - top="0" - width="18" /> - <text - follows="left|top" - height="16" - layout="topleft" - left_pad="8" - name="rating_label" - value="Rating:" - width="80" /> - <text - follows="right|top" - height="16" - layout="topleft" - left_pad="0" - name="rating_value" - top_delta="0" - value="unknown" - width="120" /> - <icon - follows="top|left" - height="18" - image_name="parcel_drk_Voice" - layout="topleft" - left="20" - name="voice_icon" - top_pad="5" - width="22" /> - <text - follows="left|top" - height="18" - layout="topleft" - left_pad="8" - name="voice_label" - top_delta="0" - value="Voice:" - width="76" /> - <text - follows="right|top" - height="18" - layout="topleft" - left_pad="0" - name="voice_value" - top_delta="0" - value="On" - width="60" /> - <icon - follows="top|left" - height="18" - image_name="parcel_drk_Fly" - layout="topleft" - left="20" - name="fly_icon" - top_pad="3" - width="22" /> - <text - follows="left|top" - height="16" - layout="topleft" - left_pad="8" - name="fly_label" - value="Fly:" - width="76" /> - <text - follows="right|top" - height="16" - layout="topleft" - left_pad="0" - name="fly_value" - top_delta="0" - value="On" - width="60" /> - <icon - follows="top|left" - height="18" - image_name="parcel_drk_Push" - layout="topleft" - left="20" - name="push_icon" - top_pad="3" - width="22" /> - <text - follows="left|top" - height="14" - layout="topleft" - left_pad="8" - name="push_label" - value="Push:" - width="76" /> - <text - follows="right|top" - height="14" - layout="topleft" - left_pad="0" - name="push_value" - top_delta="0" - value="Off" - width="60" /> - <icon - follows="top|left" - height="18" - image_name="parcel_drk_Build" - layout="topleft" - left="20" - name="build_icon" - top_pad="3" - width="22" /> - <text - follows="left|top" - height="14" - layout="topleft" - left_pad="8" - name="build_label" - value="Build:" - width="76" /> - <text - follows="right|top" - height="15" - layout="topleft" - left_pad="0" - name="build_value" - top_delta="0" - value="On" - width="60" /> - <icon - follows="top|left" - height="18" - image_name="parcel_drk_Scripts" - layout="topleft" - left="20" - name="scripts_icon" - top_pad="3" - width="22" /> - <text - follows="left|top" - height="14" - layout="topleft" - left_pad="8" - name="scripts_label" - value="Scripts:" - width="76" /> - <text - follows="right|top" - height="14" - layout="topleft" - left_pad="0" - name="scripts_value" - top_delta="0" - value="On" - width="60" /> - <icon - follows="top|left" - height="18" - image_name="parcel_drk_Damage" - layout="topleft" - left="20" - name="damage_icon" - top_pad="7" - width="22" /> - <text - follows="left|top" - height="14" - layout="topleft" - left_pad="8" - name="damage_label" - value="Damage:" - width="76" /> - <text - follows="right|top" - height="14" - layout="topleft" - left_pad="0" - name="damage_value" - top_delta="0" - value="Off" - width="60" /> - <button - follows="bottom|right" - height="19" - label="About Land" - layout="topleft" - name="about_land_btn" - right="-5" - tab_stop="false" - top="138" - width="90"> - <click_callback - function="ShowFloater" - parameter="about_land" /> - </button> - </panel> - </scroll_container> + width="18" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="12" + name="rating_label" + value="Rating:" + width="60" /> + <text + follows="left|right|top" + height="16" + layout="topleft" + left_pad="0" + name="rating_value" + top_delta="0" + value="unknown" + width="60" /> + <icon + follows="top|left" + height="18" + image_name="parcel_drk_Voice" + layout="topleft" + left="10" + name="voice_icon" + top_pad="5" + width="22" /> + <text + follows="left|top" + height="18" + layout="topleft" + left_pad="8" + name="voice_label" + top_delta="0" + value="Voice:" + width="60" /> + <text + follows="left|right|top" + height="18" + layout="topleft" + left_pad="0" + name="voice_value" + top_delta="0" + value="On" + width="60" /> + <icon + follows="top|left" + height="18" + image_name="parcel_drk_Fly" + layout="topleft" + left="10" + name="fly_icon" + top_pad="3" + width="22" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="8" + name="fly_label" + value="Fly:" + width="60" /> + <text + follows="left|right|top" + height="16" + layout="topleft" + left_pad="0" + name="fly_value" + top_delta="0" + value="On" + width="60" /> + <icon + follows="top|left" + height="18" + image_name="parcel_drk_Push" + layout="topleft" + left="10" + name="push_icon" + top_pad="3" + width="22" /> + <text + follows="left|top" + height="14" + layout="topleft" + left_pad="8" + name="push_label" + value="Push:" + width="60" /> + <text + follows="left|right|top" + height="14" + layout="topleft" + left_pad="0" + name="push_value" + top_delta="0" + value="Off" + width="60" /> + <icon + follows="top|left" + height="18" + image_name="parcel_drk_Build" + layout="topleft" + left="10" + name="build_icon" + top_pad="3" + width="22" /> + <text + follows="left|top" + height="14" + layout="topleft" + left_pad="8" + name="build_label" + value="Build:" + width="60" /> + <text + follows="left|right|top" + height="15" + layout="topleft" + left_pad="0" + name="build_value" + top_delta="0" + value="On" + width="60" /> + <icon + follows="top|left" + height="18" + image_name="parcel_drk_Scripts" + layout="topleft" + left="10" + name="scripts_icon" + top_pad="3" + width="22" /> + <text + follows="left|top" + height="14" + layout="topleft" + left_pad="8" + name="scripts_label" + value="Scripts:" + width="60" /> + <text + follows="left|right|top" + height="14" + layout="topleft" + left_pad="0" + name="scripts_value" + top_delta="0" + value="On" + width="60" /> + <icon + follows="top|left" + height="18" + image_name="parcel_drk_Damage" + layout="topleft" + left="10" + name="damage_icon" + top_pad="7" + width="22" /> + <text + follows="left|top" + height="14" + layout="topleft" + left_pad="8" + name="damage_label" + value="Damage:" + width="60" /> + <text + follows="left|right|top" + height="14" + layout="topleft" + left_pad="0" + name="damage_value" + top_delta="0" + value="Off" + width="60" /> + <button + follows="bottom|right" + height="19" + label="About Land" + layout="topleft" + name="about_land_btn" + right="-5" + tab_stop="false" + top="138" + width="90"> + <click_callback + function="ShowFloater" + parameter="about_land" /> + </button> + </panel> </accordion_tab> <accordion_tab expanded="false" @@ -545,7 +551,7 @@ name="region_name_label" top_pad="5" value="Region:" - width="80" /> + width="90" /> <text follows="left|top|right" height="15" @@ -554,7 +560,7 @@ name="region_name" top_delta="0" value="Mooseland" - width="195" /> + width="187" /> <text follows="left|top" height="15" @@ -563,7 +569,7 @@ name="region_type_label" top_pad="5" value="Type:" - width="80" /> + width="90" /> <text follows="left|top|right" height="15" @@ -572,7 +578,7 @@ name="region_type" top_delta="0" value="Moose" - width="195" /> + width="187" /> <text follows="left|top" height="15" @@ -581,7 +587,7 @@ name="region_rating_label" top_pad="7" value="Rating:" - width="80" /> + width="90" /> <icon follows="top|left" height="16" @@ -597,7 +603,7 @@ left_pad="10" name="region_rating" value="Explicit" - width="100" /> + width="159" /> <text follows="left|top" height="15" @@ -606,7 +612,7 @@ name="region_owner_label" top_pad="5" value="Owner:" - width="80" /> + width="90" /> <text follows="left|top|right" height="15" @@ -615,7 +621,7 @@ name="region_owner" top_delta="0" value="moose Van Moose" - width="195" /> + width="187" /> <text follows="left|top" height="15" @@ -624,7 +630,7 @@ name="region_group_label" top_pad="5" value="Group:" - width="80" /> + width="90" /> <text follows="left|top|right" height="15" @@ -633,7 +639,7 @@ name="region_group" top_delta="0" use_ellipses="true" - width="195"> + width="187"> The Mighty Moose of mooseville soundvillemoose </text> <button @@ -671,15 +677,15 @@ name="estate_name_label" top_pad="5" value="Estate:" - width="80" /> + width="90" /> <text follows="left|top|right" height="15" layout="topleft" - left="90" + left_pad="0" name="estate_name" top_delta="0" - width="160" /> + width="187" /> <text follows="left|top" height="15" @@ -688,15 +694,15 @@ name="estate_rating_label" top_pad="5" value="Rating:" - width="80" /> + width="90" /> <text follows="left|top|right" height="15" layout="topleft" - left="90" + left_pad="0" name="estate_rating" top_delta="0" - width="160" /> + width="187" /> <text follows="left|top" height="15" @@ -705,15 +711,15 @@ name="estate_owner_label" top_pad="5" value="Owner:" - width="80" /> + width="90" /> <text follows="left|top|right" height="15" layout="topleft" - left="90" + left_pad="0" name="estate_owner" top_delta="0" - width="160" /> + width="187" /> <text follows="left|top" height="15" @@ -722,7 +728,7 @@ name="covenant_label" top_pad="5" value="Covenant:" - width="220" /> + width="277" /> <text_editor bg_focus_color="DkGray2" bg_readonly_color="DkGray2" @@ -735,7 +741,8 @@ name="covenant" read_only="true" top_pad="0" - width="280" /> + width="277" + word_wrap="true" /> </panel> </accordion_tab> <accordion_tab @@ -758,15 +765,15 @@ name="sales_price_label" top_pad="5" value="Price:" - width="100" /> + width="90" /> <text follows="left|top|right" height="15" layout="topleft" - left="110" + left_pad="0" name="sales_price" top_delta="0" - width="140" /> + width="187" /> <text follows="left|top" height="15" @@ -775,15 +782,15 @@ name="area_label" top_pad="5" value="Area:" - width="100" /> + width="90" /> <text follows="left|top|right" height="15" layout="topleft" - left="110" + left_pad="0" name="area" top_delta="0" - width="140" /> + width="187" /> <text follows="left|top" height="15" @@ -792,15 +799,15 @@ name="traffic_label" top_pad="5" value="Traffic:" - width="100" /> + width="90" /> <text follows="left|top|right" height="15" layout="topleft" - left="110" + left_pad="0" name="traffic" top_delta="0" - width="140" /> + width="187" /> <text follows="left|top" height="15" @@ -809,15 +816,15 @@ name="primitives_label" top_pad="5" value="Primitives:" - width="100" /> + width="90" /> <text follows="left|top|right" height="15" layout="topleft" - left="110" + left_pad="0" name="primitives" top_delta="0" - width="140" /> + width="187" /> <text follows="left|top" height="15" @@ -826,15 +833,15 @@ name="parcel_scripts_label" top_pad="5" value="Scripts:" - width="100" /> + width="90" /> <text follows="left|top|right" height="15" layout="topleft" - left="110" + left_pad="0" name="parcel_scripts" top_delta="0" - width="140" /> + width="187" /> <text follows="left|top" height="15" @@ -843,15 +850,15 @@ name="terraform_limits_label" top_pad="5" value="Terraform limits:" - width="100" /> + width="90" /> <text follows="left|top|right" height="15" layout="topleft" - left="110" + left_pad="0" name="terraform_limits" top_delta="0" - width="140" /> + width="187" /> <text follows="left|top" height="15" @@ -860,7 +867,7 @@ name="subdivide_label" top_pad="5" value="Subdivide/Join ability:" - width="220" /> + width="277" /> <text_editor bg_focus_color="DkGray2" bg_readonly_color="DkGray2" @@ -872,7 +879,8 @@ name="subdivide" read_only="true" top_pad="5" - width="245" /> + width="277" + word_wrap="true" /> <text follows="left|top" height="15" @@ -881,7 +889,7 @@ name="resale_label" top_pad="5" value="ReSale ability:" - width="80" /> + width="277" /> <text_editor bg_focus_color="DkGray2" bg_readonly_color="DkGray2" @@ -893,7 +901,8 @@ name="resale" read_only="true" top_pad="5" - width="245" /> + width="277" + word_wrap="true" /> <text follows="left|top" height="15" @@ -902,15 +911,15 @@ name="sale_to_label" top_pad="5" value="For sale to:" - width="80" /> + width="90" /> <text follows="left|top|right" height="15" layout="topleft" - left="90" + left_pad="0" name="sale_to" top_delta="0" - width="160" /> + width="187" /> </panel> </accordion_tab> </accordion> diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index cbbcfe5068..5efacb68be 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -104,7 +104,7 @@ background_visible="true" follows="bottom|right" font="SansSerifSmall" height="19" - image_disabled="ForwardArrow_Disabled" + image_disabled="ForwardArrow_Off" image_selected="ForwardArrow_Press" image_unselected="ForwardArrow_Off" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index b1308a1942..9b10edde33 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -109,19 +109,7 @@ name="ui_scale_slider" top_pad="2" width="180" /> - <spinner - control_name="UIScaleFactor" - height="16" - increment="0.025" - initial_value="1" - layout="topleft" - left_pad="10" - max_val="1.4" - min_val="0.75" - name="ui_scale_slider" - top_delta="0" - width="58" /> - <text + <text type="string" length="1" follows="left|top" |