From 73f1f43b8bd9ae1c3bc7f96d652c30d772da113b Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Thu, 12 Aug 2010 10:11:30 -0700 Subject: forgot another file --- indra/newview/llnotificationhinthandler.cpp | 58 +++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 indra/newview/llnotificationhinthandler.cpp (limited to 'indra/newview/llnotificationhinthandler.cpp') diff --git a/indra/newview/llnotificationhinthandler.cpp b/indra/newview/llnotificationhinthandler.cpp new file mode 100644 index 0000000000..f5c0330b2a --- /dev/null +++ b/indra/newview/llnotificationhinthandler.cpp @@ -0,0 +1,58 @@ +/** + * @file llnotificationhinthandler.cpp + * @brief Notification Handler Class for UI Hints + * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + + +#include "llviewerprecompiledheaders.h" // must be first include + +#include "llnotificationhandler.h" +#include "llhints.h" +#include "llnotifications.h" + +using namespace LLNotificationsUI; + +LLHintHandler::LLHintHandler() +{ +} + +LLHintHandler::~LLHintHandler() +{ +} + +bool LLHintHandler::processNotification(const LLSD& notify) +{ + if (notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "load") + { + LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); + LLHints::show(notification); + } + return false; +} -- cgit v1.2.3 From bd897431e14aff091d5f45425816ddec4b2538c7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 12 Aug 2010 12:20:38 -0700 Subject: remaining hints defined --- indra/newview/llnotificationhinthandler.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview/llnotificationhinthandler.cpp') diff --git a/indra/newview/llnotificationhinthandler.cpp b/indra/newview/llnotificationhinthandler.cpp index f5c0330b2a..a9460821b0 100644 --- a/indra/newview/llnotificationhinthandler.cpp +++ b/indra/newview/llnotificationhinthandler.cpp @@ -49,10 +49,16 @@ LLHintHandler::~LLHintHandler() bool LLHintHandler::processNotification(const LLSD& notify) { - if (notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "load") + LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); + + std::string sigtype = notify["sigtype"].asString(); + if (sigtype == "add" || sigtype == "load") { - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); LLHints::show(notification); } + else if (sigtype == "delete") + { + LLHints::hide(notification); + } return false; } -- cgit v1.2.3 From e3856e1894d4d19e8673f1d638fa2cacf96a42a4 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 27 Aug 2010 17:45:02 -0700 Subject: Update license block for new files. --- indra/newview/llnotificationhinthandler.cpp | 42 +++++++++++++---------------- 1 file changed, 18 insertions(+), 24 deletions(-) (limited to 'indra/newview/llnotificationhinthandler.cpp') diff --git a/indra/newview/llnotificationhinthandler.cpp b/indra/newview/llnotificationhinthandler.cpp index a9460821b0..f7163cb04f 100644 --- a/indra/newview/llnotificationhinthandler.cpp +++ b/indra/newview/llnotificationhinthandler.cpp @@ -2,31 +2,25 @@ * @file llnotificationhinthandler.cpp * @brief Notification Handler Class for UI Hints * - * $LicenseInfo:firstyear=2000&license=viewergpl$ - * - * Copyright (c) 2000-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2000&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -- cgit v1.2.3