diff options
Diffstat (limited to 'linden/indra/llui/llalertdialog.cpp')
-rw-r--r-- | linden/indra/llui/llalertdialog.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/linden/indra/llui/llalertdialog.cpp b/linden/indra/llui/llalertdialog.cpp index 0fa3585..258b523 100644 --- a/linden/indra/llui/llalertdialog.cpp +++ b/linden/indra/llui/llalertdialog.cpp | |||
@@ -56,6 +56,8 @@ const S32 MSG_PAD = 8; | |||
56 | /*static*/ LLControlGroup* LLAlertDialog::sSettings = NULL; | 56 | /*static*/ LLControlGroup* LLAlertDialog::sSettings = NULL; |
57 | /*static*/ std::map<LLString,LLAlertDialog*> LLAlertDialog::sUniqueActiveMap; | 57 | /*static*/ std::map<LLString,LLAlertDialog*> LLAlertDialog::sUniqueActiveMap; |
58 | /*static*/ LLAlertDialog::display_callback_t LLAlertDialog::sDisplayCallback; | 58 | /*static*/ LLAlertDialog::display_callback_t LLAlertDialog::sDisplayCallback; |
59 | /*static*/ LLString LLAlertDialog::sStringSkipNextTime("Skip this dialog next time"); | ||
60 | /*static*/ LLString LLAlertDialog::sStringAlwaysChoose("Always choose this option"); | ||
59 | 61 | ||
60 | //static | 62 | //static |
61 | LLAlertDialog* LLAlertDialog::createXml( const LLString& xml_desc, | 63 | LLAlertDialog* LLAlertDialog::createXml( const LLString& xml_desc, |
@@ -153,17 +155,14 @@ LLAlertDialog::LLAlertDialog( const LLAlertDialogTemplate* xml_template, | |||
153 | setTitle(xml_template->mTitle); | 155 | setTitle(xml_template->mTitle); |
154 | if (xml_template->mIgnorable) | 156 | if (xml_template->mIgnorable) |
155 | { | 157 | { |
156 | //XUI:translate! | ||
157 | LLString msg; | ||
158 | if (xml_template->mIgnorable == IGNORE_USE_DEFAULT) | 158 | if (xml_template->mIgnorable == IGNORE_USE_DEFAULT) |
159 | { | 159 | { |
160 | msg = "Skip this dialog next time"; | 160 | setCheckBox(sStringSkipNextTime, xml_template->mIgnoreLabel); |
161 | } | 161 | } |
162 | else // xml_template->mIgnorable == IGNORE_USE_SAVED | 162 | else // xml_template->mIgnorable == IGNORE_USE_SAVED |
163 | { | 163 | { |
164 | msg = "Always choose this option"; | 164 | setCheckBox(sStringAlwaysChoose, xml_template->mIgnoreLabel); |
165 | } | 165 | } |
166 | setCheckBox(msg, xml_template->mIgnoreLabel); | ||
167 | } | 166 | } |
168 | } | 167 | } |
169 | 168 | ||
@@ -618,6 +617,23 @@ bool LLAlertDialog::parseAlerts(const LLString& xml_filename, LLControlGroup* se | |||
618 | for (LLXMLNode* alert = root->getFirstChild(); | 617 | for (LLXMLNode* alert = root->getFirstChild(); |
619 | alert != NULL; alert = alert->getNextSibling()) | 618 | alert != NULL; alert = alert->getNextSibling()) |
620 | { | 619 | { |
620 | if (alert->hasName("global")) | ||
621 | { | ||
622 | LLString global_name; | ||
623 | if (alert->getAttributeString("name", global_name)) | ||
624 | { | ||
625 | if (global_name == "skipnexttime") | ||
626 | { | ||
627 | sStringSkipNextTime = alert->getTextContents(); | ||
628 | } | ||
629 | else if (global_name == "alwayschoose") | ||
630 | { | ||
631 | sStringAlwaysChoose = alert->getTextContents(); | ||
632 | } | ||
633 | } | ||
634 | continue; | ||
635 | } | ||
636 | |||
621 | if (!alert->hasName("alert")) | 637 | if (!alert->hasName("alert")) |
622 | { | 638 | { |
623 | continue; | 639 | continue; |