diff options
Diffstat (limited to 'indra/newview')
45 files changed, 1024 insertions, 376 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 0aa01f6fd9..18a1ea4047 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1716,17 +1716,6 @@ <key>Value</key> <integer>131073</integer> </map> - <key>NearbyChatIsNotTornOff</key> - <map> - <key>Comment</key> - <string>saving torn-off state of the nearby chat between sessions</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> <key>CloseChatOnReturn</key> <map> <key>Comment</key> @@ -4282,6 +4271,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>IMShowContentPanel</key> + <map> + <key>Comment</key> + <string>Show Toolbar and Body Panels</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>IgnoreAllNotifications</key> <map> <key>Comment</key> @@ -11095,7 +11095,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <integer>0.0</integer> + <real>0.0</real> </map> <key>TextureFetchUpdateSkipLowPriority</key> <map> @@ -12734,6 +12734,7 @@ <key>Type</key> <string>LLSD</string> <key>Value</key> + <array/> </map> <key>VFSOldSize</key> <map> diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml index 01a70f2671..e660c1a33b 100644 --- a/indra/newview/app_settings/settings_minimal.xml +++ b/indra/newview/app_settings/settings_minimal.xml @@ -1 +1,4 @@ -<llsd/>
\ No newline at end of file +<?xml version="1.0"?> +<llsd> + <undef/> +</llsd> diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 363713f2f4..ada374f892 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -281,6 +281,17 @@ <key>Value</key> <integer>2</integer> </map> + <key>NearbyChatIsNotTornOff</key> + <map> + <key>Comment</key> + <string>saving torn-off state of the nearby chat between sessions</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>ShowFavoritesOnLogin</key> <map> <key>Comment</key> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 53c694eaca..1c6f099185 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -324,7 +324,7 @@ BOOL gLogoutInProgress = FALSE; //////////////////////////////////////////////////////////// // Internal globals... that should be removed. static std::string gArgs; - +const int MAX_MARKER_LENGTH = 1024; const std::string MARKER_FILE_NAME("SecondLife.exec_marker"); const std::string ERROR_MARKER_FILE_NAME("SecondLife.error_marker"); const std::string LLERROR_MARKER_FILE_NAME("SecondLife.llerror_marker"); @@ -638,7 +638,7 @@ LLTextureFetch* LLAppViewer::sTextureFetch = NULL; LLAppViewer::LLAppViewer() : mMarkerFile(), - mLogoutMarkerFile(NULL), + mLogoutMarkerFile(), mReportedCrash(false), mNumSessions(0), mPurgeCache(false), @@ -3219,8 +3219,8 @@ void LLAppViewer::writeSystemInfo() } // Dump some debugging info - LL_INFOS("SystemInfo") << LLTrans::getString("APP_NAME") - << " version " << LLVersionInfo::getShortVersion() << LL_ENDL; + LL_INFOS("SystemInfo") << "Application: " << LLTrans::getString("APP_NAME") << LL_ENDL; + LL_INFOS("SystemInfo") << "Version: " << LLVersionInfo::getChannelAndVersion() << LL_ENDL; // Dump the local time and time zone time_t now; @@ -3346,22 +3346,27 @@ void LLAppViewer::handleViewerCrash() //we're already in a crash situation if (gDirUtilp) { - std::string crash_file_name; - if(gLLErrorActivated) crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LLERROR_MARKER_FILE_NAME); - else crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME); - llinfos << "Creating crash marker file " << crash_file_name << llendl; + std::string crash_file_name = ( gLLErrorActivated ) + ? gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LLERROR_MARKER_FILE_NAME) + : gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME); + LL_INFOS("MarkerFile") << "Creating crash marker file " << crash_file_name << LL_ENDL; LLAPRFile crash_file ; crash_file.open(crash_file_name, LL_APR_W); if (crash_file.getFileHandle()) { LL_INFOS("MarkerFile") << "Created crash marker file " << crash_file_name << LL_ENDL; + recordMarkerVersion(crash_file); } else { LL_WARNS("MarkerFile") << "Cannot create error marker file " << crash_file_name << LL_ENDL; } } + else + { + LL_WARNS("MarkerFile") << "No gDirUtilp with which to create error marker file name" << LL_ENDL; + } if (gMessageSystem && gDirUtilp) { @@ -3413,7 +3418,7 @@ bool LLAppViewer::anotherInstanceRunning() // If the file is currently locked, that means another process is already running. std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, MARKER_FILE_NAME); - LL_DEBUGS("MarkerFile") << "Checking marker file for lock..." << LL_ENDL; + LL_DEBUGS("MarkerFile") << "Checking marker file '"<< marker_file << "' for lock..." << LL_ENDL; //Freeze case checks if (LLAPRFile::isExist(marker_file, NULL, LL_APR_RB)) @@ -3439,6 +3444,46 @@ bool LLAppViewer::anotherInstanceRunning() return false; } +// static +void LLAppViewer::recordMarkerVersion(LLAPRFile& marker_file) +{ + std::string marker_version(LLVersionInfo::getChannelAndVersion()); + if ( marker_version.length() > MAX_MARKER_LENGTH ) + { + LL_WARNS_ONCE("MarkerFile") << "Version length ("<< marker_version.length()<< ") greater than maximum: marker matching may be incorrect" << LL_ENDL; + } + + // record the viewer version in the marker file + marker_file.write(marker_version.data(), marker_version.length()); +} + +bool LLAppViewer::markerIsSameVersion(const std::string& marker_name) const +{ + bool sameVersion = false; + + std::string my_version(LLVersionInfo::getChannelAndVersion()); + char marker_version[MAX_MARKER_LENGTH]; + S32 marker_version_length; + + LLAPRFile marker_file; + marker_file.open(marker_name, LL_APR_RB); + if (marker_file.getFileHandle()) + { + marker_version_length = marker_file.read(marker_version, sizeof(marker_version)); + LL_DEBUGS("MarkerFile") << "Compare markers: "; + std::string marker_string(marker_version, marker_version_length); + LL_CONT << "\n mine '" << my_version << "'" + << "\n marker '" << marker_string << "'" + << LL_ENDL; + if ( 0 == my_version.compare( 0, my_version.length(), marker_version, 0, marker_version_length ) ) + { + sameVersion = true; + } + marker_file.close(); + } + return sameVersion; +} + void LLAppViewer::initMarkerFile() { //First, check for the existence of other files. @@ -3461,27 +3506,55 @@ void LLAppViewer::initMarkerFile() if (LLAPRFile::isExist(mMarkerFileName, NULL, LL_APR_RB) && !anotherInstanceRunning()) { - gLastExecEvent = LAST_EXEC_FROZE; - LL_INFOS("MarkerFile") << "Exec marker found: program froze on previous execution" << LL_ENDL; + if ( markerIsSameVersion(mMarkerFileName) ) + { + LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found" << LL_ENDL; + gLastExecEvent = LAST_EXEC_FROZE; + } + else + { + LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found, but versions did not match" << LL_ENDL; + } } if(LLAPRFile::isExist(logout_marker_file, NULL, LL_APR_RB)) { - gLastExecEvent = LAST_EXEC_LOGOUT_FROZE; - LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + if (markerIsSameVersion(logout_marker_file)) + { + gLastExecEvent = LAST_EXEC_LOGOUT_FROZE; + LL_INFOS("MarkerFile") << "Logout crashed '"<< logout_marker_file << "', setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + } + else + { + LL_INFOS("MarkerFile") << "Logout crash marker '"<< logout_marker_file << "' found, but versions did not match" << LL_ENDL; + } LLAPRFile::remove(logout_marker_file); } if(LLAPRFile::isExist(llerror_marker_file, NULL, LL_APR_RB)) { - if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; - else gLastExecEvent = LAST_EXEC_LLERROR_CRASH; - LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + if (markerIsSameVersion(llerror_marker_file)) + { + gLastExecEvent = ( gLastExecEvent == LAST_EXEC_LOGOUT_FROZE ) + ? LAST_EXEC_LOGOUT_CRASH : LAST_EXEC_LLERROR_CRASH; + LL_INFOS("MarkerFile") << "Last exec LLError '"<< llerror_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + } + else + { + LL_INFOS("MarkerFile") << "Last exec LLError marker '"<< llerror_marker_file << "' found, but versions did not match" << LL_ENDL; + } LLAPRFile::remove(llerror_marker_file); } if(LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB)) { - if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; - else gLastExecEvent = LAST_EXEC_OTHER_CRASH; - LL_INFOS("MarkerFile") << "Last exec crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + if (markerIsSameVersion(error_marker_file)) + { + gLastExecEvent = (gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) + ? LAST_EXEC_LOGOUT_CRASH : LAST_EXEC_OTHER_CRASH; + LL_INFOS("MarkerFile") << "Last exec '"<< error_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; + } + else + { + LL_INFOS("MarkerFile") << "Last exec '"<< error_marker_file << "' marker found, but versions did not match" << LL_ENDL; + } LLAPRFile::remove(error_marker_file); } @@ -3497,35 +3570,48 @@ void LLAppViewer::initMarkerFile() if (s == APR_SUCCESS && mMarkerFile.getFileHandle()) { - LL_DEBUGS("MarkerFile") << "Marker file created." << LL_ENDL; + LL_DEBUGS("MarkerFile") << "Marker file '"<< mMarkerFileName << "' created." << LL_ENDL; + if (APR_SUCCESS == apr_file_lock(mMarkerFile.getFileHandle(), APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE)) + { + recordMarkerVersion(mMarkerFile); + LL_DEBUGS("MarkerFile") << "Marker file locked." << LL_ENDL; + } + else + { + LL_INFOS("MarkerFile") << "Marker file cannot be locked." << LL_ENDL; + } } else { - LL_INFOS("MarkerFile") << "Failed to create marker file." << LL_ENDL; - return; - } - if (apr_file_lock(mMarkerFile.getFileHandle(), APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS) - { - mMarkerFile.close() ; - LL_INFOS("MarkerFile") << "Marker file cannot be locked." << LL_ENDL; - return; + LL_INFOS("MarkerFile") << "Failed to create marker file '"<< mMarkerFileName << "'." << LL_ENDL; } - - LL_DEBUGS("MarkerFile") << "Marker file locked." << LL_ENDL; } void LLAppViewer::removeMarkerFile(bool leave_logout_marker) { - LL_DEBUGS("MarkerFile") << "removeMarkerFile()" << LL_ENDL; + LL_DEBUGS("MarkerFile") << "removeMarkerFile("<<leave_logout_marker<<")" << LL_ENDL; if (mMarkerFile.getFileHandle()) { - mMarkerFile.close() ; + LL_DEBUGS("MarkerFile") << "removeMarkerFile marker '"<<mMarkerFileName<<"'"<< LL_ENDL; + mMarkerFile.close(); LLAPRFile::remove( mMarkerFileName ); } - if (mLogoutMarkerFile != NULL && !leave_logout_marker) + else { + LL_WARNS("MarkerFile") << "removeMarkerFile marker '"<<mMarkerFileName<<"' not open"<< LL_ENDL; + } + if (!leave_logout_marker) + { + if (mLogoutMarkerFile.getFileHandle()) + { + LL_DEBUGS("MarkerFile") << "removeMarkerFile marker '"<<mLogoutMarkerFileName<<"'"<< LL_ENDL; + mLogoutMarkerFile.close(); + } + else + { + LL_WARNS("MarkerFile") << "removeMarkerFile marker '"<<mLogoutMarkerFileName<<"' not open"<< LL_ENDL; + } LLAPRFile::remove( mLogoutMarkerFileName ); - mLogoutMarkerFile = NULL; } } @@ -4727,16 +4813,15 @@ void LLAppViewer::sendLogoutRequest() mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LOGOUT_MARKER_FILE_NAME); LLAPRFile outfile ; - outfile.open(mLogoutMarkerFileName, LL_APR_W); - mLogoutMarkerFile = outfile.getFileHandle() ; - if (mLogoutMarkerFile) + mLogoutMarkerFile.open(mLogoutMarkerFileName, LL_APR_W); + if (mLogoutMarkerFile.getFileHandle()) { - llinfos << "Created logout marker file " << mLogoutMarkerFileName << llendl; - apr_file_close(mLogoutMarkerFile); + LL_INFOS("MarkerFile") << "Created logout marker file '"<< mLogoutMarkerFileName << "' " << mLogoutMarkerFileName << LL_ENDL; + recordMarkerVersion(outfile); } else { - llwarns << "Cannot create logout marker file " << mLogoutMarkerFileName << llendl; + LL_WARNS("MarkerFile") << "Cannot create logout marker file " << mLogoutMarkerFileName << LL_ENDL; } } } diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 7563d672e3..0cc02b14e6 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -217,7 +217,9 @@ private: bool anotherInstanceRunning(); void initMarkerFile(); - + static void recordMarkerVersion(LLAPRFile& marker_file); + bool markerIsSameVersion(const std::string& marker_name) const; + void idle(); void idleShutdown(); // update avatar SLID and display name caches @@ -237,7 +239,7 @@ private: LLAPRFile mMarkerFile; // A file created to indicate the app is running. std::string mLogoutMarkerFileName; - apr_file_t* mLogoutMarkerFile; // A file created to indicate the app is running. + LLAPRFile mLogoutMarkerFile; // A file created to indicate the app is running. LLOSInfo mSysOSInfo; diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 3dbb43c657..b221daf936 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -427,6 +427,8 @@ LLChicletPanel::~LLChicletPanel() void LLChicletPanel::onMessageCountChanged(const LLSD& data) { + // *TODO : we either suppress this method or return a value. Right now, it servers no purpose. + /* LLUUID session_id = data["session_id"].asUUID(); S32 unread = data["participant_unread"].asInteger(); @@ -435,6 +437,7 @@ void LLChicletPanel::onMessageCountChanged(const LLSD& data) { unread = 0; } + */ } void LLChicletPanel::objectChicletCallback(const LLSD& data) diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index dd20ca15ae..7883e4cb89 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -194,14 +194,17 @@ LLConversationLog::LLConversationLog() : mAvatarNameCacheConnection(), mLoggingEnabled(false) { - 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) + if(gSavedPerAccountSettings.controlExists("KeepConversationLogTranscripts")) { - loadFromFile(getFileName()); + 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()); - enableLogging(log_mode); + enableLogging(log_mode); + } } } diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp index b202cfc9d3..5ab108b39f 100644 --- a/indra/newview/llconversationloglist.cpp +++ b/indra/newview/llconversationloglist.cpp @@ -390,7 +390,7 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata) { return is_p2p && LLAvatarActions::canOfferTeleport(selected_id); } - else if ("can_show_on_map") + else if ("can_show_on_map" == command_name) { return is_p2p && ((LLAvatarTracker::instance().isBuddyOnline(selected_id) && is_agent_mappable(selected_id)) || gAgent.isGodlike()); } diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 009fce0a92..c74ce24872 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -139,6 +139,8 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32 items.push_back(std::string("remove_friend")); items.push_back(std::string("invite_to_group")); items.push_back(std::string("separator_invite_to_group")); + if (static_cast<LLConversationItem*>(mParent)->getType() == CONV_SESSION_NEARBY) + items.push_back(std::string("zoom_in")); items.push_back(std::string("map")); items.push_back(std::string("share")); items.push_back(std::string("pay")); diff --git a/indra/newview/lldelayedgestureerror.cpp b/indra/newview/lldelayedgestureerror.cpp index 80e7c9f1b2..ef1b644ad4 100644 --- a/indra/newview/lldelayedgestureerror.cpp +++ b/indra/newview/lldelayedgestureerror.cpp @@ -113,9 +113,11 @@ bool LLDelayedGestureError::doDialog(const LLErrorEntry &ent, bool uuid_ok) } } - - LLNotificationsUtil::add(ent.mNotifyName, args); - + if(!LLApp::isQuitting()) + { + LLNotificationsUtil::add(ent.mNotifyName, args); + } + return true; } diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp index 22f35752bd..be20adeb8a 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.cpp +++ b/indra/newview/lldonotdisturbnotificationstorage.cpp @@ -33,6 +33,7 @@ #include "lldir.h" #include "llerror.h" #include "llfloaterreg.h" +#include "llimview.h" #include "llnotifications.h" #include "llnotificationhandler.h" #include "llnotificationstorage.h" @@ -145,6 +146,8 @@ void LLDoNotDisturbNotificationStorage::loadNotifications() LLNotifications& instance = LLNotifications::instance(); bool imToastExists = false; + bool group_ad_hoc_toast_exists = false; + S32 toastSessionType; bool offerExists = false; for (LLSD::array_const_iterator notification_it = data.beginArray(); @@ -158,7 +161,20 @@ void LLDoNotDisturbNotificationStorage::loadNotifications() if(notificationName == toastName) { - imToastExists = true; + toastSessionType = notification_params["payload"]["SESSION_TYPE"]; + if(toastSessionType == LLIMModel::LLIMSession::P2P_SESSION) + { + imToastExists = true; + } + //Don't add group/ad-hoc messages to the notification system because + //this means the group/ad-hoc session has to be re-created + else if(toastSessionType == LLIMModel::LLIMSession::GROUP_SESSION + || toastSessionType == LLIMModel::LLIMSession::ADHOC_SESSION) + { + //Just allows opening the conversation log for group/ad-hoc messages upon startup + group_ad_hoc_toast_exists = true; + continue; + } } else if(notificationName == offerName) { @@ -197,7 +213,12 @@ void LLDoNotDisturbNotificationStorage::loadNotifications() LLFloaterReg::showInstance("im_container"); } - if(imToastExists || offerExists) + if(group_ad_hoc_toast_exists) + { + LLFloaterReg::showInstance("conversation"); + } + + if(imToastExists || group_ad_hoc_toast_exists || offerExists) { make_ui_sound_deferred("UISndNewIncomingIMSession"); } diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 39b6e465f3..76f62a7880 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -57,6 +57,7 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed) mDone(FALSE) { mID.generate(); + mCommitCallbackRegistrar.add("BulkPermission.Ok", boost::bind(&LLFloaterBulkPermission::onOkBtn, this)); mCommitCallbackRegistrar.add("BulkPermission.Apply", boost::bind(&LLFloaterBulkPermission::onApplyBtn, this)); mCommitCallbackRegistrar.add("BulkPermission.Close", boost::bind(&LLFloaterBulkPermission::onCloseBtn, this)); mCommitCallbackRegistrar.add("BulkPermission.CheckAll", boost::bind(&LLFloaterBulkPermission::onCheckAll, this)); @@ -66,6 +67,21 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed) BOOL LLFloaterBulkPermission::postBuild() { + mBulkChangeIncludeAnimations = gSavedSettings.getBOOL("BulkChangeIncludeAnimations"); + mBulkChangeIncludeBodyParts = gSavedSettings.getBOOL("BulkChangeIncludeBodyParts"); + mBulkChangeIncludeClothing = gSavedSettings.getBOOL("BulkChangeIncludeClothing"); + mBulkChangeIncludeGestures = gSavedSettings.getBOOL("BulkChangeIncludeGestures"); + mBulkChangeIncludeNotecards = gSavedSettings.getBOOL("BulkChangeIncludeNotecards"); + mBulkChangeIncludeObjects = gSavedSettings.getBOOL("BulkChangeIncludeObjects"); + mBulkChangeIncludeScripts = gSavedSettings.getBOOL("BulkChangeIncludeScripts"); + mBulkChangeIncludeSounds = gSavedSettings.getBOOL("BulkChangeIncludeSounds"); + mBulkChangeIncludeTextures = gSavedSettings.getBOOL("BulkChangeIncludeTextures"); + mBulkChangeShareWithGroup = gSavedSettings.getBOOL("BulkChangeShareWithGroup"); + mBulkChangeEveryoneCopy = gSavedSettings.getBOOL("BulkChangeEveryoneCopy"); + mBulkChangeNextOwnerModify = gSavedSettings.getBOOL("BulkChangeNextOwnerModify"); + mBulkChangeNextOwnerCopy = gSavedSettings.getBOOL("BulkChangeNextOwnerCopy"); + mBulkChangeNextOwnerTransfer = gSavedSettings.getBOOL("BulkChangeNextOwnerTransfer"); + return TRUE; } @@ -144,6 +160,12 @@ void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object, } } +void LLFloaterBulkPermission::onOkBtn() +{ + doApply(); + closeFloater(); +} + void LLFloaterBulkPermission::onApplyBtn() { doApply(); @@ -151,6 +173,20 @@ void LLFloaterBulkPermission::onApplyBtn() void LLFloaterBulkPermission::onCloseBtn() { + gSavedSettings.setBOOL("BulkChangeIncludeAnimations", mBulkChangeIncludeAnimations); + gSavedSettings.setBOOL("BulkChangeIncludeBodyParts", mBulkChangeIncludeBodyParts); + gSavedSettings.setBOOL("BulkChangeIncludeClothing", mBulkChangeIncludeClothing); + gSavedSettings.setBOOL("BulkChangeIncludeGestures", mBulkChangeIncludeGestures); + gSavedSettings.setBOOL("BulkChangeIncludeNotecards", mBulkChangeIncludeNotecards); + gSavedSettings.setBOOL("BulkChangeIncludeObjects", mBulkChangeIncludeObjects); + gSavedSettings.setBOOL("BulkChangeIncludeScripts", mBulkChangeIncludeScripts); + gSavedSettings.setBOOL("BulkChangeIncludeSounds", mBulkChangeIncludeSounds); + gSavedSettings.setBOOL("BulkChangeIncludeTextures", mBulkChangeIncludeTextures); + gSavedSettings.setBOOL("BulkChangeShareWithGroup", mBulkChangeShareWithGroup); + gSavedSettings.setBOOL("BulkChangeEveryoneCopy", mBulkChangeEveryoneCopy); + gSavedSettings.setBOOL("BulkChangeNextOwnerModify", mBulkChangeNextOwnerModify); + gSavedSettings.setBOOL("BulkChangeNextOwnerCopy", mBulkChangeNextOwnerCopy); + gSavedSettings.setBOOL("BulkChangeNextOwnerTransfer", mBulkChangeNextOwnerTransfer); closeFloater(); } diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h index 7dd05df7ee..25e76eca65 100644 --- a/indra/newview/llfloaterbulkpermission.h +++ b/indra/newview/llfloaterbulkpermission.h @@ -72,6 +72,7 @@ private: bool is_new); void onCloseBtn(); + void onOkBtn(); void onApplyBtn(); void onCommitCopy(); void onCheckAll() { doCheckUncheckAll(TRUE); } @@ -94,6 +95,21 @@ private: LLUUID mCurrentObjectID; BOOL mDone; + bool mBulkChangeIncludeAnimations; + bool mBulkChangeIncludeBodyParts; + bool mBulkChangeIncludeClothing; + bool mBulkChangeIncludeGestures; + bool mBulkChangeIncludeNotecards; + bool mBulkChangeIncludeObjects; + bool mBulkChangeIncludeScripts; + bool mBulkChangeIncludeSounds; + bool mBulkChangeIncludeTextures; + bool mBulkChangeShareWithGroup; + bool mBulkChangeEveryoneCopy; + bool mBulkChangeNextOwnerModify; + bool mBulkChangeNextOwnerCopy; + bool mBulkChangeNextOwnerTransfer; + LLUUID mID; const char* mStartString; diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 7437dd8cda..5e0cd8ef78 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -53,6 +53,7 @@ #include "llcallbacklist.h" #include "llworld.h" #include "llsdserialize.h" +#include "llviewerobjectlist.h" // // LLFloaterIMContainer @@ -62,8 +63,7 @@ LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& param mExpandCollapseBtn(NULL), mConversationsRoot(NULL), mConversationsEventStream("ConversationsEvents"), - mInitialized(false), - mIsFirstLaunch(false) + mInitialized(false) { mEnableCallbackRegistrar.add("IMFloaterContainer.Check", boost::bind(&LLFloaterIMContainer::isActionChecked, this, _2)); mCommitCallbackRegistrar.add("IMFloaterContainer.Action", boost::bind(&LLFloaterIMContainer::onCustomAction, this, _2)); @@ -245,7 +245,6 @@ BOOL LLFloaterIMContainer::postBuild() mGeneralTitle = getTitle(); mInitialized = true; - mIsFirstLaunch = true; // Add callbacks: // We'll take care of view updates on idle @@ -280,12 +279,6 @@ void LLFloaterIMContainer::addFloater(LLFloater* floaterp, LLUUID session_id = floaterp->getKey(); - // Make sure the message panel is open when adding a floater or it stays mysteriously hidden - if (!mIsFirstLaunch) - { - collapseMessagesPane(false); - } - // Add the floater LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point); @@ -646,8 +639,6 @@ void LLFloaterIMContainer::collapseMessagesPane(bool collapse) return; } - mIsFirstLaunch = false; - // Save current width of panels before collapsing/expanding right pane. S32 conv_pane_width = mConversationsPane->getRect().getWidth(); S32 msg_pane_width = mMessagesPane->getRect().getWidth(); @@ -1036,6 +1027,10 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec { LLAvatarActions::inviteToGroup(userID); } + else if ("zoom_in" == command) + { + handle_zoom_to_object(userID); + } else if ("map" == command) { LLAvatarActions::showOnMap(userID); @@ -1257,6 +1252,10 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v { return LLAvatarActions::canCall(); } + else if ("can_zoom_in" == item) + { + return is_single_select && gObjectList.findObject(single_id); + } else if ("can_show_on_map" == item) { return (is_single_select ? (LLAvatarTracker::instance().isBuddyOnline(single_id) && is_agent_mappable(single_id)) || gAgent.isGodlike() : false); @@ -1330,6 +1329,9 @@ void LLFloaterIMContainer::showConversation(const LLUUID& session_id) { setVisibleAndFrontmost(false); selectConversationPair(session_id, true); + + LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); + session_floater->restoreFloater(); } void LLFloaterIMContainer::clearAllFlashStates() @@ -1419,7 +1421,7 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool session_floater->setMinimized(is_minimized); } } - + flashConversationItemWidget(session_id,false); return handled; } diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 5139651d8d..2cbc1e99f9 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -174,7 +174,6 @@ private: LLLayoutStack* mConversationsStack; bool mInitialized; - bool mIsFirstLaunch; LLUUID mSelectedSession; std::string mGeneralTitle; diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 66aac9c570..38ee30967f 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -274,8 +274,8 @@ void LLFloaterIMNearbyChat::onTearOffClicked() LLFloaterIMSessionTab::onTearOffClicked(); // see CHUI-170: Save torn-off state of the nearby chat between sessions - BOOL in_the_multifloater = !isTornOff(); - gSavedSettings.setBOOL("NearbyChatIsNotTornOff", in_the_multifloater); + BOOL in_the_multifloater = (BOOL)getHost(); + gSavedPerAccountSettings.setBOOL("NearbyChatIsNotTornOff", in_the_multifloater); } @@ -290,6 +290,7 @@ void LLFloaterIMNearbyChat::onOpen(const LLSD& key) void LLFloaterIMNearbyChat::onClose(bool app_quitting) { // Override LLFloaterIMSessionTab::onClose() so that Nearby Chat is not removed from the conversation floater + LLFloaterIMSessionTab::restoreFloater(); onClickCloseBtn(); } @@ -297,8 +298,10 @@ void LLFloaterIMNearbyChat::onClose(bool app_quitting) void LLFloaterIMNearbyChat::onClickCloseBtn() { if (!isTornOff()) + { return; - onTearOffClicked(); + } + LLFloaterIMSessionTab::onTearOffClicked(); LLFloaterIMContainer *im_box = LLFloaterIMContainer::findInstance(); if (im_box) @@ -334,7 +337,7 @@ bool LLFloaterIMNearbyChat::isChatVisible() const if (im_box != NULL) { isVisible = - isChatMultiTab() && gSavedSettings.getBOOL("NearbyChatIsNotTornOff")? + isChatMultiTab() && gSavedPerAccountSettings.getBOOL("NearbyChatIsNotTornOff")? im_box->getVisible() && !im_box->isMinimized() : getVisible() && !isMinimized(); } @@ -345,6 +348,11 @@ bool LLFloaterIMNearbyChat::isChatVisible() const void LLFloaterIMNearbyChat::showHistory() { openFloater(); + if(!isMessagePaneExpanded()) + { + restoreFloater(); + setFocus(true); + } setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); } @@ -417,6 +425,12 @@ BOOL LLFloaterIMNearbyChat::matchChatTypeTrigger(const std::string& in_str, std: void LLFloaterIMNearbyChat::onChatBoxKeystroke() { + LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance(); + if (im_box) + { + im_box->flashConversationItemWidget(mSessionID,false); + } + LLFirstUse::otherAvatarChatFirst(false); LLWString raw_text = mInputEditor->getWText(); @@ -725,7 +739,14 @@ void LLFloaterIMNearbyChat::startChat(const char* line) LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); if (nearby_chat) { - nearby_chat->show(); + if(!nearby_chat->isTornOff()) + { + nearby_chat->show(); + } + if(nearby_chat->isMinimized()) + { + nearby_chat->setMinimized(false); + } nearby_chat->setVisible(TRUE); nearby_chat->setFocus(TRUE); nearby_chat->mInputEditor->setFocus(TRUE); diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index 8870d54cd2..7afcf288ce 100644 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -559,12 +559,14 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); - if( nearby_chat->hasFocus() + if(( nearby_chat->hasFocus() || im_box->hasFocus() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT && gSavedSettings.getBOOL("UseChatBubbles") ) || mChannel.isDead() - || !mChannel.get()->getShowToasts() ) // to prevent toasts in Do Not Disturb mode + || !mChannel.get()->getShowToasts() ) + && nearby_chat->isMessagePaneExpanded()) + // to prevent toasts in Do Not Disturb mode return;//no need in toast if chat is visible or if bubble chat is enabled // arrange a channel on a screen @@ -606,7 +608,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, //Don't show nearby toast, if conversation is visible but not focused LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(LLUUID()); - if (session_floater + if (session_floater && session_floater->isMessagePaneExpanded() && session_floater->isInVisibleChain() && !session_floater->isMinimized() && !(session_floater->getHost() && session_floater->getHost()->isMinimized())) { @@ -614,7 +616,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, } //Will show toast when chat preference is set - if(gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") + if((gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") || !session_floater->isMessagePaneExpanded()) { // Add a nearby chat toast. LLUUID id; diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index 50b2ed8c51..73adfd0eda 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -618,7 +618,7 @@ void LLFloaterIMSession::onClose(bool app_quitting) // Last change: // EXT-3516 X Button should end IM session, _ button should hide gIMMgr->leaveSession(mSessionID); - + LLFloaterIMSessionTab::restoreFloater(); // Clean up the conversation *after* the session has been ended LLFloaterIMSessionTab::onClose(app_quitting); } @@ -892,6 +892,11 @@ void LLFloaterIMSession::onInputEditorFocusLost(LLFocusableElement* caller, void void LLFloaterIMSession::onInputEditorKeystroke(LLTextEditor* caller, void* userdata) { LLFloaterIMSession* self = (LLFloaterIMSession*)userdata; + LLFloaterIMContainer* im_box = LLFloaterIMContainer::findInstance(); + if (im_box) + { + im_box->flashConversationItemWidget(self->mSessionID,false); + } std::string text = self->mInputEditor->getText(); // Deleting all text counts as stopping typing. diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 9fd22b1537..eab2ce7798 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -30,6 +30,7 @@ #include "llfloaterimsessiontab.h" #include "llagent.h" +#include "llagentcamera.h" #include "llavataractions.h" #include "llchatentry.h" #include "llchathistory.h" @@ -57,11 +58,12 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id) , mSpeakingIndicator(NULL) , mChatHistory(NULL) , mInputEditor(NULL) - , mInputEditorTopPad(0) + , mInputEditorPad(0) , mRefreshTimer(new LLTimer()) , mIsHostAttached(false) , mHasVisibleBeenInitialized(false) , mIsParticipantListExpanded(true) + , mChatLayoutPanel(NULL) { setAutoFocus(FALSE); mSession = LLIMModel::getInstance()->findIMSession(mSessionID); @@ -125,8 +127,12 @@ void LLFloaterIMSessionTab::setVisible(BOOL visible) if(visible && !mHasVisibleBeenInitialized) { mHasVisibleBeenInitialized = true; - LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container")->setVisible(true); + if(!gAgentCamera.cameraMouselook()) + { + LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container")->setVisible(true); + } LLFloaterIMSessionTab::addToHost(mSessionID); + mInputButtonPanel->setVisible(isTornOff()); } LLTransientDockableFloater::setVisible(visible); @@ -170,7 +176,7 @@ void LLFloaterIMSessionTab::addToHost(const LLUUID& session_id) conversp->setHostAttached(true); if (!conversp->isNearbyChat() - || gSavedSettings.getBOOL("NearbyChatIsNotTornOff")) + || gSavedPerAccountSettings.getBOOL("NearbyChatIsNotTornOff")) { floater_container->addFloater(conversp, false, LLTabContainer::RIGHT_OF_CURRENT); } @@ -190,23 +196,51 @@ void LLFloaterIMSessionTab::addToHost(const LLUUID& session_id) } } +void LLFloaterIMSessionTab::assignResizeLimits() +{ + bool is_participants_pane_collapsed = mParticipantListPanel->isCollapsed(); + + // disable a layoutstack's functionality when participant list panel is collapsed + mRightPartPanel->setIgnoreReshape(is_participants_pane_collapsed); + + S32 participants_pane_target_width = is_participants_pane_collapsed? + 0 : (mParticipantListPanel->getRect().getWidth() + LLPANEL_BORDER_WIDTH); + + S32 new_min_width = participants_pane_target_width + mRightPartPanel->getExpandedMinDim() + mFloaterExtraWidth; + + setResizeLimits(new_min_width, getMinHeight()); + + this->mParticipantListAndHistoryStack->updateLayout(); +} + BOOL LLFloaterIMSessionTab::postBuild() { BOOL result; + mBodyStack = getChild<LLLayoutStack>("main_stack"); + mParticipantListAndHistoryStack = getChild<LLLayoutStack>("im_panels"); + mCloseBtn = getChild<LLButton>("close_btn"); mCloseBtn->setCommitCallback(boost::bind(&LLFloater::onClickClose, this)); mExpandCollapseBtn = getChild<LLButton>("expand_collapse_btn"); mExpandCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMSessionTab::onSlide, this)); + mExpandCollapseLineBtn = getChild<LLButton>("minz_btn"); + mExpandCollapseLineBtn->setClickedCallback(boost::bind(&LLFloaterIMSessionTab::onCollapseToLine, this)); + mTearOffBtn = getChild<LLButton>("tear_off_btn"); mTearOffBtn->setCommitCallback(boost::bind(&LLFloaterIMSessionTab::onTearOffClicked, this)); mGearBtn = getChild<LLButton>("gear_btn"); mParticipantListPanel = getChild<LLLayoutPanel>("speakers_list_panel"); - + mRightPartPanel = getChild<LLLayoutPanel>("right_part_holder"); + + mToolbarPanel = getChild<LLLayoutPanel>("toolbar_panel"); + mContentPanel = getChild<LLLayoutPanel>("body_panel"); + mInputButtonPanel = getChild<LLLayoutPanel>("input_button_layout_panel"); + mInputButtonPanel->setVisible(false); // Add a scroller for the folder (participant) view LLRect scroller_view_rect = mParticipantListPanel->getRect(); scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); @@ -223,17 +257,20 @@ BOOL LLFloaterIMSessionTab::postBuild() mChatHistory = getChild<LLChatHistory>("chat_history"); mInputEditor = getChild<LLChatEntry>("chat_editor"); - mInputEditor->setTextExpandedCallback(boost::bind(&LLFloaterIMSessionTab::reshapeChatHistory, this)); + + mChatLayoutPanel = getChild<LLLayoutPanel>("chat_layout_panel"); + + mInputEditor->setTextExpandedCallback(boost::bind(&LLFloaterIMSessionTab::reshapeChatLayoutPanel, this)); mInputEditor->setCommitOnFocusLost( FALSE ); mInputEditor->setPassDelete(TRUE); mInputEditor->setFont(LLViewerChat::getChatFont()); - mInputEditorTopPad = mChatHistory->getRect().mBottom - mInputEditor->getRect().mTop; + mInputEditorPad = mChatLayoutPanel->getRect().getHeight() - mInputEditor->getRect().getHeight(); setOpenPositioning(LLFloaterEnums::POSITIONING_RELATIVE); mSaveRect = isNearbyChat() - && !gSavedSettings.getBOOL("NearbyChatIsNotTornOff"); + && !gSavedPerAccountSettings.getBOOL("NearbyChatIsNotTornOff"); initRectControl(); if (isChatMultiTab()) @@ -264,6 +301,8 @@ BOOL LLFloaterIMSessionTab::postBuild() mConversationsRoot->setFollowsAll(); mConversationsRoot->addChild(mConversationsRoot->mStatusTextBox); + setMessagePaneExpanded(true); + buildConversationViewParticipant(); refreshConversation(); @@ -277,6 +316,15 @@ BOOL LLFloaterIMSessionTab::postBuild() LLFloaterIMSessionTab::onSlide(this); } + // The resize limits for LLFloaterIMSessionTab should be updated, based on current values of width of conversation and message panels + mParticipantListPanel->getResizeBar()->setResizeListener(boost::bind(&LLFloaterIMSessionTab::assignResizeLimits, this)); + mFloaterExtraWidth = + getRect().getWidth() + - mParticipantListAndHistoryStack->getRect().getWidth() + - (mParticipantListPanel->isCollapsed()? 0 : LLPANEL_BORDER_WIDTH); + + assignResizeLimits(); + return result; } @@ -649,7 +697,7 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar() && mIsParticipantListExpanded && !mIsP2PChat; - mParticipantListPanel->setVisible(is_participant_list_visible); + mParticipantListAndHistoryStack->collapsePanel(mParticipantListPanel, !is_participant_list_visible); // Display collapse image (<<) if the floater is hosted // or if it is torn off but has an open control panel. @@ -674,6 +722,7 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar() mTearOffBtn->setImageOverlay(getString(is_not_torn_off? "tear_off_icon" : "return_icon")); mTearOffBtn->setToolTip(getString(is_not_torn_off? "tooltip_to_separate_window" : "tooltip_to_main_window")); + mCloseBtn->setVisible(is_not_torn_off && !mIsNearbyChat); enableDisableCallBtn(); @@ -690,15 +739,11 @@ void LLFloaterIMSessionTab::forceReshape() } -void LLFloaterIMSessionTab::reshapeChatHistory() +void LLFloaterIMSessionTab::reshapeChatLayoutPanel() { - LLRect chat_rect = mChatHistory->getRect(); + LLRect chat_layout_panel_rect = mChatLayoutPanel->getRect(); LLRect input_rect = mInputEditor->getRect(); - - int delta_height = chat_rect.mBottom - (input_rect.mTop + mInputEditorTopPad); - - chat_rect.setLeftTopAndSize(chat_rect.mLeft, chat_rect.mTop, chat_rect.getWidth(), chat_rect.getHeight() + delta_height); - mChatHistory->setShape(chat_rect); + mChatLayoutPanel->reshape(chat_layout_panel_rect.getWidth(), input_rect.getHeight() + mInputEditorPad, FALSE); } void LLFloaterIMSessionTab::showTranslationCheckbox(BOOL show) @@ -773,14 +818,74 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self) { if (!self->mIsP2PChat) { - bool expand = !self->mParticipantListPanel->getVisible(); + bool should_be_expanded = self->mParticipantListPanel->isCollapsed(); + + // Expand/collapse the participant list panel + self->mParticipantListAndHistoryStack->collapsePanel(self->mParticipantListPanel, !should_be_expanded); + self->mParticipantListPanel->setVisible(should_be_expanded); + gSavedSettings.setBOOL("IMShowControlPanel", should_be_expanded); + self->mIsParticipantListExpanded = should_be_expanded; + self->mExpandCollapseBtn->setImageOverlay(self->getString(should_be_expanded ? "collapse_icon" : "expand_icon")); + } + } + + self->assignResizeLimits(); +} + +void LLFloaterIMSessionTab::onCollapseToLine(LLFloaterIMSessionTab* self) +{ + LLFloaterIMContainer* host_floater = dynamic_cast<LLFloaterIMContainer*>(self->getHost()); + if (!host_floater) + { + bool expand = self->isMessagePaneExpanded(); + self->mExpandCollapseLineBtn->setImageOverlay(self->getString(expand ? "collapseline_icon" : "expandline_icon")); + self->mContentPanel->setVisible(!expand); + self->mToolbarPanel->setVisible(!expand); + self->reshapeFloater(expand); + self->setMessagePaneExpanded(!expand); + } +} - // Expand/collapse the IM control panel - self->mParticipantListPanel->setVisible(expand); - gSavedSettings.setBOOL("IMShowControlPanel", expand); - self->mIsParticipantListExpanded = expand; - self->mExpandCollapseBtn->setImageOverlay(self->getString(expand ? "collapse_icon" : "expand_icon")); +void LLFloaterIMSessionTab::reshapeFloater(bool collapse) +{ + LLRect floater_rect = getRect(); + + if(collapse) + { + mFloaterHeight = floater_rect.getHeight(); + S32 height = mContentPanel->getRect().getHeight() + mToolbarPanel->getRect().getHeight(); + floater_rect.mTop -= height; + enableResizeCtrls(true, true, false); + } + else + { + floater_rect.mTop = floater_rect.mBottom + mFloaterHeight; + enableResizeCtrls(true, true, true); + + } + + setShape(floater_rect, true); + mBodyStack->updateLayout(); + +} + +void LLFloaterIMSessionTab::restoreFloater() +{ + if(!isMessagePaneExpanded()) + { + if(isMinimized()) + { + setMinimized(false); } + mContentPanel->setVisible(true); + mToolbarPanel->setVisible(true); + LLRect floater_rect = getRect(); + floater_rect.mTop = floater_rect.mBottom + mFloaterHeight; + setShape(floater_rect, true); + mBodyStack->updateLayout(); + mExpandCollapseLineBtn->setImageOverlay(getString("expandline_icon")); + setMessagePaneExpanded(true); + enableResizeCtrls(true, true, true); } } @@ -793,12 +898,15 @@ void LLFloaterIMSessionTab::onOpen(const LLSD& key) // Show the messages pane when opening a floater hosted in the Conversations host_floater->collapseMessagesPane(false); } + + mInputButtonPanel->setVisible(isTornOff()); } void LLFloaterIMSessionTab::onTearOffClicked() { - setFollows(isTornOff()? FOLLOWS_ALL : FOLLOWS_NONE); + restoreFloater(); + setFollows(isTornOff()? FOLLOWS_ALL : FOLLOWS_NONE); mSaveRect = isTornOff(); initRectControl(); LLFloater::onClickTearOff(this); @@ -813,7 +921,10 @@ void LLFloaterIMSessionTab::onTearOffClicked() else { container->selectConversation(mSessionID); + } + mInputButtonPanel->setVisible(isTornOff()); + refreshConversation(); updateGearBtn(); } diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index e8ae557412..f0899a3c09 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -98,6 +98,9 @@ public: LLConversationItem* getCurSelectedViewModelItem(); void forceReshape(); virtual BOOL handleKeyHere( KEY key, MASK mask ); + bool isMessagePaneExpanded(){return mMessagePaneExpanded;} + void setMessagePaneExpanded(bool expanded){mMessagePaneExpanded = expanded;} + void restoreFloater(); protected: @@ -111,6 +114,8 @@ protected: bool onIMShowModesMenuItemCheck(const LLSD& userdata); bool onIMShowModesMenuItemEnable(const LLSD& userdata); static void onSlide(LLFloaterIMSessionTab *self); + static void onCollapseToLine(LLFloaterIMSessionTab *self); + void reshapeFloater(bool collapse); // refresh a visual state of the Call button void updateCallBtnState(bool callIsActive); @@ -135,18 +140,30 @@ protected: void appendMessage(const LLChat& chat, const LLSD &args = 0); std::string appendTime(); + void assignResizeLimits(); + + S32 mFloaterExtraWidth; bool mIsNearbyChat; bool mIsP2PChat; + + bool mMessagePaneExpanded; bool mIsParticipantListExpanded; + LLIMModel::LLIMSession* mSession; // Participants list: model and view LLConversationViewParticipant* createConversationViewParticipant(LLConversationItem* item); LLUUID mSessionID; + LLLayoutStack* mBodyStack; + LLLayoutStack* mParticipantListAndHistoryStack; LLLayoutPanel* mParticipantListPanel; // add the widgets to that see mConversationsListPanel + LLLayoutPanel* mRightPartPanel; + LLLayoutPanel* mContentPanel; + LLLayoutPanel* mToolbarPanel; + LLLayoutPanel* mInputButtonPanel; LLParticipantList* getParticipantList(); conversations_widgets_map mConversationsWidgets; LLConversationViewModel mConversationViewModel; @@ -156,13 +173,17 @@ protected: LLOutputMonitorCtrl* mSpeakingIndicator; LLChatHistory* mChatHistory; LLChatEntry* mInputEditor; - int mInputEditorTopPad; // padding between input field and chat history + LLLayoutPanel * mChatLayoutPanel; + int mInputEditorPad; // padding between input field and chat history + LLButton* mExpandCollapseLineBtn; LLButton* mExpandCollapseBtn; LLButton* mTearOffBtn; LLButton* mCloseBtn; LLButton* mGearBtn; + S32 mFloaterHeight; + private: // Handling selection and contextual menu @@ -180,7 +201,7 @@ private: * and avoid overlapping, since input chat field can be vertically expanded. * Implementation: chat history bottom "follows" top+top_pad of input chat field */ - void reshapeChatHistory(); + void reshapeChatLayoutPanel(); bool checkIfTornOff(); bool mIsHostAttached; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index b308a820b2..a28af2101b 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -443,6 +443,8 @@ BOOL LLFloaterPreference::postBuild() std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""); setCacheLocation(cache_location); + getChild<LLUICtrl>("log_path_string")->setEnabled(FALSE); // make it read-only but selectable + getChild<LLComboBox>("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this)); getChild<LLComboBox>("FriendIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"FriendIMOptions")); @@ -1572,7 +1574,6 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im getChildView("send_im_to_email")->setEnabled(TRUE); getChild<LLUICtrl>("send_im_to_email")->setValue(im_via_email); 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); } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 37f5888e8c..8c862548bb 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -154,6 +154,7 @@ static void on_avatar_name_cache_toast(const LLUUID& agent_id, args["FROM"] = av_name.getCompleteName(); args["FROM_ID"] = msg["from_id"]; args["SESSION_ID"] = msg["session_id"]; + args["SESSION_TYPE"] = msg["session_type"]; LLNotificationsUtil::add("IMToast", args, args, boost::bind(&LLFloaterIMContainer::showConversation, LLFloaterIMContainer::getInstance(), msg["session_id"].asUUID())); } @@ -199,13 +200,13 @@ void on_new_message(const LLSD& msg) // execution of the action LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); - - if (im_box->isFrontmost() && im_box->getSelectedSession() == session_id) + LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id); + + if (im_box->isFrontmost() && im_box->getSelectedSession() == session_id + && !(session_floater->getHost() ? im_box->isMinimized() : session_floater->isMinimized())) { return; } - - LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id); //session floater not focused (visible or not) bool session_floater_not_focused = session_floater && !session_floater->hasFocus(); @@ -226,17 +227,18 @@ void on_new_message(const LLSD& msg) && !session_floater->isMinimized() && !(session_floater->getHost() && session_floater->getHost()->isMinimized()); - if ("toast" == action && !session_floater_is_open) + bool conversation_floater_collapsed = !session_floater->isMessagePaneExpanded(); + if (("toast" == action && !session_floater_is_open) || conversation_floater_collapsed) { //User is not focused on conversation containing the message - if(session_floater_not_focused) + if(session_floater_not_focused || conversation_floater_collapsed) { if(!LLMuteList::getInstance()->isMuted(participant_id)) { im_box->flashConversationItemWidget(session_id, true); } //The conversation floater isn't focused/open - if(conversation_floater_not_focused) + if(conversation_floater_not_focused || conversation_floater_collapsed) { if(!LLMuteList::getInstance()->isMuted(participant_id) && !gAgent.isDoNotDisturb()) @@ -285,10 +287,23 @@ void on_new_message(const LLSD& msg) { //Surface conversations floater LLFloaterReg::showInstance("im_container"); - - if (session_floater && session_floater->isMinimized()) + im_box->collapseMessagesPane(false); + if (session_floater) { - LLFloater::onClickMinimize(session_floater); + if (session_floater->getHost()) + { + if (NULL != im_box && im_box->isMinimized()) + { + LLFloater::onClickMinimize(im_box); + } + } + else + { + if (session_floater->isMinimized()) + { + LLFloater::onClickMinimize(session_floater); + } + } } } @@ -641,8 +656,7 @@ void LLIMModel::LLIMSession::loadHistory() LLIMModel::LLIMSession* LLIMModel::findIMSession(const LLUUID& session_id) const { - return get_if_there(mId2SessionMap, session_id, - (LLIMModel::LLIMSession*) NULL); + return get_if_there(mId2SessionMap, session_id, (LLIMModel::LLIMSession*) NULL); } //*TODO consider switching to using std::set instead of std::list for holding LLUUIDs across the whole code @@ -995,6 +1009,7 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co arg["from"] = from; arg["from_id"] = from_id; arg["time"] = LLLogChat::timestamp(false); + arg["session_type"] = session->mSessionType; mNewMsgSignal(arg); return true; @@ -2638,7 +2653,7 @@ void LLIMMgr::addMessage( if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly")) { // Evaluate if we need to skip this message when that setting is true (default is false) - LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id); + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(new_session_id); skip_message = (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL); // Skip non friends... skip_message &= !session->isGroupSessionType(); // Do not skip group chats... skip_message &= !(other_participant_id == gAgentID); // You are your best friend... Don't skip yourself @@ -2654,7 +2669,7 @@ void LLIMMgr::addMessage( { LLFloaterReg::showInstance("im_container"); LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container")-> - flashConversationItemWidget(session_id, true); + flashConversationItemWidget(new_session_id, true); } } @@ -2809,7 +2824,7 @@ LLUUID LLIMMgr::addSession( } } - bool new_session = !LLIMModel::getInstance()->findIMSession(session_id); + bool new_session = (LLIMModel::getInstance()->findIMSession(session_id) == NULL); //works only for outgoing ad-hoc sessions if (new_session && IM_SESSION_CONFERENCE_START == dialog && ids.size()) diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 826e8d560a..c8b446872b 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -1376,74 +1376,28 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) BOOL hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis); projected_mouse -= snap_plane_center; - S32 snap_plane = 0; - - F32 dot = cam_to_snap_plane * constraint_axis; - if (llabs(dot) < 0.01f) - { - // looking at ring edge on, project onto view plane and check if mouse is past ring - getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_to_snap_plane); - projected_mouse -= snap_plane_center; - dot = projected_mouse * constraint_axis; - if (projected_mouse * constraint_axis > 0) - { - snap_plane = 1; - } - projected_mouse -= dot * constraint_axis; - } - else if (dot > 0.f) - { - // look for mouse position outside and in front of snap circle - if (hit && projected_mouse.magVec() > SNAP_GUIDE_INNER_RADIUS * mRadiusMeters && projected_mouse * cam_to_snap_plane < 0.f) - { - snap_plane = 1; - } - } - else - { - // look for mouse position inside or in back of snap circle - if (projected_mouse.magVec() < SNAP_GUIDE_INNER_RADIUS * mRadiusMeters || projected_mouse * cam_to_snap_plane > 0.f || !hit) - { - snap_plane = 1; - } - } - - if (snap_plane == 0) - { - // try other plane - snap_plane_center = (center - (constraint_axis * mRadiusMeters * 0.5f)); - if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) - { - cam_to_snap_plane.setVec(1.f, 0.f, 0.f); - } - else - { - cam_to_snap_plane = snap_plane_center - gAgentCamera.getCameraPositionAgent(); - cam_to_snap_plane.normVec(); - } - - hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis); - projected_mouse -= snap_plane_center; - - dot = cam_to_snap_plane * constraint_axis; + if (gSavedSettings.getBOOL("SnapEnabled")) { + S32 snap_plane = 0; + + F32 dot = cam_to_snap_plane * constraint_axis; if (llabs(dot) < 0.01f) { // looking at ring edge on, project onto view plane and check if mouse is past ring getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_to_snap_plane); projected_mouse -= snap_plane_center; dot = projected_mouse * constraint_axis; - if (projected_mouse * constraint_axis < 0) + if (projected_mouse * constraint_axis > 0) { - snap_plane = 2; + snap_plane = 1; } projected_mouse -= dot * constraint_axis; } - else if (dot < 0.f) + else if (dot > 0.f) { // look for mouse position outside and in front of snap circle if (hit && projected_mouse.magVec() > SNAP_GUIDE_INNER_RADIUS * mRadiusMeters && projected_mouse * cam_to_snap_plane < 0.f) { - snap_plane = 2; + snap_plane = 1; } } else @@ -1451,78 +1405,136 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) // look for mouse position inside or in back of snap circle if (projected_mouse.magVec() < SNAP_GUIDE_INNER_RADIUS * mRadiusMeters || projected_mouse * cam_to_snap_plane > 0.f || !hit) { - snap_plane = 2; + snap_plane = 1; } } - } - - if (snap_plane > 0) - { - LLVector3 cam_at_axis; - if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) - { - cam_at_axis.setVec(1.f, 0.f, 0.f); - } - else - { - cam_at_axis = snap_plane_center - gAgentCamera.getCameraPositionAgent(); - cam_at_axis.normVec(); - } - - // first, project mouse onto screen plane at point tangent to rotation radius. - getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_at_axis); - // project that point onto rotation plane - projected_mouse -= snap_plane_center; - projected_mouse -= projected_vec(projected_mouse, constraint_axis); - - F32 mouse_lateral_dist = llmin(SNAP_GUIDE_INNER_RADIUS * mRadiusMeters, projected_mouse.magVec()); - F32 mouse_depth = SNAP_GUIDE_INNER_RADIUS * mRadiusMeters; - if (llabs(mouse_lateral_dist) > 0.01f) - { - mouse_depth = sqrtf((SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) * (SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) - - (mouse_lateral_dist * mouse_lateral_dist)); - } - LLVector3 projected_camera_at = cam_at_axis - projected_vec(cam_at_axis, constraint_axis); - projected_mouse -= mouse_depth * projected_camera_at; - - if (!mInSnapRegime) + + if (snap_plane == 0) { - mSmoothRotate = TRUE; + // try other plane + snap_plane_center = (center - (constraint_axis * mRadiusMeters * 0.5f)); + if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) + { + cam_to_snap_plane.setVec(1.f, 0.f, 0.f); + } + else + { + cam_to_snap_plane = snap_plane_center - gAgentCamera.getCameraPositionAgent(); + cam_to_snap_plane.normVec(); + } + + hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis); + projected_mouse -= snap_plane_center; + + dot = cam_to_snap_plane * constraint_axis; + if (llabs(dot) < 0.01f) + { + // looking at ring edge on, project onto view plane and check if mouse is past ring + getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_to_snap_plane); + projected_mouse -= snap_plane_center; + dot = projected_mouse * constraint_axis; + if (projected_mouse * constraint_axis < 0) + { + snap_plane = 2; + } + projected_mouse -= dot * constraint_axis; + } + else if (dot < 0.f) + { + // look for mouse position outside and in front of snap circle + if (hit && projected_mouse.magVec() > SNAP_GUIDE_INNER_RADIUS * mRadiusMeters && projected_mouse * cam_to_snap_plane < 0.f) + { + snap_plane = 2; + } + } + else + { + // look for mouse position inside or in back of snap circle + if (projected_mouse.magVec() < SNAP_GUIDE_INNER_RADIUS * mRadiusMeters || projected_mouse * cam_to_snap_plane > 0.f || !hit) + { + snap_plane = 2; + } + } } - mInSnapRegime = TRUE; - // 0 to 360 deg - F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f); - F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT); - //fmodf(llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f); - - LLVector3 object_axis; - getObjectAxisClosestToMouse(object_axis); - object_axis = object_axis * first_object_node->mSavedRotation; - - // project onto constraint plane - object_axis = object_axis - (object_axis * getConstraintAxis()) * getConstraintAxis(); - object_axis.normVec(); - - if (relative_mouse_angle < SNAP_ANGLE_DETENTE) + if (snap_plane > 0) { - F32 quantized_mouse_angle = mouse_angle - (relative_mouse_angle - (SNAP_ANGLE_DETENTE * 0.5f)); - angle = (quantized_mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2); + LLVector3 cam_at_axis; + if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) + { + cam_at_axis.setVec(1.f, 0.f, 0.f); + } + else + { + cam_at_axis = snap_plane_center - gAgentCamera.getCameraPositionAgent(); + cam_at_axis.normVec(); + } + + // first, project mouse onto screen plane at point tangent to rotation radius. + getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, cam_at_axis); + // project that point onto rotation plane + projected_mouse -= snap_plane_center; + projected_mouse -= projected_vec(projected_mouse, constraint_axis); + + F32 mouse_lateral_dist = llmin(SNAP_GUIDE_INNER_RADIUS * mRadiusMeters, projected_mouse.magVec()); + F32 mouse_depth = SNAP_GUIDE_INNER_RADIUS * mRadiusMeters; + if (llabs(mouse_lateral_dist) > 0.01f) + { + mouse_depth = sqrtf((SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) * (SNAP_GUIDE_INNER_RADIUS * mRadiusMeters) - + (mouse_lateral_dist * mouse_lateral_dist)); + } + LLVector3 projected_camera_at = cam_at_axis - projected_vec(cam_at_axis, constraint_axis); + projected_mouse -= mouse_depth * projected_camera_at; + + if (!mInSnapRegime) + { + mSmoothRotate = TRUE; + } + mInSnapRegime = TRUE; + // 0 to 360 deg + F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f); + + F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT); + //fmodf(llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f); + + LLVector3 object_axis; + getObjectAxisClosestToMouse(object_axis); + object_axis = object_axis * first_object_node->mSavedRotation; + + // project onto constraint plane + object_axis = object_axis - (object_axis * getConstraintAxis()) * getConstraintAxis(); + object_axis.normVec(); + + if (relative_mouse_angle < SNAP_ANGLE_DETENTE) + { + F32 quantized_mouse_angle = mouse_angle - (relative_mouse_angle - (SNAP_ANGLE_DETENTE * 0.5f)); + angle = (quantized_mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2); + } + else + { + angle = (mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2); + } + return LLQuaternion( -angle, constraint_axis ); } else { - angle = (mouse_angle * DEG_TO_RAD) - atan2(object_axis * axis1, object_axis * axis2); + if (mInSnapRegime) + { + mSmoothRotate = TRUE; + } + mInSnapRegime = FALSE; } - return LLQuaternion( -angle, constraint_axis ); } - else - { + else { if (mInSnapRegime) { mSmoothRotate = TRUE; } mInSnapRegime = FALSE; - + } + + if (!mInSnapRegime) + { LLVector3 up_from_axis = mCenterToCamNorm % constraint_axis; up_from_axis.normVec(); LLVector3 cur_intersection; diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index c5283404f1..d7c634d619 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -76,6 +76,8 @@ static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars static const std::string COLLAPSED_BY_USER = "collapsed_by_user"; +extern S32 gMaxAgentGroups; + /** Comparator for comparing avatar items by last interaction date */ class LLAvatarItemRecentComparator : public LLAvatarItemComparator { @@ -611,10 +613,10 @@ BOOL LLPanelPeople::postBuild() mGroupList->setNoItemsMsg(getString("no_groups_msg")); mGroupList->setNoFilteredItemsMsg(getString("no_filtered_groups_msg")); - mNearbyList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); - mRecentList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); - mAllFriendList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); - mOnlineFriendList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); + mNearbyList->setContextMenu(&LLPanelPeopleMenus::gNearbyPeopleContextMenu); + mRecentList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu); + mAllFriendList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu); + mOnlineFriendList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu); setSortOrder(mRecentList, (ESortOrder)gSavedSettings.getU32("RecentPeopleSortOrder"), false); setSortOrder(mAllFriendList, (ESortOrder)gSavedSettings.getU32("FriendsSortOrder"), false); @@ -808,6 +810,8 @@ void LLPanelPeople::updateButtons() LLPanel* groups_panel = mTabContainer->getCurrentPanel(); groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected + groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count())); + groups_panel->getChild<LLUICtrl>("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.count()))); } else { @@ -1143,7 +1147,10 @@ void LLPanelPeople::onGearButtonClicked(LLUICtrl* btn) uuid_vec_t selected_uuids; getCurrentItemIDs(selected_uuids); // Spawn at bottom left corner of the button. - LLPanelPeopleMenus::gNearbyMenu.show(btn, selected_uuids, 0, 0); + if (getActiveTabName() == NEARBY_TAB_NAME) + LLPanelPeopleMenus::gNearbyPeopleContextMenu.show(btn, selected_uuids, 0, 0); + else + LLPanelPeopleMenus::gPeopleContextMenu.show(btn, selected_uuids, 0, 0); } void LLPanelPeople::onImButtonClicked() diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 47d6b49a50..49f7361c4a 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -39,15 +39,18 @@ #include "llcallingcard.h" // for LLAvatarTracker #include "lllogchat.h" #include "llviewermenu.h" // for gMenuHolder +#include "llconversationmodel.h" +#include "llviewerobjectlist.h" namespace LLPanelPeopleMenus { -NearbyMenu gNearbyMenu; +PeopleContextMenu gPeopleContextMenu; +NearbyPeopleContextMenu gNearbyPeopleContextMenu; -//== NearbyMenu =============================================================== +//== PeopleContextMenu =============================================================== -LLContextMenu* NearbyMenu::createMenu() +LLContextMenu* PeopleContextMenu::createMenu() { // set up the callbacks for all of the avatar menu items LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; @@ -64,7 +67,8 @@ LLContextMenu* NearbyMenu::createMenu() registrar.add("Avatar.RemoveFriend", boost::bind(&LLAvatarActions::removeFriendDialog, id)); registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, id)); registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, id)); - registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this)); + registrar.add("Avatar.OfferTeleport", boost::bind(&PeopleContextMenu::offerTeleport, this)); + registrar.add("Avatar.ZoomIn", boost::bind(&handle_zoom_to_object, id)); registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::showOnMap, id)); registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::share, id)); registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, id)); @@ -72,33 +76,72 @@ LLContextMenu* NearbyMenu::createMenu() registrar.add("Avatar.InviteToGroup", boost::bind(&LLAvatarActions::inviteToGroup, id)); registrar.add("Avatar.Calllog", boost::bind(&LLAvatarActions::viewChatHistory, id)); - enable_registrar.add("Avatar.EnableItem", boost::bind(&NearbyMenu::enableContextMenuItem, this, _2)); - enable_registrar.add("Avatar.CheckItem", boost::bind(&NearbyMenu::checkContextMenuItem, this, _2)); + enable_registrar.add("Avatar.EnableItem", boost::bind(&PeopleContextMenu::enableContextMenuItem, this, _2)); + enable_registrar.add("Avatar.CheckItem", boost::bind(&PeopleContextMenu::checkContextMenuItem, this, _2)); // create the context menu from the XUI menu = createFromFile("menu_people_nearby.xml"); + buildContextMenu(*menu, 0x0); } else { // Set up for multi-selected People // registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs)); // *TODO: unimplemented - registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs, LLUUID::null)); - registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs, LLUUID::null)); - registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this)); - registrar.add("Avatar.RemoveFriend",boost::bind(&LLAvatarActions::removeFriendsDialog, mUUIDs)); + registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs, LLUUID::null)); + registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs, LLUUID::null)); + registrar.add("Avatar.OfferTeleport", boost::bind(&PeopleContextMenu::offerTeleport, this)); + registrar.add("Avatar.RemoveFriend", boost::bind(&LLAvatarActions::removeFriendsDialog, mUUIDs)); // registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::startIM, mUUIDs)); // *TODO: unimplemented - // registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs)); // *TODO: unimplemented - enable_registrar.add("Avatar.EnableItem", boost::bind(&NearbyMenu::enableContextMenuItem, this, _2)); + // registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs)); // *TODO: unimplemented + + enable_registrar.add("Avatar.EnableItem", boost::bind(&PeopleContextMenu::enableContextMenuItem, this, _2)); // create the context menu from the XUI menu = createFromFile("menu_people_nearby_multiselect.xml"); + buildContextMenu(*menu, ITEM_IN_MULTI_SELECTION); } return menu; } -bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) +void PeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags) +{ + menuentry_vec_t items; + menuentry_vec_t disabled_items; + + if (flags & ITEM_IN_MULTI_SELECTION) + { + items.push_back(std::string("add_friends")); + items.push_back(std::string("remove_friends")); + items.push_back(std::string("im")); + items.push_back(std::string("call")); + items.push_back(std::string("share")); + items.push_back(std::string("pay")); + items.push_back(std::string("offer_teleport")); + } + else + { + items.push_back(std::string("view_profile")); + items.push_back(std::string("im")); + items.push_back(std::string("offer_teleport")); + items.push_back(std::string("voice_call")); + items.push_back(std::string("chat_history")); + items.push_back(std::string("separator_chat_history")); + items.push_back(std::string("add_friend")); + items.push_back(std::string("remove_friend")); + items.push_back(std::string("invite_to_group")); + items.push_back(std::string("separator_invite_to_group")); + items.push_back(std::string("map")); + items.push_back(std::string("share")); + items.push_back(std::string("pay")); + items.push_back(std::string("block_unblock")); + } + + hide_context_entries(menu, items, disabled_items); +} + +bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata) { if(gAgent.getID() == mUUIDs.front()) { @@ -170,6 +213,12 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) { return LLAvatarActions::canCall(); } + else if (item == std::string("can_zoom_in")) + { + const LLUUID& id = mUUIDs.front(); + + return gObjectList.findObject(id); + } else if (item == std::string("can_show_on_map")) { const LLUUID& id = mUUIDs.front(); @@ -193,7 +242,7 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) return false; } -bool NearbyMenu::checkContextMenuItem(const LLSD& userdata) +bool PeopleContextMenu::checkContextMenuItem(const LLSD& userdata) { std::string item = userdata.asString(); const LLUUID& id = mUUIDs.front(); @@ -206,11 +255,50 @@ bool NearbyMenu::checkContextMenuItem(const LLSD& userdata) return false; } -void NearbyMenu::offerTeleport() +void PeopleContextMenu::offerTeleport() { // boost::bind cannot recognize overloaded method LLAvatarActions::offerTeleport(), // so we have to use a wrapper. LLAvatarActions::offerTeleport(mUUIDs); } +//== NearbyPeopleContextMenu =============================================================== + +void NearbyPeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags) +{ + menuentry_vec_t items; + menuentry_vec_t disabled_items; + + if (flags & ITEM_IN_MULTI_SELECTION) + { + items.push_back(std::string("add_friends")); + items.push_back(std::string("remove_friends")); + items.push_back(std::string("im")); + items.push_back(std::string("call")); + items.push_back(std::string("share")); + items.push_back(std::string("pay")); + items.push_back(std::string("offer_teleport")); + } + else + { + items.push_back(std::string("view_profile")); + items.push_back(std::string("im")); + items.push_back(std::string("offer_teleport")); + items.push_back(std::string("voice_call")); + items.push_back(std::string("chat_history")); + items.push_back(std::string("separator_chat_history")); + items.push_back(std::string("add_friend")); + items.push_back(std::string("remove_friend")); + items.push_back(std::string("invite_to_group")); + items.push_back(std::string("separator_invite_to_group")); + items.push_back(std::string("zoom_in")); + items.push_back(std::string("map")); + items.push_back(std::string("share")); + items.push_back(std::string("pay")); + items.push_back(std::string("block_unblock")); + } + + hide_context_entries(menu, items, disabled_items); +} + } // namespace LLPanelPeopleMenus diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h index d51eaec716..0a1dcef303 100644 --- a/indra/newview/llpanelpeoplemenus.h +++ b/indra/newview/llpanelpeoplemenus.h @@ -33,19 +33,33 @@ namespace LLPanelPeopleMenus { /** - * Menu used in the nearby people list. + * Menu used in the people lists. */ -class NearbyMenu : public LLListContextMenu +class PeopleContextMenu : public LLListContextMenu { public: /*virtual*/ LLContextMenu* createMenu(); + +protected: + virtual void buildContextMenu(class LLMenuGL& menu, U32 flags); + private: bool enableContextMenuItem(const LLSD& userdata); bool checkContextMenuItem(const LLSD& userdata); void offerTeleport(); }; -extern NearbyMenu gNearbyMenu; +/** + * Menu used in the nearby people list. + */ +class NearbyPeopleContextMenu : public PeopleContextMenu +{ +protected: + /*virtual*/ void buildContextMenu(class LLMenuGL& menu, U32 flags); +}; + +extern PeopleContextMenu gPeopleContextMenu; +extern NearbyPeopleContextMenu gNearbyPeopleContextMenu; } // namespace LLPanelPeopleMenus diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index ffeea2f4df..40577118ba 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1038,7 +1038,6 @@ void render_hud_attachments() if (LLPipeline::sShowHUDAttachments && !gDisconnected && setup_hud_matrices()) { LLCamera hud_cam = *LLViewerCamera::getInstance(); - LLVector3 origin = hud_cam.getOrigin(); hud_cam.setOrigin(-1.f,0,0); hud_cam.setAxes(LLVector3(1,0,0), LLVector3(0,1,0), LLVector3(0,0,1)); LLViewerCamera::updateFrustumPlanes(hud_cam, TRUE); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2340436a01..a13c793899 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2382,7 +2382,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLPostponedNotification::add<LLPostponedIMSystemTipNotification>(params, from_id, false); break; - case IM_NOTHING_SPECIAL: + case IM_NOTHING_SPECIAL: // p2p IM // Don't show dialog, just do IM if (!gAgent.isGodlike() && gAgent.getRegion()->isPrelude() @@ -2783,47 +2783,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } break; - case IM_SESSION_SEND: - { - if (is_do_not_disturb) - { - return; - } - - // Only show messages if we have a session open (which - // should happen after you get an "invitation" - if ( !gIMMgr->hasSession(session_id) ) - { - return; - } - - // standard message, not from system - std::string saved; - if(offline == IM_OFFLINE) - { - saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); - } - buffer = saved + message; - BOOL is_this_agent = FALSE; - if(from_id == gAgentID) - { - is_this_agent = TRUE; - } - gIMMgr->addMessage( - session_id, - from_id, - name, - buffer, - IM_OFFLINE == offline, - ll_safe_string((char*)binary_bucket), - IM_SESSION_INVITE, - parent_estate_id, - region_id, - position, - true); - } - break; - case IM_FROM_TASK: { if (is_do_not_disturb && !is_owned_by_me) @@ -2922,6 +2881,76 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLPostponedNotification::add<LLPostponedServerObjectNotification>(params, from_id, from_group); } break; + + case IM_SESSION_SEND: // ad-hoc or group IMs + + // Only show messages if we have a session open (which + // should happen after you get an "invitation" + if ( !gIMMgr->hasSession(session_id) ) + { + return; + } + + else if (offline == IM_ONLINE && is_do_not_disturb) + { + + // return a standard "do not disturb" message, but only do it to online IM + // (i.e. not other auto responses and not store-and-forward IM) + if (!gIMMgr->hasSession(session_id)) + { + // if there is not a panel for this conversation (i.e. it is a new IM conversation + // initiated by the other party) then... + send_do_not_disturb_message(msg, from_id, session_id); + } + + // now store incoming IM in chat history + + buffer = message; + + LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; + + // add to IM panel, but do not bother the user + gIMMgr->addMessage( + session_id, + from_id, + name, + buffer, + IM_OFFLINE == offline, + ll_safe_string((char*)binary_bucket), + IM_SESSION_INVITE, + parent_estate_id, + region_id, + position, + true); + } + else + { + // standard message, not from system + std::string saved; + if(offline == IM_OFFLINE) + { + saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); + } + + buffer = saved + message; + + LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; + + gIMMgr->addMessage( + session_id, + from_id, + name, + buffer, + IM_OFFLINE == offline, + ll_safe_string((char*)binary_bucket), + IM_SESSION_INVITE, + parent_estate_id, + region_id, + position, + true); + } + break; + case IM_FROM_TASK_AS_ALERT: if (is_do_not_disturb && !is_owned_by_me) { diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e44a2cc4df..4afd90b44c 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2827,7 +2827,6 @@ void LLViewerWindow::updateUI() BOOL handled = FALSE; - BOOL handled_by_top_ctrl = FALSE; LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); LLView* captor_view = dynamic_cast<LLView*>(mouse_captor); @@ -3012,7 +3011,6 @@ void LLViewerWindow::updateUI() S32 local_x, local_y; top_ctrl->screenPointToLocal( x, y, &local_x, &local_y ); handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleHover(local_x, local_y, mask); - handled_by_top_ctrl = TRUE; } if ( !handled ) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c74d9f1292..d295fc60cd 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3097,6 +3097,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) // Rebuild name tag if state change detected if (mNameString.empty() + || (mNameString.size() == 2 && mNameString[0] == 10 && mNameString[1] == 10) // *TODO : find out why mNameString is sometimes "" || new_name || (!title && !mTitle.empty()) || (title && mTitle != title->getString()) diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index ccc513b80d..11b2770ec0 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -965,8 +965,6 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& S32 text_x = x; S32 text_y = (S32)(y - sTrackCircleImage->getHeight()/2 - font->getLineHeight()); - BOOL is_in_window = true; - if( x < 0 || y < 0 || x >= getRect().getWidth() @@ -979,7 +977,6 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& text_x = sTrackingArrowX; text_y = sTrackingArrowY; } - is_in_window = false; } else if (LLTracker::getTrackingStatus() == LLTracker::TRACKING_LOCATION && LLTracker::getTrackedLocationType() != LLTracker::LOCATION_NOTHING) diff --git a/indra/newview/skins/default/textures/icons/collapse_to_one_line.png b/indra/newview/skins/default/textures/icons/collapse_to_one_line.png Binary files differnew file mode 100644 index 0000000000..d57144a645 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/collapse_to_one_line.png diff --git a/indra/newview/skins/default/textures/icons/expand_one_liner.png b/indra/newview/skins/default/textures/icons/expand_one_liner.png Binary files differnew file mode 100644 index 0000000000..58b7d90131 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/expand_one_liner.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index a07d7e4855..93c9cb02cb 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -171,6 +171,8 @@ with the same filename but different name <texture name="Conv_toolbar_call_log" file_name="icons/Conv_toolbar_call_log.png" preload="false" /> <texture name="Conv_toolbar_close" file_name="icons/Conv_toolbar_close.png" preload="false" /> <texture name="Conv_toolbar_collapse" file_name="icons/Conv_toolbar_collapse.png" preload="false" /> + <texture name="Conv_collapse_to_one_line" file_name="icons/collapse_to_one_line.png" preload="false" /> + <texture name="Conv_expand_one_line" file_name="icons/expand_one_liner.png" preload="false" /> <texture name="Conv_toolbar_expand" file_name="icons/Conv_toolbar_expand.png" preload="false" /> <texture name="Conv_toolbar_hang_up" file_name="icons/Conv_toolbar_hang_up.png" preload="false" /> <texture name="Conv_toolbar_open_call" file_name="icons/Conv_toolbar_open_call.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml index 4e0cfb0cd4..e7ab3cacdc 100644 --- a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml @@ -6,7 +6,7 @@ layout="topleft" name="floaterbulkperms" help_topic="floaterbulkperms" - title="EDIT CONTENT PERMISSIONS" + title="ADJUST CONTENT PERMISSIONS" width="410"> <floater.string name="nothing_to_modify_text"> @@ -192,7 +192,7 @@ name="newperms" top="90" width="250"> - New Content Permissions + Adjust Content Permissions To </text> <text type="string" @@ -292,11 +292,22 @@ height="23" label="OK" layout="topleft" - left="205" - name="apply" + left="110" + name="ok" top_pad="10" width="90"> <button.commit_callback + function="BulkPermission.Ok"/> + </button> + <button + follows="left|top" + height="23" + label="Apply" + layout="topleft" + left_pad="5" + name="apply" + width="90"> + <button.commit_callback function="BulkPermission.Apply"/> </button> <button diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml index 12c1676127..65f623a47e 100644 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -61,7 +61,7 @@ image_unselected="Toolbar_Middle_Off" menu_filename="menu_participant_view.xml" layout="topleft" - left="10" + left="5" name="sort_btn" tool_tip="View/sort options" top="5" @@ -75,7 +75,7 @@ image_unselected="Toolbar_Middle_Off" layout="topleft" top="5" - left_pad="4" + left_pad="2" name="add_btn" tool_tip="Start a new conversation" width="31"/> @@ -88,7 +88,7 @@ image_unselected="Toolbar_Middle_Off" layout="topleft" top="5" - left_pad="4" + left_pad="2" name="speak_btn" tool_tip="Speak with people using your microphone" width="31"/> @@ -114,7 +114,7 @@ </layout_panel> </layout_stack> <panel - bottom="-5" + bottom="-1" follows="all" layout="topleft" name="conversations_list_panel" @@ -129,7 +129,7 @@ name="messages_layout_panel" expanded_min_dim="222"> <panel_container - bottom="-5" + bottom="-1" follows="all" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 8f0574177f..d8b085063f 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -14,12 +14,17 @@ width="394" can_resize="true" can_tear_off="false" - min_width="340" min_height="190" positioning="relative"> <floater.string name="call_btn_start">Conv_toolbar_open_call</floater.string> <floater.string name="call_btn_stop">Conv_toolbar_hang_up</floater.string> <floater.string + name="collapseline_icon" + value="Conv_collapse_to_one_line"/> + <floater.string + name="expandline_icon" + value="Conv_expand_one_line"/> + <floater.string name="collapse_icon" value="Conv_toolbar_collapse"/> <floater.string @@ -65,14 +70,28 @@ top="0" left="0" height="355" - width="394"> - <panel + width="394"> + <layout_stack + animate="false" + default_tab_group="2" + follows="all" + height="355" + width="394" + layout="topleft" + orientation="vertical" + name="main_stack" + tab_group="1" + top="0" + left="0"> + + <layout_panel follows="left|top|right" layout="topleft" name="toolbar_panel" top="0" left="0" height="35" + min_height="35" width="394"> <menu_button menu_filename="menu_im_session_showmodes.xml" @@ -98,7 +117,7 @@ image_unselected="Toolbar_Middle_Off" layout="topleft" top="5" - left_pad="4" + left_pad="2" name="gear_btn" visible="false" tool_tip="Actions on selected person" @@ -113,7 +132,7 @@ image_unselected="Toolbar_Middle_Off" layout="topleft" top="5" - left_pad="4" + left_pad="2" name="add_btn" tool_tip="Add someone to this conversation" width="31"/> @@ -126,7 +145,7 @@ image_unselected="Toolbar_Middle_Off" layout="topleft" top="5" - left_pad="4" + left_pad="2" name="voice_call_btn" tool_tip="Open voice connection" width="31"/> @@ -151,7 +170,7 @@ image_unselected="Toolbar_Middle_Off" layout="topleft" top="5" - left="283" + left="292" name="close_btn" tool_tip="End this conversation" width="31" /> @@ -164,7 +183,7 @@ image_unselected="Toolbar_Middle_Off" layout="topleft" top="5" - left_pad="5" + left_pad="2" name="expand_collapse_btn" tool_tip="Collapse/Expand this pane" width="31" /> @@ -177,15 +196,22 @@ image_unselected="Toolbar_Middle_Off" layout="topleft" top="5" - left_pad="5" + left_pad="2" name="tear_off_btn" width="31" /> - </panel> + </layout_panel> + <layout_panel + name="body_panel" + follows="all" + width="394" + height="235" + user_resize="false" + auto_resize="true"> <layout_stack animate="true" default_tab_group="2" follows="all" - height="310" + height="275" width="394" layout="topleft" orientation="horizontal" @@ -196,11 +222,12 @@ <layout_panel name="speakers_list_panel" follows="all" - min_width="115" + expanded_min_dim="115" + min_dim="0" width="150" - height="310" + height="275" user_resize="true" - auto_resize="true"> + auto_resize="false"> </layout_panel> <layout_panel default_tab_group="3" @@ -208,26 +235,26 @@ tab_group="2" follows="all" top="0" - height="310" + height="275" width="244" layout="topleft" user_resize="true" auto_resize="true" visible="true" - name="left_part_holder" + name="right_part_holder" min_width="221"> <panel name="trnsAndChat_panel" follows="all" layout="topleft" visible="true" - height="275" + height="240" width="244"> <layout_stack animate="true" default_tab_group="2" follows="all" - height="275" + height="240" width="244" layout="topleft" visible="true" @@ -239,6 +266,7 @@ left="0"> <layout_panel auto_resize="false" + user_resize="false" height="26" layout="topleft" left_delta="0" @@ -258,7 +286,6 @@ width="230" /> </layout_panel> <layout_panel - height="248" width="210" layout="topleft" follows="all" @@ -266,43 +293,109 @@ top_delta="0" bottom="0" visible="true" - user_resize="true" + user_resize="false" auto_resize="true" name="chat_holder"> <chat_history font="SansSerifSmall" follows="all" visible="true" - height="240" name="chat_history" parse_highlights="true" parse_urls="true" + layout="topleft" right="-5" - left="5"> + left="5" + top="0" + bottom="1"> </chat_history> </layout_panel> </layout_stack> </panel> - <chat_editor + </layout_panel> + </layout_stack> + </layout_panel> + <layout_panel + height="35" + layout="topleft" + follows="left|right|bottom" + left_delta="0" + right="0" + top_delta="0" bottom="0" + visible="true" + user_resize="false" + auto_resize="false" + name="chat_layout_panel"> + <layout_stack + animate="true" + default_tab_group="2" + follows="all" + height="35" + right="0" + layout="topleft" + orientation="horizontal" + name="input_panels" + top_pad="0" + left="0"> + <layout_panel + height="35" + layout="topleft" + follows="left|right|bottom" + left_delta="0" + top_delta="0" + bottom="0" + visible="true" + user_resize="false" + auto_resize="true" + name="input_editor_layout_panel"> + <chat_editor expand_lines_count="5" follows="left|right|bottom" - font="SansSerifSmall" + font="SansSerifSmall" visible="true" height="20" is_expandable="true" label="To" text_tentative_color="TextFgTentativeColor" - layout="bottomleft" + layout="topleft" name="chat_editor" max_length="1023" spellcheck="true" tab_group="3" - width="220" - left="10" + width="160" + top="6" + left="5" + right="-5" wrap="true"> </chat_editor> - </layout_panel> + </layout_panel> + <layout_panel + height="35" + layout="topleft" + follows="left|right|bottom" + left_delta="0" + top_delta="0" + bottom="0" + width="35" + visible="true" + user_resize="false" + auto_resize="false" + name="input_button_layout_panel"> + <button + follows="left|right|bottom" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="Conv_expand_one_line" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + name="minz_btn" + tool_tip="Shows/hides message panel" + width="28"/> + </layout_panel> + </layout_stack> + </layout_panel> </layout_stack> </view> </floater> diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml index fd5c86b3ca..5a13ef0a59 100644 --- a/indra/newview/skins/default/xui/en/menu_conversation.xml +++ b/indra/newview/skins/default/xui/en/menu_conversation.xml @@ -89,7 +89,14 @@ <on_click function="Avatar.DoToSelected" parameter="invite_to_group" /> <on_enable function="Avatar.EnableItem" parameter="can_invite" /> </menu_item_call> - <menu_item_separator layout="topleft" name="separator_invite_to_group"/> + <menu_item_separator layout="topleft" name="separator_invite_to_group"/> + <menu_item_call + label="Zoom In" + layout="topleft" + name="zoom_in"> + <on_click function="Avatar.DoToSelected" parameter="zoom_in" /> + <on_enable function="Avatar.EnableItem" parameter="can_zoom_in" /> + </menu_item_call> <menu_item_call label="Map" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/menu_im_conversation.xml b/indra/newview/skins/default/xui/en/menu_im_conversation.xml index 8882d0a7d8..43287c6ec3 100644 --- a/indra/newview/skins/default/xui/en/menu_im_conversation.xml +++ b/indra/newview/skins/default/xui/en/menu_im_conversation.xml @@ -50,6 +50,13 @@ <menu_item_separator layout="topleft"/> <menu_item_call + label="Zoom In" + layout="topleft" + name="zoom_in"> + <on_click function="Avatar.DoToSelected" parameter="zoom_in" /> + <on_enable function="Avatar.EnableItem" parameter="can_zoom_in" /> + </menu_item_call> + <menu_item_call label="Map" layout="topleft" name="map"> diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml index 60a6c98514..3abb5f7bc8 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <context_menu layout="topleft" - name="Avatar Context Menu"> + name="Nearby People Context Menu"> <menu_item_call label="View Profile" layout="topleft" - name="View Profile"> + name="view_profile"> <menu_item_call.on_click function="Avatar.Profile" /> </menu_item_call> <menu_item_call label="IM" layout="topleft" - name="IM"> + name="im"> <menu_item_call.on_click function="Avatar.IM" /> <menu_item_call.on_enable @@ -21,7 +21,7 @@ </menu_item_call> <menu_item_call label="Offer Teleport" - name="teleport"> + name="offer_teleport"> <menu_item_call.on_click function="Avatar.OfferTeleport"/> <menu_item_call.on_enable @@ -31,7 +31,7 @@ <menu_item_call label="Voice call" layout="topleft" - name="Call"> + name="voice_call"> <menu_item_call.on_click function="Avatar.Call" /> <menu_item_call.on_enable @@ -42,18 +42,18 @@ <menu_item_call label="View chat history..." layout="topleft" - name="Chat history"> + name="chat_history"> <menu_item_call.on_click function="Avatar.Calllog" /> <menu_item_call.on_enable function="Avatar.EnableItem" parameter="can_callog"/> </menu_item_call> - <menu_item_separator /> + <menu_item_separator name="separator_chat_history"/> <menu_item_call label="Add Friend" layout="topleft" - name="Add Friend"> + name="add_friend"> <menu_item_call.on_click function="Avatar.AddFriend" /> <menu_item_call.on_visible @@ -63,7 +63,7 @@ <menu_item_call label="Remove Friend" layout="topleft" - name="Remove Friend"> + name="remove_friend"> <menu_item_call.on_click function="Avatar.RemoveFriend" /> <menu_item_call.on_enable @@ -73,18 +73,28 @@ <menu_item_call label="Invite to group..." layout="topleft" - name="Invite"> + name="invite_to_group"> <menu_item_call.on_click function="Avatar.InviteToGroup" /> <menu_item_call.on_enable function="Avatar.EnableItem" parameter="can_invite"/> </menu_item_call> - <menu_item_separator /> + <menu_item_separator name="separator_invite_to_group"/> + <menu_item_call + label="Zoom In" + layout="topleft" + name="zoom_in"> + <menu_item_call.on_click + function="Avatar.ZoomIn" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_zoom_in"/> + </menu_item_call> <menu_item_call label="Map" layout="topleft" - name="Map"> + name="map"> <menu_item_call.on_click function="Avatar.ShowOnMap" /> <menu_item_call.on_enable @@ -94,7 +104,7 @@ <menu_item_call label="Share" layout="topleft" - name="Share"> + name="share"> <menu_item_call.on_click function="Avatar.Share" /> <menu_item_call.on_enable @@ -104,7 +114,7 @@ <menu_item_call label="Pay" layout="topleft" - name="Pay"> + name="pay"> <menu_item_call.on_click function="Avatar.Pay" /> <menu_item_call.on_enable @@ -114,7 +124,7 @@ <menu_item_check label="Block/Unblock" layout="topleft" - name="Block/Unblock"> + name="block_unblock"> <menu_item_check.on_click function="Avatar.BlockUnblock" /> <menu_item_check.on_check diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml index 5d58a9d289..5f973088fd 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml @@ -6,7 +6,7 @@ enabled="false" label="Add Friends" layout="topleft" - name="Add Friends"> + name="add_friends"> <on_click function="Avatar.AddFriends" /> <on_enable @@ -16,7 +16,7 @@ <menu_item_call label="Remove Friends" layout="topleft" - name="Remove Friend"> + name="remove_friends"> <menu_item_call.on_click function="Avatar.RemoveFriend" /> <menu_item_call.on_enable @@ -26,7 +26,7 @@ <menu_item_call label="IM" layout="topleft" - name="IM"> + name="im"> <on_click function="Avatar.IM" /> </menu_item_call> @@ -34,7 +34,7 @@ enabled="false" label="Call" layout="topleft" - name="Call"> + name="call"> <on_click function="Avatar.Call" /> <on_enable @@ -45,7 +45,7 @@ enabled="false" label="Share" layout="topleft" - name="Share"> + name="share"> <on_click function="Avatar.Share" /> </menu_item_call> @@ -53,13 +53,13 @@ enabled="false" label="Pay" layout="topleft" - name="Pay"> + name="pay"> <on_click function="Avatar.Pay" /> </menu_item_call> <menu_item_call label="Offer Teleport" - name="teleport"> + name="offer_teleport"> <menu_item_call.on_click function="Avatar.OfferTeleport"/> <menu_item_call.on_enable diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml index 6d5fb51e85..c8ce5cdebf 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -202,14 +202,14 @@ Maximum 200 per group daily Drag and drop item here to attach it: </text> <icon - height="72" + height="48" image_name="DropTarget" layout="topleft" left_pad="10" mouse_opaque="true" name="drop_icon" top_delta="-10" - width="72" /> + width="110" /> <button follows="left|top" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 7ce2627be9..ed274d0233 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -480,10 +480,22 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M function="People.Group.Minus" /> </dnd_button> </panel> + <text + type="string" + length="1" + follows="all" + height="14" + layout="topleft" + right="-10" + top_pad="4" + left="3" + name="groupcount"> + You belong to [COUNT] groups, and can join [REMAINING] more. + </text> <group_list allow_select="true" follows="all" - height="406" + height="388" layout="topleft" left="3" name="group_list" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 2cc9d9c1b0..50fd57494f 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -138,7 +138,7 @@ initial_value="1" layout="topleft" left_pad="0" - max_val="1.4" + max_val="1.5" min_val="0.75" name="ui_scale_slider" top_pad="-14" 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 9db3816c92..bd096ebb88 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -429,7 +429,6 @@ </text> <line_editor - enabled="false" control_name="InstantMessageLogPath" border_style="line" border_thickness="1" |