diff options
49 files changed, 1131 insertions, 718 deletions
diff --git a/indra/llcommon/llversionserver.h b/indra/llcommon/llversionserver.h index c0fc06ee6e..23e39ceb08 100644 --- a/indra/llcommon/llversionserver.h +++ b/indra/llcommon/llversionserver.h @@ -36,7 +36,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 29; const S32 LL_VERSION_PATCH = 0; -const S32 LL_VERSION_BUILD = 120909; +const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Server"; diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6ec4fbbcd5..9510dcd9cc 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -297,6 +297,7 @@ set(viewer_SOURCE_FILES llpanellandmarks.cpp llpanellandmedia.cpp llpanellogin.cpp + llpanelmedia.cpp llpanelmeprofile.cpp llpanelobject.cpp llpanelpeople.cpp @@ -307,6 +308,7 @@ set(viewer_SOURCE_FILES llpanelplaceinfo.cpp llpanelplaces.cpp llpanelplacestab.cpp + llpanelprofile.cpp llpanelprofileview.cpp llpanelteleporthistory.cpp llpanelvolume.cpp @@ -719,6 +721,7 @@ set(viewer_HEADER_FILES llpanellandmarks.h llpanellandmedia.h llpanellogin.h + llpanelmedia.h llpanelmeprofile.h llpanelobject.h llpanelpeople.h @@ -729,6 +732,7 @@ set(viewer_HEADER_FILES llpanelplaceinfo.h llpanelplaces.h llpanelplacestab.h + llpanelprofile.h llpanelprofileview.h llpanelteleporthistory.h llpanelvolume.h diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings index 0a1235b85d..735424c647 100644 --- a/indra/newview/English.lproj/InfoPlist.strings +++ b/indra/newview/English.lproj/InfoPlist.strings @@ -2,6 +2,6 @@ CFBundleName = "Second Life"; -CFBundleShortVersionString = "Second Life version 1.24.0.0"; -CFBundleGetInfoString = "Second Life version 1.24.0.0, Copyright 2004-2008 Linden Research, Inc."; +CFBundleShortVersionString = "Second Life version 2.0.0.0"; +CFBundleGetInfoString = "Second Life version 2.0.0.0, Copyright 2004-2009 Linden Research, Inc."; diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist index baa5ccf1b9..7264044d37 100644 --- a/indra/newview/Info-SecondLife.plist +++ b/indra/newview/Info-SecondLife.plist @@ -32,7 +32,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>1.24.0.0</string> + <string>2.0.0.0</string> <key>CSResourcesFileMapped</key> <true/> </dict> diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp index 5a92888cef..ecd67e44ae 100644 --- a/indra/newview/llavatarpropertiesprocessor.cpp +++ b/indra/newview/llavatarpropertiesprocessor.cpp @@ -306,7 +306,7 @@ void LLAvatarPropertiesProcessor::processPickInfoReply(LLMessageSystem* msg, voi msg->getS32(_PREHASH_Data, _PREHASH_SortOrder, pick_data.sort_order); msg->getBOOL(_PREHASH_Data, _PREHASH_Enabled, pick_data.enabled); - notifyObservers(pick_data.agent_id, &pick_data, APT_PICK_INFO); + notifyObservers(pick_data.creator_id, &pick_data, APT_PICK_INFO); } void LLAvatarPropertiesProcessor::processAvatarGroupsReply(LLMessageSystem* msg, void**) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 604a77dac0..136316fbbe 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -34,7 +34,8 @@ #include "llbottomtray.h" #include "llagent.h" #include "llchiclet.h" -#include "lllayoutstack.h" +#include "llfloaterreg.h" +#include "llflyoutbutton.h" #include "llkeyboard.h" #include "llgesturemgr.h" #include "llanimationstates.h" @@ -54,15 +55,22 @@ LLBottomTray* gBottomTray = NULL; LLBottomTray::LLBottomTray() : mLastSpecialChatChannel(0) , mGestureLabelTimer() + , mChatBox(NULL) + , mChicletPanel(NULL) + , mIMWell(NULL) + , mSysWell(NULL) + , mTalkBtn(NULL) + , mGestureCombo(NULL) { LLUICtrlFactory::getInstance()->buildPanel(this,"panel_bottomtray.xml"); mChicletPanel = getChild<LLChicletPanel>("chiclet_list",TRUE,FALSE); mIMWell = getChild<LLNotificationChiclet>("im_well",TRUE,FALSE); mSysWell = getChild<LLNotificationChiclet>("sys_well",TRUE,FALSE); - mSeparator = getChild<LLViewBorder>("well_separator",TRUE,FALSE); mChatBox = getChild<LLLineEditor>("chat_box",TRUE,FALSE); + mChicletPanel->setChicletClickCallback(boost::bind(&LLBottomTray::onChicletClick,this,_1)); + if (mChatBox) { mChatBox->setCommitCallback(boost::bind(&LLBottomTray::onChatBoxCommit, this)); @@ -109,12 +117,20 @@ LLBottomTray::~LLBottomTray() } } +void LLBottomTray::onChicletClick(LLUICtrl* ctrl) +{ + LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(ctrl); + if (chiclet) + { + LLFloaterReg::showInstance("communicate", chiclet->getIMSessionId()); + } +} + void LLBottomTray::onChatBoxCommit() { if (mChatBox && mChatBox->getText().length() > 0) { sendChat(CHAT_TYPE_NORMAL); - mChatBox->setText(LLStringExplicit("")); } gAgent.stopTyping(); @@ -269,6 +285,17 @@ void LLBottomTray::refresh() } } +void LLBottomTray::updateRightPosition(const S32 new_right_position) +{ + LLRect rc = getRect(); + if (new_right_position != rc.mRight) + { + rc.mRight = new_right_position; + reshape(rc.getWidth(), rc.getHeight(), FALSE); + setRect(rc); + } +} + void LLBottomTray::onCommitGesture(LLUICtrl* ctrl) { LLCtrlListInterface* gestures = mGestureCombo ? mGestureCombo->getListInterface() : NULL; @@ -357,15 +384,13 @@ void LLBottomTray::sessionAdded(const LLUUID& session_id, const std::string& nam { if(getChicletPanel()) { - LLSD sid(session_id); - - if(getChicletPanel()->findIMChiclet(&sid)) + if(getChicletPanel()->findIMChiclet(session_id)) { } else { - LLIMChiclet* chicklet = (LLIMChiclet *)getChicletPanel()->createChiclet(&sid); + LLIMChiclet* chicklet = (LLIMChiclet *)getChicletPanel()->createChiclet(session_id); chicklet->setIMSessionName(name); chicklet->setOtherParticipantId(other_participant_id); } @@ -377,8 +402,7 @@ void LLBottomTray::sessionRemoved(const LLUUID& session_id) { if(getChicletPanel()) { - LLSD sid(session_id); - getChicletPanel()->removeIMChiclet(&sid); + getChicletPanel()->removeIMChiclet(session_id); } } @@ -391,25 +415,52 @@ void LLBottomTray::onFocusLost() } } +// virtual +BOOL LLBottomTray::handleKeyHere( KEY key, MASK mask ) +{ + BOOL handled = FALSE; + + // ALT-RETURN is reserved for windowed/fullscreen toggle + if( KEY_RETURN == key && mask == MASK_CONTROL) + { + // shout + sendChat(CHAT_TYPE_SHOUT); + handled = TRUE; + } + + return handled; +} + //virtual -void LLBottomTray::onVisibilityChange(BOOL curVisibilityIn) +// setVisible used instead of onVisibilityChange, since LLAgent calls it on entering/leaving mouselook mode. +// If bottom tray is already visible in mouselook mode, then onVisibilityChange will not be called from setVisible(true), +void LLBottomTray::setVisible(BOOL visible) { + LLPanel::setVisible(visible); + + BOOL visibility = gAgent.cameraMouselook() ? false : true; - if (mChicletPanel && mChicletPanel->getVisible() == visibility) + LLViewBorder* separator = getChild<LLViewBorder>("well_separator",TRUE,FALSE); + + if (separator && separator->getVisible() == visibility) return; - if (mChicletPanel) - mChicletPanel->setVisible(visibility); + if (separator) + separator->setVisible(visibility); - if (mIMWell) - mIMWell->setVisible(visibility); + LLPanel* p = getChild<LLPanel>("chiclet_list_panel",TRUE,FALSE); + if (p) + p->setVisible(visibility); - if (mSysWell) - mSysWell->setVisible(visibility); + p = getChild<LLPanel>("im_well_panel",TRUE,FALSE); + if (p) + p->setVisible(visibility); + + p = getChild<LLPanel>("sys_well_panel",TRUE,FALSE); + if (p) + p->setVisible(visibility); - if (mSeparator) - mSeparator->setVisible(visibility); } void LLBottomTray::sendChat( EChatType type ) @@ -446,6 +497,8 @@ void LLBottomTray::sendChat( EChatType type ) sendChatFromViewer(utf8_revised_text, type, TRUE); } } + + mChatBox->setText(LLStringExplicit("")); } gAgent.stopTyping(); diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 7d842a0aad..9a773773e9 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -34,20 +34,19 @@ #define LL_LLBOTTOMPANEL_H #include "llpanel.h" -#include "llflyoutbutton.h" #include "llimview.h" #include "llchat.h" #include "llgesturemgr.h" class LLChicletPanel; class LLNotificationChiclet; -class LLNotificationChiclet; class LLTalkButton; +class LLComboBox; class LLBottomTray : public LLPanel , public LLIMSessionObserver - , LLGestureManagerObserver + , public LLGestureManagerObserver { public: LLBottomTray(); @@ -66,6 +65,7 @@ public: static void onChatBoxFocusLost(LLFocusableElement* caller, void* userdata); void refresh(); + void updateRightPosition(const S32 new_right_position); void onCommitGesture(LLUICtrl* ctrl); void refreshGestures(); @@ -78,13 +78,16 @@ public: virtual void changed() { refreshGestures(); } virtual void onFocusLost(); - virtual void onVisibilityChange(BOOL curVisibilityIn); + virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual void setVisible(BOOL visible); protected: void sendChat( EChatType type ); LLWString stripChannelNumber(const LLWString &mesg, S32* channel); + void onChicletClick(LLUICtrl* ctrl); + // Which non-zero channel did we last chat on? S32 mLastSpecialChatChannel; @@ -92,13 +95,11 @@ protected: LLChicletPanel* mChicletPanel; LLNotificationChiclet* mIMWell; LLNotificationChiclet* mSysWell; - LLViewBorder* mSeparator; LLTalkButton* mTalkBtn; LLComboBox* mGestureCombo; LLFrameTimer mGestureLabelTimer; }; extern LLBottomTray* gBottomTray; -extern S32 BOTTOM_TRAY_HEIGHT; #endif // LL_LLBOTTOMPANEL_H diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 29845fff5e..4413212361 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -32,7 +32,6 @@ #include "llviewerprecompiledheaders.h" // must be first include #include "llchiclet.h" -#include "llfloaterreg.h" #include "llvoiceclient.h" #include "llagent.h" #include "lltextbox.h" @@ -165,7 +164,7 @@ LLIMChiclet::LLIMChiclet(const LLChiclet::Params& p) , mAvatar(NULL) , mCounterText(NULL) , mSpeaker(NULL) -, mIMSessionId() +, mIMSessionId(LLUUID::null) , mShowSpeaker(false) , mSpeakerStatus(SPEAKER_IDLE) { @@ -204,10 +203,10 @@ LLIMChiclet::~LLIMChiclet() } -LLChiclet* LLIMChiclet::create(LLSD* imSessionId /* = NULL */) +LLChiclet* LLIMChiclet::create(const LLUUID& im_session_id /* = LLUUID::null */) { LLIMChiclet* chiclet = new LLIMChiclet(LLChiclet::Params()); - chiclet->setIMSessionId(imSessionId); + chiclet->setIMSessionId(im_session_id); return chiclet; } @@ -265,7 +264,7 @@ void LLIMChiclet::setShowSpeaker(bool show) void LLIMChiclet::draw() { LLUICtrl::draw(); - gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 1, LLColor4(0.0f,0.0f,0.0f,1.f), FALSE); + gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4(0.0f,0.0f,0.0f,1.f), FALSE); } S32 LLIMChiclet::calcCounterWidth() @@ -319,8 +318,9 @@ LLChicletPanel::~LLChicletPanel() } void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ - - LLChiclet* chiclet = panel->findIMChiclet(&data["session_id"]); + + LLUUID session_id = data["session_id"].asUUID(); + LLChiclet* chiclet = panel->findIMChiclet(session_id); if (chiclet) { @@ -328,7 +328,7 @@ void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ } else { - llwarns << "Unable to set counter for chiclet " << data["session_id"].asUUID() << llendl; + llwarns << "Unable to set counter for chiclet " << session_id << llendl; } } @@ -341,9 +341,9 @@ BOOL LLChicletPanel::postBuild() return TRUE; } -LLChiclet* LLChicletPanel::createChiclet(LLSD* imSessionId, S32 pos) +LLChiclet* LLChicletPanel::createChiclet(const LLUUID& im_session_id /* = LLUUID::null */, S32 pos /* = 0 */) { - LLChiclet* chiclet = LLIMChiclet::create(imSessionId); + LLChiclet* chiclet = LLIMChiclet::create(im_session_id); if(!chiclet) { assert(false); @@ -388,20 +388,15 @@ void LLChicletPanel::onChicletClick(LLUICtrl*ctrl,const LLSD¶m) LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(ctrl); if (chiclet) { - LLFloaterReg::showInstance("communicate", chiclet->getIMSessionId().asUUID()); + S32 x, y; + LLRect rect = getRect(); + localPointToScreen(rect.getCenterX(), 0, &x, &y); + LLIMFloater::show(chiclet->getIMSessionId(), x); } - - S32 x, y; - LLRect rect = chiclet->getRect(); - - localPointToScreen(rect.getCenterX(), 0, &x, &y); - LLIMFloater::show(chiclet->getIMSessionId().asUUID(), x); - mCommitSignal(ctrl,param); } - -LLChiclet* LLChicletPanel::findIMChiclet(const LLSD* imSessionId) +LLChiclet* LLChicletPanel::findIMChiclet(const LLUUID& im_session_id) { chiclet_list_t::const_iterator it = mChicletList.begin(); for( ; mChicletList.end() != it; ++it) @@ -413,7 +408,7 @@ LLChiclet* LLChicletPanel::findIMChiclet(const LLSD* imSessionId) continue; } - if(chiclet->getIMSessionId().asUUID() == imSessionId->asUUID()) + if(chiclet->getIMSessionId() == im_session_id) { return chiclet; } @@ -472,7 +467,7 @@ void LLChicletPanel::removeChiclet(LLChiclet*chiclet) } } -void LLChicletPanel::removeIMChiclet(const LLSD* imSessionId) +void LLChicletPanel::removeIMChiclet(const LLUUID& im_session_id) { chiclet_list_t::iterator it = mChicletList.begin(); for( ; mChicletList.end() != it; ++it) @@ -484,7 +479,7 @@ void LLChicletPanel::removeIMChiclet(const LLSD* imSessionId) continue; } - if(chiclet->getIMSessionId().asUUID() == imSessionId->asUUID()) + if(chiclet->getIMSessionId() == im_session_id) { removeChiclet(it); return; diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index d861a528b5..ceda61adea 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -78,15 +78,15 @@ protected: class LLIMChiclet : public LLChiclet { public: - static LLChiclet* create(LLSD* imSessionId = NULL); + static LLChiclet* create(const LLUUID& im_session_id = LLUUID::null); void setCounter(S32); S32 getCounter() {return mCounter;}; - const LLSD& getIMSessionId() const {return mIMSessionId;}; + const LLUUID& getIMSessionId() const {return mIMSessionId;}; - void setIMSessionId(LLSD* imSessionId) {if (imSessionId) mIMSessionId = *imSessionId;}; + void setIMSessionId(const LLUUID& im_session_id) { mIMSessionId = im_session_id; } void setIMSessionName(const std::string& name); void setOtherParticipantId(const LLUUID& other_participant_id); @@ -126,7 +126,7 @@ protected: LLTextBox* mCounterText; LLIconCtrl* mSpeaker; - LLSD mIMSessionId; + LLUUID mIMSessionId; bool mShowSpeaker; SpeakerStatus mSpeakerStatus; }; @@ -182,13 +182,13 @@ public: ~LLChicletPanel(); - LLChiclet* createChiclet(LLSD* imSessionId = NULL, S32 pos = 0); + LLChiclet* createChiclet(const LLUUID& im_session_id = LLUUID::null, S32 pos = 0); bool addChiclet(LLChiclet*, S32 pos); LLChiclet* getChiclet(S32 pos); - LLChiclet* findIMChiclet(const LLSD* imSessionId); + LLChiclet* findIMChiclet(const LLUUID& im_session_id); S32 getChicletCount() {return mChicletList.size();}; @@ -196,7 +196,7 @@ public: void removeChiclet(LLChiclet*); - void removeIMChiclet(const LLSD* imSessionId); + void removeIMChiclet(const LLUUID& im_session_id); void removeAll(); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index a31d7daff7..f8dd35e956 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -51,6 +51,7 @@ #include "llresmgr.h" #include "llfloaterchat.h" #include "llfloaterchatterbox.h" +#include "llfriendactions.h" #include "llhttpnode.h" #include "llimpanel.h" #include "llresizebar.h" diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index c7ef6e16f7..99f6823ba1 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -50,7 +50,6 @@ #include "llinventorymodel.h" #include "lllandmarklist.h" #include "lllocationhistory.h" -#include "llpanelplaces.h" #include "llsidetray.h" #include "llviewerinventory.h" #include "llviewerparcelmgr.h" @@ -352,10 +351,7 @@ void LLLocationInputCtrl::onFocusLost() void LLLocationInputCtrl::onInfoButtonClicked() { - LLSD key; - key["type"] = LLPanelPlaces::AGENT; - - LLSideTray::getInstance()->showPanel("panel_places", key); + LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "agent")); } void LLLocationInputCtrl::onAddLandmarkButtonClicked() diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 5c572b8fcd..e3c4167d73 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -43,7 +43,6 @@ #include "lltexteditor.h" #include "lltexturectrl.h" #include "lltooldraganddrop.h" -#include "llviewermenu.h" // *FIX: for is_agent_friend() #include "llscrollcontainer.h" #include "llweb.h" @@ -140,7 +139,6 @@ LLPanelProfileTab::LLPanelProfileTab(const Params& params ) LLPanelProfileTab::~LLPanelProfileTab() { - // *TODO Vadim: use notNull() instead. (there are several similar cases below) if(mAvatarId.notNull()) { LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this); @@ -166,6 +164,11 @@ void LLPanelProfileTab::setProfileType() mProfileType = (gAgentID == mAvatarId) ? PT_OWN : PT_OTHER; } +void LLPanelProfileTab::onOpen(const LLSD& key) +{ + onActivate(key); +} + void LLPanelProfileTab::onActivate(const LLUUID& id) { setAvatarId(id); @@ -293,7 +296,7 @@ void LLPanelAvatarProfile::processProperties(void* data, EAvatarProcessorType ty bool online = avatar_data->flags & AVATAR_ONLINE; - if(is_agent_friend(avatar_data->avatar_id)) + if(LLFriendActions::isFriend(avatar_data->avatar_id)) { // Online status NO could be because they are hidden // If they are a friend, we may know the truth! @@ -533,7 +536,7 @@ void LLPanelAvatarProfile::updateChildrenList() childSetVisible("partner_edit_link", false); //hide for friends - childSetEnabled("add_friend", !is_agent_friend(getAvatarId())); + childSetEnabled("add_friend", !LLFriendActions::isFriend(getAvatarId())); //need to update profile view on every activate mUpdated = false; @@ -727,5 +730,5 @@ void LLPanelAvatarNotes::onActivate(const LLUUID& id) void LLPanelAvatarNotes::updateChildrenList() { //hide for friends - childSetEnabled("add_friend", !is_agent_friend(getAvatarId())); + childSetEnabled("add_friend", !LLFriendActions::isFriend(getAvatarId())); } diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h index 8bfa386d55..2b0fbaf193 100644 --- a/indra/newview/llpanelavatar.h +++ b/indra/newview/llpanelavatar.h @@ -34,37 +34,10 @@ #define LL_LLPANELAVATAR_H #include "llpanel.h" -#include "v3dmath.h" -#include "lluuid.h" -#include "llwebbrowserctrl.h" - #include "llavatarpropertiesprocessor.h" -class LLButton; -class LLCheckBoxCtrl; class LLComboBox; -class LLDropTarget; -class LLInventoryItem; class LLLineEditor; -class LLNameEditor; -class LLPanelAvatar; -class LLScrollListCtrl; -class LLTabContainer; -class LLTextBox; -class LLTextEditor; -class LLTextureCtrl; -class LLUICtrl; -class LLViewerImage; -class LLViewerObject; -class LLMessageSystem; -class LLIconCtrl; -class LLWebBrowserCtrl; -class LLVector3d; -class LLFloaterReg; - -class LLPanelMeProfile; -class LLPanelPick; -class LLAgent; enum EOnlineStatus { @@ -87,7 +60,9 @@ public: const LLUUID& getAvatarId(){return mAvatarId;} virtual void updateData() = 0; - + + virtual void onOpen(const LLSD& key); + virtual void onActivate(const LLUUID& id); typedef enum e_profile_type @@ -138,16 +113,6 @@ public: /*virtual*/ BOOL postBuild(void); /*virtual*/ void onOpen(const LLSD& key); - void onAddFriendButtonClick(); - - void onIMButtonClick(); - - void onCallButtonClick(); - - void onTeleportButtonClick(); - - void onShareButtonClick(); - private: bool isOwnProfile(){return PT_OWN == mProfileType;} bool isEditMode(){return mEditMode;} @@ -162,6 +127,13 @@ private: void onMyAccountTextboxClicked(); void onPartnerEditTextboxClicked(); + void onAddFriendButtonClick(); + void onIMButtonClick(); + void onCallButtonClick(); + void onTeleportButtonClick(); + void onShareButtonClick(); + + protected: bool mEditMode; diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index d1164dafb8..6fad582eee 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -262,7 +262,7 @@ void LLLandmarksPanel::onSelectorButtonClicked() if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK) { LLSD key; - key["type"] = LLPanelPlaces::LANDMARK; + key["type"] = "landmark"; key["id"] = listenerp->getUUID(); LLSideTray::getInstance()->showPanel("panel_places", key); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index b6141384f7..82c8f97d4d 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -326,7 +326,6 @@ LLPanelPeople::~LLPanelPeople() delete mGroupListUpdater; LLView::deleteViewByHandle(mGroupPlusMenuHandle); - LLView::deleteViewByHandle(mGroupMinusMenuHandle); } BOOL LLPanelPeople::postBuild() @@ -377,9 +376,6 @@ BOOL LLPanelPeople::postBuild() registrar.add("People.Group.Plus.Action", boost::bind(&LLPanelPeople::onGroupPlusMenuItemClicked, this, _2)); LLMenuGL* plus_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_group_plus.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mGroupPlusMenuHandle = plus_menu->getHandle(); - registrar.add("People.Group.Minus.Action", boost::bind(&LLPanelPeople::onGroupMinusMenuItemClicked, this, _2)); - LLMenuGL* minus_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_group_minus.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - mGroupMinusMenuHandle = minus_menu->getHandle(); // Perform initial update. mFriendListUpdater->forceUpdate(); @@ -430,7 +426,12 @@ bool LLPanelPeople::updateRecentList() bool LLPanelPeople::updateGroupList() { - return mGroupList->update(mFilterSubString); + bool have_names = mGroupList->update(mFilterSubString); + + if (mGroupList->isEmpty()) + mGroupList->setCommentText(getString("no_groups")); + + return have_names; } bool LLPanelPeople::filterFriendList() @@ -742,11 +743,9 @@ void LLPanelPeople::onGroupPlusButtonClicked() void LLPanelPeople::onGroupMinusButtonClicked() { - LLMenuGL* minus_menu = (LLMenuGL*)mGroupMinusMenuHandle.get(); - if (!minus_menu) - return; - - showGroupMenu(minus_menu); + LLUUID group_id = getCurrentItemID(); + if (group_id.notNull()) + LLGroupActions::leave(group_id); } void LLPanelPeople::onGroupPlusMenuItemClicked(const LLSD& userdata) @@ -759,19 +758,6 @@ void LLPanelPeople::onGroupPlusMenuItemClicked(const LLSD& userdata) LLGroupActions::create(); } -void LLPanelPeople::onGroupMinusMenuItemClicked(const LLSD& userdata) -{ - std::string chosen_item = userdata.asString(); - - LLUUID group_id = getCurrentItemID(); - if (chosen_item == "leave_group") - LLGroupActions::leave(group_id); - /* - else if (chosen_item == "delete_group") - ; // *TODO: how to delete a group? - */ -} - void LLPanelPeople::onCallButtonClicked() { // *TODO: not implemented yet @@ -794,5 +780,10 @@ void LLPanelPeople::onMoreButtonClicked() void LLPanelPeople::onOpen(const LLSD& key) { - reSelectedCurrentTab(); + std::string tab_name = key.asString(); + + if (!tab_name.empty()) + mTabContainer->selectTabByName(tab_name); + else + reSelectedCurrentTab(); } diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 4855096750..1131790106 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -96,7 +96,6 @@ private: void onGroupPlusButtonClicked(); void onGroupMinusButtonClicked(); void onGroupPlusMenuItemClicked(const LLSD& userdata); - void onGroupMinusMenuItemClicked(const LLSD& userdata); // misc callbacks bool onFriendListUpdate(U32 changed_mask); @@ -113,7 +112,6 @@ private: LLGroupList* mGroupList; LLHandle<LLView> mGroupPlusMenuHandle; - LLHandle<LLView> mGroupMinusMenuHandle; Updater* mFriendListUpdater; Updater* mNearbyListUpdater; diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp index cb47759a49..2bcead425a 100644 --- a/indra/newview/llpanelpick.cpp +++ b/indra/newview/llpanelpick.cpp @@ -102,6 +102,11 @@ void LLPanelPick::reset() setLocation(""); mSnapshotCtrl->setImageAssetID(LLUUID::null); + //*HACK just setting asset id to NULL not enough to clear + //the texture controls, w/o setValid(FALSE) it continues to + //draw the previously set image + mSnapshotCtrl->setValid(FALSE); + mDataReceived = FALSE; mPosGlobal.clearVec(); @@ -113,25 +118,24 @@ BOOL LLPanelPick::postBuild() if (mEditMode) { - childSetAction("cancel_btn", onClickCancel, this); - childSetAction("set_to_curr_location_btn", onClickSet, this); - childSetAction(XML_BTN_SAVE, onClickSave, this); + childSetAction("cancel_btn", boost::bind(&LLPanelPick::onClickCancel, this)); + childSetAction("set_to_curr_location_btn", boost::bind(&LLPanelPick::onClickSet, this)); + childSetAction(XML_BTN_SAVE, boost::bind(&LLPanelPick::onClickSave, this)); mSnapshotCtrl->setMouseEnterCallback(boost::bind(&LLPanelPick::childSetVisible, this, "edit_icon", true)); mSnapshotCtrl->setMouseLeaveCallback(boost::bind(&LLPanelPick::childSetVisible, this, "edit_icon", false)); } else { - childSetAction("edit_btn", onClickEdit, this); - childSetAction("teleport_btn", onClickTeleport, this); - childSetAction("show_on_map_btn", onClickMap, this); + childSetAction("edit_btn", boost::bind(&LLPanelPick::onClickEdit, this)); + childSetAction("teleport_btn", boost::bind(&LLPanelPick::onClickTeleport, this)); + childSetAction("show_on_map_btn", boost::bind(&LLPanelPick::onClickMap, this)); - if (mExitFunction && mExitData) + if (!mBackCb.empty()) { - childSetAction("back_btn", mExitFunction, mExitData); + LLButton* button = findChild<LLButton>("back_btn"); + if (button) button->setClickedCallback(mBackCb); } - - //*TODO set on menu } return TRUE; @@ -165,6 +169,9 @@ void LLPanelPick::init(LLPickData *pick_data) setLocation(pick_data->location_text); mSnapshotCtrl->setImageAssetID(pick_data->snapshot_id); + //*HACK see reset() where the texture control was set to FALSE + mSnapshotCtrl->setValid(TRUE); + mPosGlobal = pick_data->pos_global; mSimName = pick_data->sim_name; mParcelId = pick_data->parcel_id; @@ -322,30 +329,23 @@ void LLPanelPick::sendUpdate() //----------------------------------------- //static -void LLPanelPick::onClickEdit(void* data) +void LLPanelPick::onClickEdit() { - LLPanelPick* self = (LLPanelPick*)data; - if (!self) return; - if (self->mEditMode) return; - if (!self->mDataReceived) return; - - self->setEditMode(TRUE); + if (mEditMode) return; + if (!mDataReceived) return; + setEditMode(TRUE); } //static -void LLPanelPick::onClickTeleport(void* data) +void LLPanelPick::onClickTeleport() { - LLPanelPick* self = (LLPanelPick*)data; - if (!self) return; - teleport(self->mPosGlobal); + teleport(mPosGlobal); } //static -void LLPanelPick::onClickMap(void* data) +void LLPanelPick::onClickMap() { - LLPanelPick* self = (LLPanelPick*)data; - if (!self) return; - showOnMap(self->mPosGlobal); + showOnMap(mPosGlobal); } @@ -354,49 +354,44 @@ void LLPanelPick::onClickMap(void* data) //----------------------------------------- //static -void LLPanelPick::onClickCancel(void* data) +void LLPanelPick::onClickCancel() { - LLPanelPick* self = (LLPanelPick*) data; - if (!self) return; - if (!self->mEditMode) return; + if (!mEditMode) return; - LLUUID pick_id = self->mPickId; - LLUUID creator_id = self->mCreatorId; - self->reset(); - self->init(creator_id, pick_id); + LLUUID pick_id = mPickId; + LLUUID creator_id = mCreatorId; + reset(); + init(creator_id, pick_id); } // static -void LLPanelPick::onClickSet(void* data) +void LLPanelPick::onClickSet() { - LLPanelPick* self = (LLPanelPick*) data; - if (!self) return; - if (!self->mEditMode) return; - if (!self->mDataReceived) return; + if (!mEditMode) return; + if (!mDataReceived) return; // Save location for later. - self->mPosGlobal = gAgent.getPositionGlobal(); + mPosGlobal = gAgent.getPositionGlobal(); - S32 region_x = llround((F32)self->mPosGlobal.mdV[VX]) % REGION_WIDTH_UNITS; - S32 region_y = llround((F32)self->mPosGlobal.mdV[VY]) % REGION_WIDTH_UNITS; - S32 region_z = llround((F32)self->mPosGlobal.mdV[VZ]); + S32 region_x = llround((F32)mPosGlobal.mdV[VX]) % REGION_WIDTH_UNITS; + S32 region_y = llround((F32)mPosGlobal.mdV[VY]) % REGION_WIDTH_UNITS; + S32 region_z = llround((F32)mPosGlobal.mdV[VZ]); std::string location_text = "(will update after save), "; - location_text.append(self->mSimName); + location_text.append(mSimName); location_text.append(llformat(" (%d, %d, %d)", region_x, region_y, region_z)); - self->setLocation(location_text); + setLocation(location_text); } // static -void LLPanelPick::onClickSave(void* data) +void LLPanelPick::onClickSave() { - LLPanelPick* self = (LLPanelPick*)data; - if (!self->mEditMode) return; - if (!self->mDataReceived) return; + if (!mEditMode) return; + if (!mDataReceived) return; - self->sendUpdate(); - self->setEditMode(FALSE); + sendUpdate(); + setEditMode(FALSE); } void LLPanelPick::updateButtons() @@ -422,13 +417,13 @@ void LLPanelPick::updateButtons() } } -void LLPanelPick::setExitCallback( boost::function<void(void*)> function, void* data ) +void LLPanelPick::setExitCallback(commit_callback_t cb) { - mExitFunction = function; - mExitData = data; + mBackCb = cb; if (!mEditMode) { - childSetAction("back_btn", function, data); + LLButton* button = findChild<LLButton>("back_btn"); + if (button) button->setClickedCallback(mBackCb); } } diff --git a/indra/newview/llpanelpick.h b/indra/newview/llpanelpick.h index 36bced3849..fd07d9ef91 100644 --- a/indra/newview/llpanelpick.h +++ b/indra/newview/llpanelpick.h @@ -74,7 +74,7 @@ public: // but that causes such a complication that we cannot set a callback for a "Back" button // from the parent panel only once, so we have to preserve that callback // in the pick panel and set it for the back button everytime postBuild() is called. - void setExitCallback(boost::function<void(void*)> function, void* value); + void setExitCallback(commit_callback_t cb); static void teleport(const LLVector3d& position); static void showOnMap(const LLVector3d& position); @@ -100,16 +100,16 @@ protected: //----------------------------------------- // "PICK INFO" (VIEW MODE) BUTTON HANDLERS //----------------------------------------- - static void onClickEdit(void* data); - static void onClickTeleport(void* data); - static void onClickMap(void* data); + void onClickEdit(); + void onClickTeleport(); + void onClickMap(); //----------------------------------------- // "EDIT PICK" (EDIT MODE) BUTTON HANDLERS //----------------------------------------- - static void onClickSet(void* data); - static void onClickSave(void* data); - static void onClickCancel(void* data); + void onClickSet(); + void onClickSave(); + void onClickCancel(); protected: BOOL mEditMode; @@ -122,8 +122,7 @@ protected: LLUUID mParcelId; std::string mSimName; - boost::function<void(void*)> mExitFunction; - void* mExitData; + commit_callback_t mBackCb; }; #endif // LL_LLPANELPICK_H diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index f3adaded34..778a2299f5 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -38,10 +38,12 @@ #include "llviewergenericmessage.h" // send_generic_message #include "llmenugl.h" #include "llviewermenu.h" +#include "llregistry.h" #include "llpanelpicks.h" #include "llavatarpropertiesprocessor.h" #include "llpanelavatar.h" +#include "llpanelprofile.h" #include "llpanelpick.h" static const std::string XML_BTN_NEW = "new_btn"; @@ -58,12 +60,13 @@ static const std::string XML_PICKS_LIST = "back_panel"; //----------------------------------------------------------------------------- // LLPanelPicks //----------------------------------------------------------------------------- -LLPanelPicks::LLPanelPicks(const LLUUID& avatar_id /* = LLUUID::null */) -: LLPanelProfileTab(avatar_id), +LLPanelPicks::LLPanelPicks() +: LLPanelProfileTab(LLUUID::null), mPopupMenu(NULL), - mSelectedPickItem(NULL) + mSelectedPickItem(NULL), + mProfilePanel(NULL), + mPickPanel(NULL) { - updateData(); } LLPanelPicks::~LLPanelPicks() @@ -76,12 +79,6 @@ LLPanelPicks::~LLPanelPicks() void* LLPanelPicks::create(void* data /* = NULL */) { - LLSD* id = NULL; - if(data) - { - id = static_cast<LLSD*>(data); - return new LLPanelPicks(LLUUID(id->asUUID())); - } return new LLPanelPicks(); } @@ -125,6 +122,8 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) std::string pick_name = it->second; LLPickItem* picture = LLPickItem::create(); + picture->childSetAction("info_chevron", boost::bind(&LLPanelPicks::onClickInfo, this)); + picks_list->addChild(picture); picture->setPickName(pick_name); @@ -228,24 +227,30 @@ LLView* LLPanelPicks::getPicksList() const return getChild<LLView>(XML_PICKS_LIST, TRUE, FALSE); } -BOOL LLPanelPicks::postBuild(void) +BOOL LLPanelPicks::postBuild() { - childSetAction(XML_BTN_DELETE, onClickDelete, this); + childSetAction(XML_BTN_DELETE, boost::bind(&LLPanelPicks::onClickDelete, this)); - childSetAction("teleport_btn", onClickTeleport, this); - childSetAction("show_on_map_btn", onClickMap, this); - - mCommitCallbackRegistrar.add("Pick.Teleport", boost::bind(onClickTeleport, this)); - mCommitCallbackRegistrar.add("Pick.Map", boost::bind(onClickMap, this)); - mCommitCallbackRegistrar.add("Pick.Delete", boost::bind(onClickDelete, this)); + childSetAction("teleport_btn", boost::bind(&LLPanelPicks::onClickTeleport, this)); + childSetAction("show_on_map_btn", boost::bind(&LLPanelPicks::onClickMap, this)); + childSetAction("info_btn", boost::bind(&LLPanelPicks::onClickInfo, this)); + childSetAction("new_btn", boost::bind(&LLPanelPicks::onClickNew, this)); + + CommitCallbackRegistry::ScopedRegistrar registar; + registar.add("Pick.Info", boost::bind(&LLPanelPicks::onClickInfo, this)); + registar.add("Pick.Edit", boost::bind(&LLPanelPicks::onClickMenuEdit, this)); + registar.add("Pick.Teleport", boost::bind(&LLPanelPicks::onClickTeleport, this)); + registar.add("Pick.Map", boost::bind(&LLPanelPicks::onClickMap, this)); + registar.add("Pick.Delete", boost::bind(&LLPanelPicks::onClickDelete, this)); mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_picks.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - + return TRUE; } -void LLPanelPicks::onActivate(const LLUUID& id) +void LLPanelPicks::onOpen(const LLSD& key) { + const LLUUID id(key.asUUID()); BOOL self = (gAgent.getID() == id); // only agent can edit her picks @@ -267,21 +272,18 @@ void LLPanelPicks::onActivate(const LLUUID& id) childSetVisible("pick_title_agent", self); } - LLPanelProfileTab::onActivate(id); + LLPanelProfileTab::onOpen(key); } //static -void LLPanelPicks::onClickDelete(void *data) +void LLPanelPicks::onClickDelete() { - LLPanelPicks* self = (LLPanelPicks*) data; - if (!self) return; - - LLPickItem* pick_item = self->getSelectedPickItem(); + LLPickItem* pick_item = getSelectedPickItem(); if (!pick_item) return; LLSD args; args["PICK"] = pick_item->getPickName(); - LLNotifications::instance().add("DeleteAvatarPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackDelete, self, _1, _2)); + LLNotifications::instance().add("DeleteAvatarPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackDelete, this, _1, _2)); } bool LLPanelPicks::callbackDelete(const LLSD& notification, const LLSD& response) @@ -299,20 +301,29 @@ bool LLPanelPicks::callbackDelete(const LLSD& notification, const LLSD& response return false; } +bool LLPanelPicks::callbackTeleport( const LLSD& notification, const LLSD& response ) +{ + S32 option = LLNotification::getSelectedOption(notification, response); + + if (0 == option) + { + onClickTeleport(); + } + return false; +} + //static -void LLPanelPicks::onClickTeleport(void* data) +void LLPanelPicks::onClickTeleport() { - LLPanelPicks* self = (LLPanelPicks*)data; - LLPickItem* pick_item = self->getSelectedPickItem(); + LLPickItem* pick_item = getSelectedPickItem(); if (!pick_item) return; LLPanelPick::teleport(pick_item->getPosGlobal()); } //static -void LLPanelPicks::onClickMap(void* data) +void LLPanelPicks::onClickMap() { - LLPanelPicks* self = (LLPanelPicks*)data; - LLPickItem* pick_item = self->getSelectedPickItem(); + LLPickItem* pick_item = getSelectedPickItem(); if (!pick_item) return; LLPanelPick::showOnMap(pick_item->getPosGlobal()); } @@ -336,10 +347,26 @@ BOOL LLPanelPicks::handleRightMouseDown(S32 x, S32 y, MASK mask) BOOL LLPanelPicks::handleMouseDown( S32 x, S32 y, MASK mask ) { - if (isMouseInPick(x, y)) return TRUE; + isMouseInPick(x, y); return LLPanel::handleMouseDown(x, y, mask); } +BOOL LLPanelPicks::handleDoubleClick(S32 x, S32 y, MASK mask) +{ + if (isMouseInPick(x, y)) + { + LLPickItem* pick_item = getSelectedPickItem(); + if (pick_item) + { + LLSD args; + args["PICK"] = pick_item->getPickName(); + LLNotifications::instance().add("TeleportToPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackTeleport, this, _1, _2)); + } + return TRUE; + } + return LLPanel::handleDoubleClick(x, y, mask); +} + void LLPanelPicks::updateButtons() { int picks_num = mPickItemList.size(); @@ -361,7 +388,7 @@ void LLPanelPicks::updateButtons() } -void LLPanelPicks::setSelectedPickItem( LLPickItem* item ) +void LLPanelPicks::setSelectedPickItem(LLPickItem* item) { if (!item) return; if (mSelectedPickItem == item) return; @@ -395,6 +422,64 @@ BOOL LLPanelPicks::isMouseInPick( S32 x, S32 y ) } +void LLPanelPicks::setProfilePanel(LLPanelProfile* profile_panel) +{ + mProfilePanel = profile_panel; +} + + +void LLPanelPicks::buildPickPanel() +{ + if (mPickPanel == NULL) + { + mPickPanel = new LLPanelPick(); + mPickPanel->setExitCallback(boost::bind(&LLPanelPicks::onClickBack, this)); + } +} + +void LLPanelPicks::onClickNew() +{ + buildPickPanel(); + mPickPanel->setEditMode(TRUE); + mPickPanel->createNewPick(); + getProfilePanel()->togglePanel(mPickPanel); +} + +void LLPanelPicks::onClickInfo() +{ + LLPickItem* pick = getSelectedPickItem(); + if (!pick) return; + + buildPickPanel(); + mPickPanel->reset(); + mPickPanel->init(pick->getCreatorId(), pick->getPickId()); + getProfilePanel()->togglePanel(mPickPanel); +} + +void LLPanelPicks::onClickBack() +{ + getProfilePanel()->togglePanel(mPickPanel); +} + +void LLPanelPicks::onClickMenuEdit() +{ + //*TODO, refactor - most of that is similar to onClickInfo + LLPickItem* pick = getSelectedPickItem(); + if (!pick) return; + + buildPickPanel(); + mPickPanel->reset(); + mPickPanel->init(pick->getCreatorId(), pick->getPickId()); + mPickPanel->setEditMode(TRUE); + getProfilePanel()->togglePanel(mPickPanel); +} + +inline LLPanelProfile* LLPanelPicks::getProfilePanel() +{ + llassert_always(NULL != mProfilePanel); + return mProfilePanel; +} + //----------------------------------------------------------------------------- // LLPanelPicks //----------------------------------------------------------------------------- @@ -506,6 +591,6 @@ void LLPickItem::processProperties(void *data, EAvatarProcessorType type) if (mPickID != pick_data->pick_id) return; init(pick_data); - LLAvatarPropertiesProcessor::instance().removeObserver(pick_data->agent_id, this); + LLAvatarPropertiesProcessor::instance().removeObserver(mCreatorID, this); } diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h index 5ec9809f0b..3bc79daeb3 100644 --- a/indra/newview/llpanelpicks.h +++ b/indra/newview/llpanelpicks.h @@ -38,7 +38,9 @@ #include "lluuid.h" #include "llavatarpropertiesprocessor.h" #include "llpanelavatar.h" +#include "llregistry.h" +class LLPanelProfile; class LLMessageSystem; class LLVector3d; class LLPanelProfileTab; @@ -52,14 +54,14 @@ class LLPanelPicks : public LLPanelProfileTab { public: - LLPanelPicks(const LLUUID& avatar_id = LLUUID::null); + LLPanelPicks(); ~LLPanelPicks(); static void* create(void* data); /*virtual*/ BOOL postBuild(void); - /*virtual*/ void onActivate(const LLUUID& id); + /*virtual*/ void onOpen(const LLSD& key); void processProperties(void* data, EAvatarProcessorType type); @@ -75,13 +77,29 @@ public: /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + + //*NOTE top down approch when panel toggling is done only by + // parent panels failed to work (picks related code was in me profile panel) + void setProfilePanel(LLPanelProfile* profile_panel); private: - static void onClickDelete(void* data); - static void onClickTeleport(void* data); - static void onClickMap(void* data); + void onClickDelete(); + void onClickTeleport(); + void onClickMap(); + + //------------------------------------------------ + // Callbacks which require panel toggling + //------------------------------------------------ + void onClickNew(); + void onClickInfo(); + void onClickBack(); + void onClickMenuEdit(); + + void buildPickPanel(); bool callbackDelete(const LLSD& notification, const LLSD& response); + bool callbackTeleport(const LLSD& notification, const LLSD& response); void reshapePicksList(); void reshapePickItem(LLView* const pick_item, const S32 last_bottom); @@ -92,11 +110,16 @@ private: BOOL isMouseInPick(S32 x, S32 y); + LLPanelProfile* getProfilePanel(); + + typedef std::list<LLPickItem*> picture_list_t; picture_list_t mPickItemList; LLMenuGL* mPopupMenu; LLPickItem* mSelectedPickItem; + LLPanelProfile* mProfilePanel; + LLPanelPick* mPickPanel; }; class LLPickItem : public LLPanel, public LLAvatarPropertiesObserver diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index d40e10478a..5bbcf4207f 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -43,29 +43,20 @@ #include "llqueryflags.h" #include "llbutton.h" -#include "llfloater.h" -#include "llfloaterreg.h" #include "lllineeditor.h" #include "llscrollcontainer.h" #include "lltextbox.h" -#include "lltrans.h" -#include "llui.h" -#include "lluictrlfactory.h" #include "llagent.h" #include "llfloaterworldmap.h" #include "llinventorymodel.h" #include "lltexturectrl.h" -#include "lluiconstants.h" -#include "llviewercontrol.h" #include "llviewerinventory.h" #include "llviewerregion.h" #include "llviewertexteditor.h" -#include "llviewerwindow.h" -#include "llweb.h" #include "llworldmap.h" -static LLRegisterPanelClassWrapper<LLPanelPlaceInfo> t_places("panel_landmark_info"); +static LLRegisterPanelClassWrapper<LLPanelPlaceInfo> t_place_info("panel_place_info"); LLPanelPlaceInfo::LLPanelPlaceInfo() : LLPanel(), @@ -86,6 +77,9 @@ LLPanelPlaceInfo::~LLPanelPlaceInfo() BOOL LLPanelPlaceInfo::postBuild() { + mTitle = getChild<LLTextBox>("panel_title"); + mCurrentTitle = mTitle->getText(); + // Since this is only used in the directory browser, always // disable the snapshot control. Otherwise clicking on it will // open a texture picker. @@ -114,7 +108,8 @@ BOOL LLPanelPlaceInfo::postBuild() mScrollingPanel = getChild<LLPanel>("scrolling_panel"); - mInfoPanel = getChild<LLPanel>("info_panel"); + mInfoPanel = getChild<LLPanel>("info_panel", TRUE, FALSE); + mMediaPanel = getChild<LLMediaPanel>("media_panel", TRUE, FALSE); return TRUE; } @@ -235,6 +230,45 @@ void LLPanelPlaceInfo::setParcelID(const LLUUID& parcel_id) sendParcelInfoRequest(); } +void LLPanelPlaceInfo::setInfoType(INFO_TYPE type) +{ + if (!mInfoPanel) + return; + + if (type == PLACE) + { + mCurrentTitle = getString("title_place"); + } + else + { + mCurrentTitle = getString("title_landmark"); + } + + if (mInfoPanel->getVisible()) + { + mTitle->setText(mCurrentTitle); + } +} + +void LLPanelPlaceInfo::toggleMediaPanel() +{ + if (!(mMediaPanel && mInfoPanel)) + return; + + bool visible = mInfoPanel->getVisible(); + if (visible) + { + mTitle->setText(getString("title_media")); + } + else + { + mTitle->setText(mCurrentTitle); + } + + mInfoPanel->setVisible(!visible); + mMediaPanel->setVisible(visible); +} + void LLPanelPlaceInfo::sendParcelInfoRequest() { if (mParcelID != mRequestedID) diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index cec9e7b80c..8b00507ba0 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -40,6 +40,7 @@ #include "lliconctrl.h" +#include "llpanelmedia.h" #include "llremoteparcelrequest.h" class LLButton; @@ -52,19 +53,31 @@ class LLTextureCtrl; class LLPanelPlaceInfo : public LLPanel, LLRemoteParcelInfoObserver { public: + enum INFO_TYPE + { + PLACE, + LANDMARK + }; + LLPanelPlaceInfo(); /*virtual*/ ~LLPanelPlaceInfo(); /*virtual*/ BOOL postBuild(); + // Ignore all old location information, useful if you are + // recycling an existing dialog and need to clear it. void resetLocation(); - // Ignore all old location information, useful if you are - // recycling an existing dialog and need to clear it. + // Sends a request for data about the given parcel, which will + // only update the location if there is none already available. /*virtual*/ void setParcelID(const LLUUID& parcel_id); - // Sends a request for data about the given parcel, which will - // only update the location if there is none already available. + // Depending on how the panel was triggered + // (from landmark or current location, or other) + // sets a corresponding title and contents. + void setInfoType(INFO_TYPE type); + + void toggleMediaPanel(); void displayItemInfo(const LLInventoryItem* pItem); /*virtual*/ void setErrorStatus(U32 status, const std::string& reason); @@ -81,10 +94,10 @@ public: private: enum LANDMARK_INFO_TYPE - { - TITLE, - NOTE - }; + { + TITLE, + NOTE + }; void onCommitTitleOrNote(LANDMARK_INFO_TYPE type); @@ -92,7 +105,10 @@ private: LLUUID mRequestedID; LLUUID mLandmarkID; LLVector3 mPosRegion; + std::string mCurrentTitle; + S32 mMinHeight; + LLTextBox* mTitle; LLTextureCtrl* mSnapshotCtrl; LLTextBox* mRegionName; LLTextBox* mParcelName; @@ -106,7 +122,7 @@ private: LLTextBox* mLocationEditor; LLPanel* mScrollingPanel; LLPanel* mInfoPanel; - S32 mMinHeight; + LLMediaPanel* mMediaPanel; }; #endif // LL_LLPANELPLACEINFO_H diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index f23d839708..f5e225c51b 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -80,7 +80,7 @@ BOOL LLPanelPlaces::postBuild() mSearchEditor->setSearchCallback(boost::bind(&LLPanelPlaces::onSearchEdit, this, _1)); } - mPlaceInfo = dynamic_cast<LLPanelPlaceInfo*>(getChild<LLPanel>("panel_landmark_info")); + mPlaceInfo = getChild<LLPanelPlaceInfo>("panel_place_info", TRUE, FALSE); if (mPlaceInfo) { LLButton* back_btn = mPlaceInfo->getChild<LLButton>("back_btn"); @@ -88,6 +88,9 @@ BOOL LLPanelPlaces::postBuild() { back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); } + + // *TODO: Assign the action to an appropriate event. + childSetAction("overflow_btn", boost::bind(&LLPanelPlaceInfo::toggleMediaPanel, mPlaceInfo), this); } //childSetAction("share_btn", boost::bind(&LLPanelPlaces::onShareButtonClicked, this), this); @@ -109,24 +112,26 @@ void LLPanelPlaces::onOpen(const LLSD& key) togglePlaceInfoPanel(TRUE); - mPlaceInfoType = key["type"].asInteger(); + mPlaceInfoType = key["type"].asString(); - if (mPlaceInfoType == AGENT) + if (mPlaceInfoType == "agent") { // We don't need to teleport to the current location so disable the button getChild<LLButton>("teleport_btn")->setEnabled(FALSE); getChild<LLButton>("map_btn")->setEnabled(TRUE); + mPlaceInfo->setInfoType(LLPanelPlaceInfo::PLACE); mPlaceInfo->displayParcelInfo(gAgent.getPositionAgent(), gAgent.getRegion()->getRegionID(), gAgent.getPositionGlobal()); } - else if (mPlaceInfoType == LANDMARK) + else if (mPlaceInfoType == "landmark") { LLInventoryItem* item = gInventory.getItem(key["id"].asUUID()); if (!item) return; + mPlaceInfo->setInfoType(LLPanelPlaceInfo::LANDMARK); mPlaceInfo->displayItemInfo(item); LLLandmark* landmark = gLandmarkList.getAsset(item->getAssetUUID()); @@ -142,7 +147,7 @@ void LLPanelPlaces::onOpen(const LLSD& key) pos_global); } - else if (mPlaceInfoType == TELEPORT_HISTORY) + else if (mPlaceInfoType == "teleport_history") { S32 index = key["id"].asInteger(); @@ -156,6 +161,7 @@ void LLPanelPlaces::onOpen(const LLSD& key) LLVector3 pos_local(region_x, region_y, (F32)pos_global.mdV[VZ]); + mPlaceInfo->setInfoType(LLPanelPlaceInfo::PLACE); mPlaceInfo->displayParcelInfo(pos_local, hist_items[index].mRegionID, pos_global); @@ -211,7 +217,7 @@ void LLPanelPlaces::onTeleportButtonClicked() void LLPanelPlaces::onShowOnMapButtonClicked() { - if (!mPlaceInfoType) + if (mPlaceInfoType == "agent") { LLVector3d global_pos = gAgent.getPositionGlobal(); if (!global_pos.isExactlyZero()) diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index 533fb8dd82..89758fc34f 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -46,13 +46,6 @@ class LLTabContainer; class LLPanelPlaces : public LLPanel, LLInventoryObserver { public: - enum PLACE_INFO_TYPE - { - AGENT, - LANDMARK, - TELEPORT_HISTORY - }; - LLPanelPlaces(); virtual ~LLPanelPlaces(); @@ -79,7 +72,7 @@ private: std::string mFilterSubString; // Place information type currently shown in Information panel - S32 mPlaceInfoType; + std::string mPlaceInfoType; }; #endif //LL_LLPANELPLACES_H diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp new file mode 100644 index 0000000000..deca08050b --- /dev/null +++ b/indra/newview/llpanelprofile.cpp @@ -0,0 +1,146 @@ +/** +* @file llpanelprofile.cpp +* @brief Profile panel implementation +* +* $LicenseInfo:firstyear=2009&license=viewergpl$ +* +* Copyright (c) 2009, Linden Research, Inc. +* +* Second Life Viewer Source Code +* The source code in this file ("Source Code") is provided by Linden Lab +* to you under the terms of the GNU General Public License, version 2.0 +* ("GPL"), unless you have obtained a separate licensing agreement +* ("Other License"), formally executed by you and Linden Lab. Terms of +* the GPL can be found in doc/GPL-license.txt in this distribution, or +* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 +* +* There are special exceptions to the terms and conditions of the GPL as +* it is applied to this Source Code. View the full text of the exception +* in the file doc/FLOSS-exception.txt in this software distribution, or +* online at +* http://secondlifegrid.net/programs/open_source/licensing/flossexception +* +* By copying, modifying or distributing this software, you acknowledge +* that you have read and understood your obligations described above, +* and agree to abide by those obligations. +* +* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO +* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, +* COMPLETENESS OR PERFORMANCE. +* $/LicenseInfo$ +*/ + +#include "llviewerprecompiledheaders.h" +#include "llpanelprofile.h" +#include "lltabcontainer.h" +#include "llpanelpicks.h" +#include "llagent.h" + +static const std::string PANEL_PICKS = "panel_picks"; +static const std::string PANEL_NOTES = "panel_notes"; +static const std::string PANEL_PROFILE = "panel_profile"; + +static LLRegisterPanelClassWrapper<LLPanelAvatarProfile> t_panel_profile(PANEL_PROFILE); +static LLRegisterPanelClassWrapper<LLPanelPicks> t_panel_picks(PANEL_PICKS); + + +LLPanelProfile::LLPanelProfile() +: LLPanel(), + mTabContainer(NULL) +{ +} + +LLPanelProfile::~LLPanelProfile() +{ +} + +BOOL LLPanelProfile::postBuild() +{ + mTabContainer = getChild<LLTabContainer>("tabs"); + mTabContainer->setCommitCallback(boost::bind(&LLPanelProfile::onTabSelected, this, _2)); + + LLPanelPicks* panel_picks = getChild<LLPanelPicks>(PANEL_PICKS); + panel_picks->setProfilePanel(this); + mTabs[PANEL_PICKS] = panel_picks; + + mTabs[PANEL_PROFILE] = getChild<LLPanelAvatarProfile>(PANEL_PROFILE); + + return TRUE; +} + +void LLPanelProfile::onOpen(const LLSD& key) +{ + //*NOTE LLUUID::null in this context means Agent related stuff + LLUUID id(key.has("id") ? key["id"].asUUID() : gAgentID); + if (key.has("open_tab_name")) + mTabContainer->selectTabByName(key["open_tab_name"]); + + if(id.notNull() && mAvatarId.notNull() && mAvatarId != id) + { + mTabs[PANEL_PROFILE]->clear(); + mTabs[PANEL_PICKS]->clear(); + mTabs[PANEL_NOTES]->clear(); + } + + mAvatarId = id; + + mTabContainer->getCurrentPanel()->onOpen(mAvatarId); +} + +//*TODO redo panel toggling +void LLPanelProfile::togglePanel(LLPanel* panel) +{ + // TRUE - we need to open/expand "panel" + BOOL expand = this->getChildList()->back() != panel; // mTabContainer->getVisible(); + + if (expand) + { + //*NOTE on view profile panel along with tabcontainer there is + // a backbutton that will be shown when there will be a panel over it even + //if that panel has visible backgroud + setAllChildrenVisible(FALSE); + + panel->setVisible(TRUE); + if (panel->getParent() != this) + { + addChildInBack(panel); + } + else + { + sendChildToBack(panel); + } + + LLRect new_rect = getRect(); + panel->reshape(new_rect.getWidth(), new_rect.getHeight()); + new_rect.setLeftTopAndSize(0, new_rect.getHeight(), new_rect.getWidth(), new_rect.getHeight()); + panel->setRect(new_rect); + } + else + { + this->setAllChildrenVisible(TRUE); + if (panel->getParent() == this) removeChild(panel); + sendChildToBack(mTabContainer); + mTabContainer->getCurrentPanel()->onOpen(mAvatarId); + } +} + + +void LLPanelProfile::onTabSelected(const LLSD& param) +{ + std::string tab_name = param.asString(); + if (NULL != mTabs[tab_name]) + { + mTabs[tab_name]->onOpen(mAvatarId); + } +} + +void LLPanelProfile::setAllChildrenVisible(BOOL visible) +{ + const child_list_t* child_list = getChildList(); + for (child_list_const_iter_t child_it = child_list->begin(); child_it != child_list->end(); ++child_it) + { + LLView* viewp = *child_it; + viewp->setVisible(visible); + } +} + diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h new file mode 100644 index 0000000000..e8aea849df --- /dev/null +++ b/indra/newview/llpanelprofile.h @@ -0,0 +1,72 @@ +/** +* @file llpanelprofile.h +* @brief Profile panel +* +* $LicenseInfo:firstyear=2009&license=viewergpl$ +* +* Copyright (c) 2009, Linden Research, Inc. +* +* Second Life Viewer Source Code +* The source code in this file ("Source Code") is provided by Linden Lab +* to you under the terms of the GNU General Public License, version 2.0 +* ("GPL"), unless you have obtained a separate licensing agreement +* ("Other License"), formally executed by you and Linden Lab. Terms of +* the GPL can be found in doc/GPL-license.txt in this distribution, or +* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 +* +* There are special exceptions to the terms and conditions of the GPL as +* it is applied to this Source Code. View the full text of the exception +* in the file doc/FLOSS-exception.txt in this software distribution, or +* online at +* http://secondlifegrid.net/programs/open_source/licensing/flossexception +* +* By copying, modifying or distributing this software, you acknowledge +* that you have read and understood your obligations described above, +* and agree to abide by those obligations. +* +* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO +* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, +* COMPLETENESS OR PERFORMANCE. +* $/LicenseInfo$ +*/ + +#ifndef LL_LLPANELPROFILE_H +#define LL_LLPANELPROFILE_H + +#include "llviewerprecompiledheaders.h" +#include "llpanel.h" +#include "llpanelavatar.h" + +class LLTabContainer; + +class LLPanelProfile : public LLPanel +{ + LOG_CLASS(LLPanelProfile); + +public: + virtual BOOL postBuild(); + + virtual void onOpen(const LLSD& key); + + virtual void togglePanel(LLPanel*); + +protected: + LLPanelProfile(); + ~LLPanelProfile(); + + void onTabSelected(const LLSD& param); + + void setAllChildrenVisible(BOOL visible); + + + LLTabContainer* mTabContainer; + + typedef std::map<std::string, LLPanelProfileTab*> profile_tabs_t; + profile_tabs_t mTabs; + + LLUUID mAvatarId; +}; + + + +#endif //LL_LLPANELPROFILE_H diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index 495911c2e3..7d02c8ff0b 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -32,11 +32,10 @@ #include "llviewerprecompiledheaders.h" #include "llpanelprofileview.h" -#include <llfloaterreg.h> -#include <lltabcontainer.h> -#include <lluictrlfactory.h> + #include "llpanelavatar.h" #include "llpanelpicks.h" +#include "llpanelprofile.h" static LLRegisterPanelClassWrapper<LLPanelProfileView> t_panel_target_profile("panel_profile_view"); static LLRegisterPanelClassWrapper<LLPanelAvatarNotes> t_panel_notes("panel_notes"); @@ -46,7 +45,7 @@ static std::string PANEL_PICKS = "panel_picks"; static std::string PANEL_NOTES = "panel_notes"; LLPanelProfileView::LLPanelProfileView() -: LLPanel() +: LLPanelProfile() { } @@ -57,35 +56,23 @@ LLPanelProfileView::~LLPanelProfileView(void) /*virtual*/ void LLPanelProfileView::onOpen(const LLSD& key) { - if (!getVisible()) - setVisible(TRUE); - - LLUUID id(key.asUUID()); - if(id.notNull() && mProfileId.notNull() && mProfileId != id) - { - mTabs[PANEL_PROFILE]->clear(); - mTabs[PANEL_PICKS]->clear(); - mTabs[PANEL_NOTES]->clear(); - } - - mProfileId = id; - mTabs[PANEL_PROFILE]->onOpen(mProfileId); - mTabs[PANEL_PICKS]->onActivate(mProfileId); - mTabs[PANEL_NOTES]->onActivate(mProfileId); + LLPanelProfile::onOpen(key); + + //*NOTE profile view panel doesn't have own side tray tab and + //is usually opened over People side tray tab. By Back button + // Profile View panel just becomes invisible, see onBackBtnClick() + setVisible(TRUE); std::string full_name; - gCacheName->getFullName(key,full_name); + gCacheName->getFullName(key["id"],full_name); childSetValue("user_name",full_name); } BOOL LLPanelProfileView::postBuild() { - mTabContainer = getChild<LLTabContainer>("profile_tabs"); - mTabContainer->setCommitCallback(boost::bind(&LLPanelProfileView::onTabSelected, this, _2)); + LLPanelProfile::postBuild(); - mTabs[PANEL_PROFILE] = (getChild<LLPanelAvatarProfile>(PANEL_PROFILE)); - mTabs[PANEL_PICKS] = (getChild<LLPanelPicks>(PANEL_PICKS)); mTabs[PANEL_NOTES] = (getChild<LLPanelAvatarNotes>(PANEL_NOTES)); childSetCommitCallback("back",boost::bind(&LLPanelProfileView::onBackBtnClick,this),NULL); @@ -96,14 +83,6 @@ BOOL LLPanelProfileView::postBuild() //private -void LLPanelProfileView::initTabs(const LLSD& key) -{ -} - -void LLPanelProfileView::onTabSelected(const LLSD& param) -{ -} - void LLPanelProfileView::onBackBtnClick() { setVisible(FALSE); diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h index 2d89f15fe4..6c5fc77951 100644 --- a/indra/newview/llpanelprofileview.h +++ b/indra/newview/llpanelprofileview.h @@ -33,12 +33,13 @@ #ifndef LL_LLPANELPROFILEVIEW_H #define LL_LLPANELPROFILEVIEW_H -#include <llpanel.h> +#include "llpanel.h" +#include "llpanelprofile.h" +class LLPanelProfile; class LLPanelProfileTab; -class LLTabContainer; -class LLPanelProfileView : public LLPanel +class LLPanelProfileView : public LLPanelProfile { LOG_CLASS(LLPanelProfileView); friend class LLUICtrlFactory; @@ -48,22 +49,10 @@ public: ~LLPanelProfileView(void); - void onTabSelected(const LLSD& param); - void onOpen(const LLSD& key); BOOL postBuild(); - - void initTabs(const LLSD& key); - void onBackBtnClick(); - -private: - LLTabContainer* mTabContainer; - - typedef std::map<std::string, LLPanelProfileTab*> profile_tabs_t; - profile_tabs_t mTabs; - LLUUID mProfileId; }; #endif //LL_LLPANELPROFILEVIEW_H diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index c271ca34b9..77edae261b 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -224,7 +224,7 @@ void LLTeleportHistoryPanel::onDoubleClickItem(void* user_data) return; LLSD key; - key["type"] = LLPanelPlaces::TELEPORT_HISTORY; + key["type"] = "teleport_history"; key["id"] = itemp->getColumn(LIST_INDEX)->getValue().asInteger(); LLSideTray::getInstance()->showPanel("panel_places", key); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index b7c4c74891..53b88ba430 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -45,7 +45,6 @@ #include "llfloater.h" //for gFloaterView #include "lliconctrl.h"//for Home tab icon #include "llwindow.h"//for SetCursor -#include "llbottomtray.h"//for reshape //#include "llscrollcontainer.h" @@ -733,9 +732,6 @@ void LLSideTray::setPanelRect () panel_width+=mMaxBarWidth; S32 panel_height = parent_rect.getHeight()-fake_top_offset; - if(gBottomTray) - panel_height -= gBottomTray->getRect().getHeight(); - LLRect panel_rect; panel_rect.setLeftTopAndSize( parent_rect.mRight-panel_width, parent_rect.mTop-fake_top_offset, panel_width, panel_height); setRect(panel_rect); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 1b3fd5d49b..5d1cb824a2 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -34,9 +34,15 @@ #include "llviewermedia.h" +#include "audioengine.h" + +#include "llparcel.h" + #include "llmimetypes.h" #include "llviewercontrol.h" #include "llviewerimage.h" +#include "llviewerparcelmedia.h" +#include "llviewerparcelmgr.h" #include "llviewerwindow.h" #include "llversionviewer.h" #include "llviewerimagelist.h" @@ -461,7 +467,7 @@ bool LLViewerMediaImpl::handleSkinCurrentChanged(const LLSD& /*newvalue*/) // Wrapper class ////////////////////////////////////////////////////////////////////////////////////////// - +S32 LLViewerMedia::mMusicState = LLViewerMedia::STOPPED; ////////////////////////////////////////////////////////////////////////////////////////// // The viewer takes a long time to load the start screen. Part of the problem // is media initialization -- in particular, QuickTime loads many DLLs and @@ -687,6 +693,13 @@ bool LLViewerMedia::isActiveMediaTexture(const LLUUID& id) } ////////////////////////////////////////////////////////////////////////////////////////// +//static +bool LLViewerMedia::isMusicPlaying() +{ + return mMusicState == PLAYING; +} + +////////////////////////////////////////////////////////////////////////////////////////// // static std::string LLViewerMedia::getMediaURL() { @@ -704,3 +717,58 @@ void LLViewerMedia::setMimeType(std::string mime_type) { sViewerMediaImpl.mMimeType = mime_type; } + +////////////////////////////////////////////////////////////////////////////////////////// +//static +void LLViewerMedia::toggleMusicPlay(void*) +{ + if (mMusicState != PLAYING) + { + mMusicState = PLAYING; // desired state + if (gAudiop) + { + LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + if ( parcel ) + { + gAudiop->startInternetStream(parcel->getMusicURL()); + } + } + } + else + { + mMusicState = STOPPED; // desired state + if (gAudiop) + { + gAudiop->stopInternetStream(); + } + } +} + +////////////////////////////////////////////////////////////////////////////////////////// +//static +void LLViewerMedia::toggleMediaPlay(void*) +{ + if (LLViewerMedia::isMediaPaused()) + { + LLViewerParcelMedia::start(); + } + else if(LLViewerMedia::isMediaPlaying()) + { + LLViewerParcelMedia::pause(); + } + else + { + LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + if (parcel) + { + LLViewerParcelMedia::play(parcel); + } + } +} + +////////////////////////////////////////////////////////////////////////////////////////// +//static +void LLViewerMedia::mediaStop(void*) +{ + LLViewerParcelMedia::stop(); +} diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 600d7409e2..b3fb2c9031 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -67,6 +67,7 @@ class LLViewerMedia static bool isMediaPaused(); static bool hasMedia(); static bool isActiveMediaTexture(const LLUUID& id); + static bool isMusicPlaying(); static std::string getMediaURL(); static std::string getMimeType(); @@ -74,9 +75,16 @@ class LLViewerMedia static void updateImagesMediaStreams(); + static void toggleMusicPlay(void*); + static void toggleMediaPlay(void*); + static void mediaStop(void*); + private: // Fill in initialization data for LLMediaManager::initClass() static void buildMediaManagerData( LLMediaManagerData* init_data ); + + enum { STOPPED=0, PLAYING=1, PAUSED=2 }; + static S32 mMusicState; }; #endif // LLVIEWERMEDIA_H diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 70a6e24c8f..da3c94225b 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -159,6 +159,7 @@ #include "llresmgr.h" #include "llrootview.h" #include "llselectmgr.h" +#include "llsidetray.h" #include "llsky.h" #include "llstatusbar.h" #include "llstatview.h" @@ -3451,6 +3452,26 @@ class LLSelfEnableStandUp : public view_listener_t } }; +class LLSelfFriends : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + // Open "Friends" tab of the "People" panel in side tray. + LLSideTray::getInstance()->showPanel("panel_people", "friends_panel"); + return true; + } +}; + +class LLSelfGroups : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + // Open "Groups" tab of the "People" panel in side tray. + LLSideTray::getInstance()->showPanel("panel_people", "groups_panel"); + return true; + } +}; + BOOL check_admin_override(void*) { return gAgent.getAdminOverride(); @@ -3584,14 +3605,9 @@ bool LLHaveCallingcard::operator()(LLInventoryCategory* cat, } */ -BOOL is_agent_friend(const LLUUID& agent_id) -{ - return (LLAvatarTracker::instance().getBuddyInfo(agent_id) != NULL); -} - BOOL is_agent_mappable(const LLUUID& agent_id) { - return (is_agent_friend(agent_id) && + return (LLFriendActions::isFriend(agent_id) && LLAvatarTracker::instance().getBuddyInfo(agent_id)->isOnline() && LLAvatarTracker::instance().getBuddyInfo(agent_id)->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION) ); @@ -3604,7 +3620,7 @@ class LLAvatarEnableAddFriend : public view_listener_t bool handleEvent(const LLSD& userdata) { LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); - bool new_value = avatar && !is_agent_friend(avatar->getID()); + bool new_value = avatar && !LLFriendActions::isFriend(avatar->getID()); return new_value; } }; @@ -5360,7 +5376,7 @@ class LLAvatarAddFriend : public view_listener_t bool handleEvent(const LLSD& userdata) { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); - if(avatar && !is_agent_friend(avatar->getID())) + if(avatar && !LLFriendActions::isFriend(avatar->getID())) { request_friendship(avatar->getID()); } @@ -7936,6 +7952,10 @@ void initialize_menus() view_listener_t::addMenu(new LLSelfEnableStandUp(), "Self.EnableStandUp"); view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments"); + // we don't use boost::bind directly to delay side tray construction + view_listener_t::addMenu(new LLSelfFriends(), "Self.Friends"); + view_listener_t::addMenu(new LLSelfGroups(), "Self.Groups"); + // Avatar pie menu view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute"); view_listener_t::addMenu(new LLAvatarAddFriend(), "Avatar.AddFriend"); diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 13a1639917..e8d350b0b6 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -75,8 +75,6 @@ BOOL enable_deselect(void*); BOOL enable_undo(void*); BOOL enable_redo(void*); -// returns TRUE if we have a friend relationship with agent_id -BOOL is_agent_friend(const LLUUID& agent_id); BOOL is_agent_mappable(const LLUUID& agent_id); void confirm_replace_attachment(S32 option, void* user_data); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e4aaf2bf29..ae8717971f 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2395,6 +2395,12 @@ void LLViewerWindow::updateUI() updateWorldViewRect(); + if(gBottomTray && LLSideTray::instanceCreated()) + { + S32 delta = llround((F32)LLSideTray::getInstance()->getTrayWidth() * mDisplayScale.mV[VX]); + gBottomTray->updateRightPosition(mWindowRect.mRight - delta); + } + LLView::sMouseHandlerMessage.clear(); S32 x = mCurrentMousePoint.mX; diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc index a902a6dff0..87a8bd5787 100644 --- a/indra/newview/res/viewerRes.rc +++ b/indra/newview/res/viewerRes.rc @@ -138,8 +138,8 @@ TOOLMEDIAOPEN CURSOR "toolmediaopen.cur" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,24,0,0 - PRODUCTVERSION 1,24,0,0 + FILEVERSION 2,0,0,0 + PRODUCTVERSION 2,0,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -156,12 +156,12 @@ BEGIN BEGIN VALUE "CompanyName", "Linden Lab" VALUE "FileDescription", "Second Life" - VALUE "FileVersion", "1.24.0.0" + VALUE "FileVersion", "2.0.0.0" VALUE "InternalName", "Second Life" VALUE "LegalCopyright", "Copyright © 2001-2008, Linden Research, Inc." VALUE "OriginalFilename", "SecondLife.exe" VALUE "ProductName", "Second Life" - VALUE "ProductVersion", "1.24.0.0" + VALUE "ProductVersion", "2.0.0.0" END END BLOCK "VarFileInfo" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 04d4362130..84d54f9673 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -18,15 +18,6 @@ function="Floater.Show" parameter="preferences" /> </menu_item_call> - <menu_item_call - label="Media Remote Ctrl" - layout="topleft" - name="Preferences" - shortcut="control|A"> - <menu_item_call.on_click - function="Floater.Toggle" - parameter="media_remote_ctrl" /> - </menu_item_call> <menu_item_separator layout="topleft" /> <menu @@ -225,6 +216,17 @@ </menu_item_check> <menu_item_separator layout="topleft" /> + <menu_item_call + label="Media Remote Ctrl" + layout="topleft" + name="Preferences" + shortcut="control|alt|M"> + <menu_item_call.on_click + function="Floater.Toggle" + parameter="media_remote_ctrl" /> + </menu_item_call> + <menu_item_separator + layout="topleft" /> <menu_item_check label="Active Speakers" layout="topleft" @@ -362,7 +364,7 @@ function="Floater.Visible" parameter="mini_map" /> <menu_item_check.on_click - function="Floater.Show" + function="Floater.Toggle" parameter="mini_map" /> </menu_item_check> <menu_item_separator diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 680226f44f..f8bb15dc24 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3063,6 +3063,17 @@ Are you sure you want to teleport? </notification> <notification + icon="alertmodal.tga" + name="TeleportToPick" + type="alertmodal"> +Teleport to [PICK]? + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="OK"/> + </notification> + + <notification icon="alert.tga" label="Message everyone in your Estate" name="MessageEstate" diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 539b656f34..fe23d58793 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -1,56 +1,274 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel follows="left|bottom|right" name="bottom_tray" bg_opaque_color="0.25 0.25 0.25 1.0" - bg_alpha_color="0.25 0.25 0.25 1.0" background_visible="true" auto_resize="true" - left="0" bottom="0" width="1000" height="28" border_visible="false"> - <panel.string name="gesture_label"> - Gestures - </panel.string> - <layout_stack name="toolbar_stack" follows="left|right|bottom|top" - bottom="0" left="0" width="1000" height="25" orientation="horizontal" border_size="0" auto_resize="false"> - - <icon image_name="spacer24.tga" left="0" width="5" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/> - <panel follows="left|right" auto_resize="true" width="250" height="28" min_height="28"> - <line_editor name="chat_box" follows="left|right" - width="250" height="20" left="0" bottom="6" - bevel_style="in" border_style="line" border_thickness="1"/> - </panel> - <icon image_name="spacer24.tga" left="0" width="5" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/> - <view_border bevel_style="in" bottom="0" height="28" width="1" follows="left|right" left="270" mouse_opaque="false" auto_resize="false"/> - <icon image_name="spacer24.tga" left="0" width="5" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/> - <panel follows="left|right" auto_resize="false" width="100" height="28" min_height="28"> - <chiclet_talk name="talk" left="0" bottom="6" width="100" height="20" follows="left|right" auto_resize="false"/> - </panel> - <icon name="DUMMY" image_name="spacer24.tga" left="0" width="5" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/> - <panel follows="left|right" auto_resize="true" width="90" height="28" min_height="28"> - <combo_box follows="left" height="20" label="Gestures" left="0" bottom="6" name="Gesture" top_delta="0" width="90" /> - </panel> - <icon name="DUMMY" image_name="spacer24.tga" left="0" width="5" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/> - <panel follows="left|right" auto_resize="true" width="250" height="28" min_height="28"> - <chiclet_panel name="chiclet_list" follows="left|right" - width="250" height="25" left="0" bottom="2"/> - </panel> - <icon image_name="spacer24.tga" left="0" width="5" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/> - <panel follows="left|right" auto_resize="false" width="40" height="28" min_height="28"> - <chiclet_notification name="im_well" follows="left|right" auto_resize="false" - left="0" bottom="4" width="40" height="25" - image_unselected="im_notifications.tga" image_selected="im_notifications.tga"> - <chiclet_notification.commit_callback - function="Notification.Show" - parameter="ClickUnimplemented" /> - </chiclet_notification> - </panel> - <icon image_name="spacer24.tga" left="0" width="10" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/> - <view_border name="well_separator" bevel_style="in" bottom="0" height="30" width="1" follows="left|right" left="270" mouse_opaque="false" auto_resize="false"/> - <icon image_name="spacer24.tga" left="0" width="10" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/> - <panel follows="left|right" auto_resize="false" width="48" height="28" min_height="28"> - <chiclet_notification name="sys_well" follows="left|right" auto_resize="false" - left="0" bottom="5" width="48" height="25" - image_unselected="bottom_tray_sys_notifications.tga" image_selected="bottom_tray_sys_notifications.tga"> - <chiclet_notification.commit_callback - function="Notification.Show" - parameter="ClickUnimplemented" /> - </chiclet_notification> - </panel> - <icon image_name="spacer24.tga" left="0" width="5" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/> - </layout_stack> +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + background_visible="true" + bg_alpha_color="0.25 0.25 0.25 1" + bg_opaque_color="0.25 0.25 0.25 1" + follows="left|bottom|right" + height="28" + layout="topleft" + left="0" + name="bottom_tray" + top="28" + border_visible="true" + width="1000"> + <panel.string + name="gesture_label"> + Gestures + </panel.string> + <layout_stack + border_size="0" + follows="left|right|bottom|top" + height="28" + layout="topleft" + left="0" + name="toolbar_stack" + orientation="horizontal" + top="0" + width="1000"> + <icon + auto_resize="false" + color="0 0 0 0" + follows="left|right" + height="10" + image_name="spacer24.tga" + layout="topleft" + left="0" + top="0" + width="5" + min_width="5" /> + <layout_panel + follows="left|right" + height="28" + layout="topleft" + left="5" + min_height="28" + width="250" + top="0" + min_width="100"> + <line_editor + border_style="line" + border_thickness="1" + follows="left|right" + height="20" + layout="topleft" + left="0" + name="chat_box" + top="3" + width="250" /> + </layout_panel> + <icon + auto_resize="false" + color="0 0 0 0" + follows="left|right" + height="10" + image_name="spacer24.tga" + layout="topleft" + left="0" + top="0" + width="5" + min_width="5" /> + <view_border + auto_resize="false" + bevel_style="in" + follows="left|right" + height="28" + layout="topleft" + left="270" + top="0" + width="1" /> + <icon + auto_resize="false" + color="0 0 0 0" + follows="left|right" + height="10" + image_name="spacer24.tga" + layout="topleft" + left="0" + top="0" + width="5" + min_width="5" /> + <layout_panel + auto_resize="false" + follows="right" + height="28" + layout="topleft" + min_height="28" + width="100" + top="0" + min_width="100"> + <chiclet_talk + follows="right" + height="20" + layout="topleft" + left="0" + name="talk" + top="3" + width="100" /> + </layout_panel> + <icon + auto_resize="false" + color="0 0 0 0" + follows="left|right" + height="10" + image_name="spacer24.tga" + layout="topleft" + left="0" + name="DUMMY" + top="0" + width="5" + min_width="5"/> + <layout_panel + auto_resize="false" + follows="right" + height="28" + layout="topleft" + min_height="28" + width="90" + top="0" + min_width="90"> + <combo_box + bottom="22" + follows="right" + height="20" + label="Gestures" + layout="topleft" + name="Gesture" + top="3" + width="90" /> + </layout_panel> + <icon + auto_resize="false" + color="0 0 0 0" + follows="left|right" + height="10" + image_name="spacer24.tga" + layout="topleft" + left="0" + name="DUMMY" + top="0" + width="5" + min_width="5" /> + <layout_panel + follows="left|right" + height="28" + layout="topleft" + min_height="28" + top="0" + name="chiclet_list_panel" + width="250" + min_width="100"> + <chiclet_panel + follows="left|right" + height="25" + layout="topleft" + left="0" + name="chiclet_list" + top="1" + width="250" /> + </layout_panel> + <icon + auto_resize="false" + color="0 0 0 0" + follows="left|right" + height="10" + image_name="spacer24.tga" + layout="topleft" + left="0" + top="0" + width="5" + min_width="5" /> + <layout_panel + auto_resize="false" + follows="right" + height="28" + layout="topleft" + min_height="28" + name="im_well_panel" + width="40" + top="0" + min_width="40" > + <chiclet_notification + follows="right" + height="25" + image_selected="im_notifications.tga" + image_unselected="im_notifications.tga" + layout="topleft" + left="0" + name="im_well" + top="1" + width="40" > + <chiclet_notification.commit_callback + function="Notification.Show" + parameter="ClickUnimplemented" /> + </chiclet_notification> + </layout_panel> + <icon + auto_resize="false" + color="0 0 0 0" + follows="left|right" + height="10" + image_name="spacer24.tga" + layout="topleft" + left="0" + top="0" + width="10" + min_width="10"/> + <view_border + auto_resize="false" + bevel_style="in" + follows="left|right" + height="30" + layout="topleft" + left="270" + name="well_separator" + top="0" + width="1" /> + <icon + auto_resize="false" + color="0 0 0 0" + follows="left|right" + height="10" + image_name="spacer24.tga" + layout="topleft" + left="0" + top="0" + width="10" + min_width="10" /> + <layout_panel + auto_resize="false" + follows="right" + height="28" + layout="topleft" + min_height="28" + top="0" + name="sys_well_panel" + width="48" + min_width="48"> + <chiclet_notification + follows="right" + height="25" + image_selected="bottom_tray_sys_notifications.tga" + image_unselected="bottom_tray_sys_notifications.tga" + layout="topleft" + left="0" + name="sys_well" + top="1" + width="48" > + <chiclet_notification.commit_callback + function="Notification.Show" + parameter="ClickUnimplemented" /> + </chiclet_notification> + </layout_panel> + <icon + auto_resize="false" + color="0 0 0 0" + follows="left|right" + height="10" + image_name="spacer24.tga" + layout="topleft" + left="0" + top="0" + width="5" + min_width="5" /> + </layout_stack> </panel> 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 acbbde37c9..79833ea20b 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml @@ -67,7 +67,8 @@ height="16" layout="topleft" left="10" - name="Name:"> + name="Name:" + text_color="white"> Name: </text> <line_editor @@ -78,6 +79,7 @@ left="10" name="pick_name" right="-10" + text_color="black" width="290" /> <text type="string" @@ -87,6 +89,7 @@ layout="topleft" left="10" name="description_label" + text_color="white" v_pad="15" valign="center"> Description: @@ -94,10 +97,12 @@ <text_editor follows="left|top|right" height="100" + hide_scrollbar="true" layout="topleft" left="10" max_length="1023" name="pick_desc" + text_color="black" right="-10" word_wrap="true" /> <text @@ -108,6 +113,7 @@ layout="topleft" left="10" name="description_label" + text_color="white" v_pad="15" valign="bottom"> Location: @@ -121,6 +127,7 @@ left="10" name="pick_location" right="-10" + text_color="black" v_pad="10" valign="center" word_wrap="true"> diff --git a/indra/newview/skins/default/xui/en/panel_edit_profile.xml b/indra/newview/skins/default/xui/en/panel_edit_profile.xml index 5f51e8d22c..38049c896e 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml @@ -220,11 +220,13 @@ </line_editor> <check_box follows="left|top" + font="SansSerifBold" label="Show me in Search results" layout="topleft" left="9" name="show_in_search_checkbox" height="16" + text_enabled_color="white" top_pad="10" width="250"/> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml deleted file mode 100644 index 7cdda126b9..0000000000 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ /dev/null @@ -1,274 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel - background_visible="true" - bg_alpha_color="0.3 0.3 0.3 1" - height="560" - label="Landmark" - layout="topleft" - left="0" - name="landmark_info" - top="800" - width="355"> - <panel.string - name="not_available"> - (N\A) - </panel.string> - <panel.string - name="unknown"> - (unknown) - </panel.string> - <panel.string - name="public"> - (public) - </panel.string> - <panel.string - name="server_update_text"> - Place information not available without server update. - </panel.string> - <panel.string - name="server_error_text"> - Information about this location is unavailable at this time, please try again later. - </panel.string> - <panel.string - name="server_forbidden_text"> - Information about this location is unavailable due to access restrictions. Please check your permissions with the parcel owner. - </panel.string> - <panel.string - name="acquired_date"> - [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] - </panel.string> - <scroll_container - follows="all" - height="560" - layout="topleft" - left="0" - top="0" - width="355"> - <panel - height="560" - layout="topleft" - left="0" - name="scrolling_panel" - top="0" - width="310"> - <button - follows="top|left" - height="20" - image_overlay="navbar_back.tga" - image_selected="navbar_bg_button.tga" - image_unselected="navbar_bg_button.tga" - layout="topleft" - left="10" - name="back_btn" - picture_style="true" - top="20" - width="20" /> - <text - type="string" - length="1" - follows="left|top|right" - font="SansSerifHugeBold" - height="20" - layout="topleft" - left="50" - name="panel_title" - text_color="white" - top="20" - width="150"> - Landmark - </text> - <texture_picker - follows="top|left" - height="128" - layout="topleft" - left="10" - name="logo" - top="60" - width="128" /> - <text - follows="left|top|right" - font="SansSerifHugeBold" - height="20" - layout="topleft" - left="10" - name="region_name" - text_color="white" - top="180" - width="310" /> - <text - follows="left|top|right" - font="SansSerifBold" - height="20" - layout="topleft" - left="10" - name="parcel_name" - text_color="white" - top="205" - width="310" /> - <panel - follows="left|top|right|bottom" - height="335" - layout="topleft" - left="10" - name="info_panel" - top="225" - width="310"> - <text_editor - bg_focus_color="0.3 0.3 0.3 1" - bg_readonly_color="0.3 0.3 0.3 1" - follows="left|top|right" - font="SansSerif" - height="90" - hide_border="true" - hide_scrollbar="true" - layout="topleft" - left="0" - max_length="1000" - name="description" - read_only="true" - text_color="white" - top="0" - width="310" /> - <icon - follows="top|left" - height="30" - image_name="" - layout="topleft" - left="0" - mouse_opaque="true" - name="maturity" - top="95" - width="30" /> - <text - type="string" - length="1" - follows="left|top" - font="SansSerif" - height="15" - layout="topleft" - left="0" - name="owner_lable" - text_color="white" - top="130" - width="50" - word_wrap="true"> - Owner: - </text> - <text - follows="left|top|right" - font="SansSerif" - height="15" - layout="topleft" - left="70" - name="owner" - text_color="white" - top="130" - width="240" - word_wrap="true" /> - <text - type="string" - length="1" - follows="left|top" - font="SansSerif" - height="15" - layout="topleft" - left="0" - name="creator_lable" - text_color="white" - top="150" - width="50" - word_wrap="true"> - Creator: - </text> - <text - follows="left|top|right" - font="SansSerif" - height="15" - layout="topleft" - left="70" - name="creator" - text_color="white" - top="150" - width="240" - word_wrap="true" /> - <text - type="string" - length="1" - follows="left|top" - font="SansSerif" - height="15" - layout="topleft" - left="0" - name="created_lable" - text_color="white" - top="170" - width="50" - word_wrap="true"> - Created: - </text> - <text - follows="left|top|right" - font="SansSerif" - height="15" - layout="topleft" - left="70" - name="created" - text_color="white" - top="170" - width="240" - word_wrap="true" /> - <text - type="string" - length="1" - follows="left|top" - font="SansSerif" - height="15" - layout="topleft" - left="0" - name="title_lable" - text_color="white" - top="190" - width="50" - word_wrap="true"> - Title: - </text> - <line_editor - follows="left|top|right" - font="SansSerif" - height="22" - layout="topleft" - left="0" - max_length="255" - name="title_editor" - top="210" - width="310" /> - <text - type="string" - length="1" - follows="left|top" - font="SansSerif" - height="15" - layout="topleft" - left="0" - name="notes_lable" - text_color="white" - top="240" - width="90" - word_wrap="true"> - My Notes: - </text> - <text_editor - follows="left|top|bottom|right" - font="SansSerif" - height="70" - hide_scrollbar="true" - layout="topleft" - left="0" - max_length="1000" - name="notes_editor" - top="260" - width="310" /> - </panel> - </panel> - </scroll_container> -</panel> diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index e2597b4700..63082d3150 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -428,6 +428,9 @@ <string name="no_friends"> No friends </string> + <string name="no_groups"> + No groups + </string> <panel layout="topleft" name="panel_profile_view" diff --git a/indra/newview/skins/default/xui/en/panel_pick_info.xml b/indra/newview/skins/default/xui/en/panel_pick_info.xml index 9fc1627cb9..576654b860 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_info.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_info.xml @@ -57,34 +57,36 @@ type="string" length="1" follows="left|top" - height="16" + height="15" layout="topleft" left="10" - name="Name:"> + name="Name:" + text_color="white"> Name: </text> <text type="string" length="1" follows="left|top|right" - height="20" + height="15" layout="topleft" left="10" name="pick_name" right="-10" - text_color="white" + text_color="black" word_wrap="true"> [name] </text> <text type="string" - length="1" follows="left|top" - height="20" + height="15" layout="topleft" left="10" name="description_label" - v_pad="15" + text_color="white" + top_pad="20" + v_pad="0" valign="center"> Description: </text> @@ -92,13 +94,12 @@ type="string" length="1" follows="left|top|right" - height="40" + height="60" layout="topleft" left="10" name="pick_desc" right="-10" - text_color="white" - v_pad="15" + text_color="black" valign="center" word_wrap="true"> [description] @@ -111,20 +112,19 @@ layout="topleft" left="10" name="description_label" - v_pad="15" + text_color="white" + top_pad="20" valign="bottom"> Location: </text> <text type="string" - length="1" follows="left|top" height="30" layout="topleft" left="10" name="pick_location" - text_color="white" - v_pad="15" + text_color="black" valign="center"> [loading...] </text> diff --git a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml index a4599bdf1e..6a819d0ef4 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml @@ -42,6 +42,7 @@ name="picture_descr" text_color="white" top="25" + use_ellipses="true" width="170" word_wrap="true" /> <button @@ -53,7 +54,7 @@ image_selected="navbar_bg_button.tga" image_unselected="navbar_bg_button.tga" layout="topleft" - name="inspector" + name="info_chevron" picture_style="true" right="-5" tab_stop="false" diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml index ed851452fe..c8a814887a 100644 --- a/indra/newview/skins/default/xui/en/panel_picks.xml +++ b/indra/newview/skins/default/xui/en/panel_picks.xml @@ -93,8 +93,6 @@ follows="bottom|left" font="SansSerifBigBold" height="16" - image_disabled="plus.tga" - image_disabled_selected="plus.tga" image_hover_selected="plus.tga" image_selected="plus.tga" image_unselected="plus.tga" @@ -109,8 +107,6 @@ follows="bottom|right" font="SansSerifBigBold" height="16" - image_disabled="minus.tga" - image_disabled_selected="minus.tga" image_hover_selected="minus.tga" image_selected="minus.tga" image_unselected="minus.tga" @@ -169,7 +165,7 @@ height="25" label="Verb" layout="topleft" - left="280" + right="-15" name="verb_btn" top="0" width="50" /> diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index 272a7f4328..2aa566543f 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -31,13 +31,13 @@ top_pad="19" width="335" /> <panel - class="panel_landmark_info" - filename="panel_landmark_info.xml" + class="panel_place_info" + filename="panel_place_info.xml" follows="left|top|right|bottom" height="675" layout="topleft" left="0" - name="panel_landmark_info" + name="panel_place_info" top="-310" visible="false" width="355" /> @@ -73,7 +73,7 @@ top_delta="0" width="60" /> <button - enabled="false" + enabled="true" follows="bottom|right" font="SansSerifSmallBold" height="25" diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml index 428d071db2..9e95411929 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml @@ -38,7 +38,7 @@ height="625" layout="topleft" left="0" - name="profile_tabs" + name="tabs" tab_position="top" top="35" width="355"> diff --git a/indra/newview/skins/default/xui/en/panel_side_tray.xml b/indra/newview/skins/default/xui/en/panel_side_tray.xml index 5ede1c2e9e..4f6f53e5b4 100644 --- a/indra/newview/skins/default/xui/en/panel_side_tray.xml +++ b/indra/newview/skins/default/xui/en/panel_side_tray.xml @@ -7,14 +7,14 @@ collapsed="true" > <sidetray_tab - name="sidebarpanel2" + name="sidebar_people" + tab_title="People" + description="Find your friends, contacts and people nearby." + image="icn_voice-groupfocus.tga" mouse_opaque="false" background_opaque="false" background_visible="true" bg_opaque_color="0.5 0.5 0.5 1.0" - image="icn_voice-groupfocus.tga" - tab_title="People" - description="Find your friends, contacts and people nearby." > <collapsible_ctrl name="people_accordion" @@ -36,16 +36,16 @@ /> </collapsible_ctrl> </sidetray_tab> - + <!-- *TODO Vadim: isn't the sidetray_tab "label" attribute redundant since we have "tab_title" ? --> <sidetray_tab - name="sidebarpanel1" + name="sidebar_places" + tab_title="Places" + label="Places" + description="Find places to go and places you've been." + image="inv_item_landmark.tga" mouse_opaque="false" background_visible="true" - label="Places" bg_opaque_color="0.5 0.5 0.5 1.0" - image="inv_item_landmark.tga" - tab_title="Places" - description="Find places to go and places you've been." > <collapsible_ctrl name="places_accordian" @@ -67,12 +67,12 @@ <sidetray_tab name="sidebar_me" + tab_title="Me" + description="Change your profile, your look and quick links to your outfits." + image="icn_voice-pvtfocus.tga" mouse_opaque="false" background_visible="true" bg_opaque_color="0.5 0.5 0.5 1.0" - image="icn_voice-pvtfocus.tga" - tab_title="Me" - description="Change your profile, your look and quick links to your outfits." > <collapsible_ctrl name="me_accordion" |