summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rwxr-xr-xindra/llui/llfloater.cpp47
-rwxr-xr-xindra/llui/llfloater.h5
-rwxr-xr-xindra/llui/llpanel.cpp23
-rwxr-xr-xindra/llui/llpanel.h11
4 files changed, 12 insertions, 74 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index f8b01e106b..0807b497a7 100755
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -704,29 +704,11 @@ void LLFloater::openFloater(const LLSD& key)
dirtyRect();
}
-void LLFloater::verifyClose( bool app_quitting )
-{
- LLPanel::handleCloseConfirmation( app_quitting );
-}
-
void LLFloater::closeFloater(bool app_quitting)
{
llinfos << "Closing floater " << getName() << llendl;
-
- if (!app_quitting)
- {
- if ( mVerifyUponClose && !mForceCloseAfterVerify )
- {
- onClose( app_quitting );
- if ( mForceCloseAfterVerify )
- {
- return;
- }
- }
- }
-
if (app_quitting)
- {
+ {
LLFloater::sQuitting = true;
}
@@ -799,7 +781,7 @@ void LLFloater::closeFloater(bool app_quitting)
dirtyRect();
// Close callbacks
- onClose(app_quitting);
+ onClose(app_quitting);
mCloseSignal(this, LLSD(app_quitting));
// Hide or Destroy
@@ -1639,7 +1621,7 @@ void LLFloater::bringToFront( S32 x, S32 y )
// virtual
-void LLFloater::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key)
+void LLFloater::setVisibleAndFrontmost(BOOL take_focus,const LLSD& key)
{
LLMultiFloater* hostp = getHost();
if (hostp)
@@ -1806,19 +1788,11 @@ void LLFloater::initRectControl()
void LLFloater::closeFrontmostFloater()
{
LLFloater* floater_to_close = gFloaterView->getFrontmostClosableFloater();
- if( floater_to_close )
+ if(floater_to_close)
{
- if ( floater_to_close->mVerifyUponClose )
- {
- floater_to_close->verifyClose();
- //Closing of the window handle in the subclass - so bug out here.
- return;
- }
- else
- {
- floater_to_close->closeFloater();
- }
+ floater_to_close->closeFloater();
}
+
// if nothing took focus after closing focused floater
// give it to next floater (to allow closing multiple windows via keyboard in rapid succession)
if (gFocusMgr.getKeyboardFocus() == NULL)
@@ -2657,14 +2631,7 @@ void LLFloaterView::closeAllChildren(bool app_quitting)
if (floaterp->canClose() && !floaterp->isDead() &&
(app_quitting || floaterp->getVisible()))
{
- if ( floaterp->mVerifyUponClose )
- {
- floaterp->verifyClose(app_quitting);
- }
- else
- {
- floaterp->closeFloater(app_quitting);
- }
+ floaterp->closeFloater(app_quitting);
}
}
}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 8eb40ddd0b..1d0d3cb050 100755
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -225,7 +225,6 @@ public:
// If allowed, close the floater cleanly, releasing focus.
virtual void closeFloater(bool app_quitting = false);
- virtual void verifyClose( bool app_quitting = false );
// Close the floater or its host. Use when hidding or toggling a floater instance.
virtual void closeHostedFloater();
@@ -304,9 +303,9 @@ public:
/*virtual*/ void setVisible(BOOL visible); // do not override
/*virtual*/ void handleVisibilityChange ( BOOL new_visibility ); // do not override
- void handleCloseConfirmation( );
+
void setFrontmost(BOOL take_focus = TRUE);
- virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD());
+ virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD());
// Defaults to false.
virtual BOOL canSaveAs() const { return FALSE; }
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index b0bdbcb7d1..67472ad166 100755
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -114,10 +114,7 @@ LLPanel::LLPanel(const LLPanel::Params& p)
mCommitCallbackRegistrar(false),
mEnableCallbackRegistrar(false),
mXMLFilename(p.filename),
- mVisibleSignal(NULL),
- mCloseConfirmationSignal(NULL),
- mVerifyUponClose(false),
- mForceCloseAfterVerify(false)
+ mVisibleSignal(NULL)
// *NOTE: Be sure to also change LLPanel::initFromParams(). We have too
// many classes derived from LLPanel to retrofit them all to pass in params.
{
@@ -130,7 +127,6 @@ LLPanel::LLPanel(const LLPanel::Params& p)
LLPanel::~LLPanel()
{
delete mVisibleSignal;
- delete mCloseConfirmationSignal;
}
// virtual
@@ -353,14 +349,6 @@ void LLPanel::handleVisibilityChange ( BOOL new_visibility )
(*mVisibleSignal)(this, LLSD(new_visibility) ); // Pass BOOL as LLSD
}
-
-void LLPanel::handleCloseConfirmation( bool app_quitting)
-{
- if (mCloseConfirmationSignal)
- {
- (*mCloseConfirmationSignal)(this, LLSD( app_quitting ) );
- }
-}
void LLPanel::setFocus(BOOL b)
{
if( b && !hasFocus())
@@ -971,17 +959,10 @@ boost::signals2::connection LLPanel::setVisibleCallback( const commit_signal_t::
{
mVisibleSignal = new commit_signal_t();
}
+
return mVisibleSignal->connect(cb);
}
-boost::signals2::connection LLPanel::setCloseConfirmationCallback( const commit_signal_t::slot_type& cb )
-{
- if (!mCloseConfirmationSignal)
- {
- mCloseConfirmationSignal = new commit_signal_t();
- }
- return mCloseConfirmationSignal->connect(cb);
-}
static LLFastTimer::DeclareTimer FTM_BUILD_PANELS("Build Panels");
//-----------------------------------------------------------------------------
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index 02f8c0aba7..e63b41f97c 100755
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -116,8 +116,6 @@ public:
/*virtual*/ void draw();
/*virtual*/ BOOL handleKeyHere( KEY key, MASK mask );
/*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
- void handleCloseConfirmation( bool app_quitting );
-
// From LLFocusableElement
/*virtual*/ void setFocus( BOOL b );
@@ -253,8 +251,6 @@ public:
std::string getXMLFilename() { return mXMLFilename; };
boost::signals2::connection setVisibleCallback( const commit_signal_t::slot_type& cb );
- boost::signals2::connection setCloseConfirmationCallback( const commit_signal_t::slot_type& cb );
-
protected:
// Override to set not found list
@@ -264,7 +260,6 @@ protected:
EnableCallbackRegistry::ScopedRegistrar mEnableCallbackRegistrar;
commit_signal_t* mVisibleSignal; // Called when visibility changes, passes new visibility as LLSD()
- commit_signal_t* mCloseConfirmationSignal;
std::string mHelpTopic; // the name of this panel's help topic to display in the Help Viewer
typedef std::deque<const LLCallbackMap::map_t*> factory_stack_t;
@@ -272,11 +267,7 @@ protected:
// for setting the xml filename when building panel in context dependent cases
std::string mXMLFilename;
- //Specific close-down logic in subclass
- BOOL mVerifyUponClose;
-public:
- BOOL mForceCloseAfterVerify;
-
+
private:
BOOL mBgVisible; // any background at all?
BOOL mBgOpaque; // use opaque color or image