From e2deaf5a14a01020afe4240f33e438a0676ba0ec Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 11 May 2010 17:26:55 -0700 Subject: Clean up merge about name cache callback prototype --- indra/llui/llnotifications.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/llui/llnotifications.cpp') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7b8f51ae3c..23f79aad36 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1488,9 +1488,11 @@ std::ostream& operator<<(std::ostream& s, const LLNotification& notification) return s; } -void LLPostponedNotification::onCachedNameReceived(const LLUUID& id, const std::string& first, - const std::string& last, bool is_group) +void LLPostponedNotification::onCachedNameReceived(const LLUUID& id, + const std::string& full_name, + bool is_group) { + // *TODO: This is dumb, just use full_name as given gCacheName->getFullName(id, mName); modifyNotificationParams(); LLNotifications::instance().add(mParams); -- cgit v1.2.3 From 934dc6e2d0fabb935c75bb611ceb543426e485eb Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 24 May 2010 16:59:05 -0700 Subject: DEV-50013 Inventory offer notifications use new name system Reviewed with Richard --- indra/llui/llnotifications.cpp | 42 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) (limited to 'indra/llui/llnotifications.cpp') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 23f79aad36..4a776f577f 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -34,6 +34,8 @@ #include "llnotifications.h" +#include "llavatarnamecache.h" +#include "llcachename.h" #include "llxmlnode.h" #include "lluictrl.h" #include "lluictrlfactory.h" @@ -1488,12 +1490,42 @@ std::ostream& operator<<(std::ostream& s, const LLNotification& notification) return s; } -void LLPostponedNotification::onCachedNameReceived(const LLUUID& id, - const std::string& full_name, - bool is_group) +//static +void LLPostponedNotification::lookupName(LLPostponedNotification* thiz, + const LLUUID& id, + bool is_group) +{ + if (is_group) + { + gCacheName->get(id, is_group, + boost::bind(&LLPostponedNotification::onGroupNameCache, + thiz, _1, _2, _3)); + } + else + { + LLAvatarNameCache::get(id, + boost::bind(&LLPostponedNotification::onAvatarNameCache, + thiz, _1, _2)); + } +} + +void LLPostponedNotification::onGroupNameCache(const LLUUID& id, + const std::string& full_name, + bool is_group) +{ + finalizeName(full_name); +} + +void LLPostponedNotification::onAvatarNameCache(const LLUUID& agent_id, + const LLAvatarName& av_name) +{ + std::string name = av_name.getCompleteName(); + finalizeName(name); +} + +void LLPostponedNotification::finalizeName(const std::string& name) { - // *TODO: This is dumb, just use full_name as given - gCacheName->getFullName(id, mName); + mName = name; modifyNotificationParams(); LLNotifications::instance().add(mParams); cleanup(); -- cgit v1.2.3 From 77e6fcd4230f7540c9f4d6f3d503737c6eaf408c Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 25 May 2010 11:39:06 -0700 Subject: DEV-50013 WIP gCacheName->getGroup() to distinguish from av lookups Helps with global finds looking for remaining calls to patch. Reviewed with Leyla. --- indra/llui/llnotifications.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llnotifications.cpp') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 4a776f577f..27e59a0475 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1497,7 +1497,7 @@ void LLPostponedNotification::lookupName(LLPostponedNotification* thiz, { if (is_group) { - gCacheName->get(id, is_group, + gCacheName->getGroup(id, boost::bind(&LLPostponedNotification::onGroupNameCache, thiz, _1, _2, _3)); } -- cgit v1.2.3 From 17bf41415bb9e347137ae01e7784b75910c0f146 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 27 Jul 2010 16:35:37 -0700 Subject: merge fix --- indra/llui/llnotifications.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llnotifications.cpp') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 4fa4da3f01..768a014081 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1496,6 +1496,7 @@ void LLPostponedNotification::lookupName(LLPostponedNotification* thiz, gCacheName->getGroup(id, boost::bind(&LLPostponedNotification::onGroupNameCache, thiz, _1, _2, _3)); + } else { LLAvatarNameCache::get(id, -- cgit v1.2.3 From 97f11e0e39a10156597c0f82c8a1bead17621b4c Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 29 Sep 2010 10:56:47 -0700 Subject: added max_length_chars to notification params --- indra/llui/llnotifications.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llnotifications.cpp') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 5ca2cc1cc4..929f93dd85 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -81,6 +81,7 @@ LLNotificationForm::FormButton::FormButton() LLNotificationForm::FormInput::FormInput() : type("type"), + max_length_chars("max_length_chars"), width("width", 0) {} -- cgit v1.2.3 From 7ffc9b06c820d70724af2aef361ff9964e584e73 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 8 Oct 2010 16:56:02 -0700 Subject: Created a floater for setting display name --- indra/llui/llnotifications.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui/llnotifications.cpp') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 929f93dd85..5ce04408a1 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -82,7 +82,8 @@ LLNotificationForm::FormButton::FormButton() LLNotificationForm::FormInput::FormInput() : type("type"), max_length_chars("max_length_chars"), - width("width", 0) + width("width", 0), + value("value") {} LLNotificationForm::FormElement::FormElement() -- cgit v1.2.3 From 197f09f1ea7c634d619a3d87d65f6e929611c511 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 8 Nov 2010 15:40:27 -0800 Subject: EXP-421 FIX Notifications tab in Preferences not working properly reverted to old sense where ignore setting of notifications has meaning true=show false=ignore reviewed by Callum --- indra/llui/llnotifications.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/llnotifications.cpp') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index dd6c632d10..3dba2d2b83 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -64,7 +64,7 @@ LLNotificationForm::FormElementBase::FormElementBase() LLNotificationForm::FormIgnore::FormIgnore() : text("text"), control("control"), - invert_control("invert_control", true), + invert_control("invert_control", false), save_option("save_option", false) {} @@ -194,7 +194,7 @@ LLNotificationForm::LLNotificationForm() LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotificationForm::Params& p) : mIgnore(IGNORE_NO), - mInvertSetting(true) // ignore settings by default mean true=show, false=ignore + mInvertSetting(false) // ignore settings by default mean true=show, false=ignore { if (p.ignore.isProvided()) { -- cgit v1.2.3 From 8daea83c98d57e7c063bf9287b1e9c0cd720d337 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 8 Nov 2010 19:27:24 -0800 Subject: EXP-421 FIX Notifications tab in Preferences not working properly fixed logic so that ignore consistently means *don't show* the notification the ignore settings still store "show the notification if true" values --- indra/llui/llnotifications.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/llui/llnotifications.cpp') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 3dba2d2b83..d6d3672784 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -219,7 +219,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica } else { - LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Ignore notification with this name", TRUE); + LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Show notification with this name", TRUE); mIgnoreSetting = LLUI::sSettingGroups["ignores"]->getControl(name); } } @@ -357,15 +357,15 @@ LLControlVariablePtr LLNotificationForm::getIgnoreSetting() bool LLNotificationForm::getIgnored() { - bool ignored = false; + bool show = false; if (mIgnore != LLNotificationForm::IGNORE_NO && mIgnoreSetting) { - ignored = mIgnoreSetting->getValue().asBoolean(); - if (mInvertSetting) ignored = !ignored; + show = mIgnoreSetting->getValue().asBoolean(); + if (mInvertSetting) show = !show; } - return ignored; + return !show; } void LLNotificationForm::setIgnored(bool ignored) @@ -373,7 +373,7 @@ void LLNotificationForm::setIgnored(bool ignored) if (mIgnoreSetting) { if (mInvertSetting) ignored = !ignored; - mIgnoreSetting->setValue(ignored); + mIgnoreSetting->setValue(!ignored); } } -- cgit v1.2.3 From d7bca2b7b151969e45492e2ae244f50960fc4ddf Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 10 Nov 2010 11:38:55 -0800 Subject: EXP-428 FIXED Display of llDialog and some other dialogs that should not be suppressable is broken --- indra/llui/llnotifications.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llnotifications.cpp') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index d6d3672784..a3df6a3ced 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -357,7 +357,7 @@ LLControlVariablePtr LLNotificationForm::getIgnoreSetting() bool LLNotificationForm::getIgnored() { - bool show = false; + bool show = true; if (mIgnore != LLNotificationForm::IGNORE_NO && mIgnoreSetting) { -- cgit v1.2.3