PageRenderTime 439ms CodeModel.GetById 204ms app.highlight 2ms RepoModel.GetById 98ms app.codeStats 0ms

/indra/newview/llpanelgenerictip.cpp

https://bitbucket.org/lindenlab/viewer-beta/
C++ | 47 lines | 13 code | 8 blank | 26 comment | 0 complexity | 7c4ba79efc1d48ed6735d5731df0abfd MD5 | raw file
 1/** 
 2 * @file llpanelgenerictip.cpp
 3 * @brief Represents a generic panel for a notifytip notifications. As example:
 4 * "SystemMessageTip", "Cancelled", "UploadWebSnapshotDone".
 5 *
 6 * $LicenseInfo:firstyear=2010&license=viewerlgpl$
 7 * Second Life Viewer Source Code
 8 * Copyright (C) 2010, Linden Research, Inc.
 9 * 
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation;
13 * version 2.1 of the License only.
14 * 
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 * Lesser General Public License for more details.
19 * 
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23 * 
24 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
25 * $/LicenseInfo$
26 */
27
28#include "llviewerprecompiledheaders.h"
29
30#include "llpanelgenerictip.h"
31#include "llnotifications.h"
32#include "llviewercontrol.h" // for gSavedSettings
33
34
35LLPanelGenericTip::LLPanelGenericTip(
36		const LLNotificationPtr& notification) :
37		LLPanelTipToast(notification)
38{
39	buildFromFile( "panel_generic_tip.xml");
40
41	getChild<LLUICtrl>("message")->setValue(notification->getMessage());
42
43
44	S32 max_line_count =  gSavedSettings.getS32("TipToastMessageLineCount");
45	snapToMessageHeight(getChild<LLTextBox> ("message"), max_line_count);
46}
47