Remove llqtwebkit, add cef
This commit is contained in:
@@ -749,6 +749,11 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
|
||||
LL_INFOS() << "LLToolPie handleDoubleClick (becoming mouseDown)" << LL_ENDL;
|
||||
}
|
||||
|
||||
if (handleMediaDblClick(mPick))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (gSavedSettings.getBOOL("DoubleClickAutoPilot"))
|
||||
{
|
||||
if ((mPick.mPickType == LLPickInfo::PICK_LAND && !mPick.mPosGlobal.isExactlyZero()) ||
|
||||
@@ -879,56 +884,110 @@ static void handle_click_action_play()
|
||||
|
||||
bool LLToolPie::handleMediaClick(const LLPickInfo& pick)
|
||||
{
|
||||
//FIXME: how do we handle object in different parcel than us?
|
||||
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
|
||||
LLPointer<LLViewerObject> objectp = pick.getObject();
|
||||
//FIXME: how do we handle object in different parcel than us?
|
||||
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
|
||||
LLPointer<LLViewerObject> objectp = pick.getObject();
|
||||
|
||||
|
||||
if (!parcel ||
|
||||
objectp.isNull() ||
|
||||
pick.mObjectFace < 0 ||
|
||||
pick.mObjectFace >= objectp->getNumTEs())
|
||||
{
|
||||
LLViewerMediaFocus::getInstance()->clearFocus();
|
||||
if (!parcel ||
|
||||
objectp.isNull() ||
|
||||
pick.mObjectFace < 0 ||
|
||||
pick.mObjectFace >= objectp->getNumTEs())
|
||||
{
|
||||
LLViewerMediaFocus::getInstance()->clearFocus();
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Does this face have media?
|
||||
const LLTextureEntry* tep = objectp->getTE(pick.mObjectFace);
|
||||
if(!tep)
|
||||
return false;
|
||||
// Does this face have media?
|
||||
const LLTextureEntry* tep = objectp->getTE(pick.mObjectFace);
|
||||
if (!tep)
|
||||
return false;
|
||||
|
||||
LLMediaEntry* mep = (tep->hasMedia()) ? tep->getMediaData() : NULL;
|
||||
if(!mep)
|
||||
return false;
|
||||
|
||||
viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID());
|
||||
LLMediaEntry* mep = (tep->hasMedia()) ? tep->getMediaData() : NULL;
|
||||
if (!mep)
|
||||
return false;
|
||||
|
||||
if (gSavedSettings.getBOOL("MediaOnAPrimUI"))
|
||||
{
|
||||
if (!LLViewerMediaFocus::getInstance()->isFocusedOnFace(pick.getObject(), pick.mObjectFace) || media_impl.isNull())
|
||||
{
|
||||
// It's okay to give this a null impl
|
||||
LLViewerMediaFocus::getInstance()->setFocusFace(pick.getObject(), pick.mObjectFace, media_impl, pick.mNormal);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make sure keyboard focus is set to the media focus object.
|
||||
gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance());
|
||||
LLEditMenuHandler::gEditMenuHandler = LLViewerMediaFocus::instance().getFocusedMediaImpl();
|
||||
|
||||
media_impl->mouseDown(pick.mUVCoords, gKeyboard->currentMask(TRUE));
|
||||
mMediaMouseCaptureID = mep->getMediaID();
|
||||
setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture.
|
||||
}
|
||||
viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID());
|
||||
|
||||
return true;
|
||||
}
|
||||
if (gSavedSettings.getBOOL("MediaOnAPrimUI"))
|
||||
{
|
||||
if (!LLViewerMediaFocus::getInstance()->isFocusedOnFace(pick.getObject(), pick.mObjectFace) || media_impl.isNull())
|
||||
{
|
||||
// It's okay to give this a null impl
|
||||
LLViewerMediaFocus::getInstance()->setFocusFace(pick.getObject(), pick.mObjectFace, media_impl, pick.mNormal);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make sure keyboard focus is set to the media focus object.
|
||||
gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance());
|
||||
LLEditMenuHandler::gEditMenuHandler = LLViewerMediaFocus::instance().getFocusedMediaImpl();
|
||||
|
||||
LLViewerMediaFocus::getInstance()->clearFocus();
|
||||
media_impl->mouseDown(pick.mUVCoords, gKeyboard->currentMask(TRUE));
|
||||
mMediaMouseCaptureID = mep->getMediaID();
|
||||
setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture.
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
LLViewerMediaFocus::getInstance()->clearFocus();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LLToolPie::handleMediaDblClick(const LLPickInfo& pick)
|
||||
{
|
||||
//FIXME: how do we handle object in different parcel than us?
|
||||
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
|
||||
LLPointer<LLViewerObject> objectp = pick.getObject();
|
||||
|
||||
|
||||
if (!parcel ||
|
||||
objectp.isNull() ||
|
||||
pick.mObjectFace < 0 ||
|
||||
pick.mObjectFace >= objectp->getNumTEs())
|
||||
{
|
||||
LLViewerMediaFocus::getInstance()->clearFocus();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Does this face have media?
|
||||
const LLTextureEntry* tep = objectp->getTE(pick.mObjectFace);
|
||||
if (!tep)
|
||||
return false;
|
||||
|
||||
LLMediaEntry* mep = (tep->hasMedia()) ? tep->getMediaData() : NULL;
|
||||
if (!mep)
|
||||
return false;
|
||||
|
||||
viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID());
|
||||
|
||||
if (gSavedSettings.getBOOL("MediaOnAPrimUI"))
|
||||
{
|
||||
if (!LLViewerMediaFocus::getInstance()->isFocusedOnFace(pick.getObject(), pick.mObjectFace) || media_impl.isNull())
|
||||
{
|
||||
// It's okay to give this a null impl
|
||||
LLViewerMediaFocus::getInstance()->setFocusFace(pick.getObject(), pick.mObjectFace, media_impl, pick.mNormal);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make sure keyboard focus is set to the media focus object.
|
||||
gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance());
|
||||
LLEditMenuHandler::gEditMenuHandler = LLViewerMediaFocus::instance().getFocusedMediaImpl();
|
||||
|
||||
media_impl->mouseDoubleClick(pick.mUVCoords, gKeyboard->currentMask(TRUE));
|
||||
mMediaMouseCaptureID = mep->getMediaID();
|
||||
setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture.
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
LLViewerMediaFocus::getInstance()->clearFocus();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LLToolPie::handleMediaHover(const LLPickInfo& pick)
|
||||
@@ -939,7 +998,7 @@ bool LLToolPie::handleMediaHover(const LLPickInfo& pick)
|
||||
|
||||
LLPointer<LLViewerObject> objectp = pick.getObject();
|
||||
|
||||
// Early out cases. Must clear media hover.
|
||||
// Early out cases. Must clear media hover.
|
||||
// did not hit an object or did not hit a valid face
|
||||
if ( objectp.isNull() ||
|
||||
pick.mObjectFace < 0 ||
|
||||
|
||||
Reference in New Issue
Block a user