summaryrefslogtreecommitdiff
path: root/indra/newview/lltoastalertpanel.cpp
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2009-11-06 12:08:15 +0000
committerLynx Linden <lynx@lindenlab.com>2009-11-06 12:08:15 +0000
commit1c591c06b72d222cff7775ef3aa067cba9c52cd3 (patch)
tree428f9725aa6395fcc4391f215320b06cdff35c8e /indra/newview/lltoastalertpanel.cpp
parente654475529d924603a9b3bc8c4775c86d3cf7933 (diff)
EXT-2232: Arghhh! Code Duplication == Bugs.
Apparently, pre-login notifications use LLAlertDialog, but post-login notifications use LLToastAlertPanel. The latter is basically a copy and paste of the former, with some local modifications. However, the person who copy/pasted the code did not initialize the URLLoader callback, so all notifications that tried to open a web page on a button click after login were failing. I've added comments that this code should be refactored, preferably as a subclass of LLAlertDialog. In the meantime, I've tried to clean it up a bit by not duplicating the nested URLLoader class (which would've required further duplication to reimplement the exact same loader class that LLAlertDialog uses). This let me then initialize the URLLoader callback for LLToastAlertPanel, to fix this specific bug. Again... arghhh!!
Diffstat (limited to 'indra/newview/lltoastalertpanel.cpp')
-rw-r--r--indra/newview/lltoastalertpanel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
index e4a3f8603b..beb31bc833 100644
--- a/indra/newview/lltoastalertpanel.cpp
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -30,6 +30,9 @@
* $/LicenseInfo$
*/
+// *NOTE: this module is a copy-paste of llui/llalertdialog.h
+// Can we re-implement this as a subclass of LLAlertDialog and
+// avoid all this code duplication? It already caused EXT-2232.
#include "llviewerprecompiledheaders.h" // must be first include
@@ -56,7 +59,7 @@ const F32 DEFAULT_BUTTON_DELAY = 0.5f;
const S32 MSG_PAD = 8;
/*static*/ LLControlGroup* LLToastAlertPanel::sSettings = NULL;
-/*static*/ LLToastAlertPanel::URLLoader* LLToastAlertPanel::sURLLoader;
+/*static*/ LLAlertURLLoader* LLToastAlertPanel::sURLLoader;
//-----------------------------------------------------------------------------
// Private methods