Merge branch 'DRTVWR-587-maint-V' of https://github.com/secondlife/viewer

# Conflicts:
#	indra/llui/lltabcontainer.cpp
#	indra/newview/llagent.cpp
master
Ansariel 2023-07-12 11:06:47 +02:00
commit 91b5fbcd66
13 changed files with 88 additions and 75 deletions

View File

@ -3195,9 +3195,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>9e1b5515ab59b4e9cfeef6626d65d03d</string>
<string>273d73ca6d34cf03a3ac8e9d2b5b2355</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/108609/945996/viewer_manager-3.0.577252-darwin64-577252.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/116533/1002590/viewer_manager-3.0.580869-darwin64-580869.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@ -3219,9 +3219,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
<string>a3c599595ecc8fb987a5499fca42520a</string>
<string>6bc35b062677b04ab83c15be1be2fced</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/108610/946003/viewer_manager-3.0.577252-windows-577252.tar.bz2</string>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/116534/1002596/viewer_manager-3.0.580869-windows-580869.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -3232,7 +3232,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>source_type</key>
<string>hg</string>
<key>version</key>
<string>3.0.577252</string>
<string>3.0.580869</string>
</map>
<key>vlc-bin</key>
<map>

View File

@ -2381,58 +2381,59 @@ void LLTabContainer::commitHoveredButton(S32 x, S32 y)
{
if (!getTabsHidden() && hasMouseCapture())
{
for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
for (tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
{
LLTabTuple* tuple = *iter;
S32 local_x = x - tuple->mButton->getRect().mLeft;
S32 local_y = y - tuple->mButton->getRect().mBottom;
// <FS:Ansariel> FIRE-16498: Only commit visible button
//if (tuple->mButton->pointInView(local_x, local_y) && tuple->mButton->getEnabled() && !tuple->mTabPanel->getVisible())
if (tuple->mButton->pointInView(local_x, local_y) && tuple->mButton->getEnabled() && tuple->mButton->getVisible() && !tuple->mTabPanel->getVisible())
// </FS:Ansariel>
LLButton* button = (*iter)->mButton;
LLPanel* panel = (*iter)->mTabPanel;
if (button->getEnabled() && button->getVisible() && !panel->getVisible())
{
// tuple->mButton->onCommit();
// [SL:KB] - Patch: UI-TabRearrange | Checked: 2010-06-05 (Catznip-2.5)
if ( (mAllowRearrange) && (mCurrentTabIdx >= 0) && (mTabList[mCurrentTabIdx]->mButton->hasFocus()) )
S32 local_x = x - button->getRect().mLeft;
S32 local_y = y - button->getRect().mBottom;
if (button->pointInView(local_x, local_y))
{
S32 idxHover = iter - mTabList.begin();
if ( (mCurrentTabIdx >= mLockedTabCount) && (idxHover >= mLockedTabCount) && (mCurrentTabIdx != idxHover) )
// button->onCommit();
// [SL:KB] - Patch: UI-TabRearrange | Checked: 2010-06-05 (Catznip-2.5)
if ((mAllowRearrange) && (mCurrentTabIdx >= 0) && (mTabList[mCurrentTabIdx]->mButton->hasFocus()))
{
LLRect rctCurTab = mTabList[mCurrentTabIdx]->mButton->getRect();
LLRect rctHoverTab = mTabList[idxHover]->mButton->getRect();
// Only rearrange the tabs if the mouse pointer has cleared the overlap area
bool fClearedOverlap =
(mIsVertical)
? ( (idxHover < mCurrentTabIdx) && (y > rctHoverTab.mTop - rctCurTab.getHeight()) ) ||
( (idxHover > mCurrentTabIdx) && (y < rctCurTab.mTop - rctHoverTab.getHeight()) )
: ( (idxHover < mCurrentTabIdx) && (x < rctHoverTab.mLeft + rctCurTab.getWidth()) ) ||
( (idxHover > mCurrentTabIdx) && (x > rctCurTab.mLeft + rctHoverTab.getWidth()) );
if (fClearedOverlap)
S32 idxHover = iter - mTabList.begin();
if ((mCurrentTabIdx >= mLockedTabCount) && (idxHover >= mLockedTabCount) && (mCurrentTabIdx != idxHover))
{
tuple = mTabList[mCurrentTabIdx];
LLRect rctCurTab = mTabList[mCurrentTabIdx]->mButton->getRect();
LLRect rctHoverTab = mTabList[idxHover]->mButton->getRect();
mTabList.erase(mTabList.begin() + mCurrentTabIdx);
mTabList.insert(mTabList.begin() + idxHover, tuple);
// Only rearrange the tabs if the mouse pointer has cleared the overlap area
bool fClearedOverlap =
(mIsVertical)
? ((idxHover < mCurrentTabIdx) && (y > rctHoverTab.mTop - rctCurTab.getHeight())) ||
((idxHover > mCurrentTabIdx) && (y < rctCurTab.mTop - rctHoverTab.getHeight()))
: ((idxHover < mCurrentTabIdx) && (x < rctHoverTab.mLeft + rctCurTab.getWidth())) ||
((idxHover > mCurrentTabIdx) && (x > rctCurTab.mLeft + rctHoverTab.getWidth()));
if (fClearedOverlap)
{
auto tuple = mTabList[mCurrentTabIdx];
if (mRearrangeSignal)
(*mRearrangeSignal)(idxHover, tuple->mTabPanel);
mTabList.erase(mTabList.begin() + mCurrentTabIdx);
mTabList.insert(mTabList.begin() + idxHover, tuple);
tuple->mButton->onCommit();
tuple->mButton->setFocus(TRUE);
if (mRearrangeSignal)
(*mRearrangeSignal)(idxHover, tuple->mTabPanel);
tuple->mButton->onCommit();
tuple->mButton->setFocus(TRUE);
}
}
}
}
else
{
tuple->mButton->onCommit();
tuple->mButton->setFocus(TRUE);
else
{
button->onCommit();
button->setFocus(TRUE);
// [SL:KB] - Patch: Control-TabContainer | Checked: 2012-08-10 (Catznip-3.3)
return;
return;
// [/SL:KB]
}
break;
// [/SL:KB]
}
break;
// [/SL:KB]
}
}
}

View File

@ -558,7 +558,11 @@ void LLAgent::init()
// *Note: this is where LLViewerCamera::getInstance() used to be constructed.
setFlying( gSavedSettings.getBOOL("FlyingAtExit") );
bool is_flying = gSavedSettings.getBOOL("FlyingAtExit");
if(is_flying)
{
setFlying(is_flying);
}
*mEffectColor = LLUIColorTable::instance().getColor("EffectColor");
@ -3103,12 +3107,6 @@ void LLAgent::setStartPosition( U32 location_id )
gAgent.sendReliableMessage();
}
// </FS:Ansariel>
const U32 HOME_INDEX = 1;
if( HOME_INDEX == location_id )
{
setHomePosRegion( mRegionp->getHandle(), getPositionAgent() );
}
}
void LLAgent::setStartPositionSuccess(const LLSD &result)

View File

@ -42,7 +42,7 @@ class LLConversationItem;
class LLConversationItemSession;
class LLConversationItemParticipant;
typedef std::map<LLUUID, LLConversationItem*> conversations_items_map;
typedef std::map<LLUUID, LLPointer<LLConversationItem> > conversations_items_map;
typedef std::map<LLUUID, LLFolderViewItem*> conversations_widgets_map;
typedef std::vector<std::string> menuentry_vec_t;

View File

@ -159,6 +159,20 @@ void LLFloaterIMContainer::sessionIDUpdated(const LLUUID& old_session_id, const
LLFloaterIMSessionTab::addToHost(new_session_id);
}
LLConversationItem* LLFloaterIMContainer::getSessionModel(const LLUUID& session_id)
{
conversations_items_map::iterator iter = mConversationsItems.find(session_id);
if (iter == mConversationsItems.end())
{
return NULL;
}
else
{
return iter->second.get();
}
}
void LLFloaterIMContainer::sessionRemoved(const LLUUID& session_id)
{
removeConversationListItem(session_id);
@ -612,7 +626,8 @@ void LLFloaterIMContainer::handleConversationModelEvent(const LLSD& event)
}
else if (type == "add_participant")
{
LLConversationItemSession* session_model = dynamic_cast<LLConversationItemSession*>(mConversationsItems[session_id]);
LLConversationItem* item = getSessionModel(session_id);
LLConversationItemSession* session_model = dynamic_cast<LLConversationItemSession*>(item);
LLConversationItemParticipant* participant_model = (session_model ? session_model->findParticipant(participant_id) : NULL);
LLIMModel::LLIMSession * im_sessionp = LLIMModel::getInstance()->findIMSession(session_id);
if (!participant_view && session_model && participant_model)
@ -1761,10 +1776,9 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool
void LLFloaterIMContainer::setTimeNow(const LLUUID& session_id, const LLUUID& participant_id)
{
LLConversationItemSession* item = dynamic_cast<LLConversationItemSession*>(get_ptr_in_map(mConversationsItems,session_id));
LLConversationItemSession* item = dynamic_cast<LLConversationItemSession*>(getSessionModel(session_id));
if (item)
{
item->setTimeNow(participant_id);
mConversationViewModel.requestSortAll();
mConversationsRoot->arrangeAll();
}
@ -1773,7 +1787,7 @@ void LLFloaterIMContainer::setTimeNow(const LLUUID& session_id, const LLUUID& pa
void LLFloaterIMContainer::setNearbyDistances()
{
// Get the nearby chat session: that's the one with uuid nul
LLConversationItemSession* item = dynamic_cast<LLConversationItemSession*>(get_ptr_in_map(mConversationsItems,LLUUID()));
LLConversationItemSession* item = dynamic_cast<LLConversationItemSession*>(getSessionModel(LLUUID()));
if (item)
{
// Get the positions of the nearby avatars and their ids

View File

@ -108,7 +108,7 @@ public:
LLConversationViewModel& getRootViewModel() { return mConversationViewModel; }
LLUUID getSelectedSession() { return mSelectedSession; }
void setSelectedSession(LLUUID sessionID) { mSelectedSession = sessionID; }
LLConversationItem* getSessionModel(const LLUUID& session_id) { return get_ptr_in_map(mConversationsItems,session_id); }
LLConversationItem* getSessionModel(const LLUUID& session_id);
LLConversationSort& getSortOrder() { return mConversationViewModel.getSorter(); }
// Handling of lists of participants is public so to be common with llfloatersessiontab

View File

@ -175,10 +175,9 @@ void LLFloaterURLEntry::onBtnOK( void* userdata )
// We assume that an empty scheme is an http url, as this is how we will treat it.
if(scheme == "")
{
scheme = "http";
scheme = "https";
}
// Discover the MIME type only for "http" scheme.
if(!media_url.empty() &&
(scheme == "http" || scheme == "https"))
{
@ -204,13 +203,18 @@ void LLFloaterURLEntry::getMediaTypeCoro(std::string url, LLHandle<LLFloater> pa
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMediaTypeCoro", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
httpOpts->setFollowRedirects(true);
httpOpts->setHeadersOnly(true);
httpHeaders->append(HTTP_OUT_HEADER_ACCEPT, "*/*");
httpHeaders->append(HTTP_OUT_HEADER_COOKIE, "");
LL_INFOS("HttpCoroutineAdapter", "genericPostCoro") << "Generic POST for " << url << LL_ENDL;
LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts);
LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts, httpHeaders);
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@ -226,12 +230,6 @@ void LLFloaterURLEntry::getMediaTypeCoro(std::string url, LLHandle<LLFloater> pa
// which have no mime type set.
std::string resolvedMimeType = LLMIMETypes::getDefaultMimeType();
if (!status)
{
floaterUrlEntry->headerFetchComplete(status.getType(), resolvedMimeType);
return;
}
LLSD resultHeaders = httpResults[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_HEADERS];
if (resultHeaders.has(HTTP_IN_HEADER_CONTENT_TYPE))

View File

@ -1081,7 +1081,7 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg,
msg->getS32Fast(_PREHASH_MoneyData, _PREHASH_CurrentInterval, current_interval );
msg->getStringFast(_PREHASH_MoneyData, _PREHASH_StartDate, start_date);
std::string time_str = LLTrans::getString("GroupMoneyDate");
std::string time_str = LLTrans::getString("GroupMoneyStartDate");
LLSD substitution;
// We don't do time zone corrections of the calculated number of seconds
@ -1239,7 +1239,7 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg,
// Start with the date.
if (text == mImplementationp->mLoadingText)
{
std::string time_str = LLTrans::getString("GroupMoneyDate");
std::string time_str = LLTrans::getString("GroupMoneyStartDate");
LLSD substitution;
// We don't do time zone corrections of the calculated number of seconds

View File

@ -1690,7 +1690,8 @@ bool LLViewerInput::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level)
BOOL LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down)
{
BOOL handled = gViewerWindow->handleAnyMouseClick(window_impl, pos, mask, clicktype, down);
bool is_toolmgr_action = false;
BOOL handled = gViewerWindow->handleAnyMouseClick(window_impl, pos, mask, clicktype, down, is_toolmgr_action);
if (clicktype != CLICK_NONE)
{
@ -1709,7 +1710,7 @@ BOOL LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask,
// If the first LMB click is handled by the menu, skip the following double click
static bool skip_double_click = false;
if (clicktype == CLICK_LEFT && down )
if (clicktype == CLICK_LEFT && down && !is_toolmgr_action)
{
skip_double_click = handled;
}

View File

@ -1150,7 +1150,7 @@ void LLViewerWindow::handlePieMenu(S32 x, S32 y, MASK mask)
}
}
BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down)
BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down, bool& is_toolmgr_action)
{
const char* buttonname = "";
const char* buttonstatestr = "";
@ -1299,6 +1299,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m
if(!gDisconnected && LLToolMgr::getInstance()->getCurrentTool()->handleAnyMouseClick( x, y, mask, clicktype, down ) )
{
LLViewerEventRecorder::instance().clear_xui();
is_toolmgr_action = true;
return TRUE;
}

View File

@ -180,7 +180,7 @@ public:
void reshapeStatusBarContainer();
BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down);
BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down, bool &is_toolmgr_action);
//
// LLWindowCallback interface implementation

View File

@ -2956,8 +2956,8 @@ Falls diese Meldung weiterhin angezeigt wird, wenden Sie sich unter http://suppo
<string name="GroupMoneyDebits">
Soll
</string>
<string name="GroupMoneyDate">
[weekday,datetime,utc], [day,datetime,utc]. [mth,datetime,utc] [year,datetime,utc]
<string name="GroupMoneyStartDate">
Transaktionen seit [weekday,datetime,utc], [day,datetime,utc]. [mth,datetime,utc] [year,datetime,utc]
</string>
<string name="AcquiredItems">
Erworbene Artikel

View File

@ -1347,7 +1347,7 @@ If you continue to receive this message, please contact Second Life support for
<string name="GroupMoneyBalance">Balance</string>
<string name="GroupMoneyCredits">Credits</string>
<string name="GroupMoneyDebits">Debits</string>
<string name="GroupMoneyDate">[weekday,datetime,utc] [mth,datetime,utc] [day,datetime,utc], [year,datetime,utc]</string>
<string name="GroupMoneyStartDate">Transactions since [weekday,datetime,utc] [mth,datetime,utc] [day,datetime,utc], [year,datetime,utc]</string>
<!-- Viewer menu -->
<string name="AcquiredItems">Acquired Items</string>