summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2010-05-07 08:51:23 +0300
committerYuri Chebotarev <ychebotarev@productengine.com>2010-05-07 08:51:23 +0300
commit78b3419fc895371aaeb4df9b886b3ee08c5ffd81 (patch)
tree2183637923fc776d5d0eb1a7fdfc2a531acdae1a
parent17b42d5c5e0577cfcb59dc8972ddee602938d419 (diff)
EXT-7143 FIXED remove redundat code
reviewed V.Savchuk at https://codereview.productengine.com/secondlife/r/358/ --HG-- branch : product-engine
-rw-r--r--indra/newview/llpanelgroup.cpp68
-rw-r--r--indra/newview/llpanelgroup.h6
2 files changed, 1 insertions, 73 deletions
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index c00b6a4147..39833a7201 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -92,8 +92,7 @@ LLPanelGroup::LLPanelGroup()
: LLPanel(),
LLGroupMgrObserver( LLUUID() ),
mSkipRefresh(FALSE),
- mButtonJoin(NULL),
- mShowingNotifyDialog(false)
+ mButtonJoin(NULL)
{
// Set up the factory callbacks.
// Roles sub tabs
@@ -629,69 +628,4 @@ void LLPanelGroup::showNotice(const std::string& subject,
}
-bool LLPanelGroup::canClose()
-{
- if(getVisible() == false)
- return true;
-
- bool need_save = false;
- std::string mesg;
- for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it)
- if(need_save|=(*it)->needsApply(mesg))
- break;
- if(!need_save)
- return false;
- // If no message was provided, give a generic one.
- if (mesg.empty())
- {
- mesg = mDefaultNeedsApplyMesg;
- }
- // Create a notify box, telling the user about the unapplied tab.
- LLSD args;
- args["NEEDS_APPLY_MESSAGE"] = mesg;
- args["WANT_APPLY_MESSAGE"] = mWantApplyMesg;
-
- LLNotificationsUtil::add("SaveChanges", args, LLSD(), boost::bind(&LLPanelGroup::handleNotifyCallback,this, _1, _2));
-
- mShowingNotifyDialog = true;
-
- return false;
-}
-
-bool LLPanelGroup::notifyChildren(const LLSD& info)
-{
- if(info.has("request") && mID.isNull() )
- {
- std::string str_action = info["request"];
-
- if (str_action == "quit" )
- {
- canClose();
- return true;
- }
- if(str_action == "wait_quit")
- return mShowingNotifyDialog;
- }
- return false;
-}
-bool LLPanelGroup::handleNotifyCallback(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- mShowingNotifyDialog = false;
- switch (option)
- {
- case 0: // "Apply Changes"
- apply();
- break;
- case 1: // "Ignore Changes"
- break;
- case 2: // "Cancel"
- default:
- // Do nothing. The user is canceling the action.
- // If we were quitting, we didn't really mean it.
- LLAppViewer::instance()->abortQuit();
- break;
- }
- return false;
-}
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index 359f252383..13a03b0713 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -95,9 +95,6 @@ public:
LLOfferInfo* inventory_offer);
- bool notifyChildren (const LLSD& info);
- bool handleNotifyCallback(const LLSD&, const LLSD&);
-
protected:
virtual void update(LLGroupChange gc);
@@ -117,9 +114,6 @@ protected:
protected:
bool apply(LLPanelGroupTab* tab);
- bool canClose();
-
- bool mShowingNotifyDialog;
LLTimer mRefreshTimer;