diff options
Diffstat (limited to 'indra/newview')
31 files changed, 231 insertions, 192 deletions
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index c83494df25..3d3c13f5d8 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -35,7 +35,7 @@ icon="Command_Build_Icon" label_ref="Command_Build_Label" tooltip_ref="Command_Build_Tooltip" - execute_function="Floater.ToggleOrBringToFront" + execute_function="Build.Toggle" execute_parameters="build" is_enabled_function="Agent.IsActionAllowed" is_enabled_parameters="build" @@ -88,8 +88,7 @@ label_ref="Command_HowTo_Label" tooltip_ref="Command_HowTo_Tooltip" execute_function="Help.ToggleHowTo" - is_running_function="Floater.IsOpen" - is_running_parameters="help_browser" + is_running_function="Help.HowToVisible" /> <command name="inventory" available_in_toybox="true" @@ -112,7 +111,7 @@ is_running_parameters="world_map" /> <command name="marketplace" - available_in_toybox="true" + available_in_toybox="false" icon="Command_Marketplace_Icon" label_ref="Command_Marketplace_Label" tooltip_ref="Command_Marketplace_Tooltip" diff --git a/indra/newview/app_settings/toolbars.xml b/indra/newview/app_settings/toolbars.xml index 8eb438b857..f2192a75ad 100644 --- a/indra/newview/app_settings/toolbars.xml +++ b/indra/newview/app_settings/toolbars.xml @@ -18,8 +18,7 @@ <command name="inventory"/> <command name="search"/> <command name="places"/> - <command name="marketplace"/> <command name="voice"/> <command name="minimap"/> </left_toolbar> -</toolbars>
\ No newline at end of file +</toolbars> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 10aa67c78f..773e20eda7 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -68,6 +68,7 @@ #include "llstatusbar.h" #include "llteleportflags.h" #include "lltool.h" +#include "lltoolbarview.h" #include "lltoolpie.h" #include "lltoolmgr.h" #include "lltrans.h" @@ -1862,6 +1863,7 @@ void LLAgent::endAnimationUpdateUI() // clean up UI from mode we're leaving if (gAgentCamera.getLastCameraMode() == CAMERA_MODE_MOUSELOOK ) { + gToolBarView->setToolBarsVisible(true); // show mouse cursor gViewerWindow->showCursor(); // show menus @@ -1971,7 +1973,12 @@ void LLAgent::endAnimationUpdateUI() //--------------------------------------------------------------------- if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) { - // hide menus + // clean up UI + // first show anything hidden by UI toggle + gViewerWindow->setUIVisibility(TRUE); + + // then hide stuff we want hidden for mouselook + gToolBarView->setToolBarsVisible(false); gMenuBarView->setVisible(FALSE); LLNavigationBar::getInstance()->setVisible(FALSE); gStatusBar->setVisibleForMouselook(false); diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index f195c985c0..751b73e1eb 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2040,11 +2040,12 @@ void LLAgentCamera::resetCamera() //----------------------------------------------------------------------------- void LLAgentCamera::changeCameraToMouselook(BOOL animate) { - if (!gSavedSettings.getBOOL("EnableMouselook") || LLViewerJoystick::getInstance()->getOverrideCamera()) + if (!gSavedSettings.getBOOL("EnableMouselook") + || LLViewerJoystick::getInstance()->getOverrideCamera()) { return; } - + // visibility changes at end of animation gViewerWindow->getWindow()->resetBusyCount(); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5d2b900510..20fa26915b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4293,10 +4293,7 @@ void LLAppViewer::idle() return; } - if (!quitRequested()) - { - gViewerWindow->updateUI(); - } + gViewerWindow->updateUI(); /////////////////////////////////////// // Agent and camera movement diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 4ab3d8dc98..59842aeb6c 100644 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -68,7 +68,7 @@ LLChannelManager::~LLChannelManager() LLScreenChannel* LLChannelManager::createNotificationChannel() { // creating params for a channel - LLChannelManager::Params p; + LLScreenChannelBase::Params p; p.id = LLUUID(gSavedSettings.getString("NotificationChannelUUID")); p.channel_align = CA_RIGHT; @@ -106,7 +106,7 @@ void LLChannelManager::onLoginCompleted() else { // create a channel for the StartUp Toast - LLChannelManager::Params p; + LLScreenChannelBase::Params p; p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID")); p.channel_align = CA_RIGHT; mStartUpChannel = createChannel(p); @@ -164,26 +164,15 @@ LLScreenChannelBase* LLChannelManager::addChannel(LLScreenChannelBase* channel) return channel; } -LLScreenChannel* LLChannelManager::createChannel(LLChannelManager::Params& p) +LLScreenChannel* LLChannelManager::createChannel(LLScreenChannelBase::Params& p) { - LLScreenChannel* new_channel = new LLScreenChannel(p.id); + LLScreenChannel* new_channel = new LLScreenChannel(p); - if(!new_channel) - { - llerrs << "LLChannelManager::getChannel(LLChannelManager::Params& p) - can't create a channel!" << llendl; - } - else - { - new_channel->setToastAlignment(p.toast_align); - new_channel->setChannelAlignment(p.channel_align); - new_channel->setDisplayToastsAlways(p.display_toasts_always); - - addChannel(new_channel); - } + addChannel(new_channel); return new_channel; } -LLScreenChannelBase* LLChannelManager::getChannel(LLChannelManager::Params& p) +LLScreenChannelBase* LLChannelManager::getChannel(LLScreenChannelBase::Params& p) { LLScreenChannelBase* new_channel = findChannelByID(p.id); @@ -195,7 +184,7 @@ LLScreenChannelBase* LLChannelManager::getChannel(LLChannelManager::Params& p) } //-------------------------------------------------------------------------- -LLScreenChannelBase* LLChannelManager::findChannelByID(const LLUUID id) +LLScreenChannelBase* LLChannelManager::findChannelByID(const LLUUID& id) { std::vector<ChannelElem>::iterator it = find(mChannelList.begin(), mChannelList.end(), id); if(it != mChannelList.end()) @@ -207,7 +196,7 @@ LLScreenChannelBase* LLChannelManager::findChannelByID(const LLUUID id) } //-------------------------------------------------------------------------- -void LLChannelManager::removeChannelByID(const LLUUID id) +void LLChannelManager::removeChannelByID(const LLUUID& id) { std::vector<ChannelElem>::iterator it = find(mChannelList.begin(), mChannelList.end(), id); if(it != mChannelList.end()) diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h index 1a0b98f6cf..671e545465 100644 --- a/indra/newview/llchannelmanager.h +++ b/indra/newview/llchannelmanager.h @@ -44,17 +44,7 @@ namespace LLNotificationsUI class LLChannelManager : public LLSingleton<LLChannelManager> { public: - struct Params - { - LLUUID id; - bool display_toasts_always; - EToastAlignment toast_align; - EChannelAlignment channel_align; - Params() - : id(LLUUID("")), display_toasts_always(false), toast_align(NA_BOTTOM), channel_align(CA_LEFT) - {} - }; struct ChannelElem { @@ -84,18 +74,18 @@ public: void onStartUpToastClose(); // creates a new ScreenChannel according to the given parameters or returns existing if present - LLScreenChannelBase* getChannel(LLChannelManager::Params& p); + LLScreenChannelBase* getChannel(LLScreenChannelBase::Params& p); LLScreenChannelBase* addChannel(LLScreenChannelBase* channel); // returns a channel by its ID - LLScreenChannelBase* findChannelByID(const LLUUID id); + LLScreenChannelBase* findChannelByID(const LLUUID& id); // creator of the Notification channel, that is used in more than one handler LLScreenChannel* createNotificationChannel(); // remove channel methods - void removeChannelByID(const LLUUID id); + void removeChannelByID(const LLUUID& id); /** * Manages toasts showing for all channels. @@ -117,7 +107,7 @@ public: std::vector<ChannelElem>& getChannelList() { return mChannelList;} private: - LLScreenChannel* createChannel(LLChannelManager::Params& p); + LLScreenChannel* createChannel(LLScreenChannelBase::Params& p); LLScreenChannel* mStartUpChannel; std::vector<ChannelElem> mChannelList; diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index c76aeb0498..f410c31f44 100644 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -48,13 +48,15 @@ LLFloaterWebContent::_Params::_Params() show_chrome("show_chrome", true), allow_address_entry("allow_address_entry", true), preferred_media_size("preferred_media_size"), - trusted_content("trusted_content", false) + trusted_content("trusted_content", false), + show_page_title("show_page_title", true) {} LLFloaterWebContent::LLFloaterWebContent( const Params& params ) : LLFloater( params ), LLInstanceTracker<LLFloaterWebContent, std::string>(params.id()), - mUUID(params.id()) + mUUID(params.id()), + mShowPageTitle(params.show_page_title) { mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this )); mCommitCallbackRegistrar.add( "WebContent.Forward", boost::bind( &LLFloaterWebContent::onClickForward, this )); @@ -359,10 +361,13 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent { std::string page_title = self->getMediaName(); // simulate browser behavior - title is empty, use the current URL - if ( page_title.length() > 0 ) - setTitle( page_title ); - else - setTitle( mCurrentURL ); + if (mShowPageTitle) + { + if ( page_title.length() > 0 ) + setTitle( page_title ); + else + setTitle( mCurrentURL ); + } } else if(event == MEDIA_EVENT_LINK_HOVERED ) { diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h index 36e214b7a9..6fc66d1ad8 100644 --- a/indra/newview/llfloaterwebcontent.h +++ b/indra/newview/llfloaterwebcontent.h @@ -53,7 +53,8 @@ public: id; Optional<bool> show_chrome, allow_address_entry, - trusted_content; + trusted_content, + show_page_title; Optional<LLRect> preferred_media_size; _Params(); @@ -91,13 +92,14 @@ protected: void open_media(const Params& ); void set_current_url(const std::string& url); - LLMediaCtrl* mWebBrowser; - LLComboBox* mAddressCombo; - LLIconCtrl *mSecureLockIcon; - LLTextBox* mStatusBarText; - LLProgressBar* mStatusBarProgress; - std::string mCurrentURL; - std::string mUUID; + LLMediaCtrl* mWebBrowser; + LLComboBox* mAddressCombo; + LLIconCtrl* mSecureLockIcon; + LLTextBox* mStatusBarText; + LLProgressBar* mStatusBarProgress; + std::string mCurrentURL; + std::string mUUID; + bool mShowPageTitle; }; #endif // LL_LLFLOATERWEBCONTENT_H diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 49f2dc082c..52d4971b2d 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -41,6 +41,8 @@ #include "llfloaterreg.h"//for LLFloaterReg::getTypedInstance #include "llviewerwindow.h"//for screen channel position #include "llnearbychatbar.h" +#include "llrootview.h" +#include "lllayoutstack.h" //add LLNearbyChatHandler to LLNotificationsUI namespace using namespace LLNotificationsUI; @@ -61,7 +63,7 @@ public: typedef std::vector<LLHandle<LLToast> > toast_vec_t; typedef std::list<LLHandle<LLToast> > toast_list_t; - LLNearbyChatScreenChannel(const LLUUID& id):LLScreenChannelBase(id) + LLNearbyChatScreenChannel(const Params& p):LLScreenChannelBase(p) { mStopProcessing = false; @@ -80,7 +82,6 @@ public: void addNotification (LLSD& notification); void arrangeToasts (); - void showToastsBottom (); typedef boost::function<LLToastPanelBase* (void )> create_toast_panel_callback_t; void setCreatePanelCallback(create_toast_panel_callback_t value) { m_create_toast_panel_callback_t = value;} @@ -149,6 +150,7 @@ protected: toast_list_t m_toast_pool; bool mStopProcessing; + bool mChannelRect; }; //----------------------------------------------------------------------------------------------- @@ -351,27 +353,6 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) arrangeToasts(); } -void LLNearbyChatScreenChannel::arrangeToasts() -{ - if(!isHovering()) - { - showToastsBottom(); - } - - if (m_active_toasts.empty()) - { - LLHints::registerHintTarget("incoming_chat", LLHandle<LLView>()); - } - else - { - LLToast* toast = m_active_toasts.front().get(); - if (toast) - { - LLHints::registerHintTarget("incoming_chat", m_active_toasts.front().get()->LLView::getHandle()); - } - } -} - static bool sort_toasts_predicate(LLHandle<LLToast> first, LLHandle<LLToast> second) { if (!first.get() || !second.get()) return false; // STORM-1352 @@ -381,14 +362,30 @@ static bool sort_toasts_predicate(LLHandle<LLToast> first, LLHandle<LLToast> sec return v1 > v2; } -void LLNearbyChatScreenChannel::showToastsBottom() +void LLNearbyChatScreenChannel::arrangeToasts() { - if(mStopProcessing) + if(mStopProcessing || isHovering()) + return; + LLLayoutStack::updateClass(); + LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region"); + + if (!getParent()) + { + // connect to floater snap region to get resize events + floater_snap_region->addChild(this); + setFollows(FOLLOWS_ALL); + } + LLRect toast_rect; updateBottom(); - S32 channel_bottom = getRect().mBottom; + + LLRect channel_rect; + floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &channel_rect, gFloaterView); + channel_rect.mRight = channel_rect.mLeft + 300; + + S32 channel_bottom = channel_rect.mBottom; S32 bottom = channel_bottom; S32 margin = gSavedSettings.getS32("ToastGap"); @@ -409,7 +406,7 @@ void LLNearbyChatScreenChannel::showToastsBottom() S32 toast_top = bottom + toast->getRect().getHeight() + margin; - if(toast_top > gFloaterView->getRect().getHeight()) + if(toast_top > channel_rect.getHeight()) { while(it!=m_active_toasts.end()) { @@ -420,7 +417,7 @@ void LLNearbyChatScreenChannel::showToastsBottom() } toast_rect = toast->getRect(); - toast_rect.setLeftTopAndSize(getRect().mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight()); + toast_rect.setLeftTopAndSize(channel_rect.mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight()); toast->setRect(toast_rect); bottom += toast_rect.getHeight() - toast->getTopPad() + margin; @@ -457,7 +454,9 @@ LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& i mType = type; // Getting a Channel for our notifications - LLNearbyChatScreenChannel* channel = new LLNearbyChatScreenChannel(LLUUID(gSavedSettings.getString("NearByChatChannelUUID"))); + LLNearbyChatScreenChannel::Params p; + p.id = LLUUID(gSavedSettings.getString("NearByChatChannelUUID")); + LLNearbyChatScreenChannel* channel = new LLNearbyChatScreenChannel(p); LLNearbyChatScreenChannel::create_toast_panel_callback_t callback = createToastPanel; @@ -473,11 +472,8 @@ LLNearbyChatHandler::~LLNearbyChatHandler() void LLNearbyChatHandler::initChannel() { - LLNearbyChatBar* chat_bar = LLFloaterReg::getTypedInstance<LLNearbyChatBar>("chat_bar", LLSD()); - LLView* chat_box = chat_bar->getChatBox(); - LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); - S32 channel_right_bound = nearby_chat->getRect().mRight; - mChannel->init(chat_box->getRect().mLeft, channel_right_bound); + //LLRect snap_rect = gFloaterView->getSnapRect(); + //mChannel->init(snap_rect.mLeft, snap_rect.mLeft + 200); } diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp index 9d824dcd59..cae7d02fed 100644 --- a/indra/newview/llnotificationalerthandler.cpp +++ b/indra/newview/llnotificationalerthandler.cpp @@ -44,7 +44,7 @@ LLAlertHandler::LLAlertHandler(e_notification_type type, const LLSD& id) : mIsMo { mType = type; - LLChannelManager::Params p; + LLScreenChannelBase::Params p; p.id = LLUUID(gSavedSettings.getString("AlertChannelUUID")); p.display_toasts_always = true; p.toast_align = NA_CENTRE; @@ -114,7 +114,7 @@ bool LLAlertHandler::processNotification(const LLSD& notify) // Show alert in middle of progress view (during teleport) (EXT-1093) LLProgressView* progress = gViewerWindow->getProgressView(); LLRect rc = progress && progress->getVisible() ? progress->getRect() : gViewerWindow->getWorldViewRectScaled(); - mChannel->updatePositionAndSize(rc, rc); + mChannel->updatePositionAndSize(rc); LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); if(channel) diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index a3b0574bca..71b6c18d8f 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -48,29 +48,38 @@ using namespace LLNotificationsUI; bool LLScreenChannel::mWasStartUpToastShown = false; + +LLRect get_channel_rect() +{ + LLRect channel_rect; + LLView* floater_snap_region = LLUI::getRootView()->getChildView("floater_snap_region"); + floater_snap_region->localRectToScreen(floater_snap_region->getLocalRect(), &channel_rect); + return channel_rect; +} + + //-------------------------------------------------------------------------- ////////////////////// // LLScreenChannelBase ////////////////////// -LLScreenChannelBase::LLScreenChannelBase(const LLUUID& id) : - mToastAlignment(NA_BOTTOM) - ,mCanStoreToasts(true) - ,mHiddenToastsNum(0) - ,mHoveredToast(NULL) - ,mControlHovering(false) - ,mShowToasts(true) +LLScreenChannelBase::LLScreenChannelBase(const Params& p) +: LLUICtrl(p), + mToastAlignment(p.toast_align), + mCanStoreToasts(true), + mHiddenToastsNum(0), + mHoveredToast(NULL), + mControlHovering(false), + mShowToasts(true), + mID(p.id), + mDisplayToastsAlways(p.display_toasts_always), + mChannelAlignment(p.channel_align) { - mID = id; - mWorldViewRectConnection = gViewerWindow->setOnWorldViewRectUpdated(boost::bind(&LLScreenChannelBase::updatePositionAndSize, this, _1, _2)); + mID = p.id; setMouseOpaque( false ); setVisible(FALSE); } -LLScreenChannelBase::~LLScreenChannelBase() -{ - mWorldViewRectConnection.disconnect(); -} bool LLScreenChannelBase::isHovering() { @@ -82,21 +91,20 @@ bool LLScreenChannelBase::isHovering() return mHoveredToast->isHovered(); } -void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect) +void LLScreenChannelBase::updatePositionAndSize(LLRect rect) { - S32 top_delta = old_world_rect.mTop - new_world_rect.mTop; LLRect this_rect = getRect(); - this_rect.mTop -= top_delta; + this_rect.mTop = rect.mTop; 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()); + this_rect.setCenterAndSize( (rect.getWidth()) / 2, rect.getHeight() / 2, this_rect.getWidth(), this_rect.getHeight()); break; case CA_RIGHT : - this_rect.setLeftTopAndSize(new_world_rect.mRight - this_rect.getWidth(), + this_rect.setLeftTopAndSize(rect.mRight - this_rect.getWidth(), this_rect.mTop, this_rect.getWidth(), this_rect.getHeight()); @@ -116,31 +124,30 @@ void LLScreenChannelBase::init(S32 channel_left, S32 channel_right) void LLScreenChannelBase::updateBottom() { - S32 channel_top = gViewerWindow->getWorldViewRectScaled().getHeight(); - S32 channel_bottom = gSavedSettings.getS32("ChannelBottomPanelMargin"); + S32 channel_top = get_channel_rect().mTop; + S32 channel_bottom = get_channel_rect().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin"); S32 channel_left = getRect().mLeft; S32 channel_right = getRect().mRight; setRect(LLRect(channel_left, channel_top, channel_right, channel_bottom)); } - //-------------------------------------------------------------------------- ////////////////////// // LLScreenChannel ////////////////////// //-------------------------------------------------------------------------- -LLScreenChannel::LLScreenChannel(LLUUID& id): -LLScreenChannelBase(id) -,mStartUpToastPanel(NULL) -{ +LLScreenChannel::LLScreenChannel(const Params& p) +: LLScreenChannelBase(p), + mStartUpToastPanel(NULL) +{ } //-------------------------------------------------------------------------- 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); + LLRect channel_rect = get_channel_rect(); + updatePositionAndSize(channel_rect); } //-------------------------------------------------------------------------- @@ -177,7 +184,7 @@ std::list<LLToast*> LLScreenChannel::findToasts(const Matcher& matcher) } //-------------------------------------------------------------------------- -void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect) +void LLScreenChannel::updatePositionAndSize(LLRect new_world_rect) { LLRect this_rect = getRect(); @@ -187,7 +194,7 @@ void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_wo this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio()); break; case CA_CENTRE : - LLScreenChannelBase::updatePositionAndSize(old_world_rect, new_world_rect); + LLScreenChannelBase::updatePositionAndSize(new_world_rect); return; case CA_RIGHT : this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio()); @@ -511,9 +518,9 @@ void LLScreenChannel::showToastsBottom() (*it).toast->translate(0, shift); } - LLRect world_rect = gViewerWindow->getWorldViewRectScaled(); + LLRect channel_rect = get_channel_rect(); // don't show toasts if there is not enough space - if(toast_rect.mTop > world_rect.mTop) + if(toast_rect.mTop > channel_rect.mTop) { break; } diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h index 8f11c82673..4d8e3e9e93 100644 --- a/indra/newview/llscreenchannel.h +++ b/indra/newview/llscreenchannel.h @@ -53,21 +53,30 @@ class LLScreenChannelBase : public LLUICtrl { friend class LLChannelManager; public: - LLScreenChannelBase(const LLUUID& id); - ~LLScreenChannelBase(); + struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> + { + Mandatory<LLUUID> id; + Optional<bool> display_toasts_always; + Optional<EToastAlignment> toast_align; + Optional<EChannelAlignment> channel_align; + + Params() + : id("id", LLUUID("")), + display_toasts_always("display_toasts_always", false), + toast_align("toast_align", NA_BOTTOM), + channel_align("channel_align", CA_LEFT) + {} + }; + + LLScreenChannelBase(const Params&); // Channel's outfit-functions // update channel's size and position in the World View - virtual void updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect); + virtual void updatePositionAndSize(LLRect rect); // initialization of channel's shape and position virtual void init(S32 channel_left, S32 channel_right); - - virtual void setToastAlignment(EToastAlignment align) {mToastAlignment = align;} - - virtual void setChannelAlignment(EChannelAlignment align) {mChannelAlignment = align;} - // kill or modify a toast by its ID virtual void killToastByNotificationID(LLUUID id) {}; virtual void modifyToastNotificationByID(LLUUID id, LLSD data) {}; @@ -90,7 +99,6 @@ public: void setCanStoreToasts(bool store) { mCanStoreToasts = store; } - void setDisplayToastsAlways(bool display_toasts) { mDisplayToastsAlways = display_toasts; } bool getDisplayToastsAlways() { return mDisplayToastsAlways; } // get number of hidden notifications from a channel @@ -124,9 +132,6 @@ protected: // channel's ID LLUUID mID; - - // store a connection to prevent futher crash that is caused by sending a signal to a destroyed channel - boost::signals2::connection mWorldViewRectConnection; }; @@ -137,7 +142,7 @@ class LLScreenChannel : public LLScreenChannelBase { friend class LLChannelManager; public: - LLScreenChannel(LLUUID& id); + LLScreenChannel(const Params&); virtual ~LLScreenChannel(); class Matcher @@ -152,7 +157,7 @@ public: // Channel's outfit-functions // update channel's size and position in the World View - void updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect); + void updatePositionAndSize(LLRect new_rect); // initialization of channel's shape and position void init(S32 channel_left, S32 channel_right); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 1b8be7a5b2..75db269bde 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -169,6 +169,8 @@ BOOL LLStatusBar::postBuild() getChild<LLUICtrl>("buyL")->setCommitCallback( boost::bind(&LLStatusBar::onClickBuyCurrency, this)); + getChild<LLUICtrl>("goShop")->setCommitCallback(boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL"))); + mBoxBalance = getChild<LLTextBox>("balance"); mBoxBalance->setClickedCallback( &LLStatusBar::onClickBalance, this ); @@ -345,9 +347,10 @@ void LLStatusBar::setBalance(S32 balance) const S32 HPAD = 24; LLRect balance_rect = mBoxBalance->getTextBoundingRect(); LLRect buy_rect = getChildView("buyL")->getRect(); + LLRect shop_rect = getChildView("goShop")->getRect(); LLView* balance_bg_view = getChildView("balance_bg"); LLRect balance_bg_rect = balance_bg_view->getRect(); - balance_bg_rect.mLeft = balance_bg_rect.mRight - (buy_rect.getWidth() + balance_rect.getWidth() + HPAD); + balance_bg_rect.mLeft = balance_bg_rect.mRight - (buy_rect.getWidth() + shop_rect.getWidth() + balance_rect.getWidth() + HPAD); balance_bg_view->setShape(balance_bg_rect); } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index b5ed8b04bc..7621806918 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -288,8 +288,8 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>); LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSnapshot>); LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>); - LLFloaterReg::add("profile", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); - LLFloaterReg::add("how_to", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); + LLFloaterReg::add("profile", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); + LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); LLFloaterUIPreviewUtil::registerFloater(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 6ce0c358a1..560cc2a314 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3114,7 +3114,8 @@ void handle_avatar_eject(const LLSD& avatar_id) bool my_profile_visible() { - return LLAvatarActions::profileVisible(gAgent.getID()); + LLFloater* floaterp = LLFloaterReg::findInstance("profile", LLSD().with("id", gAgent.getID())); + return floaterp && floaterp->isInVisibleChain(); } bool enable_freeze_eject(const LLSD& avatar_id) @@ -4524,7 +4525,7 @@ bool enable_how_to_visible(const LLSD& param) { LLFloaterWebContent::Params p; p.target = "__help_how_to"; - return LLFloaterReg::instanceVisible(param, p); + return LLFloaterReg::instanceVisible("how_to", p); } class LLToolsEnableBuyOrTake : public view_listener_t @@ -6892,9 +6893,12 @@ class LLToggleHowTo : public view_listener_t { LLFloaterWebContent::Params p; p.url = gSavedSettings.getString("HowToHelpURL"); + p.show_chrome = false; p.target = "__help_how_to"; + p.show_page_title = false; + p.preferred_media_size = LLRect(0, 460, 335, 0); - LLFloaterReg::toggleInstanceOrBringToFront(userdata, p); + LLFloaterReg::toggleInstanceOrBringToFront("how_to", p); return true; } }; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1f8bac5069..af7c92ff0f 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -938,6 +938,11 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK // } //} + // Mark the click as handled and return if we aren't within the root view to avoid spurious bugs + if( !mRootView->pointInView(x, y) ) + { + return TRUE; + } // Give the UI views a chance to process the click if( mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ) { @@ -4981,22 +4986,24 @@ void LLViewerWindow::setUIVisibility(bool visible) { mUIVisible = visible; - if (gToolBarView) - { - gToolBarView->setToolBarsVisible(visible); - } - - mRootView->getChildView("nav_bar_container")->setVisible(visible); - mRootView->getChildView("status_bar_container")->setVisible(visible); - if (!visible) { + gAgentCamera.changeCameraToThirdPerson(FALSE); gFloaterView->hideAllFloaters(); } else { gFloaterView->showHiddenFloaters(); } + + if (gToolBarView) + { + gToolBarView->setToolBarsVisible(visible); + } + + mRootView->getChildView("topinfo_bar_container")->setVisible(visible); + mRootView->getChildView("nav_bar_container")->setVisible(visible); + mRootView->getChildView("status_bar_container")->setVisible(visible); } bool LLViewerWindow::getUIVisibility() diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 25f1903131..53a5de0189 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -137,6 +137,7 @@ with the same filename but different name <texture name="Command_Inventory_Icon" file_name="toolbar_icons/inventory.png" preload="true" /> <texture name="Command_Map_Icon" file_name="toolbar_icons/map.png" preload="true" /> <texture name="Command_Marketplace_Icon" file_name="toolbar_icons/marketplace.png" preload="true" /> + <texture name="Command_MiniCart_Icon" file_name="toolbar_icons/mini_cart.png" preload="true" /> <texture name="Command_MiniMap_Icon" file_name="toolbar_icons/mini_map.png" preload="true" /> <texture name="Command_Move_Icon" file_name="toolbar_icons/move.png" preload="true" /> <texture name="Command_People_Icon" file_name="toolbar_icons/people.png" preload="true" /> @@ -460,6 +461,7 @@ with the same filename but different name <texture name="PushButton_Off" file_name="widgets/PushButton_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_On" file_name="widgets/PushButton_On.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_On_Selected" file_name="widgets/PushButton_On_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> + <texture name="PushButton_Over" file_name="widgets/PushButton_Over.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_Press" file_name="widgets/PushButton_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_Selected" file_name="widgets/PushButton_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_Selected_Press" file_name="widgets/PushButton_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> diff --git a/indra/newview/skins/default/textures/toolbar_icons/mini_cart.png b/indra/newview/skins/default/textures/toolbar_icons/mini_cart.png Binary files differnew file mode 100644 index 0000000000..9fcf46794d --- /dev/null +++ b/indra/newview/skins/default/textures/toolbar_icons/mini_cart.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/mini_map.png b/indra/newview/skins/default/textures/toolbar_icons/mini_map.png Binary files differindex b66af223bb..ab0a654056 100644 --- a/indra/newview/skins/default/textures/toolbar_icons/mini_map.png +++ b/indra/newview/skins/default/textures/toolbar_icons/mini_map.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png b/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png Binary files differindex 46e299cb94..77a7cd5f44 100644 --- a/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png +++ b/indra/newview/skins/default/textures/toolbar_icons/nearbyvoice.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/preferences.png b/indra/newview/skins/default/textures/toolbar_icons/preferences.png Binary files differindex df80d926b5..4ccd7b8ae1 100644 --- a/indra/newview/skins/default/textures/toolbar_icons/preferences.png +++ b/indra/newview/skins/default/textures/toolbar_icons/preferences.png diff --git a/indra/newview/skins/default/textures/toolbar_icons/view.png b/indra/newview/skins/default/textures/toolbar_icons/view.png Binary files differindex 5425af87e0..ddf0df7c26 100644 --- a/indra/newview/skins/default/textures/toolbar_icons/view.png +++ b/indra/newview/skins/default/textures/toolbar_icons/view.png diff --git a/indra/newview/skins/default/xui/en/floater_how_to.xml b/indra/newview/skins/default/xui/en/floater_how_to.xml new file mode 100644 index 0000000000..0369ecbeff --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_how_to.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + legacy_header_height="18" + can_resize="true" + can_minimize="true" + height="775" + layout="topleft" + min_height="360" + left="10000" + top="10" + min_width="335" + name="floater_how_to" + single_instance="true" + save_rect="true" + title="HOW TO" + width="780" + filename="floater_web_content.xml"/>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/floater_my_appearance.xml b/indra/newview/skins/default/xui/en/floater_my_appearance.xml index 74c4e22841..d9f3f1e13f 100644 --- a/indra/newview/skins/default/xui/en/floater_my_appearance.xml +++ b/indra/newview/skins/default/xui/en/floater_my_appearance.xml @@ -11,7 +11,7 @@ save_rect="true" single_instance="true" title="APPEARANCE" - min_height="230" + min_height="260" min_width="333" width="333"> <panel diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index b6fc7f150c..dd818e2e06 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -7,8 +7,8 @@ layout="topleft" min_height="400" min_width="500" - name="floater_web_content" - help_topic="floater_web_content" + name="floater_search" + help_topic="floater_search" save_rect="true" save_visibility="true" title="" diff --git a/indra/newview/skins/default/xui/en/floater_web_profile.xml b/indra/newview/skins/default/xui/en/floater_web_profile.xml new file mode 100644 index 0000000000..d0225f78a9 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_web_profile.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater name="floater_web_profile" + help_topic="web_profile" + width="780" + height="775" + filename="floater_web_content.xml"/>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index 2c07e8e35f..4d3d431b3a 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -22,7 +22,7 @@ name="menu_stack" orientation="vertical" top="0"> - <layout_panel mouse_opaque="false" + <layout_panel mouse_opaque="true" follows="left|right|top" name="status_bar_container" tab_stop="false" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 69029d2ab9..d65deb87ec 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -34,25 +34,13 @@ <menu_item_check label="Inventory..." name="Inventory" - shortcut="control|shift|I" - visible="false"> + shortcut="control|I" + visible="true"> <menu_item_check.on_check function="Floater.Visible" - parameter="inventory" /> - <menu_item_check.on_click - function="Floater.Toggle" - parameter="inventory" /> - </menu_item_check> - <menu_item_check - label="Inventory..." - name="ShowSidetrayInventory" - shortcut="control|I" - visible="true"> - <menu_item_check.on_check - function="SidetrayPanelVisible" parameter="my_inventory" /> <menu_item_check.on_click - function="ShowSidetrayPanel" + function="Floater.Toggle" parameter="my_inventory" /> </menu_item_check> <menu_item_check @@ -1157,14 +1145,6 @@ function="ShowHelp" parameter="f1_help" /> </menu_item_call> - <menu_item_check - label="Enable Hints" - name="Enable Hints"> - <on_check - control="EnableUIHints"/> - <on_click - function="ToggleUIHints"/> - </menu_item_check> <!-- <menu_item_call label="Tutorial" name="Tutorial"> diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index ab6fa36e6c..7a8e872dc9 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -188,10 +188,12 @@ <more_button follows="left|bottom" name=">>" - tab_stop="false" - tool_tip="Show more of My Favorites" - top="15" - width="50"> + tab_stop="false" + tool_tip="Show more of My Favorites" + top="13" + width="50" + bottom="0" + valign="bottom"> More ▼ </more_button> </favorites_bar> diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 1f298cbe16..422bbada7f 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -35,8 +35,8 @@ </panel.string> <panel height="18" - left="-315" - width="95" + left="-370" + width="160" top="1" follows="right|top" name="balance_bg" @@ -60,11 +60,11 @@ halign="center" font="SansSerifSmall" follows="right|top|bottom" - image_hover_unselected="buy_over" - image_unselected="buy_off" - image_pressed="buy_press" + image_hover_unselected="PushButton_Over" + image_unselected="PushButton_Off" + image_pressed="PushButton_Press" height="18" - label="BUY L$" + label="Buy L$" label_color="White" left_pad="0" label_shadow="true" @@ -74,6 +74,27 @@ tool_tip="Click to buy more L$" top="0" width="55" /> + <button + halign="left" + font="SansSerifSmall" + follows="right|top|bottom" + imgoverlay_label_space="7" + image_overlay="Command_MiniCart_Icon" + image_overlay_alignment="left" + image_hover_unselected="PushButton_Over" + image_unselected="PushButton_Off" + image_pressed="PushButton_Press" + height="18" + label="Shop" + label_color="White" + left_pad="0" + label_shadow="true" + name="goShop" + pad_right="0" + pad_bottom="2" + tool_tip="Open Second Life Marketplace" + top="0" + width="65" /> </panel> <text type="string" |