diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfirstuse.cpp | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp index c0f07e5..886bb94 100644 --- a/linden/indra/newview/llfirstuse.cpp +++ b/linden/indra/newview/llfirstuse.cpp | |||
@@ -49,10 +49,6 @@ | |||
49 | #include "floatergriddefault.h" | 49 | #include "floatergriddefault.h" |
50 | #include "hippoGridManager.h" | 50 | #include "hippoGridManager.h" |
51 | 51 | ||
52 | // [RLVa:KB] - Version: 1.22.11 | ||
53 | #include "llviewerwindow.h" | ||
54 | // [/RLVa:KB] | ||
55 | |||
56 | // static | 52 | // static |
57 | std::set<std::string> LLFirstUse::sConfigVariables; | 53 | std::set<std::string> LLFirstUse::sConfigVariables; |
58 | 54 | ||
@@ -310,6 +306,43 @@ void LLFirstUse::useMedia() | |||
310 | } | 306 | } |
311 | } | 307 | } |
312 | 308 | ||
309 | // [RLVa:KB] - Version: 1.23.4 | Checked: RLVa-1.0.3a (2009-09-10) | Added: RLVa-1.0.3a | ||
310 | |||
311 | bool rlvHasVisibleFirstUseNotification() | ||
312 | { | ||
313 | LLNotificationChannelPtr activeNotifications = LLNotifications::instance().getChannel("Notifications"); | ||
314 | for (LLNotificationChannel::Iterator itNotif = activeNotifications->begin(); itNotif != activeNotifications->end(); itNotif++) | ||
315 | if ((*itNotif)->getName().find(RLV_SETTING_FIRSTUSE_PREFIX) == 0) | ||
316 | return true; | ||
317 | return false; | ||
318 | } | ||
319 | |||
320 | void LLFirstUse::showRlvFirstUseNotification(const std::string& strName) | ||
321 | { | ||
322 | if ( (gSavedSettings.getWarning(strName)) && (!rlvHasVisibleFirstUseNotification()) ) | ||
323 | { | ||
324 | gSavedSettings.setWarning(strName, FALSE); | ||
325 | LLNotifications::instance().add(strName); | ||
326 | } | ||
327 | } | ||
328 | |||
329 | void LLFirstUse::warnRlvGiveToRLV() | ||
330 | { | ||
331 | if ( (gSavedSettings.getWarning(RLV_SETTING_FIRSTUSE_GIVETORLV)) && (RlvSettings::getForbidGiveToRLV()) ) | ||
332 | LLNotifications::instance().add(RLV_SETTING_FIRSTUSE_GIVETORLV, LLSD(), LLSD(), &LLFirstUse::onRlvGiveToRLVConfirmation); | ||
333 | } | ||
334 | |||
335 | void LLFirstUse::onRlvGiveToRLVConfirmation(const LLSD& notification, const LLSD& response) | ||
336 | { | ||
337 | gSavedSettings.setWarning(RLV_SETTING_FIRSTUSE_GIVETORLV, FALSE); | ||
338 | |||
339 | S32 idxOption = LLNotification::getSelectedOption(notification, response); | ||
340 | if ( (0 == idxOption) || (1 == idxOption) ) | ||
341 | gSavedSettings.setBOOL(RLV_SETTING_FORBIDGIVETORLV, (idxOption == 1)); | ||
342 | } | ||
343 | |||
344 | // [/RLVa:KB] | ||
345 | |||
313 | void LLFirstUse::callbackClientTags(const LLSD& notification, const LLSD& response) | 346 | void LLFirstUse::callbackClientTags(const LLSD& notification, const LLSD& response) |
314 | { | 347 | { |
315 | gSavedSettings.setWarning("ClientTags", FALSE); | 348 | gSavedSettings.setWarning("ClientTags", FALSE); |