diff options
author | Jacek Antonelli | 2009-04-30 13:04:20 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-30 13:07:16 -0500 |
commit | ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch) | |
tree | 8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/llpanelweb.cpp | |
parent | Second Life viewer sources 1.22.11 (diff) | |
download | meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2 meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz |
Second Life viewer sources 1.23.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanelweb.cpp | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/linden/indra/newview/llpanelweb.cpp b/linden/indra/newview/llpanelweb.cpp index 85ddc71..2e7a9a1 100644 --- a/linden/indra/newview/llpanelweb.cpp +++ b/linden/indra/newview/llpanelweb.cpp | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -143,12 +144,13 @@ void LLPanelWeb::cancel() | |||
143 | // static | 144 | // static |
144 | void LLPanelWeb::onClickClearCache(void*) | 145 | void LLPanelWeb::onClickClearCache(void*) |
145 | { | 146 | { |
146 | gViewerWindow->alertXml("ConfirmClearBrowserCache", callback_clear_browser_cache, 0); | 147 | LLNotifications::instance().add("ConfirmClearBrowserCache", LLSD(), LLSD(), callback_clear_browser_cache); |
147 | } | 148 | } |
148 | 149 | ||
149 | //static | 150 | //static |
150 | void LLPanelWeb::callback_clear_browser_cache(S32 option, void* userdata) | 151 | bool LLPanelWeb::callback_clear_browser_cache(const LLSD& notification, const LLSD& response) |
151 | { | 152 | { |
153 | S32 option = LLNotification::getSelectedOption(notification, response); | ||
152 | if ( option == 0 ) // YES | 154 | if ( option == 0 ) // YES |
153 | { | 155 | { |
154 | LLMediaBase *media_source = get_web_media(); | 156 | LLMediaBase *media_source = get_web_media(); |
@@ -156,9 +158,43 @@ void LLPanelWeb::callback_clear_browser_cache(S32 option, void* userdata) | |||
156 | media_source->clearCache(); | 158 | media_source->clearCache(); |
157 | free_web_media(media_source); | 159 | free_web_media(media_source); |
158 | } | 160 | } |
161 | return false; | ||
159 | } | 162 | } |
160 | 163 | ||
161 | // static | 164 | // static |
165 | void LLPanelWeb::onClickClearCookies(void*) | ||
166 | { | ||
167 | LLNotifications::instance().add("ConfirmClearCookies", LLSD(), LLSD(), callback_clear_cookies); | ||
168 | } | ||
169 | |||
170 | //static | ||
171 | bool LLPanelWeb::callback_clear_cookies(const LLSD& notification, const LLSD& response) | ||
172 | { | ||
173 | S32 option = LLNotification::getSelectedOption(notification, response); | ||
174 | if ( option == 0 ) // YES | ||
175 | { | ||
176 | LLMediaBase *media_source = get_web_media(); | ||
177 | if (media_source) | ||
178 | media_source->clearCookies(); | ||
179 | free_web_media(media_source); | ||
180 | } | ||
181 | return false; | ||
182 | } | ||
183 | |||
184 | // static | ||
185 | void LLPanelWeb::onCommitCookies(LLUICtrl* ctrl, void* data) | ||
186 | { | ||
187 | LLPanelWeb* self = (LLPanelWeb*)data; | ||
188 | LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl; | ||
189 | |||
190 | if (!self || !check) return; | ||
191 | |||
192 | LLMediaBase *media_source = get_web_media(); | ||
193 | if (media_source) | ||
194 | media_source->enableCookies(check->get()); | ||
195 | free_web_media(media_source); | ||
196 | } | ||
197 | // static | ||
162 | void LLPanelWeb::onCommitWebProxyEnabled(LLUICtrl* ctrl, void* data) | 198 | void LLPanelWeb::onCommitWebProxyEnabled(LLUICtrl* ctrl, void* data) |
163 | { | 199 | { |
164 | LLPanelWeb* self = (LLPanelWeb*)data; | 200 | LLPanelWeb* self = (LLPanelWeb*)data; |