From d6e22a75791e6e82b1b4f4dad045e5b53129fe8d Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Tue, 8 Dec 2009 10:03:34 +0200 Subject: Fixed major bug EXT-3191 (Crash after dragging inventory item to avatar or IM floater) Reason: Null pointer to cargo data was passed from LLToolDragAndDrop::dragOrDrop in this case. Fix: added check against NULL of the LLToolDragAndDrop::locateInventory() result in the LLToolDragAndDrop::dragOrDrop(). The same checking presents in another place of the LLToolDragAndDrop::dragOrDrop(). Handling is interrupted in this case. Thanks Andrew ProductEngine for provided call stack --HG-- branch : product-engine --- indra/newview/lltooldraganddrop.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 2d0a14dc70..aa35f22930 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -772,6 +772,9 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, { LLInventoryObject* cargo = locateInventory(item, cat); + // fix for EXT-3191 + if (NULL == cargo) return; + EAcceptance item_acceptance = ACCEPT_NO; handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE, mCargoTypes[mCurItemIndex], -- cgit v1.2.3 From d4cfcfc7ce1a9ab2488942077df2a6bfc9bf11bf Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Tue, 8 Dec 2009 11:14:00 +0200 Subject: Work on EXT-3147 (Implement new states for message indicators) -- added possibility to show "99+" when unread messages count exceeds 99 --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 10 ++++++++-- indra/newview/llchiclet.h | 9 +++++++++ indra/newview/skins/default/xui/en/panel_bottomtray.xml | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 4b3b7a99d8..6d37eaed3d 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -81,17 +81,18 @@ boost::signals2::signal<LLChiclet* (const LLUUID&), LLSysWellChiclet::Params::Params() : button("button") , unread_notifications("unread_notifications") +, max_displayed_count("max_displayed_count", 9) { button.name("button"); button.tab_stop(FALSE); button.label(LLStringUtil::null); - } LLSysWellChiclet::LLSysWellChiclet(const Params& p) : LLChiclet(p) , mButton(NULL) , mCounter(0) +, mMaxDisplayedCount(p.max_displayed_count) { LLButton::Params button_params = p.button; mButton = LLUICtrlFactory::create<LLButton>(button_params); @@ -108,7 +109,12 @@ void LLSysWellChiclet::setCounter(S32 counter) std::string s_count; if(counter != 0) { - s_count = llformat("%d", counter); + static std::string more_messages_exist("+"); + std::string more_messages(counter > mMaxDisplayedCount ? more_messages_exist : ""); + s_count = llformat("%d%s" + , llmin(counter, mMaxDisplayedCount) + , more_messages.c_str() + ); } mButton->setLabel(s_count); diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 609ce16713..598773757e 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -757,6 +757,14 @@ public: Optional<LLChicletNotificationCounterCtrl::Params> unread_notifications; + /** + * Contains maximum displayed count of unread messages. Default value is 9. + * + * If count is less than "max_unread_count" will be displayed as is. + * Otherwise 9+ will be shown (for default value). + */ + Optional<S32> max_displayed_count; + Params(); }; @@ -781,6 +789,7 @@ protected: protected: LLButton* mButton; S32 mCounter; + S32 mMaxDisplayedCount; }; /** diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 7f847237ce..c8c5bc688e 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -343,6 +343,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. image_pressed_selected="PushButton_Selected_Press" image_selected="PushButton_Selected_Press" left="0" + max_displayed_count="99" name="Unread IM messages" pad_left="0" pad_right="0" @@ -369,6 +370,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. height="23" layout="topleft" left="0" + max_displayed_count="99" name="notification_well" top="4" width="34"> -- cgit v1.2.3 From 20d5fafc1cd1598f38e4ecefc11f4ee891afec21 Mon Sep 17 00:00:00 2001 From: Paul Guslisty <pguslisty@productengine.com> Date: Tue, 8 Dec 2009 12:01:32 +0200 Subject: Fixed low bug EXT - 3038 (Verb buttons in avatar profile panel don't have tool-tips) --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_notes.xml | 5 +++++ indra/newview/skins/default/xui/en/panel_profile.xml | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/indra/newview/skins/default/xui/en/panel_notes.xml b/indra/newview/skins/default/xui/en/panel_notes.xml index c02dabed2c..9e7c9477d4 100644 --- a/indra/newview/skins/default/xui/en/panel_notes.xml +++ b/indra/newview/skins/default/xui/en/panel_notes.xml @@ -120,6 +120,7 @@ left="0" mouse_opaque="false" name="add_friend" + tool_tip="Offer friendship to the resident" top="5" width="55" /> <button @@ -128,6 +129,7 @@ label="IM" layout="topleft" name="im" + tool_tip="Open instant message session" top="5" left_pad="5" width="40" /> @@ -137,6 +139,7 @@ label="Call" layout="topleft" name="call" + tool_tip="Call this resident" left_pad="5" top="5" width="55" /> @@ -147,6 +150,7 @@ label="Map" layout="topleft" name="show_on_map_btn" + tool_tip="Show the resident on the map" top="5" left_pad="5" width="50" /> @@ -156,6 +160,7 @@ label="Teleport" layout="topleft" name="teleport" + tool_tip="Offer teleport" left_pad="5" top="5" width="90" /> diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index 6be203ef9c..638bc3cabd 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -286,6 +286,7 @@ left="0" mouse_opaque="false" name="add_friend" + tool_tip="Offer friendship to the resident" top="5" width="77" /> <button @@ -294,6 +295,7 @@ label="IM" layout="topleft" name="im" + tool_tip="Open instant message session" top="5" left_pad="5" width="33" /> @@ -303,6 +305,7 @@ label="Call" layout="topleft" name="call" + tool_tip="Call this resident" left_pad="5" top="5" width="40" /> @@ -313,6 +316,7 @@ label="Map" layout="topleft" name="show_on_map_btn" + tool_tip="Show the resident on the map" top="5" left_pad="5" width="44" /> @@ -322,6 +326,7 @@ label="Teleport" layout="topleft" name="teleport" + tool_tip="Offer teleport" left_pad="5" top="5" width="67" /> @@ -331,6 +336,7 @@ label="▼" layout="topleft" name="overflow_btn" + tool_tip="Pay money to or share inventory with the resident" right="-1" top="5" width="21" /> -- cgit v1.2.3 From 3dee439c1def1f96e9837eb2f65428e5484f9c8e Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan <dzaporozhan@productengine.com> Date: Mon, 7 Dec 2009 19:23:34 +0200 Subject: Implemented normal task EXT-3089 - Notification toasts positioning, layering and stacking. --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 13 ++++++- indra/newview/llimfloater.cpp | 1 + indra/newview/llscreenchannel.cpp | 66 +++++++++++++++++++++++++-------- indra/newview/llscreenchannel.h | 2 + indra/newview/llsyswellwindow.cpp | 1 + 5 files changed, 67 insertions(+), 16 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b301d784f9..20d81362fd 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5028,7 +5028,18 @@ <key>Type</key> <string>S32</string> <key>Value</key> - <integer>35</integer> + <integer>5</integer> + </map> + <key>NotificationChannelHeightRatio</key> + <map> + <key>Comment</key> + <string>TODO</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>0.5</real> </map> <key>OverflowToastHeight</key> <map> diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 2bc07d0c27..36c40eb49b 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -439,6 +439,7 @@ void LLIMFloater::setVisible(BOOL visible) if(channel) { channel->updateShowToastsState(); + channel->redrawToasts(); } if (visible && mChatHistory && mInputEditor) diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 4f0c873c61..87752e31f5 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -125,6 +125,8 @@ LLScreenChannelBase(id) void LLScreenChannel::init(S32 channel_left, S32 channel_right) { LLScreenChannelBase::init(channel_left, channel_right); + LLRect world_rect = gViewerWindow->getWorldViewRectScaled(); + updatePositionAndSize(world_rect, world_rect); } //-------------------------------------------------------------------------- @@ -136,7 +138,23 @@ LLScreenChannel::~LLScreenChannel() //-------------------------------------------------------------------------- void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect) { - LLScreenChannelBase::updatePositionAndSize(old_world_rect, new_world_rect); + S32 right_delta = old_world_rect.mRight - new_world_rect.mRight; + LLRect this_rect = getRect(); + + this_rect.mTop = new_world_rect.getHeight() * getHeightRatio(); + switch(mChannelAlignment) + { + case CA_LEFT : + break; + case CA_CENTRE : + this_rect.setCenterAndSize(new_world_rect.getWidth() / 2, new_world_rect.getHeight() / 2, this_rect.getWidth(), this_rect.getHeight()); + break; + case CA_RIGHT : + this_rect.mLeft -= right_delta; + this_rect.mRight -= right_delta; + } + setRect(this_rect); + redrawToasts(); } //-------------------------------------------------------------------------- @@ -169,6 +187,7 @@ void LLScreenChannel::addToast(const LLToast::Params& p) if(show_toast) { mToastList.push_back(new_toast_elem); + updateShowToastsState(); redrawToasts(); } else // store_toast @@ -356,6 +375,12 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel) } } +void LLScreenChannel::onVisibleChanged(LLUICtrl* ctrl, const LLSD& param) +{ + updateShowToastsState(); + redrawToasts(); +} + //-------------------------------------------------------------------------- void LLScreenChannel::redrawToasts() { @@ -405,10 +430,17 @@ void LLScreenChannel::showToastsBottom() { if( it != mToastList.rend()-1) { - stop_showing_toasts = ((*it).toast->getRect().mTop + gSavedSettings.getS32("OverflowToastHeight") + gSavedSettings.getS32("ToastGap")) > getRect().mTop; + S32 toast_top = (*it).toast->getRect().mTop + gSavedSettings.getS32("ToastGap"); + stop_showing_toasts = toast_top > getRect().mTop; } } + // at least one toast should be visible + if(it == mToastList.rbegin()) + { + stop_showing_toasts = false; + } + if(stop_showing_toasts) break; @@ -566,6 +598,21 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer) mStartUpToastPanel->setVisible(TRUE); } +// static -------------------------------------------------------------------------- +F32 LLScreenChannel::getHeightRatio() +{ + F32 ratio = gSavedSettings.getF32("NotificationChannelHeightRatio"); + if(0.0f > ratio) + { + ratio = 0.0f; + } + else if(1.0f < ratio) + { + ratio = 1.0f; + } + return ratio; +} + //-------------------------------------------------------------------------- void LLScreenChannel::updateStartUpString(S32 num) { @@ -735,27 +782,16 @@ void LLScreenChannel::updateShowToastsState() return; } - // for IM floaters showed in a docked state - prohibit showing of ani toast - if(dynamic_cast<LLIMFloater*>(floater) - || dynamic_cast<LLScriptFloater*>(floater) ) - { - setShowToasts(!(floater->getVisible() && floater->isDocked())); - if (!getShowToasts()) - { - removeAndStoreAllStorableToasts(); - } - } - // *TODO: mantipov: what we have to do with derived classes: LLNotificationWellWindow & LLIMWelWindow? // See EXT-3081 for details // for Message Well floater showed in a docked state - adjust channel's height - if(dynamic_cast<LLSysWellWindow*>(floater)) + if(dynamic_cast<LLSysWellWindow*>(floater) || dynamic_cast<LLIMFloater*>(floater)) { S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");; LLRect this_rect = getRect(); if(floater->getVisible() && floater->isDocked()) { - channel_bottom += (floater->getRect().getHeight() + gSavedSettings.getS32("ToastGap")); + channel_bottom = floater->getRect().mTop + gSavedSettings.getS32("ToastGap"); } if(channel_bottom != this_rect.mBottom) diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index 67f1c9bdc6..e384b17a0c 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -265,6 +265,8 @@ private: // create the StartUp Toast void createStartUpToast(S32 notif_num, F32 timer); + static F32 getHeightRatio(); + // Channel's flags static bool mWasStartUpToastShown; diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index bef7f5d6aa..26caf0be69 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -170,6 +170,7 @@ void LLSysWellWindow::setVisible(BOOL visible) if(mChannel) { mChannel->updateShowToastsState(); + mChannel->redrawToasts(); } } -- cgit v1.2.3 From e6210e82d3e8794a55f7bd3d7ef01f1fbcdeea0e Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan <dzaporozhan@productengine.com> Date: Tue, 8 Dec 2009 12:17:10 +0200 Subject: Update for normal task EXT-3089 - Notification toasts positioning, layering and stacking. Improved functionality, cleaned code. --HG-- branch : product-engine --- indra/llui/lldockablefloater.h | 3 ++- indra/llui/lldockcontrol.h | 3 +++ indra/newview/app_settings/settings.xml | 2 +- indra/newview/llimfloater.cpp | 1 + indra/newview/llscreenchannel.cpp | 27 ++++++++------------------- indra/newview/llscreenchannel.h | 3 +++ indra/newview/llsyswellwindow.cpp | 1 + 7 files changed, 19 insertions(+), 21 deletions(-) diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index 46491d8a29..2c339f4a3f 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -83,6 +83,8 @@ public: virtual void onDockHidden(); virtual void onDockShown(); + LLDockControl* getDockControl(); + private: /** * Provides unique of dockable floater. @@ -92,7 +94,6 @@ private: protected: void setDockControl(LLDockControl* dockControl); - LLDockControl* getDockControl(); const LLUIImagePtr& getDockTongue(); private: diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h index 30a45bedc7..550955c4c5 100644 --- a/indra/llui/lldockcontrol.h +++ b/indra/llui/lldockcontrol.h @@ -76,6 +76,9 @@ public: // gets a rect that bounds possible positions for a dockable control (EXT-1111) void getAllowedRect(LLRect& rect); + S32 getTongueWidth() { return mDockTongue->getWidth(); } + S32 getTongueHeight() { return mDockTongue->getHeight(); } + private: virtual void moveDockable(); private: diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 20d81362fd..08a65461b6 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5033,7 +5033,7 @@ <key>NotificationChannelHeightRatio</key> <map> <key>Comment</key> - <string>TODO</string> + <string>Notification channel and World View ratio(0.0 - always show 1 notification, 1.0 - max ratio).</string> <key>Persist</key> <integer>1</integer> <key>Type</key> diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 36c40eb49b..40ae112e4b 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -415,6 +415,7 @@ void LLIMFloater::setDocked(bool docked, bool pop_on_undock) if(channel) { channel->updateShowToastsState(); + channel->redrawToasts(); } } diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 87752e31f5..a1ea7aeb96 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -375,12 +375,6 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel) } } -void LLScreenChannel::onVisibleChanged(LLUICtrl* ctrl, const LLSD& param) -{ - updateShowToastsState(); - redrawToasts(); -} - //-------------------------------------------------------------------------- void LLScreenChannel::redrawToasts() { @@ -446,17 +440,11 @@ void LLScreenChannel::showToastsBottom() if( !(*it).toast->getVisible() ) { - if((*it).toast->isFirstLook()) - { - (*it).toast->setVisible(TRUE); - } - else - { - // HACK - // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts - (*it).toast->setVisible(TRUE); - gFloaterView->sendChildToBack((*it).toast); - } + // HACK + // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts + (*it).toast->setVisible(TRUE); + // Show toast behind floaters. (EXT-3089) + gFloaterView->sendChildToBack((*it).toast); } } @@ -774,7 +762,7 @@ void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter) //-------------------------------------------------------------------------- void LLScreenChannel::updateShowToastsState() { - LLFloater* floater = LLDockableFloater::getInstanceHandle().get(); + LLDockableFloater* floater = dynamic_cast<LLDockableFloater*>(LLDockableFloater::getInstanceHandle().get()); if(!floater) { @@ -791,7 +779,8 @@ void LLScreenChannel::updateShowToastsState() LLRect this_rect = getRect(); if(floater->getVisible() && floater->isDocked()) { - channel_bottom = floater->getRect().mTop + gSavedSettings.getS32("ToastGap"); + channel_bottom += floater->getRect().getHeight(); + channel_bottom += floater->getDockControl()->getTongueHeight(); } if(channel_bottom != this_rect.mBottom) diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index e384b17a0c..3b0ee2050c 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -265,6 +265,9 @@ private: // create the StartUp Toast void createStartUpToast(S32 notif_num, F32 timer); + /** + * Notification channel and World View ratio(0.0 - always show 1 notification, 1.0 - max ratio). + */ static F32 getHeightRatio(); // Channel's flags diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 26caf0be69..28bdfbf271 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -189,6 +189,7 @@ void LLSysWellWindow::setDocked(bool docked, bool pop_on_undock) if(mChannel) { mChannel->updateShowToastsState(); + mChannel->redrawToasts(); } } -- cgit v1.2.3 From d36b993e92bb8a69d32407a42b67adf40f1a75ab Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev <ychebotarev@productengine.com> Date: Tue, 8 Dec 2009 12:53:45 +0200 Subject: fix low EXT-1112 No critical notification if quiting SL with unsaved group --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 11 +++++++ indra/newview/llpanelgroup.cpp | 67 ++++++++++++++++++++++++++++++++++++++++++ indra/newview/llpanelgroup.h | 8 ++++- 3 files changed, 85 insertions(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ddc818172d..fd449d4190 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -78,6 +78,8 @@ #include "lllocationhistory.h" #include "llfasttimerview.h" #include "llvoicechannel.h" +#include "llsidetray.h" + #include "llweb.h" #include "llsecondlifeurls.h" @@ -2858,6 +2860,8 @@ void LLAppViewer::requestQuit() gFloaterView->closeAllChildren(true); } + LLSideTray::getInstance()->notifyChildren(LLSD().with("request","quit")); + send_stats(); gLogoutTimer.reset(); @@ -3762,6 +3766,13 @@ void LLAppViewer::idleShutdown() { return; } + + if (LLSideTray::getInstance()->notifyChildren(LLSD().with("request","wait_quit"))) + { + return; + } + + // ProductEngine: Try moving this code to where we shut down sTextureCache in cleanup() // *TODO: ugly diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 2cb3967685..e0f159cfeb 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -90,6 +90,7 @@ LLPanelGroup::LLPanelGroup() : LLPanel(), LLGroupMgrObserver( LLUUID() ), mAllowEdit( TRUE ) + ,mShowingNotifyDialog(false) { // Set up the factory callbacks. // Roles sub tabs @@ -538,3 +539,69 @@ void LLPanelGroup::showNotice(const std::string& subject, } +bool LLPanelGroup::canClose() +{ + if(getVisible() == false) + return true; + + bool need_save = false; + std::string mesg; + for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it) + if(need_save|=(*it)->needsApply(mesg)) + break; + if(!need_save) + return false; + // If no message was provided, give a generic one. + if (mesg.empty()) + { + mesg = mDefaultNeedsApplyMesg; + } + // Create a notify box, telling the user about the unapplied tab. + LLSD args; + args["NEEDS_APPLY_MESSAGE"] = mesg; + args["WANT_APPLY_MESSAGE"] = mWantApplyMesg; + + LLNotificationsUtil::add("SaveChanges", args, LLSD(), boost::bind(&LLPanelGroup::handleNotifyCallback,this, _1, _2)); + + mShowingNotifyDialog = true; + + return false; +} + +bool LLPanelGroup::notifyChildren(const LLSD& info) +{ + if(info.has("request") && mID.isNull() ) + { + std::string str_action = info["request"]; + + if (str_action == "quit" ) + { + canClose(); + return true; + } + if(str_action == "wait_quit") + return mShowingNotifyDialog; + } + return false; +} +bool LLPanelGroup::handleNotifyCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + mShowingNotifyDialog = false; + switch (option) + { + case 0: // "Apply Changes" + apply(); + break; + case 1: // "Ignore Changes" + break; + case 2: // "Cancel" + default: + // Do nothing. The user is canceling the action. + // If we were quitting, we didn't really mean it. + LLAppViewer::instance()->abortQuit(); + break; + } + return false; +} + diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index 306e6575fc..f6aefdb676 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -89,7 +89,10 @@ public: const std::string& inventory_name, LLOfferInfo* inventory_offer); - + + bool notifyChildren (const LLSD& info); + bool handleNotifyCallback(const LLSD&, const LLSD&); + protected: virtual void update(LLGroupChange gc); @@ -107,6 +110,9 @@ protected: protected: bool apply(LLPanelGroupTab* tab); + bool canClose(); + + bool mShowingNotifyDialog; LLTimer mRefreshTimer; -- cgit v1.2.3 From 7348fbb69af095f073da5ec9bd25c690c80b93f5 Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Tue, 8 Dec 2009 13:24:37 +0200 Subject: Completed normal task EXT-3147 (Implement new states for message indicators) -- Implemented 4 states of button by its background images via force Pressed state. They are: --- xml attribute Description --- image_unselected "Unlit" - there are no new messages --- image_selected "Unlit" + "Selected" - there are no new messages and the Well is open --- image_pressed "Lit" - there are new messages --- image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 10 ++++++++++ indra/newview/skins/default/xui/en/panel_bottomtray.xml | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 6d37eaed3d..bd8effd93d 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -120,6 +120,16 @@ void LLSysWellChiclet::setCounter(S32 counter) mButton->setLabel(s_count); mCounter = counter; + + /* + Emulate 4 states of button by background images, see detains in EXT-3147 + xml attribute Description + image_unselected "Unlit" - there are no new messages + image_selected "Unlit" + "Selected" - there are no new messages and the Well is open + image_pressed "Lit" - there are new messages + image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open + */ + mButton->setForcePressedState(counter > 0); } boost::signals2::connection LLSysWellChiclet::setClickCallback( diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index c8c5bc688e..fc6f4966c4 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -331,6 +331,14 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. name="im_well" top="4" width="34"> + <!-- +Emulate 4 states of button by background images, see detains in EXT-3147. The same should be for notification_well button +xml attribute Description +image_unselected "Unlit" - there are no new messages +image_selected "Unlit" + "Selected" - there are no new messages and the Well is open +image_pressed "Lit" - there are new messages +image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open + --> <button auto_resize="true" flash_color="EmphasisColor" -- cgit v1.2.3 From 75993e09bf90e8a9d380192268cd6e0e149a70e2 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk <dserduk@productengine.com> Date: Tue, 8 Dec 2009 15:00:54 +0200 Subject: fixed Bug EXT-3001 \"speaking\" object appears in the Voice Control window as (???)(???) Cause: LLFloaterChat::addChat() was adding a speaking object into the speaker list Solution: filtering these speakers in SpeakerAddListener --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 13f195a1be..0aed123191 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -278,6 +278,16 @@ void LLParticipantList::addAvatarIDExceptAgent(std::vector<LLUUID>& existing_lis // bool LLParticipantList::SpeakerAddListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) { + /** + * We need to filter speaking objects. These objects shouldn't appear in the list + * @c LLFloaterChat::addChat() in llviewermessage.cpp to get detailed call hierarchy + */ + const LLUUID& speaker_id = event->getValue().asUUID(); + LLPointer<LLSpeaker> speaker = mParent.mSpeakerMgr->findSpeaker(speaker_id); + if(speaker.isNull() || speaker->mType == LLSpeaker::SPEAKER_OBJECT) + { + return false; + } return mParent.onAddItemEvent(event, userdata); } -- cgit v1.2.3 From 8bfdaebc8072b89ce1268345b0c1a471a4194edf Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Tue, 8 Dec 2009 16:18:21 +0200 Subject: Completed normal task EXT-3147 (Implement new states for message indicators) -- Implemented flashing to 'Lit' [N] times. Also added configurable period of flashing. --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 61 ++++++++++++++++++++-- indra/newview/llchiclet.h | 28 +++++++++- .../skins/default/xui/en/panel_bottomtray.xml | 2 + 3 files changed, 87 insertions(+), 4 deletions(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index bd8effd93d..d7c9575a7b 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -78,10 +78,50 @@ boost::signals2::signal<LLChiclet* (const LLUUID&), ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// +/** + * Updates the Well's 'Lit' state to flash it when "new messages" are come. + * + * It gets callback which will be called 2*N times with passed period. See EXT-3147 + */ +class LLSysWellChiclet::FlashToLitTimer : public LLEventTimer +{ +public: + typedef boost::function<void()> callback_t; + LLSysWellChiclet::FlashToLitTimer(S32 count, F32 period, callback_t cb) + : LLEventTimer(period) + , mCallback(cb) + , mFlashCount(2 * count) + , mCurrentFlashCount(0) + { + mEventTimer.stop(); + } + + BOOL tick() + { + mCallback(); + + if (++mCurrentFlashCount == mFlashCount) mEventTimer.stop(); + return FALSE; + } + + void flash() + { + mCurrentFlashCount = 0; + mEventTimer.start(); + } + +private: + callback_t mCallback; + S32 mFlashCount; + S32 mCurrentFlashCount; +}; + LLSysWellChiclet::Params::Params() : button("button") , unread_notifications("unread_notifications") , max_displayed_count("max_displayed_count", 9) +, flash_to_lit_count("flash_to_lit_count", 3) +, flash_period("flash_period", 0.5F) { button.name("button"); button.tab_stop(FALSE); @@ -93,15 +133,18 @@ LLSysWellChiclet::LLSysWellChiclet(const Params& p) , mButton(NULL) , mCounter(0) , mMaxDisplayedCount(p.max_displayed_count) +, mFlashToLitTimer(NULL) { LLButton::Params button_params = p.button; mButton = LLUICtrlFactory::create<LLButton>(button_params); addChild(mButton); + + mFlashToLitTimer = new FlashToLitTimer(p.flash_to_lit_count, p.flash_period, boost::bind(&LLSysWellChiclet::changeLitState, this)); } LLSysWellChiclet::~LLSysWellChiclet() { - + delete mFlashToLitTimer; } void LLSysWellChiclet::setCounter(S32 counter) @@ -119,8 +162,6 @@ void LLSysWellChiclet::setCounter(S32 counter) mButton->setLabel(s_count); - mCounter = counter; - /* Emulate 4 states of button by background images, see detains in EXT-3147 xml attribute Description @@ -130,6 +171,12 @@ void LLSysWellChiclet::setCounter(S32 counter) image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open */ mButton->setForcePressedState(counter > 0); + + if (mCounter == 0 && counter > 0) + { + mFlashToLitTimer->flash(); + } + mCounter = counter; } boost::signals2::connection LLSysWellChiclet::setClickCallback( @@ -142,6 +189,14 @@ void LLSysWellChiclet::setToggleState(BOOL toggled) { mButton->setToggleState(toggled); } +void LLSysWellChiclet::changeLitState() +{ + static bool set_lit = false; + + mButton->setForcePressedState(set_lit); + + set_lit ^= true; +} /************************************************************************/ /* LLIMWellChiclet implementation */ diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 598773757e..06d25f081a 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -745,7 +745,7 @@ private: /** * Implements notification chiclet. Used to display total amount of unread messages - * across all IM sessions, total amount of system notifications. + * across all IM sessions, total amount of system notifications. See EXT-3147 for details */ class LLSysWellChiclet : public LLChiclet { @@ -765,6 +765,16 @@ public: */ Optional<S32> max_displayed_count; + /** + * How many time chiclet should flash before set "Lit" state. Default value is 3. + */ + Optional<S32> flash_to_lit_count; + + /** + * Period of flashing while setting "Lit" state, in seconds. Default value is 0.5. + */ + Optional<F32> flash_period; + Params(); }; @@ -786,10 +796,26 @@ protected: LLSysWellChiclet(const Params& p); friend class LLUICtrlFactory; + /** + * Change Well 'Lit' state from 'Lit' to 'Unlit' and vice-versa. + * + * There is an assumption that it will be called 2*N times to do not change its start state. + * @see FlashToLitTimer + */ + void changeLitState(); + protected: + class FlashToLitTimer; LLButton* mButton; S32 mCounter; S32 mMaxDisplayedCount; + + /** + * How many times Well will blink. + */ + S32 mFlashToLitCount; + FlashToLitTimer* mFlashToLitTimer; + }; /** diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index fc6f4966c4..e77960f200 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -324,6 +324,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. min_width="34" user_resize="false"> <chiclet_im_well + flash_period="0.3" follows="right" height="23" layout="topleft" @@ -374,6 +375,7 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well min_width="34" user_resize="false"> <chiclet_notification + flash_period="0.25" follows="right" height="23" layout="topleft" -- cgit v1.2.3 From dcb786b5a477acd74ed7450a4975de0a7a1d66bd Mon Sep 17 00:00:00 2001 From: Andrew Polunin <apolunin@productengine.com> Date: Tue, 8 Dec 2009 16:28:47 +0200 Subject: implemented normal task EXT-3086 Update non-interactive system toasts behavior --HG-- branch : product-engine --- indra/newview/lltoast.cpp | 23 ++++++++++++++++++++++- indra/newview/lltoast.h | 9 +++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index fc7c029a17..4131e2755a 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -67,7 +67,8 @@ LLToast::LLToast(const LLToast::Params& p) mHideBtn(NULL), mNotification(p.notification), mIsHidden(false), - mHideBtnPressed(false) + mHideBtnPressed(false), + mIsTip(p.is_tip) { LLUICtrlFactory::getInstance()->buildFloater(this, "panel_toast.xml", NULL); @@ -98,9 +99,29 @@ BOOL LLToast::postBuild() mTimer.stop(); } + if (mIsTip) + { + mTextEditor = mPanel->getChild<LLTextEditor>("text_editor_box"); + + if (mTextEditor) + { + mTextEditor->setMouseUpCallback(boost::bind(&LLToast::hide,this)); + mPanel->setMouseUpCallback(boost::bind(&LLToast::handleTipToastClick, this, _2, _3, _4)); + } + } + return TRUE; } +//-------------------------------------------------------------------------- +void LLToast::handleTipToastClick(S32 x, S32 y, MASK mask) +{ + if (!mTextEditor->getRect().pointInRect(x, y)) + { + hide(); + } +} + //-------------------------------------------------------------------------- void LLToast::setHideButtonEnabled(bool enabled) { diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index d08e46e160..0c3c598704 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -40,6 +40,7 @@ #include "llnotificationptr.h" #include "llviewercontrol.h" +#include "lltexteditor.h" #define MOUSE_LEAVE false #define MOUSE_ENTER true @@ -155,6 +156,8 @@ public: private: + void handleTipToastClick(S32 x, S32 y, MASK mask); + // check timer bool lifetimeHasExpired(); // on timer finished function @@ -169,8 +172,9 @@ private: F32 mToastLifetime; // in seconds F32 mToastFadingTime; // in seconds - LLPanel* mPanel; - LLButton* mHideBtn; + LLPanel* mPanel; + LLButton* mHideBtn; + LLTextEditor* mTextEditor; LLColor4 mBgColor; bool mCanFade; @@ -178,6 +182,7 @@ private: bool mHideBtnEnabled; bool mHideBtnPressed; bool mIsHidden; // this flag is TRUE when a toast has faded or was hidden with (x) button (EXT-1849) + bool mIsTip; }; } -- cgit v1.2.3 From 8b6b55e07998e33b624f5f4c6a148017ae87774f Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko <doleshko@productengine.com> Date: Tue, 8 Dec 2009 17:19:09 +0200 Subject: work on normal tasks: (EXT-2803) Create notifications and dialogs to negotiate P2P voice chat (shown over the Speak button) (EXT-2806) Create notification windows and dialogs to negotiate Group Voice Chat (docked to Speak button's chevron) (EXT-2802) Create notifications and dialogs to negotiate AvaLine calls (shown over Speak button) (EXT-2805) Create notifications and dialogs to negotiate Ad-Hoc calls (shown over Speak button) - "NO ANSWER" notification gets closed after specified timeout - added possibility to check direction of call (but it doesn't work for group and ad-hoc calls yet) - adjusted layout for the incoming call dialog --HG-- branch : product-engine --- indra/newview/llimview.cpp | 47 +++++++++++++++++++--- indra/newview/llimview.h | 10 ++++- indra/newview/llvoiceclient.cpp | 15 +++++++ indra/newview/llvoiceclient.h | 2 + .../skins/default/xui/en/floater_incoming_call.xml | 12 ++++-- 5 files changed, 75 insertions(+), 11 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 6c4af0522f..b710c41650 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -154,7 +154,6 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mInitialTargetIDs(ids), mVoiceChannel(NULL), mSpeakers(NULL), - mCallDialogManager(NULL), mSessionInitialized(false), mCallBackEnabled(true), mTextIMPossible(true), @@ -287,9 +286,6 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES LLIMModel::LLIMSession::~LLIMSession() { - delete mCallDialogManager; - mCallDialogManager = NULL; - delete mSpeakers; mSpeakers = NULL; @@ -1268,6 +1264,7 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat { LLSD mCallDialogPayload; LLOutgoingCallDialog* ocd; + bool is_incoming; mCallDialogPayload["session_id"] = sSession->mSessionID; mCallDialogPayload["session_name"] = sSession->mName; @@ -1277,8 +1274,10 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat switch(new_state) { case LLVoiceChannel::STATE_CALL_STARTED : - // do not show "Calling to..." if it is incoming P2P call - if(sSession->mSessionType == LLIMModel::LLIMSession::P2P_SESSION && static_cast<LLVoiceChannelP2P*>(sSession->mVoiceChannel)->isIncomingCall()) + // do not show "Calling to..." if it is incoming call + is_incoming = LLVoiceClient::getInstance()->isSessionIncoming(sSession->mSessionID); + // *TODO: implement for AdHoc and Group voice chats + if(is_incoming) { return; } @@ -1290,6 +1289,7 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat ocd->getChild<LLTextBox>("leaving")->setVisible(true); ocd->getChild<LLTextBox>("connecting")->setVisible(false); ocd->getChild<LLTextBox>("noanswer")->setVisible(false); + ocd->getChild<LLButton>("Cancel")->setVisible(true); } return; @@ -1301,10 +1301,12 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat ocd->getChild<LLTextBox>("leaving")->setVisible(true); ocd->getChild<LLTextBox>("connecting")->setVisible(true); ocd->getChild<LLTextBox>("noanswer")->setVisible(false); + ocd->getChild<LLButton>("Cancel")->setVisible(true); } return; case LLVoiceChannel::STATE_ERROR : + mCallDialogPayload["start_timer"] = true; ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); if (ocd) { @@ -1312,6 +1314,7 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat ocd->getChild<LLTextBox>("leaving")->setVisible(false); ocd->getChild<LLTextBox>("connecting")->setVisible(false); ocd->getChild<LLTextBox>("noanswer")->setVisible(true); + ocd->getChild<LLButton>("Cancel")->setVisible(false); } return; @@ -1363,6 +1366,33 @@ LLCallDialog(payload) instance->onCancel(instance); } } +void LLOutgoingCallDialog::draw() +{ + if (lifetimeHasExpired()) + { + onLifetimeExpired(); + } + LLDockableFloater::draw(); +} + +bool LLOutgoingCallDialog::lifetimeHasExpired() +{ + if (mLifetimeTimer.getStarted()) + { + F32 elapsed_time = mLifetimeTimer.getElapsedTimeF32(); + if (elapsed_time > LIFETIME) + { + return true; + } + } + return false; +} + +void LLOutgoingCallDialog::onLifetimeExpired() +{ + mLifetimeTimer.stop(); + closeFloater(); +} void LLOutgoingCallDialog::onOpen(const LLSD& key) { @@ -1391,6 +1421,11 @@ void LLOutgoingCallDialog::onOpen(const LLSD& key) childSetTextArg("connecting", "[CALLEE_NAME]", callee_name); LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon"); icon->setValue(callee_id); + + if(mPayload.has("start_timer")) + { + mLifetimeTimer.reset(); + } } diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index c002434a18..d85a4cda82 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -81,7 +81,6 @@ public: SType mSessionType; LLUUID mOtherParticipantID; std::vector<LLUUID> mInitialTargetIDs; - LLCallDialogManager* mCallDialogManager; // connection to voice channel state change signal boost::signals2::connection mVoiceChannelStateChangeConnection; @@ -493,7 +492,16 @@ public: static void onCancel(void* user_data); + // check timer state + /*virtual*/ void draw(); + private: + // lifetime timer for NO_ANSWER notification + LLTimer mLifetimeTimer; + // lifetime duration for NO_ANSWER notification + static const S32 LIFETIME = 5; + bool lifetimeHasExpired(); + void onLifetimeExpired(); }; // Globals diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 7e1e7c940f..63acba50e7 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -4279,6 +4279,7 @@ void LLVoiceClient::mediaStreamUpdatedEvent( { // Send the voice chat invite to the GUI layer // *TODO: Question: Should we correlate with the mute list here? + session->mIncoming = true; session->mIMSessionID = LLIMMgr::computeSessionID(IM_SESSION_P2P_INVITE, session->mCallerID); session->mVoiceInvitePending = true; if(session->mName.empty()) @@ -6353,6 +6354,20 @@ LLVoiceClient::sessionState *LLVoiceClient::findSession(const LLUUID &participan return result; } +bool LLVoiceClient::isSessionIncoming(const LLUUID &session_id) +{ + for(sessionIterator iter = sessionsBegin(); iter != sessionsEnd(); iter++) + { + sessionState *session = *iter; + if(session->mIMSessionID == session_id) + { + return session->mIncoming; + break; + } + } + return false; +} + LLVoiceClient::sessionState *LLVoiceClient::addSession(const std::string &uri, const std::string &handle) { sessionState *result = NULL; diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 347fae6156..edfe0173f8 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -527,6 +527,8 @@ static void updatePosition(void); // Currently this will be false only for PSTN P2P calls. // NOTE: this will return true if the session can't be found. bool isSessionTextIMPossible(const LLUUID &session_id); + + bool isSessionIncoming(const LLUUID &session_id); private: diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml index 526fda90d1..acd59b6f09 100644 --- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml @@ -36,21 +36,25 @@ top="35" width="36" /> <text + clip_partial="true" font="SansSerifLarge" - height="20" + height="37" layout="topleft" left="77" name="caller name" - top="27" + top="20" + use_ellipses="true" width="315" word_wrap="true" /> <text + clip_partial="true" font="SansSerif" - height="50" + height="30" layout="topleft" left="77" name="question" - top="52" + top_pad="5" + use_ellipses="true" width="315" word_wrap="true"> Do you want to leave [CURRENT_CHAT] and join this voice chat? -- cgit v1.2.3 From 00212e98d6b568cb505a99a06fadc54595f242ac Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Tue, 8 Dec 2009 17:38:07 +0200 Subject: Fixed Linux Build --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index d7c9575a7b..b11d8d45c8 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -87,7 +87,7 @@ class LLSysWellChiclet::FlashToLitTimer : public LLEventTimer { public: typedef boost::function<void()> callback_t; - LLSysWellChiclet::FlashToLitTimer(S32 count, F32 period, callback_t cb) + FlashToLitTimer(S32 count, F32 period, callback_t cb) : LLEventTimer(period) , mCallback(cb) , mFlashCount(2 * count) -- cgit v1.2.3 From 09f0b98e14a167902ffea75467e8c528cab8dad8 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko <doleshko@productengine.com> Date: Tue, 8 Dec 2009 18:55:36 +0200 Subject: additional fix for outgoing voice notification now only "NO ANSWER" notification closed after specified timeout --HG-- branch : product-engine --- indra/newview/llimview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b710c41650..9790bdf9c0 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1422,6 +1422,8 @@ void LLOutgoingCallDialog::onOpen(const LLSD& key) LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon"); icon->setValue(callee_id); + // stop timer by default + mLifetimeTimer.stop(); if(mPayload.has("start_timer")) { mLifetimeTimer.reset(); -- cgit v1.2.3 From 7d261eb9cf95efdeb546fe8b39568015d840c61a Mon Sep 17 00:00:00 2001 From: Alexei Arabadji <aarabadji@productengine.com> Date: Tue, 8 Dec 2009 20:34:30 +0200 Subject: =?UTF-8?q?fixed=20EXT-3193=20=E2=80=9CClosing=20toasts=20cause=20?= =?UTF-8?q?blocking=20toast=20screen=20channel.=E2=80=9D,=20added=20direct?= =?UTF-8?q?=20check=20of=20toast=20hovering=20to=20avoid=20collisions=20wi?= =?UTF-8?q?th=20order=20of=20mouseEnter=20and=20mouseLeave=20events;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit corrected EXT-3096, added call off startFadingToasts in deleteToast since mouseLeave not will be called in case closing toast; --HG-- branch : product-engine --- indra/newview/llscreenchannel.cpp | 44 +++++++++++++++------------------------ indra/newview/llscreenchannel.h | 1 - 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index a1ea7aeb96..7ea1674da1 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -243,6 +243,7 @@ void LLScreenChannel::deleteToast(LLToast* toast) if(mHoveredToast == toast) { mHoveredToast = NULL; + startFadingToasts(); } // close the toast @@ -720,39 +721,28 @@ void LLScreenChannel::removeToastsBySessionID(LLUUID id) //-------------------------------------------------------------------------- void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter) { - // because of LLViewerWindow::updateUI() that ALWAYS calls onMouseEnter BEFORE onMouseLeave - // we must check this to prevent incorrect setting for hovering in a channel - std::map<LLToast*, bool>::iterator it_first, it_second; - S32 stack_size = mToastEventStack.size(); - if(mouse_enter) + // because of LLViewerWindow::updateUI() that NOT ALWAYS calls onMouseEnter BEFORE onMouseLeave + // we must check hovering directly to prevent incorrect setting for hovering in a channel + S32 x,y; + if (mouse_enter) { - mHoveredToast = toast; - } - else - { - mHoveredToast = NULL; - } - - switch(stack_size) - { - case 0: - mToastEventStack.insert(std::pair<LLToast*, bool>(toast, mouse_enter)); - break; - case 1: - it_first = mToastEventStack.begin(); - if((*it_first).second && !mouse_enter && ((*it_first).first != toast) ) + toast->screenPointToLocal(gViewerWindow->getCurrentMouseX(), + gViewerWindow->getCurrentMouseY(), &x, &y); + bool hover = toast->pointInView(x, y) == TRUE; + if (hover) { - mToastEventStack.clear(); mHoveredToast = toast; } - else + } + else if (mHoveredToast != NULL) + { + mHoveredToast->screenPointToLocal(gViewerWindow->getCurrentMouseX(), + gViewerWindow->getCurrentMouseY(), &x, &y); + bool hover = mHoveredToast->pointInView(x, y) == TRUE; + if (!hover) { - mToastEventStack.clear(); - mToastEventStack.insert(std::pair<LLToast*, bool>(toast, mouse_enter)); + mHoveredToast = NULL; } - break; - default: - LL_ERRS ("LLScreenChannel::onToastHover: stack size error " ) << stack_size << llendl; } if(!isHovering()) diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index 3b0ee2050c..b551732133 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -279,7 +279,6 @@ private: std::vector<ToastElem> mToastList; std::vector<ToastElem> mStoredToastList; - std::map<LLToast*, bool> mToastEventStack; }; } -- cgit v1.2.3 From 4db25f9e02f79afaaaffdf205fe7dfe8785029d8 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov <adyukov@productengine.com> Date: Tue, 8 Dec 2009 21:15:28 +0200 Subject: Fixed normal bug EXT-2776 (Notification toasts of group chat pop up when group chat is open but not in focus). --HG-- branch : product-engine --- indra/newview/llimview.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 9790bdf9c0..d5d3b3b5ae 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -116,6 +116,13 @@ void toast_callback(const LLSD& msg){ return; } + // Skip toasting if we have open window of IM with this session id + LLIMFloater* open_im_floater = LLIMFloater::findInstance(msg["session_id"]); + if (open_im_floater && open_im_floater->getVisible()) + { + return; + } + LLSD args; args["MESSAGE"] = msg["message"]; args["TIME"] = msg["time"]; -- cgit v1.2.3 From a85812d93fa8e574391ad3e1d21cf0758324e2f1 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi <emutavchi@productengine.com> Date: Tue, 8 Dec 2009 22:15:27 +0200 Subject: Partial fix of normal bug EXT-2788 (Confusing message after accepting outdated voice chat) --HG-- branch : product-engine --- indra/newview/llimview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d5d3b3b5ae..6a9853913a 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1082,7 +1082,7 @@ public: if ( 404 == statusNum ) { std::string error_string; - error_string = "does not exist"; + error_string = "session_does_not_exist_error"; gIMMgr->showSessionStartError(error_string, mSessionID); } } -- cgit v1.2.3 From c1eec20524f2cfa420857975e21a5609fbfb19df Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi <emutavchi@productengine.com> Date: Tue, 8 Dec 2009 22:25:15 +0200 Subject: Fixed low bug EXT-3037 ("MissingString(share_alert)" message appears in p2p chat window after clicking "Share" btn on IM floater) --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 3b32912fbf..75af881e93 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2853,6 +2853,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="inventory_item_offered-im"> Inventory item offered </string> + <string name="share_alert"> + Drag items from inventory here + </string> + <string name="only_user_message"> You are the only user in this session. -- cgit v1.2.3 From 25b8258d811ce2f89fa9b1b31192796cf2567968 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi <emutavchi@productengine.com> Date: Tue, 8 Dec 2009 22:27:33 +0200 Subject: Fixed low bug EXT-3058 ('Save Pick' Button Inoperable When Edit Only Involves Deleting Text from the Description) --HG-- branch : product-engine --- indra/llui/lltexteditor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index e68affc36c..faf9ccbeb8 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1887,9 +1887,10 @@ void LLTextEditor::doDelete() removeChar(); } - onKeyStroke(); } + onKeyStroke(); + needsReflow(); } -- cgit v1.2.3 From 92ca569b42947db740390b3b38bf1911e30f3e8f Mon Sep 17 00:00:00 2001 From: Ramzi Linden <ramzi@lindenlab.com> Date: Tue, 8 Dec 2009 17:30:58 -0800 Subject: EXT-2702 the Group abilities 'Show in Find Places' is mislabeled. Also updated various places that refer to the 1.23 style UI. --- .../newview/skins/default/xui/en/notifications.xml | 2 +- .../newview/skins/default/xui/en/role_actions.xml | 64 +++++++++++----------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f659062cfe..a07b23d0c3 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1688,7 +1688,7 @@ This location can play streaming media. Streaming media requires a fast Internet connection. Play streaming media when available? -(You can change this option later under Preferences > Audio & Video.) +(You can change this option later under Preferences > Privacy.) <usetemplate name="okcancelbuttons" notext="Disable" diff --git a/indra/newview/skins/default/xui/en/role_actions.xml b/indra/newview/skins/default/xui/en/role_actions.xml index b89a975430..a6036f8b78 100644 --- a/indra/newview/skins/default/xui/en/role_actions.xml +++ b/indra/newview/skins/default/xui/en/role_actions.xml @@ -4,39 +4,39 @@ description="These Abilities include powers to add and remove group Members, and allow new Members to join without an invitation." name="Membership"> <action description="Invite People to this Group" - longdescription="Invite People to this Group using the 'Invite New Person...' button in the Members & Roles tab > Members sub-tab." + longdescription="Invite People to this Group using the 'Invite' button in the Roles section > Members tab." name="member invite" value="1" /> <action description="Eject Members from this Group" - longdescription="Eject Members from this Group using the 'Eject From Group' button in the Members & Roles tab > Members sub-tab. An Owner can eject anyone except another Owner. If you're not an Owner, a Member can be ejected from a group if, and only if, they're only in the Everyone Role, and NO other Roles. To remove Members from Roles, you need to have the 'Remove Members from Roles' Ability." + longdescription="Eject Members from this Group using the 'Eject' button in the Roles section > Members tab. An Owner can eject anyone except another Owner. If you're not an Owner, a Member can be ejected from a group if, and only if, they're only in the Everyone Role, and NO other Roles. To remove Members from Roles, you need to have the 'Remove Members from Roles' Ability." name="member eject" value="2" /> <action - description="Toggle 'Open Enrollment' and change 'Signup Fee'" - longdescription="Toggle 'Open Enrollment' to let new Members join without an invitation, and change 'Signup Fee' in the Group Preferences section of the General tab." + description="Toggle 'Open Enrollment' and change 'Enrollment fee'" + longdescription="Toggle 'Open Enrollment' to let new Members join without an invitation, and change the 'Enrollment fee' in the General section." name="member options" value="3" /> </action_set> <action_set description="These Abilities include powers to add, remove, and change group Roles, add and remove Members in Roles, and assign Abilities to Roles." name="Roles"> <action description="Create new Roles" - longdescription="Create new Roles in the Members & Roles tab > Roles sub-tab." + longdescription="Create new Roles in the Roles section > Roles tab." name="role create" value="4" /> <action description="Delete Roles" - longdescription="Delete Roles in the Members & Roles tab > Roles sub-tab." + longdescription="Delete Roles in the Roles section > Roles tab." name="role delete" value="5" /> - <action description="Change Role names, titles, descriptions, and whether Role members are publicly visible" - longdescription="Change Role names, titles, descriptions, and whether Role members are publicly visible. This is done at the bottom of the the Members & Roles tab > Roles sub-tab after selecting a Role." + <action description="Change Role names, titles, descriptions, and whether Role members are publicly revealed" + longdescription="Change Role names, titles, descriptions, and whether Role members are publicly revealed. This is done at the bottom of the the Roles section > Roles tab after selecting a Role." name="role properties" value="6" /> <action description="Assign Members to Assigner's Roles" - longdescription="Assign Members to Roles in the Assigned Roles section of the Members & Roles tab > Members sub-tab. A Member with this Ability can only add Members to a Role the assigner is already in." + longdescription="Assign Members to Roles in the list of Assigned Roles (Roles section > Members tab). A Member with this Ability can only add Members to a Role that the assigner is already in." name="role assign member limited" value="7" /> <action description="Assign Members to Any Role" - longdescription="Assign Members to Any Role in the Assigned Roles section of the Members & Roles tab > Members sub-tab. *WARNING* Any Member in a Role with this Ability can assign themselves--and any other non-Owner Member--to Roles that have more powers than they currently have, potentially elevating themselves to near-Owner power. Be sure you know what you're doing before assigning this Ability." + longdescription="Assign Members to Any Role in the list of Assigned Roles (Roles section > Members tab). *WARNING* Any Member in a Role with this Ability can assign themselves--and any other non-Owner Member--to Roles that have more powers than they currently have, potentially elevating themselves to near-Owner power. Be sure you know what you're doing before assigning this Ability." name="role assign member" value="8" /> <action description="Remove Members from Roles" - longdescription="Remove Members from Roles in the Assigned Roles section of the Members & Roles tab > Members sub-tab. Owners can't be removed." + longdescription="Remove Members from Roles in the list of Assigned Roles (Roles section > Members tab). Owners can't be removed." name="role remove member" value="9" /> <action description="Assign and Remove Abilities in Roles" - longdescription="Assign and Remove Abilities in Roles in the Allowed Abilities section of the Members & Roles tab > Roles sub-tab. *WARNING* Any Member in a Role with this Ability can assign themselves--and any other non-Owner Member--all Abilities, potentially elevating themselves to near-Owner power. Be sure you know what you're doing before assigning this Ability." + longdescription="Assign and Remove Abilities for each Role in the list of Allowed Abilities (Roles section > Roles tab). *WARNING* Any Member in a Role with this Ability can assign themselves--and any other non-Owner Member--all Abilities, potentially elevating themselves to near-Owner power. Be sure you know what you're doing before assigning this Ability." name="role change actions" value="10" /> </action_set> <action_set @@ -44,11 +44,11 @@ name="Group Identity"> <action description="Change Charter, Insignia, and 'Show in search'" - longdescription="Change Charter, Insignia, and 'Show in search'. This is done in the General tab." + longdescription="Change Charter, Insignia, and 'Show in search'. This is done in the General section." name="group change identity" value="11" /> </action_set> <action_set - description="These Abilities include powers to deed, modify, and sell land in this group's land holdings. To get to the About Land window, right-click the ground and select 'About Land...', or click the parcel info in the menu bar." + description="These Abilities include powers to deed, modify, and sell land in this group's land holdings. To get to the About Land window, right-click the ground and select 'About Land', or click the 'i' icon in the Navigation Bar." name="Parcel Management"> <action description="Deed land and buy land for group" longdescription="Deed land and buy land for group. This is done in About Land > General tab." @@ -60,18 +60,18 @@ longdescription="Set land for sale info. *WARNING* Any Member in a Role with this Ability can sell group-owned land in About Land > General tab as they wish! Be sure you know what you're doing before assigning this Ability." name="land set sale info" value="14" /> <action description="Subdivide and join parcels" - longdescription="Subdivide and join parcels. This is done by right-clicking the ground, 'Edit Terrain', and dragging your mouse on the land to make a selection. To subdivide, select what you want to split and click 'Subdivide...'. To join, select two or more contiguous parcels and click 'Join...'. " + longdescription="Subdivide and join parcels. This is done by right-clicking the ground, 'Edit Terrain', and dragging your mouse on the land to make a selection. To subdivide, select what you want to split and click 'Subdivide'. To join, select two or more contiguous parcels and click 'Join'. " name="land divide join" value="15" /> </action_set> <action_set description="These Abilities include powers to change the parcel name and publish settings, Find directory visibility, and landing point & TP routing options." name="Parcel Identity"> - <action description="Toggle 'Show in Find Places' and set category" - longdescription="Toggle 'Show in Find Places' and setting a parcel's category in About Land > Options tab." + <action description="Toggle 'Show Place in Search' and set category" + longdescription="Toggle 'Show Place in Search' and setting a parcel's category in About Land > Options tab." name="land find places" value="17" /> <action - description="Change parcel name, description, and 'Show in search' settings" - longdescription="Change parcel name, description, and 'Show in search' settings. This is done in About Land > Options tab." + description="Change parcel name, description, and 'Show Place in Search' settings" + longdescription="Change parcel name, description, and 'Show Place in Search' settings. This is done in About Land > Options tab." name="land change identity" value="18" /> <action description="Set landing point and set teleport routing" longdescription="On a group-owned parcel, Members in a Role with this Ability can set a landing point to specify where incoming teleports arrive, and also set teleport routing for further control. This is done in About Land > Options tab." @@ -87,7 +87,7 @@ longdescription="Toggle 'Edit Terrain'. *WARNING* About Land > Options tab > Edit Terrain allows anyone to terraform your land's shape, and place and move Linden plants. Be sure you know what you're doing before assigning this Ability. Editing terrain is toggled in About Land > Options tab." name="land edit" value="21" /> <action description="Toggle various About Land > Options settings" - longdescription="Toggle 'Safe (no damage)', 'Fly', and allow other Residents to: 'Create Objects', 'Edit Terrain', 'Create Landmarks', and 'Run Scripts' on group-owned land in About Land > Options tab." + longdescription="Toggle 'Safe (no damage)', 'Fly', and allow other Residents to: 'Edit Terrain', 'Build', 'Create Landmarks', and 'Run Scripts' on group-owned land in About Land > Options tab." name="land options" value="22" /> </action_set> <action_set @@ -106,7 +106,7 @@ longdescription="Members in a Role with this Ability can landmark a group-owned parcel, even if it's turned off in About Land > Options tab." name="land allow landmark" value="26" /> <action description="Allow 'Set Home to Here' on group land" - longdescription="Members in a Role with this Ability can use World menu > Set Home to Here on a parcel deeded to this group." + longdescription="Members in a Role with this Ability can use World menu > Landmarks > Set Home to Here on a parcel deeded to this group." name="land allow set home" value="28" /> </action_set> <action_set @@ -116,13 +116,13 @@ longdescription="Manage parcel Access lists in About Land > Access tab." name="land manage allowed" value="29" /> <action description="Manage parcel Ban lists" - longdescription="Manage parcel Ban lists in About Land > Ban tab." + longdescription="Manage parcel Ban lists in About Land > Access tab." name="land manage banned" value="30" /> - <action description="Change parcel 'Sell passes...' settings" - longdescription="Change parcel 'Sell passes...' settings in About Land > Access tab." + <action description="Change parcel 'Sell passes to' settings" + longdescription="Change parcel 'Sell passes to' settings in About Land > Access tab." name="land manage passes" value="31" /> <action description="Eject and freeze Residents on parcels" - longdescription="Members in a Role with this Ability can handle an unwelcome Resident on a group-owned parcel by right-clicking them, More >, and selecting 'Eject...' or 'Freeze...'." + longdescription="Members in a Role with this Ability can handle an unwelcome Resident on a group-owned parcel by right-clicking them, then selecting 'Eject' or 'Freeze'." name="land admin" value="32" /> </action_set> <action_set @@ -138,20 +138,20 @@ longdescription="Return objects on group-owned parcels that are non-group in About Land > Objects tab." name="land return non group" value="34" /> <action description="Landscaping using Linden plants" - longdescription="Landscaping ability to place and move Linden trees, plants, and grasses. These items can be found in your inventory's Library > Objects folder or they can be created via the Build button." + longdescription="Landscaping ability to place and move Linden trees, plants, and grasses. These items can be found in your inventory's Library > Objects folder, or they can be created via the Build menu." name="land gardening" value="35" /> </action_set> <action_set - description="These Abilities include powers to deed, modify, and sell group-owned objects. These changes are done in the Edit Tools > General Tab. Right-click an object and Edit to see its settings. " + description="These Abilities include powers to deed, modify, and sell group-owned objects. These changes are done in the Build Tools > General tab. Right-click an object and Edit to see its settings. " name="Object Management"> <action description="Deed objects to group" - longdescription="Deed objects to group in the Edit Tools > General Tab." + longdescription="Deed objects to group in the Build Tools > General tab." name="object deed" value="36" /> <action description="Manipulate (move, copy, modify) group-owned objects" - longdescription="Manipulate (move, copy, modify) group-owned objects in the Edit Tools > General Tab." + longdescription="Manipulate (move, copy, modify) group-owned objects in the Build Tools > General tab." name="object manipulate" value="38" /> <action description="Set group-owned objects for sale" - longdescription="Set group-owned objects for sale in the Edit Tools > General tab." + longdescription="Set group-owned objects for sale in the Build Tools > General tab." name="object set sale" value="39" /> </action_set> <action_set @@ -165,10 +165,10 @@ description="These Abilities include powers to allow Members to send, receive, and view group Notices." name="Notices"> <action description="Send Notices" - longdescription="Members in a Role with this Ability can send Notices in Group Information > Notices tab." + longdescription="Members in a Role with this Ability can send Notices via the Group > Notices section." name="notices send" value="42" /> <action description="Receive Notices and view past Notices" - longdescription="Members in a Role with this Ability can receive Notices and view past Notices in Group Information > Notices tab." + longdescription="Members in a Role with this Ability can receive Notices and view past Notices in Group > Notices section." name="notices receive" value="43" /> </action_set> <action_set -- cgit v1.2.3 From 7a05356749664a3208f966945d2ddd628ebdaa32 Mon Sep 17 00:00:00 2001 From: richard <none@none> Date: Tue, 8 Dec 2009 18:43:32 -0800 Subject: EXT-2572 - Bottom text on bottom line in nearby chat is clipped --- indra/llui/lltextbase.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 2a9515171a..e0503a0844 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2080,6 +2080,8 @@ void LLTextBase::updateRects() } mContentsRect.mTop += mVPad; + // subtract a pixel off the bottom to deal with rounding errors in measuring font height + mContentsRect.mBottom -= 1; S32 delta_pos = -mContentsRect.mBottom; // move line segments to fit new document rect -- cgit v1.2.3 From b1b9ef14f5bf323b2d4caaa4b88d9727f6197567 Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Wed, 9 Dec 2009 09:56:34 +0200 Subject: Fixed critical bug EXT-3094 (Content of accordions disappears after collapsing all folders in My "Landmarks" tab and switching to "Teleport history" tab and back) Reason: Folder state of loaded folders was not saved before switching to Teleport history and back Due to inventory loading was changed to fetch items in background it is impossible to save folder state while initializing of an Inventory panel. Inventory observer was implemented to save folder states for Inventory Panels in all accordions. Reviwed by Seth ProductEngine --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 48 ++++++++++++++++++++++++++++++++++++++ indra/newview/llpanellandmarks.h | 6 +++++ 2 files changed, 54 insertions(+) diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index e87b70f6a5..faa0aa95b9 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -66,6 +66,30 @@ static const std::string TRASH_BUTTON_NAME = "trash_btn"; // helper functions static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string); +static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_list); + +/** + * Bridge to support knowing when the inventory has changed to update folder (open/close) state + * for landmarks panels. + * + * Due to Inventory data are loaded in background we need to save folder state each time + * next level is loaded. See EXT-3094. + */ +class LLLandmarksPanelObserver : public LLInventoryObserver +{ +public: + LLLandmarksPanelObserver(LLLandmarksPanel* lp) : mLP(lp) {} + virtual ~LLLandmarksPanelObserver() {} + /*virtual*/ void changed(U32 mask); + +private: + LLLandmarksPanel* mLP; +}; + +void LLLandmarksPanelObserver::changed(U32 mask) +{ + mLP->saveFolderStateIfNoFilter(); +} LLLandmarksPanel::LLLandmarksPanel() : LLPanelPlacesTab() @@ -78,11 +102,18 @@ LLLandmarksPanel::LLLandmarksPanel() , mGearFolderMenu(NULL) , mGearLandmarkMenu(NULL) { + mInventoryObserver = new LLLandmarksPanelObserver(this); + gInventory.addObserver(mInventoryObserver); + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_landmarks.xml"); } LLLandmarksPanel::~LLLandmarksPanel() { + if (gInventory.containsObserver(mInventoryObserver)) + { + gInventory.removeObserver(mInventoryObserver); + } } BOOL LLLandmarksPanel::postBuild() @@ -226,6 +257,14 @@ void LLLandmarksPanel::onSelectorButtonClicked() } } +void LLLandmarksPanel::saveFolderStateIfNoFilter() +{ + save_folder_state_if_no_filter(mFavoritesInventoryPanel); + save_folder_state_if_no_filter(mLandmarksInventoryPanel); + save_folder_state_if_no_filter(mMyInventoryPanel); + save_folder_state_if_no_filter(mLibraryInventoryPanel); +} + ////////////////////////////////////////////////////////////////////////// // PROTECTED METHODS ////////////////////////////////////////////////////////////////////////// @@ -1020,4 +1059,13 @@ static void filter_list(LLInventorySubTreePanel* inventory_list, const std::stri // set new filter string inventory_list->setFilterSubString(string); } + +static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_list) +{ + // save current folder open state if no filter currently applied + if (inventory_list->getRootFolder() && inventory_list->getRootFolder()->getFilterSubString().empty()) + { + inventory_list->saveFolderState(); + } +} // EOF diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index bee141d051..b0e537f647 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -67,6 +67,11 @@ public: mCurrentSelectedList = inventory_list; } + /** + * Saves folder state for all Inventory Panels if there are no applied filter. + */ + void saveFolderStateIfNoFilter(); + protected: /** * @return true - if current selected panel is not null and selected item is a landmark @@ -151,6 +156,7 @@ private: LLMenuGL* mGearFolderMenu; LLMenuGL* mMenuAdd; LLInventorySubTreePanel* mCurrentSelectedList; + LLInventoryObserver* mInventoryObserver; LLPanel* mListCommands; bool mSortByDate; -- cgit v1.2.3 From ff87f87fa6a33daf72eae963b2aa33c9d5890509 Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Wed, 9 Dec 2009 09:58:32 +0200 Subject: Fixed line endings to Unix format --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index b11d8d45c8..d90901612a 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -165,9 +165,9 @@ void LLSysWellChiclet::setCounter(S32 counter) /* Emulate 4 states of button by background images, see detains in EXT-3147 xml attribute Description - image_unselected "Unlit" - there are no new messages - image_selected "Unlit" + "Selected" - there are no new messages and the Well is open - image_pressed "Lit" - there are new messages + image_unselected "Unlit" - there are no new messages + image_selected "Unlit" + "Selected" - there are no new messages and the Well is open + image_pressed "Lit" - there are new messages image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open */ mButton->setForcePressedState(counter > 0); -- cgit v1.2.3 From 918eedc4e955062307f9422630cb3b82f7024320 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji <aarabadji@productengine.com> Date: Wed, 9 Dec 2009 12:45:00 +0200 Subject: hardened condition for LLScreenChannelBase::isHovering method; --HG-- branch : product-engine --- indra/newview/llscreenchannel.cpp | 18 +++++++++++++++++- indra/newview/llscreenchannel.h | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 222b462d1a..f66f725070 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -78,6 +78,22 @@ LLScreenChannelBase::~LLScreenChannelBase() { mWorldViewRectConnection.disconnect(); } + +bool LLScreenChannelBase::isHovering() +{ + bool res = mHoveredToast != NULL; + if (!res) + { + return res; + } + + S32 x, y; + mHoveredToast->screenPointToLocal(gViewerWindow->getCurrentMouseX(), + gViewerWindow->getCurrentMouseY(), &x, &y); + res = mHoveredToast->pointInView(x, y) == TRUE; + return res; +} + void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect) { S32 top_delta = old_world_rect.mTop - new_world_rect.mTop; @@ -644,7 +660,7 @@ void LLNotificationsUI::LLScreenChannel::startFadingToasts() if (!mToastList.size()) return; //because onMouseLeave is processed after onMouseEnter - if (mHoveredToast) return; + if (isHovering()) return; std::vector<ToastElem>::iterator it = mToastList.begin(); while (it != mToastList.end()) diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index b551732133..b8efbb148f 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -95,7 +95,7 @@ public: virtual void setControlHovering(bool control) { mControlHovering = control; } - bool isHovering() { return mHoveredToast != NULL; } + bool isHovering(); void setCanStoreToasts(bool store) { mCanStoreToasts = store; } -- cgit v1.2.3 From 2b4fc69b1f40217c790920e95bfb1776830f3e12 Mon Sep 17 00:00:00 2001 From: Paul Guslisty <pguslisty@productengine.com> Date: Wed, 9 Dec 2009 13:32:18 +0200 Subject: Fixed low bug EXT - 3244 ('No people' is visible partly in the empty Recent list) --HG-- branch : product-engine --- indra/llui/llflatlistview.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 831ac66d06..64a4824a17 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -891,7 +891,13 @@ void LLFlatListView::setNoItemsCommentVisible(bool visible) const // We have to update child rect here because of issues with rect after reshaping while creating LLTextbox // It is possible to have invalid LLRect if Flat List is in LLAccordionTab LLRect comment_rect = getLocalRect(); - comment_rect.stretch(-getBorderWidth()); + + // To see comment correctly (EXT - 3244) in mNoItemsCommentTextbox we must get border width + // of LLFlatListView (@see getBorderWidth()) and stretch mNoItemsCommentTextbox to this width + // But getBorderWidth() returns 0 if LLFlatListView not visible. So we have to get border width + // from 'scroll_border' + LLViewBorder* scroll_border = getChild<LLViewBorder>("scroll border"); + comment_rect.stretch(-scroll_border->getBorderWidth()); mNoItemsCommentTextbox->setRect(comment_rect); } mNoItemsCommentTextbox->setVisible(visible); -- cgit v1.2.3 From e94e6714b9f12886ae7ad72df21b17ddea468214 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Wed, 9 Dec 2009 15:17:30 +0200 Subject: Fixed normal bug EXT-2935 \"[BSI] Not able to click *Map* button after clicking a SLurl to open a Place Profile\". - Added enabling \"Map\" button on Landmark Info panel opening. --HG-- branch : product-engine --- indra/newview/llpanelplaces.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index f7f3c5830d..4a554c1b2c 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -854,6 +854,7 @@ void LLPanelPlaces::updateVerbs() mCancelBtn->setVisible(isLandmarkEditModeOn); mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn); + mShowOnMapBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn); mOverflowBtn->setEnabled(is_place_info_visible && !is_create_landmark_visible); if (is_place_info_visible) -- cgit v1.2.3 From ffca4ec568e019edf330069921136c5ec362e672 Mon Sep 17 00:00:00 2001 From: Erica <erica@lindenlab.com> Date: Wed, 9 Dec 2009 06:06:37 -0800 Subject: Accordions in appearance panel don't use full space, removed borders in inventory panel, standardized button sizes, changed login according to feedback --- indra/newview/skins/default/xui/en/panel_login.xml | 80 +++-- .../skins/default/xui/en/panel_main_inventory.xml | 34 ++- .../default/xui/en/panel_outfits_inventory.xml | 42 +-- .../skins/default/xui/en/sidepanel_appearance.xml | 330 ++++++++++----------- .../skins/default/xui/en/sidepanel_inventory.xml | 23 +- 5 files changed, 262 insertions(+), 247 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index efe26d3887..8b5c149f0d 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -49,7 +49,7 @@ name="first_name_text" top="20" width="150"> - Name: + First name: </text> <line_editor follows="left|bottom" @@ -63,17 +63,26 @@ tool_tip="[SECOND_LIFE] First Name" top_pad="0" width="135" /> + <text + follows="left|bottom" + font="SansSerifSmall" + height="16" + left_pad="8" + name="last_name_text" + top="20" + width="150"> + Last name: + </text> <line_editor follows="left|bottom" handle_edit_keys_directly="true" height="22" label="Last" - left_pad="8" max_length="31" name="last_name_edit" select_on_focus="true" tool_tip="[SECOND_LIFE] Last Name" - top_delta="0" + top_pad="0" width="135" /> <text follows="left|bottom" @@ -89,11 +98,10 @@ follows="left|bottom" handle_edit_keys_directly="true" height="22" - left="304" max_length="16" name="password_edit" select_on_focus="true" - top_pad="1" + top_pad="0" width="135" /> <check_box control_name="RememberPassword" @@ -101,38 +109,23 @@ font="SansSerifSmall" height="16" label="Remember" - left_pad="20" - top="20" + top_pad="3" name="remember_check" - width="150" /> - <button - follows="left|bottom" - height="23" - image_unselected="PushButton_On" - image_selected="PushButton_On_Selected" - label="Log In" - label_color="White" - layout="topleft" - left="462" - name="connect_btn" - top="35" - width="90" /> + width="135" /> <text - follows="right|bottom" + follows="left|bottom" font="SansSerifSmall" height="15" - halign="right" - left_pad="10" - right="-240" + left_pad="8" name="start_location_text" top="20" width="130"> - Starting location: + Start at: </text> <combo_box allow_text_entry="true" control_name="LoginLocation" - follows="right|bottom" + follows="left|bottom" height="23" max_chars="128" top_pad="0" @@ -154,25 +147,37 @@ <combo_box allow_text_entry="true" font="SansSerifSmall" - follows="right|bottom" + follows="left|bottom" height="23" layout="topleft" top_pad="2" name="server_combo" width="135" visible="false" /> + <button + follows="left|bottom" + height="23" + image_unselected="PushButton_On" + image_selected="PushButton_On_Selected" + label="Log In" + label_color="White" + layout="topleft" + left_pad="15" + name="connect_btn" + top="35" + width="90" /> <text follows="right|bottom" font="SansSerifSmall" text_color="EmphasisColor" halign="right" height="16" - top="17" - left_pad="10" + top="12" + left_pad="5" right="-10" name="create_new_account_text" width="180"> - Sign up for account + Sign up </text> <text follows="right|bottom" @@ -181,11 +186,22 @@ halign="right" height="16" name="forgot_password_text" - top_pad="2" + top_pad="12" width="180"> Forgot your name or password? </text> <text + follows="right|bottom" + font="SansSerifSmall" + text_color="EmphasisColor" + halign="right" + height="16" + name="login_help" + top_pad="2" + width="180"> + Need help? + </text> + <!-- <text follows="right|bottom" font="SansSerifSmall" halign="right" @@ -195,6 +211,6 @@ width="180" word_wrap="true"> [VERSION] - </text> + </text>--> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 37d59de66f..0fc87edc44 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -16,40 +16,44 @@ <filter_editor text_pad_left="14" follows="left|top|right" - font="SanSerif" - height="20" + height="23" label="Filter" layout="topleft" left="15" + max_length="300" name="inventory search editor" - top="34" - width="300" /> + top="26" + width="303" /> <tab_container - follows="left|top|right|bottom" + follows="all" + halign="center" height="300" layout="topleft" left_delta="-4" name="inventory filter tabs" tab_position="top" + tab_height="30" + tab_min_width="100" top_pad="4" width="305"> <inventory_panel - follows="left|top|right|bottom" + border="false" + follows="all" height="295" - label="All Items" + label="MY INVENTORY" layout="topleft" - left="1" + left="0" name="All Items" top="16" width="290" /> <inventory_panel - follows="left|top|right|bottom" + border="false" + follows="all" height="295" - label="Recent Items" + label="RECENT" layout="topleft" left_delta="0" name="Recent Items" - top_delta="0" width="290" /> </tab_container> @@ -103,15 +107,15 @@ width="18" /> </panel> - <menu_bar +<menu_bar bg_visible="false" follows="left|top|right" - height="18" + height="20" layout="topleft" - left_delta="0" + left="10" mouse_opaque="false" name="Inventory Menu" - top="15" + top="0" visible="true" width="290"> <menu diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index 0567d722d5..db95d01b43 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -1,46 +1,48 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel name="Outfits" - follows="all" -border="false"> + height="510" + width="333" + follows="top|left" + left="0" + top_pad="0"> <accordion single_expansion="true" - follows="top|left|bottom" - height="460" - layout="topleft" - left="0" + height="510" + layout="topleft" + left="0" + follows="top|left" name="outfits_accordion" - top="0" - width="333"> + top_pad="0" + width="333"> <accordion_tab - layout="topleft" + expanded="false" + layout="topleft" name="tab_cof" title="Current Outfit"> <inventory_panel - allow_multi_select="true" - border="false" - bottom="0" - follows="all" - height="416" - left="0" + allow_multi_select="true" + border="false" + height="460" + left="0" + top="0" mouse_opaque="true" name="cof_accordionpanel" - width="333" start_folder="Current Outfit" /> </accordion_tab> <accordion_tab - layout="topleft" + expanded="true" + layout="topleft" name="tab_outfits" title="My Outfits"> <inventory_panel allow_multi_select="true" border="false" - bottom="0" follows="all" - height="415" left="0" + top="0" + height="460" mouse_opaque="true" name="outfitslist_accordionpanel" - width="333" start_folder="My Outfits" /> </accordion_tab> </accordion> diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index 886887c2b5..c457dcb526 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -1,177 +1,171 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel background_visible="true" - follows="all" - height="570" - label="My Appearance" - layout="topleft" - min_height="350" - name="appearance panel" - width="333"> - <string -name="No Outfit" -value="No Outfit" /> -<panel - left="0" - top="0" - follows="top|left" +follows="all" +height="635" +label="Outfits" layout="topleft" - width="333" - height="45" - background_visible="true" - background_opaque="false" - bg_alpha_color="MouseGray" - name="panel_currentlook" - > -<button - follows="left|top" - top="0" width="1" height="1" - layout="topleft" - left="0" - name="editappearance_btn" /> - <button - follows="left|top" - top="0" width="1" height="1" - layout="topleft" - left="3" - name="openoutfit_btn" /> -<icon - follows="top|left" - height="30" - image_name="TabIcon_Appearance_Off" - name="outfit_icon" - mouse_opaque="false" - visible="true" - left="5" - top="0" - width="30" /> -<text - width="292" - height="22" -follows="top|left" - layout="topleft" - left_pad="5" -font="SansSerifLarge" -font.style="BOLD" -word_wrap="false" -use_ellipses="true" -mouse_opaque="false" - text_color="white" - name="currentlook_name"> -MyOutfit With a really Long Name like MOOSE - </text> - <text -width="290" -left="40" -height="1" -follows="top|left" - layout="topleft" - top_pad="-2" -mouse_opaque="false" - name="currentlook_title" > -(now wearing) - </text> -</panel> - <filter_editor - follows="top|left" - height="23" - layout="topleft" - left="15" - label="Filter" - max_length="300" - name="Filter" - top_pad="7" - width="303" /> - <panel - follows="top|left" - halign="center" - height="500" - layout="topleft" - class="panel_outfits_inventory" - filename="panel_outfits_inventory.xml" - name="panel_outfits_inventory" - min_height="300" +min_height="460" +name="appearance panel" +top="0" +left="0" + width="333"> + <string + name="No Outfit" + value="No Outfit" /> + <panel + left="0" + top="0" + follows="left|top|right" + layout="topleft" + width="333" + height="33" + name="panel_currentlook" + > + <button + follows="left|top" + top="0" width="1" height="1" + layout="topleft" + left="0" + name="editappearance_btn" /> + <button + follows="left|top" + top="0" width="1" height="1" + layout="topleft" left="0" - top_pad="3" - width="333" - /> + name="openoutfit_btn" /> + <icon + follows="top|left" + height="30" + image_name="TabIcon_Appearance_Off" + name="outfit_icon" + mouse_opaque="false" + visible="true" + left="5" + top="0" + width="30" /> + <text + font="SansSerifHuge" + height="20" + left_pad="5" + text_color="white" + top="3" + use_ellipses="true" + width="290" + follows="top|left" + word_wrap="true" + mouse_opaque="false" + name="currentlook_name"> + MyOutfit With a really Long Name like MOOSE + </text> + <!-- <text + text_color="LtGray_50" + width="290" + left="40" + height="1" + follows="top|left" + layout="topleft" + top_pad="-2" + mouse_opaque="false" + name="currentlook_title" > + (current outfit) + </text>--> + </panel> + <filter_editor + height="23" + follows="left|top|right" + layout="topleft" + left="15" + label="Filter Outfits" + max_length="300" + name="Filter" + top_pad="0" + width="303" /> <panel - background_visible="true" - follows="top|left" - height="19" - layout="topleft" - left="0" - visible="true" - name="bottom_panel" - width="333"> - <button - follows="bottom|left" - tool_tip="Show additional options" - height="18" - image_disabled="OptionsMenu_Disabled" - image_selected="OptionsMenu_Press" - image_unselected="OptionsMenu_Off" - layout="topleft" - left="10" - name="options_gear_btn" - top="6" - width="18" /> - <button - follows="bottom|left" - height="18" - image_selected="AddItem_Press" - image_unselected="AddItem_Off" - image_disabled="AddItem_Disabled" - layout="topleft" - left_pad="5" - name="add_btn" - tool_tip="Add new item" - width="18" /> - <dnd_button - follows="bottom|left" - height="18" - image_selected="TrashItem_Press" - image_unselected="TrashItem_Off" - layout="topleft" - right="-5" - name="trash_btn" - tool_tip="Remove selected item" - top="6" - width="18" /> - <button - follows="top|left" - height="23" - label="Wear" + class="panel_outfits_inventory" + filename="panel_outfits_inventory.xml" + name="panel_outfits_inventory" + height="510" + min_height="510" + width="333" + top_pad="0" + follows="top|left" + /> + <panel + visible="true" + name="bottom_panel" + height="50" + left="0" + top_pad="3" + follows="bottom|left" + width="333"> + <button + follows="bottom|left" + tool_tip="Show additional options" + height="18" + image_disabled="OptionsMenu_Disabled" + image_selected="OptionsMenu_Press" + image_unselected="OptionsMenu_Off" layout="topleft" - name="wear_btn" - right="-5" - top_pad="0" - width="90" /> - </panel> - <!-- <button - follows="bottom|left" - height="23" - label="New outfit" + left="10" + name="options_gear_btn" + top="6" + width="18" /> + <button + follows="bottom|left" + height="18" + image_selected="AddItem_Press" + image_unselected="AddItem_Off" + image_disabled="AddItem_Disabled" layout="topleft" left_pad="5" - right="-10" - name="newlook_btn" - width="100" />--> -<panel - class="panel_look_info" - filename="panel_look_info.xml" - follows="all" - layout="topleft" - left="0" - name="panel_look_info" - visible="false" /> -<panel - class="panel_edit_wearable" - filename="panel_edit_wearable.xml" - follows="all" - layout="topleft" - left="0" - name="panel_edit_wearable" - visible="false" - width="333" /> -</panel> + name="add_btn" + tool_tip="Add new item" + width="18" /> + <dnd_button + follows="bottom|left" + height="18" + image_selected="TrashItem_Press" + image_unselected="TrashItem_Off" + layout="topleft" + right="-5" + name="trash_btn" + tool_tip="Remove selected item" + top="6" + width="18" /> + <button + follows="bottom|left" + height="23" + label="Wear" + layout="topleft" + name="wear_btn" + right="-5" + top_pad="0" + width="90" /> + </panel> + <!-- <button + follows="bottom|left" + height="23" + label="New outfit" + layout="topleft" + left_pad="5" + right="-10" + name="newlook_btn" + width="100" />--> + <panel + class="panel_look_info" + filename="panel_look_info.xml" + follows="all" + layout="topleft" + left="0" + name="panel_look_info" + visible="false" /> + <panel + class="panel_edit_wearable" + filename="panel_edit_wearable.xml" + follows="all" + layout="topleft" + left="0" + name="panel_edit_wearable" + visible="false" /> +</panel> \ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 33a6a52f5c..b738e72423 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -41,47 +41,47 @@ <button enabled="true" follows="bottom|left" - height="25" - label="Info" + height="23" + label="Profile" layout="topleft" left="0" name="info_btn" top="0" - width="60" /> + width="100" /> <button enabled="false" follows="bottom|left" - height="25" + height="23" label="Wear" layout="topleft" left="130" name="wear_btn" top="0" - width="60" /> + width="100" /> <button enabled="false" follows="bottom|left" - height="25" + height="23" label="Play" layout="topleft" name="play_btn" left="130" top="0" - width="50" /> + width="80" /> <button enabled="false" follows="bottom|left" - height="25" + height="23" label="Teleport" layout="topleft" left="130" name="teleport_btn" top="0" - width="77" /> + width="100" /> </panel> </panel> - <panel +<panel follows="all" layout="topleft" left="0" @@ -95,7 +95,7 @@ width="330"> </panel> - <panel +<panel follows="all" layout="topleft" left="0" @@ -108,5 +108,4 @@ visible="false" width="330"> </panel> - </panel> -- cgit v1.2.3 From a2e06d2c960944b90fe26ba266d8d58f2530e3de Mon Sep 17 00:00:00 2001 From: Andrew Dyukov <adyukov@productengine.com> Date: Wed, 9 Dec 2009 16:47:26 +0200 Subject: Fixed normal bug EXT-3139 (Invalid Region/Parcel name is shown for intra-region teleports in the back/fwd history). --HG-- branch : product-engine --- indra/newview/llviewerparcelmgr.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 2fae78cdfb..7a1abfd4e8 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -2525,7 +2525,8 @@ boost::signals2::connection LLViewerParcelMgr::setTeleportFailedCallback(parcel_ */ void LLViewerParcelMgr::onTeleportFinished(bool local, const LLVector3d& new_pos) { - if (local) + // Treat only teleports within the same parcel as local (EXT-3139). + if (local && LLViewerParcelMgr::getInstance()->inAgentParcel(new_pos)) { // Local teleport. We already have the agent parcel data. // Emit the signal immediately. @@ -2533,7 +2534,7 @@ void LLViewerParcelMgr::onTeleportFinished(bool local, const LLVector3d& new_pos } else { - // Non-local teleport. + // Non-local teleport (inter-region or between different parcels of the same region). // The agent parcel data has not been updated yet. // Let's wait for the update and then emit the signal. mTeleportInProgress = TRUE; -- cgit v1.2.3 From 2937ab945ff75be43cea54b48d93422db968c09f Mon Sep 17 00:00:00 2001 From: Andrew Polunin <apolunin@productengine.com> Date: Wed, 9 Dec 2009 16:57:28 +0200 Subject: no ticket. added icons for \"well\" buttons in the bottom tray. --HG-- branch : product-engine --- .../skins/default/textures/bottomtray/WellButton_Lit.png | Bin 0 -> 288 bytes .../textures/bottomtray/WellButton_Lit_Selected.png | Bin 0 -> 405 bytes indra/newview/skins/default/textures/textures.xml | 3 +++ indra/newview/skins/default/xui/en/panel_bottomtray.xml | 8 ++++---- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png create mode 100644 indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png diff --git a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png new file mode 100644 index 0000000000..60676b43fd Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png new file mode 100644 index 0000000000..98cde96aff Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 607df10048..3e0067bbd1 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -592,6 +592,9 @@ with the same filename but different name <texture name="Unread_IM" file_name="bottomtray/Unread_IM.png" preload="false" /> <texture name="Unread_Msg" file_name="bottomtray/Unread_Msg.png" preload="false" /> + + <texture name="WellButton_Lit" file_name="bottomtray/WellButton_Lit.png" /> + <texture name="WellButton_Lit_Selected" file_name="bottomtray/WellButton_Lit_Selected.png" /> <texture name="VoicePTT_Lvl1" file_name="bottomtray/VoicePTT_Lvl1.png" preload="false" /> <texture name="VoicePTT_Lvl2" file_name="bottomtray/VoicePTT_Lvl2.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index e77960f200..a41d492624 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -348,8 +348,8 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well height="23" image_overlay="Notices_Unread" image_overlay_alignment="center" - image_pressed="PushButton_Press" - image_pressed_selected="PushButton_Selected_Press" + image_pressed="WellButton_Lit" + image_pressed_selected="WellButton_Lit_Selected" image_selected="PushButton_Selected_Press" left="0" max_displayed_count="99" @@ -386,8 +386,8 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well width="34"> <button image_selected="PushButton_Selected_Press" - image_pressed="PushButton_Press" - image_pressed_selected="PushButton_Selected_Press" + image_pressed="WellButton_Lit" + image_pressed_selected="WellButton_Lit_Selected" auto_resize="true" halign="center" height="23" -- cgit v1.2.3 From 4422f10a9a97e0ace447e49d3b2105b297b54f5f Mon Sep 17 00:00:00 2001 From: Paul Guslisty <pguslisty@productengine.com> Date: Wed, 9 Dec 2009 16:59:38 +0200 Subject: Fixed low bug EXT - 2688 (Viewer crashes if exit from disconnected viewer with opened Communicate floater) --HG-- branch : product-engine --- indra/newview/llfloaterchat.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 57bb93d81a..94d4fb9b32 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -142,6 +142,10 @@ BOOL LLFloaterChat::postBuild() void LLFloaterChat::updateConsoleVisibility() { + if(gDisconnected) + { + return; + } // determine whether we should show console due to not being visible gConsole->setVisible( !isInVisibleChain() // are we not in part of UI being drawn? || isMinimized() // are we minimized? -- cgit v1.2.3 From c597a1eb1cd9e1a30a8e29e3d1bf357c3e6ce90c Mon Sep 17 00:00:00 2001 From: Paul Guslisty <pguslisty@productengine.com> Date: Wed, 9 Dec 2009 17:56:08 +0200 Subject: Fixed build --HG-- branch : product-engine --- indra/newview/llfloaterchat.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 94d4fb9b32..b9e0f928f1 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -41,6 +41,7 @@ // project include #include "llagent.h" +#include "llappviewer.h" #include "llbutton.h" #include "llcheckboxctrl.h" #include "llcombobox.h" -- cgit v1.2.3 From 8728bddc7c23490c56f477a27225bc71c49bea9c Mon Sep 17 00:00:00 2001 From: Alexei Arabadji <aarabadji@productengine.com> Date: Wed, 9 Dec 2009 18:00:55 +0200 Subject: =?UTF-8?q?mplemented=20EXT-2798=20=E2=80=9CRecord=20online/offlin?= =?UTF-8?q?e=20notifications=20into=20IM=20history=20only=E2=80=9D,=20excl?= =?UTF-8?q?uded=20FriendOnline,=20FriendOffline=20notifications=20from=20l?= =?UTF-8?q?ogging=20to=20nearby=20chat;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llnotificationhandler.h | 10 ++++++++++ indra/newview/llnotificationhandlerutil.cpp | 25 ++++++++++++++++++++++++- indra/newview/llnotificationtiphandler.cpp | 11 +++++------ 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 5c240aa54a..83a8dcd9f0 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -265,6 +265,11 @@ public: */ static bool canLogToIM(const LLNotificationPtr& notification); + /** + * Checks sufficient conditions to log notification message to nearby chat session. + */ + static bool canLogToNearbyChat(const LLNotificationPtr& notification); + /** * Checks sufficient conditions to spawn IM session. */ @@ -287,6 +292,11 @@ public: * Writes group notice notification message to IM group session. */ static void logGroupNoticeToIMGroup(const LLNotificationPtr& notification); + + /** + * Writes notification message to nearby chat. + */ + static void logToNearbyChat(const LLNotificationPtr& notification, EChatSourceType type); }; } diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 6748bd7982..749786a829 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -37,6 +37,8 @@ #include "llnotifications.h" #include "llimview.h" #include "llagent.h" +#include "llfloaterreg.h" +#include "llnearbychat.h" using namespace LLNotificationsUI; @@ -47,7 +49,8 @@ const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), ADD_FRIEND_WITH_MESSAGE("AddFriendWithMessage"), USER_GIVE_ITEM("UserGiveItem"), OFFER_FRIENDSHIP("OfferFriendship"), FRIENDSHIP_ACCEPTED("FriendshipAccepted"), - FRIENDSHIP_OFFERED("FriendshipOffered"); + FRIENDSHIP_OFFERED("FriendshipOffered"), + FRIEND_ONLINE("FriendOnline"), FRIEND_OFFLINE("FriendOffline"); // static bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) @@ -58,6 +61,14 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) || FRIENDSHIP_OFFERED == notification->getName(); } +// static +bool LLHandlerUtil::canLogToNearbyChat(const LLNotificationPtr& notification) +{ + return notification->getType() == "notifytip" + && FRIEND_ONLINE != notification->getName() + && FRIEND_OFFLINE != notification->getName(); +} + // static bool LLHandlerUtil::canSpawnIMSession(const LLNotificationPtr& notification) { @@ -144,3 +155,15 @@ void LLHandlerUtil::logGroupNoticeToIMGroup( payload["group_id"], sender_id); } +// static +void LLHandlerUtil::logToNearbyChat(const LLNotificationPtr& notification, EChatSourceType type) +{ + LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); + if(nearby_chat) + { + LLChat chat_msg(notification->getMessage()); + chat_msg.mSourceType = type; + nearby_chat->addMessage(chat_msg); + } +} + diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index 95f5ec801c..9afaddae82 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -88,18 +88,17 @@ bool LLTipHandler::processNotification(const LLSD& notify) if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change") { // archive message in nearby chat - LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); - if(nearby_chat) + if (LLHandlerUtil::canLogToNearbyChat(notification)) { - LLChat chat_msg(notification->getMessage()); - chat_msg.mSourceType = CHAT_SOURCE_SYSTEM; - nearby_chat->addMessage(chat_msg); + LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM); // don't show toast if Nearby Chat is opened + LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance< + LLNearbyChat>("nearby_chat", LLSD()); if (nearby_chat->getVisible()) { return true; - } + } } LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); -- cgit v1.2.3 From b24cbb3633594ed7a7ebde1701175cbe33608dea Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan <dzaporozhan@productengine.com> Date: Wed, 9 Dec 2009 17:48:18 +0200 Subject: Implemented normal task EXT-3194 - Object chiclets should be accessible in the IM well. --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 33 ++++ indra/newview/llchiclet.h | 6 +- indra/newview/llscriptfloater.cpp | 23 ++- indra/newview/llscriptfloater.h | 8 + indra/newview/llsyswellwindow.cpp | 193 +++++++++++++++++++++ indra/newview/llsyswellwindow.h | 38 +++- .../default/xui/en/panel_active_object_row.xml | 81 +++++++++ 7 files changed, 371 insertions(+), 11 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/panel_active_object_row.xml diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index d90901612a..30967677e8 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -61,6 +61,7 @@ static LLDefaultChildRegistry::Register<LLIMP2PChiclet> t3("chiclet_im_p2p"); static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t4("chiclet_im_group"); static LLDefaultChildRegistry::Register<LLAdHocChiclet> t5("chiclet_im_adhoc"); static LLDefaultChildRegistry::Register<LLScriptChiclet> t6("chiclet_script"); +static LLDefaultChildRegistry::Register<LLInvOfferChiclet> t7("chiclet_offer"); static const LLRect CHICLET_RECT(0, 25, 25, 0); static const LLRect CHICLET_ICON_RECT(0, 22, 22, 0); @@ -1010,12 +1011,34 @@ void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ } } +void object_chiclet_callback(const LLSD& data) +{ + LLUUID object_id = data["object_id"]; + bool new_message = data["new_message"]; + + std::list<LLChiclet*> chiclets = LLIMChiclet::sFindChicletsSignal(object_id); + std::list<LLChiclet *>::iterator iter; + for (iter = chiclets.begin(); iter != chiclets.end(); iter++) + { + LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*iter); + if (chiclet != NULL) + { + if(data.has("unread")) + { + chiclet->setCounter(data["unread"]); + } + chiclet->setShowNewMessagesIcon(new_message); + } + } +} BOOL LLChicletPanel::postBuild() { LLPanel::postBuild(); LLIMModel::instance().addNewMsgCallback(boost::bind(im_chiclet_callback, this, _1)); LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(im_chiclet_callback, this, _1)); + LLScriptFloaterManager::getInstance()->addNewObjectCallback(boost::bind(object_chiclet_callback, _1)); + LLScriptFloaterManager::getInstance()->addToggleObjectFloaterCallback(boost::bind(object_chiclet_callback, _1)); LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLChicletPanel::findChiclet<LLChiclet>, this, _1)); LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLChicletPanel::onCurrentVoiceChannelChanged, this, _1)); @@ -1616,6 +1639,11 @@ void LLScriptChiclet::setSessionId(const LLUUID& session_id) } } +void LLScriptChiclet::setCounter(S32 counter) +{ + setShowNewMessagesIcon( counter > 0 ); +} + void LLScriptChiclet::onMouseDown() { LLScriptFloaterManager::getInstance()->toggleScriptFloater(getSessionId()); @@ -1672,6 +1700,11 @@ void LLInvOfferChiclet::setSessionId(const LLUUID& session_id) } } +void LLInvOfferChiclet::setCounter(S32 counter) +{ + setShowNewMessagesIcon( counter > 0 ); +} + void LLInvOfferChiclet::onMouseDown() { LLScriptFloaterManager::instance().toggleScriptFloater(getSessionId()); diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 06d25f081a..854907fb2d 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -389,7 +389,7 @@ public: * Made public so that it can be triggered from outside * (more specifically, from the Active IM window). */ - void onMouseDown(); + virtual void onMouseDown(); protected: @@ -594,7 +594,7 @@ public: /*virtual*/ void setSessionId(const LLUUID& session_id); - /*virtual*/ void setCounter(S32 counter){} + /*virtual*/ void setCounter(S32 counter); /*virtual*/ S32 getCounter() { return 0; } @@ -634,7 +634,7 @@ public: /*virtual*/ void setSessionId(const LLUUID& session_id); - /*virtual*/ void setCounter(S32 counter){} + /*virtual*/ void setCounter(S32 counter); /*virtual*/ S32 getCounter() { return 0; } diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 8de99a48aa..5c4f6e8860 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -39,6 +39,7 @@ #include "llfloaterreg.h" #include "llnotifications.h" #include "llscreenchannel.h" +#include "llsyswellwindow.h" #include "lltoastnotifypanel.h" #include "llviewerwindow.h" #include "llimfloater.h" @@ -240,6 +241,14 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) LLBottomTray::getInstance()->getChicletPanel()->createChiclet<LLScriptChiclet>(object_id); } + LLIMWellWindow::getInstance()->addObjectRow(object_id, set_new_message); + + LLSD data; + data["object_id"] = object_id; + data["new_message"] = set_new_message; + data["unread"] = 1; // each object has got only one floater + mNewObjectSignal(data); + toggleScriptFloater(object_id, set_new_message); } @@ -267,6 +276,8 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) // remove related chiclet LLBottomTray::getInstance()->getChicletPanel()->removeChiclet(object_id); + LLIMWellWindow::getInstance()->removeObjectRow(object_id); + // close floater LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", notification_id); if(floater) @@ -291,13 +302,6 @@ void LLScriptFloaterManager::removeNotificationByObjectId(const LLUUID& object_i void LLScriptFloaterManager::toggleScriptFloater(const LLUUID& object_id, bool set_new_message) { - // hide "new message" icon from chiclet - LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(object_id); - if(chiclet) - { - chiclet->setShowNewMessagesIcon(set_new_message); - } - // kill toast using namespace LLNotificationsUI; LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(LLChannelManager::getInstance()->findChannelByID( @@ -307,6 +311,11 @@ void LLScriptFloaterManager::toggleScriptFloater(const LLUUID& object_id, bool s channel->killToastByNotificationID(findNotificationToastId(object_id)); } + LLSD data; + data["object_id"] = object_id; + data["new_message"] = set_new_message; + mToggleFloaterSignal(data); + // toggle floater LLScriptFloater::toggle(object_id); } diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index 8de7a28d0f..95ec5a4d9c 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -88,6 +88,11 @@ public: */ static void onToastButtonClick(const LLSD¬ification, const LLSD&response); + typedef boost::signals2::signal<void(const LLSD&)> object_signal_t; + + boost::signals2::connection addNewObjectCallback(const object_signal_t::slot_type& cb) { return mNewObjectSignal.connect(cb); } + boost::signals2::connection addToggleObjectFloaterCallback(const object_signal_t::slot_type& cb) { return mToggleFloaterSignal.connect(cb); } + private: struct LLNotificationData @@ -100,6 +105,9 @@ private: typedef std::map<LLUUID, LLNotificationData> script_notification_map_t; script_notification_map_t mNotifications; + + object_signal_t mNewObjectSignal; + object_signal_t mToggleFloaterSignal; }; /** diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 28bdfbf271..5ea2ee65e4 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -34,10 +34,12 @@ #include "llflatlistview.h" #include "llfloaterreg.h" +#include "llnotifications.h" #include "llsyswellwindow.h" #include "llbottomtray.h" +#include "llscriptfloater.h" #include "llviewercontrol.h" #include "llviewerwindow.h" @@ -358,7 +360,148 @@ BOOL LLIMWellWindow::RowPanel::handleMouseDown(S32 x, S32 y, MASK mask) return LLPanel::handleMouseDown(x, y, mask); } +/************************************************************************/ +/* ObjectRowPanel implementation */ +/************************************************************************/ + +LLIMWellWindow::ObjectRowPanel::ObjectRowPanel(const LLUUID& object_id, bool new_message/* = false*/) + : LLPanel() + , mChiclet(NULL) +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_active_object_row.xml", NULL); + + initChiclet(object_id); + + LLTextBox* obj_name = getChild<LLTextBox>("object_name"); + obj_name->setValue(getObjectName(object_id)); + + mCloseBtn = getChild<LLButton>("hide_btn"); + mCloseBtn->setCommitCallback(boost::bind(&LLIMWellWindow::ObjectRowPanel::onClosePanel, this)); +} + +//--------------------------------------------------------------------------------- +LLIMWellWindow::ObjectRowPanel::~ObjectRowPanel() +{ +} + +std::string LLIMWellWindow::ObjectRowPanel::getObjectName(const LLUUID& object_id) +{ + using namespace LLNotificationsUI; + LLUUID notification_id = LLScriptFloaterManager::getInstance()->findNotificationId(object_id); + LLNotificationPtr notification = LLNotifications::getInstance()->find(notification_id); + if(!notification) + { + llwarns << "Invalid notification" << llendl; + return LLStringUtil::null; + } + + std::string text; + + switch(getObjectType(notification)) + { + case OBJ_SCRIPT: + text = notification->getSubstitutions()["TITLE"].asString(); + break; + case OBJ_LOAD_URL: + text = notification->getSubstitutions()["OBJECTNAME"].asString(); + break; + case OBJ_GIVE_INVENTORY: + text = notification->getSubstitutions()["NAME"].asString(); + break; + default: + text = getString("unknown_obj"); + break; + } + + return text; +} + +//--------------------------------------------------------------------------------- +void LLIMWellWindow::ObjectRowPanel::onClosePanel() +{ + LLScriptFloaterManager::getInstance()->removeNotificationByObjectId(mChiclet->getSessionId()); +} + +//static +LLIMWellWindow::ObjectRowPanel::object_type_map LLIMWellWindow::ObjectRowPanel::initObjectTypeMap() +{ + object_type_map type_map; + type_map["ScriptDialog"] = OBJ_SCRIPT; + type_map["LoadWebPage"] = OBJ_LOAD_URL; + type_map["ObjectGiveItem"] = OBJ_GIVE_INVENTORY; + return type_map; +} + +// static +LLIMWellWindow::ObjectRowPanel::EObjectType LLIMWellWindow::ObjectRowPanel::getObjectType(const LLNotificationPtr& notification) +{ + if(!notification) + { + llwarns << "Invalid notification" << llendl; + return OBJ_UNKNOWN; + } + + static object_type_map type_map = initObjectTypeMap(); + std::string name = notification->getName(); + object_type_map::const_iterator it = type_map.find(name); + if(it != type_map.end()) + { + return it->second; + } + llwarns << "Unknown object type" << llendl; + return OBJ_UNKNOWN; +} + +void LLIMWellWindow::ObjectRowPanel::initChiclet(const LLUUID& object_id, bool new_message/* = false*/) +{ + using namespace LLNotificationsUI; + LLUUID notification_id = LLScriptFloaterManager::getInstance()->findNotificationId(object_id); + LLNotificationPtr notification = LLNotifications::getInstance()->find(notification_id); + if(!notification) + { + llwarns << "Invalid notification" << llendl; + return; + } + + // Choose which of the pre-created chiclets to use. + switch(getObjectType(notification)) + { + case OBJ_GIVE_INVENTORY: + mChiclet = getChild<LLInvOfferChiclet>("inv_offer_chiclet"); + break; + default: + mChiclet = getChild<LLScriptChiclet>("object_chiclet"); + break; + } + + mChiclet->setVisible(true); + mChiclet->setSessionId(object_id); +// mChiclet->setShowNewMessagesIcon(new_message); +} + +//--------------------------------------------------------------------------------- +void LLIMWellWindow::ObjectRowPanel::onMouseEnter(S32 x, S32 y, MASK mask) +{ + setTransparentColor(LLUIColorTable::instance().getColor("SysWellItemSelected")); +} + +//--------------------------------------------------------------------------------- +void LLIMWellWindow::ObjectRowPanel::onMouseLeave(S32 x, S32 y, MASK mask) +{ + setTransparentColor(LLUIColorTable::instance().getColor("SysWellItemUnselected")); +} + +//--------------------------------------------------------------------------------- +// virtual +BOOL LLIMWellWindow::ObjectRowPanel::handleMouseDown(S32 x, S32 y, MASK mask) +{ + // Pass the mouse down event to the chiclet (EXT-596). + if (!mChiclet->pointInView(x, y) && !mCloseBtn->getRect().pointInRect(x, y)) // prevent double call of LLIMChiclet::onMouseDown() + mChiclet->onMouseDown(); + + return LLPanel::handleMouseDown(x, y, mask); +} /************************************************************************/ /* LLNotificationWellWindow implementation */ @@ -505,6 +648,7 @@ LLIMWellWindow::LLIMWellWindow(const LLSD& key) { LLIMMgr::getInstance()->addSessionObserver(this); LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findIMChiclet, this, _1)); + LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findObjectChiclet, this, _1)); } LLIMWellWindow::~LLIMWellWindow() @@ -559,6 +703,18 @@ void LLIMWellWindow::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID } } +LLChiclet* LLIMWellWindow::findObjectChiclet(const LLUUID& object_id) +{ + LLChiclet* res = NULL; + ObjectRowPanel* panel = mMessageList->getTypedItemByValue<ObjectRowPanel>(object_id); + if (panel != NULL) + { + res = panel->mChiclet; + } + + return res; +} + ////////////////////////////////////////////////////////////////////////// // PRIVATE METHODS LLChiclet* LLIMWellWindow::findIMChiclet(const LLUUID& sessionId) @@ -617,4 +773,41 @@ void LLIMWellWindow::delIMRow(const LLUUID& sessionId) } } +void LLIMWellWindow::addObjectRow(const LLUUID& object_id, bool new_message/* = false*/) +{ + if (mMessageList->getItemByValue(object_id) == NULL) + { + ObjectRowPanel* item = new ObjectRowPanel(object_id, new_message); + if (mMessageList->insertItemAfter(mSeparator, item, object_id)) + { + handleItemAdded(IT_OBJECT); + } + else + { + llwarns << "Unable to add Object Row into the list, objectID: " << object_id << llendl; + item->die(); + } + reshapeWindow(); + } +} + +void LLIMWellWindow::removeObjectRow(const LLUUID& object_id) +{ + if (mMessageList->removeItemByValue(object_id)) + { + handleItemRemoved(IT_OBJECT); + } + else + { + llwarns << "Unable to remove Object Row from the list, objectID: " << object_id << llendl; + } + + reshapeWindow(); + // hide chiclet window if there are no items left + if(isWindowEmpty()) + { + setVisible(FALSE); + } +} + // EOF diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index adbc83677d..0e00236086 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -46,7 +46,7 @@ class LLFlatListView; class LLChiclet; class LLIMChiclet; - +class LLScriptChiclet; class LLSysWellWindow : public LLDockableFloater @@ -181,11 +181,16 @@ public: /*virtual*/ void sessionRemoved(const LLUUID& session_id); /*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id); + void addObjectRow(const LLUUID& object_id, bool new_message = false); + void removeObjectRow(const LLUUID& object_id); + protected: /*virtual*/ const std::string& getAnchorViewName() { return IM_WELL_ANCHOR_NAME; } private: LLChiclet * findIMChiclet(const LLUUID& sessionId); + LLChiclet* findObjectChiclet(const LLUUID& object_id); + void addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId); void delIMRow(const LLUUID& sessionId); @@ -210,6 +215,37 @@ private: LLButton* mCloseBtn; const LLSysWellWindow* mParent; }; + + class ObjectRowPanel: public LLPanel + { + typedef enum e_object_type + { + OBJ_UNKNOWN, + + OBJ_SCRIPT, + OBJ_GIVE_INVENTORY, + OBJ_LOAD_URL + }EObjectType; + + public: + ObjectRowPanel(const LLUUID& object_id, bool new_message = false); + virtual ~ObjectRowPanel(); + /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask); + /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); + private: + void onClosePanel(); + static EObjectType getObjectType(const LLNotificationPtr& notification); + void initChiclet(const LLUUID& object_id, bool new_message = false); + std::string getObjectName(const LLUUID& object_id); + + typedef std::map<std::string, EObjectType> object_type_map; + static object_type_map initObjectTypeMap(); + public: + LLIMChiclet* mChiclet; + private: + LLButton* mCloseBtn; + }; }; #endif // LL_LLSYSWELLWINDOW_H diff --git a/indra/newview/skins/default/xui/en/panel_active_object_row.xml b/indra/newview/skins/default/xui/en/panel_active_object_row.xml new file mode 100644 index 0000000000..7657fb8055 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_active_object_row.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + name="panel_activeim_row" + layout="topleft" + follows="left|right" + top="0" + left="0" + height="35" + width="318" + background_opaque="false" + background_visible="true" + bg_alpha_color="0.0 0.0 0.0 0.0" > + <string + name="unknown_obj"> + Unknown Object + </string> + <chiclet_script + name="object_chiclet" + layout="topleft" + follows="left" + top="3" + left="5" + height="25" + width="25" + visible="false" + speaker.name="speaker_p2p" + speaker.width="20" + speaker.height="25" + speaker.left="25" + speaker.top="25" + speaker.auto_update="true" + speaker.draw_border="false" + speaker.visible="false"> + </chiclet_script> + <chiclet_offer + name="inv_offer_chiclet" + layout="topleft" + follows="left" + top="3" + left="5" + height="25" + width="25" + visible="false" + speaker.name="speaker_p2p" + speaker.width="20" + speaker.height="25" + speaker.left="25" + speaker.top="25" + speaker.auto_update="true" + speaker.draw_border="false" + speaker.visible="false"> + </chiclet_offer> + <text + type="string" + name="object_name" + layout="topleft" + top="10" + left_pad="20" + height="14" + width="245" + length="1" + follows="right|left" + use_ellipses="true" + font="SansSerifBold"> + Unnamed Object + </text> + <button + top="10" + right="-5" + width="17" + height="17" + layout="topleft" + follows="right" + name="hide_btn" + mouse_opaque="true" + label="" + tab_stop="false" + image_unselected="Toast_CloseBtn" + image_selected="Toast_CloseBtn" + /> +</panel> \ No newline at end of file -- cgit v1.2.3 From cefa8e4f54e4aa1b8d23fcdc4240219c266b568b Mon Sep 17 00:00:00 2001 From: Lis Pardi <lis@lindenlab.com> Date: Wed, 9 Dec 2009 11:28:56 -0500 Subject: EXT-2980 make back button in nav bar match spec --- .../skins/default/xui/en/widgets/teleport_history_menu_item.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml b/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml index eaa68f5690..6c559aa185 100644 --- a/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml @@ -3,10 +3,6 @@ Based on menu_item_call.xml --> <teleport_history_menu_item back_item_font="SansSerif" - current_item_font="SansSerifBold" + current_item_font="SansSerif" forward_item_font="SansSerif" - back_item_image="teleport_history_backward.tga" - forward_item_image="teleport_history_forward.tga" - image_hpad="1" - image_vpad="0" /> -- cgit v1.2.3 From 89c0fc48b23c51748047803483aa404accc4d6f3 Mon Sep 17 00:00:00 2001 From: Lis Pardi <lis@lindenlab.com> Date: Wed, 9 Dec 2009 12:07:16 -0500 Subject: ext-2981 button and text editor height schould be 23px, not 16px --- .../skins/default/xui/en/panel_preferences_advanced.xml | 6 +++--- .../newview/skins/default/xui/en/panel_preferences_alerts.xml | 4 ++-- .../newview/skins/default/xui/en/panel_preferences_general.xml | 6 +++--- .../skins/default/xui/en/panel_preferences_graphics1.xml | 8 ++++---- .../newview/skins/default/xui/en/panel_preferences_privacy.xml | 6 +++--- indra/newview/skins/default/xui/en/panel_preferences_setup.xml | 10 +++++----- indra/newview/skins/default/xui/en/panel_preferences_sound.xml | 6 +++--- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 6a61953319..78b90eefcc 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -70,7 +70,7 @@ </text> <combo_box allow_text_entry="true" - height="20" + height="23" follows="left|top" layout="topleft" left_pad="0" @@ -306,7 +306,7 @@ Avatars: <button follows="top|left" enabled_control="EnableVoiceChat" - height="20" + height="23" label="Set Key" left_delta="0" name="set_voice_hotkey_button" @@ -320,7 +320,7 @@ Avatars: enabled_control="EnableVoiceChat" follows="left" halign="center" - height="20" + height="23" label="Middle Mouse Button" left_delta="120" mouse_opaque="true" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml index a94df4150d..d4f4053dad 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml @@ -63,7 +63,7 @@ <button enabled_control="FirstSelectedDisabledPopups" follows="top|left" - height="20" + height="23" image_disabled="PushButton_Disabled" image_disabled_selected="PushButton_Disabled" image_overlay="Arrow_Up" @@ -81,7 +81,7 @@ <button enabled_control="FirstSelectedEnabledPopups" follows="top|left" - height="20" + height="23" image_disabled="PushButton_Disabled" image_disabled_selected="PushButton_Disabled" image_overlay="Arrow_Down" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index ee9bfbae93..8aba8b9dd1 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -24,7 +24,7 @@ <combo_box control_name="Language" follows="left|bottom" - height="18" + height="23" layout="topleft" left_delta="50" max_chars="135" @@ -136,7 +136,7 @@ <combo_box control_name="PreferredMaturity" follows="left|bottom" - height="18" + height="23" layout="topleft" left_delta="-10" name="maturity_desired_combobox" @@ -170,7 +170,7 @@ <combo_box control_name="LoginLocation" follows="left|bottom" - height="18" + height="23" layout="topleft" left_delta="50" name="start_location_combo" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index eb00b9b79a..04985d0fa9 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -708,7 +708,7 @@ </panel> <button follows="left|bottom" - height="20" + height="23" label="Apply" label_selected="Apply" layout="topleft" @@ -721,7 +721,7 @@ </button> <button follows="left|bottom" - height="20" + height="23" label="Reset" layout="topleft" left_pad="3" @@ -734,7 +734,7 @@ <button control_name="ShowAdvancedGraphicsSettings" follows="right|bottom" - height="20" + height="23" is_toggle="true" label="Advanced" layout="topleft" @@ -744,7 +744,7 @@ width="115" /> <button follows="right|bottom" - height="20" + height="23" label="Hardware" label_selected="Hardware" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index 29e9b476eb..25d7ba0903 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -15,7 +15,7 @@ </panel.string> <button follows="left|bottom" - height="20" + height="23" label="Clear History" layout="topleft" left="30" @@ -160,7 +160,7 @@ <button enabled="false" follows="right|bottom" - height="20" + height="23" label="Browse" label_selected="Browse" layout="topleft" @@ -173,7 +173,7 @@ </button> <button follows="left|bottom" - height="20" + height="23" label="Block list" layout="topleft" left="30" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 5cabae5fa0..a7def5306e 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -10,7 +10,7 @@ top="1" width="517"> <button - height="20" + height="23" label="Other Devices" layout="topleft" left="30" @@ -138,7 +138,7 @@ enabled_control="BrowserProxyEnabled" decimal_digits="0" follows="left|top" - height="16" + height="23" increment="1" initial_value="80" label="Port number:" @@ -208,7 +208,7 @@ width="205" /> <button follows="left|top" - height="22" + height="23" label="Browse" label_selected="Browse" layout="topleft" @@ -221,7 +221,7 @@ </button> <button follows="left|top" - height="22" + height="23" label="Reset" label_selected="Set" layout="topleft" @@ -314,7 +314,7 @@ width="200" /> <button follows="left|top" - height="22" + height="23" enabled="false" label="Browse" label_selected="Browse" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 854227619b..102a53ad90 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -343,7 +343,7 @@ <button control_name="ShowDeviceSettings" follows="left|top" - height="19" + height="23" is_toggle="true" label="Input/Output devices" layout="topleft" @@ -391,7 +391,7 @@ Input </text> <combo_box - height="19" + height="23" control_name="VoiceInputAudioDevice" layout="topleft" left="165" @@ -505,7 +505,7 @@ </text> <combo_box control_name="VoiceOutputAudioDevice" - height="19" + height="23" layout="topleft" left="165" max_chars="128" -- cgit v1.2.3 From bf4cbc517ce14bcceb0ee890c541a8973fee62a9 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev <ychebotarev@productengine.com> Date: Wed, 9 Dec 2009 19:11:37 +0200 Subject: fix normal bug EXT-3243 Vertical scroll bar is transparent in the Group profile panel --HG-- branch : product-engine --- .../skins/default/xui/en/panel_group_general.xml | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml index 043edd10e1..4b459c9c58 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -23,7 +23,7 @@ Hover your mouse over the options for more help. </panel.string> <text_editor type="string" - follows="left|top" + follows="left|top|right" left="5" height="60" layout="topleft" @@ -37,7 +37,7 @@ Hover your mouse over the options for more help. <name_list column_padding="0" draw_heading="true" - follows="left|top" + follows="left|top|right" heading_height="20" height="156" layout="topleft" @@ -55,10 +55,10 @@ Hover your mouse over the options for more help. relative_width="0.4" /> </name_list> <text - follows="left|top" + follows="left|top|right" type="string" height="12" - layout="topleft" + layout="left|top|right" left="5" name="active_title_label" top_pad="5" @@ -66,7 +66,7 @@ Hover your mouse over the options for more help. My Title </text> <combo_box - follows="left|top" + follows="left|top|right" height="20" layout="topleft" left="5" @@ -98,7 +98,7 @@ Hover your mouse over the options for more help. bevel_style="in" border="true" bg_alpha_color="FloaterUnfocusBorderColor" - follows="left|top" + follows="left|top|right" height="88" layout="topleft" left="2" @@ -106,7 +106,7 @@ Hover your mouse over the options for more help. name="preferences_container" top_pad="2"> <check_box - follows="right|top" + follows="right|top|left" height="16" label="Open enrollment" layout="topleft" @@ -126,21 +126,21 @@ Hover your mouse over the options for more help. width="300" /> <spinner decimal_digits="0" - follows="left|top" + follows="left|top|right" halign="left" height="16" increment="1" label_width="15" label="L$" layout="topleft" - right="-10" + right="-30" max_val="99999" left_pad="0" name="spin_enrollment_fee" tool_tip="New members must pay this fee to join the group when Enrollment Fee is checked." - width="100" /> + width="80" /> <combo_box - follows="left|top" + follows="left|top|right" height="20" layout="topleft" left="10" @@ -158,7 +158,7 @@ Hover your mouse over the options for more help. value="Mature" /> </combo_box> <check_box - follows="left|top" + follows="left|top|right" height="16" initial_value="true" label="Show in search" -- cgit v1.2.3 From 15fbfa5ae1164a5c2ddce5f2890b02645f7a04d6 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Wed, 9 Dec 2009 10:31:50 -0800 Subject: rename LL_PATH_MOZILLA_PROFILE to LL_PATH_BROWSER_PROFILE --- indra/llvfs/lldir.cpp | 2 +- indra/llvfs/lldir.h | 2 +- indra/llvfs/lldir_linux.cpp | 4 ++-- indra/llvfs/lldir_solaris.cpp | 4 ++-- indra/llvfs/lldir_win32.cpp | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index c0c6e592d5..7d1ccf5580 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -394,7 +394,7 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd prefix += "local_assets"; break; - case LL_PATH_MOZILLA_PROFILE: + case LL_PATH_BROWSER_PROFILE: prefix = getOSUserAppDir(); prefix += mDirDelimiter; prefix += "browser_profile"; diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index 07c814769e..bf4209390f 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -54,7 +54,7 @@ typedef enum ELLPath LL_PATH_TOP_SKIN = 10, LL_PATH_CHAT_LOGS = 11, LL_PATH_PER_ACCOUNT_CHAT_LOGS = 12, - LL_PATH_MOZILLA_PROFILE = 13, + LL_PATH_BROWSER_PROFILE = 13, LL_PATH_USER_SKIN = 14, LL_PATH_LOCAL_ASSETS = 15, // LL_PATH_HTML = 16, diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index 08c993ed2a..495e06e514 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -225,12 +225,12 @@ void LLDir_Linux::initAppDirs(const std::string &app_name, } } - res = LLFile::mkdir(getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"")); + res = LLFile::mkdir(getExpandedFilename(LL_PATH_BROWSER_PROFILE,"")); if (res == -1) { if (errno != EEXIST) { - llwarns << "Couldn't create LL_PATH_MOZILLA_PROFILE dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl; + llwarns << "Couldn't create LL_PATH_BROWSER_PROFILE dir " << getExpandedFilename(LL_PATH_BROWSER_PROFILE,"") << llendl; } } diff --git a/indra/llvfs/lldir_solaris.cpp b/indra/llvfs/lldir_solaris.cpp index a21f3ca0ab..561c011db0 100644 --- a/indra/llvfs/lldir_solaris.cpp +++ b/indra/llvfs/lldir_solaris.cpp @@ -244,12 +244,12 @@ void LLDir_Solaris::initAppDirs(const std::string &app_name, } } - res = LLFile::mkdir(getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"")); + res = LLFile::mkdir(getExpandedFilename(LL_PATH_BROWSER_PROFILE,"")); if (res == -1) { if (errno != EEXIST) { - llwarns << "Couldn't create LL_PATH_MOZILLA_PROFILE dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl; + llwarns << "Couldn't create LL_PATH_BROWSER_PROFILE dir " << getExpandedFilename(LL_PATH_BROWSER_PROFILE,"") << llendl; } } diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp index 4c376f11a5..b5754be6d6 100644 --- a/indra/llvfs/lldir_win32.cpp +++ b/indra/llvfs/lldir_win32.cpp @@ -212,12 +212,12 @@ void LLDir_Win32::initAppDirs(const std::string &app_name, } } - res = LLFile::mkdir(getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"")); + res = LLFile::mkdir(getExpandedFilename(LL_PATH_BROWSER_PROFILE,"")); if (res == -1) { if (errno != EEXIST) { - llwarns << "Couldn't create LL_PATH_MOZILLA_PROFILE dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl; + llwarns << "Couldn't create LL_PATH_BROWSER_PROFILE dir " << getExpandedFilename(LL_PATH_BROWSER_PROFILE,"") << llendl; } } res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SKIN,"")); -- cgit v1.2.3 From 363ee42d53bd3049df0d17f16e211fac6b73daf7 Mon Sep 17 00:00:00 2001 From: Lynx Linden <lynx@lindenlab.com> Date: Wed, 9 Dec 2009 18:44:01 +0000 Subject: EXT-3234: Display notification when SLurl blocked/throttled. We block or throttled certain SLurls when they came from an untrusted browser. Previously this would happen silently (though a message was sent to the logfile). Now we show a once-per-session notification if either of these situations arise. --- indra/newview/llcommandhandler.cpp | 13 +++++++++++++ indra/newview/skins/default/xui/en/notifications.xml | 17 +++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/indra/newview/llcommandhandler.cpp b/indra/newview/llcommandhandler.cpp index af6488388a..1d92661ea2 100644 --- a/indra/newview/llcommandhandler.cpp +++ b/indra/newview/llcommandhandler.cpp @@ -34,6 +34,7 @@ #include "llviewerprecompiledheaders.h" #include "llcommandhandler.h" +#include "llnotificationsutil.h" // system includes #include <boost/tokenizer.hpp> @@ -93,6 +94,8 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, LLMediaCtrl* web, bool trusted_browser) { + static bool slurl_blocked = false; + static bool slurl_throttled = false; static F64 last_throttle_time = 0.0; F64 cur_time = 0.0; std::map<std::string, LLCommandHandlerInfo>::iterator it = mMap.find(cmd); @@ -110,6 +113,11 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, // block request from external browser, but report as // "handled" because it was well formatted. LL_WARNS_ONCE("SLURL") << "Blocked SLURL command from untrusted browser" << LL_ENDL; + if (! slurl_blocked) + { + LLNotificationsUtil::add("BlockedSLURL"); + slurl_blocked = true; + } return true; case LLCommandHandler::UNTRUSTED_THROTTLE: @@ -119,6 +127,11 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, // block request from external browser if it happened // within THROTTLE_PERIOD secs of the last command LL_WARNS_ONCE("SLURL") << "Throttled SLURL command from untrusted browser" << LL_ENDL; + if (! slurl_throttled) + { + LLNotificationsUtil::add("ThrottledSLURL"); + slurl_throttled = true; + } return true; } last_throttle_time = cur_time; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f659062cfe..69d7a1dd33 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5754,6 +5754,23 @@ You just entered a region using a different server version, which may affect per The SLurl you clicked on is not supported. </notification> + <notification + icon="notifytip.tga" + name="BlockedSLURL" + priority="high" + type="notifytip"> +A SLurl was received from an untrusted browser and has been blocked for your security. + </notification> + + <notification + icon="notifytip.tga" + name="ThrottledSLURL" + priority="high" + type="notifytip"> +Multiple SLurls were received from an untrusted browser within a short period. +They will be blocked for a few seconds for your security. + </notification> + <notification name="IMToast" type="notifytoast"> [MESSAGE] <form name="form"> -- cgit v1.2.3 From dac8632a7ce58dfe80122469b0bd03e36f31ffb2 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Wed, 9 Dec 2009 21:56:21 +0200 Subject: build fix --HG-- branch : product-engine --- indra/newview/llsyswellwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 5ea2ee65e4..1ebf624eeb 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -780,7 +780,7 @@ void LLIMWellWindow::addObjectRow(const LLUUID& object_id, bool new_message/* = ObjectRowPanel* item = new ObjectRowPanel(object_id, new_message); if (mMessageList->insertItemAfter(mSeparator, item, object_id)) { - handleItemAdded(IT_OBJECT); + handleItemAdded(IT_INSTANT_MESSAGE); } else { @@ -795,7 +795,7 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& object_id) { if (mMessageList->removeItemByValue(object_id)) { - handleItemRemoved(IT_OBJECT); + handleItemRemoved(IT_INSTANT_MESSAGE); } else { -- cgit v1.2.3 From 96b8f71fa985d0e760d023fdd745dcd91a7dce6a Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Wed, 9 Dec 2009 21:58:13 +0200 Subject: Re-fixed normal bug EXT-2346 \"My Landmarks accordion panels shouldn't be displayed if there are no landmarks in respective folders\" --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index faa0aa95b9..65056b00d6 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -786,7 +786,7 @@ void LLLandmarksPanel::updateFilteredAccordions() { LLInventoryPanel* inventory_list = NULL; LLAccordionCtrlTab* accordion_tab = NULL; -// bool needs_arrange = false; + bool needs_arrange = false; for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) { @@ -798,7 +798,7 @@ void LLLandmarksPanel::updateFilteredAccordions() if (NULL == inventory_list) continue; // This doesn't seem to work correctly. Disabling for now. -Seraph - /* + // Enabled to show/hide accordions with/without landmarks. See EXT-2346. (Seth PE) LLFolderView* fv = inventory_list->getRootFolder(); // arrange folder view contents to draw its descendants if it has any @@ -809,17 +809,17 @@ void LLLandmarksPanel::updateFilteredAccordions() needs_arrange = true; accordion_tab->setVisible(has_descendants); - */ - accordion_tab->setVisible(TRUE); + + //accordion_tab->setVisible(TRUE); } // we have to arrange accordion tabs for cases when filter string is less restrictive but // all items are still filtered. -// if (needs_arrange) -// { + if (needs_arrange) + { static LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("landmarks_accordion"); accordion->arrange(); -// } + } } /* -- cgit v1.2.3 From 197de032e1f66894f595a3a1ba46b36f45f8e8f5 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Wed, 9 Dec 2009 12:57:10 -0800 Subject: DEV-43948 viewer2 is writing session data into the 'read-only' installation tree (mostly media stuff) propagate the parent app's OSUserAppDir (i.e. ~/.secondlife/) all the way down to plugins, if they need persistant user data/settings (like the webkit plugin needs a place to put its cache). --- indra/llplugin/llpluginclassmedia.cpp | 5 +++-- indra/llplugin/llpluginclassmedia.h | 2 +- indra/llplugin/llpluginprocesschild.cpp | 9 +++++++-- indra/llplugin/llpluginprocesschild.h | 2 ++ indra/llplugin/llpluginprocessparent.cpp | 4 +++- indra/llplugin/llpluginprocessparent.h | 4 +++- indra/media_plugins/webkit/media_plugin_webkit.cpp | 10 +++++++--- indra/newview/llviewermedia.cpp | 7 +++---- 8 files changed, 29 insertions(+), 14 deletions(-) diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 70d770ef7e..1a382643da 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -63,14 +63,15 @@ LLPluginClassMedia::~LLPluginClassMedia() reset(); } -bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug) +bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path) { LL_DEBUGS("Plugin") << "launcher: " << launcher_filename << LL_ENDL; LL_DEBUGS("Plugin") << "plugin: " << plugin_filename << LL_ENDL; + LL_DEBUGS("Plugin") << "user_data_path: " << user_data_path << LL_ENDL; mPlugin = new LLPluginProcessParent(this); mPlugin->setSleepTime(mSleepTime); - mPlugin->init(launcher_filename, plugin_filename, debug); + mPlugin->init(launcher_filename, plugin_filename, debug, user_data_path); return true; } diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index 6b64688718..b58067733b 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -49,7 +49,7 @@ public: virtual ~LLPluginClassMedia(); // local initialization, called by the media manager when creating a source - virtual bool init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug = false); + virtual bool init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path); // undoes everything init() didm called by the media manager when destroying a source virtual void reset(); diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp index 55cf11c620..ccf6dab942 100644 --- a/indra/llplugin/llpluginprocesschild.cpp +++ b/indra/llplugin/llpluginprocesschild.cpp @@ -145,8 +145,12 @@ void LLPluginProcessChild::idle(void) break; case STATE_PLUGIN_LOADED: - setState(STATE_PLUGIN_INITIALIZING); - sendMessageToPlugin(LLPluginMessage("base", "init")); + { + setState(STATE_PLUGIN_INITIALIZING); + LLPluginMessage message("base", "init"); + message.setValue("user_data_path", mUserDataPath); + sendMessageToPlugin(message); + } break; case STATE_PLUGIN_INITIALIZING: @@ -310,6 +314,7 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message) if(message_name == "load_plugin") { mPluginFile = parsed.getValue("file"); + mUserDataPath = parsed.getValue("user_data_path"); } else if(message_name == "shm_add") { diff --git a/indra/llplugin/llpluginprocesschild.h b/indra/llplugin/llpluginprocesschild.h index f5c57c3d49..1cfd9dcaf9 100644 --- a/indra/llplugin/llpluginprocesschild.h +++ b/indra/llplugin/llpluginprocesschild.h @@ -96,6 +96,8 @@ private: LLSocket::ptr_t mSocket; std::string mPluginFile; + + std::string mUserDataPath; LLPluginInstance *mInstance; diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index 332ce288d7..f60838b1e7 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -99,12 +99,13 @@ void LLPluginProcessParent::errorState(void) setState(STATE_ERROR); } -void LLPluginProcessParent::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug) +void LLPluginProcessParent::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path) { mProcess.setExecutable(launcher_filename); mPluginFile = plugin_filename; mCPUUsage = 0.0f; mDebug = debug; + mUserDataPath = user_data_path; setState(STATE_INITIALIZED); } @@ -362,6 +363,7 @@ void LLPluginProcessParent::idle(void) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "load_plugin"); message.setValue("file", mPluginFile); + message.setValue("user_data_path", mUserDataPath); sendMessage(message); } diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h index 25669f5d78..6d661a6960 100644 --- a/indra/llplugin/llpluginprocessparent.h +++ b/indra/llplugin/llpluginprocessparent.h @@ -58,7 +58,7 @@ public: LLPluginProcessParent(LLPluginProcessParentOwner *owner); ~LLPluginProcessParent(); - void init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug = false); + void init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path); void idle(void); // returns true if the plugin is on its way to steady state @@ -139,6 +139,8 @@ private: std::string mPluginFile; + std::string mUserDataPath; + LLPluginProcessParentOwner *mOwner; typedef std::map<std::string, LLPluginSharedMemory*> sharedMemoryRegionsType; diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 25f4c8720a..1ead310754 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -76,6 +76,8 @@ public: private: + std::string mProfileDir; + enum { INIT_STATE_UNINITIALIZED, // Browser instance hasn't been set up yet @@ -187,7 +189,6 @@ private: #else std::string component_dir = application_dir; #endif - std::string profileDir = application_dir + "/" + "browser_profile"; // cross platform? // window handle - needed on Windows and must be app window. #if LL_WINDOWS @@ -199,7 +200,7 @@ private: #endif // main browser initialization - bool result = LLQtWebKit::getInstance()->init( application_dir, component_dir, profileDir, native_window_handle ); + bool result = LLQtWebKit::getInstance()->init( application_dir, component_dir, mProfileDir, native_window_handle ); if ( result ) { // create single browser window @@ -576,7 +577,7 @@ MediaPluginWebKit::~MediaPluginWebKit() void MediaPluginWebKit::receiveMessage(const char *message_string) { -// std::cerr << "MediaPluginWebKit::receiveMessage: received message: \"" << message_string << "\"" << std::endl; + std::cerr << "MediaPluginWebKit::receiveMessage: received message: \"" << message_string << "\"" << std::endl; LLPluginMessage message_in; if(message_in.parse(message_string) >= 0) @@ -587,6 +588,9 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) { if(message_name == "init") { + std::string user_data_path = message_in.getValue("user_data_path"); // n.b. always has trailing platform-specific dir-delimiter + mProfileDir = user_data_path + "browser_profile"; + LLPluginMessage message("base", "init_response"); LLSD versions = LLSD::emptyMap(); versions[LLPLUGIN_MESSAGE_CLASS_BASE] = LLPLUGIN_MESSAGE_CLASS_BASE_VERSION; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 952de00272..ef8f63484e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -988,11 +988,10 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ } else { - std::string plugins_path = gDirUtilp->getLLPluginDir(); - plugins_path += gDirUtilp->getDirDelimiter(); - std::string launcher_name = gDirUtilp->getLLPluginLauncher(); std::string plugin_name = gDirUtilp->getLLPluginFilename(plugin_basename); + std::string user_data_path = gDirUtilp->getOSUserAppDir(); + user_data_path += gDirUtilp->getDirDelimiter(); // See if the plugin executable exists llstat s; @@ -1008,7 +1007,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ { LLPluginClassMedia* media_source = new LLPluginClassMedia(owner); media_source->setSize(default_width, default_height); - if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"))) + if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"), user_data_path)) { return media_source; } -- cgit v1.2.3 From e9bca5d52ab69f25568b344081e9ae0b699a0ade Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Wed, 9 Dec 2009 13:02:51 -0800 Subject: EXT-2980 Remove indentation on back button history list. Design reviewed with Lis --- indra/newview/llnavigationbar.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 9797c01371..08bc1fac8b 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -127,7 +127,6 @@ LLTeleportHistoryMenuItem::LLTeleportHistoryMenuItem(const Params& p) if (p.item_type == TYPE_BACKWARD) { setFont( p.back_item_font ); - setLabel(std::string(" ") + std::string(p.label)); } else if (p.item_type == TYPE_CURRENT) { @@ -136,7 +135,6 @@ LLTeleportHistoryMenuItem::LLTeleportHistoryMenuItem(const Params& p) else { setFont( p.forward_item_font ); - setLabel(std::string(" ") + std::string(p.label)); } LLIconCtrl::Params icon_params; -- cgit v1.2.3 From 3476116de84f43367b26e95535ea00ce77ee5215 Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Wed, 9 Dec 2009 13:06:07 -0800 Subject: EXT-2827 and fix for delete key not deleting objects while building. Object inventory was grabbing edit menu handling during refresh. Put back Angela's code so that Right-click > Remove > Delete is now disabled if you have a single face selected. Fixed LLSelectMgr::contains() for SELECT_ALL_TES case. Reviewed with Richard. --- indra/newview/llpanelobjectinventory.cpp | 2 +- indra/newview/llselectmgr.cpp | 29 +++++++++++++++++++++++++---- indra/newview/llviewermenu.cpp | 32 ++++++++++++++++++-------------- 3 files changed, 44 insertions(+), 19 deletions(-) diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 4f8aff6f78..9d38dab26e 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1697,7 +1697,7 @@ void LLPanelObjectInventory::updateInventory() mFolders->requestArrange(); mInventoryNeedsUpdate = FALSE; - LLEditMenuHandler::gEditMenuHandler = mFolders; + // Edit menu handler is set in onFocusReceived } // *FIX: This is currently a very expensive operation, because we have diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 1605838b94..4d6c19157a 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -104,6 +104,7 @@ const F32 SILHOUETTE_UPDATE_THRESHOLD_SQUARED = 0.02f; const S32 MAX_ACTION_QUEUE_SIZE = 20; const S32 MAX_SILS_PER_FRAME = 50; const S32 MAX_OBJECTS_PER_PACKET = 254; +const S32 TE_SELECT_MASK_ALL = 0xFFFFFFFF; // // Globals @@ -5110,7 +5111,7 @@ LLSelectNode::~LLSelectNode() void LLSelectNode::selectAllTEs(BOOL b) { - mTESelectMask = b ? 0xFFFFFFFF : 0x0; + mTESelectMask = b ? TE_SELECT_MASK_ALL : 0x0; mLastTESelected = 0; } @@ -5753,8 +5754,22 @@ void LLSelectMgr::redo() //----------------------------------------------------------------------------- BOOL LLSelectMgr::canDoDelete() const { - // Note: Can only delete root objects (see getFirstDeleteableObject() for more info) - return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstDeleteableObject() != NULL; // HACK: casting away constness - MG + bool can_delete = false; + // This function is "logically const" - it does not change state in + // a way visible outside the selection manager. + LLSelectMgr* self = const_cast<LLSelectMgr*>(this); + LLViewerObject* obj = self->mSelectedObjects->getFirstDeleteableObject(); + // Note: Can only delete root objects (see getFirstDeleteableObject() for more info) + if (obj!= NULL) + { + // all the faces needs to be selected + if(self->mSelectedObjects->contains(obj,SELECT_ALL_TES )) + { + can_delete = true; + } + } + + return can_delete; } //----------------------------------------------------------------------------- @@ -6189,8 +6204,14 @@ BOOL LLObjectSelection::contains(LLViewerObject* object, S32 te) LLSelectNode* nodep = *iter; if (nodep->getObject() == object) { + // Optimization + if (nodep->getTESelectMask() == TE_SELECT_MASK_ALL) + { + return TRUE; + } + BOOL all_selected = TRUE; - for (S32 i = 0; i < SELECT_MAX_TES; i++) + for (S32 i = 0; i < object->getNumTEs(); i++) { all_selected = all_selected && nodep->isTESelected(i); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 431b4d3c0a..9d81f7edb0 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2698,20 +2698,24 @@ BOOL enable_has_attachments(void*) bool enable_object_mute() { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - bool new_value = (object != NULL); - if (new_value) - { - LLVOAvatar* avatar = find_avatar_from_object(object); - if (avatar) - { - // It's an avatar - LLNameValue *lastname = avatar->getNVPair("LastName"); - BOOL is_linden = lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden"); - BOOL is_self = avatar->isSelf(); - new_value = !is_linden && !is_self; - } - } - return new_value; + if (!object) return false; + + LLVOAvatar* avatar = find_avatar_from_object(object); + if (avatar) + { + // It's an avatar + LLNameValue *lastname = avatar->getNVPair("LastName"); + bool is_linden = + lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden"); + bool is_self = avatar->isSelf(); + return !is_linden && !is_self; + } + else + { + // Just a regular object + return LLSelectMgr::getInstance()->getSelection()-> + contains( object, SELECT_ALL_TES ); + } } class LLObjectMute : public view_listener_t -- cgit v1.2.3 From 27d6f0e49cfcf549efbfec350bfb500e397cccb2 Mon Sep 17 00:00:00 2001 From: Leyla Farazha <leyla@lindenlab.com> Date: Tue, 7 Dec 2010 13:39:56 -0800 Subject: EXT-3265 Gear menu on_visible params are broken - not setting visibility of menu items EXT-2923 [BSI] My own inspector lists "Stand Up" as an option in gear menu, while I'm standing --- indra/llui/llmenugl.cpp | 2 +- indra/llui/llmenugl.h | 15 +++------- indra/llui/llpanel.h | 1 - indra/llui/lluictrl.cpp | 29 ------------------ indra/llui/lluictrl.h | 15 ++-------- indra/newview/llinspectavatar.cpp | 6 ++-- indra/newview/llviewermenu.cpp | 35 ++++------------------ .../default/xui/en/menu_inspect_object_gear.xml | 16 +++++----- .../default/xui/en/menu_inspect_self_gear.xml | 2 +- 9 files changed, 25 insertions(+), 96 deletions(-) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 907f2352a0..fd5c2b7fef 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -761,7 +761,7 @@ void LLMenuItemCallGL::initFromParams(const Params& p) { if (p.on_visible.isProvided()) { - mVisibleSignal.connect(initVisibleCallback(p.on_visible)); + mVisibleSignal.connect(initEnableCallback(p.on_visible)); } if (p.on_enable.isProvided()) { diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index cbb9b4d344..61e06f9e5f 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -175,9 +175,7 @@ protected: // This function appends the character string representation of // the current accelerator key and mask to the provided string. void appendAcceleratorString( std::string& st ) const; - - void initMenuEnableCallback(const EnableCallbackParam& cb, enable_signal_t& sig); - + protected: KEY mAcceleratorKey; MASK mAcceleratorMask; @@ -249,7 +247,7 @@ public: { Optional<EnableCallbackParam > on_enable; Optional<CommitCallbackParam > on_click; - Optional<VisibleCallbackParam > on_visible; + Optional<EnableCallbackParam > on_visible; Params() : on_enable("on_enable"), on_click("on_click"), @@ -284,15 +282,10 @@ public: { return mEnableSignal.connect(cb); } - - boost::signals2::connection setVisibleCallback( const visible_signal_t::slot_type& cb ) - { - return mVisibleSignal.connect(cb); - } - + private: enable_signal_t mEnableSignal; - visible_signal_t mVisibleSignal; + enable_signal_t mVisibleSignal; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index a8bd5fd5e5..d0986a06d3 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -249,7 +249,6 @@ protected: LLCallbackMap::map_t mFactoryMap; CommitCallbackRegistry::ScopedRegistrar mCommitCallbackRegistrar; EnableCallbackRegistry::ScopedRegistrar mEnableCallbackRegistrar; - VisibleCallbackRegistry::ScopedRegistrar mVisibleCallbackRegistrar; commit_signal_t* mVisibleSignal; // Called when visibility changes, passes new visibility as LLSD() diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 706712ec5e..6044908ca7 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -232,11 +232,6 @@ bool default_enable_handler(LLUICtrl* ctrl, const LLSD& param) return true; } -bool default_visible_handler(LLUICtrl* ctrl, const LLSD& param) -{ - return true; -} - LLUICtrl::commit_signal_t::slot_type LLUICtrl::initCommitCallback(const CommitCallbackParam& cb) { @@ -290,30 +285,6 @@ LLUICtrl::enable_signal_t::slot_type LLUICtrl::initEnableCallback(const EnableCa return default_enable_handler; } -LLUICtrl::visible_signal_t::slot_type LLUICtrl::initVisibleCallback(const VisibleCallbackParam& cb) -{ - // Set the callback function - if (cb.function.isProvided()) - { - if (cb.parameter.isProvided()) - return boost::bind(cb.function(), this, cb.parameter); - else - return cb.function(); - } - else - { - visible_callback_t* func = (VisibleCallbackRegistry::getValue(cb.function_name)); - if (func) - { - if (cb.parameter.isProvided()) - return boost::bind((*func), this, cb.parameter); - else - return visible_signal_t::slot_type(*func); - } - } - return default_visible_handler; -} - // virtual void LLUICtrl::onMouseEnter(S32 x, S32 y, MASK mask) { diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index b20ff5d798..983700065d 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -63,9 +63,6 @@ public: typedef boost::function<bool (LLUICtrl* ctrl, const LLSD& param)> enable_callback_t; typedef boost::signals2::signal<bool (LLUICtrl* ctrl, const LLSD& param), boost_boolean_combiner> enable_signal_t; - typedef boost::function<bool (LLUICtrl* ctrl, const LLSD& param)> visible_callback_t; - typedef boost::signals2::signal<bool (LLUICtrl* ctrl, const LLSD& param), boost_boolean_combiner> visible_signal_t; - struct CallbackParam : public LLInitParam::Block<CallbackParam> { Ignored name; @@ -87,12 +84,7 @@ public: { Optional<enable_callback_t> function; }; - - struct VisibleCallbackParam : public LLInitParam::Block<VisibleCallbackParam, CallbackParam > - { - Optional<visible_callback_t> function; - }; - + struct EnableControls : public LLInitParam::Choice<EnableControls> { Alternative<std::string> enabled; @@ -148,7 +140,6 @@ protected: commit_signal_t::slot_type initCommitCallback(const CommitCallbackParam& cb); enable_signal_t::slot_type initEnableCallback(const EnableCallbackParam& cb); - visible_signal_t::slot_type initVisibleCallback(const VisibleCallbackParam& cb); // We need this virtual so we can override it with derived versions virtual LLViewModel* getViewModel() const; @@ -270,9 +261,7 @@ public: class CommitCallbackRegistry : public CallbackRegistry<commit_callback_t, CommitCallbackRegistry>{}; class EnableCallbackRegistry : public CallbackRegistry<enable_callback_t, EnableCallbackRegistry>{}; - class VisibleCallbackRegistry : public CallbackRegistry<visible_callback_t, VisibleCallbackRegistry>{}; - - + protected: static bool controlListener(const LLSD& newvalue, LLHandle<LLUICtrl> handle, std::string type); diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 83beae29c1..435c3a5129 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -205,10 +205,10 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd) mCommitCallbackRegistrar.add("InspectAvatar.Report", boost::bind(&LLInspectAvatar::onClickReport, this)); mCommitCallbackRegistrar.add("InspectAvatar.FindOnMap", boost::bind(&LLInspectAvatar::onClickFindOnMap, this)); mCommitCallbackRegistrar.add("InspectAvatar.ZoomIn", boost::bind(&LLInspectAvatar::onClickZoomIn, this)); - mVisibleCallbackRegistrar.add("InspectAvatar.VisibleFindOnMap", boost::bind(&LLInspectAvatar::onVisibleFindOnMap, this)); - mVisibleCallbackRegistrar.add("InspectAvatar.VisibleFreezeEject", + mEnableCallbackRegistrar.add("InspectAvatar.VisibleFindOnMap", boost::bind(&LLInspectAvatar::onVisibleFindOnMap, this)); + mEnableCallbackRegistrar.add("InspectAvatar.VisibleFreezeEject", boost::bind(&LLInspectAvatar::onVisibleFreezeEject, this)); - mVisibleCallbackRegistrar.add("InspectAvatar.VisibleZoomIn", + mEnableCallbackRegistrar.add("InspectAvatar.VisibleZoomIn", boost::bind(&LLInspectAvatar::onVisibleZoomIn, this)); mEnableCallbackRegistrar.add("InspectAvatar.Gear.Enable", boost::bind(&LLInspectAvatar::isNotFriend, this)); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9c52153ee4..2b1585e007 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7562,12 +7562,11 @@ void initialize_menus() LLUICtrl::EnableCallbackRegistry::Registrar& enable = LLUICtrl::EnableCallbackRegistry::currentRegistrar(); LLUICtrl::CommitCallbackRegistry::Registrar& commit = LLUICtrl::CommitCallbackRegistry::currentRegistrar(); - LLUICtrl::VisibleCallbackRegistry::Registrar& visible = LLUICtrl::VisibleCallbackRegistry::currentRegistrar(); // Generic enable and visible // Don't prepend MenuName.Foo because these can be used in any menu. enable.add("IsGodCustomerService", boost::bind(&is_god_customer_service)); - visible.add("IsGodCustomerService", boost::bind(&is_god_customer_service)); + enable.add("IsGodCustomerService", boost::bind(&is_god_customer_service)); // Agent commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying)); @@ -7674,7 +7673,6 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsEnableLink(), "Tools.EnableLink"); view_listener_t::addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink"); view_listener_t::addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake"); - visible.add("Tools.VisibleTakeCopy", boost::bind(&enable_object_take_copy)); enable.add("Tools.EnableTakeCopy", boost::bind(&enable_object_take_copy)); view_listener_t::addMenu(new LLToolsEnableSaveToInventory(), "Tools.EnableSaveToInventory"); view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory"); @@ -7850,7 +7848,6 @@ void initialize_menus() view_listener_t::addMenu(new LLSelfStandUp(), "Self.StandUp"); view_listener_t::addMenu(new LLSelfRemoveAllAttachments(), "Self.RemoveAllAttachments"); - visible.add("Self.VisibleStandUp", boost::bind(&enable_standup_self)); enable.add("Self.EnableStandUp", boost::bind(&enable_standup_self)); view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments"); @@ -7873,59 +7870,42 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend"); enable.add("Avatar.EnableFreezeEject", boost::bind(&enable_freeze_eject, _2)); - visible.add("Avatar.EnableFreezeEject", boost::bind(&enable_freeze_eject, _2)); + enable.add("Avatar.EnableFreezeEject", boost::bind(&enable_freeze_eject, _2)); // Object pie menu view_listener_t::addMenu(new LLObjectBuild(), "Object.Build"); commit.add("Object.Touch", boost::bind(&handle_object_touch)); commit.add("Object.SitOrStand", boost::bind(&handle_object_sit_or_stand)); - visible.add("Object.EnableSit", boost::bind(&enable_sit_object)); + enable.add("Object.EnableSit", boost::bind(&enable_sit_object)); commit.add("Object.Delete", boost::bind(&handle_object_delete)); view_listener_t::addMenu(new LLObjectAttachToAvatar(), "Object.AttachToAvatar"); view_listener_t::addMenu(new LLObjectReturn(), "Object.Return"); view_listener_t::addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse"); view_listener_t::addMenu(new LLObjectMute(), "Object.Mute"); - visible.add("Object.VisibleTake", boost::bind(&visible_take_object)); - visible.add("Object.VisibleBuy", boost::bind(&visible_buy_object)); + enable.add("Object.VisibleTake", boost::bind(&visible_take_object)); + enable.add("Object.VisibleBuy", boost::bind(&visible_buy_object)); commit.add("Object.Buy", boost::bind(&handle_buy)); commit.add("Object.Edit", boost::bind(&handle_object_edit)); commit.add("Object.Inspect", boost::bind(&handle_object_inspect)); commit.add("Object.Open", boost::bind(&handle_object_open)); - commit.add("Object.Take", boost::bind(&handle_take)); - enable.add("Object.EnableOpen", boost::bind(&enable_object_open)); - visible.add("Object.VisibleOpen", boost::bind(&enable_object_open)); - enable.add("Object.EnableTouch", boost::bind(&enable_object_touch)); - visible.add("Object.VisibleTouch", boost::bind(&enable_object_touch)); - view_listener_t::addMenu(new LLObjectEnableTouch(), "Object.EnableTouch"); view_listener_t::addMenu(new LLObjectEnableSitOrStand(), "Object.EnableSitOrStand"); - enable.add("Object.EnableDelete", boost::bind(&enable_object_delete)); - visible.add("Object.VisibleDelete", boost::bind(&enable_object_delete)); - enable.add("Object.EnableWear", boost::bind(&object_selected_and_point_valid)); - visible.add("Object.VisibleWear", boost::bind(&object_selected_and_point_valid)); view_listener_t::addMenu(new LLObjectEnableReturn(), "Object.EnableReturn"); view_listener_t::addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse"); enable.add("Avatar.EnableMute", boost::bind(&enable_object_mute)); enable.add("Object.EnableMute", boost::bind(&enable_object_mute)); - visible.add("Object.VisibleMute", boost::bind(&enable_object_mute)); enable.add("Object.EnableBuy", boost::bind(&enable_buy_object)); - /*view_listener_t::addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch"); - view_listener_t::addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch"); - view_listener_t::addMenu(new LLObjectVisibleStandUp(), "Object.VisibleStandUp"); - view_listener_t::addMenu(new LLObjectVisibleSitHere(), "Object.VisibleSitHere"); - view_listener_t::addMenu(new LLObjectVisibleCustomSit(), "Object.VisibleCustomSit");*/ - // Attachment pie menu enable.add("Attachment.Label", boost::bind(&onEnableAttachmentLabel, _1, _2)); view_listener_t::addMenu(new LLAttachmentDrop(), "Attachment.Drop"); @@ -7953,12 +7933,9 @@ void initialize_menus() commit.add("PayObject", boost::bind(&handle_give_money_dialog)); enable.add("EnablePayObject", boost::bind(&enable_pay_object)); - visible.add("VisiblePayObject", boost::bind(&enable_pay_object)); enable.add("EnablePayAvatar", boost::bind(&enable_pay_avatar)); enable.add("EnableEdit", boost::bind(&enable_object_edit)); - visible.add("VisibleBuild", boost::bind(&enable_object_build)); - visible.add("VisibleEdit", boost::bind(&enable_object_edit)); - visible.add("Object.VisibleEdit", boost::bind(&enable_object_edit)); + enable.add("VisibleBuild", boost::bind(&enable_object_build)); view_listener_t::addMenu(new LLFloaterVisible(), "FloaterVisible"); view_listener_t::addMenu(new LLShowSidetrayPanel(), "ShowSidetrayPanel"); diff --git a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml index 04a247fd54..22df02cd7e 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml @@ -13,7 +13,7 @@ <menu_item_call.on_click function="InspectObject.Touch"/> <menu_item_call.on_visible - function="Object.VisibleTouch" /> + function="Object.EnableTouch" /> </menu_item_call> <menu_item_call label="Sit" @@ -31,7 +31,7 @@ <menu_item_call.on_click function="InspectObject.Pay"/> <menu_item_call.on_visible - function="VisiblePayObject" /> + function="EnablePayObject" /> </menu_item_call> <menu_item_call label="Buy" @@ -59,7 +59,7 @@ <menu_item_call.on_click function="InspectObject.TakeFreeCopy"/> <menu_item_call.on_visible - function="Tools.VisibleTakeCopy"/> + function="Tools.EnableTakeCopy"/> </menu_item_call> <menu_item_call label="Open" @@ -68,7 +68,7 @@ <menu_item_call.on_click function="InspectObject.Open"/> <menu_item_call.on_visible - function="Object.VisibleOpen" /> + function="Object.EnableOpen" /> </menu_item_call> <menu_item_call label="Edit" @@ -77,7 +77,7 @@ <menu_item_call.on_click function="Object.Edit" /> <menu_item_call.on_enable - function="Object.VisibleEdit"/> + function="EnableEdit"/> </menu_item_call> <menu_item_call label="Wear" @@ -86,7 +86,7 @@ <menu_item_call.on_click function="Object.AttachToAvatar" /> <menu_item_call.on_visible - function="Object.VisibleWear" /> + function="Object.EnableWear" /> </menu_item_call> <menu_item_call label="Report" @@ -102,7 +102,7 @@ <menu_item_call.on_click function="Object.Mute" /> <menu_item_call.on_visible - function="Object.VisibleMute" /> + function="Object.EnableMute" /> </menu_item_call> <menu_item_call label="Zoom In" @@ -118,7 +118,7 @@ <menu_item_call.on_click function="Object.Delete" /> <menu_item_call.on_visible - function="Object.VisibleDelete" /> + function="Object.EnableDelete" /> </menu_item_call> <menu_item_call label="More Info" diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml index 3d65878cf8..9894a01701 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml @@ -13,7 +13,7 @@ function="Self.StandUp" parameter="" /> <menu_item_call.on_visible - function="Self.VisibleStandUp" /> + function="Self.EnableStandUp" /> </menu_item_call> <menu_item_call label="My Appearance" -- cgit v1.2.3 From f4fd622686e1a7aa915cd1539e409e1a1d9e5457 Mon Sep 17 00:00:00 2001 From: Leyla Farazha <leyla@lindenlab.com> Date: Wed, 8 Dec 2010 11:51:43 -0800 Subject: EXT-2807 Update mini-inspector to include Group Voice Chat moderator controls reviewed by Richard --- indra/newview/llinspectavatar.cpp | 125 +++++++++++++++++++++ .../skins/default/xui/en/inspect_avatar.xml | 44 ++++++-- 2 files changed, 162 insertions(+), 7 deletions(-) diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 435c3a5129..39114d64b4 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -42,10 +42,12 @@ #include "lldateutil.h" #include "llfloaterreporter.h" #include "llfloaterworldmap.h" +#include "llimview.h" #include "llinspect.h" #include "llmutelist.h" #include "llpanelblockedlist.h" #include "llstartup.h" +#include "llspeakers.h" #include "llviewermenu.h" #include "llvoiceclient.h" #include "llviewerobjectlist.h" @@ -99,6 +101,12 @@ private: // Set the volume slider to this user's current client-side volume setting, // hiding/disabling if the user is not nearby. void updateVolumeSlider(); + + // Shows/hides moderator panel depending on voice state + void updateModeratorPanel(); + + // Moderator ability to enable/disable voice chat for avatar + void toggleSelectedVoice(bool enabled); // Button callbacks void onClickAddFriend(); @@ -205,6 +213,8 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd) mCommitCallbackRegistrar.add("InspectAvatar.Report", boost::bind(&LLInspectAvatar::onClickReport, this)); mCommitCallbackRegistrar.add("InspectAvatar.FindOnMap", boost::bind(&LLInspectAvatar::onClickFindOnMap, this)); mCommitCallbackRegistrar.add("InspectAvatar.ZoomIn", boost::bind(&LLInspectAvatar::onClickZoomIn, this)); + mCommitCallbackRegistrar.add("InspectAvatar.DisableVoice", boost::bind(&LLInspectAvatar::toggleSelectedVoice, this, false)); + mCommitCallbackRegistrar.add("InspectAvatar.EnableVoice", boost::bind(&LLInspectAvatar::toggleSelectedVoice, this, true)); mEnableCallbackRegistrar.add("InspectAvatar.VisibleFindOnMap", boost::bind(&LLInspectAvatar::onVisibleFindOnMap, this)); mEnableCallbackRegistrar.add("InspectAvatar.VisibleFreezeEject", boost::bind(&LLInspectAvatar::onVisibleFreezeEject, this)); @@ -277,6 +287,8 @@ void LLInspectAvatar::onOpen(const LLSD& data) requestUpdate(); updateVolumeSlider(); + + updateModeratorPanel(); } // virtual @@ -366,6 +378,119 @@ void LLInspectAvatar::processAvatarData(LLAvatarData* data) mPropertiesRequest = NULL; } +void LLInspectAvatar::updateModeratorPanel() +{ + bool enable_moderator_panel = false; + + if (LLVoiceChannel::getCurrentVoiceChannel()) + { + LLUUID session_id = LLVoiceChannel::getCurrentVoiceChannel()->getSessionID(); + + if (session_id != LLUUID::null) + { + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id); + + if (speaker_mgr) + { + LLPointer<LLSpeaker> self_speakerp = speaker_mgr->findSpeaker(gAgent.getID()); + LLPointer<LLSpeaker> selected_speakerp = speaker_mgr->findSpeaker(mAvatarID); + + if(speaker_mgr->isVoiceActive() && selected_speakerp && + ((self_speakerp && self_speakerp->mIsModerator) || gAgent.isGodlike())) + { + getChild<LLUICtrl>("enable_voice")->setVisible(selected_speakerp->mModeratorMutedVoice); + getChild<LLUICtrl>("disable_voice")->setVisible(!selected_speakerp->mModeratorMutedVoice); + + enable_moderator_panel = true; + } + } + } + } + + if (enable_moderator_panel) + { + if (!getChild<LLUICtrl>("moderator_panel")->getVisible()) + { + getChild<LLUICtrl>("moderator_panel")->setVisible(true); + // stretch the floater so it can accommodate the moderator panel + reshape(getRect().getWidth(), getRect().getHeight() + getChild<LLUICtrl>("moderator_panel")->getRect().getHeight()); + } + } + else if (getChild<LLUICtrl>("moderator_panel")->getVisible()) + { + getChild<LLUICtrl>("moderator_panel")->setVisible(false); + // shrink the inspector floater back to original size + reshape(getRect().getWidth(), getRect().getHeight() - getChild<LLUICtrl>("moderator_panel")->getRect().getHeight()); + } +} + +void LLInspectAvatar::toggleSelectedVoice(bool enabled) +{ + LLUUID session_id = LLVoiceChannel::getCurrentVoiceChannel()->getSessionID(); + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id); + + if (speaker_mgr) + { + if (!gAgent.getRegion()) + return; + + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "mute update"; + data["session-id"] = session_id; + data["params"] = LLSD::emptyMap(); + data["params"]["agent_id"] = mAvatarID; + data["params"]["mute_info"] = LLSD::emptyMap(); + // ctrl value represents ability to type, so invert + data["params"]["mute_info"]["voice"] = !enabled; + + class MuteVoiceResponder : public LLHTTPClient::Responder + { + public: + MuteVoiceResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + + if ( gIMMgr ) + { + //403 == you're not a mod + //should be disabled if you're not a moderator + if ( 403 == status ) + { + gIMMgr->showSessionEventError( + "mute", + "not_a_moderator", + mSessionID); + } + else + { + gIMMgr->showSessionEventError( + "mute", + "generic", + mSessionID); + } + } + } + + private: + LLUUID mSessionID; + }; + + LLHTTPClient::post( + url, + data, + new MuteVoiceResponder(speaker_mgr->getSessionID())); + } + + closeFloater(); + +} + void LLInspectAvatar::updateVolumeSlider() { // By convention, we only display and toggle voice mutes, not all mutes diff --git a/indra/newview/skins/default/xui/en/inspect_avatar.xml b/indra/newview/skins/default/xui/en/inspect_avatar.xml index 8349f594d9..996d0f1b72 100644 --- a/indra/newview/skins/default/xui/en/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/en/inspect_avatar.xml @@ -33,7 +33,7 @@ [SL_PROFILE] </string> <text - follows="all" + follows="top|left" font="SansSerifLarge" height="16" left="8" @@ -44,7 +44,7 @@ value="Grumpity ProductEngine" width="175" /> <text - follows="all" + follows="top|left" height="16" left="8" name="user_subtitle" @@ -76,7 +76,7 @@ value="0.5" width="195" /> <button - follows="all" + follows="top|left" height="16" image_disabled="Audio_Off" image_disabled_selected="AudioMute_Off" @@ -89,7 +89,7 @@ name="mute_btn" width="16" /> <avatar_icon - follows="all" + follows="top|left" height="38" right="-10" bevel_style="in" @@ -102,7 +102,7 @@ llinspectavatar.cpp makes visible the most likely default action --> <button - follows="bottom|left" + follows="top|left" height="20" label="Add Friend" left="8" @@ -110,7 +110,7 @@ name="add_friend_btn" width="90" /> <button - follows="bottom|left" + follows="top|left" height="20" label="IM" left_delta="0" @@ -129,7 +129,8 @@ tab_stop="false" width="80" /> <!-- gear buttons here --> - <menu_button + <menu_button + follows="top|left" height="20" layout="topleft" image_overlay="OptionsMenu_Off" @@ -147,4 +148,33 @@ right="-5" top_delta="0" width="35" /> + <panel + follows="top|left" + top="148" + left="0" + height="60" + width="228" + visible="false" + background_visible="true" + name="moderator_panel" + background_opaque="true" + bg_opaque_color="MouseGray"> + <button + name="disable_voice" + label="Disable Voice" + top="20" + width="95" + height="20" + left="10" + commit_callback.function="InspectAvatar.DisableVoice"/> + <button + name="enable_voice" + label="Enable Voice" + top="20" + width="95" + height="20" + left="10" + visible="false" + commit_callback.function="InspectAvatar.EnableVoice"/> + </panel> </floater> -- cgit v1.2.3 From 52dd4daadaeaad69c17771ecc1dfdf5de6a2d69f Mon Sep 17 00:00:00 2001 From: Leyla Farazha <leyla@lindenlab.com> Date: Wed, 8 Dec 2010 11:56:44 -0800 Subject: adding notes about visible / enable callback registries being merged --- indra/llui/lluictrl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index 983700065d..b9a4f61e15 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -80,6 +80,7 @@ public: Optional<commit_callback_t> function; }; + // also used for visible callbacks struct EnableCallbackParam : public LLInitParam::Block<EnableCallbackParam, CallbackParam > { Optional<enable_callback_t> function; @@ -260,6 +261,7 @@ public: {}; class CommitCallbackRegistry : public CallbackRegistry<commit_callback_t, CommitCallbackRegistry>{}; + // the enable callback registry is also used for visiblity callbacks class EnableCallbackRegistry : public CallbackRegistry<enable_callback_t, EnableCallbackRegistry>{}; protected: -- cgit v1.2.3 From 7193e97b982d69de75ee6bb5769f5e53ccfb517d Mon Sep 17 00:00:00 2001 From: James Cook <james@lindenlab.com> Date: Wed, 9 Dec 2009 13:14:04 -0800 Subject: Fix line endings. --- indra/newview/llviewermenu.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 8090096944..78322dda75 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2710,12 +2710,12 @@ bool enable_object_mute() bool is_self = avatar->isSelf(); return !is_linden && !is_self; } - else - { - // Just a regular object - return LLSelectMgr::getInstance()->getSelection()-> - contains( object, SELECT_ALL_TES ); - } + else + { + // Just a regular object + return LLSelectMgr::getInstance()->getSelection()-> + contains( object, SELECT_ALL_TES ); + } } class LLObjectMute : public view_listener_t -- cgit v1.2.3 From 2af183c51d8911a7242b838394863e2606ed3fe7 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Wed, 9 Dec 2009 13:20:25 -0800 Subject: remove LL_PATH_BROWSER_PROFILE it really has no point now - it's not used by the viewer, and the webkit plugin's private space should be opaque to the viewer. --- indra/llvfs/lldir.cpp | 6 ------ indra/llvfs/lldir.h | 4 +--- indra/llvfs/lldir_linux.cpp | 9 --------- indra/llvfs/lldir_solaris.cpp | 9 --------- indra/llvfs/lldir_win32.cpp | 8 -------- 5 files changed, 1 insertion(+), 35 deletions(-) diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 7d1ccf5580..b2b17fdd56 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -394,12 +394,6 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd prefix += "local_assets"; break; - case LL_PATH_BROWSER_PROFILE: - prefix = getOSUserAppDir(); - prefix += mDirDelimiter; - prefix += "browser_profile"; - break; - case LL_PATH_EXECUTABLE: prefix = getExecutableDir(); break; diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index bf4209390f..206e3223e3 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -38,7 +38,7 @@ #define MAX_PATH MAXPATHLEN #endif -// these numbers *may* get serialized, so we need to be explicit +// these numbers *may* get serialized (really??), so we need to be explicit typedef enum ELLPath { LL_PATH_NONE = 0, @@ -54,10 +54,8 @@ typedef enum ELLPath LL_PATH_TOP_SKIN = 10, LL_PATH_CHAT_LOGS = 11, LL_PATH_PER_ACCOUNT_CHAT_LOGS = 12, - LL_PATH_BROWSER_PROFILE = 13, LL_PATH_USER_SKIN = 14, LL_PATH_LOCAL_ASSETS = 15, -// LL_PATH_HTML = 16, LL_PATH_EXECUTABLE = 16, LL_PATH_DEFAULT_SKIN = 17, LL_PATH_FONTS = 18, diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index 495e06e514..ee902d1de7 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -225,15 +225,6 @@ void LLDir_Linux::initAppDirs(const std::string &app_name, } } - res = LLFile::mkdir(getExpandedFilename(LL_PATH_BROWSER_PROFILE,"")); - if (res == -1) - { - if (errno != EEXIST) - { - llwarns << "Couldn't create LL_PATH_BROWSER_PROFILE dir " << getExpandedFilename(LL_PATH_BROWSER_PROFILE,"") << llendl; - } - } - mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem"); } diff --git a/indra/llvfs/lldir_solaris.cpp b/indra/llvfs/lldir_solaris.cpp index 561c011db0..a8fad8e5bd 100644 --- a/indra/llvfs/lldir_solaris.cpp +++ b/indra/llvfs/lldir_solaris.cpp @@ -244,15 +244,6 @@ void LLDir_Solaris::initAppDirs(const std::string &app_name, } } - res = LLFile::mkdir(getExpandedFilename(LL_PATH_BROWSER_PROFILE,"")); - if (res == -1) - { - if (errno != EEXIST) - { - llwarns << "Couldn't create LL_PATH_BROWSER_PROFILE dir " << getExpandedFilename(LL_PATH_BROWSER_PROFILE,"") << llendl; - } - } - mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem"); } diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp index b5754be6d6..4eb10c842b 100644 --- a/indra/llvfs/lldir_win32.cpp +++ b/indra/llvfs/lldir_win32.cpp @@ -212,14 +212,6 @@ void LLDir_Win32::initAppDirs(const std::string &app_name, } } - res = LLFile::mkdir(getExpandedFilename(LL_PATH_BROWSER_PROFILE,"")); - if (res == -1) - { - if (errno != EEXIST) - { - llwarns << "Couldn't create LL_PATH_BROWSER_PROFILE dir " << getExpandedFilename(LL_PATH_BROWSER_PROFILE,"") << llendl; - } - } res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SKIN,"")); if (res == -1) { -- cgit v1.2.3 From dc8365ff00c5ae33f31d779efa23f7872ec368a7 Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" <tulla@lindenlab.com> Date: Wed, 9 Dec 2009 16:27:39 -0500 Subject: Fix for EXT-2703 & EXT-2708 - save texture as issues Added save as to texture preview floater. Fixed behavior of save as (was only working for textures, not snapshots). Removed advanced menu entry for save texture as (refused to work after multiple implementations). --- indra/newview/llpanelmaininventory.cpp | 46 +++++++++++++--------- indra/newview/llpanelmaininventory.h | 2 + indra/newview/llpreviewtexture.cpp | 9 +++++ indra/newview/llpreviewtexture.h | 3 +- indra/newview/llviewermenufile.cpp | 26 +----------- .../default/xui/en/floater_preview_texture.xml | 9 +++++ indra/newview/skins/default/xui/en/menu_viewer.xml | 9 ----- 7 files changed, 52 insertions(+), 52 deletions(-) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 74c1420cf3..4cebe68152 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -863,7 +863,6 @@ void LLPanelMainInventory::initListCommandsHandlers() mEnableCallbackRegistrar.add("Inventory.GearDefault.Enable", boost::bind(&LLPanelMainInventory::isActionEnabled, this, _2)); mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - } void LLPanelMainInventory::updateListCommands() @@ -909,6 +908,22 @@ void LLPanelMainInventory::onClipboardAction(const LLSD& userdata) getActivePanel()->getRootFolder()->doToSelected(getActivePanel()->getModel(),command_name); } +void LLPanelMainInventory::saveTexture(const LLSD& userdata) +{ + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (!current_item) + { + return; + } + + const LLUUID& item_id = current_item->getListener()->getUUID(); + LLPreviewTexture* preview_texture = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(item_id), TAKE_FOCUS_YES); + if (preview_texture) + { + preview_texture->openToSave(); + } +} + void LLPanelMainInventory::onCustomAction(const LLSD& userdata) { if (!isActionEnabled(userdata)) @@ -953,19 +968,19 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } if (command_name == "save_texture") { - LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); - if (!current_item) - { - return; - } + saveTexture(userdata); + } +} - const LLUUID& item_id = current_item->getListener()->getUUID(); - LLPreviewTexture* preview_texture = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(item_id), TAKE_FOCUS_YES); - if (preview_texture) - { - preview_texture->openToSave(); - } +bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata) +{ + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (current_item) + { + LLInventoryType::EType curr_type = current_item->getListener()->getInventoryType(); + return (curr_type == LLInventoryType::IT_TEXTURE || curr_type == LLInventoryType::IT_SNAPSHOT); } + return false; } BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) @@ -994,12 +1009,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) } if (command_name == "save_texture") { - LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); - if (current_item) - { - return (current_item->getListener()->getInventoryType() == LLInventoryType::IT_TEXTURE); - } - return FALSE; + return isSaveTextureEnabled(userdata); } return TRUE; } diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index ae78d3bec8..92443df369 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -110,6 +110,8 @@ protected: void doCreate(const LLSD& userdata); void resetFilters(); void setSortBy(const LLSD& userdata); + void saveTexture(const LLSD& userdata); + bool isSaveTextureEnabled(const LLSD& userdata); private: LLFloaterInventoryFinder* getFinder(); diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 698f6152b4..8fa147f201 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -145,6 +145,8 @@ BOOL LLPreviewTexture::postBuild() childSetVisible("Discard", false); } + childSetAction("save_tex_btn", LLPreviewTexture::onSaveAsBtn, this); + if (!mCopyToInv) { const LLInventoryItem* item = getItem(); @@ -164,6 +166,13 @@ BOOL LLPreviewTexture::postBuild() return LLPreview::postBuild(); } +// static +void LLPreviewTexture::onSaveAsBtn(void* data) +{ + LLPreviewTexture* self = (LLPreviewTexture*)data; + self->saveAs(); +} + void LLPreviewTexture::draw() { if (mUpdateDimensions) diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index 9b3c91d831..980aecee6d 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -58,7 +58,6 @@ public: virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); virtual void onFocusReceived(); - static void saveToFile(void* userdata); static void onFileLoadedForSave( BOOL success, LLViewerFetchedTexture *src_vi, @@ -68,6 +67,8 @@ public: BOOL final, void* userdata ); void openToSave(); + + static void onSaveAsBtn(void* data); protected: void init(); /* virtual */ BOOL postBuild(); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 4b0dc8f668..a1c3806b27 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -71,15 +71,6 @@ // system libraries #include <boost/tokenizer.hpp> -class LLFileEnableSaveAs : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - bool new_value = gFloaterView->getFrontmost() && gFloaterView->getFrontmost()->canSaveAs(); - return new_value; - } -}; - class LLFileEnableUpload : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -386,19 +377,6 @@ class LLFileCloseAllWindows : public view_listener_t } }; -class LLFileSaveTexture : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLFloater* top = gFloaterView->getFrontmost(); - if (top) - { - top->saveAs(); - } - return true; - } -}; - class LLFileTakeSnapshotToDisk : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -1050,10 +1028,10 @@ void init_menu_file() view_listener_t::addCommit(new LLFileCloseAllWindows(), "File.CloseAllWindows"); view_listener_t::addEnable(new LLFileEnableCloseWindow(), "File.EnableCloseWindow"); view_listener_t::addEnable(new LLFileEnableCloseAllWindows(), "File.EnableCloseAllWindows"); - view_listener_t::addCommit(new LLFileSaveTexture(), "File.SaveTexture"); view_listener_t::addCommit(new LLFileTakeSnapshotToDisk(), "File.TakeSnapshotToDisk"); view_listener_t::addCommit(new LLFileQuit(), "File.Quit"); view_listener_t::addEnable(new LLFileEnableUpload(), "File.EnableUpload"); - view_listener_t::addEnable(new LLFileEnableSaveAs(), "File.EnableSaveAs"); + + // "File.SaveTexture" moved to llpanelmaininventory so that it can be properly handled. } diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml index 52a19ac6b3..054f3be70a 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml @@ -60,6 +60,15 @@ left_pad="5" name="Discard" top_delta="0" + width="100" /> + <button + follows="left|bottom" + height="22" + label="Save As" + layout="topleft" + left_pad="5" + name="save_tex_btn" + top_delta="0" width="100" /> <text type="string" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index ae8a1599a9..07e509d993 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1189,15 +1189,6 @@ function="ToggleControl" parameter="CompressSnapshotsToDisk" /> </menu_item_check> - <menu_item_call - label="Save Texture As" - layout="topleft" - name="Save Texture As"> - <menu_item_call.on_click - function="File.SaveTexture" /> - <menu_item_call.on_enable - function="File.EnableSaveAs" /> - </menu_item_call> <menu_item_separator layout="topleft" /> <menu -- cgit v1.2.3 From 3b36b1fd2acbafd30242ad63e1c0c8d2038d8fdf Mon Sep 17 00:00:00 2001 From: Lis Pardi <lis@lindenlab.com> Date: Wed, 9 Dec 2009 16:35:05 -0500 Subject: ext-2976 change "alerts" to read "notifications" --- indra/newview/skins/default/xui/en/floater_preferences.xml | 2 +- indra/newview/skins/default/xui/en/notifications.xml | 6 +++--- indra/newview/skins/default/xui/en/panel_preferences_alerts.xml | 4 ++-- indra/newview/skins/default/xui/en/strings.xml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index d182cdc6bb..15655a920e 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -86,7 +86,7 @@ <panel class="panel_preference" filename="panel_preferences_alerts.xml" - label="Alerts" + label="Notifications" layout="topleft" help_topic="preferences_msgs_tab" name="msgs" /> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index a07b23d0c3..3659db230c 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -100,11 +100,11 @@ functor="GenericAcknowledge" icon="alertmodal.tga" name="MissingAlert" - label="Unknown Alert Message" + label="Unknown Notification Message" type="alertmodal"> -Your version of [APP_NAME] does not know how to display the alert it just received. Please verify that you have the latest Viewer installed. +Your version of [APP_NAME] does not know how to display the notification it just received. Please verify that you have the latest Viewer installed. -Error details: The alert called '[_NAME]' was not found in notifications.xml. +Error details: The notification called '[_NAME]' was not found in notifications.xml. <usetemplate name="okbutton" yestext="OK"/> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml index d4f4053dad..18d0f8acab 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml @@ -50,7 +50,7 @@ name="show_label" top_pad="14" width="450"> - Always show these alerts: + Always show these notifications: </text> <scroll_list follows="top|left" @@ -107,7 +107,7 @@ name="dont_show_label" top_pad="10" width="450"> - Never show these alerts: + Never show these notifications: </text> <scroll_list follows="top|left" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 7fafa63e57..34ad6ab797 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2215,7 +2215,7 @@ If this message persists, restart your computer. [APP_NAME] appears to have frozen or crashed on the previous run. Would you like to send a crash report? </string> - <string name="MBAlert">Alert</string> + <string name="MBAlert">Notification</string> <string name="MBNoDirectX"> [APP_NAME] is unable to detect DirectX 9.0b or greater. [APP_NAME] uses DirectX to detect hardware and/or outdated drivers that can cause stability problems, poor performance and crashes. While you can run [APP_NAME] without it, we highly recommend running with DirectX 9.0b. -- cgit v1.2.3 From 204ae550d8b70cdae29f5d4504cc35406682c336 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Wed, 9 Dec 2009 13:59:51 -0800 Subject: blindly fix-up llmediaplugintest.cpp with respect to the recent API change. --- indra/test_apps/llplugintest/llmediaplugintest.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp index 27cb52a507..c6df77f9a4 100644 --- a/indra/test_apps/llplugintest/llmediaplugintest.cpp +++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp @@ -1529,7 +1529,17 @@ void LLMediaPluginTest::addMediaPanel( std::string url ) #elif LL_WINDOWS std::string launcher_name( "SLPlugin.exe" ); #endif - media_source->init( launcher_name, plugin_name ); + + // for this test app, use the cwd as the user data path (ugh). + char cwd[ FILENAME_MAX ]; + if (NULL == getcwd( cwd, FILENAME_MAX - 1 )) + { + std::cerr << "Couldn't get cwd - probably too long - failing to init." << llendl; + return; + } + std::string user_data_path = std::string( cwd ) + "/"; + + media_source->init( launcher_name, plugin_name, false, user_data_path ); media_source->setDisableTimeout(mDisableTimeout); // make a new panel and save parameters -- cgit v1.2.3 From 2a1e3b48f9bb5be755e5ebf03e0e561151f2698d Mon Sep 17 00:00:00 2001 From: Erica <erica@lindenlab.com> Date: Wed, 9 Dec 2009 14:34:26 -0800 Subject: Crash fix due to bad duplicated attributes in xui --- indra/newview/skins/default/xui/en/panel_main_inventory.xml | 2 -- indra/newview/skins/default/xui/en/sidepanel_appearance.xml | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 812801abc9..9990215dfd 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -31,10 +31,8 @@ halign="center" layout="topleft" left_delta="-4" name="inventory filter tabs" - tab_min_width="70" tab_height="30" tab_position="top" - tab_height="30" tab_min_width="100" top_pad="4" width="305"> diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index c457dcb526..3dac1a9614 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -119,8 +119,8 @@ left="0" image_disabled="AddItem_Disabled" layout="topleft" left_pad="5" - name="add_btn" - tool_tip="Add new item" + name="newlook_btn" + tool_tip="Add new outfit" width="18" /> <dnd_button follows="bottom|left" @@ -150,7 +150,6 @@ left="0" layout="topleft" left_pad="5" right="-10" - name="newlook_btn" width="100" />--> <panel class="panel_look_info" -- cgit v1.2.3 From 05e0d9d24ac4ec1c0b18326e97a0c9ab705f5948 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Wed, 9 Dec 2009 14:36:45 -0800 Subject: Re-disable a very spewy debug spew in the webkit plugin. Mea culpa. --- indra/media_plugins/webkit/media_plugin_webkit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 1ead310754..276ad39dfb 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -577,7 +577,7 @@ MediaPluginWebKit::~MediaPluginWebKit() void MediaPluginWebKit::receiveMessage(const char *message_string) { - std::cerr << "MediaPluginWebKit::receiveMessage: received message: \"" << message_string << "\"" << std::endl; +// std::cerr << "MediaPluginWebKit::receiveMessage: received message: \"" << message_string << "\"" << std::endl; LLPluginMessage message_in; if(message_in.parse(message_string) >= 0) -- cgit v1.2.3 From 9b0825be5ccba5dd35dce2421804a382ddead67f Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Wed, 9 Dec 2009 14:48:36 -0800 Subject: get llmediaplugintest compiling on win32, dumbly. --- indra/test_apps/llplugintest/llmediaplugintest.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp index c6df77f9a4..674520bb87 100644 --- a/indra/test_apps/llplugintest/llmediaplugintest.cpp +++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp @@ -1531,6 +1531,9 @@ void LLMediaPluginTest::addMediaPanel( std::string url ) #endif // for this test app, use the cwd as the user data path (ugh). +#if LL_WINDOWS + std::string user_data_path = ".\\"; +#else char cwd[ FILENAME_MAX ]; if (NULL == getcwd( cwd, FILENAME_MAX - 1 )) { @@ -1538,6 +1541,7 @@ void LLMediaPluginTest::addMediaPanel( std::string url ) return; } std::string user_data_path = std::string( cwd ) + "/"; +#endif media_source->init( launcher_name, plugin_name, false, user_data_path ); media_source->setDisableTimeout(mDisableTimeout); -- cgit v1.2.3 From 9abe779c8a06696ecc6b00313a443fabc22cf234 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Wed, 9 Dec 2009 14:55:45 -0800 Subject: last blind fixup for llmediaplugintest. --- indra/test_apps/llplugintest/llmediaplugintest.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp index 674520bb87..30d338292e 100644 --- a/indra/test_apps/llplugintest/llmediaplugintest.cpp +++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp @@ -1766,7 +1766,21 @@ void LLMediaPluginTest::replaceMediaPanel( mediaPanel* panel, std::string url ) #elif LL_WINDOWS std::string launcher_name( "SLPlugin.exe" ); #endif - media_source->init( launcher_name, plugin_name ); + + // for this test app, use the cwd as the user data path (ugh). +#if LL_WINDOWS + std::string user_data_path = ".\\"; +#else + char cwd[ FILENAME_MAX ]; + if (NULL == getcwd( cwd, FILENAME_MAX - 1 )) + { + std::cerr << "Couldn't get cwd - probably too long - failing to init." << llendl; + return; + } + std::string user_data_path = std::string( cwd ) + "/"; +#endif + + media_source->init( launcher_name, plugin_name, false, user_data_path ); media_source->setDisableTimeout(mDisableTimeout); // make a new panel and save parameters -- cgit v1.2.3 From 522463108b61a740f64908242d347da5a3cccf62 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Wed, 9 Dec 2009 19:12:05 -0500 Subject: For EXT-2858: Determine gear menu / right-click menu choices for AppearanceSP --HG-- branch : avatar-pipeline --- indra/newview/llinventorybridge.cpp | 11 ++++++++++- indra/newview/skins/default/xui/en/menu_inventory.xml | 8 ++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ea47013781..d9a5f1837f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -67,6 +67,8 @@ using namespace LLOldEvents; +bool isInOutfitsSidePanel(LLPanel *panel); + // Helpers // bug in busy count inc/dec right now, logic is complex... do we really need it? void inc_busy_count() @@ -566,8 +568,15 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } items.push_back(std::string("Paste Separator")); + + if (obj && obj->getIsLinkType()) + { + items.push_back(std::string("Remove")); + } + items.push_back(std::string("Delete")); - if (!isItemRemovable()) + const bool is_sidepanel = isInOutfitsSidePanel(mInventoryPanel.get()); + if ((obj && obj->getIsLinkType() && is_sidepanel) || !isItemRemovable()) { disabled_items.push_back(std::string("Delete")); } diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index a36bfb8ec1..7e8d259cd0 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -450,6 +450,14 @@ </menu_item_call> <menu_item_separator layout="topleft" /> + <menu_item_call + label="Remove" + layout="topleft" + name="Remove"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="delete" /> + </menu_item_call> <menu_item_call label="Delete" layout="topleft" -- cgit v1.2.3 From ac4a6c93f08a987303dc049b5d8a1ea2342c6397 Mon Sep 17 00:00:00 2001 From: Loren Shih <seraph@lindenlab.com> Date: Wed, 9 Dec 2009 19:37:58 -0500 Subject: EXT-3303 : Crash on select object inventory root folder and hover Build menu Unsafe cast (which has existed since viewer1.23) was causing crash. --- indra/newview/llpanelobjectinventory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 9d38dab26e..43366ef814 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -157,7 +157,7 @@ LLInventoryItem* LLTaskInvFVBridge::findItem() const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { - return (LLInventoryItem*)(object->getInventoryObject(mUUID)); + return dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mUUID)); } return NULL; } @@ -712,6 +712,7 @@ public: virtual LLUIImagePtr getIcon() const; virtual const std::string& getDisplayName() const { return getName(); } virtual BOOL isItemRenameable() const; + // virtual BOOL isItemCopyable() const { return FALSE; } virtual BOOL renameItem(const std::string& new_name); virtual BOOL isItemRemovable(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); -- cgit v1.2.3 From 9f68163179cda136a696f8e2d4d6b39fbf588bdb Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" <palange@lindenlab.com> Date: Wed, 9 Dec 2009 16:38:37 -0800 Subject: EXT-2896 Fixed poor handling of login error. Added more cleanup to the reset_login call. Added new settings to control UseCircuitCode message timeouts to allow testing of this failure. Reviewed by Richard --- indra/newview/app_settings/settings.xml | 23 ++++++++++++++++++++++- indra/newview/llstartup.cpp | 9 +++++---- indra/newview/llworld.cpp | 1 + 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c43032a3cf..80a3977d02 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4974,7 +4974,6 @@ <key>Value</key> <integer>1</integer> </map> - <key>StartUpToastLifeTime</key> <key>NearbyToastFadingTime</key> <map> <key>Comment</key> @@ -9911,6 +9910,28 @@ <key>Value</key> <integer>0</integer> </map> + <key>UseCircuitCodeMaxRetries</key> + <map> + <key>Comment</key> + <string>Max timeout count for the initial UseCircuitCode message</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <real>3</real> + </map> + <key>UseCircuitCodeTimeout</key> + <map> + <key>Comment</key> + <string>Timeout duration in seconds for the initial UseCircuitCode message</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>5.0</real> + </map> <key>UseDebugLogin</key> <map> <key>Comment</key> diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index be0c92a76d..697a530d33 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -367,8 +367,6 @@ bool idle_startup() LLMemType mt1(LLMemType::MTYPE_STARTUP); const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay"); - const F32 TIMEOUT_SECONDS = 5.f; - const S32 MAX_TIMEOUT_COUNT = 3; static LLTimer timeout; static S32 timeout_count = 0; @@ -1436,9 +1434,9 @@ bool idle_startup() msg->addUUIDFast(_PREHASH_ID, gAgent.getID()); msg->sendReliable( gFirstSim, - MAX_TIMEOUT_COUNT, + gSavedSettings.getS32("UseCircuitCodeMaxRetries"), FALSE, - TIMEOUT_SECONDS, + gSavedSettings.getF32("UseCircuitCodeTimeout"), use_circuit_callback, NULL); @@ -2734,6 +2732,9 @@ void LLStartUp::setStartupState( EStartupState state ) void reset_login() { + gAgent.cleanup(); + LLWorld::getInstance()->destroyClass(); + LLStartUp::setStartupState( STATE_LOGIN_SHOW ); if ( gViewerWindow ) diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 5c6fc2cf21..118d7f8d08 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -118,6 +118,7 @@ LLWorld::LLWorld() : void LLWorld::destroyClass() { + mHoleWaterObjects.clear(); gObjectList.destroy(); for(region_list_t::iterator region_it = mRegionList.begin(); region_it != mRegionList.end(); ) { -- cgit v1.2.3 From 272bb744af3dd942369f4c378db316e182a1ab87 Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" <tulla@lindenlab.com> Date: Wed, 9 Dec 2009 20:24:37 -0500 Subject: Fix for save texture functionality no longer respecting permissions --- indra/newview/llpanelmaininventory.cpp | 28 ++++++++++++++++++++-- indra/newview/llpreviewtexture.cpp | 1 + .../default/xui/en/floater_preview_texture.xml | 4 ++-- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 8f71c6f1ee..9d73fbf21a 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llpanelmaininventory.h" +#include "llagent.h" #include "lldndbutton.h" #include "llfilepicker.h" #include "llfloaterinventory.h" @@ -1017,8 +1018,31 @@ bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata) LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); if (current_item) { - LLInventoryType::EType curr_type = current_item->getListener()->getInventoryType(); - return (curr_type == LLInventoryType::IT_TEXTURE || curr_type == LLInventoryType::IT_SNAPSHOT); + bool can_save = false; + LLInventoryItem *item = gInventory.getItem(current_item->getListener()->getUUID()); + if(item) + { + const LLPermissions& perm = item->getPermissions(); + U32 mask = PERM_NONE; + if(perm.getOwner() == gAgent.getID()) + { + mask = perm.getMaskBase(); + } + else if(gAgent.isInGroup(perm.getGroup())) + { + mask = perm.getMaskGroup(); + } + else + { + mask = perm.getMaskEveryone(); + } + if((mask & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) + { + can_save = true; + } + LLInventoryType::EType curr_type = current_item->getListener()->getInventoryType(); + return can_save && (curr_type == LLInventoryType::IT_TEXTURE || curr_type == LLInventoryType::IT_SNAPSHOT); + } } return false; } diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 8fa147f201..86475fe2dc 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -146,6 +146,7 @@ BOOL LLPreviewTexture::postBuild() } childSetAction("save_tex_btn", LLPreviewTexture::onSaveAsBtn, this); + childSetVisible("save_tex_btn", canSaveAs()); if (!mCopyToInv) { diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml index 054f3be70a..602a18ea56 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml @@ -61,7 +61,7 @@ name="Discard" top_delta="0" width="100" /> - <button + <button follows="left|bottom" height="22" label="Save As" @@ -70,7 +70,7 @@ name="save_tex_btn" top_delta="0" width="100" /> - <text + <text type="string" length="1" follows="left|bottom" -- cgit v1.2.3 From 562d343c47570731664b34507359c823cfcbd634 Mon Sep 17 00:00:00 2001 From: Steve Bennetts <steve@lindenlab.com> Date: Wed, 9 Dec 2009 18:18:01 -0800 Subject: EXT-3298 world map does not load simulator textures Forgot to add LLCurl update call to non threaded LLTextureFetch update. --- indra/newview/lltexturefetch.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index ef49d7f057..67007629c0 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1630,6 +1630,16 @@ S32 LLTextureFetch::update(U32 max_time_ms) { sendRequestListToSimulators(); } + + if (!mThreaded) + { + // Update Curl on same thread as mCurlGetRequest was constructed + S32 processed = mCurlGetRequest->process(); + if (processed > 0) + { + lldebugs << "processed: " << processed << " messages." << llendl; + } + } return res; } -- cgit v1.2.3 From 02498f1963ca535a318384ce705f7c8e0bd86a23 Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Thu, 10 Dec 2009 12:22:55 +0200 Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and text) to the Voice Control Panel (Active Speakers List)) -- Added menu items, disabling them not in the group call -- Also refactored Mute Text functionality to be used in Block/Unblock menu item (For EXT-2863) --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 76 ++++++++++++++++++++-- indra/newview/llparticipantlist.h | 6 ++ .../skins/default/xui/en/menu_participant_list.xml | 47 +++++++++++++ 3 files changed, 124 insertions(+), 5 deletions(-) diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 0aed123191..48a7a32a3b 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -324,6 +324,8 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() registrar.add("ParticipantList.ToggleAllowTextChat", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleAllowTextChat, this, _2)); registrar.add("ParticipantList.ToggleMuteText", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleMuteText, this, _2)); + registrar.add("ParticipantList.ModerateVoice", boost::bind(&LLParticipantList::LLParticipantListMenu::moderateVoice, this, _2)); + enable_registrar.add("ParticipantList.EnableItem", boost::bind(&LLParticipantList::LLParticipantListMenu::enableContextMenuItem, this, _2)); enable_registrar.add("ParticipantList.CheckItem", boost::bind(&LLParticipantList::LLParticipantListMenu::checkContextMenuItem, this, _2)); @@ -332,6 +334,28 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() "menu_participant_list.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); } +void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y) +{ + LLPanelPeopleMenus::ContextMenu::show(spawning_view, uuids, x, y); + + if (uuids.size() == 0) return; + + const LLUUID speaker_id = mUUIDs.front(); + BOOL is_muted = LLMuteList::getInstance()->isMuted(speaker_id, LLMute::flagVoiceChat); + + if (is_muted) + { + LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceMuteSelected", false); + LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceMuteOthers", false); + } + else + { + LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteSelected", false); + LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteOthers", false); + } + +} + void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& userdata) { const LLUUID speaker_id = mUUIDs.front(); @@ -389,10 +413,10 @@ void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& u new MuteTextResponder(mParent.mSpeakerMgr->getSessionID())); } -void LLParticipantList::LLParticipantListMenu::toggleMuteText(const LLSD& userdata) +void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata, U32 flags) { const LLUUID speaker_id = mUUIDs.front(); - BOOL is_muted = LLMuteList::getInstance()->isMuted(speaker_id, LLMute::flagTextChat); + BOOL is_muted = LLMuteList::getInstance()->isMuted(speaker_id, flags); std::string name; //fill in name using voice client's copy of name cache @@ -408,12 +432,54 @@ void LLParticipantList::LLParticipantListMenu::toggleMuteText(const LLSD& userda if (!is_muted) { - LLMuteList::getInstance()->add(mute, LLMute::flagTextChat); + LLMuteList::getInstance()->add(mute, flags); } else { - LLMuteList::getInstance()->remove(mute, LLMute::flagTextChat); + LLMuteList::getInstance()->remove(mute, flags); + } +} + +void LLParticipantList::LLParticipantListMenu::toggleMuteText(const LLSD& userdata) +{ + toggleMute(userdata, LLMute::flagTextChat); +} + +void LLParticipantList::LLParticipantListMenu::toggleMuteVoice(const LLSD& userdata) +{ + toggleMute(userdata, LLMute::flagVoiceChat); +} + +void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdata) +{ + +} +void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLSD& userdata) +{ + LLSpeakerMgr::speaker_list_t speakers; + mParent.mSpeakerMgr->getSpeakerList(&speakers, true); + + const LLUUID& excluded_avatar_id = mUUIDs.front(); + bool should_mute = userdata.asString() == "mute"; + for (LLSpeakerMgr::speaker_list_t::iterator iter = speakers.begin(); + iter != speakers.end(); ++iter) + { + LLSpeaker* speakerp = (*iter).get(); + LLUUID speaker_id = speakerp->mID; + if (excluded_avatar_id == speaker_id) continue; + + LLMute mute(speaker_id, speakerp->mDisplayName, speakerp->mType == LLSpeaker::SPEAKER_AGENT ? LLMute::AGENT : LLMute::OBJECT); + + if (should_mute) + { + LLMuteList::getInstance()->add(mute, LLMute::flagVoiceChat); + } + else + { + LLMuteList::getInstance()->remove(mute, LLMute::flagVoiceChat); + } } + } bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata) @@ -424,7 +490,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& return mUUIDs.front() != gAgentID; } else - if (item == "can_allow_text_chat") + if (item == "can_allow_text_chat" || "can_moderate_voice" == item) { LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mParent.mSpeakerMgr->getSessionID()); return im_session->mType == IM_SESSION_GROUP_START && mParent.mSpeakerMgr->findSpeaker(gAgentID)->mIsModerator; diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 86b38f5f1e..83191a5b8d 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -117,6 +117,7 @@ class LLParticipantList public: LLParticipantListMenu(LLParticipantList& parent):mParent(parent){}; /*virtual*/ LLContextMenu* createMenu(); + /*virtual*/ void show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y); protected: LLParticipantList& mParent; private: @@ -124,8 +125,13 @@ class LLParticipantList bool checkContextMenuItem(const LLSD& userdata); void toggleAllowTextChat(const LLSD& userdata); + void toggleMute(const LLSD& userdata, U32 flags); void toggleMuteText(const LLSD& userdata); + void toggleMuteVoice(const LLSD& userdata); + // Voice moderation support + void moderateVoice(const LLSD& userdata); + void moderateVoiceOtherParticipants(const LLSD& userdata); }; private: diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml index 5ab327a182..0422972cd4 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -89,4 +89,51 @@ function="ParticipantList.EnableItem" parameter="can_allow_text_chat" /> </menu_item_check> + <menu_item_separator + layout="topleft" + name="moderate_voice_separator" /> + <menu_item_call + label="Mute this participant" + layout="topleft" + name="ModerateVoiceMuteSelected"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="selected" /> + <on_enable + function="ParticipantList.EnableItem" + parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Mute everyone else" + layout="topleft" + name="ModerateVoiceMuteOthers"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="others" /> + <on_enable + function="ParticipantList.EnableItem" + parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Unmute this participant" + layout="topleft" + name="ModerateVoiceUnMuteSelected"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="selected" /> + <on_enable + function="ParticipantList.EnableItem" + parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Unmute everyone else" + layout="topleft" + name="ModerateVoiceUnMuteOthers"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="others" /> + <on_enable + function="ParticipantList.EnableItem" + parameter="can_moderate_voice" /> + </menu_item_call> </context_menu> -- cgit v1.2.3 From e9afce6786877778abc24924865b586d5c5f4581 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji <aarabadji@productengine.com> Date: Thu, 10 Dec 2009 12:36:28 +0200 Subject: =?UTF-8?q?mplemented=20EXT-2801=20=E2=80=9CRecord=20"object=20ret?= =?UTF-8?q?urn"=20notification=20into=20IM=20history,=20not=20chat=20histo?= =?UTF-8?q?ry=E2=80=9D,=20added=20logging=20to=20IM=20for=20ServerObjectMe?= =?UTF-8?q?ssage=20notification;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llnotificationhandlerutil.cpp | 6 ++++-- indra/newview/llviewermessage.cpp | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 749786a829..5b54092c5c 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -50,7 +50,8 @@ const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), USER_GIVE_ITEM("UserGiveItem"), OFFER_FRIENDSHIP("OfferFriendship"), FRIENDSHIP_ACCEPTED("FriendshipAccepted"), FRIENDSHIP_OFFERED("FriendshipOffered"), - FRIEND_ONLINE("FriendOnline"), FRIEND_OFFLINE("FriendOffline"); + FRIEND_ONLINE("FriendOnline"), FRIEND_OFFLINE("FriendOffline"), + SERVER_OBJECT_MESSAGE("ServerObjectMessage"); // static bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) @@ -58,7 +59,8 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) return GRANTED_MODIFY_RIGHTS == notification->getName() || REVOKED_MODIFY_RIGHTS == notification->getName() || PAYMENT_RECIVED == notification->getName() - || FRIENDSHIP_OFFERED == notification->getName(); + || FRIENDSHIP_OFFERED == notification->getName() + || SERVER_OBJECT_MESSAGE == notification->getName(); } // static diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8c0529e344..31bd264e3a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2096,8 +2096,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD payload; payload["object_id"] = session_id; payload["owner_id"] = from_id; + payload["from_id"] = from_id; payload["slurl"] = location; payload["name"] = name; + std::string session_name; + gCacheName->getFullName(from_id, session_name); + payload["SESSION_NAME"] = session_name; if (from_group) { payload["groupowned"] = "true"; -- cgit v1.2.3 From 9d5c05074dfcda11ee88a03db96f53295857e227 Mon Sep 17 00:00:00 2001 From: Andrew Polunin <apolunin@productengine.com> Date: Thu, 10 Dec 2009 13:39:26 +0200 Subject: implemented normal task EXT-2767 IM chiclet needs hard-coded reference to icn_voice-localchat.tga changed to Unread_IM --HG-- branch : product-engine --- indra/newview/llchiclet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 854907fb2d..65abcd1f5f 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -315,7 +315,7 @@ public: { Optional<std::string> new_messages_icon_name; - Params() : new_messages_icon_name("new_messages_icon_name", "icn_voice-localchat.tga") + Params() : new_messages_icon_name("new_messages_icon_name", "Unread_IM") {} }; -- cgit v1.2.3 From 4df594defc4ad7f21139d99fb95197a0aa78854b Mon Sep 17 00:00:00 2001 From: Andrew Dyukov <adyukov@productengine.com> Date: Thu, 10 Dec 2009 14:22:25 +0200 Subject: Set temporal icon for "Scripting disabled" in navbar (EXT-3339). Finding appropriate icon is left to Erica. --HG-- branch : product-engine --- indra/newview/skins/default/textures/textures.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 3e0067bbd1..24d3512bcb 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -375,7 +375,7 @@ with the same filename but different name <texture name="Parcel_PushNo_Light" file_name="icons/Parcel_PushNo_Light.png" preload="false" /> <texture name="Parcel_R_Light" file_name="icons/Parcel_R_Light.png" preload="false" /> <texture name="Parcel_Scripts_Light" file_name="icons/Parcel_Scripts_Light.png" preload="false" /> - <texture name="Parcel_ScriptsNo_Light" file_name="icons/Parcel_ScriptsNo_Light.png" preload="false" /> + <texture name="Parcel_ScriptsNo_Light" file_name="icons/Parcel_ScriptsNo_Dark.png" preload="false" /> <texture name="Parcel_Voice_Light" file_name="icons/Parcel_Voice_Light.png" preload="false" /> <texture name="Parcel_VoiceNo_Light" file_name="icons/Parcel_VoiceNo_Light.png" preload="false" /> -- cgit v1.2.3 From d24fec9b906a19877889caec251cbf2b7f2bec4b Mon Sep 17 00:00:00 2001 From: Andrew Polunin <apolunin@productengine.com> Date: Thu, 10 Dec 2009 15:28:51 +0200 Subject: fixed normal bug EXT-3284 \"Share\" ability is disabled in context menu in \"Nearby\", \"Friends\" and \"Recent\" tabs --HG-- branch : product-engine --- indra/newview/llpanelpeoplemenus.cpp | 2 +- indra/newview/skins/default/xui/en/menu_people_nearby.xml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 57f3d86d53..04fe42de9f 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -100,7 +100,7 @@ LLContextMenu* NearbyMenu::createMenu() registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, id)); registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this)); registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::startIM, id)); // *TODO: unimplemented - registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::startIM, id)); // *TODO: unimplemented + registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::share, id)); registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, id)); registrar.add("Avatar.BlockUnblock", boost::bind(&LLAvatarActions::toggleBlock, id)); diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml index c3a2540b2e..39469f7101 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml @@ -34,7 +34,6 @@ function="Avatar.Call" /> </menu_item_call> <menu_item_call - enabled="false" label="Share" layout="topleft" name="Share"> -- cgit v1.2.3 From 0bd034c56a9e7dd09c406ff83c8b3a630e56ecbf Mon Sep 17 00:00:00 2001 From: Igor Borovkov <iborovkov@productengine.com> Date: Thu, 10 Dec 2009 15:42:54 +0200 Subject: fixed EXT-3250 There should be no "Group info" button for Ad-hoc conference caused by misdetection of IM type --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 40ae112e4b..47a168e354 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -90,8 +90,20 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id) case IM_SESSION_CONFERENCE_START: mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelAdHocControl, this); break; - default: + case IM_SESSION_GROUP_START: mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelGroupControl, this); + break; + case IM_SESSION_INVITE: + if (gAgent.isInGroup(mSessionID)) + { + mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelGroupControl, this); + } + else + { + mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelAdHocControl, this); + } + break; + default: break; } } } -- cgit v1.2.3 From 9b4d09471cca6922257a27ba9cb70498ab81fd94 Mon Sep 17 00:00:00 2001 From: Lynx Linden <lynx@lindenlab.com> Date: Thu, 10 Dec 2009 14:05:17 +0000 Subject: DEV-41317 DEV-42311: Improved auto-call implementation. Improved the implementation for auto-connecting an adhoc call. This involved having the controller (LLIMMgr) set a flag in the model (LLIMModel) to autoconnect on initialize. Now all of the view code (LLPanelChatControlPanel) and the signal/callback infrastructure that I added earlier can be removed as it violated MVP separation. Ah! Much nicer. Thanks to PE folk for the suggestion. --- indra/newview/llavataractions.cpp | 18 ++---------------- indra/newview/llavataractions.h | 1 - indra/newview/llimview.cpp | 30 +++++++++++++++++------------- indra/newview/llimview.h | 7 ++++--- indra/newview/llpanelimcontrolpanel.cpp | 8 -------- indra/newview/llpanelimcontrolpanel.h | 4 +--- 6 files changed, 24 insertions(+), 44 deletions(-) diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 5af023f565..5f90a7627f 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -62,9 +62,6 @@ #include "llimfloater.h" #include "lltrans.h" -// callback connection to auto-call when the IM floater initializes -boost::signals2::connection gAdhocAutoCall; - // static void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name) { @@ -250,8 +247,8 @@ void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& ids) // always open IM window when connecting to voice LLIMFloater::show(session_id); - // start the call once the floater has fully initialized - gAdhocAutoCall = LLIMModel::getInstance()->addSessionInitializedCallback(callbackAutoStartCall); + // start the call once the session has fully initialized + gIMMgr->autoStartCallOnStartup(session_id); make_ui_sound("UISndStartIM"); } @@ -466,17 +463,6 @@ bool LLAvatarActions::callbackAddFriend(const LLSD& notification, const LLSD& re return false; } -// static -void LLAvatarActions::callbackAutoStartCall(const LLSD& data) -{ - // start the adhoc voice call now the IM panel has initialized - LLUUID session_id = data["session_id"].asUUID(); - gIMMgr->startCall(session_id); - - // and deschedule this callback as its work is done now - gAdhocAutoCall.disconnect(); -} - // static void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message) { diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 4c9851a48d..2dd2a4c4b1 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -139,7 +139,6 @@ private: static bool handleRemove(const LLSD& notification, const LLSD& response); static bool handlePay(const LLSD& notification, const LLSD& response, LLUUID avatar_id); static void callback_invite_to_group(LLUUID group_id, LLUUID id); - static void callbackAutoStartCall(const LLSD& data); // Just request friendship, no dialog. static void requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 6c4af0522f..4780b51c55 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -158,7 +158,8 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mSessionInitialized(false), mCallBackEnabled(true), mTextIMPossible(true), - mOtherParticipantIsAvatar(true) + mOtherParticipantIsAvatar(true), + mStartCallOnInitialize(false) { if (IM_NOTHING_SPECIAL == type || IM_SESSION_P2P_INVITE == type) { @@ -413,6 +414,12 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con { im_floater->sessionInitReplyReceived(new_session_id); } + + // auto-start the call on session initialization? + if (session->mStartCallOnInitialize) + { + gIMMgr->startCall(new_session_id); + } } //*TODO remove this "floater" stuff when Communicate Floater is gone @@ -995,18 +1002,6 @@ bool LLIMModel::sendStartSession( return false; } -// static -void LLIMModel::sendSessionInitialized(const LLUUID &session_id) -{ - LLIMSession* session = getInstance()->findIMSession(session_id); - if (session) - { - LLSD arg; - arg["session_id"] = session_id; - getInstance()->mSessionInitializedSignal(arg); - } -} - // // Helper Functions // @@ -1929,6 +1924,15 @@ BOOL LLIMMgr::getIMReceived() const return mIMReceived; } +void LLIMMgr::autoStartCallOnStartup(const LLUUID& session_id) +{ + LLIMModel::LLIMSession *session = LLIMModel::getInstance()->findIMSession(session_id); + if (session) + { + session->mStartCallOnInitialize = true; + } +} + LLUUID LLIMMgr::addP2PSession(const std::string& name, const LLUUID& other_participant_id, const std::string& voice_session_handle, diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index c002434a18..c2288a719a 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -105,6 +105,7 @@ public: bool mTextIMPossible; bool mOtherParticipantIsAvatar; + bool mStartCallOnInitialize; }; @@ -124,7 +125,6 @@ public: typedef boost::function<void(const LLSD&)> session_callback_t; session_signal_t mNewMsgSignal; session_signal_t mNoUnreadMsgsSignal; - session_signal_t mSessionInitializedSignal; /** * Find an IM Session corresponding to session_id @@ -139,7 +139,6 @@ public: boost::signals2::connection addNewMsgCallback( session_callback_t cb ) { return mNewMsgSignal.connect(cb); } boost::signals2::connection addNoUnreadMsgsCallback( session_callback_t cb ) { return mNoUnreadMsgsSignal.connect(cb); } - boost::signals2::connection addSessionInitializedCallback(session_callback_t cb ) { return mSessionInitializedSignal.connect(cb); } /** * Create new session object in a model @@ -213,7 +212,6 @@ public: static bool sendStartSession(const LLUUID& temp_session_id, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, EInstantMessage dialog); static void sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing); - static void sendSessionInitialized(const LLUUID &session_id); static void sendMessage(const std::string& utf8_text, const LLUUID& im_session_id, const LLUUID& other_participant_id, EInstantMessage dialog); @@ -330,6 +328,9 @@ public: void notifyNewIM(); void clearNewIMNotification(); + // automatically start a call once the session has initialized + void autoStartCallOnStartup(const LLUUID& session_id); + // IM received that you haven't seen yet BOOL getIMReceived() const; diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 8c19865550..4f76d32ad5 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -101,14 +101,6 @@ void LLPanelChatControlPanel::draw() && callback_enabled; childSetEnabled("call_btn", enable_connect); - // send a signal when the floater is fully initialized - // this lets LLAvatarActions::startAdhocCall() start the call - if (enable_connect && !mInitialized) - { - LLIMModel::sendSessionInitialized(mSessionId); - mInitialized = true; - } - LLPanel::draw(); } diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index 871779b273..711340efc7 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -45,8 +45,7 @@ class LLPanelChatControlPanel : public LLPanel { public: LLPanelChatControlPanel() : - mSessionId(LLUUID()), - mInitialized(false) {}; + mSessionId(LLUUID()) {}; ~LLPanelChatControlPanel(); virtual BOOL postBuild(); @@ -63,7 +62,6 @@ public: private: LLUUID mSessionId; - bool mInitialized; // connection to voice channel state change signal boost::signals2::connection mVoiceChannelStateChangeConnection; -- cgit v1.2.3 From 34da3ef71676377f577c01c587bff47693cbdd73 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji <aarabadji@productengine.com> Date: Thu, 10 Dec 2009 16:32:49 +0200 Subject: =?UTF-8?q?implmented=20EXT-2830=20=E2=80=9C"Object=20auto-return"?= =?UTF-8?q?=20notification=20should=20contain=20reference=20to=20returned?= =?UTF-8?q?=20object=E2=80=9D,=20removed=20'Inspect'=20button=20from=20Ser?= =?UTF-8?q?verObjectMessage=20notification;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/notifications.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f659062cfe..a69cf4c8d0 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4719,10 +4719,6 @@ The objects on the selected parcel that are NOT owned by you have been returned type="notify"> Message from [NAME]: [MSG] - <usetemplate - name="okcancelbuttons" - notext="OK" - yestext="Inspect"/> </notification> <notification -- cgit v1.2.3 From a7e9fcc132e4779ddbe8f8b5a82a4320c55b5e20 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji <aarabadji@productengine.com> Date: Thu, 10 Dec 2009 17:20:33 +0200 Subject: =?UTF-8?q?fixed=20EXT-3300=20=E2=80=9CWrong=20notification=20coun?= =?UTF-8?q?t=20in=20notifications=20well=E2=80=9D,=20avoided=20creation=20?= =?UTF-8?q?of=20LLNotificationWellWindow=20before=20creation=20of=20notifi?= =?UTF-8?q?cation=20well=20chiclet;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llsyswellwindow.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 0e00236086..43b2723df0 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -126,14 +126,12 @@ protected: * * It contains a list of notifications that have not been responded to. */ -class LLNotificationWellWindow : public LLSysWellWindow, public LLInitClass<LLNotificationWellWindow> +class LLNotificationWellWindow : public LLSysWellWindow { public: LLNotificationWellWindow(const LLSD& key); static LLNotificationWellWindow* getInstance(const LLSD& key = LLSD()); - static void initClass() { getInstance(); } - /*virtual*/ BOOL postBuild(); /*virtual*/ void setVisible(BOOL visible); -- cgit v1.2.3 From 1ab022df432b529fffb3a7f0772dff16a2c195ed Mon Sep 17 00:00:00 2001 From: Lynx Linden <lynx@lindenlab.com> Date: Thu, 10 Dec 2009 15:33:05 +0000 Subject: EXT-3122: Added support for URLs without an explicit protocol. You can now enter URLs like "www.google.com", "secondlife.com", or "www.google.com/search?q=second%20life" and these will be hyperlinked. --- indra/llui/llurlentry.cpp | 25 +++++++++++++++++++++++++ indra/llui/llurlentry.h | 11 +++++++++++ indra/llui/llurlregistry.cpp | 18 +++++++++++++++++- 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 7694d02837..7350457274 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -196,6 +196,31 @@ std::string LLUrlEntryHTTPLabel::getUrl(const std::string &string) return getUrlFromWikiLink(string); } +// +// LLUrlEntryHTTPNoProtocol Describes generic Urls like www.google.com +// +LLUrlEntryHTTPNoProtocol::LLUrlEntryHTTPNoProtocol() +{ + mPattern = boost::regex("(\\bwww\\.\\S+\\.\\S+|\\S+.com\\S*|\\S+.net\\S*|\\S+.edu\\S*|\\S+.org\\S*)", + boost::regex::perl|boost::regex::icase); + mMenuName = "menu_url_http.xml"; + mTooltip = LLTrans::getString("TooltipHttpUrl"); +} + +std::string LLUrlEntryHTTPNoProtocol::getLabel(const std::string &url, const LLUrlLabelCallback &cb) +{ + return unescapeUrl(url); +} + +std::string LLUrlEntryHTTPNoProtocol::getUrl(const std::string &string) +{ + if (string.find("://") == std::string::npos) + { + return "http://" + escapeUrl(string); + } + return escapeUrl(string); +} + // // LLUrlEntrySLURL Describes generic http: and https: Urls // diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index b3fb333fdd..4adffde99c 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -134,6 +134,17 @@ public: /*virtual*/ std::string getUrl(const std::string &string); }; +/// +/// LLUrlEntryHTTPNoProtocol Describes generic Urls like www.google.com +/// +class LLUrlEntryHTTPNoProtocol : public LLUrlEntryBase +{ +public: + LLUrlEntryHTTPNoProtocol(); + /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); + /*virtual*/ std::string getUrl(const std::string &string); +}; + /// /// LLUrlEntrySLURL Describes http://slurl.com/... Urls /// diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index f47db2db1a..afcff0d409 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -58,6 +58,9 @@ LLUrlRegistry::LLUrlRegistry() //so it should be registered in the end of list registerUrl(new LLUrlEntrySL()); registerUrl(new LLUrlEntrySLLabel()); + // most common pattern is a URL without any protocol, + // e.g., "secondlife.com" + registerUrl(new LLUrlEntryHTTPNoProtocol()); } LLUrlRegistry::~LLUrlRegistry() @@ -118,10 +121,23 @@ static bool matchRegex(const char *text, boost::regex regex, U32 &start, U32 &en return true; } +static bool stringHasUrl(const std::string &text) +{ + // fast heuristic test for a URL in a string. This is used + // to avoid lots of costly regex calls, BUT it needs to be + // kept in sync with the LLUrlEntry regexes we support. + return (text.find("://") != std::string::npos || + text.find("www.") != std::string::npos || + text.find(".com") != std::string::npos || + text.find(".net") != std::string::npos || + text.find(".edu") != std::string::npos || + text.find(".org") != std::string::npos); +} + bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LLUrlLabelCallback &cb) { // avoid costly regexes if there is clearly no URL in the text - if (text.find("://") == std::string::npos) + if (! stringHasUrl(text)) { return false; } -- cgit v1.2.3 From e2360f3d399427e28be477b6934440391cda43e8 Mon Sep 17 00:00:00 2001 From: Loren Shih <seraph@lindenlab.com> Date: Thu, 10 Dec 2009 10:37:58 -0500 Subject: EXT-3355 : InventorYSP no longer auto-opens Fixed merge from changeset: 156496ce7d3f to restore my original getActiveInventoryPanel code. --- indra/newview/llinventorypanel.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 4cbf27b725..92b9dc427f 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -903,13 +903,10 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) if (!auto_open) return NULL; // D. Open the inventory side panel and use that. - LLSideTray *side_tray = LLSideTray::getInstance(); + LLSD key; LLSidepanelInventory *sidepanel_inventory = - dynamic_cast<LLSidepanelInventory *>(side_tray->getPanel("sidepanel_inventory")); - - // Use the inventory side panel only if it is already active. - // Activating it may unexpectedly switch off the currently active tab in some cases. - if (sidepanel_inventory && (LLPanel*)side_tray->getActiveTab() == (LLPanel*)sidepanel_inventory) + dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->showPanel("sidepanel_inventory", key)); + if (sidepanel_inventory) { return sidepanel_inventory->getActivePanel(); } -- cgit v1.2.3 From 5a02b66cd293ca9deb0144c3ac106dd9e5dc0836 Mon Sep 17 00:00:00 2001 From: Loren Shih <seraph@lindenlab.com> Date: Thu, 10 Dec 2009 11:01:18 -0500 Subject: EXT-2819 : Crash in appearance color picker Enforcing out-of-order destruction in llfloatercustomize to avoid this crash. --- indra/newview/llcolorswatch.cpp | 7 +++++-- indra/newview/llcolorswatch.h | 2 +- indra/newview/llfloatercolorpicker.cpp | 10 ---------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index b2399d238b..dc6847f236 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -306,13 +306,16 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op ) } } -void LLColorSwatchCtrl::onFloaterClose() +// This is called when the main floatercustomize panel is closed. +// Since this class has pointers up to its parents, we need to cleanup +// this class first in order to avoid a crash. +void LLColorSwatchCtrl::onParentFloaterClosed() { LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get(); - if (pickerp) { pickerp->setSwatch(NULL); + pickerp->closeFloater(); } mPickerHandle.markDead(); diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h index 2f6aec85e8..4bb7d837cb 100644 --- a/indra/newview/llcolorswatch.h +++ b/indra/newview/llcolorswatch.h @@ -105,7 +105,7 @@ public: /*virtual*/ void setEnabled( BOOL enabled ); static void onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE ); - void onFloaterClose(); + void onParentFloaterClosed(); protected: BOOL mValid; diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 56b56dc3d2..73b79d8e13 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -241,16 +241,6 @@ BOOL LLFloaterColorPicker::postBuild() return TRUE; } -/*virtual*/ -void LLFloaterColorPicker::onClose(bool app_settings) -{ - if (mSwatch) - { - mSwatch->onFloaterClose(); - } - stopUsingPipette(); -} - ////////////////////////////////////////////////////////////////////////////// // void LLFloaterColorPicker::initUI ( F32 rValIn, F32 gValIn, F32 bValIn ) -- cgit v1.2.3 From 6b0c1f97f4c1c24d786d2d1a0171b883d21f447b Mon Sep 17 00:00:00 2001 From: Loren Shih <seraph@lindenlab.com> Date: Thu, 10 Dec 2009 11:01:32 -0500 Subject: EXT-2819 : Crash in appearance color picker Enforcing out-of-order destruction in llfloatercustomize to avoid this crash. --- indra/newview/llfloatercolorpicker.h | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h index b381740acd..0bbbe2051c 100644 --- a/indra/newview/llfloatercolorpicker.h +++ b/indra/newview/llfloatercolorpicker.h @@ -56,7 +56,6 @@ class LLFloaterColorPicker // overrides virtual BOOL postBuild (); - virtual void onClose(bool app_settings); virtual void draw (); virtual BOOL handleMouseDown ( S32 x, S32 y, MASK mask ); virtual BOOL handleMouseUp ( S32 x, S32 y, MASK mask ); -- cgit v1.2.3 From 86d8d35341e27953c2344b44f4097da67da10752 Mon Sep 17 00:00:00 2001 From: Paul Guslisty <pguslisty@productengine.com> Date: Thu, 10 Dec 2009 18:08:07 +0200 Subject: Fixed linux build --HG-- branch : product-engine --- indra/lscript/lscript_export.h | 2 +- indra/lscript/lscript_library.h | 4 +++- indra/newview/llpreviewscript.cpp | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/lscript/lscript_export.h b/indra/lscript/lscript_export.h index d4626a8cd2..4c883582e2 100644 --- a/indra/lscript/lscript_export.h +++ b/indra/lscript/lscript_export.h @@ -35,6 +35,6 @@ #include "lscript_library.h" -extern LLScriptLibrary gScriptLibrary; + #endif diff --git a/indra/lscript/lscript_library.h b/indra/lscript/lscript_library.h index 6728d70d0a..363d11f3aa 100644 --- a/indra/lscript/lscript_library.h +++ b/indra/lscript/lscript_library.h @@ -70,7 +70,7 @@ public: std::vector<LLScriptLibraryFunction> mFunctions; }; -extern LLScriptLibrary gScriptLibrary; + class LLScriptLibData { @@ -428,4 +428,6 @@ public: }; +extern LLScriptLibrary gScriptLibrary; + #endif diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 0362fdbf56..8d80310769 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -54,6 +54,7 @@ #include "llscrolllistcell.h" #include "llslider.h" #include "lscript_rt_interface.h" +#include "lscript_library.h" #include "lscript_export.h" #include "lltextbox.h" #include "lltooldraganddrop.h" -- cgit v1.2.3 From 9e8bbf098a8e2b5bb27c29f84ddb746e63a09c66 Mon Sep 17 00:00:00 2001 From: Paul Guslisty <pguslisty@productengine.com> Date: Thu, 10 Dec 2009 18:18:11 +0200 Subject: Fixed low bug EXT - 3255 (Call button is enabled in the People & Profile panels while voice is disabled) --HG-- branch : product-engine --- indra/newview/llpanelavatar.cpp | 2 ++ indra/newview/llpanelpeople.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index eb9cb10d56..b9f422ca6f 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -51,6 +51,7 @@ #include "llfloaterworldmap.h" #include "llfloaterreg.h" #include "llnotificationsutil.h" +#include "llvoiceclient.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLDropTarget @@ -395,6 +396,7 @@ void LLPanelProfileTab::updateButtons() && gAgent.isGodlike() || is_agent_mappable(getAvatarId()); childSetEnabled("show_on_map_btn", enable_map_btn); + childSetEnabled("call", LLVoiceClient::voiceEnabled()); } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 1e4682701e..5fb7dab7be 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -775,7 +775,7 @@ void LLPanelPeople::updateButtons() buttonSetEnabled("teleport_btn", friends_tab_active && item_selected && isFriendOnline(selected_uuids.front())); buttonSetEnabled("view_profile_btn", item_selected); buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection - buttonSetEnabled("call_btn", multiple_selected); + buttonSetEnabled("call_btn", multiple_selected && LLVoiceClient::voiceEnabled()); buttonSetEnabled("share_btn", item_selected); // not implemented yet bool none_group_selected = item_selected && selected_id.isNull(); -- cgit v1.2.3 From 5c1cea1e76364c3ffeb6c68229bf624b7b29ca6d Mon Sep 17 00:00:00 2001 From: Alexei Arabadji <aarabadji@productengine.com> Date: Thu, 10 Dec 2009 18:39:06 +0200 Subject: =?UTF-8?q?implemented=20EXT-3341=20=E2=80=9CURLs=20should=20be=20?= =?UTF-8?q?clickable=20in=20the=20IM=20toasts=E2=80=9D,=20replaced=20mouse?= =?UTF-8?q?Down=20callback=20with=20handleMouseDown=20method=20to=20provid?= =?UTF-8?q?e=20possibility=20to=20separate=20mouse=20down=20event=20on=20p?= =?UTF-8?q?anel=20and=20in=20panel=20children;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/lltoastimpanel.cpp | 15 ++++++++------- indra/newview/lltoastimpanel.h | 4 +--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 7beba59c83..ed9e2e8818 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -85,7 +85,6 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif sys_msg_icon->setVisible(FALSE); mAvatar->setValue(p.avatar_id); - setMouseDownCallback(boost::bind(&LLToastIMPanel::onClickToastIM, this)); } S32 maxLinesCount; @@ -102,11 +101,13 @@ LLToastIMPanel::~LLToastIMPanel() { } -//-------------------------------------------------------------------------- -void LLToastIMPanel::onClickToastIM() +//virtual +BOOL LLToastIMPanel::handleMouseDown(S32 x, S32 y, MASK mask) { - mNotification->respond(mNotification->getResponseTemplate()); -} - -//-------------------------------------------------------------------------- + if (LLPanel::handleMouseDown(x,y,mask) == FALSE) + { + mNotification->respond(mNotification->getResponseTemplate()); + } + return TRUE; +} diff --git a/indra/newview/lltoastimpanel.h b/indra/newview/lltoastimpanel.h index 23f08ef610..53661f2cf6 100644 --- a/indra/newview/lltoastimpanel.h +++ b/indra/newview/lltoastimpanel.h @@ -57,12 +57,10 @@ public: LLToastIMPanel(LLToastIMPanel::Params &p); virtual ~LLToastIMPanel(); - + /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); private: static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT; - void onClickToastIM(); - LLNotificationPtr mNotification; LLUUID mSessionID; LLAvatarIconCtrl* mAvatar; -- cgit v1.2.3 From f11c6044562571d42c76abede6fa90db2b08493f Mon Sep 17 00:00:00 2001 From: Igor Borovkov <iborovkov@productengine.com> Date: Thu, 10 Dec 2009 18:45:36 +0200 Subject: fixed EXT-3247 (There is no title in Ad-hoc IM window, and only "To" is shown if user accepts Ad-hoc conference) sometimes a session name received from a server is empty, added generating a correct session name in such a case --HG-- branch : product-engine --- indra/newview/llimview.cpp | 61 ++++++++++++++++++++++++++++++++++++++++------ indra/newview/llimview.h | 2 ++ 2 files changed, 55 insertions(+), 8 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 6a9853913a..fd1fb38914 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -88,6 +88,9 @@ const static std::string IM_TEXT("message"); const static std::string IM_FROM("from"); const static std::string IM_FROM_ID("from_id"); +const static std::string NO_SESSION("(IM Session Doesn't Exist)"); +const static std::string ADHOC_NAME_SUFFIX(" Conference"); + std::string LLCallDialogManager::sPreviousSessionlName = ""; std::string LLCallDialogManager::sCurrentSessionlName = ""; LLIMModel::LLIMSession* LLCallDialogManager::sSession = NULL; @@ -451,10 +454,16 @@ void LLIMModel::testMessages() addMessage(bot2_session_id, from, bot2_id, "Test Message: OMGWTFBBQ."); } - +//session name should not be empty bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids) { + if (name.empty()) + { + llwarns << "Attempt to create a new session with empty name; id = " << session_id << llendl; + return false; + } + if (findIMSession(session_id)) { llwarns << "IM Session " << session_id << " already exists" << llendl; @@ -611,7 +620,7 @@ const std::string& LLIMModel::getName(const LLUUID& session_id) const if (!session) { llwarns << "session " << session_id << "does not exist " << llendl; - return LLStringUtil::null; + return NO_SESSION; } return session->mName; @@ -1558,6 +1567,8 @@ void LLIncomingCallDialog::processCallResponse(S32 response) return; LLUUID session_id = mPayload["session_id"].asUUID(); + LLUUID caller_id = mPayload["caller_id"].asUUID(); + std::string session_name = mPayload["session_name"].asString(); EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger(); LLIMMgr::EInvitationType inv_type = (LLIMMgr::EInvitationType)mPayload["inv_type"].asInteger(); bool voice = true; @@ -1574,8 +1585,8 @@ void LLIncomingCallDialog::processCallResponse(S32 response) { // create a normal IM session session_id = gIMMgr->addP2PSession( - mPayload["session_name"].asString(), - mPayload["caller_id"].asUUID(), + session_name, + caller_id, mPayload["session_handle"].asString(), mPayload["session_uri"].asString()); @@ -1593,10 +1604,38 @@ void LLIncomingCallDialog::processCallResponse(S32 response) } else { - LLUUID new_session_id = gIMMgr->addSession( - mPayload["session_name"].asString(), - type, - session_id); + //session name should not be empty, but it can contain spaces so we don't trim + std::string correct_session_name = session_name; + if (session_name.empty()) + { + llwarns << "Received an empty session name from a server" << llendl; + + switch(type){ + case IM_SESSION_CONFERENCE_START: + case IM_SESSION_GROUP_START: + case IM_SESSION_INVITE: + if (gAgent.isInGroup(session_id)) + { + LLGroupData data; + if (!gAgent.getGroupData(session_id, data)) break; + correct_session_name = data.mName; + } + else + { + if (gCacheName->getFullName(caller_id, correct_session_name)) + { + correct_session_name.append(ADHOC_NAME_SUFFIX); + } + } + llinfos << "Corrected session name is " << correct_session_name << llendl; + break; + default: + llwarning("Received an empty session name from a server and failed to generate a new proper session name", 0); + break; + } + } + + LLUUID new_session_id = gIMMgr->addSession(correct_session_name, type, session_id); if (new_session_id != LLUUID::null) { LLIMFloater::show(new_session_id); @@ -2023,6 +2062,12 @@ LLUUID LLIMMgr::addSession( return LLUUID::null; } + if (name.empty()) + { + llwarning("Session name cannot be null!", 0); + return LLUUID::null; + } + LLUUID session_id = computeSessionID(dialog,other_participant_id); bool new_session = !LLIMModel::getInstance()->findIMSession(session_id); diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index d85a4cda82..3fc1a00868 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -142,6 +142,7 @@ public: /** * Create new session object in a model + * @param name session name should not be empty, will return false if empty */ bool newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids = std::vector<LLUUID>()); @@ -298,6 +299,7 @@ public: /** * Creates a P2P session with the requisite handle for responding to voice calls. * + * @param name session name, cannot be null * @param caller_uri - sip URI of caller. It should be always be passed into the method to avoid * incorrect working of LLVoiceChannel instances. See EXT-2985. */ -- cgit v1.2.3 From d06ef8878388b8b9956b385a74b7114a82de2355 Mon Sep 17 00:00:00 2001 From: Lynx Linden <lynx@lindenlab.com> Date: Thu, 10 Dec 2009 19:02:33 +0000 Subject: DEV-43679: Display god level warning in Search window. If you change your god level from when you performed a search, the search results may be inappropriate for your god level (we pass the current god status to the search web pages). When this is the case, we now display a warning at the bottom of the search floater to let the user know that they should redo their search. --- indra/newview/llfloatersearch.cpp | 18 ++++++++++++++++-- indra/newview/llfloatersearch.h | 8 +++++++- indra/newview/llviewermenu.cpp | 8 ++++++++ indra/newview/skins/default/xui/en/floater_search.xml | 14 +++++++++++++- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 2c618263ec..c658963708 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -42,7 +42,8 @@ LLFloaterSearch::LLFloaterSearch(const LLSD& key) : LLFloater(key), LLViewerMediaObserver(), - mBrowser(NULL) + mBrowser(NULL), + mSearchGodLevel(0) { // declare a map that transforms a category name into // the URL suffix that is used to search that category @@ -86,12 +87,21 @@ void LLFloaterSearch::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent eve case MEDIA_EVENT_NAVIGATE_COMPLETE: childSetText("status_text", getString("done_text")); break; - + default: break; } } +void LLFloaterSearch::godLevelChanged(U8 godlevel) +{ + // search results can change based upon god level - if the user + // changes god level, then give them a warning (we don't refresh + // the search as this might undo any page navigation or + // AJAX-driven changes since the last search). + childSetVisible("refresh_search", (godlevel != mSearchGodLevel)); +} + void LLFloaterSearch::search(const LLSD &key) { if (! mBrowser) @@ -99,6 +109,10 @@ void LLFloaterSearch::search(const LLSD &key) return; } + // reset the god level warning as we're sending the latest state + childHide("refresh_search"); + mSearchGodLevel = gAgent.getGodLevel(); + // get the URL for the search page std::string url = getString("search_url"); if (! LLStringUtil::endsWith(url, "/")) diff --git a/indra/newview/llfloatersearch.h b/indra/newview/llfloatersearch.h index 743107484f..ba817adf7f 100644 --- a/indra/newview/llfloatersearch.h +++ b/indra/newview/llfloatersearch.h @@ -66,14 +66,20 @@ public: /// "events", "groups", "wiki", "destinations", "classifieds" void search(const LLSD &key); + /// changing godmode can affect the search results that are + /// returned by the search website - use this method to tell the + /// search floater that the user has changed god level. + void godLevelChanged(U8 godlevel); + private: /*virtual*/ BOOL postBuild(); // inherited from LLViewerMediaObserver /*virtual*/ void handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event); - + LLMediaCtrl *mBrowser; LLSD mCategoryPaths; + U8 mSearchGodLevel; }; #endif // LL_LLFLOATERSEARCH_H diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 78322dda75..9def699708 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -59,6 +59,7 @@ #include "llfloaterland.h" #include "llfloaterpay.h" #include "llfloaterreporter.h" +#include "llfloatersearch.h" #include "llfloaterscriptdebug.h" #include "llfloatertools.h" #include "llfloaterworldmap.h" @@ -3408,6 +3409,13 @@ void set_god_level(U8 god_level) // changing god-level can affect which menus we see show_debug_menus(); + + // changing god-level can invalidate search results + LLFloaterSearch *search = dynamic_cast<LLFloaterSearch*>(LLFloaterReg::getInstance("search")); + if (search) + { + search->godLevelChanged(god_level); + } } #ifdef TOGGLE_HACKED_GODLIKE_VIEWER diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index 82e4d87b28..e6bdcdf78e 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -55,8 +55,20 @@ layout="topleft" left_delta="0" name="status_text" - top_pad="5" + top_pad="7" width="150" /> + <text + visible="false" + follows="bottom|right" + height="16" + left_delta="0" + name="refresh_search" + left_pad="0" + right="-10" + halign="right" + width="450"> + Redo search to reflect current God level + </text> </layout_panel> </layout_stack> </floater> -- cgit v1.2.3 From 0d186b07121b110bf86a36cd157359f0733a5ee4 Mon Sep 17 00:00:00 2001 From: Loren Shih <seraph@lindenlab.com> Date: Thu, 10 Dec 2009 14:03:19 -0500 Subject: Dos2Unix fix for llselectmgr.cpp --- indra/newview/llselectmgr.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 4d6c19157a..44930f03c5 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5754,21 +5754,21 @@ void LLSelectMgr::redo() //----------------------------------------------------------------------------- BOOL LLSelectMgr::canDoDelete() const { - bool can_delete = false; - // This function is "logically const" - it does not change state in - // a way visible outside the selection manager. - LLSelectMgr* self = const_cast<LLSelectMgr*>(this); - LLViewerObject* obj = self->mSelectedObjects->getFirstDeleteableObject(); - // Note: Can only delete root objects (see getFirstDeleteableObject() for more info) - if (obj!= NULL) - { - // all the faces needs to be selected - if(self->mSelectedObjects->contains(obj,SELECT_ALL_TES )) - { - can_delete = true; - } - } - + bool can_delete = false; + // This function is "logically const" - it does not change state in + // a way visible outside the selection manager. + LLSelectMgr* self = const_cast<LLSelectMgr*>(this); + LLViewerObject* obj = self->mSelectedObjects->getFirstDeleteableObject(); + // Note: Can only delete root objects (see getFirstDeleteableObject() for more info) + if (obj!= NULL) + { + // all the faces needs to be selected + if(self->mSelectedObjects->contains(obj,SELECT_ALL_TES )) + { + can_delete = true; + } + } + return can_delete; } -- cgit v1.2.3 From 1ca104f325d60d4f91a6227f06720977b17da1b1 Mon Sep 17 00:00:00 2001 From: Loren Shih <seraph@lindenlab.com> Date: Thu, 10 Dec 2009 14:05:24 -0500 Subject: dos2unix fix for llpanelgroup.cpp. --- indra/newview/llpanelgroup.cpp | 74 +++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index e0f159cfeb..fff2575893 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -551,21 +551,21 @@ bool LLPanelGroup::canClose() break; if(!need_save) return false; - // If no message was provided, give a generic one. - if (mesg.empty()) - { - mesg = mDefaultNeedsApplyMesg; - } - // Create a notify box, telling the user about the unapplied tab. - LLSD args; - args["NEEDS_APPLY_MESSAGE"] = mesg; - args["WANT_APPLY_MESSAGE"] = mWantApplyMesg; - - LLNotificationsUtil::add("SaveChanges", args, LLSD(), boost::bind(&LLPanelGroup::handleNotifyCallback,this, _1, _2)); - - mShowingNotifyDialog = true; - - return false; + // If no message was provided, give a generic one. + if (mesg.empty()) + { + mesg = mDefaultNeedsApplyMesg; + } + // Create a notify box, telling the user about the unapplied tab. + LLSD args; + args["NEEDS_APPLY_MESSAGE"] = mesg; + args["WANT_APPLY_MESSAGE"] = mWantApplyMesg; + + LLNotificationsUtil::add("SaveChanges", args, LLSD(), boost::bind(&LLPanelGroup::handleNotifyCallback,this, _1, _2)); + + mShowingNotifyDialog = true; + + return false; } bool LLPanelGroup::notifyChildren(const LLSD& info) @@ -576,32 +576,32 @@ bool LLPanelGroup::notifyChildren(const LLSD& info) if (str_action == "quit" ) { - canClose(); - return true; + canClose(); + return true; } if(str_action == "wait_quit") return mShowingNotifyDialog; } return false; } -bool LLPanelGroup::handleNotifyCallback(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - mShowingNotifyDialog = false; - switch (option) - { - case 0: // "Apply Changes" - apply(); - break; - case 1: // "Ignore Changes" - break; - case 2: // "Cancel" - default: - // Do nothing. The user is canceling the action. - // If we were quitting, we didn't really mean it. - LLAppViewer::instance()->abortQuit(); - break; - } - return false; -} +bool LLPanelGroup::handleNotifyCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + mShowingNotifyDialog = false; + switch (option) + { + case 0: // "Apply Changes" + apply(); + break; + case 1: // "Ignore Changes" + break; + case 2: // "Cancel" + default: + // Do nothing. The user is canceling the action. + // If we were quitting, we didn't really mean it. + LLAppViewer::instance()->abortQuit(); + break; + } + return false; +} -- cgit v1.2.3 From 466a8d2664a5fbaf36839aa26616b3f5d2354111 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed <nat@lindenlab.com> Date: Thu, 10 Dec 2009 14:10:10 -0500 Subject: Fix llmediaplugintest.cpp for non-Windows platforms --- indra/test_apps/llplugintest/llmediaplugintest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp index 30d338292e..d183aac208 100644 --- a/indra/test_apps/llplugintest/llmediaplugintest.cpp +++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp @@ -1537,7 +1537,7 @@ void LLMediaPluginTest::addMediaPanel( std::string url ) char cwd[ FILENAME_MAX ]; if (NULL == getcwd( cwd, FILENAME_MAX - 1 )) { - std::cerr << "Couldn't get cwd - probably too long - failing to init." << llendl; + std::cerr << "Couldn't get cwd - probably too long - failing to init." << std::endl; return; } std::string user_data_path = std::string( cwd ) + "/"; @@ -1774,7 +1774,7 @@ void LLMediaPluginTest::replaceMediaPanel( mediaPanel* panel, std::string url ) char cwd[ FILENAME_MAX ]; if (NULL == getcwd( cwd, FILENAME_MAX - 1 )) { - std::cerr << "Couldn't get cwd - probably too long - failing to init." << llendl; + std::cerr << "Couldn't get cwd - probably too long - failing to init." << std::endl; return; } std::string user_data_path = std::string( cwd ) + "/"; -- cgit v1.2.3 From 6af53dd7e2e8c344847dd6936181c545db8e8778 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Thu, 10 Dec 2009 15:31:08 -0500 Subject: For EXT-2858: Determine gear menu / right-click menu choices for AppearanceSP --HG-- branch : avatar-pipeline --- indra/newview/llinventorybridge.cpp | 33 +++++++++------------- indra/newview/llinventorybridge.h | 3 ++ .../skins/default/xui/en/menu_inventory.xml | 4 +-- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 4e2acf9907..ba72489bd6 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -67,8 +67,6 @@ using namespace LLOldEvents; -bool isInOutfitsSidePanel(LLPanel *panel); - // Helpers // bug in busy count inc/dec right now, logic is complex... do we really need it? void inc_busy_count() @@ -571,11 +569,11 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, if (obj && obj->getIsLinkType()) { - items.push_back(std::string("Remove")); + items.push_back(std::string("Remove Link")); } items.push_back(std::string("Delete")); - const bool is_sidepanel = isInOutfitsSidePanel(mInventoryPanel.get()); + const bool is_sidepanel = isInOutfitsSidePanel(); if ((obj && obj->getIsLinkType() && is_sidepanel) || !isItemRemovable()) { disabled_items.push_back(std::string("Delete")); @@ -922,6 +920,16 @@ void LLInvFVBridge::purgeItem(LLInventoryModel *model, const LLUUID &uuid) } } +bool LLInvFVBridge::isInOutfitsSidePanel() const +{ + LLInventoryPanel *my_panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get()); + LLPanelOutfitsInventory *outfit_panel = + dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); + if (!outfit_panel) + return false; + return outfit_panel->isAccordionPanel(my_panel); +} + // +=================================================+ // | InventoryFVBridgeBuilder | // +=================================================+ @@ -2395,21 +2403,10 @@ void LLFolderBridge::staticFolderOptionsMenu() sSelf->folderOptionsMenu(); } -bool isInOutfitsSidePanel(LLPanel *panel) -{ - LLInventoryPanel *my_panel = dynamic_cast<LLInventoryPanel*>(panel); - LLPanelOutfitsInventory *outfit_panel = - dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); - if (!outfit_panel) - return false; - return outfit_panel->isAccordionPanel(my_panel); - - //LLInventoryPanel *outfit_inv_panel = outfit_panel ? outfit_panel->getActivePanel(): NULL; - //return (my_panel && (my_panel == outfit_inv_panel)); -} - void LLFolderBridge::folderOptionsMenu() { + const bool is_sidepanel = isInOutfitsSidePanel(); + std::vector<std::string> disabled_items; LLInventoryModel* model = getInventoryModel(); @@ -2421,13 +2418,11 @@ void LLFolderBridge::folderOptionsMenu() // BAP change once we're no longer treating regular categories as ensembles. const bool is_ensemble = category && (type == LLFolderType::FT_NONE || LLFolderType::lookupIsEnsembleType(type)); - const bool is_sidepanel = isInOutfitsSidePanel(mInventoryPanel.get()); // calling card related functionality for folders. if (is_sidepanel) { - mItems.clear(); mItems.push_back("Rename"); mItems.push_back("Delete"); } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 63be9dcdb8..4636c1d4cb 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -182,6 +182,9 @@ public: // LLInvFVBridge functionality virtual void clearDisplayName() {} + // Allow context menus to be customized for side panel. + bool isInOutfitsSidePanel() const; + protected: LLInvFVBridge(LLInventoryPanel* inventory, const LLUUID& uuid); diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 7e8d259cd0..660e3858ac 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -451,9 +451,9 @@ <menu_item_separator layout="topleft" /> <menu_item_call - label="Remove" + label="Remove Link" layout="topleft" - name="Remove"> + name="Remove Link"> <menu_item_call.on_click function="Inventory.DoToSelected" parameter="delete" /> -- cgit v1.2.3 From 9db47b1d4bc9c24adf23f862c729464d9422e6a3 Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" <tulla@lindenlab.com> Date: Thu, 10 Dec 2009 16:07:54 -0500 Subject: Fix for EXT-3368 - "Save Texture" functionality was no longer respecting perms --- indra/newview/llfolderviewitem.cpp | 6 ++++++ indra/newview/llfolderviewitem.h | 4 ++++ indra/newview/llinventorybridge.cpp | 20 ++++++++++++++++++++ indra/newview/llinventorybridge.h | 1 + indra/newview/llpanelmaininventory.cpp | 24 +++--------------------- indra/newview/llpreviewtexture.cpp | 22 +++------------------- indra/newview/llviewerinventory.cpp | 19 +++++++++++++++++++ indra/newview/llviewerinventory.h | 3 +++ 8 files changed, 59 insertions(+), 40 deletions(-) diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 5bef306485..fe793fbcb8 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -40,6 +40,7 @@ #include "llinventoryfilter.h" #include "llpanel.h" #include "llviewercontrol.h" // gSavedSettings +#include "llviewerinventory.h" #include "llviewerwindow.h" // Argh, only for setCursor() // linden library includes @@ -603,6 +604,11 @@ const std::string& LLFolderViewItem::getSearchableLabel() const return mSearchableLabel; } +LLViewerInventoryItem * LLFolderViewItem::getInventoryItem(void) +{ + return gInventory.getItem(getListener()->getUUID()); +} + std::string LLFolderViewItem::getName( void ) const { if(mListener) diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 0ea031108b..43a5fd8de5 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -45,6 +45,7 @@ class LLFolderViewListenerFunctor; class LLInventoryFilter; class LLMenuGL; class LLUIImage; +class LLViewerInventoryItem; // These are grouping of inventory types. // Order matters when sorting system folders to the top. @@ -281,6 +282,9 @@ public: const LLFolderViewEventListener* getListener( void ) const { return mListener; } LLFolderViewEventListener* getListener( void ) { return mListener; } + + // Gets the inventory item if it exists (null otherwise) + LLViewerInventoryItem * getInventoryItem(void); // just rename the object. void rename(const std::string& new_name); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3746e9cfeb..52ebefabea 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3150,6 +3150,22 @@ void LLTextureBridge::openItem() } } +bool LLTextureBridge::canSaveTexture(void) +{ + const LLInventoryModel* model = getInventoryModel(); + if(!model) + { + return false; + } + + const LLViewerInventoryItem *item = model->getItem(mUUID); + if (item) + { + return item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED); + } + return false; +} + void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { lldebugs << "LLTextureBridge::buildContextMenu()" << llendl; @@ -3174,6 +3190,10 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Texture Separator")); items.push_back(std::string("Save As")); + if (!canSaveTexture()) + { + disabled_items.push_back(std::string("Save As")); + } } hide_context_entries(menu, items, disabled_items); } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 63be9dcdb8..5e4e89a71b 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -377,6 +377,7 @@ public: protected: LLTextureBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLInventoryType::EType type) : LLItemBridge(inventory, uuid), mInvType(type) {} + bool canSaveTexture(void); LLInventoryType::EType mInvType; }; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 9d73fbf21a..cef21e85d6 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1018,28 +1018,10 @@ bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata) LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); if (current_item) { - bool can_save = false; - LLInventoryItem *item = gInventory.getItem(current_item->getListener()->getUUID()); - if(item) + LLViewerInventoryItem *inv_item = current_item->getInventoryItem(); + if(inv_item) { - const LLPermissions& perm = item->getPermissions(); - U32 mask = PERM_NONE; - if(perm.getOwner() == gAgent.getID()) - { - mask = perm.getMaskBase(); - } - else if(gAgent.isInGroup(perm.getGroup())) - { - mask = perm.getMaskGroup(); - } - else - { - mask = perm.getMaskEveryone(); - } - if((mask & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) - { - can_save = true; - } + bool can_save = inv_item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED); LLInventoryType::EType curr_type = current_item->getListener()->getInventoryType(); return can_save && (curr_type == LLInventoryType::IT_TEXTURE || curr_type == LLInventoryType::IT_SNAPSHOT); } diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 86475fe2dc..26694ac433 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -76,29 +76,12 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key) mAspectRatio(0.f), mPreviewToSave(FALSE) { - const LLInventoryItem *item = getItem(); + const LLViewerInventoryItem *item = static_cast<const LLViewerInventoryItem*>(getItem()); if(item) { mShowKeepDiscard = item->getPermissions().getCreator() != gAgent.getID(); mImageID = item->getAssetUUID(); - const LLPermissions& perm = item->getPermissions(); - U32 mask = PERM_NONE; - if(perm.getOwner() == gAgent.getID()) - { - mask = perm.getMaskBase(); - } - else if(gAgent.isInGroup(perm.getGroup())) - { - mask = perm.getMaskGroup(); - } - else - { - mask = perm.getMaskEveryone(); - } - if((mask & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) - { - mIsCopyable = TRUE; - } + mIsCopyable = item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED); } else // not an item, assume it's an asset id { @@ -586,6 +569,7 @@ void LLPreviewTexture::loadAsset() mImage->forceToSaveRawImage(0) ; mAssetStatus = PREVIEW_ASSET_LOADING; updateDimensions(); + childSetVisible("save_tex_btn", canSaveAs()); } LLPreview::EAssetStatus LLPreviewTexture::getAssetStatus() diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 9856cb2b7f..78cee15384 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1379,6 +1379,25 @@ LLViewerInventoryCategory *LLViewerInventoryItem::getLinkedCategory() const return NULL; } +bool LLViewerInventoryItem::checkPermissionsSet(PermissionMask mask) const +{ + const LLPermissions& perm = getPermissions(); + PermissionMask curr_mask = PERM_NONE; + if(perm.getOwner() == gAgent.getID()) + { + curr_mask = perm.getMaskBase(); + } + else if(gAgent.isInGroup(perm.getGroup())) + { + curr_mask = perm.getMaskGroup(); + } + else + { + curr_mask = perm.getMaskEveryone(); + } + return ((curr_mask & mask) == mask); +} + //---------- void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name) diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 0156e7dab1..412a2c66e6 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -158,6 +158,9 @@ public: bool getIsBrokenLink() const; // true if the baseitem this points to doesn't exist in memory. LLViewerInventoryItem *getLinkedItem() const; LLViewerInventoryCategory *getLinkedCategory() const; + + // Checks the items permissions (for owner, group, or everyone) and returns true if all mask bits are set. + bool checkPermissionsSet(PermissionMask mask) const; // callback void onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name); -- cgit v1.2.3 From b3f8cec38c15fecaf39b7b187aa46e8df9df8eff Mon Sep 17 00:00:00 2001 From: Lynx Linden <lynx@lindenlab.com> Date: Thu, 10 Dec 2009 22:38:29 +0000 Subject: DEV-43977: Changed pre-login help browser behavior. The special pre_login_help topic is now only displayed when the user clicks on the "Need help logging in?" link on the login screen, or selects the top-level Help > Second Life Help (F1) menu. --- indra/llui/llhelp.h | 2 ++ indra/newview/llpanellogin.cpp | 4 +-- indra/newview/llviewerhelp.cpp | 30 ++++++++++++++++++---- indra/newview/llviewerhelp.h | 11 +++++--- indra/newview/llviewermenu.cpp | 11 +------- indra/newview/skins/default/xui/en/menu_login.xml | 3 ++- indra/newview/skins/default/xui/en/menu_viewer.xml | 3 ++- 7 files changed, 41 insertions(+), 23 deletions(-) diff --git a/indra/llui/llhelp.h b/indra/llui/llhelp.h index 82c3bc385f..938419d374 100644 --- a/indra/llui/llhelp.h +++ b/indra/llui/llhelp.h @@ -42,6 +42,8 @@ class LLHelp virtual std::string defaultTopic() = 0; // return topic to use before the user logs in virtual std::string preLoginTopic() = 0; + // return topic to use for the top-level help, invoked by F1 + virtual std::string f1HelpTopic() = 0; }; #endif // headerguard diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index a729b8c06f..af8db31fad 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -452,7 +452,7 @@ BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask) if ( KEY_F1 == key ) { LLViewerHelp* vhelp = LLViewerHelp::getInstance(); - vhelp->showTopic(vhelp->getTopicFromFocus()); + vhelp->showTopic(vhelp->f1HelpTopic()); return TRUE; } @@ -972,7 +972,7 @@ void LLPanelLogin::onClickHelp(void*) if (sInstance) { LLViewerHelp* vhelp = LLViewerHelp::getInstance(); - vhelp->showTopic(vhelp->getTopicFromFocus()); + vhelp->showTopic(vhelp->preLoginTopic()); } } diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp index 297c0cc111..b8f91697e5 100644 --- a/indra/newview/llviewerhelp.cpp +++ b/indra/newview/llviewerhelp.cpp @@ -49,24 +49,38 @@ void LLViewerHelp::showTopic(const std::string &topic) { - showHelp(); - // allow overriding the help server with a local help file if( gSavedSettings.getBOOL("HelpUseLocal") ) { + showHelp(); LLFloaterHelpBrowser* helpbrowser = dynamic_cast<LLFloaterHelpBrowser*>(LLFloaterReg::getInstance("help_browser")); helpbrowser->navigateToLocalPage( "help-offline" , "index.html" ); return; } - // use a special login topic before the user logs in + // if the help topic is empty, use the default topic std::string help_topic = topic; - if (! LLLoginInstance::getInstance()->authSuccess()) + if (help_topic.empty()) { - help_topic = preLoginTopic(); + help_topic = defaultTopic(); + } + + // f1 help topic means: if user not logged in yet, show the + // pre-login topic, otherwise show help for the focused item + if (help_topic == f1HelpTopic()) + { + if (! LLLoginInstance::getInstance()->authSuccess()) + { + help_topic = preLoginTopic(); + } + else + { + help_topic = getTopicFromFocus(); + } } // work out the URL for this topic and display it + showHelp(); const LLOSInfo& osinfo = LLAppViewer::instance()->getOSInfo(); std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic, gSavedSettings, osinfo ); setRawURL( helpURL ); @@ -84,6 +98,12 @@ std::string LLViewerHelp::preLoginTopic() return "pre_login_help"; } +std::string LLViewerHelp::f1HelpTopic() +{ + // *hack: to be done properly + return "f1_help"; +} + ////////////////////////////// // our own interfaces diff --git a/indra/newview/llviewerhelp.h b/indra/newview/llviewerhelp.h index dcb5ae32c9..07971a593e 100644 --- a/indra/newview/llviewerhelp.h +++ b/indra/newview/llviewerhelp.h @@ -51,14 +51,17 @@ class LLViewerHelp : public LLHelp, public LLSingleton<LLViewerHelp> /// display the specified help topic in the help viewer /*virtual*/ void showTopic(const std::string &topic); - /// return default (fallback) topic name suitable for showTopic() - /*virtual*/ std::string defaultTopic(); - // return topic derived from viewer UI focus, else default topic std::string getTopicFromFocus(); + /// return default (fallback) topic name suitable for showTopic() + /*virtual*/ std::string defaultTopic(); + // return topic to use before the user logs in - std::string preLoginTopic(); + /*virtual*/ std::string preLoginTopic(); + + // return topic to use for the top-level help, invoked by F1 + /*virtual*/ std::string f1HelpTopic(); private: static void showHelp(); // make sure help UI is visible & raised diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9def699708..36d9e7935f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5575,17 +5575,8 @@ class LLShowHelp : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string help_topic = userdata.asString(); - LLViewerHelp* vhelp = LLViewerHelp::getInstance(); - if (help_topic.empty()) - { - vhelp->showTopic(vhelp->getTopicFromFocus()); - } - else - { - vhelp->showTopic(help_topic); - } - + vhelp->showTopic(help_topic); return true; } }; diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 9b439c16e0..53be40d7fd 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -45,7 +45,8 @@ name="Second Life Help" shortcut="F1"> <menu_item_call.on_click - function="ShowHelp" /> + function="ShowHelp" + parameter="f1_help" /> </menu_item_call> <menu_item_separator /> <menu_item_call diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 861b0de2cf..6f2d696e9e 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1064,7 +1064,8 @@ name="Second Life Help" shortcut="F1"> <menu_item_call.on_click - function="ShowHelp" /> + function="ShowHelp" + parameter="f1_help" /> </menu_item_call> <menu_item_call label="Tutorial" -- cgit v1.2.3 From e7ef47e8258a1a1fa1ccca467f8a20ab9eccfb68 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Thu, 10 Dec 2009 18:19:23 -0500 Subject: For EXT-2858: Determine gear menu / right-click menu choices for AppearanceSP --HG-- branch : avatar-pipeline --- indra/newview/llinventorybridge.cpp | 48 ++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ba72489bd6..2e781e59a7 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2405,8 +2405,6 @@ void LLFolderBridge::staticFolderOptionsMenu() void LLFolderBridge::folderOptionsMenu() { - const bool is_sidepanel = isInOutfitsSidePanel(); - std::vector<std::string> disabled_items; LLInventoryModel* model = getInventoryModel(); @@ -2421,6 +2419,7 @@ void LLFolderBridge::folderOptionsMenu() // calling card related functionality for folders. + const bool is_sidepanel = isInOutfitsSidePanel(); if (is_sidepanel) { mItems.push_back("Rename"); @@ -2492,14 +2491,13 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) mDisabledItems.clear(); lldebugs << "LLFolderBridge::buildContextMenu()" << llendl; + // std::vector<std::string> disabled_items; LLInventoryModel* model = getInventoryModel(); if(!model) return; const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); const LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); - mItems.clear(); //adding code to clear out member Items (which means Items should not have other data here at this point) - mDisabledItems.clear(); //adding code to clear out disabled members from previous if (lost_and_found_id == mUUID) { // This is the lost+found folder. @@ -2528,7 +2526,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) LLViewerInventoryCategory *cat = getCategory(); // BAP removed protected check to re-enable standard ops in untyped folders. // Not sure what the right thing is to do here. - if (!isCOFFolder() && cat /*&& + if (!isCOFFolder() && cat && cat->getPreferredType()!=LLFolderType::FT_OUTFIT /*&& LLAssetType::lookupIsProtectedCategoryType(cat->getPreferredType())*/) { // Do not allow to create 2-level subfolder in the Calling Card/Friends folder. EXT-694. @@ -3780,10 +3778,15 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { - items.push_back(std::string("Open")); - items.push_back(std::string("Properties")); + bool is_sidepanel = isInOutfitsSidePanel(); - getClipboardEntries(true, items, disabled_items, flags); + if (!is_sidepanel) + { + items.push_back(std::string("Open")); + items.push_back(std::string("Properties")); + + getClipboardEntries(true, items, disabled_items, flags); + } items.push_back(std::string("Gesture Separator")); if (LLGestureManager::instance().isGestureActive(getUUID())) @@ -4105,13 +4108,21 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { - items.push_back(std::string("Properties")); + bool is_sidepanel = isInOutfitsSidePanel(); - LLInventoryItem *item = getItem(); - getClipboardEntries(true, items, disabled_items, flags); + if (!is_sidepanel) + { + items.push_back(std::string("Properties")); + } + + if (!is_sidepanel) + { + getClipboardEntries(true, items, disabled_items, flags); + } LLObjectBridge::sContextMenuItemID = mUUID; + LLInventoryItem *item = getItem(); if(item) { LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); @@ -4537,14 +4548,23 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { can_open = FALSE; } - if (can_open) + + bool is_sidepanel = isInOutfitsSidePanel(); + + if (can_open && !is_sidepanel) { items.push_back(std::string("Open")); } - items.push_back(std::string("Properties")); + if (!is_sidepanel) + { + items.push_back(std::string("Properties")); + } - getClipboardEntries(true, items, disabled_items, flags); + if (!is_sidepanel) + { + getClipboardEntries(true, items, disabled_items, flags); + } items.push_back(std::string("Wearable Separator")); -- cgit v1.2.3 From b131314dba9e50b260e30ebd3f3bbeb626563a9c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Thu, 10 Dec 2009 18:39:44 -0500 Subject: Fix for r. click Edit on a link to wearable --HG-- branch : avatar-pipeline --- indra/newview/llinventorybridge.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2e781e59a7..56d3745309 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4768,7 +4768,8 @@ void LLWearableBridge::onEditOnAvatar(void* user_data) void LLWearableBridge::editOnAvatar() { - const LLWearable* wearable = gAgentWearables.getWearableFromItemID(mUUID); + LLUUID linked_id = gInventory.getLinkedItemID(mUUID); + const LLWearable* wearable = gAgentWearables.getWearableFromItemID(linked_id); if( wearable ) { // Set the tab to the right wearable. -- cgit v1.2.3 From 558190f50c1a90b0d11b68b24f60bce482c6a6ec Mon Sep 17 00:00:00 2001 From: Xiaohong Bao <bao@lindenlab.com> Date: Thu, 10 Dec 2009 16:56:09 -0700 Subject: fix for DEV-43870: EXT-3137: Crash when add quicktime media to multiple faces. --- indra/newview/llviewertexture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 0d29efaedf..a5a40e9c2c 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2879,7 +2879,8 @@ BOOL LLViewerMediaTexture::findFaces() } S32 face_id = -1 ; - while((face_id = obj->getFaceIndexWithMediaImpl(mMediaImplp, face_id)) > -1) + S32 num_faces = obj->mDrawable->getNumFaces() ; + while((face_id = obj->getFaceIndexWithMediaImpl(mMediaImplp, face_id)) > -1 && face_id < num_faces) { LLFace* facep = obj->mDrawable->getFace(face_id) ; if(facep) -- cgit v1.2.3 From af3aae559e3205575d0bf2896473908164a00b3e Mon Sep 17 00:00:00 2001 From: Ramzi Linden <ramzi@lindenlab.com> Date: Thu, 10 Dec 2009 16:00:40 -0800 Subject: Delete the 'Test' language from the viewer. There is no more time to update it to last month of UI changes; and its use for Localizability Testing is now done. --- indra/newview/skins/default/xui/en/panel_preferences_general.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index 8aba8b9dd1..b5c6b637e5 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -92,11 +92,7 @@ name="(Japanese)" value="ja" /> - <combo_box.item - enabled="true" - label="Test Language" - name="TestLanguage" - value="test" /> + </combo_box> <text type="string" -- cgit v1.2.3 From 264446a5ce3739ab186b9fbdfc81847590404c86 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Thu, 10 Dec 2009 19:35:58 -0500 Subject: For EXT-2858: Determine gear menu / right-click menu choices for AppearanceSP --HG-- branch : avatar-pipeline --- indra/newview/llinventorybridge.cpp | 68 +++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 15 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 56d3745309..0ec019c4f9 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -506,12 +506,57 @@ void hide_context_entries(LLMenuGL& menu, } } +bool isWornLink(LLUUID link_id) +{ + LLViewerInventoryItem *link = gInventory.getItem(link_id); + if (!link) + return false; + LLViewerInventoryItem *item = link->getLinkedItem(); + if (!item) + return false; + + switch(item->getType()) + { + case LLAssetType::AT_OBJECT: + { + LLVOAvatarSelf* my_avatar = gAgent.getAvatarObject(); + if(my_avatar && my_avatar->isWearingAttachment(item->getUUID())) + return true; + } + break; + + case LLAssetType::AT_BODYPART: + case LLAssetType::AT_CLOTHING: + if(gAgentWearables.isWearingItem(item->getUUID())) + return true; + break; + + case LLAssetType::AT_GESTURE: + if (LLGestureManager::instance().isGestureActive(item->getUUID())) + return true; + break; + } + return false; +} + // Helper for commonly-used entries void LLInvFVBridge::getClipboardEntries(bool show_asset_id, std::vector<std::string> &items, std::vector<std::string> &disabled_items, U32 flags) { const LLInventoryObject *obj = getInventoryObject(); + + bool is_sidepanel = isInOutfitsSidePanel(); + if (is_sidepanel) + { + // Sidepanel includes restricted menu. + if (obj && obj->getIsLinkType() && !isWornLink(mUUID)) + { + items.push_back(std::string("Remove Link")); + } + return; + } + if (obj) { if (obj->getIsLinkType()) @@ -567,14 +612,13 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, items.push_back(std::string("Paste Separator")); - if (obj && obj->getIsLinkType()) + if (obj && obj->getIsLinkType() && !isWornLink(mUUID)) { items.push_back(std::string("Remove Link")); } items.push_back(std::string("Delete")); - const bool is_sidepanel = isInOutfitsSidePanel(); - if ((obj && obj->getIsLinkType() && is_sidepanel) || !isItemRemovable()) + if (!isItemRemovable()) { disabled_items.push_back(std::string("Delete")); } @@ -3784,10 +3828,10 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { items.push_back(std::string("Open")); items.push_back(std::string("Properties")); - - getClipboardEntries(true, items, disabled_items, flags); } + getClipboardEntries(true, items, disabled_items, flags); + items.push_back(std::string("Gesture Separator")); if (LLGestureManager::instance().isGestureActive(getUUID())) { @@ -4115,10 +4159,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Properties")); } - if (!is_sidepanel) - { - getClipboardEntries(true, items, disabled_items, flags); - } + getClipboardEntries(true, items, disabled_items, flags); LLObjectBridge::sContextMenuItemID = mUUID; @@ -4561,15 +4602,10 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Properties")); } - if (!is_sidepanel) - { - getClipboardEntries(true, items, disabled_items, flags); - } + getClipboardEntries(true, items, disabled_items, flags); items.push_back(std::string("Wearable Separator")); - items.push_back(std::string("Wearable Wear")); - items.push_back(std::string("Wearable Add")); items.push_back(std::string("Wearable Edit")); if ((flags & FIRST_SELECTED_ITEM) == 0) @@ -4599,6 +4635,8 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Wearable Wear")); + items.push_back(std::string("Wearable Add")); disabled_items.push_back(std::string("Take Off")); } break; -- cgit v1.2.3 From 12f91564e857ba638a2b9604f1990ba620348dc9 Mon Sep 17 00:00:00 2001 From: Soft Linden <soft@lindenlab.com> Date: Thu, 10 Dec 2009 18:46:07 -0600 Subject: DEV-28327 Remove ELAR email field from client --- indra/newview/llfloaterregioninfo.cpp | 33 ---------------------- indra/newview/llfloaterregioninfo.h | 3 -- indra/newview/llfloaterreporter.cpp | 9 +----- .../newview/skins/default/xui/en/notifications.xml | 15 ---------- .../skins/default/xui/en/panel_region_estate.xml | 32 +++------------------ 5 files changed, 5 insertions(+), 87 deletions(-) diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 05a46ad894..8a26078f3d 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -88,8 +88,6 @@ #include "lltrans.h" #include "llagentui.h" -#define ELAR_ENABLED 0 // Enable when server support is implemented - const S32 TERRAIN_TEXTURE_COUNT = 4; const S32 CORNER_COUNT = 4; @@ -1995,11 +1993,6 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region) childSetEnabled("remove_banned_avatar_btn", god || owner || manager); childSetEnabled("message_estate_btn", god || owner || manager); childSetEnabled("kick_user_from_estate_btn", god || owner || manager); -#if ELAR_ENABLED - childSetEnabled("abuse_email_address", god || owner || manager); -#else - childSetEnabled("abuse_email_address", false); -#endif // estate managers can't add estate managers childSetEnabled("add_estate_manager_btn", god || owner); @@ -2065,8 +2058,6 @@ BOOL LLPanelEstateInfo::postBuild() initCtrl("limit_payment"); initCtrl("limit_age_verified"); initCtrl("voice_chat_check"); - getChild<LLUICtrl>("abuse_email_address")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeAnything, this)); - getChild<LLLineEditor>("abuse_email_address")->setKeystrokeCallback(onChangeText, this); // set up the use global time checkbox getChild<LLUICtrl>("use_global_time_check")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeUseGlobalTime, this)); @@ -2276,8 +2267,6 @@ bool LLPanelEstateInfo::commitEstateInfoCaps() } body["sun_hour"] = sun_hour; - body["owner_abuse_email"] = childGetValue("abuse_email_address").asString(); - // we use a responder so that we can re-get the data after committing to the database LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder(this)); return true; @@ -2436,16 +2425,6 @@ void LLPanelEstateInfo::setOwnerName(const std::string& name) childSetValue("estate_owner", LLSD(name)); } -const std::string LLPanelEstateInfo::getAbuseEmailAddress() const -{ - return childGetValue("abuse_email_address").asString(); -} - -void LLPanelEstateInfo::setAbuseEmailAddress(const std::string& address) -{ - childSetValue("abuse_email_address", LLSD(address)); -} - void LLPanelEstateInfo::setAccessAllowedEnabled(bool enable_agent, bool enable_group, bool enable_ban) @@ -2954,18 +2933,6 @@ bool LLDispatchEstateUpdateInfo::operator()( std::string estate_name = strings[0].c_str(); // preserve c_str() call! panel->setEstateName(estate_name); -#if ELAR_ENABLED - if (strings.size() > 9) - { - std::string abuse_email = strings[9].c_str(); // preserve c_str() call! - panel->setAbuseEmailAddress(abuse_email); - } - else -#endif - { - panel->setAbuseEmailAddress(panel->getString("email_unsupported")); - } - LLViewerRegion* regionp = gAgent.getRegion(); LLUUID owner_id(strings[1]); diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index a3b91223b7..704166d106 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -330,9 +330,6 @@ public: const std::string getOwnerName() const; void setOwnerName(const std::string& name); - const std::string getAbuseEmailAddress() const; - void setAbuseEmailAddress(const std::string& address); - // If visible from mainland, allowed agent and allowed groups // are ignored, so must disable UI. void setAccessAllowedEnabled(bool enable_agent, bool enable_group, bool enable_ban); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 408303a1e0..24f78a7b95 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -121,14 +121,7 @@ void LLFloaterReporter::processRegionInfo(LLMessageSystem* msg) BOOL email_to_estate_owner = ( region_flags & REGION_FLAGS_ABUSE_EMAIL_TO_ESTATE_OWNER ); f->mEmailToEstateOwner = email_to_estate_owner; - if ( email_to_estate_owner ) - { - LLNotificationsUtil::add("HelpReportAbuseEmailEO"); - } - else - { - LLNotificationsUtil::add("HelpReportAbuseEmailLL"); - } + LLNotificationsUtil::add("HelpReportAbuseEmailLL"); }; } // virtual diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 22896d59c3..5ebaa2364d 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3797,21 +3797,6 @@ All reported abuses are investigated and resolved. You can view the resolution b <unique/> </notification> - <notification - icon="alertmodal.tga" - name="HelpReportAbuseEmailEO" - type="alertmodal"> -IMPORTANT: This report will go to the owner of the region you are currently in and not to Linden Lab. - -As a service to residents and visitors, the owner of the region you are in has elected to receive and resolve all reports originating in this region. Linden Lab will not investigate reports you file from this location. - -The region owner will resolve reports based on the local rules of this region as outlined in the estate Covenant. -(View covenants by going to the World menu and selecting About Land.) - -The resolution of this report applies only to this Region. Residents' access to other areas of [SECOND_LIFE] will not be affected by the outcome of this report. Only Linden Lab can restrict access to the entirety of [SECOND_LIFE]. - <unique/> - </notification> - <notification icon="alertmodal.tga" name="HelpReportAbuseSelectCategory" diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml index e25ff0d548..68878825ed 100644 --- a/indra/newview/skins/default/xui/en/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml @@ -9,10 +9,6 @@ name="Estate" top="320" width="480"> - <panel.string - name="email_unsupported"> - Feature unsupported - </panel.string> <text type="string" length="1" @@ -81,7 +77,7 @@ regions in the estate. <view_border bevel_style="in" follows="top|left" - height="310" + height="275" layout="topleft" left_delta="-4" top_pad="5" @@ -141,12 +137,12 @@ regions in the estate. name="Only Allow" top="250" width="278"> - Restrict Access To: + Restrict Access to Accounts Verified by: </text> <check_box follows="top|left" height="16" - label="Residents with payment info on file" + label="Payment Information on File" layout="topleft" left_delta="0" name="limit_payment" @@ -156,7 +152,7 @@ regions in the estate. <check_box follows="top|left" height="16" - label="Age-verified adults" + label="Age Verification" layout="topleft" left_delta="0" name="limit_age_verified" @@ -179,26 +175,6 @@ regions in the estate. name="allow_direct_teleport" top_pad="4" width="80" /> - <text - type="string" - length="1" - follows="left|top" - height="20" - layout="topleft" - left="15" - name="abuse_email_text" - top_pad="10" - width="180"> - Abuse email address: - </text> - <line_editor - follows="top|left" - height="23" - layout="topleft" - left="15" - name="abuse_email_address" - top_pad="-5" - width="230" /> <button enabled="false" follows="left|top" -- cgit v1.2.3 From 225cd2d5a7a997c83fbce537d0e32a2b43db6f9a Mon Sep 17 00:00:00 2001 From: Soft Linden <soft@lindenlab.com> Date: Thu, 10 Dec 2009 19:09:51 -0600 Subject: DEV-44130 Clarify AO messages on Region/Estate - Region tab --- indra/newview/skins/default/xui/en/notifications.xml | 2 ++ indra/newview/skins/default/xui/en/panel_region_estate.xml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5ebaa2364d..3e9cbe91e0 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3539,6 +3539,8 @@ Type a short announcement which will be sent to everyone in this region. type="alertmodal"> The maturity rating for this region has been updated. It may take some time for the change to be reflected on the map. + +To enter Adult regions, residents must be Account Verified, either by age-verification or payment-verification. </notification> <notification diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml index 68878825ed..f381c5c213 100644 --- a/indra/newview/skins/default/xui/en/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml @@ -77,7 +77,7 @@ regions in the estate. <view_border bevel_style="in" follows="top|left" - height="275" + height="270" layout="topleft" left_delta="-4" top_pad="5" -- cgit v1.2.3 From 47c68ba2260dc40d397260a63d1c47e1d3ebf0a6 Mon Sep 17 00:00:00 2001 From: brad kittenbrink <brad@lindenlab.com> Date: Thu, 10 Dec 2009 17:17:12 -0800 Subject: Added better error handling to LLEventHost, so we no longer crash when shutting down. Also cleaned up logging in llstartup, llwlparammanager, and llwaterparammanager. reviewed by Mani. --- indra/newview/llstartup.cpp | 3 +++ indra/newview/llwaterparammanager.cpp | 8 ++++---- indra/newview/llwlparammanager.cpp | 8 ++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d8d1760c38..93655eb1f1 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2695,12 +2695,15 @@ std::string LLStartUp::startupStateToString(EStartupState state) #define RTNENUM(E) case E: return #E switch(state){ RTNENUM( STATE_FIRST ); + RTNENUM( STATE_BROWSER_INIT ); RTNENUM( STATE_LOGIN_SHOW ); RTNENUM( STATE_LOGIN_WAIT ); RTNENUM( STATE_LOGIN_CLEANUP ); RTNENUM( STATE_LOGIN_AUTH_INIT ); RTNENUM( STATE_LOGIN_PROCESS_RESPONSE ); RTNENUM( STATE_WORLD_INIT ); + RTNENUM( STATE_MULTIMEDIA_INIT ); + RTNENUM( STATE_FONT_INIT ); RTNENUM( STATE_SEED_GRANTED_WAIT ); RTNENUM( STATE_SEED_CAP_GRANTED ); RTNENUM( STATE_WORLD_WAIT ); diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index c8cc6a3d8e..697fefee3a 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -91,7 +91,7 @@ LLWaterParamManager::~LLWaterParamManager() void LLWaterParamManager::loadAllPresets(const std::string& file_name) { std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", "")); - LL_INFOS2("AppInit", "Shaders") << "Loading Default water settings from " << path_name << LL_ENDL; + LL_DEBUGS2("AppInit", "Shaders") << "Loading Default water settings from " << path_name << LL_ENDL; bool found = true; while(found) @@ -117,7 +117,7 @@ void LLWaterParamManager::loadAllPresets(const std::string& file_name) // And repeat for user presets, note the user presets will modify any system presets already loaded std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", "")); - LL_INFOS2("AppInit", "Shaders") << "Loading User water settings from " << path_name2 << LL_ENDL; + LL_DEBUGS2("AppInit", "Shaders") << "Loading User water settings from " << path_name2 << LL_ENDL; found = true; while(found) @@ -152,7 +152,7 @@ void LLWaterParamManager::loadPreset(const std::string & name,bool propagate) escaped_filename += ".xml"; std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", escaped_filename)); - llinfos << "Loading water settings from " << pathName << llendl; + LL_DEBUGS2("AppInit", "Shaders") << "Loading water settings from " << pathName << LL_ENDL; llifstream presetsXML; presetsXML.open(pathName.c_str()); @@ -161,7 +161,7 @@ void LLWaterParamManager::loadPreset(const std::string & name,bool propagate) if(!presetsXML) { pathName=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", escaped_filename); - llinfos << "Loading User water setting from " << pathName << llendl; + LL_DEBUGS2("AppInit", "Shaders") << "Loading User water setting from " << pathName << LL_ENDL; presetsXML.clear(); presetsXML.open(pathName.c_str()); } diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index c6fd35c142..c3a70705cf 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -109,7 +109,7 @@ LLWLParamManager::~LLWLParamManager() void LLWLParamManager::loadPresets(const std::string& file_name) { std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", "")); - LL_INFOS2("AppInit", "Shaders") << "Loading Default WindLight settings from " << path_name << LL_ENDL; + LL_DEBUGS2("AppInit", "Shaders") << "Loading Default WindLight settings from " << path_name << LL_ENDL; bool found = true; while(found) @@ -135,7 +135,7 @@ void LLWLParamManager::loadPresets(const std::string& file_name) // And repeat for user presets, note the user presets will modify any system presets already loaded std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", "")); - LL_INFOS2("AppInit", "Shaders") << "Loading User WindLight settings from " << path_name2 << LL_ENDL; + LL_DEBUGS2("AppInit", "Shaders") << "Loading User WindLight settings from " << path_name2 << LL_ENDL; found = true; while(found) @@ -196,7 +196,7 @@ void LLWLParamManager::loadPreset(const std::string & name,bool propagate) escaped_filename += ".xml"; std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", escaped_filename)); - //llinfos << "Loading WindLight sky setting from " << pathName << llendl; + LL_DEBUGS2("AppInit", "Shaders") << "Loading WindLight sky setting from " << pathName << LL_ENDL; llifstream presetsXML; presetsXML.open(pathName.c_str()); @@ -205,7 +205,7 @@ void LLWLParamManager::loadPreset(const std::string & name,bool propagate) if(!presetsXML) { pathName=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", escaped_filename); - llinfos << "Loading User WindLight sky setting from " << pathName << llendl; + LL_DEBUGS2("AppInit", "Shaders") << "Loading User WindLight sky setting from " << pathName << LL_ENDL; presetsXML.clear(); presetsXML.open(pathName.c_str()); } -- cgit v1.2.3 From 6374834355a8125412527a27804992b6b8732dfa Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" <nyx@lindenlab.com> Date: Thu, 10 Dec 2009 21:39:15 -0500 Subject: EXT-3302 invisible avatar w/ bling crashes mac viewers not mac-specific. We were treating IMG_INVISIBLE as a baked texture when an avatar used it as a bake. However, some baked textures have 5 channels, IMG_INVISIBLE has 4. Asking KDU to decode the 5th channel of a 4 channel image resulted in a crash. Fix skips the callback for loading morph masks from a bake if the bake image ID is IMG_INVISIBLE. Code reviewed by Seraph --HG-- branch : avatar-pipeline --- indra/newview/llvoavatar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 93b0ad4a5b..03910b0534 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5994,7 +5994,7 @@ void LLVOAvatar::updateMeshTextures() else { mBakedTextureDatas[i].mIsLoaded = FALSE; - if ( (i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER) ) + if ( (baked_img->getID() != IMG_INVISIBLE) && ((i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER)) ) { baked_img->setLoadedCallback(onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID )); } @@ -6464,7 +6464,7 @@ void LLVOAvatar::onFirstTEMessageReceived() LLViewerFetchedTexture* image = LLViewerTextureManager::staticCastToFetchedTexture(getImage( mBakedTextureDatas[i].mTextureIndex, 0 ), TRUE) ; mBakedTextureDatas[i].mLastTextureIndex = image->getID(); // If we have more than one texture for the other baked layers, we'll want to call this for them too. - if ( (i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER) ) + if ( (image->getID() != IMG_INVISIBLE) && ((i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER)) ) { image->setLoadedCallback( onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID )); } -- cgit v1.2.3 From e9a744131d2c08c0c08214624e09f152e52b2731 Mon Sep 17 00:00:00 2001 From: Soft Linden <soft@lindenlab.com> Date: Thu, 10 Dec 2009 20:39:31 -0600 Subject: DEV-44138 About Land - Access tab - make AO overriden options clear --- indra/llmessage/llregionflags.h | 2 +- indra/newview/llfloaterland.cpp | 20 ++++++++++++++++++- indra/newview/llfloaterreporter.cpp | 23 ++-------------------- indra/newview/llfloaterreporter.h | 1 - .../skins/default/xui/en/floater_about_land.xml | 12 +++++++---- 5 files changed, 30 insertions(+), 28 deletions(-) diff --git a/indra/llmessage/llregionflags.h b/indra/llmessage/llregionflags.h index 232478577c..40e4a4268d 100644 --- a/indra/llmessage/llregionflags.h +++ b/indra/llmessage/llregionflags.h @@ -92,7 +92,7 @@ const U32 REGION_FLAGS_DENY_ANONYMOUS = (1 << 23); const U32 REGION_FLAGS_ALLOW_PARCEL_CHANGES = (1 << 26); -const U32 REGION_FLAGS_ABUSE_EMAIL_TO_ESTATE_OWNER = (1 << 27); +// const U32 REGION_FLAGS_ABUSE_EMAIL_TO_ESTATE_OWNER = (1 << 27); // We no longer support ELAR const U32 REGION_FLAGS_ALLOW_VOICE = (1 << 28); diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index ed0f24d160..5b03292b22 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2300,7 +2300,7 @@ void LLPanelLandAccess::refresh() mListBanned->deleteAllItems(); LLParcel *parcel = mParcel->getParcel(); - + // Display options if (parcel) { @@ -2396,22 +2396,40 @@ void LLPanelLandAccess::refresh() mListBanned->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix); } } + + LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); + if(region) + { + std::string region_access = "("; + region_access += region->getSimAccessString(); + region_access += ")"; + childSetLabelArg( "public_access", "[MATURITY]", region_access ); + } + else + { + childSetLabelArg( "public_access", "[MATURITY]", std::string() ); + } + if(parcel->getRegionDenyAnonymousOverride()) { childSetValue("limit_payment", TRUE); + childSetLabelArg( "limit_payment", "[ESTATE_PAYMENT_LIMIT]", getString("access_estate_defined") ); } else { childSetValue("limit_payment", (parcel->getParcelFlag(PF_DENY_ANONYMOUS))); + childSetLabelArg( "limit_payment", "[ESTATE_PAYMENT_LIMIT]", std::string() ); } if(parcel->getRegionDenyAgeUnverifiedOverride()) { childSetValue("limit_age_verified", TRUE); + childSetLabelArg( "limit_age_verified", "[ESTATE_AGE_LIMIT]", getString("access_estate_defined") ); } else { childSetValue("limit_age_verified", (parcel->getParcelFlag(PF_DENY_AGEUNVERIFIED))); + childSetLabelArg( "limit_age_verified", "[ESTATE_AGE_LIMIT]", std::string() ); } BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 24f78a7b95..932e49c79b 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -95,7 +95,6 @@ const U32 INCLUDE_SCREENSHOT = 0x01 << 0; LLFloaterReporter::LLFloaterReporter(const LLSD& key) : LLFloater(key), mReportType(COMPLAINT_REPORT), - mEmailToEstateOwner(FALSE), mObjectID(), mScreenID(), mAbuserID(), @@ -117,10 +116,6 @@ void LLFloaterReporter::processRegionInfo(LLMessageSystem* msg) if ( LLFloaterReg::instanceVisible("reporter") ) { - LLFloaterReporter *f = LLFloaterReg::findTypedInstance<LLFloaterReporter>("reporter"); - BOOL email_to_estate_owner = ( region_flags & REGION_FLAGS_ABUSE_EMAIL_TO_ESTATE_OWNER ); - f->mEmailToEstateOwner = email_to_estate_owner; - LLNotificationsUtil::add("HelpReportAbuseEmailLL"); }; } @@ -211,17 +206,7 @@ LLFloaterReporter::~LLFloaterReporter() // virtual void LLFloaterReporter::draw() { - // this is set by a static callback sometime after the dialog is created. - // Only disable screenshot for abuse reports to estate owners - if ( mEmailToEstateOwner ) - { - childSetValue("screen_check", FALSE ); - childSetEnabled("screen_check", FALSE ); - } - else - { - childSetEnabled("screen_check", TRUE ); - } + childSetEnabled("screen_check", TRUE ); LLFloater::draw(); } @@ -630,11 +615,7 @@ LLSD LLFloaterReporter::gatherReport() LLUUID screenshot_id = LLUUID::null; if (childGetValue("screen_check")) { - - if ( mEmailToEstateOwner == FALSE ) - { - screenshot_id = childGetValue("screenshot"); - } + screenshot_id = childGetValue("screenshot"); }; LLSD report = LLSD::emptyMap(); diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index 917f513641..a3776f3d27 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -124,7 +124,6 @@ private: private: EReportType mReportType; - BOOL mEmailToEstateOwner; LLUUID mObjectID; LLUUID mScreenID; LLUUID mAbuserID; diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index d1fd42bdd9..52fda97860 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1857,6 +1857,10 @@ Select the thumbnail to choose a different texture. top="0" help_topic="land_access_tab" name="land_access_panel"> + <panel.string + name="access_estate_defined"> + (Defined by the Estate) + </panel.string> <panel.string name="estate_override"> One or more of these options is set at the estate level @@ -1877,7 +1881,7 @@ Select the thumbnail to choose a different texture. <check_box follows="top|left" height="16" - label="Allow Public Access" + label="Allow Public Access [MATURITY]" layout="topleft" left_delta="0" name="public_access" @@ -1893,12 +1897,12 @@ Select the thumbnail to choose a different texture. name="Only Allow" top="49" width="278"> - Block Access By: + Restrict Access to Residents verified by: </text> <check_box follows="top|left" height="16" - label="Residents who have not given payment info to Linden Lab" + label="Payment Information on File [ESTATE_PAYMENT_LIMIT]" layout="topleft" left_delta="0" name="limit_payment" @@ -1908,7 +1912,7 @@ Select the thumbnail to choose a different texture. <check_box follows="top|left" height="16" - label="Residents who are not age verified adults" + label="Age Verification [ESTATE_AGE_LIMIT]" layout="topleft" left_delta="0" name="limit_age_verified" -- cgit v1.2.3 From 19122e164ca2a3c1616619b220118344b1858cc8 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed <nat@lindenlab.com> Date: Thu, 10 Dec 2009 22:30:57 -0500 Subject: Add LL(URLDispatcher,CommandDispatcher,PanelLogin)Listener LLURLDispatcherListener accepts requests for LLURLDispatcher. LLCommandDispatcherListener accepts requests for LLCommandDispatcher. LLPanelLoginListener accepts requests specifically for LLPanelLogin. Initially it supports a simulated click to the "Log In" button. --- indra/newview/CMakeLists.txt | 6 +++ indra/newview/llcommanddispatcherlistener.cpp | 47 ++++++++++++++++++++++ indra/newview/llcommanddispatcherlistener.h | 30 ++++++++++++++ indra/newview/llcommandhandler.cpp | 3 ++ indra/newview/llpanellogin.cpp | 8 +++- indra/newview/llpanellogin.h | 5 ++- indra/newview/llpanelloginlistener.cpp | 34 ++++++++++++++++ indra/newview/llpanelloginlistener.h | 30 ++++++++++++++ indra/newview/llurldispatcher.cpp | 3 ++ indra/newview/llurldispatcherlistener.cpp | 58 +++++++++++++++++++++++++++ indra/newview/llurldispatcherlistener.h | 32 +++++++++++++++ 11 files changed, 254 insertions(+), 2 deletions(-) create mode 100644 indra/newview/llcommanddispatcherlistener.cpp create mode 100644 indra/newview/llcommanddispatcherlistener.h create mode 100644 indra/newview/llpanelloginlistener.cpp create mode 100644 indra/newview/llpanelloginlistener.h create mode 100644 indra/newview/llurldispatcherlistener.cpp create mode 100644 indra/newview/llurldispatcherlistener.h diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index be6bce8054..72630cc413 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -104,6 +104,7 @@ set(viewer_SOURCE_FILES llclassifiedstatsresponder.cpp llcloud.cpp llcolorswatch.cpp + llcommanddispatcherlistener.cpp llcommandhandler.cpp llcommandlineparser.cpp llcompilequeue.cpp @@ -324,6 +325,7 @@ set(viewer_SOURCE_FILES llpanellandmarks.cpp llpanellandmedia.cpp llpanellogin.cpp + llpanelloginlistener.cpp llpanellookinfo.cpp llpanelmaininventory.cpp llpanelmediasettingsgeneral.cpp @@ -444,6 +446,7 @@ set(viewer_SOURCE_FILES lluploaddialog.cpp llurl.cpp llurldispatcher.cpp + llurldispatcherlistener.cpp llurlhistory.cpp llurllineeditorctrl.cpp llurlsimstring.cpp @@ -611,6 +614,7 @@ set(viewer_HEADER_FILES llclassifiedstatsresponder.h llcloud.h llcolorswatch.h + llcommanddispatcherlistener.h llcommandhandler.h llcommandlineparser.h llcompilequeue.h @@ -826,6 +830,7 @@ set(viewer_HEADER_FILES llpanellandmarks.h llpanellandmedia.h llpanellogin.h + llpanelloginlistener.h llpanellookinfo.h llpanelmaininventory.h llpanelmediasettingsgeneral.h @@ -950,6 +955,7 @@ set(viewer_HEADER_FILES lluploaddialog.h llurl.h llurldispatcher.h + llurldispatcherlistener.h llurlhistory.h llurllineeditorctrl.h llurlsimstring.h diff --git a/indra/newview/llcommanddispatcherlistener.cpp b/indra/newview/llcommanddispatcherlistener.cpp new file mode 100644 index 0000000000..00a20de30e --- /dev/null +++ b/indra/newview/llcommanddispatcherlistener.cpp @@ -0,0 +1,47 @@ +/** + * @file llcommanddispatcherlistener.cpp + * @author Nat Goodspeed + * @date 2009-12-10 + * @brief Implementation for llcommanddispatcherlistener. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +// Precompiled header +#include "llviewerprecompiledheaders.h" +// associated header +#include "llcommanddispatcherlistener.h" +// STL headers +// std headers +// external library headers +// other Linden headers +#include "llcommandhandler.h" + +LLCommandDispatcherListener::LLCommandDispatcherListener(/* LLCommandDispatcher* instance */): + LLEventAPI("LLCommandDispatcher", "Access to LLCommandHandler commands") /* , + mDispatcher(instance) */ +{ + add("dispatch", + "Execute a command registered as an LLCommandHandler,\n" + "passing any required parameters:\n" + "[\"cmd\"] string command name\n" + "[\"params\"] array of parameters, as if from components of URL path\n" + "[\"query\"] map of parameters, as if from ?key1=val&key2=val\n" + "[\"trusted\"] boolean indicating trusted browser [default true]", + &LLCommandDispatcherListener::dispatch); +} + +void LLCommandDispatcherListener::dispatch(const LLSD& params) const +{ + // For most purposes, we expect callers to want to be trusted. + bool trusted_browser = true; + if (params.has("trusted")) + { + // But for testing, allow a caller to specify untrusted. + trusted_browser = params["trusted"].asBoolean(); + } + LLCommandDispatcher::dispatch(params["cmd"], params["params"], params["query"], NULL, + trusted_browser); +} diff --git a/indra/newview/llcommanddispatcherlistener.h b/indra/newview/llcommanddispatcherlistener.h new file mode 100644 index 0000000000..d0070ddd71 --- /dev/null +++ b/indra/newview/llcommanddispatcherlistener.h @@ -0,0 +1,30 @@ +/** + * @file llcommanddispatcherlistener.h + * @author Nat Goodspeed + * @date 2009-12-10 + * @brief LLEventAPI for LLCommandDispatcher + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +#if ! defined(LL_LLCOMMANDDISPATCHERLISTENER_H) +#define LL_LLCOMMANDDISPATCHERLISTENER_H + +#include "lleventapi.h" +class LLCommandDispatcher; +class LLSD; + +class LLCommandDispatcherListener: public LLEventAPI +{ +public: + LLCommandDispatcherListener(/* LLCommandDispatcher* instance */); // all static members + +private: + void dispatch(const LLSD& params) const; + + //LLCommandDispatcher* mDispatcher; +}; + +#endif /* ! defined(LL_LLCOMMANDDISPATCHERLISTENER_H) */ diff --git a/indra/newview/llcommandhandler.cpp b/indra/newview/llcommandhandler.cpp index 1d92661ea2..8c7e7bea83 100644 --- a/indra/newview/llcommandhandler.cpp +++ b/indra/newview/llcommandhandler.cpp @@ -35,12 +35,15 @@ #include "llcommandhandler.h" #include "llnotificationsutil.h" +#include "llcommanddispatcherlistener.h" // system includes #include <boost/tokenizer.hpp> #define THROTTLE_PERIOD 15 // required secs between throttled commands +static LLCommandDispatcherListener sCommandDispatcherListener; + //--------------------------------------------------------------------------- // Underlying registry for command handlers, not directly accessible. //--------------------------------------------------------------------------- diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index a729b8c06f..29d9de623e 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -73,6 +73,11 @@ #include "llfloatertos.h" #include "lltrans.h" #include "llglheaders.h" +#include "llpanelloginlistener.h" + +#if LL_WINDOWS +#pragma warning(disable: 4355) // 'this' used in initializer list +#endif // LL_WINDOWS #define USE_VIEWER_AUTH 0 @@ -166,7 +171,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, mLogoImage(), mCallback(callback), mCallbackData(cb_data), - mHtmlAvailable( TRUE ) + mHtmlAvailable( TRUE ), + mListener(new LLPanelLoginListener(this)) { setFocusRoot(TRUE); diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index e3d30d7d0c..97350ce5c7 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -36,10 +36,11 @@ #include "llpanel.h" #include "llpointer.h" // LLPointer<> #include "llmediactrl.h" // LLMediaCtrlObserver +#include <boost/scoped_ptr.hpp> class LLLineEditor; class LLUIImage; - +class LLPanelLoginListener; class LLPanelLogin: public LLPanel, @@ -90,6 +91,7 @@ public: /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); private: + friend class LLPanelLoginListener; void reshapeBrowser(); static void onClickConnect(void*); static void onClickNewAccount(void*); @@ -103,6 +105,7 @@ private: private: LLPointer<LLUIImage> mLogoImage; + boost::scoped_ptr<LLPanelLoginListener> mListener; void (*mCallback)(S32 option, void *userdata); void* mCallbackData; diff --git a/indra/newview/llpanelloginlistener.cpp b/indra/newview/llpanelloginlistener.cpp new file mode 100644 index 0000000000..f7e59aaf54 --- /dev/null +++ b/indra/newview/llpanelloginlistener.cpp @@ -0,0 +1,34 @@ +/** + * @file llpanelloginlistener.cpp + * @author Nat Goodspeed + * @date 2009-12-10 + * @brief Implementation for llpanelloginlistener. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +// Precompiled header +#include "llviewerprecompiledheaders.h" +// associated header +#include "llpanelloginlistener.h" +// STL headers +// std headers +// external library headers +// other Linden headers +#include "llpanellogin.h" + +LLPanelLoginListener::LLPanelLoginListener(LLPanelLogin* instance): + LLEventAPI("LLPanelLogin", "Access to LLPanelLogin methods"), + mPanel(instance) +{ + add("onClickConnect", + "Pretend user clicked the \"Log In\" button", + &LLPanelLoginListener::onClickConnect); +} + +void LLPanelLoginListener::onClickConnect(const LLSD&) const +{ + mPanel->onClickConnect(NULL); +} diff --git a/indra/newview/llpanelloginlistener.h b/indra/newview/llpanelloginlistener.h new file mode 100644 index 0000000000..0a56c75422 --- /dev/null +++ b/indra/newview/llpanelloginlistener.h @@ -0,0 +1,30 @@ +/** + * @file llpanelloginlistener.h + * @author Nat Goodspeed + * @date 2009-12-10 + * @brief LLEventAPI for LLPanelLogin + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +#if ! defined(LL_LLPANELLOGINLISTENER_H) +#define LL_LLPANELLOGINLISTENER_H + +#include "lleventapi.h" +class LLPanelLogin; +class LLSD; + +class LLPanelLoginListener: public LLEventAPI +{ +public: + LLPanelLoginListener(LLPanelLogin* instance); + +private: + void onClickConnect(const LLSD&) const; + + LLPanelLogin* mPanel; +}; + +#endif /* ! defined(LL_LLPANELLOGINLISTENER_H) */ diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 46618d4026..f8c82f8b22 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -47,11 +47,14 @@ #include "llurlsimstring.h" #include "llweb.h" #include "llworldmapmessage.h" +#include "llurldispatcherlistener.h" // library includes #include "llnotificationsutil.h" #include "llsd.h" +static LLURLDispatcherListener sURLDispatcherListener; + class LLURLDispatcherImpl { public: diff --git a/indra/newview/llurldispatcherlistener.cpp b/indra/newview/llurldispatcherlistener.cpp new file mode 100644 index 0000000000..fea6a769c5 --- /dev/null +++ b/indra/newview/llurldispatcherlistener.cpp @@ -0,0 +1,58 @@ +/** + * @file llurldispatcherlistener.cpp + * @author Nat Goodspeed + * @date 2009-12-10 + * @brief Implementation for llurldispatcherlistener. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +// Precompiled header +#include "llviewerprecompiledheaders.h" +// associated header +#include "llurldispatcherlistener.h" +// STL headers +// std headers +// external library headers +// other Linden headers +#include "llurldispatcher.h" + +LLURLDispatcherListener::LLURLDispatcherListener(/* LLURLDispatcher* instance */): + LLEventAPI("LLURLDispatcher", "Internal URL handling") /* , + mDispatcher(instance) */ +{ + add("dispatch", + "At startup time or on clicks in internal web browsers,\n" + "teleport, open map, or run requested command.\n" + "[\"url\"] string url to dispatch\n" + "[\"trusted\"] boolean indicating trusted browser [default true]", + &LLURLDispatcherListener::dispatch); + add("dispatchRightClick", "Dispatch [\"url\"] as if from a right-click on a hot link.", + &LLURLDispatcherListener::dispatchRightClick); + add("dispatchFromTextEditor", "Dispatch [\"url\"] as if from an edit field.", + &LLURLDispatcherListener::dispatchFromTextEditor); +} + +void LLURLDispatcherListener::dispatch(const LLSD& params) const +{ + // For most purposes, we expect callers to want to be trusted. + bool trusted_browser = true; + if (params.has("trusted")) + { + // But for testing, allow a caller to specify untrusted. + trusted_browser = params["trusted"].asBoolean(); + } + LLURLDispatcher::dispatch(params["url"], NULL, trusted_browser); +} + +void LLURLDispatcherListener::dispatchRightClick(const LLSD& params) const +{ + LLURLDispatcher::dispatchRightClick(params["url"]); +} + +void LLURLDispatcherListener::dispatchFromTextEditor(const LLSD& params) const +{ + LLURLDispatcher::dispatchFromTextEditor(params["url"]); +} diff --git a/indra/newview/llurldispatcherlistener.h b/indra/newview/llurldispatcherlistener.h new file mode 100644 index 0000000000..894afcbb51 --- /dev/null +++ b/indra/newview/llurldispatcherlistener.h @@ -0,0 +1,32 @@ +/** + * @file llurldispatcherlistener.h + * @author Nat Goodspeed + * @date 2009-12-10 + * @brief LLEventAPI for LLURLDispatcher + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +#if ! defined(LL_LLURLDISPATCHERLISTENER_H) +#define LL_LLURLDISPATCHERLISTENER_H + +#include "lleventapi.h" +class LLURLDispatcher; +class LLSD; + +class LLURLDispatcherListener: public LLEventAPI +{ +public: + LLURLDispatcherListener(/* LLURLDispatcher* instance */); // all static members + +private: + void dispatch(const LLSD& params) const; + void dispatchRightClick(const LLSD& params) const; + void dispatchFromTextEditor(const LLSD& params) const; + + //LLURLDispatcher* mDispatcher; +}; + +#endif /* ! defined(LL_LLURLDISPATCHERLISTENER_H) */ -- cgit v1.2.3 From 729f3bbd340294b0ef511a341afd5cf899db55c1 Mon Sep 17 00:00:00 2001 From: Lynx Linden <lynx@lindenlab.com> Date: Fri, 11 Dec 2009 09:21:43 +0000 Subject: EXT-332: Added Buy L$ link for Exchange Rate. As per the international billing team. Just waiting for the "payment method and currency" URL now. --- indra/newview/skins/default/xui/en/floater_buy_currency.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml index 75711cdf89..26b003cafe 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml @@ -222,7 +222,7 @@ width="300" height="30" name="currency_links"> - [http://www.secondlife.com/ payment method] | [http://www.secondlife.com/ currency] | [http://www.secondlife.com exchange rate] + [http://www.secondlife.com/ payment method] | [http://www.secondlife.com/ currency] | [http://www.secondlife.com/my/account/exchange_rates.php exchange rate] </text> <text type="string" -- cgit v1.2.3 From 3c96173fceeb882416a465dd015462f48ffc76d9 Mon Sep 17 00:00:00 2001 From: Lynx Linden <lynx@lindenlab.com> Date: Fri, 11 Dec 2009 11:29:10 +0000 Subject: EXT-3119 DEV-43503 DEV-43497: Fix secondlife://app/parcel crash. The handler for secondlife:///app/parcel/{UUID}/about SLurls now opens the Place side tray and displays the parcel information there. --- indra/newview/llfloaterparcel.cpp | 6 +++++- indra/newview/llpanelplaces.cpp | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloaterparcel.cpp b/indra/newview/llfloaterparcel.cpp index 88a39a495f..e2be784116 100644 --- a/indra/newview/llfloaterparcel.cpp +++ b/indra/newview/llfloaterparcel.cpp @@ -40,6 +40,7 @@ // viewer project includes #include "llcommandhandler.h" #include "llpanelplace.h" +#include "llsidetray.h" // linden library includes #include "lluuid.h" @@ -70,7 +71,10 @@ public: { if (parcel_id.notNull()) { - LLFloaterReg::showInstance("parcel_info", LLSD(parcel_id)); + LLSD key; + key["type"] = "remote_place"; + key["id"] = parcel_id; + LLSideTray::getInstance()->showPanel("panel_places", key); return true; } } diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 4a554c1b2c..e21eb01da3 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -278,12 +278,20 @@ void LLPanelPlaces::onOpen(const LLSD& key) } else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE) { - mPosGlobal = LLVector3d(key["x"].asReal(), - key["y"].asReal(), - key["z"].asReal()); + if (key.has("id")) + { + LLUUID parcel_id = key["id"].asUUID(); + mPlaceProfile->setParcelID(parcel_id); + } + else + { + mPosGlobal = LLVector3d(key["x"].asReal(), + key["y"].asReal(), + key["z"].asReal()); + mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); + } mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE); - mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); } else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE) { -- cgit v1.2.3 From eda8634b17133df5f3104d96ad56d3626a90aad8 Mon Sep 17 00:00:00 2001 From: Lynx Linden <lynx@lindenlab.com> Date: Fri, 11 Dec 2009 15:06:32 +0000 Subject: EXT-3394: Remove manual voice gain controls. The new Vivox SDK supports Automatic Gain Control (AGC), so we shouldn't need to change the local gain level from the default of 50%. This change sets the initial gain level to 50 (instead of 62) and removes the local gain sliders from the Sound Preferences floater and the Voice Controls floater. The latter was not hooked up yet anyway. --- indra/newview/llfloatervoicedevicesettings.cpp | 32 ++--------------- indra/newview/llfloatervoicedevicesettings.h | 1 - indra/newview/llvoiceclient.cpp | 12 ++----- indra/newview/llvoiceclient.h | 2 +- .../default/xui/en/floater_voice_controls.xml | 20 ----------- .../default/xui/en/panel_preferences_sound.xml | 41 ++-------------------- 6 files changed, 8 insertions(+), 100 deletions(-) diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp index 43024a4bd0..3951f4291f 100644 --- a/indra/newview/llfloatervoicedevicesettings.cpp +++ b/indra/newview/llfloatervoicedevicesettings.cpp @@ -40,7 +40,6 @@ #include "llcombobox.h" #include "llfocusmgr.h" #include "lliconctrl.h" -#include "llsliderctrl.h" #include "llviewercontrol.h" #include "llvoiceclient.h" #include "llvoicechannel.h" @@ -61,9 +60,6 @@ LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings() mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); mDevicesUpdated = FALSE; - // grab "live" mic volume level - mMicVolume = gSavedSettings.getF32("AudioLevelMic"); - // ask for new device enumeration // now do this in onOpen() instead... //gVoiceClient->refreshDeviceLists(); @@ -75,10 +71,6 @@ LLPanelVoiceDeviceSettings::~LLPanelVoiceDeviceSettings() BOOL LLPanelVoiceDeviceSettings::postBuild() { - LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); - // set mic volume tuning slider based on last mic volume setting - volume_slider->setValue(mMicVolume); - childSetCommitCallback("voice_input_device", onCommitInputDevice, this); childSetCommitCallback("voice_output_device", onCommitOutputDevice, this); @@ -157,15 +149,6 @@ void LLPanelVoiceDeviceSettings::apply() gSavedSettings.setString("VoiceOutputAudioDevice", s); mOutputDevice = s; } - - // assume we are being destroyed by closing our embedding window - LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); - if(volume_slider) - { - F32 slider_value = (F32)volume_slider->getValue().asReal(); - gSavedSettings.setF32("AudioLevelMic", slider_value); - mMicVolume = slider_value; - } } void LLPanelVoiceDeviceSettings::cancel() @@ -178,22 +161,12 @@ void LLPanelVoiceDeviceSettings::cancel() if(mCtrlOutputDevices) mCtrlOutputDevices->setSimple(mOutputDevice); - - gSavedSettings.setF32("AudioLevelMic", mMicVolume); - LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); - if(volume_slider) - { - volume_slider->setValue(mMicVolume); - } } void LLPanelVoiceDeviceSettings::refresh() { - //grab current volume - LLSlider* volume_slider = getChild<LLSlider>("mic_volume_slider"); - // set mic volume tuning slider based on last mic volume setting - F32 current_volume = (F32)volume_slider->getValue().asReal(); - gVoiceClient->tuningSetMicVolume(current_volume); + // update the live input level display + gVoiceClient->tuningSetMicVolume(); // Fill in popup menus mCtrlInputDevices = getChild<LLComboBox>("voice_input_device"); @@ -263,7 +236,6 @@ void LLPanelVoiceDeviceSettings::initialize() { mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); - mMicVolume = gSavedSettings.getF32("AudioLevelMic"); mDevicesUpdated = FALSE; // ask for new device enumeration diff --git a/indra/newview/llfloatervoicedevicesettings.h b/indra/newview/llfloatervoicedevicesettings.h index d67283d0a2..20958af780 100644 --- a/indra/newview/llfloatervoicedevicesettings.h +++ b/indra/newview/llfloatervoicedevicesettings.h @@ -56,7 +56,6 @@ protected: static void onCommitInputDevice(LLUICtrl* ctrl, void* user_data); static void onCommitOutputDevice(LLUICtrl* ctrl, void* user_data); - F32 mMicVolume; std::string mInputDevice; std::string mOutputDevice; class LLComboBox *mCtrlInputDevices; diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 63acba50e7..aa69b46857 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -128,16 +128,8 @@ static int scale_mic_volume(float volume) static int scale_speaker_volume(float volume) { // incoming volume has the range [0.0 ... 1.0], with 0.5 as the default. - // Map it as follows: 0.0 -> 0, 0.5 -> 62, 1.0 -> 75 - - volume -= 0.5f; // offset volume to the range [-0.5 ... 0.5], with 0 at the default. - int scaled_volume = 62; // offset scaled_volume by its default level - if(volume < 0.0f) - scaled_volume += ((int)(volume * 124.0f)); // (62 - 0) * 2 - else - scaled_volume += ((int)(volume * 26.0f)); // (75 - 62) * 2 - - return scaled_volume; + // Map it as follows: 0.0 -> 0, 0.5 -> 50, 1.0 -> 100 + return (int)(volume * 100.0f); } class LLViewerVoiceAccountProvisionResponder : diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index edfe0173f8..92e79a004d 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -125,7 +125,7 @@ class LLVoiceClient: public LLSingleton<LLVoiceClient> void tuningCaptureStartSendMessage(int duration); void tuningCaptureStopSendMessage(); - void tuningSetMicVolume(float volume); + void tuningSetMicVolume(float volume=0.5f); void tuningSetSpeakerVolume(float volume); float tuningGetEnergy(void); diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index 1ebc51f504..c1a211967c 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -105,26 +105,6 @@ top="0" width="24" /> </layout_panel> - <layout_panel - layout="topleft" - name="volume_slider_panel" - top="0" - user_resize="false" - width="138"> - <slider_bar - control_name="AudioLevelMic" - follows="left|right|top" - height="24" - increment="0.05" - layout="topleft" - left="0" - max_val="2" - name="volume_slider_bar" - tool_tip="Master Volume" - top="0" - value="0.75" - width="138" /> - </layout_panel> <layout_panel auto_resize="false" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 102a53ad90..5332007baf 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -399,31 +399,6 @@ name="voice_input_device" top_pad="0" width="200" /> - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - left="165" - name="My volume label" - top_pad="10" - width="200"> - My volume: - </text> - <slider_bar - control_name="AudioLevelMic" - follows="left|top" - height="17" - increment="0.05" - initial_value="1.0" - layout="topleft" - left="160" - max_val="2" - name="mic_volume_slider" - tool_tip="Change the volume using this slider" - top_pad="0" - width="220" /> <text type="string" text_color="EmphasisColor" @@ -433,7 +408,7 @@ layout="topleft" left_pad="5" name="wait_text" - top_delta="0" + top_delta="5" width="110"> Please wait </text> @@ -442,7 +417,7 @@ layout="topleft" left_delta="0" name="bar0" - top_delta="5" + top_delta="-5" width="20" /> <locate height="20" @@ -472,23 +447,13 @@ name="bar4" top_delta="0" width="20" /> - <!-- <text - type="string" - height="37" - left="30" - name="voice_intro_text1" - top_pad="-4" - width="410" - word_wrap="true"> - Adjust the slider to control how loud you sound to other people. To test your volume, simply speak into your microphone - </text>--> <icon height="18" image_name="Parcel_Voice_Light" left="80" name="speaker_icon" mouse_opaque="false" - top_pad="-8" + top_pad="4" visible="true" width="22" /> <text -- cgit v1.2.3 From 3089e1a17a1f5bac1487fa56796f2b52244886e9 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" <nyx@lindenlab.com> Date: Fri, 11 Dec 2009 12:07:35 -0500 Subject: EXT-2718 avatar render cost higher in 2.0 than in 1.23 previous fix fixed the double-counting of texture costs. resulting ARC was ~99 points higher for most avatars. This patch makes the cost shoot up again, as ARC was improperly computed in 1.23 and before. This makes the cost for an avatar increase 10 points per prim instead of per-attachment, which is how we have documented it. Also used constants to eliminate magic numbers and increased ARC limit from 1024 to 2048. Will request feedback on change from BSI:STU Code reviewed by Bigpapi --HG-- branch : avatar-pipeline --- indra/newview/llfloatertools.cpp | 2 +- indra/newview/llvoavatar.cpp | 12 +++++++----- indra/newview/llvovolume.cpp | 29 +++++++++++++++++++++++++++-- indra/newview/llvovolume.h | 2 ++ 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 6ba032c152..d08d47bc81 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -991,7 +991,7 @@ S32 LLFloaterTools::calcRenderCost() if (viewer_volume) { cost += viewer_volume->getRenderCost(textures); - cost += textures.size() * 5; + cost += textures.size() * LLVOVolume::ARC_TEXTURE_COST; textures.clear(); } } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 03910b0534..226d85ec99 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7651,6 +7651,9 @@ void LLVOAvatar::getImpostorValues(LLVector3* extents, LLVector3& angle, F32& di void LLVOAvatar::idleUpdateRenderCost() { + static const U32 ARC_BODY_PART_COST = 20; + static const U32 ARC_LIMIT = 2048; + if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHAME)) { return; @@ -7667,7 +7670,7 @@ void LLVOAvatar::idleUpdateRenderCost() { if (isTextureVisible(tex_index)) { - cost +=20; + cost +=ARC_BODY_PART_COST; } } } @@ -7687,7 +7690,6 @@ void LLVOAvatar::idleUpdateRenderCost() const LLDrawable* drawable = attached_object->mDrawable; if (drawable) { - cost += 10; const LLVOVolume* volume = drawable->getVOVolume(); if (volume) { @@ -7698,11 +7700,11 @@ void LLVOAvatar::idleUpdateRenderCost() } } - cost += textures.size() * 5; + cost += textures.size() * LLVOVolume::ARC_TEXTURE_COST; setDebugText(llformat("%d", cost)); - F32 green = 1.f-llclamp(((F32) cost-1024.f)/1024.f, 0.f, 1.f); - F32 red = llmin((F32) cost/1024.f, 1.f); + F32 green = 1.f-llclamp(((F32) cost-(F32)ARC_LIMIT)/(F32)ARC_LIMIT, 0.f, 1.f); + F32 red = llmin((F32) cost/(F32)ARC_LIMIT, 1.f); mText->setColor(LLColor4(red,green,0,1)); } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index cf61994fea..36d6d2c04b 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2587,7 +2587,22 @@ const LLMatrix4 LLVOVolume::getRenderMatrix() const // children, and cost should only be increased for unique textures -Nyx U32 LLVOVolume::getRenderCost(std::set<LLUUID> &textures) const { - U32 shame = 0; + // base cost of each prim should be 10 points + static const U32 ARC_PRIM_COST = 10; + // per-prim costs + static const U32 ARC_INVISI_COST = 1; + static const U32 ARC_SHINY_COST = 1; + static const U32 ARC_GLOW_COST = 1; + static const U32 ARC_FLEXI_COST = 8; + static const U32 ARC_PARTICLE_COST = 16; + static const U32 ARC_BUMP_COST = 4; + + // per-face costs + static const U32 ARC_PLANAR_COST = 1; + static const U32 ARC_ANIM_TEX_COST = 4; + static const U32 ARC_ALPHA_COST = 4; + + U32 shame = ARC_PRIM_COST; U32 invisi = 0; U32 shiny = 0; @@ -2663,7 +2678,17 @@ U32 LLVOVolume::getRenderCost(std::set<LLUUID> &textures) const } } - shame += invisi + shiny + glow + alpha*4 + flexi*8 + animtex*4 + particles*16+bump*4+scale+planar; + + shame += invisi * ARC_INVISI_COST; + shame += shiny * ARC_SHINY_COST; + shame += glow * ARC_GLOW_COST; + shame += alpha * ARC_ALPHA_COST; + shame += flexi * ARC_FLEXI_COST; + shame += animtex * ARC_ANIM_TEX_COST; + shame += particles * ARC_PARTICLE_COST; + shame += bump * ARC_BUMP_COST; + shame += planar * ARC_PLANAR_COST; + shame += scale; LLViewerObject::const_child_list_t& child_list = getChildren(); for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 06e214b41e..fe4b5488fa 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -310,6 +310,8 @@ public: static LLPointer<LLObjectMediaDataClient> sObjectMediaClient; static LLPointer<LLObjectMediaNavigateClient> sObjectMediaNavigateClient; + static const U32 ARC_TEXTURE_COST = 5; + protected: static S32 sNumLODChanges; -- cgit v1.2.3 From c74d5c483cbd75c5e2a0b17c8980755a9932c53a Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" <nyx@lindenlab.com> Date: Fri, 11 Dec 2009 12:47:36 -0500 Subject: EXT-3317 missing string in appearance editor name string wasn't capitalized so couldn't find the actual label to apply. capitalizing "Wrinkles" makes the string be found. yay. Reviewed by Vir --- indra/newview/character/avatar_lad.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index d7182dfaab..ae89eb4413 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -9283,7 +9283,7 @@ render_pass="bump"> wearable="skin" edit_group="skin_facedetail" edit_group_order="3" - name="wrinkles" + name="Wrinkles" label_min="Less" label_max="More" value_min="0" -- cgit v1.2.3 From 1f3a55470919bf451f9c45b454d9bbf815a3e88a Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" <tulla@lindenlab.com> Date: Fri, 11 Dec 2009 14:16:46 -0500 Subject: Minor gcc compile fix --HG-- branch : avatar-pipeline --- indra/newview/llinventorybridge.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1ff6f00cc5..26a8a707b8 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -535,6 +535,8 @@ bool isWornLink(LLUUID link_id) if (LLGestureManager::instance().isGestureActive(item->getUUID())) return true; break; + default: + break; } return false; } -- cgit v1.2.3