Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience-fui

meow-7.2.2
Richard Nelson 2011-10-12 13:50:32 -07:00
commit cc839191a8
3 changed files with 60 additions and 3 deletions

View File

@ -2506,6 +2506,52 @@ void LLFloaterView::closeAllChildren(bool app_quitting)
}
}
void LLFloaterView::hiddenFloaterClosed(LLFloater* floater)
{
for (hidden_floaters_t::iterator it = mHiddenFloaters.begin(), end_it = mHiddenFloaters.end();
it != end_it;
++it)
{
if (it->first.get() == floater)
{
it->second.disconnect();
mHiddenFloaters.erase(it);
break;
}
}
}
void LLFloaterView::hideAllFloaters()
{
child_list_t child_list = *(getChildList());
for (child_list_iter_t it = child_list.begin(); it != child_list.end(); ++it)
{
LLFloater* floaterp = dynamic_cast<LLFloater*>(*it);
if (floaterp && floaterp->getVisible())
{
floaterp->setVisible(false);
boost::signals2::connection connection = floaterp->mCloseSignal.connect(boost::bind(&LLFloaterView::hiddenFloaterClosed, this, floaterp));
mHiddenFloaters.push_back(std::make_pair(floaterp->getHandle(), connection));
}
}
}
void LLFloaterView::showHiddenFloaters()
{
for (hidden_floaters_t::iterator it = mHiddenFloaters.begin(), end_it = mHiddenFloaters.end();
it != end_it;
++it)
{
LLFloater* floaterp = it->first.get();
if (floaterp)
{
floaterp->setVisible(true);
}
it->second.disconnect();
}
mHiddenFloaters.clear();
}
BOOL LLFloaterView::allChildrenClosed()
{

View File

@ -35,6 +35,7 @@
#include "lluuid.h"
//#include "llnotificationsutil.h"
#include <set>
#include <boost/signals2.hpp>
class LLDragHandle;
class LLResizeHandle;
@ -454,8 +455,6 @@ private:
typedef std::map<LLHandle<LLFloater>, LLFloater*>::iterator handle_map_iter_t;
static handle_map_t sFloaterMap;
std::vector<LLHandle<LLView> > mMinimizedHiddenChildren;
BOOL mHasBeenDraggedWhileMinimized;
S32 mPreviousMinimizedBottom;
S32 mPreviousMinimizedLeft;
@ -509,6 +508,10 @@ public:
BOOL allChildrenClosed();
void shiftFloaters(S32 x_offset, S32 y_offset);
void hideAllFloaters();
void showHiddenFloaters();
LLFloater* getFrontmost() const;
LLFloater* getBackmost() const;
LLFloater* getParentFloater(LLView* viewp) const;
@ -523,11 +526,15 @@ public:
void setFloaterSnapView(LLHandle<LLView> snap_view) {mSnapView = snap_view; }
private:
void hiddenFloaterClosed(LLFloater* floater);
LLHandle<LLView> mSnapView;
BOOL mFocusCycleMode;
S32 mSnapOffsetBottom;
S32 mSnapOffsetRight;
S32 mMinimizePositionVOffset;
typedef std::vector<std::pair<LLHandle<LLFloater>, boost::signals2::connection> > hidden_floaters_t;
hidden_floaters_t mHiddenFloaters;
};
//

View File

@ -4992,7 +4992,11 @@ void LLViewerWindow::setUIVisibility(bool visible)
if (!visible)
{
gFloaterView->closeAllChildren(false);
gFloaterView->hideAllFloaters();
}
else
{
gFloaterView->showHiddenFloaters();
}
}