diff options
-rw-r--r-- | indra/llcommon/llinitparam.h | 30 | ||||
-rw-r--r-- | indra/llui/llfloater.cpp | 31 | ||||
-rw-r--r-- | indra/newview/llconversationlog.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 7 | ||||
-rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llnotificationofferhandler.cpp | 10 | ||||
-rw-r--r-- | indra/newview/lltoolbarview.cpp | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 2 |
9 files changed, 56 insertions, 62 deletions
diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h index 66aac4f549..ae836645b9 100644 --- a/indra/llcommon/llinitparam.h +++ b/indra/llcommon/llinitparam.h @@ -497,25 +497,25 @@ namespace LLInitParam virtual ~Parser(); template <typename T> bool readValue(T& param, typename boost::disable_if<boost::is_enum<T> >::type* dummy = 0) - { + { parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T)); if (found_it != mParserReadFuncs->end()) - { + { return found_it->second(*this, (void*)¶m); + } + + return false; } - return false; - } - template <typename T> bool readValue(T& param, typename boost::enable_if<boost::is_enum<T> >::type* dummy = 0) - { + { parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T)); if (found_it != mParserReadFuncs->end()) - { + { return found_it->second(*this, (void*)¶m); - } + } else - { + { found_it = mParserReadFuncs->find(&typeid(S32)); if (found_it != mParserReadFuncs->end()) { @@ -523,20 +523,20 @@ namespace LLInitParam bool parsed = found_it->second(*this, (void*)&int_value); param = (T)int_value; return parsed; + } } + return false; } - return false; - } template <typename T> bool writeValue(const T& param, name_stack_t& name_stack) - { + { parser_write_func_map_t::iterator found_it = mParserWriteFuncs->find(&typeid(T)); if (found_it != mParserWriteFuncs->end()) - { + { return found_it->second(*this, (const void*)¶m, name_stack); + } + return false; } - return false; - } // dispatch inspection to registered inspection functions, for each parameter in a param block template <typename T> bool inspectValue(name_stack_t& name_stack, S32 min_count, S32 max_count, const possible_values_t* possible_values) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 05b2a1b7c6..734e2cfda7 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2357,7 +2357,6 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) { if (mFrontChild == child) { - if (give_focus && !gFocusMgr.childHasKeyboardFocus(child)) { child->setFocus(TRUE); @@ -2374,15 +2373,14 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) // this floater is hosted elsewhere and hence not one of our children, abort return; } - std::vector<LLView*> floaters_to_move; + std::vector<LLFloater*> floaters_to_move; // Look at all floaters...tab - for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) + for (child_list_const_iter_t child_it = beginChild(); child_it != endChild(); ++child_it) { - LLView* viewp = *child_it; - LLFloater *floater = (LLFloater *)viewp; + LLFloater* floater = dynamic_cast<LLFloater*>(*child_it); // ...but if I'm a dependent floater... - if (child->isDependent()) + if (floater && child->isDependent()) { // ...look for floaters that have me as a dependent... LLFloater::handle_set_iter_t found_dependent = floater->mDependents.find(child->getHandle()); @@ -2390,15 +2388,14 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) if (found_dependent != floater->mDependents.end()) { // ...and make sure all children of that floater (including me) are brought to front... - for(LLFloater::handle_set_iter_t dependent_it = floater->mDependents.begin(); - dependent_it != floater->mDependents.end(); ) + for (LLFloater::handle_set_iter_t dependent_it = floater->mDependents.begin(); + dependent_it != floater->mDependents.end(); ++dependent_it) { LLFloater* sibling = dependent_it->get(); if (sibling) { floaters_to_move.push_back(sibling); } - ++dependent_it; } //...before bringing my parent to the front... floaters_to_move.push_back(floater); @@ -2406,10 +2403,10 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) } } - std::vector<LLView*>::iterator view_it; - for(view_it = floaters_to_move.begin(); view_it != floaters_to_move.end(); ++view_it) + std::vector<LLFloater*>::iterator floater_it; + for(floater_it = floaters_to_move.begin(); floater_it != floaters_to_move.end(); ++floater_it) { - LLFloater* floaterp = (LLFloater*)(*view_it); + LLFloater* floaterp = *floater_it; sendChildToFront(floaterp); // always unminimize dependee, but allow dependents to stay minimized @@ -2421,23 +2418,19 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus) floaters_to_move.clear(); // ...then bringing my own dependents to the front... - for(LLFloater::handle_set_iter_t dependent_it = child->mDependents.begin(); - dependent_it != child->mDependents.end(); ) + for (LLFloater::handle_set_iter_t dependent_it = child->mDependents.begin(); + dependent_it != child->mDependents.end(); ++dependent_it) { LLFloater* dependent = dependent_it->get(); if (dependent) { sendChildToFront(dependent); - //don't un-minimize dependent windows automatically - // respect user's wishes - //dependent->setMinimized(FALSE); } - ++dependent_it; } // ...and finally bringing myself to front // (do this last, so that I'm left in front at end of this call) - if( *getChildList()->begin() != child ) + if (*beginChild() != child) { sendChildToFront(child); } diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index 22277e6421..fc3bc8551c 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -192,11 +192,11 @@ LLConversationLog::LLConversationLog() : { LLControlVariable * keep_log_ctrlp = gSavedPerAccountSettings.getControl("KeepConversationLogTranscripts").get(); S32 log_mode = keep_log_ctrlp->getValue(); - + keep_log_ctrlp->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2)); if (log_mode > 0) { loadFromFile(getFileName()); - keep_log_ctrlp->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2)); + enableLogging(log_mode); } } @@ -333,6 +333,7 @@ void LLConversationLog::removeConversation(const LLConversation& conversation) { mConversations.erase(conv_it); notifyObservers(); + cache(); return; } } @@ -534,5 +535,6 @@ void LLConversationLog::onClearLogResponse(const LLSD& notification, const LLSD& { mConversations.clear(); notifyObservers(); + cache(); } } diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 21bd8ab1d2..2f2b09b589 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -639,11 +639,7 @@ void LLFloaterIMContainer::collapseMessagesPane(bool collapse) return; } - if (mIsFirstLaunch) - { - mIsFirstLaunch = false; - return; - } + mIsFirstLaunch = false; // Save current width of panels before collapsing/expanding right pane. S32 conv_pane_width = mConversationsPane->getRect().getWidth(); @@ -1345,6 +1341,7 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool if (widget && widget->getParentFolder()) { widget->getParentFolder()->setSelection(widget, FALSE, FALSE); + mConversationsRoot->scrollToShowSelection(); } //When in DND mode, remove stored IM notifications diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 662d2df5d2..3d8d0e15ec 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1446,7 +1446,6 @@ void LLFloaterPreference::onClickLogPath() std::string dir_name = picker.getDirName(); gSavedPerAccountSettings.setString("InstantMessageLogPath", dir_name); - updateLogLocation(dir_name); // enable/disable 'Delete transcripts button updateDeleteTranscriptsButton(); @@ -1492,6 +1491,7 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im getChildView("favorites_on_login_check")->setEnabled(TRUE); getChildView("log_path_string")->setEnabled(FALSE);// LineEditor becomes readonly in this case. getChildView("log_path_button")->setEnabled(TRUE); + getChildView("chat_font_size")->setEnabled(TRUE); } void LLFloaterPreference::onUpdateSliderText(LLUICtrl* ctrl, const LLSD& name) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index cdf6cb6252..cf6a215970 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -213,16 +213,14 @@ void on_new_message(const LLSD& msg) //conversation floater not focused (visible or not) bool conversation_floater_not_focused = conversation_floater_is_closed || !im_box->hasFocus(); - - // Skip toasting and flashing if we have open window of IM with this session id - if (session_floater - && session_floater->isInVisibleChain() - && !session_floater->isMinimized() - && !(session_floater->getHost() && session_floater->getHost()->isMinimized())) - { - return; - } - if ("toast" == action) + // sess. floater is open + bool session_floater_is_open = + session_floater + && session_floater->isInVisibleChain() + && !session_floater->isMinimized() + && !(session_floater->getHost() && session_floater->getHost()->isMinimized()); + + if ("toast" == action && !session_floater_is_open) { //User is not focused on conversation containing the message if(session_floater_not_focused) @@ -254,7 +252,7 @@ void on_new_message(const LLSD& msg) { if (conversation_floater_not_focused) { - if(session_floater_not_focused && !gAgent.isDoNotDisturb()) + if(!session_floater_is_open && !gAgent.isDoNotDisturb()) { //User is not focused on conversation containing the message gToolBarView->flashCommand(LLCommandId("chat"), true); @@ -273,7 +271,7 @@ void on_new_message(const LLSD& msg) } } - else if("openconversations" == action) + else if("openconversations" == action && !session_floater_is_open) { //User is not focused on conversation containing the message if(session_floater_not_focused) diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index cde7bb18ce..a2bd96f35a 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -120,11 +120,11 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification) channel->addToast(p); //Will not play a notification sound for inventory and teleport offer based upon chat preference - bool playSound = !((notification->isDND()) - && (notification->getName() == "UserGiveItem" - && gSavedSettings.getBOOL("PlaySoundInventoryOffer") == FALSE) - || notification->getName() == "TeleportOffered" - && gSavedSettings.getBOOL("PlaySoundTeleportOffer") == FALSE); + bool playSound = (!notification->isDND() + && ((notification->getName() == "UserGiveItem" + && gSavedSettings.getBOOL("PlaySoundInventoryOffer")) + || (notification->getName() == "TeleportOffered" + && gSavedSettings.getBOOL("PlaySoundTeleportOffer")))); if(playSound) { diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index de07ad510b..b2318f9158 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -241,8 +241,9 @@ bool LLToolBarView::loadToolbars(bool force_default) LLXUIParser parser; if (!err) { - parser.readXUI(root, toolbar_set, toolbar_file); + parser.readXUI(root, toolbar_set, toolbar_file); } + if (!err && !toolbar_set.validateBlock()) { llwarns << "Unable to validate toolbars from file: " << toolbar_file << llendl; @@ -254,8 +255,9 @@ bool LLToolBarView::loadToolbars(bool force_default) if (force_default) { llerrs << "Unable to load toolbars from default file : " << toolbar_file << llendl; - return false; - } + return false; + } + // Try to load the default toolbars return loadToolbars(true); } diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index 9b22c8c6dd..9db3816c92 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -373,6 +373,7 @@ </text> <combo_box + enabled="false" control_name="KeepConversationLogTranscripts" height="23" layout="topleft" @@ -428,6 +429,7 @@ </text> <line_editor + enabled="false" control_name="InstantMessageLogPath" border_style="line" border_thickness="1" |