aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelmsgs.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:59 -0500
committerJacek Antonelli2008-08-15 23:44:59 -0500
commita408bac29378072fbf36864164149458c978cfcc (patch)
tree67feccf1a5d3816611ba48d6762f86f0f7f4b1f6 /linden/indra/newview/llpanelmsgs.cpp
parentSecond Life viewer sources 1.17.0.12 (diff)
downloadmeta-impy-a408bac29378072fbf36864164149458c978cfcc.zip
meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.gz
meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.bz2
meta-impy-a408bac29378072fbf36864164149458c978cfcc.tar.xz
Second Life viewer sources 1.17.1.0
Diffstat (limited to 'linden/indra/newview/llpanelmsgs.cpp')
-rw-r--r--linden/indra/newview/llpanelmsgs.cpp48
1 files changed, 47 insertions, 1 deletions
diff --git a/linden/indra/newview/llpanelmsgs.cpp b/linden/indra/newview/llpanelmsgs.cpp
index 3a8729c..a758800 100644
--- a/linden/indra/newview/llpanelmsgs.cpp
+++ b/linden/indra/newview/llpanelmsgs.cpp
@@ -34,6 +34,7 @@
34#include "llviewerwindow.h" 34#include "llviewerwindow.h"
35#include "llviewercontrol.h" 35#include "llviewercontrol.h"
36#include "llvieweruictrlfactory.h" 36#include "llvieweruictrlfactory.h"
37#include "llfirstuse.h"
37 38
38class LLPopupData 39class LLPopupData
39{ 40{
@@ -68,6 +69,7 @@ BOOL LLPanelMsgs::postBuild()
68 mEnabledPopups = LLViewerUICtrlFactory::getScrollListByName(this, "enabled_popups"); 69 mEnabledPopups = LLViewerUICtrlFactory::getScrollListByName(this, "enabled_popups");
69 childSetAction("enable_popup", onClickEnablePopup, this); 70 childSetAction("enable_popup", onClickEnablePopup, this);
70 childSetAction("reset_dialogs_btn", onClickResetDialogs, this); 71 childSetAction("reset_dialogs_btn", onClickResetDialogs, this);
72 childSetAction("skip_dialogs_btn", onClickSkipDialogs, this);
71 buildLists(); 73 buildLists();
72 74
73 sPopupData.mAutoAcceptNewInventory = gSavedSettings.getBOOL("AutoAcceptNewInventory"); 75 sPopupData.mAutoAcceptNewInventory = gSavedSettings.getBOOL("AutoAcceptNewInventory");
@@ -163,6 +165,27 @@ void LLPanelMsgs::cancel()
163 gSavedSettings.setBOOL("AutoAcceptNewInventory", sPopupData.mAutoAcceptNewInventory); 165 gSavedSettings.setBOOL("AutoAcceptNewInventory", sPopupData.mAutoAcceptNewInventory);
164} 166}
165 167
168void LLPanelMsgs::resetAllIgnored()
169{
170 for(LLAlertDialog::template_map_t::iterator iter = LLAlertDialog::sIgnorableTemplates.begin();
171 iter != LLAlertDialog::sIgnorableTemplates.end(); ++iter)
172 {
173 LLAlertDialogTemplate* alert_temp = iter->second;
174 S32 ignore = alert_temp->getIgnore();
175 if(ignore)
176 alert_temp->setIgnore(false);
177 }
178}
179
180void LLPanelMsgs::setAllIgnored()
181{
182 for(LLAlertDialog::template_map_t::iterator iter = LLAlertDialog::sIgnorableTemplates.begin();
183 iter != LLAlertDialog::sIgnorableTemplates.end(); ++iter)
184 {
185 LLAlertDialogTemplate* alert_temp = iter->second;
186 alert_temp->setIgnore(true);
187 }
188}
166 189
167//static 190//static
168void LLPanelMsgs::onClickEnablePopup(void* user_data) 191void LLPanelMsgs::onClickEnablePopup(void* user_data)
@@ -188,10 +211,13 @@ void callback_reset_dialogs(S32 option, void* data)
188{ 211{
189 if (0 == option) 212 if (0 == option)
190 { 213 {
191 gSavedSettings.resetWarnings(); // resets all ignorable dialogs
192 LLPanelMsgs* panelp = (LLPanelMsgs*)data; 214 LLPanelMsgs* panelp = (LLPanelMsgs*)data;
193 if ( panelp ) 215 if ( panelp )
216 {
217 panelp->resetAllIgnored();
218 LLFirstUse::resetFirstUse();
194 panelp->buildLists(); 219 panelp->buildLists();
220 }
195 } 221 }
196} 222}
197 223
@@ -200,3 +226,23 @@ void LLPanelMsgs::onClickResetDialogs(void* user_data)
200{ 226{
201 gViewerWindow->alertXml("ResetShowNextTimeDialogs",callback_reset_dialogs,user_data); 227 gViewerWindow->alertXml("ResetShowNextTimeDialogs",callback_reset_dialogs,user_data);
202} 228}
229
230void callback_skip_dialogs(S32 option, void* data)
231{
232 if (0 == option)
233 {
234 LLPanelMsgs* panelp = (LLPanelMsgs*)data;
235 if ( panelp )
236 {
237 panelp->setAllIgnored();
238 LLFirstUse::disableFirstUse();
239 panelp->buildLists();
240 }
241 }
242}
243
244// static
245void LLPanelMsgs::onClickSkipDialogs(void* user_data)
246{
247 gViewerWindow->alertXml("SkipShowNextTimeDialogs", callback_skip_dialogs, user_data);
248}