diff options
author | Jacek Antonelli | 2008-08-15 23:45:27 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:27 -0500 |
commit | a8a62201ba762e98dff92cf49033e577fc34d8d4 (patch) | |
tree | 11f8513c5cdc222f2fac0c93eb724c089803c200 /linden/indra/llui/llfloater.cpp | |
parent | Second Life viewer sources 1.18.6.4-RC (diff) | |
download | meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.zip meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.gz meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.bz2 meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.xz |
Second Life viewer sources 1.19.0.0
Diffstat (limited to 'linden/indra/llui/llfloater.cpp')
-rw-r--r-- | linden/indra/llui/llfloater.cpp | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp index 8ff3c48..1500f9f 100644 --- a/linden/indra/llui/llfloater.cpp +++ b/linden/indra/llui/llfloater.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -128,7 +128,11 @@ LLFloater::handle_map_t LLFloater::sFloaterMap; | |||
128 | 128 | ||
129 | LLFloaterView* gFloaterView = NULL; | 129 | LLFloaterView* gFloaterView = NULL; |
130 | 130 | ||
131 | LLFloater::LLFloater() | 131 | LLFloater::LLFloater() : |
132 | //FIXME: we should initialize *all* member variables here | ||
133 | mResizable(FALSE), | ||
134 | mDragOnLeft(FALSE) | ||
135 | |||
132 | { | 136 | { |
133 | // automatically take focus when opened | 137 | // automatically take focus when opened |
134 | mAutoFocus = TRUE; | 138 | mAutoFocus = TRUE; |
@@ -215,9 +219,14 @@ void LLFloater::init(const LLString& title, | |||
215 | } | 219 | } |
216 | mButtonScale = 1.f; | 220 | mButtonScale = 1.f; |
217 | 221 | ||
218 | LLPanel::deleteAllChildren(); | 222 | BOOL need_border = mBorder != NULL; |
223 | |||
224 | // this will delete mBorder too | ||
225 | deleteAllChildren(); | ||
226 | // make sure we don't have a pointer to an old, deleted border | ||
227 | mBorder = NULL; | ||
219 | //sjb: HACK! we had a border which was just deleted, so re-create it | 228 | //sjb: HACK! we had a border which was just deleted, so re-create it |
220 | if (mBorder != NULL) | 229 | if (need_border) |
221 | { | 230 | { |
222 | addBorder(); | 231 | addBorder(); |
223 | } | 232 | } |
@@ -609,7 +618,7 @@ void LLFloater::releaseFocus() | |||
609 | 618 | ||
610 | if( gFocusMgr.childHasKeyboardFocus( this ) ) | 619 | if( gFocusMgr.childHasKeyboardFocus( this ) ) |
611 | { | 620 | { |
612 | gFocusMgr.setKeyboardFocus(NULL, NULL); | 621 | gFocusMgr.setKeyboardFocus(NULL); |
613 | } | 622 | } |
614 | 623 | ||
615 | if( gFocusMgr.childHasMouseCapture( this ) ) | 624 | if( gFocusMgr.childHasMouseCapture( this ) ) |
@@ -1026,13 +1035,10 @@ void LLFloater::setHost(LLMultiFloater* host) | |||
1026 | { | 1035 | { |
1027 | mButtonsEnabled[BUTTON_TEAR_OFF] = TRUE; | 1036 | mButtonsEnabled[BUTTON_TEAR_OFF] = TRUE; |
1028 | } | 1037 | } |
1029 | |||
1030 | mIsFocusRoot = FALSE; | ||
1031 | } | 1038 | } |
1032 | else if (!mHostHandle.isDead() && !host) | 1039 | else if (!mHostHandle.isDead() && !host) |
1033 | { | 1040 | { |
1034 | mButtonScale = 1.f; | 1041 | mButtonScale = 1.f; |
1035 | mIsFocusRoot = TRUE; | ||
1036 | //mButtonsEnabled[BUTTON_TEAR_OFF] = FALSE; | 1042 | //mButtonsEnabled[BUTTON_TEAR_OFF] = FALSE; |
1037 | } | 1043 | } |
1038 | updateButtons(); | 1044 | updateButtons(); |
@@ -1260,6 +1266,7 @@ void LLFloater::show(LLFloater* floaterp) | |||
1260 | { | 1266 | { |
1261 | if (floaterp) | 1267 | if (floaterp) |
1262 | { | 1268 | { |
1269 | gFocusMgr.triggerFocusFlash(); | ||
1263 | floaterp->open(); | 1270 | floaterp->open(); |
1264 | if (floaterp->getHost()) | 1271 | if (floaterp->getHost()) |
1265 | { | 1272 | { |
@@ -2245,7 +2252,8 @@ void LLFloaterView::refresh() | |||
2245 | LLFloater* floaterp = (LLFloater*)*child_it; | 2252 | LLFloater* floaterp = (LLFloater*)*child_it; |
2246 | if( floaterp->getVisible() ) | 2253 | if( floaterp->getVisible() ) |
2247 | { | 2254 | { |
2248 | adjustToFitScreen(floaterp, TRUE); | 2255 | // minimized floaters are kept fully onscreen |
2256 | adjustToFitScreen(floaterp, !floaterp->isMinimized()); | ||
2249 | } | 2257 | } |
2250 | } | 2258 | } |
2251 | } | 2259 | } |
@@ -2605,9 +2613,9 @@ void LLMultiFloater::draw() | |||
2605 | for (S32 i = 0; i < mTabContainer->getTabCount(); i++) | 2613 | for (S32 i = 0; i < mTabContainer->getTabCount(); i++) |
2606 | { | 2614 | { |
2607 | LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(i); | 2615 | LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(i); |
2608 | if (floaterp->getTitle() != mTabContainer->getPanelTitle(i)) | 2616 | if (floaterp->getShortTitle() != mTabContainer->getPanelTitle(i)) |
2609 | { | 2617 | { |
2610 | mTabContainer->setPanelTitle(i, floaterp->getTitle()); | 2618 | mTabContainer->setPanelTitle(i, floaterp->getShortTitle()); |
2611 | } | 2619 | } |
2612 | } | 2620 | } |
2613 | LLFloater::draw(); | 2621 | LLFloater::draw(); |
@@ -2725,7 +2733,7 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, | |||
2725 | 2733 | ||
2726 | if ( select_added_floater ) | 2734 | if ( select_added_floater ) |
2727 | { | 2735 | { |
2728 | mTabContainer->selectLastTab(); | 2736 | mTabContainer->selectTabPanel(floaterp); |
2729 | } | 2737 | } |
2730 | 2738 | ||
2731 | floaterp->setHost(this); | 2739 | floaterp->setHost(this); |
@@ -2970,8 +2978,9 @@ void LLMultiFloater::updateResizeLimits() | |||
2970 | // make sure upper left corner doesn't move | 2978 | // make sure upper left corner doesn't move |
2971 | translate(0, cur_height - mRect.getHeight()); | 2979 | translate(0, cur_height - mRect.getHeight()); |
2972 | 2980 | ||
2973 | // Try to keep whole view onscreen, don't allow partial offscreen. | 2981 | // make sure this window is visible on screen when it has been modified |
2974 | gFloaterView->adjustToFitScreen(this, FALSE); | 2982 | // (tab added, etc) |
2983 | gFloaterView->adjustToFitScreen(this, TRUE); | ||
2975 | } | 2984 | } |
2976 | } | 2985 | } |
2977 | 2986 | ||