From 9479c872746074d27d245b2af2d17a760a927915 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 21 Sep 2010 13:57:58 -0700 Subject: FIX crash when clicking on MOTD --- indra/newview/llprogressview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index c6bd600403..e9504cbba0 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -297,7 +297,7 @@ bool LLProgressView::onAlertModal(const LLSD& notify) { // if the progress view is visible, it will obscure the notification window // in this case, we want to auto-accept WebLaunchExternalTarget notifications - if (isInVisibleChain()) + if (isInVisibleChain() && notify["sigtype"].asString() == "add") { LLNotificationPtr notifyp = LLNotifications::instance().find(notify["id"].asUUID()); if (notifyp && notifyp->getName() == "WebLaunchExternalTarget") -- cgit v1.2.3 From 325f16d0b4c8fc9de694121d770a4931a7b98529 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 21 Sep 2010 14:28:03 -0700 Subject: fix for mac build and possible crash when responding to notification twice --- indra/llui/llnotifications.cpp | 7 ++++++- indra/newview/llmediactrl.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 9d14c4149c..ab9bd12b85 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -600,7 +600,7 @@ void LLNotification::respond(const LLSD& response) { mResponder->handleRespond(asLLSD(), response); } - else + else if (!mResponseFunctorName.empty()) { // look up the functor LLNotificationFunctorRegistry::ResponseFunctor functor = @@ -608,6 +608,11 @@ void LLNotification::respond(const LLSD& response) // and then call it functor(asLLSD(), response); } + else + { + // no registered responder + return; + } if (mTemporaryResponder && !isReusable()) { diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 33e46e70f7..e84c9152b1 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -77,7 +77,7 @@ LLMediaCtrl::Params::Params() LLMediaCtrl::LLMediaCtrl( const Params& p) : LLPanel( p ), - LLInstanceTracker(LLUUID::generateNewID()), + LLInstanceTracker(LLUUID::generateNewID()), mTextureDepthBytes( 4 ), mBorder(NULL), mFrequentUpdates( true ), -- cgit v1.2.3 From 7648bb425ae106ce0268c7ff535b054de6f6a318 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 22 Sep 2010 12:25:40 -0700 Subject: EXP-111 WIP Automatically provide default responses to all notifications --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index feb5ebc16d..143574264d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3914,7 +3914,7 @@ Comment Ignore all notifications so we never need user input on them. Persist - 0 + 1 Type Boolean Value -- cgit v1.2.3 From f8a17515f592a1d759ca2c79f80b2ed032af2ebe Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 22 Sep 2010 12:27:26 -0700 Subject: EXP-109 WIP strip down main_view.xml made menu keyboard access only work when menus are visible dummy widgets are now added with a parent view that is invisible popupview can now be default-built --- indra/llui/llmenugl.cpp | 5 ++++- indra/llui/llview.cpp | 22 ++++++------------- indra/llui/llview.h | 14 +++++------- indra/newview/llpopupview.cpp | 3 ++- indra/newview/llpopupview.h | 2 +- indra/newview/llviewerwindow.cpp | 2 +- indra/newview/skins/minimal/xui/en/main_view.xml | 27 ++++++++++++++++++++++++ 7 files changed, 46 insertions(+), 29 deletions(-) create mode 100644 indra/newview/skins/minimal/xui/en/main_view.xml diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 900a814238..e179f63ee5 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3066,7 +3066,10 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask) mAltKeyTrigger = FALSE; } - if(!result && (key == KEY_F10 && mask == MASK_CONTROL) && !gKeyboard->getKeyRepeated(key)) + if(!result + && (key == KEY_F10 && mask == MASK_CONTROL) + && !gKeyboard->getKeyRepeated(key) + && isInVisibleChain()) { if (getHighlightedItem()) { diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 3fa86bf0ca..6ac009956d 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -163,8 +163,6 @@ LLView::~LLView() if (mDefaultWidgets) { - std::for_each(mDefaultWidgets->begin(), mDefaultWidgets->end(), - DeletePairedPointer()); delete mDefaultWidgets; mDefaultWidgets = NULL; } @@ -1682,18 +1680,7 @@ BOOL LLView::hasChild(const std::string& childname, BOOL recurse) const //----------------------------------------------------------------------------- LLView* LLView::getChildView(const std::string& name, BOOL recurse) const { - LLView* child = findChildView(name, recurse); - if (!child) - { - child = getDefaultWidget(name); - if (!child) - { - LLView::Params view_params; - view_params.name = name; - child = LLUICtrlFactory::create(view_params); - } - } - return child; + return getChild(name, recurse); } static LLFastTimer::DeclareTimer FTM_FIND_VIEWS("Find Widgets"); @@ -2804,11 +2791,14 @@ LLView::root_to_view_iterator_t LLView::endRootToView() // only create maps on demand, as they incur heap allocation/deallocation cost // when a view is constructed/deconstructed -LLView::default_widget_map_t& LLView::getDefaultWidgetMap() const +LLView& LLView::getDefaultWidgetContainer() const { if (!mDefaultWidgets) { - mDefaultWidgets = new default_widget_map_t(); + LLView::Params p; + p.name = "default widget container"; + p.visible = false; // ensures default widgets can't steal focus, etc. + mDefaultWidgets = new LLView(p); } return *mDefaultWidgets; } diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 6bcee98f26..e6e0a41962 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -461,12 +461,8 @@ public: template T* getDefaultWidget(const std::string& name) const { - default_widget_map_t::const_iterator found_it = getDefaultWidgetMap().find(name); - if (found_it == getDefaultWidgetMap().end()) - { - return NULL; - } - return dynamic_cast(found_it->second); + LLView* widgetp = getDefaultWidgetContainer().findChildView(name); + return dynamic_cast(widgetp); } ////////////////////////////////////////////// @@ -580,9 +576,9 @@ private: typedef std::map default_widget_map_t; // allocate this map no demand, as it is rarely needed - mutable default_widget_map_t* mDefaultWidgets; + mutable LLView* mDefaultWidgets; - default_widget_map_t& getDefaultWidgetMap() const; + LLView& getDefaultWidgetContainer() const; public: // Depth in view hierarchy during rendering @@ -649,7 +645,7 @@ template T* LLView::getChild(const std::string& name, BOOL recurse) co return NULL; } - getDefaultWidgetMap()[name] = result; + getDefaultWidgetContainer().addChild(result); } } return result; diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp index 499b6a8f5f..18035c42f4 100644 --- a/indra/newview/llpopupview.cpp +++ b/indra/newview/llpopupview.cpp @@ -40,7 +40,8 @@ bool view_visible(LLView* viewp) } -LLPopupView::LLPopupView() +LLPopupView::LLPopupView(const LLPopupView::Params& p) +: LLPanel(p) { // register ourself as handler of UI popups LLUI::setPopupFuncs(boost::bind(&LLPopupView::addPopup, this, _1), boost::bind(&LLPopupView::removePopup, this, _1), boost::bind(&LLPopupView::clearPopups, this)); diff --git a/indra/newview/llpopupview.h b/indra/newview/llpopupview.h index fec4afd79c..b378f61984 100644 --- a/indra/newview/llpopupview.h +++ b/indra/newview/llpopupview.h @@ -32,7 +32,7 @@ class LLPopupView : public LLPanel { public: - LLPopupView(); + LLPopupView(const Params& p = LLPanel::Params()); ~LLPopupView(); /*virtual*/ void draw(); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 7f8b7fba9f..19f51b2bbe 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1524,7 +1524,7 @@ void LLViewerWindow::initBase() mWorldViewPlaceholder = main_view->getChildView("world_view_rect")->getHandle(); mNonSideTrayView = main_view->getChildView("non_side_tray_view")->getHandle(); mFloaterViewHolder = main_view->getChildView("floater_view_holder")->getHandle(); - mPopupView = main_view->findChild("popup_holder"); + mPopupView = main_view->getChild("popup_holder"); mHintHolder = main_view->getChild("hint_holder")->getHandle(); // Constrain floaters to inside the menu and status bar regions. diff --git a/indra/newview/skins/minimal/xui/en/main_view.xml b/indra/newview/skins/minimal/xui/en/main_view.xml new file mode 100644 index 0000000000..c793b1b813 --- /dev/null +++ b/indra/newview/skins/minimal/xui/en/main_view.xml @@ -0,0 +1,27 @@ + + + + + -- cgit v1.2.3 From aa7d505882f07cffea8b7cd145296f3c114c3f50 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 22 Sep 2010 12:27:48 -0700 Subject: EXP-108 FIX Create new "minimal" UI skin --- indra/newview/llappviewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 333c92e50d..1fd3632b85 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2182,8 +2182,8 @@ bool LLAppViewer::initConfiguration() if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString()) { // hack to force the skin to default. - //gDirUtilp->setSkinFolder(skinfolder->getValue().asString()); - gDirUtilp->setSkinFolder("default"); + gDirUtilp->setSkinFolder(skinfolder->getValue().asString()); + //gDirUtilp->setSkinFolder("default"); } mYieldTime = gSavedSettings.getS32("YieldTime"); -- cgit v1.2.3