diff options
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r-- | indra/llui/llfloater.cpp | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 5ea9f5b6cc..3ece1c12bf 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -64,8 +64,6 @@ // use this to control "jumping" behavior when Ctrl-Tabbing const S32 TABBED_FLOATER_OFFSET = 0; -extern LLControlGroup gSavedSettings; - namespace LLInitParam { void TypeValues<LLFloaterEnums::EOpenPositioning>::declareValues() @@ -653,13 +651,7 @@ void LLFloater::openFloater(const LLSD& key) && !getFloaterHost() && (!getVisible() || isMinimized())) { - //Don't play a sound for incoming voice call based upon chat preference setting - bool playSound = !(getName() == "incoming call" && gSavedSettings.getBOOL("PlaySoundIncomingVoiceCall") == FALSE); - - if(playSound) - { - make_ui_sound("UISndWindowOpen"); - } + make_ui_sound("UISndWindowOpen"); } //RN: for now, we don't allow rehosting from one multifloater to another @@ -2263,7 +2255,7 @@ void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent) for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) { LLView* viewp = *child_it; - LLFloater* floaterp = (LLFloater*)viewp; + LLFloater* floaterp = dynamic_cast<LLFloater*>(viewp); if (floaterp->isDependent()) { // dependents are moved with their "dependee" @@ -2318,10 +2310,14 @@ void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent) void LLFloaterView::restoreAll() { // make sure all subwindows aren't minimized - for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) + child_list_t child_list = *(getChildList()); + for (child_list_const_iter_t child_it = child_list.begin(); child_it != child_list.end(); ++child_it) { - LLFloater* floaterp = (LLFloater*)*child_it; - floaterp->setMinimized(FALSE); + LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it); + if (floaterp) + { + floaterp->setMinimized(FALSE); + } } // *FIX: make sure dependents are restored @@ -2597,7 +2593,7 @@ void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom) ++child_it) //loop floaters { // Examine minimized children. - LLFloater* floater = (LLFloater*)((LLView*)*child_it); + LLFloater* floater = dynamic_cast<LLFloater*>(*child_it); if(floater->isMinimized()) { LLRect r = floater->getRect(); @@ -2650,7 +2646,7 @@ void LLFloaterView::closeAllChildren(bool app_quitting) continue; } - LLFloater* floaterp = (LLFloater*)viewp; + LLFloater* floaterp = dynamic_cast<LLFloater*>(viewp); // Attempt to close floater. This will cause the "do you want to save" // dialogs to appear. @@ -2716,8 +2712,7 @@ BOOL LLFloaterView::allChildrenClosed() // by setting themselves invisible) for (child_list_const_iter_t it = getChildList()->begin(); it != getChildList()->end(); ++it) { - LLView* viewp = *it; - LLFloater* floaterp = (LLFloater*)viewp; + LLFloater* floaterp = dynamic_cast<LLFloater*>(*it); if (floaterp->getVisible() && !floaterp->isDead() && floaterp->isCloseable()) { @@ -2953,7 +2948,7 @@ void LLFloaterView::syncFloaterTabOrder() // otherwise, make sure the focused floater is in the front of the child list for ( child_list_const_reverse_iter_t child_it = getChildList()->rbegin(); child_it != getChildList()->rend(); ++child_it) { - LLFloater* floaterp = (LLFloater*)*child_it; + LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it); if (gFocusMgr.childHasKeyboardFocus(floaterp)) { bringToFront(floaterp, FALSE); @@ -2975,7 +2970,7 @@ LLFloater* LLFloaterView::getParentFloater(LLView* viewp) const if (parentp == this) { - return (LLFloater*)viewp; + return dynamic_cast<LLFloater*>(viewp); } return NULL; |