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/llpanelgroup.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 'linden/indra/newview/llpanelgroup.cpp')
-rw-r--r-- | linden/indra/newview/llpanelgroup.cpp | 53 |
1 files changed, 21 insertions, 32 deletions
diff --git a/linden/indra/newview/llpanelgroup.cpp b/linden/indra/newview/llpanelgroup.cpp index beccb2d..add1f3c 100644 --- a/linden/indra/newview/llpanelgroup.cpp +++ b/linden/indra/newview/llpanelgroup.cpp | |||
@@ -16,7 +16,8 @@ | |||
16 | * There are special exceptions to the terms and conditions of the GPL as | 16 | * There are special exceptions to the terms and conditions of the GPL as |
17 | * it is applied to this Source Code. View the full text of the exception | 17 | * it is applied to this Source Code. View the full text of the exception |
18 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 18 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
19 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 19 | * online at |
20 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
20 | * | 21 | * |
21 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
22 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -45,6 +46,7 @@ | |||
45 | #include "lluictrlfactory.h" | 46 | #include "lluictrlfactory.h" |
46 | #include "llviewerwindow.h" | 47 | #include "llviewerwindow.h" |
47 | #include "llappviewer.h" | 48 | #include "llappviewer.h" |
49 | #include "llnotifications.h" | ||
48 | 50 | ||
49 | // static | 51 | // static |
50 | void* LLPanelGroupTab::createTab(void* data) | 52 | void* LLPanelGroupTab::createTab(void* data) |
@@ -115,17 +117,12 @@ void LLPanelGroupTab::handleClickHelp() | |||
115 | std::string help_text( getHelpText() ); | 117 | std::string help_text( getHelpText() ); |
116 | if ( !help_text.empty() ) | 118 | if ( !help_text.empty() ) |
117 | { | 119 | { |
118 | LLStringUtil::format_map_t args; | 120 | LLSD args; |
119 | args["[MESSAGE]"] = help_text; | 121 | args["MESSAGE"] = help_text; |
120 | LLAlertDialog* dialogp = gViewerWindow->alertXml("GenericAlert", args); | 122 | LLFloater* parent_floater = gFloaterView->getParentFloater(this); |
121 | if (dialogp) | 123 | LLNotification::Params params(parent_floater->contextualNotification("GenericAlert")); |
122 | { | 124 | params.substitutions(args); |
123 | LLFloater* root_floater = gFloaterView->getParentFloater(this);; | 125 | LLNotifications::instance().add(params); |
124 | if (root_floater) | ||
125 | { | ||
126 | root_floater->addDependentFloater(dialogp); | ||
127 | } | ||
128 | } | ||
129 | } | 126 | } |
130 | } | 127 | } |
131 | 128 | ||
@@ -411,11 +408,11 @@ BOOL LLPanelGroup::attemptTransition() | |||
411 | mesg = mDefaultNeedsApplyMesg; | 408 | mesg = mDefaultNeedsApplyMesg; |
412 | } | 409 | } |
413 | // Create a notify box, telling the user about the unapplied tab. | 410 | // Create a notify box, telling the user about the unapplied tab. |
414 | LLStringUtil::format_map_t args; | 411 | LLSD args; |
415 | args["[NEEDS_APPLY_MESSAGE]"] = mesg; | 412 | args["NEEDS_APPLY_MESSAGE"] = mesg; |
416 | args["[WANT_APPLY_MESSAGE]"] = mWantApplyMesg; | 413 | args["WANT_APPLY_MESSAGE"] = mWantApplyMesg; |
417 | gViewerWindow->alertXml("PanelGroupApply", args, | 414 | LLNotifications::instance().add("PanelGroupApply", args, LLSD(), |
418 | onNotifyCallback, (void*) this); | 415 | boost::bind(&LLPanelGroup::handleNotifyCallback, this, _1, _2)); |
419 | mShowingNotifyDialog = TRUE; | 416 | mShowingNotifyDialog = TRUE; |
420 | 417 | ||
421 | // We need to reselect the current tab, since it isn't finished. | 418 | // We need to reselect the current tab, since it isn't finished. |
@@ -465,18 +462,9 @@ void LLPanelGroup::transitionToTab() | |||
465 | } | 462 | } |
466 | } | 463 | } |
467 | 464 | ||
468 | // static | 465 | bool LLPanelGroup::handleNotifyCallback(const LLSD& notification, const LLSD& response) |
469 | void LLPanelGroup::onNotifyCallback(S32 option, void* user_data) | ||
470 | { | ||
471 | LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data); | ||
472 | if (self) | ||
473 | { | ||
474 | self->handleNotifyCallback(option); | ||
475 | } | ||
476 | } | ||
477 | |||
478 | void LLPanelGroup::handleNotifyCallback(S32 option) | ||
479 | { | 466 | { |
467 | S32 option = LLNotification::getSelectedOption(notification, response); | ||
480 | mShowingNotifyDialog = FALSE; | 468 | mShowingNotifyDialog = FALSE; |
481 | switch (option) | 469 | switch (option) |
482 | { | 470 | { |
@@ -512,6 +500,7 @@ void LLPanelGroup::handleNotifyCallback(S32 option) | |||
512 | LLAppViewer::instance()->abortQuit(); | 500 | LLAppViewer::instance()->abortQuit(); |
513 | break; | 501 | break; |
514 | } | 502 | } |
503 | return false; | ||
515 | } | 504 | } |
516 | 505 | ||
517 | // static | 506 | // static |
@@ -568,9 +557,9 @@ bool LLPanelGroup::apply() | |||
568 | // Inform the user. | 557 | // Inform the user. |
569 | if ( !apply_mesg.empty() ) | 558 | if ( !apply_mesg.empty() ) |
570 | { | 559 | { |
571 | LLStringUtil::format_map_t args; | 560 | LLSD args; |
572 | args["[MESSAGE]"] = apply_mesg; | 561 | args["MESSAGE"] = apply_mesg; |
573 | gViewerWindow->alertXml("GenericAlert", args); | 562 | LLNotifications::instance().add("GenericAlert", args); |
574 | } | 563 | } |
575 | 564 | ||
576 | return false; | 565 | return false; |
@@ -638,7 +627,7 @@ void LLPanelGroup::showNotice(const std::string& subject, | |||
638 | // We need to clean up that inventory offer. | 627 | // We need to clean up that inventory offer. |
639 | if (inventory_offer) | 628 | if (inventory_offer) |
640 | { | 629 | { |
641 | inventory_offer_callback( IOR_DECLINE , inventory_offer); | 630 | inventory_offer->forceResponse(IOR_DECLINE); |
642 | } | 631 | } |
643 | return; | 632 | return; |
644 | } | 633 | } |