From f5e0a536c1e6de34b6bffc871d1fef1efd963fdf Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Mon, 22 May 2017 03:29:01 +0300 Subject: MAINT-7431 Fixed crash in LLAccordionCtrlTab::showAndFocusHeader() --- indra/llui/llaccordionctrltab.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index f8ef5289db..eaf1284237 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -823,6 +823,11 @@ BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent) void LLAccordionCtrlTab::showAndFocusHeader() { + if (!mHeader) + { + return; + } + mHeader->setFocus(true); mHeader->setSelected(mSelectionEnabled); -- cgit v1.2.3 From f34bee596641318d7480acf624e04af7d8bc8bfc Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 22 May 2017 16:45:33 +0300 Subject: MAINT-1094 FIXED after triggering a menu with control-F10, clicking in-world should move keyboard focus in-world --- indra/llui/llmenugl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 022f814bbc..0d42f726fa 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3331,6 +3331,7 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask) if (getHighlightedItem()) { clearHoverItem(); + LLMenuGL::setKeyboardMode(FALSE); } else { @@ -3777,10 +3778,10 @@ BOOL LLMenuHolderGL::hideMenus() { return FALSE; } + LLMenuGL::setKeyboardMode(FALSE); BOOL menu_visible = hasVisibleMenu(); if (menu_visible) { - LLMenuGL::setKeyboardMode(FALSE); // clicked off of menu, hide them all for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) { -- cgit v1.2.3 From 561cee12d8d3c456d71efae3b711dbf5115c66f5 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 25 May 2017 16:51:45 +0300 Subject: MAINT-2585 Make permission request notifications permanent until action taken --- indra/llui/llnotifications.cpp | 6 ++++++ indra/llui/llnotifications.h | 1 + indra/llui/llnotificationtemplate.h | 3 +++ 3 files changed, 10 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 604092d536..c364c4d5ae 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -426,6 +426,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par mLogToChat(p.log_to_chat), mLogToIM(p.log_to_im), mShowToast(p.show_toast), + mFadeToast(p.fade_toast), mSoundName("") { if (p.sound.isProvided() @@ -942,6 +943,11 @@ bool LLNotification::canShowToast() const return mTemplatep->mShowToast; } +bool LLNotification::canFadeToast() const +{ + return mTemplatep->mFadeToast; +} + bool LLNotification::hasFormElements() const { return mTemplatep->mForm->getNumElements() != 0; diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 024332ee65..4a701d0ca7 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -558,6 +558,7 @@ public: bool canLogToChat() const; bool canLogToIM() const; bool canShowToast() const; + bool canFadeToast() const; bool hasFormElements() const; void playSound(); diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h index bed29254d8..20cbc89ede 100644 --- a/indra/llui/llnotificationtemplate.h +++ b/indra/llui/llnotificationtemplate.h @@ -177,6 +177,7 @@ struct LLNotificationTemplate Optional persist, log_to_im, show_toast, + fade_toast, log_to_chat, force_urls_external; Optional functor, @@ -199,6 +200,7 @@ struct LLNotificationTemplate Params() : name("name"), persist("persist", false), + fade_toast("fade_toast", true), log_to_im("log_to_im", false), show_toast("show_toast", true), log_to_chat("log_to_chat", true), @@ -316,6 +318,7 @@ struct LLNotificationTemplate bool mLogToChat; bool mLogToIM; bool mShowToast; + bool mFadeToast; }; #endif //LL_LLNOTIFICATION_TEMPLATE_H -- cgit v1.2.3 From 81f4da646800e2a1b7218397290183144f6aed92 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 6 Jun 2017 12:47:51 +0300 Subject: MAINT-7447 FIXED Selecting a group ability refreshes the list and deselects your choice --- indra/llui/llscrolllistctrl.cpp | 15 +++++++++++++++ indra/llui/llscrolllistctrl.h | 2 ++ 2 files changed, 17 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 0afa8d43f1..7c1f4a4dca 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -345,6 +345,21 @@ S32 LLScrollListCtrl::getItemCount() const return mItemList.size(); } +BOOL LLScrollListCtrl::hasSelectedItem() const +{ + item_list::iterator iter; + for (iter = mItemList.begin(); iter < mItemList.end(); ) + { + LLScrollListItem* itemp = *iter; + if (itemp && itemp->getSelected()) + { + return TRUE; + } + iter++; + } + return FALSE; +} + // virtual LLScrolListInterface function (was deleteAllItems) void LLScrollListCtrl::clearRows() { diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 8343750a54..699a8744e1 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -201,6 +201,8 @@ public: virtual BOOL isSelected(const LLSD& value) const; + BOOL hasSelectedItem() const; + BOOL handleClick(S32 x, S32 y, MASK mask); BOOL selectFirstItem(); BOOL selectNthItem( S32 index ); -- cgit v1.2.3 From d7edeb2df8b225c39727bf506b4e5126852e2d5d Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 2 Jun 2017 16:44:00 +0200 Subject: STORM-2149: Add a warning notification when deleting a folder of filtered content --- indra/llui/llfolderview.cpp | 12 ++++++++++++ indra/llui/llfolderview.h | 12 ++++++++++++ indra/llui/llfolderviewitem.cpp | 5 +++++ indra/llui/llnotifications.cpp | 6 ++++++ indra/llui/llnotifications.h | 2 ++ 5 files changed, 37 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index f9664e0658..895753aeae 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -102,6 +102,18 @@ void LLCloseAllFoldersFunctor::doFolder(LLFolderViewFolder* folder) void LLCloseAllFoldersFunctor::doItem(LLFolderViewItem* item) { } +//--------------------------------------------------------------------------- + +void LLAllDescendentsPassedFilter::doFolder(LLFolderViewFolder* folder) +{ + mAllDescendentsPassedFilter &= (folder) && (folder->passedFilter()) && (folder->descendantsPassedFilter()); +} + +void LLAllDescendentsPassedFilter::doItem(LLFolderViewItem* item) +{ + mAllDescendentsPassedFilter &= (item) && (item->passedFilter()); +} + ///---------------------------------------------------------------------------- /// Class LLFolderViewScrollContainer ///---------------------------------------------------------------------------- diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h index b5deefd653..2926e160d0 100644 --- a/indra/llui/llfolderview.h +++ b/indra/llui/llfolderview.h @@ -400,6 +400,18 @@ public: virtual void doItem(LLFolderViewItem* item); }; +class LLAllDescendentsPassedFilter : public LLFolderViewFunctor +{ +public: + LLAllDescendentsPassedFilter() : mAllDescendentsPassedFilter(true) {} + /*virtual*/ ~LLAllDescendentsPassedFilter() {} + /*virtual*/ void doFolder(LLFolderViewFolder* folder); + /*virtual*/ void doItem(LLFolderViewItem* item); + bool allDescendentsPassedFilter() const { return mAllDescendentsPassedFilter; } +protected: + bool mAllDescendentsPassedFilter; +}; + // Flags for buildContextMenu() const U32 SUPPRESS_OPEN_ITEM = 0x1; const U32 FIRST_SELECTED_ITEM = 0x2; diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 3d618548c4..0510e472c5 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -1176,6 +1176,11 @@ BOOL LLFolderViewFolder::needsArrange() return mLastArrangeGeneration < getRoot()->getArrangeGeneration(); } +bool LLFolderViewFolder::descendantsPassedFilter(S32 filter_generation) +{ + return getViewModelItem()->descendantsPassedFilter(filter_generation); +} + // Passes selection information on to children and record selection // information if necessary. BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem, diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index c364c4d5ae..d40347de13 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1798,6 +1798,12 @@ bool LLNotifications::getIgnoreAllNotifications() { return mIgnoreAllNotifications; } + +bool LLNotifications::getIgnored(const std::string& name) +{ + LLNotificationTemplatePtr templatep = getTemplate(name); + return (mIgnoreAllNotifications) || ( (templatep->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO) && (templatep->mForm->getIgnored()) ); +} bool LLNotifications::isVisibleByRules(LLNotificationPtr n) { diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 4a701d0ca7..a7a5490432 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -964,6 +964,8 @@ public: void setIgnoreAllNotifications(bool ignore); bool getIgnoreAllNotifications(); + bool getIgnored(const std::string& name); + bool isVisibleByRules(LLNotificationPtr pNotification); private: -- cgit v1.2.3 From 75ee01277432a32178aac03ae606df6909c6c959 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 16 Jun 2017 18:55:43 +0300 Subject: MAINT-1614 Fixed Object changed its position inworld but value in Edit tool was not changed --- indra/llui/llspinctrl.cpp | 26 ++++++++++++++++++++++++++ indra/llui/llspinctrl.h | 1 + 2 files changed, 27 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index d49e216898..f6831c6d5e 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -130,6 +130,7 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p) params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM); mEditor = LLUICtrlFactory::create (params); mEditor->setFocusReceivedCallback( boost::bind(&LLSpinCtrl::onEditorGainFocus, _1, this )); + mEditor->setFocusLostCallback( boost::bind(&LLSpinCtrl::onEditorLostFocus, _1, this )); if (p.allow_digits_only) { mEditor->setPrevalidateInput(LLTextValidate::validateNonNegativeS32NoSpace); @@ -239,6 +240,31 @@ void LLSpinCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata ) self->onFocusReceived(); } +// static +void LLSpinCtrl::onEditorLostFocus( LLFocusableElement* caller, void *userdata ) +{ + LLSpinCtrl* self = (LLSpinCtrl*) userdata; + llassert( caller == self->mEditor ); + + self->onFocusLost(); + + std::string text = self->mEditor->getText(); + + LLLocale locale(LLLocale::USER_LOCALE); + F32 val = (F32)atof(text.c_str()); + + F32 saved_val = self->getValueF32(); + if (saved_val != val && !self->mEditor->isDirty()) + { + // Editor was focused when value update arrived, string + // in editor is different from one in spin control. + // Since editor is not dirty, it won't commit, so either + // attempt to commit value from editor or revert to a more + // recent value from spin control + self->updateEditor(); + } +} + void LLSpinCtrl::setValue(const LLSD& value ) { F32 v = (F32)value.asReal(); diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h index e34add879d..cab99c35bd 100644 --- a/indra/llui/llspinctrl.h +++ b/indra/llui/llspinctrl.h @@ -93,6 +93,7 @@ public: void onEditorCommit(const LLSD& data); static void onEditorGainFocus(LLFocusableElement* caller, void *userdata); + static void onEditorLostFocus(LLFocusableElement* caller, void *userdata); static void onEditorChangeFocus(LLUICtrl* caller, S32 direction, void *userdata); void onUpBtn(const LLSD& data); -- cgit v1.2.3 From 2efa40fa6089dabbaccc228d331679c8c92f797f Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 21 Jul 2017 05:29:51 +0300 Subject: MAINT-7356 Logic fix and cleanup --- indra/llui/llnotifications.cpp | 6 ++++++ indra/llui/llnotifications.h | 1 + 2 files changed, 7 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index d40347de13..6710e9993d 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1799,6 +1799,12 @@ bool LLNotifications::getIgnoreAllNotifications() return mIgnoreAllNotifications; } +void LLNotifications::setIgnored(const std::string& name, bool ignored) +{ + LLNotificationTemplatePtr templatep = getTemplate(name); + templatep->mForm->setIgnored(ignored); +} + bool LLNotifications::getIgnored(const std::string& name) { LLNotificationTemplatePtr templatep = getTemplate(name); diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index a7a5490432..b06d7cbf4c 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -964,6 +964,7 @@ public: void setIgnoreAllNotifications(bool ignore); bool getIgnoreAllNotifications(); + void setIgnored(const std::string& name, bool ignored); bool getIgnored(const std::string& name); bool isVisibleByRules(LLNotificationPtr pNotification); -- cgit v1.2.3 From dcb6a850aae7692f66ffe156637264b910007b14 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 25 Jul 2017 03:18:59 +0300 Subject: MAINT-7356 Improved the notification appearance --- indra/llui/llnotifications.cpp | 6 ++++-- indra/llui/llnotifications.h | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 6710e9993d..7bafd711cb 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -67,7 +67,8 @@ LLNotificationForm::FormIgnore::FormIgnore() : text("text"), control("control"), invert_control("invert_control", false), - save_option("save_option", false) + save_option("save_option", false), + session_only("session_only", false) {} LLNotificationForm::FormButton::FormButton() @@ -125,6 +126,7 @@ bool handleIgnoredNotification(const LLSD& payload) switch(form->getIgnoreType()) { case LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE: + case LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY: response = pNotif->getResponseTemplate(LLNotification::WITH_DEFAULT_BUTTON); break; case LLNotificationForm::IGNORE_WITH_LAST_RESPONSE: @@ -197,7 +199,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica if (!p.ignore.save_option) { - mIgnore = IGNORE_WITH_DEFAULT_RESPONSE; + mIgnore = p.ignore.session_only ? IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY : IGNORE_WITH_DEFAULT_RESPONSE; } else { diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index b06d7cbf4c..ccdfb90054 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -179,6 +179,7 @@ public: Optional save_option; Optional control; Optional invert_control; + Optional session_only; FormIgnore(); }; @@ -232,7 +233,8 @@ public: typedef enum e_ignore_type { IGNORE_NO, - IGNORE_WITH_DEFAULT_RESPONSE, + IGNORE_WITH_DEFAULT_RESPONSE, + IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY, IGNORE_WITH_LAST_RESPONSE, IGNORE_SHOW_AGAIN } EIgnoreType; -- cgit v1.2.3