summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/integration_tests/llui_libtest/llui_libtest.cpp4
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp26
-rw-r--r--indra/llplugin/llpluginclassmedia.h7
-rw-r--r--indra/llplugin/llpluginprocessparent.cpp5
-rw-r--r--indra/llui/lliconctrl.cpp7
-rw-r--r--indra/llui/lliconctrl.h5
-rw-r--r--indra/llui/llscrollcontainer.cpp2
-rw-r--r--indra/llui/lltextbase.cpp157
-rw-r--r--indra/llui/lltextbase.h2
-rw-r--r--indra/llui/lltexteditor.cpp2
-rw-r--r--indra/llui/llui.cpp8
-rw-r--r--indra/llui/llui.h8
-rw-r--r--indra/media_plugins/quicktime/media_plugin_quicktime.cpp15
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp1703
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl16
-rw-r--r--indra/newview/llagentwearables.cpp6
-rw-r--r--indra/newview/llagentwearables.h1
-rw-r--r--indra/newview/llavatariconctrl.cpp2
-rw-r--r--indra/newview/llchathistory.cpp7
-rw-r--r--indra/newview/llfloaterland.cpp6
-rw-r--r--indra/newview/lllandmarklist.cpp36
-rw-r--r--indra/newview/lllandmarklist.h5
-rw-r--r--indra/newview/llmediactrl.cpp54
-rw-r--r--indra/newview/llmediactrl.h2
-rwxr-xr-xindra/newview/llmediadataclient.cpp12
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.cpp8
-rw-r--r--indra/newview/llsidetray.cpp61
-rw-r--r--indra/newview/llsidetray.h2
-rw-r--r--indra/newview/lltexlayerparams.cpp17
-rw-r--r--indra/newview/lltexlayerparams.h1
-rw-r--r--indra/newview/lltoolpie.cpp5
-rw-r--r--indra/newview/llviewermedia.cpp80
-rw-r--r--indra/newview/llviewermedia.h18
-rw-r--r--indra/newview/llviewermediafocus.cpp2
-rw-r--r--indra/newview/llviewertexture.cpp8
-rw-r--r--indra/newview/llviewertexture.h8
-rw-r--r--indra/newview/llviewertexturelist.cpp72
-rw-r--r--indra/newview/llviewertexturelist.h10
-rw-r--r--indra/newview/llvoavatarself.cpp3
-rw-r--r--indra/newview/llworldmapview.cpp2
-rw-r--r--indra/newview/skins/default/textures/icons/Generic_Object.pngbin0 -> 366 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Info_Over.pngbin0 -> 376 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Animation.pngbin486 -> 496 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_BodyShape.pngbin571 -> 641 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Clothing.pngbin255 -> 253 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Eye.pngbin439 -> 491 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_FolderClosed.pngbin215 -> 219 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_FolderOpen.pngbin351 -> 361 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Gesture.pngbin413 -> 408 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Gloves.pngbin385 -> 366 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Hair.pngbin366 -> 377 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Jacket.pngbin573 -> 591 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Landmark.pngbin494 -> 532 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Notecard.pngbin238 -> 222 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Object.pngbin327 -> 333 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Pants.pngbin375 -> 377 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Script.pngbin463 -> 469 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Shirt.pngbin397 -> 402 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Shoe.pngbin284 -> 276 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Skin.pngbin382 -> 393 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Skirt.pngbin449 -> 494 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Snapshot.pngbin416 -> 535 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Socks.pngbin347 -> 358 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Sound.pngbin359 -> 404 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Texture.pngbin157 -> 157 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Underpants.pngbin397 -> 418 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_Undershirt.pngbin208 -> 208 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml135
-rw-r--r--indra/newview/skins/default/xui/en/floater_nearby_chat.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_general.xml42
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile.xml50
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_view.xml9
-rw-r--r--indra/newview/skins/default/xui/en/panel_side_tray.xml4
-rw-r--r--indra/test_apps/llplugintest/bookmarks.txt1
-rw-r--r--indra/test_apps/llplugintest/llmediaplugintest.cpp8
77 files changed, 1415 insertions, 1236 deletions
diff --git a/indra/integration_tests/llui_libtest/llui_libtest.cpp b/indra/integration_tests/llui_libtest/llui_libtest.cpp
index 3631761c93..abd8f7dbde 100644
--- a/indra/integration_tests/llui_libtest/llui_libtest.cpp
+++ b/indra/integration_tests/llui_libtest/llui_libtest.cpp
@@ -84,12 +84,12 @@ class LLTexture ;
class TestImageProvider : public LLImageProviderInterface
{
public:
- /*virtual*/ LLPointer<LLUIImage> getUIImage(const std::string& name)
+ /*virtual*/ LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority)
{
return makeImage();
}
- /*virtual*/ LLPointer<LLUIImage> getUIImageByID(const LLUUID& id)
+ /*virtual*/ LLPointer<LLUIImage> getUIImageByID(const LLUUID& id, S32 priority)
{
return makeImage();
}
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index fc58b48a7b..26802bbd1c 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -112,6 +112,8 @@ void LLPluginClassMedia::reset()
mLowPrioritySizeLimit = LOW_PRIORITY_TEXTURE_SIZE_DEFAULT;
mAllowDownsample = false;
mPadding = 0;
+ mLastMouseX = 0;
+ mLastMouseY = 0;
mStatus = LLPluginClassMediaOwner::MEDIA_NONE;
mSleepTime = 1.0f / 100.0f;
mCanCut = false;
@@ -412,8 +414,20 @@ std::string LLPluginClassMedia::translateModifiers(MASK modifiers)
return result;
}
-void LLPluginClassMedia::mouseEvent(EMouseEventType type, int x, int y, MASK modifiers)
+void LLPluginClassMedia::mouseEvent(EMouseEventType type, int button, int x, int y, MASK modifiers)
{
+ if(type == MOUSE_EVENT_MOVE)
+ {
+ if((x == mLastMouseX) && (y == mLastMouseY))
+ {
+ // Don't spam unnecessary mouse move events.
+ return;
+ }
+
+ mLastMouseX = x;
+ mLastMouseY = y;
+ }
+
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "mouse_event");
std::string temp;
switch(type)
@@ -425,6 +439,8 @@ void LLPluginClassMedia::mouseEvent(EMouseEventType type, int x, int y, MASK mod
}
message.setValue("event", temp);
+ message.setValueS32("button", button);
+
message.setValueS32("x", x);
// Incoming coordinates are OpenGL-style ((0,0) = lower left), so flip them here if the plugin has requested it.
@@ -515,11 +531,12 @@ void LLPluginClassMedia::scrollEvent(int x, int y, MASK modifiers)
sendMessage(message);
}
-bool LLPluginClassMedia::textInput(const std::string &text)
+bool LLPluginClassMedia::textInput(const std::string &text, MASK modifiers)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "text_event");
message.setValue("text", text);
+ message.setValue("modifiers", translateModifiers(modifiers));
sendMessage(message);
@@ -1112,6 +1129,11 @@ void LLPluginClassMedia::setVolume(float volume)
}
}
+float LLPluginClassMedia::getVolume()
+{
+ return mRequestedVolume;
+}
+
void LLPluginClassMedia::initializeUrlHistory(const LLSD& url_history)
{
// Send URL history to plugin
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index 697deec353..4f9763474e 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -101,7 +101,7 @@ public:
MOUSE_EVENT_DOUBLE_CLICK
}EMouseEventType;
- void mouseEvent(EMouseEventType type, int x, int y, MASK modifiers);
+ void mouseEvent(EMouseEventType type, int button, int x, int y, MASK modifiers);
typedef enum
{
@@ -115,7 +115,7 @@ public:
void scrollEvent(int x, int y, MASK modifiers);
// Text may be unicode (utf8 encoded)
- bool textInput(const std::string &text);
+ bool textInput(const std::string &text, MASK modifiers);
void loadURI(const std::string &uri);
@@ -227,6 +227,7 @@ public:
void seek(float time);
void setLoop(bool loop);
void setVolume(float volume);
+ float getVolume();
F64 getCurrentTime(void) const { return mCurrentTime; };
F64 getDuration(void) const { return mDuration; };
@@ -310,6 +311,8 @@ protected:
std::string translateModifiers(MASK modifiers);
std::string mCursorName;
+ int mLastMouseX;
+ int mLastMouseY;
LLPluginClassMediaOwner::EMediaStatus mStatus;
diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp
index f3b4c6bdc6..39f9438fb3 100644
--- a/indra/llplugin/llpluginprocessparent.cpp
+++ b/indra/llplugin/llpluginprocessparent.cpp
@@ -55,6 +55,11 @@ LLPluginProcessParent::LLPluginProcessParent(LLPluginProcessParentOwner *owner)
mBoundPort = 0;
mState = STATE_UNINITIALIZED;
mDisableTimeout = false;
+
+ // initialize timer - heartbeat test (mHeartbeat.hasExpired())
+ // can sometimes return true immediately otherwise and plugins
+ // fail immediately because it looks like
+ mHeartbeat.setTimerExpirySec(PLUGIN_LOCKED_UP_SECONDS);
}
LLPluginProcessParent::~LLPluginProcessParent()
diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp
index 0330a2b374..66c2ba682f 100644
--- a/indra/llui/lliconctrl.cpp
+++ b/indra/llui/lliconctrl.cpp
@@ -56,7 +56,8 @@ LLIconCtrl::Params::Params()
LLIconCtrl::LLIconCtrl(const LLIconCtrl::Params& p)
: LLUICtrl(p),
mColor(p.color()),
- mImagep(p.image)
+ mImagep(p.image),
+ mPriority(0)
{
if (mImagep.notNull())
{
@@ -93,11 +94,11 @@ void LLIconCtrl::setValue(const LLSD& value )
LLUICtrl::setValue(tvalue);
if (tvalue.isUUID())
{
- mImagep = LLUI::getUIImageByID(tvalue.asUUID());
+ mImagep = LLUI::getUIImageByID(tvalue.asUUID(), mPriority);
}
else
{
- mImagep = LLUI::getUIImage(tvalue.asString());
+ mImagep = LLUI::getUIImage(tvalue.asString(), mPriority);
}
}
diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h
index ff25b0d53e..90f1693060 100644
--- a/indra/llui/lliconctrl.h
+++ b/indra/llui/lliconctrl.h
@@ -72,10 +72,13 @@ public:
std::string getImageName() const;
void setColor(const LLColor4& color) { mColor = color; }
+
+protected:
+ S32 mPriority;
private:
LLUIColor mColor;
- LLPointer<LLUIImage> mImagep;
+ LLPointer<LLUIImage> mImagep;
};
#endif
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index d8606c6889..5e17372fe9 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -432,7 +432,7 @@ void LLScrollContainer::draw()
LLLocalClipRect clip(LLRect(mInnerRect.mLeft,
mInnerRect.mBottom + (show_h_scrollbar ? scrollbar_size : 0) + visible_height,
- visible_width,
+ mInnerRect.mRight - (show_v_scrollbar ? scrollbar_size: 0),
mInnerRect.mBottom + (show_h_scrollbar ? scrollbar_size : 0)
));
drawChild(mScrolledView);
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 22cce755b0..0add3fb500 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -232,7 +232,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p)
createDefaultSegment();
- updateTextRect();
+ updateRects();
}
LLTextBase::~LLTextBase()
@@ -538,10 +538,6 @@ void LLTextBase::drawText()
next_start = getLineStart(cur_line + 1);
line_end = next_start;
}
- if ( text[line_end-1] == '\n' )
- {
- --line_end;
- }
LLRect text_rect(line.mRect.mLeft + mTextRect.mLeft - scrolled_view_rect.mLeft,
line.mRect.mTop - scrolled_view_rect.mBottom + mTextRect.mBottom,
@@ -944,7 +940,7 @@ void LLTextBase::reshape(S32 width, S32 height, BOOL called_from_parent)
// do this first after reshape, because other things depend on
// up-to-date mTextRect
- updateTextRect();
+ updateRects();
needsReflow();
}
@@ -957,10 +953,20 @@ void LLTextBase::draw()
// then update scroll position, as cursor may have moved
updateScrollFromCursor();
+ LLRect doc_rect;
+ if (mScroller)
+ {
+ mScroller->localRectToOtherView(mScroller->getContentWindowRect(), &doc_rect, this);
+ }
+ else
+ {
+ doc_rect = getLocalRect();
+ }
+
if (mBGVisible)
{
// clip background rect against extents, if we support scrolling
- LLLocalClipRect clip(getLocalRect(), mScroller != NULL);
+ LLLocalClipRect clip(doc_rect, mScroller != NULL);
LLColor4 bg_color = mReadOnly
? mReadOnlyBgColor.get()
@@ -975,7 +981,7 @@ void LLTextBase::draw()
{
// only clip if we support scrolling (mScroller != NULL)
- LLLocalClipRect clip(mTextRect, mScroller != NULL);
+ LLLocalClipRect clip(doc_rect, mScroller != NULL);
drawSelectionBackground();
drawText();
drawCursor();
@@ -1154,60 +1160,8 @@ void LLTextBase::reflow(S32 start_index)
}
}
- if (mLineInfoList.empty())
- {
- mContentsRect = LLRect(0, mVPad, mHPad, 0);
- }
- else
- {
-
- mContentsRect = mLineInfoList.begin()->mRect;
- for (line_list_t::const_iterator line_iter = ++mLineInfoList.begin();
- line_iter != mLineInfoList.end();
- ++line_iter)
- {
- mContentsRect.unionWith(line_iter->mRect);
- }
-
- mContentsRect.mRight += mHPad;
- mContentsRect.mTop += mVPad;
- // get around rounding errors when clipping text against rectangle
- mContentsRect.stretch(1);
- }
-
- // change mDocumentView size to accomodate reflowed text
- LLRect document_rect;
- if (mScroller)
- {
- // document is size of scroller or size of text contents, whichever is larger
- document_rect.setOriginAndSize(0, 0,
- mScroller->getContentWindowRect().getWidth(),
- llmax(mScroller->getContentWindowRect().getHeight(), mContentsRect.getHeight()));
- }
- else
- {
- // document size is just extents of reflowed text, reset to origin 0,0
- document_rect.set(0,
- getLocalRect().getHeight(),
- getLocalRect().getWidth(),
- llmin(0, getLocalRect().getHeight() - mContentsRect.getHeight()));
- }
- mDocumentView->setShape(document_rect);
-
- // after making document big enough to hold all the text, move the text to fit in the document
- if (!mLineInfoList.empty())
- {
- S32 delta_pos = mDocumentView->getRect().getHeight() - mLineInfoList.begin()->mRect.mTop - mVPad;
- // move line segments to fit new document rect
- for (line_list_t::iterator it = mLineInfoList.begin(); it != mLineInfoList.end(); ++it)
- {
- it->mRect.translate(0, delta_pos);
- }
- mContentsRect.translate(0, delta_pos);
- }
-
// calculate visible region for diplaying text
- updateTextRect();
+ updateRects();
for (segment_set_t::iterator segment_it = mSegments.begin();
segment_it != mSegments.end();
@@ -2075,8 +2029,30 @@ S32 LLTextBase::getEditableIndex(S32 index, bool increasing_direction)
}
}
-void LLTextBase::updateTextRect()
+void LLTextBase::updateRects()
{
+ if (mLineInfoList.empty())
+ {
+ mContentsRect = LLRect(0, mVPad, mHPad, 0);
+ }
+ else
+ {
+
+ mContentsRect = mLineInfoList.begin()->mRect;
+ for (line_list_t::const_iterator line_iter = ++mLineInfoList.begin();
+ line_iter != mLineInfoList.end();
+ ++line_iter)
+ {
+ mContentsRect.unionWith(line_iter->mRect);
+ }
+
+ mContentsRect.mRight += mHPad;
+ mContentsRect.mTop += mVPad;
+ // get around rounding errors when clipping text against rectangle
+ mContentsRect.stretch(1);
+ }
+
+
LLRect old_text_rect = mTextRect;
mTextRect = mScroller ? mScroller->getContentWindowRect() : getLocalRect();
//FIXME: replace border with image?
@@ -2090,6 +2066,37 @@ void LLTextBase::updateTextRect()
{
needsReflow();
}
+
+ // change document rect size too
+ LLRect document_rect;
+ if (mScroller)
+ {
+ // document is size of scroller or size of text contents, whichever is larger
+ document_rect.setOriginAndSize(0, 0,
+ mScroller->getContentWindowRect().getWidth(),
+ llmax(mScroller->getContentWindowRect().getHeight(), mContentsRect.getHeight()));
+ }
+ else
+ {
+ // document size is just extents of reflowed text, reset to origin 0,0
+ document_rect.set(0,
+ getLocalRect().getHeight(),
+ getLocalRect().getWidth(),
+ llmin(0, getLocalRect().getHeight() - mContentsRect.getHeight()));
+ }
+ mDocumentView->setShape(document_rect);
+
+ // after making document big enough to hold all the text, move the text to fit in the document
+ if (!mLineInfoList.empty())
+ {
+ S32 delta_pos = mDocumentView->getRect().getHeight() - mLineInfoList.begin()->mRect.mTop - mVPad;
+ // move line segments to fit new document rect
+ for (line_list_t::iterator it = mLineInfoList.begin(); it != mLineInfoList.end(); ++it)
+ {
+ it->mRect.translate(0, delta_pos);
+ }
+ mContentsRect.translate(0, delta_pos);
+ }
}
@@ -2218,6 +2225,11 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
const LLWString &text = mEditor.getWText();
+ if ( text[seg_end-1] == '\n' )
+ {
+ --seg_end;
+ }
+
F32 right_x = rect.mLeft;
if (!mStyle->isVisible())
{
@@ -2362,16 +2374,7 @@ void LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt
{
LLWString text = mEditor.getWText();
- // look for any printable character, then return the font height
- height = 0;
- for (S32 index = mStart + first_char; index < mStart + first_char + num_chars; ++index)
- {
- if (text[index] != '\n')
- {
- height = mFontHeight;
- break;
- }
- }
+ height = mFontHeight;
width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars);
}
@@ -2393,7 +2396,11 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin
S32 last_char = mStart + segment_offset;
for (; last_char != mEnd; ++last_char)
{
- if (text[last_char] == '\n') break;
+ if (text[last_char] == '\n')
+ {
+ last_char++;
+ break;
+ }
}
// set max characters to length of segment, or to first newline
@@ -2416,10 +2423,6 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin
// include terminating NULL
num_chars++;
}
- else if (text[mStart + segment_offset + num_chars] == '\n')
- {
- num_chars++;
- }
return num_chars;
}
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index f0b8878491..d0787f001e 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -294,7 +294,7 @@ protected:
void endSelection();
// misc
- void updateTextRect();
+ void updateRects();
void needsReflow() { mReflowNeeded = TRUE; }
void needsScroll() { mScrollNeeded = TRUE; }
void replaceUrlLabel(const std::string &url, const std::string &label);
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index d507cf7ce4..0ca9a18e0c 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -273,7 +273,7 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) :
if (mShowLineNumbers)
{
mHPad += UI_TEXTEDITOR_LINE_NUMBER_MARGIN;
- updateTextRect();
+ updateRects();
}
}
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index da9384f876..48504a1e54 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -1807,11 +1807,11 @@ void LLUI::glRectToScreen(const LLRect& gl, LLRect *screen)
}
//static
-LLPointer<LLUIImage> LLUI::getUIImageByID(const LLUUID& image_id)
+LLPointer<LLUIImage> LLUI::getUIImageByID(const LLUUID& image_id, S32 priority)
{
if (sImageProvider)
{
- return sImageProvider->getUIImageByID(image_id);
+ return sImageProvider->getUIImageByID(image_id, priority);
}
else
{
@@ -1820,10 +1820,10 @@ LLPointer<LLUIImage> LLUI::getUIImageByID(const LLUUID& image_id)
}
//static
-LLPointer<LLUIImage> LLUI::getUIImage(const std::string& name)
+LLPointer<LLUIImage> LLUI::getUIImage(const std::string& name, S32 priority)
{
if (!name.empty() && sImageProvider)
- return sImageProvider->getUIImage(name);
+ return sImageProvider->getUIImage(name, priority);
else
return NULL;
}
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index 6ab78ab3cd..efb1b0a36f 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -195,8 +195,8 @@ public:
static void getMousePositionLocal(const LLView* viewp, S32 *x, S32 *y);
static void setScaleFactor(const LLVector2& scale_factor);
static void setLineWidth(F32 width);
- static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id);
- static LLPointer<LLUIImage> getUIImage(const std::string& name);
+ static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = 0);
+ static LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = 0);
static LLVector2 getWindowSize();
static void screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y);
static void glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y);
@@ -241,8 +241,8 @@ protected:
LLImageProviderInterface() {};
virtual ~LLImageProviderInterface() {};
public:
- virtual LLPointer<LLUIImage> getUIImage(const std::string& name) = 0;
- virtual LLPointer<LLUIImage> getUIImageByID(const LLUUID& id) = 0;
+ virtual LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority) = 0;
+ virtual LLPointer<LLUIImage> getUIImageByID(const LLUUID& id, S32 priority) = 0;
virtual void cleanUp() = 0;
};
diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
index 7100d03f05..c9ee1c8ac7 100644
--- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
+++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
@@ -79,6 +79,7 @@ private:
const int mMinHeight;
const int mMaxHeight;
F64 mPlayRate;
+ std::string mNavigateURL;
enum ECommand {
COMMAND_NONE,
@@ -179,6 +180,11 @@ private:
setStatus(STATUS_ERROR);
return;
};
+
+ mNavigateURL = url;
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_begin");
+ message.setValue("uri", mNavigateURL);
+ sendMessage(message);
// do pre-roll actions (typically fired for streaming movies but not always)
PrePrerollMovie( mMovieHandle, 0, getPlayRate(), moviePrePrerollCompleteCallback, ( void * )this );
@@ -389,11 +395,18 @@ private:
static void moviePrePrerollCompleteCallback( Movie movie, OSErr preroll_err, void *ref )
{
- //MediaPluginQuickTime* self = ( MediaPluginQuickTime* )ref;
+ MediaPluginQuickTime* self = ( MediaPluginQuickTime* )ref;
// TODO:
//LLMediaEvent event( self );
//self->mEventEmitter.update( &LLMediaObserver::onMediaPreroll, event );
+
+ // Send a "navigate complete" event.
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_complete");
+ message.setValue("uri", self->mNavigateURL);
+ message.setValueS32("result_code", 200);
+ message.setValue("result_string", "OK");
+ self->sendMessage(message);
};
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 6c54f63859..e42f9739f4 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -1,842 +1,861 @@
-/**
- * @file media_plugin_webkit.cpp
- * @brief Webkit plugin for LLMedia API plugin system
- *
- * $LicenseInfo:firstyear=2008&license=viewergpl$
- *
- * Copyright (c) 2008, Linden Research, Inc.
- *
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- *
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-#include "llqtwebkit.h"
-
-#include "linden_common.h"
-#include "indra_constants.h" // for indra keyboard codes
-
-#include "llgl.h"
-
-#include "llplugininstance.h"
-#include "llpluginmessage.h"
-#include "llpluginmessageclasses.h"
-#include "media_plugin_base.h"
-
-#if LL_WINDOWS
-#include <direct.h>
-#else
-#include <unistd.h>
-#include <stdlib.h>
-#endif
-
-#if LL_WINDOWS
- // *NOTE:Mani - This captures the module handle fo rthe dll. This is used below
- // to get the path to this dll for webkit initialization.
- // I don't know how/if this can be done with apr...
- namespace { HMODULE gModuleHandle;};
- BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
- {
- gModuleHandle = (HMODULE) hinstDLL;
- return TRUE;
- }
-#endif
-
-////////////////////////////////////////////////////////////////////////////////
-//
-class MediaPluginWebKit :
- public MediaPluginBase,
- public LLEmbeddedBrowserWindowObserver
-{
-public:
- MediaPluginWebKit(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data);
- ~MediaPluginWebKit();
-
- /*virtual*/ void receiveMessage(const char *message_string);
-
-private:
-
- int mBrowserWindowId;
- bool mBrowserInitialized;
- bool mNeedsUpdate;
-
- bool mCanCut;
- bool mCanCopy;
- bool mCanPaste;
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- void update(int milliseconds)
- {
- LLQtWebKit::getInstance()->pump( milliseconds );
-
- checkEditState();
-
- if ( mNeedsUpdate )
- {
- const unsigned char* browser_pixels = LLQtWebKit::getInstance()->grabBrowserWindow( mBrowserWindowId );
-
- unsigned int buffer_size = LLQtWebKit::getInstance()->getBrowserRowSpan( mBrowserWindowId ) * LLQtWebKit::getInstance()->getBrowserHeight( mBrowserWindowId );
-
-// std::cerr << "webkit plugin: updating" << std::endl;
-
- // TODO: should get rid of this memcpy if possible
- if ( mPixels && browser_pixels )
- {
-// std::cerr << " memcopy of " << buffer_size << " bytes" << std::endl;
- memcpy( mPixels, browser_pixels, buffer_size );
- }
-
- if ( mWidth > 0 && mHeight > 0 )
- {
-// std::cerr << "Setting dirty, " << mWidth << " x " << mHeight << std::endl;
- setDirty( 0, 0, mWidth, mHeight );
- }
-
- mNeedsUpdate = false;
- };
- };
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- bool initBrowser()
- {
- // already initialized
- if ( mBrowserInitialized )
- return true;
-
- // not enough information to initialize the browser yet.
- if ( mWidth < 0 || mHeight < 0 || mDepth < 0 ||
- mTextureWidth < 0 || mTextureHeight < 0 )
- {
- return false;
- };
-
- // set up directories
- char cwd[ FILENAME_MAX ]; // I *think* this is defined on all platforms we use
- if (NULL == getcwd( cwd, FILENAME_MAX - 1 ))
- {
- llwarns << "Couldn't get cwd - probably too long - failing to init." << llendl;
- return false;
- }
- std::string application_dir = std::string( cwd );
-
-#if LL_WINDOWS
- //*NOTE:Mani - On windows, at least, the component path is the
- // location of this dll's image file.
- std::string component_dir;
- char dll_path[_MAX_PATH];
- DWORD len = GetModuleFileNameA(gModuleHandle, (LPCH)&dll_path, _MAX_PATH);
- while(len && dll_path[ len ] != ('\\') )
- {
- len--;
- }
- if(len >= 0)
- {
- dll_path[len] = 0;
- component_dir = dll_path;
- }
- else
- {
- // *NOTE:Mani - This case should be an rare exception.
- // GetModuleFileNameA should always give you a full path, no?
- component_dir = application_dir;
- }
-#else
- std::string component_dir = application_dir;
-#endif
- std::string profileDir = application_dir + "/" + "browser_profile"; // cross platform?
-
- // window handle - needed on Windows and must be app window.
-#if LL_WINDOWS
- char window_title[ MAX_PATH ];
- GetConsoleTitleA( window_title, MAX_PATH );
- void* native_window_handle = (void*)FindWindowA( NULL, window_title );
-#else
- void* native_window_handle = 0;
-#endif
-
- // main browser initialization
- bool result = LLQtWebKit::getInstance()->init( application_dir, component_dir, profileDir, native_window_handle );
- if ( result )
- {
- // create single browser window
- mBrowserWindowId = LLQtWebKit::getInstance()->createBrowserWindow( mWidth, mHeight );
-
-#if LL_WINDOWS
- // Enable plugins
- LLQtWebKit::getInstance()->enablePlugins(true);
-#elif LL_DARWIN
- // Disable plugins
- LLQtWebKit::getInstance()->enablePlugins(false);
-#elif LL_LINUX
- // Disable plugins
- LLQtWebKit::getInstance()->enablePlugins(false);
-#endif
-
- // tell LLQtWebKit about the size of the browser window
- LLQtWebKit::getInstance()->setSize( mBrowserWindowId, mWidth, mHeight );
-
- // observer events that LLQtWebKit emits
- LLQtWebKit::getInstance()->addObserver( mBrowserWindowId, this );
-
- // append details to agent string
- LLQtWebKit::getInstance()->setBrowserAgentId( "LLPluginMedia Web Browser" );
-
- // don't flip bitmap
- LLQtWebKit::getInstance()->flipWindow( mBrowserWindowId, true );
-
- // Set the background color to black
- LLQtWebKit::getInstance()->
- // set background color to be black - mostly for initial login page
- LLQtWebKit::getInstance()->setBackgroundColor( mBrowserWindowId, 0x00, 0x00, 0x00 );
-
- // go to the "home page"
- // Don't do this here -- it causes the dreaded "white flash" when loading a browser instance.
-// LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, "about:blank" );
-
- // set flag so we don't do this again
- mBrowserInitialized = true;
-
- return true;
- };
-
- return false;
- };
-
- ////////////////////////////////////////////////////////////////////////////////
- // virtual
- void onCursorChanged(const EventType& event)
- {
- LLQtWebKit::ECursor llqt_cursor = (LLQtWebKit::ECursor)event.getIntValue();
- std::string name;
-
- switch(llqt_cursor)
- {
- case LLQtWebKit::C_ARROW:
- name = "arrow";
- break;
- case LLQtWebKit::C_IBEAM:
- name = "ibeam";
- break;
- case LLQtWebKit::C_SPLITV:
- name = "splitv";
- break;
- case LLQtWebKit::C_SPLITH:
- name = "splith";
- break;
- case LLQtWebKit::C_POINTINGHAND:
- name = "hand";
- break;
-
- default:
- llwarns << "Unknown cursor ID: " << (int)llqt_cursor << llendl;
- break;
- }
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "cursor_changed");
- message.setValue("name", name);
- sendMessage(message);
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- // virtual
- void onPageChanged( const EventType& event )
- {
- // flag that an update is required
- mNeedsUpdate = true;
- };
-
- ////////////////////////////////////////////////////////////////////////////////
- // virtual
- void onNavigateBegin(const EventType& event)
- {
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_begin");
- message.setValue("uri", event.getEventUri());
- sendMessage(message);
-
- setStatus(STATUS_LOADING);
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- // virtual
- void onNavigateComplete(const EventType& event)
- {
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_complete");
- message.setValue("uri", event.getEventUri());
- message.setValueS32("result_code", event.getIntValue());
- message.setValue("result_string", event.getStringValue());
- message.setValueBoolean("history_back_available", LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_BACK));
- message.setValueBoolean("history_forward_available", LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_FORWARD));
- sendMessage(message);
-
- setStatus(STATUS_LOADED);
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- // virtual
- void onUpdateProgress(const EventType& event)
- {
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "progress");
- message.setValueS32("percent", event.getIntValue());
- sendMessage(message);
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- // virtual
- void onStatusTextChange(const EventType& event)
- {
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "status_text");
- message.setValue("status", event.getStringValue());
- sendMessage(message);
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- // virtual
- void onTitleChange(const EventType& event)
- {
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text");
- message.setValue("name", event.getStringValue());
- sendMessage(message);
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- // virtual
- void onLocationChange(const EventType& event)
- {
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "location_changed");
- message.setValue("uri", event.getEventUri());
- sendMessage(message);
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- // virtual
- void onClickLinkHref(const EventType& event)
- {
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "click_href");
- message.setValue("uri", event.getStringValue());
- message.setValue("target", event.getStringValue2());
- sendMessage(message);
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- // virtual
- void onClickLinkNoFollow(const EventType& event)
- {
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "click_nofollow");
- message.setValue("uri", event.getStringValue());
- sendMessage(message);
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- void mouseDown( int x, int y )
- {
- LLQtWebKit::getInstance()->mouseDown( mBrowserWindowId, x, y );
- };
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- void mouseUp( int x, int y )
- {
- LLQtWebKit::getInstance()->mouseUp( mBrowserWindowId, x, y );
- LLQtWebKit::getInstance()->focusBrowser( mBrowserWindowId, true );
- checkEditState();
- };
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- void mouseMove( int x, int y )
- {
- LLQtWebKit::getInstance()->mouseMove( mBrowserWindowId, x, y );
- };
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- void keyPress( int key )
- {
- int llqt_key;
-
- // The incoming values for 'key' will be the ones from indra_constants.h
- // the outgoing values are the ones from llqtwebkit.h
-
- switch((KEY)key)
- {
- // This is the list that the llqtwebkit implementation actually maps into Qt keys.
-// case KEY_XXX: llqt_key = LL_DOM_VK_CANCEL; break;
-// case KEY_XXX: llqt_key = LL_DOM_VK_HELP; break;
- case KEY_BACKSPACE: llqt_key = LL_DOM_VK_BACK_SPACE; break;
- case KEY_TAB: llqt_key = LL_DOM_VK_TAB; break;
-// case KEY_XXX: llqt_key = LL_DOM_VK_CLEAR; break;
- case KEY_RETURN: llqt_key = LL_DOM_VK_RETURN; break;
- case KEY_PAD_RETURN: llqt_key = LL_DOM_VK_ENTER; break;
- case KEY_SHIFT: llqt_key = LL_DOM_VK_SHIFT; break;
- case KEY_CONTROL: llqt_key = LL_DOM_VK_CONTROL; break;
- case KEY_ALT: llqt_key = LL_DOM_VK_ALT; break;
-// case KEY_XXX: llqt_key = LL_DOM_VK_PAUSE; break;
- case KEY_CAPSLOCK: llqt_key = LL_DOM_VK_CAPS_LOCK; break;
- case KEY_ESCAPE: llqt_key = LL_DOM_VK_ESCAPE; break;
- case KEY_PAGE_UP: llqt_key = LL_DOM_VK_PAGE_UP; break;
- case KEY_PAGE_DOWN: llqt_key = LL_DOM_VK_PAGE_DOWN; break;
- case KEY_END: llqt_key = LL_DOM_VK_END; break;
- case KEY_HOME: llqt_key = LL_DOM_VK_HOME; break;
- case KEY_LEFT: llqt_key = LL_DOM_VK_LEFT; break;
- case KEY_UP: llqt_key = LL_DOM_VK_UP; break;
- case KEY_RIGHT: llqt_key = LL_DOM_VK_RIGHT; break;
- case KEY_DOWN: llqt_key = LL_DOM_VK_DOWN; break;
-// case KEY_XXX: llqt_key = LL_DOM_VK_PRINTSCREEN; break;
- case KEY_INSERT: llqt_key = LL_DOM_VK_INSERT; break;
- case KEY_DELETE: llqt_key = LL_DOM_VK_DELETE; break;
-// case KEY_XXX: llqt_key = LL_DOM_VK_CONTEXT_MENU; break;
-
- default:
- if(key < KEY_SPECIAL)
- {
- // Pass the incoming key through -- it should be regular ASCII, which should be correct for webkit.
- llqt_key = key;
- }
- else
- {
- // Don't pass through untranslated special keys -- they'll be all wrong.
- llqt_key = 0;
- }
- break;
- }
-
-// std::cerr << "keypress, original code = 0x" << std::hex << key << ", converted code = 0x" << std::hex << llqt_key << std::dec << std::endl;
-
- if(llqt_key != 0)
- {
- LLQtWebKit::getInstance()->keyPress( mBrowserWindowId, llqt_key );
- }
-
- checkEditState();
- };
-
- ////////////////////////////////////////////////////////////////////////////////
- //
- void unicodeInput( const std::string &utf8str )
- {
- LLWString wstr = utf8str_to_wstring(utf8str);
-
- unsigned int i;
- for(i=0; i < wstr.size(); i++)
- {
-// std::cerr << "unicode input, code = 0x" << std::hex << (unsigned long)(wstr[i]) << std::dec << std::endl;
-
- LLQtWebKit::getInstance()->unicodeInput(mBrowserWindowId, wstr[i]);
- }
-
- checkEditState();
- };
-
- void checkEditState(void)
- {
- bool can_cut = LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_EDIT_CUT);
- bool can_copy = LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_EDIT_COPY);
- bool can_paste = LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_EDIT_PASTE);
-
- if((can_cut != mCanCut) || (can_copy != mCanCopy) || (can_paste != mCanPaste))
- {
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_state");
-
- if(can_cut != mCanCut)
- {
- mCanCut = can_cut;
- message.setValueBoolean("cut", can_cut);
- }
-
- if(can_copy != mCanCopy)
- {
- mCanCopy = can_copy;
- message.setValueBoolean("copy", can_copy);
- }
-
- if(can_paste != mCanPaste)
- {
- mCanPaste = can_paste;
- message.setValueBoolean("paste", can_paste);
- }
-
- sendMessage(message);
-
- }
- }
-
-};
-
-MediaPluginWebKit::MediaPluginWebKit(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data) :
- MediaPluginBase(host_send_func, host_user_data)
-{
-// std::cerr << "MediaPluginWebKit constructor" << std::endl;
-
- mBrowserWindowId = 0;
- mBrowserInitialized = false;
- mNeedsUpdate = true;
- mCanCut = false;
- mCanCopy = false;
- mCanPaste = false;
-}
-
-MediaPluginWebKit::~MediaPluginWebKit()
-{
- // unhook observer
- LLQtWebKit::getInstance()->remObserver( mBrowserWindowId, this );
-
- // clean up
- LLQtWebKit::getInstance()->reset();
-
-// std::cerr << "MediaPluginWebKit destructor" << std::endl;
-}
-
-void MediaPluginWebKit::receiveMessage(const char *message_string)
-{
-// std::cerr << "MediaPluginWebKit::receiveMessage: received message: \"" << message_string << "\"" << std::endl;
- LLPluginMessage message_in;
-
- if(message_in.parse(message_string) >= 0)
- {
- std::string message_class = message_in.getClass();
- std::string message_name = message_in.getName();
- if(message_class == LLPLUGIN_MESSAGE_CLASS_BASE)
- {
- if(message_name == "init")
- {
- LLPluginMessage message("base", "init_response");
- LLSD versions = LLSD::emptyMap();
- versions[LLPLUGIN_MESSAGE_CLASS_BASE] = LLPLUGIN_MESSAGE_CLASS_BASE_VERSION;
- versions[LLPLUGIN_MESSAGE_CLASS_MEDIA] = LLPLUGIN_MESSAGE_CLASS_MEDIA_VERSION;
- versions[LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER] = LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER_VERSION;
- message.setValueLLSD("versions", versions);
-
- std::string plugin_version = "Webkit media plugin, Webkit version ";
- plugin_version += LLQtWebKit::getInstance()->getVersion();
- message.setValue("plugin_version", plugin_version);
- sendMessage(message);
-
- // Plugin gets to decide the texture parameters to use.
- mDepth = 4;
-
- message.setMessage(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
- message.setValueS32("default_width", 1024);
- message.setValueS32("default_height", 1024);
- message.setValueS32("depth", mDepth);
- message.setValueU32("internalformat", GL_RGBA);
- message.setValueU32("format", GL_RGBA);
- message.setValueU32("type", GL_UNSIGNED_BYTE);
- message.setValueBoolean("coords_opengl", true);
- sendMessage(message);
- }
- else if(message_name == "idle")
- {
- // no response is necessary here.
- F64 time = message_in.getValueReal("time");
-
- // Convert time to milliseconds for update()
- update((int)(time * 1000.0f));
- }
- else if(message_name == "cleanup")
- {
- // TODO: clean up here
- }
- else if(message_name == "shm_added")
- {
- SharedSegmentInfo info;
- info.mAddress = message_in.getValuePointer("address");
- info.mSize = (size_t)message_in.getValueS32("size");
- std::string name = message_in.getValue("name");
-
-
-// std::cerr << "MediaPluginWebKit::receiveMessage: shared memory added, name: " << name
-// << ", size: " << info.mSize
-// << ", address: " << info.mAddress
-// << std::endl;
-
- mSharedSegments.insert(SharedSegmentMap::value_type(name, info));
-
- }
- else if(message_name == "shm_remove")
- {
- std::string name = message_in.getValue("name");
-
-// std::cerr << "MediaPluginWebKit::receiveMessage: shared memory remove, name = " << name << std::endl;
-
- SharedSegmentMap::iterator iter = mSharedSegments.find(name);
- if(iter != mSharedSegments.end())
- {
- if(mPixels == iter->second.mAddress)
- {
- // This is the currently active pixel buffer. Make sure we stop drawing to it.
- mPixels = NULL;
- mTextureSegmentName.clear();
- }
- mSharedSegments.erase(iter);
- }
- else
- {
-// std::cerr << "MediaPluginWebKit::receiveMessage: unknown shared memory region!" << std::endl;
- }
-
- // Send the response so it can be cleaned up.
- LLPluginMessage message("base", "shm_remove_response");
- message.setValue("name", name);
- sendMessage(message);
- }
- else
- {
-// std::cerr << "MediaPluginWebKit::receiveMessage: unknown base message: " << message_name << std::endl;
- }
- }
- else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
- {
- if(message_name == "size_change")
- {
- std::string name = message_in.getValue("name");
- S32 width = message_in.getValueS32("width");
- S32 height = message_in.getValueS32("height");
- S32 texture_width = message_in.getValueS32("texture_width");
- S32 texture_height = message_in.getValueS32("texture_height");
-
- if(!name.empty())
- {
- // Find the shared memory region with this name
- SharedSegmentMap::iterator iter = mSharedSegments.find(name);
- if(iter != mSharedSegments.end())
- {
- mPixels = (unsigned char*)iter->second.mAddress;
- mWidth = width;
- mHeight = height;
-
- // initialize (only gets called once)
- initBrowser();
-
- // size changed so tell the browser
- LLQtWebKit::getInstance()->setSize( mBrowserWindowId, mWidth, mHeight );
-
-// std::cerr << "webkit plugin: set size to " << mWidth << " x " << mHeight
-// << ", rowspan is " << LLQtWebKit::getInstance()->getBrowserRowSpan(mBrowserWindowId) << std::endl;
-
- S32 real_width = LLQtWebKit::getInstance()->getBrowserRowSpan(mBrowserWindowId) / LLQtWebKit::getInstance()->getBrowserDepth(mBrowserWindowId);
-
- // The actual width the browser will be drawing to is probably smaller... let the host know by modifying texture_width in the response.
- if(real_width <= texture_width)
- {
- texture_width = real_width;
- }
- else
- {
- // This won't work -- it'll be bigger than the allocated memory. This is a fatal error.
-// std::cerr << "Fatal error: browser rowbytes greater than texture width" << std::endl;
- mDeleteMe = true;
- return;
- }
-
- mTextureWidth = texture_width;
- mTextureHeight = texture_height;
-
- };
- };
-
- LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_response");
- message.setValue("name", name);
- message.setValueS32("width", width);
- message.setValueS32("height", height);
- message.setValueS32("texture_width", texture_width);
- message.setValueS32("texture_height", texture_height);
- sendMessage(message);
-
- }
- else if(message_name == "load_uri")
- {
- std::string uri = message_in.getValue("uri");
-
-// std::cout << "loading URI: " << uri << std::endl;
-
- if(!uri.empty())
- {
- LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, uri );
- }
- }
- else if(message_name == "mouse_event")
- {
- std::string event = message_in.getValue("event");
- S32 x = message_in.getValueS32("x");
- S32 y = message_in.getValueS32("y");
- // std::string modifiers = message.getValue("modifiers");
-
- if(event == "down")
- {
- mouseDown(x, y);
- //std::cout << "Mouse down at " << x << " x " << y << std::endl;
- }
- else if(event == "up")
- {
- mouseUp(x, y);
- //std::cout << "Mouse up at " << x << " x " << y << std::endl;
- }
- else if(event == "move")
- {
- mouseMove(x, y);
- //std::cout << ">>>>>>>>>>>>>>>>>>>> Mouse move at " << x << " x " << y << std::endl;
- }
- }
- else if(message_name == "scroll_event")
- {
- // S32 x = message_in.getValueS32("x");
- S32 y = message_in.getValueS32("y");
- // std::string modifiers = message.getValue("modifiers");
-
- // We currently ignore horizontal scrolling.
- // The scroll values are roughly 1 per wheel click, so we need to magnify them by some factor.
- // Arbitrarily, I choose 16.
- y *= 16;
- LLQtWebKit::getInstance()->scrollByLines(mBrowserWindowId, y);
- }
- else if(message_name == "key_event")
- {
- std::string event = message_in.getValue("event");
-
- // act on "key down" or "key repeat"
- if ( (event == "down") || (event == "repeat") )
- {
- S32 key = message_in.getValueS32("key");
- keyPress( key );
- };
- }
- else if(message_name == "text_event")
- {
- std::string text = message_in.getValue("text");
-
- unicodeInput(text);
- }
- if(message_name == "edit_cut")
- {
- LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_EDIT_CUT );
- }
- if(message_name == "edit_copy")
- {
- LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_EDIT_COPY );
- }
- if(message_name == "edit_paste")
- {
- LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_EDIT_PASTE );
- }
- else
- {
-// std::cerr << "MediaPluginWebKit::receiveMessage: unknown media message: " << message_string << std::endl;
- };
- }
- else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER)
- {
- if(message_name == "focus")
- {
- bool val = message_in.getValueBoolean("focused");
- LLQtWebKit::getInstance()->focusBrowser( mBrowserWindowId, val );
- }
- else if(message_name == "clear_cache")
- {
- LLQtWebKit::getInstance()->clearCache();
- }
- else if(message_name == "clear_cookies")
- {
- LLQtWebKit::getInstance()->clearAllCookies();
- }
- else if(message_name == "enable_cookies")
- {
- bool val = message_in.getValueBoolean("enable");
- LLQtWebKit::getInstance()->enableCookies( val );
- }
- else if(message_name == "proxy_setup")
- {
- bool val = message_in.getValueBoolean("enable");
- std::string host = message_in.getValue("host");
- int port = message_in.getValueS32("port");
- LLQtWebKit::getInstance()->enableProxy( val, host, port );
- }
- else if(message_name == "browse_stop")
- {
- LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_STOP );
- }
- else if(message_name == "browse_reload")
- {
- // foo = message_in.getValueBoolean("ignore_cache");
- LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_RELOAD );
- }
- else if(message_name == "browse_forward")
- {
- LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_FORWARD );
- }
- else if(message_name == "browse_back")
- {
- LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_BACK );
- }
- else if(message_name == "set_status_redirect")
- {
- int code = message_in.getValueS32("code");
- std::string url = message_in.getValue("url");
- if ( 404 == code ) // browser lib only supports 404 right now
- {
- LLQtWebKit::getInstance()->set404RedirectUrl( mBrowserWindowId, url );
- };
- }
- else if(message_name == "set_user_agent")
- {
- std::string user_agent = message_in.getValue("user_agent");
- LLQtWebKit::getInstance()->setBrowserAgentId( user_agent );
- }
- else if(message_name == "init_history")
- {
- // Initialize browser history
- LLSD history = message_in.getValueLLSD("history");
- // First, clear the URL history
- LLQtWebKit::getInstance()->clearHistory(mBrowserWindowId);
- // Then, add the history items in order
- LLSD::array_iterator iter_history = history.beginArray();
- LLSD::array_iterator end_history = history.endArray();
- for(; iter_history != end_history; ++iter_history)
- {
- std::string url = (*iter_history).asString();
- if(! url.empty()) {
- LLQtWebKit::getInstance()->prependHistoryUrl(mBrowserWindowId, url);
- }
- }
- }
- else
- {
-// std::cerr << "MediaPluginWebKit::receiveMessage: unknown media_browser message: " << message_string << std::endl;
- };
- }
- else
- {
-// std::cerr << "MediaPluginWebKit::receiveMessage: unknown message class: " << message_class << std::endl;
- };
- }
-}
-
-int init_media_plugin(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data, LLPluginInstance::sendMessageFunction *plugin_send_func, void **plugin_user_data)
-{
- MediaPluginWebKit *self = new MediaPluginWebKit(host_send_func, host_user_data);
- *plugin_send_func = MediaPluginWebKit::staticReceiveMessage;
- *plugin_user_data = (void*)self;
-
- return 0;
-}
-
+/**
+ * @file media_plugin_webkit.cpp
+ * @brief Webkit plugin for LLMedia API plugin system
+ *
+ * $LicenseInfo:firstyear=2008&license=viewergpl$
+ *
+ * Copyright (c) 2008, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llqtwebkit.h"
+
+#include "linden_common.h"
+#include "indra_constants.h" // for indra keyboard codes
+
+#include "llgl.h"
+
+#include "llplugininstance.h"
+#include "llpluginmessage.h"
+#include "llpluginmessageclasses.h"
+#include "media_plugin_base.h"
+
+#if LL_WINDOWS
+#include <direct.h>
+#else
+#include <unistd.h>
+#include <stdlib.h>
+#endif
+
+#if LL_WINDOWS
+ // *NOTE:Mani - This captures the module handle fo rthe dll. This is used below
+ // to get the path to this dll for webkit initialization.
+ // I don't know how/if this can be done with apr...
+ namespace { HMODULE gModuleHandle;};
+ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+ {
+ gModuleHandle = (HMODULE) hinstDLL;
+ return TRUE;
+ }
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+//
+class MediaPluginWebKit :
+ public MediaPluginBase,
+ public LLEmbeddedBrowserWindowObserver
+{
+public:
+ MediaPluginWebKit(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data);
+ ~MediaPluginWebKit();
+
+ /*virtual*/ void receiveMessage(const char *message_string);
+
+private:
+
+ int mBrowserWindowId;
+ bool mBrowserInitialized;
+ bool mNeedsUpdate;
+
+ bool mCanCut;
+ bool mCanCopy;
+ bool mCanPaste;
+ int mLastMouseX;
+ int mLastMouseY;
+
+ ////////////////////////////////////////////////////////////////////////////////
+ //
+ void update(int milliseconds)
+ {
+ LLQtWebKit::getInstance()->pump( milliseconds );
+
+ checkEditState();
+
+ if ( mNeedsUpdate )
+ {
+ const unsigned char* browser_pixels = LLQtWebKit::getInstance()->grabBrowserWindow( mBrowserWindowId );
+
+ unsigned int buffer_size = LLQtWebKit::getInstance()->getBrowserRowSpan( mBrowserWindowId ) * LLQtWebKit::getInstance()->getBrowserHeight( mBrowserWindowId );
+
+// std::cerr << "webkit plugin: updating" << std::endl;
+
+ // TODO: should get rid of this memcpy if possible
+ if ( mPixels && browser_pixels )
+ {
+// std::cerr << " memcopy of " << buffer_size << " bytes" << std::endl;
+ memcpy( mPixels, browser_pixels, buffer_size );
+ }
+
+ if ( mWidth > 0 && mHeight > 0 )
+ {
+// std::cerr << "Setting dirty, " << mWidth << " x " << mHeight << std::endl;
+ setDirty( 0, 0, mWidth, mHeight );
+ }
+
+ mNeedsUpdate = false;
+ };
+ };
+
+ ////////////////////////////////////////////////////////////////////////////////
+ //
+ bool initBrowser()
+ {
+ // already initialized
+ if ( mBrowserInitialized )
+ return true;
+
+ // not enough information to initialize the browser yet.
+ if ( mWidth < 0 || mHeight < 0 || mDepth < 0 ||
+ mTextureWidth < 0 || mTextureHeight < 0 )
+ {
+ return false;
+ };
+
+ // set up directories
+ char cwd[ FILENAME_MAX ]; // I *think* this is defined on all platforms we use
+ if (NULL == getcwd( cwd, FILENAME_MAX - 1 ))
+ {
+ llwarns << "Couldn't get cwd - probably too long - failing to init." << llendl;
+ return false;
+ }
+ std::string application_dir = std::string( cwd );
+
+#if LL_WINDOWS
+ //*NOTE:Mani - On windows, at least, the component path is the
+ // location of this dll's image file.
+ std::string component_dir;
+ char dll_path[_MAX_PATH];
+ DWORD len = GetModuleFileNameA(gModuleHandle, (LPCH)&dll_path, _MAX_PATH);
+ while(len && dll_path[ len ] != ('\\') )
+ {
+ len--;
+ }
+ if(len >= 0)
+ {
+ dll_path[len] = 0;
+ component_dir = dll_path;
+ }
+ else
+ {
+ // *NOTE:Mani - This case should be an rare exception.
+ // GetModuleFileNameA should always give you a full path, no?
+ component_dir = application_dir;
+ }
+#else
+ std::string component_dir = application_dir;
+#endif
+ std::string profileDir = application_dir + "/" + "browser_profile"; // cross platform?
+
+ // window handle - needed on Windows and must be app window.
+#if LL_WINDOWS
+ char window_title[ MAX_PATH ];
+ GetConsoleTitleA( window_title, MAX_PATH );
+ void* native_window_handle = (void*)FindWindowA( NULL, window_title );
+#else
+ void* native_window_handle = 0;
+#endif
+
+ // main browser initialization
+ bool result = LLQtWebKit::getInstance()->init( application_dir, component_dir, profileDir, native_window_handle );
+ if ( result )
+ {
+ // create single browser window
+ mBrowserWindowId = LLQtWebKit::getInstance()->createBrowserWindow( mWidth, mHeight );
+
+#if LL_WINDOWS
+ // Enable plugins
+ LLQtWebKit::getInstance()->enablePlugins(true);
+#elif LL_DARWIN
+ // Disable plugins
+ LLQtWebKit::getInstance()->enablePlugins(false);
+#elif LL_LINUX
+ // Disable plugins
+ LLQtWebKit::getInstance()->enablePlugins(false);
+#endif
+
+ // tell LLQtWebKit about the size of the browser window
+ LLQtWebKit::getInstance()->setSize( mBrowserWindowId, mWidth, mHeight );
+
+ // observer events that LLQtWebKit emits
+ LLQtWebKit::getInstance()->addObserver( mBrowserWindowId, this );
+
+ // append details to agent string
+ LLQtWebKit::getInstance()->setBrowserAgentId( "LLPluginMedia Web Browser" );
+
+ // don't flip bitmap
+ LLQtWebKit::getInstance()->flipWindow( mBrowserWindowId, true );
+
+ // Set the background color to black
+ LLQtWebKit::getInstance()->
+ // set background color to be black - mostly for initial login page
+ LLQtWebKit::getInstance()->setBackgroundColor( mBrowserWindowId, 0x00, 0x00, 0x00 );
+
+ // go to the "home page"
+ // Don't do this here -- it causes the dreaded "white flash" when loading a browser instance.
+// LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, "about:blank" );
+
+ // set flag so we don't do this again
+ mBrowserInitialized = true;
+
+ return true;
+ };
+
+ return false;
+ };
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ void onCursorChanged(const EventType& event)
+ {
+ LLQtWebKit::ECursor llqt_cursor = (LLQtWebKit::ECursor)event.getIntValue();
+ std::string name;
+
+ switch(llqt_cursor)
+ {
+ case LLQtWebKit::C_ARROW:
+ name = "arrow";
+ break;
+ case LLQtWebKit::C_IBEAM:
+ name = "ibeam";
+ break;
+ case LLQtWebKit::C_SPLITV:
+ name = "splitv";
+ break;
+ case LLQtWebKit::C_SPLITH:
+ name = "splith";
+ break;
+ case LLQtWebKit::C_POINTINGHAND:
+ name = "hand";
+ break;
+
+ default:
+ llwarns << "Unknown cursor ID: " << (int)llqt_cursor << llendl;
+ break;
+ }
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "cursor_changed");
+ message.setValue("name", name);
+ sendMessage(message);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ void onPageChanged( const EventType& event )
+ {
+ // flag that an update is required
+ mNeedsUpdate = true;
+ };
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ void onNavigateBegin(const EventType& event)
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_begin");
+ message.setValue("uri", event.getEventUri());
+ sendMessage(message);
+
+ setStatus(STATUS_LOADING);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ void onNavigateComplete(const EventType& event)
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_complete");
+ message.setValue("uri", event.getEventUri());
+ message.setValueS32("result_code", event.getIntValue());
+ message.setValue("result_string", event.getStringValue());
+ message.setValueBoolean("history_back_available", LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_BACK));
+ message.setValueBoolean("history_forward_available", LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_FORWARD));
+ sendMessage(message);
+
+ setStatus(STATUS_LOADED);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ void onUpdateProgress(const EventType& event)
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "progress");
+ message.setValueS32("percent", event.getIntValue());
+ sendMessage(message);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ void onStatusTextChange(const EventType& event)
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "status_text");
+ message.setValue("status", event.getStringValue());
+ sendMessage(message);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ void onTitleChange(const EventType& event)
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text");
+ message.setValue("name", event.getStringValue());
+ sendMessage(message);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ void onLocationChange(const EventType& event)
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "location_changed");
+ message.setValue("uri", event.getEventUri());
+ sendMessage(message);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ void onClickLinkHref(const EventType& event)
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "click_href");
+ message.setValue("uri", event.getStringValue());
+ message.setValue("target", event.getStringValue2());
+ sendMessage(message);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ void onClickLinkNoFollow(const EventType& event)
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "click_nofollow");
+ message.setValue("uri", event.getStringValue());
+ sendMessage(message);
+ }
+
+ LLQtWebKit::EKeyboardModifier decodeModifiers(std::string &modifiers)
+ {
+ int result = 0;
+
+ if(modifiers.find("shift") != std::string::npos)
+ result |= LLQtWebKit::KM_MODIFIER_SHIFT;
+
+ if(modifiers.find("alt") != std::string::npos)
+ result |= LLQtWebKit::KM_MODIFIER_ALT;
+
+ if(modifiers.find("control") != std::string::npos)
+ result |= LLQtWebKit::KM_MODIFIER_CONTROL;
+
+ if(modifiers.find("meta") != std::string::npos)
+ result |= LLQtWebKit::KM_MODIFIER_META;
+
+ return (LLQtWebKit::EKeyboardModifier)result;
+ }
+
+
+ ////////////////////////////////////////////////////////////////////////////////
+ //
+ void keyEvent(LLQtWebKit::EKeyEvent key_event, int key, LLQtWebKit::EKeyboardModifier modifiers)
+ {
+ int llqt_key;
+
+ // The incoming values for 'key' will be the ones from indra_constants.h
+ // the outgoing values are the ones from llqtwebkit.h
+
+ switch((KEY)key)
+ {
+ // This is the list that the llqtwebkit implementation actually maps into Qt keys.
+// case KEY_XXX: llqt_key = LL_DOM_VK_CANCEL; break;
+// case KEY_XXX: llqt_key = LL_DOM_VK_HELP; break;
+ case KEY_BACKSPACE: llqt_key = LL_DOM_VK_BACK_SPACE; break;
+ case KEY_TAB: llqt_key = LL_DOM_VK_TAB; break;
+// case KEY_XXX: llqt_key = LL_DOM_VK_CLEAR; break;
+ case KEY_RETURN: llqt_key = LL_DOM_VK_RETURN; break;
+ case KEY_PAD_RETURN: llqt_key = LL_DOM_VK_ENTER; break;
+ case KEY_SHIFT: llqt_key = LL_DOM_VK_SHIFT; break;
+ case KEY_CONTROL: llqt_key = LL_DOM_VK_CONTROL; break;
+ case KEY_ALT: llqt_key = LL_DOM_VK_ALT; break;
+// case KEY_XXX: llqt_key = LL_DOM_VK_PAUSE; break;
+ case KEY_CAPSLOCK: llqt_key = LL_DOM_VK_CAPS_LOCK; break;
+ case KEY_ESCAPE: llqt_key = LL_DOM_VK_ESCAPE; break;
+ case KEY_PAGE_UP: llqt_key = LL_DOM_VK_PAGE_UP; break;
+ case KEY_PAGE_DOWN: llqt_key = LL_DOM_VK_PAGE_DOWN; break;
+ case KEY_END: llqt_key = LL_DOM_VK_END; break;
+ case KEY_HOME: llqt_key = LL_DOM_VK_HOME; break;
+ case KEY_LEFT: llqt_key = LL_DOM_VK_LEFT; break;
+ case KEY_UP: llqt_key = LL_DOM_VK_UP; break;
+ case KEY_RIGHT: llqt_key = LL_DOM_VK_RIGHT; break;
+ case KEY_DOWN: llqt_key = LL_DOM_VK_DOWN; break;
+// case KEY_XXX: llqt_key = LL_DOM_VK_PRINTSCREEN; break;
+ case KEY_INSERT: llqt_key = LL_DOM_VK_INSERT; break;
+ case KEY_DELETE: llqt_key = LL_DOM_VK_DELETE; break;
+// case KEY_XXX: llqt_key = LL_DOM_VK_CONTEXT_MENU; break;
+
+ default:
+ if(key < KEY_SPECIAL)
+ {
+ // Pass the incoming key through -- it should be regular ASCII, which should be correct for webkit.
+ llqt_key = key;
+ }
+ else
+ {
+ // Don't pass through untranslated special keys -- they'll be all wrong.
+ llqt_key = 0;
+ }
+ break;
+ }
+
+// std::cerr << "keypress, original code = 0x" << std::hex << key << ", converted code = 0x" << std::hex << llqt_key << std::dec << std::endl;
+
+ if(llqt_key != 0)
+ {
+ LLQtWebKit::getInstance()->keyEvent( mBrowserWindowId, key_event, llqt_key, modifiers);
+ }
+
+ checkEditState();
+ };
+
+ ////////////////////////////////////////////////////////////////////////////////
+ //
+ void unicodeInput( const std::string &utf8str, LLQtWebKit::EKeyboardModifier modifiers)
+ {
+ LLWString wstr = utf8str_to_wstring(utf8str);
+
+ unsigned int i;
+ for(i=0; i < wstr.size(); i++)
+ {
+// std::cerr << "unicode input, code = 0x" << std::hex << (unsigned long)(wstr[i]) << std::dec << std::endl;
+
+ LLQtWebKit::getInstance()->unicodeInput(mBrowserWindowId, wstr[i], modifiers);
+ }
+
+ checkEditState();
+ };
+
+ void checkEditState(void)
+ {
+ bool can_cut = LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_EDIT_CUT);
+ bool can_copy = LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_EDIT_COPY);
+ bool can_paste = LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_EDIT_PASTE);
+
+ if((can_cut != mCanCut) || (can_copy != mCanCopy) || (can_paste != mCanPaste))
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_state");
+
+ if(can_cut != mCanCut)
+ {
+ mCanCut = can_cut;
+ message.setValueBoolean("cut", can_cut);
+ }
+
+ if(can_copy != mCanCopy)
+ {
+ mCanCopy = can_copy;
+ message.setValueBoolean("copy", can_copy);
+ }
+
+ if(can_paste != mCanPaste)
+ {
+ mCanPaste = can_paste;
+ message.setValueBoolean("paste", can_paste);
+ }
+
+ sendMessage(message);
+
+ }
+ }
+
+};
+
+MediaPluginWebKit::MediaPluginWebKit(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data) :
+ MediaPluginBase(host_send_func, host_user_data)
+{
+// std::cerr << "MediaPluginWebKit constructor" << std::endl;
+
+ mBrowserWindowId = 0;
+ mBrowserInitialized = false;
+ mNeedsUpdate = true;
+ mCanCut = false;
+ mCanCopy = false;
+ mCanPaste = false;
+ mLastMouseX = 0;
+ mLastMouseY = 0;
+}
+
+MediaPluginWebKit::~MediaPluginWebKit()
+{
+ // unhook observer
+ LLQtWebKit::getInstance()->remObserver( mBrowserWindowId, this );
+
+ // clean up
+ LLQtWebKit::getInstance()->reset();
+
+// std::cerr << "MediaPluginWebKit destructor" << std::endl;
+}
+
+void MediaPluginWebKit::receiveMessage(const char *message_string)
+{
+// std::cerr << "MediaPluginWebKit::receiveMessage: received message: \"" << message_string << "\"" << std::endl;
+ LLPluginMessage message_in;
+
+ if(message_in.parse(message_string) >= 0)
+ {
+ std::string message_class = message_in.getClass();
+ std::string message_name = message_in.getName();
+ if(message_class == LLPLUGIN_MESSAGE_CLASS_BASE)
+ {
+ if(message_name == "init")
+ {
+ LLPluginMessage message("base", "init_response");
+ LLSD versions = LLSD::emptyMap();
+ versions[LLPLUGIN_MESSAGE_CLASS_BASE] = LLPLUGIN_MESSAGE_CLASS_BASE_VERSION;
+ versions[LLPLUGIN_MESSAGE_CLASS_MEDIA] = LLPLUGIN_MESSAGE_CLASS_MEDIA_VERSION;
+ versions[LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER] = LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER_VERSION;
+ message.setValueLLSD("versions", versions);
+
+ std::string plugin_version = "Webkit media plugin, Webkit version ";
+ plugin_version += LLQtWebKit::getInstance()->getVersion();
+ message.setValue("plugin_version", plugin_version);
+ sendMessage(message);
+
+ // Plugin gets to decide the texture parameters to use.
+ mDepth = 4;
+
+ message.setMessage(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
+ message.setValueS32("default_width", 1024);
+ message.setValueS32("default_height", 1024);
+ message.setValueS32("depth", mDepth);
+ message.setValueU32("internalformat", GL_RGBA);
+ message.setValueU32("format", GL_RGBA);
+ message.setValueU32("type", GL_UNSIGNED_BYTE);
+ message.setValueBoolean("coords_opengl", true);
+ sendMessage(message);
+ }
+ else if(message_name == "idle")
+ {
+ // no response is necessary here.
+ F64 time = message_in.getValueReal("time");
+
+ // Convert time to milliseconds for update()
+ update((int)(time * 1000.0f));
+ }
+ else if(message_name == "cleanup")
+ {
+ // TODO: clean up here
+ }
+ else if(message_name == "shm_added")
+ {
+ SharedSegmentInfo info;
+ info.mAddress = message_in.getValuePointer("address");
+ info.mSize = (size_t)message_in.getValueS32("size");
+ std::string name = message_in.getValue("name");
+
+
+// std::cerr << "MediaPluginWebKit::receiveMessage: shared memory added, name: " << name
+// << ", size: " << info.mSize
+// << ", address: " << info.mAddress
+// << std::endl;
+
+ mSharedSegments.insert(SharedSegmentMap::value_type(name, info));
+
+ }
+ else if(message_name == "shm_remove")
+ {
+ std::string name = message_in.getValue("name");
+
+// std::cerr << "MediaPluginWebKit::receiveMessage: shared memory remove, name = " << name << std::endl;
+
+ SharedSegmentMap::iterator iter = mSharedSegments.find(name);
+ if(iter != mSharedSegments.end())
+ {
+ if(mPixels == iter->second.mAddress)
+ {
+ // This is the currently active pixel buffer. Make sure we stop drawing to it.
+ mPixels = NULL;
+ mTextureSegmentName.clear();
+ }
+ mSharedSegments.erase(iter);
+ }
+ else
+ {
+// std::cerr << "MediaPluginWebKit::receiveMessage: unknown shared memory region!" << std::endl;
+ }
+
+ // Send the response so it can be cleaned up.
+ LLPluginMessage message("base", "shm_remove_response");
+ message.setValue("name", name);
+ sendMessage(message);
+ }
+ else
+ {
+// std::cerr << "MediaPluginWebKit::receiveMessage: unknown base message: " << message_name << std::endl;
+ }
+ }
+ else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
+ {
+ if(message_name == "size_change")
+ {
+ std::string name = message_in.getValue("name");
+ S32 width = message_in.getValueS32("width");
+ S32 height = message_in.getValueS32("height");
+ S32 texture_width = message_in.getValueS32("texture_width");
+ S32 texture_height = message_in.getValueS32("texture_height");
+
+ if(!name.empty())
+ {
+ // Find the shared memory region with this name
+ SharedSegmentMap::iterator iter = mSharedSegments.find(name);
+ if(iter != mSharedSegments.end())
+ {
+ mPixels = (unsigned char*)iter->second.mAddress;
+ mWidth = width;
+ mHeight = height;
+
+ // initialize (only gets called once)
+ initBrowser();
+
+ // size changed so tell the browser
+ LLQtWebKit::getInstance()->setSize( mBrowserWindowId, mWidth, mHeight );
+
+// std::cerr << "webkit plugin: set size to " << mWidth << " x " << mHeight
+// << ", rowspan is " << LLQtWebKit::getInstance()->getBrowserRowSpan(mBrowserWindowId) << std::endl;
+
+ S32 real_width = LLQtWebKit::getInstance()->getBrowserRowSpan(mBrowserWindowId) / LLQtWebKit::getInstance()->getBrowserDepth(mBrowserWindowId);
+
+ // The actual width the browser will be drawing to is probably smaller... let the host know by modifying texture_width in the response.
+ if(real_width <= texture_width)
+ {
+ texture_width = real_width;
+ }
+ else
+ {
+ // This won't work -- it'll be bigger than the allocated memory. This is a fatal error.
+// std::cerr << "Fatal error: browser rowbytes greater than texture width" << std::endl;
+ mDeleteMe = true;
+ return;
+ }
+
+ mTextureWidth = texture_width;
+ mTextureHeight = texture_height;
+
+ };
+ };
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_response");
+ message.setValue("name", name);
+ message.setValueS32("width", width);
+ message.setValueS32("height", height);
+ message.setValueS32("texture_width", texture_width);
+ message.setValueS32("texture_height", texture_height);
+ sendMessage(message);
+
+ }
+ else if(message_name == "load_uri")
+ {
+ std::string uri = message_in.getValue("uri");
+
+// std::cout << "loading URI: " << uri << std::endl;
+
+ if(!uri.empty())
+ {
+ LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, uri );
+ }
+ }
+ else if(message_name == "mouse_event")
+ {
+ std::string event = message_in.getValue("event");
+ S32 button = message_in.getValueS32("button");
+ mLastMouseX = message_in.getValueS32("x");
+ mLastMouseY = message_in.getValueS32("y");
+ std::string modifiers = message_in.getValue("modifiers");
+
+ // Treat unknown mouse events as mouse-moves.
+ LLQtWebKit::EMouseEvent mouse_event = LLQtWebKit::ME_MOUSE_MOVE;
+ if(event == "down")
+ {
+ mouse_event = LLQtWebKit::ME_MOUSE_DOWN;
+ }
+ else if(event == "up")
+ {
+ mouse_event = LLQtWebKit::ME_MOUSE_UP;
+ }
+ else if(event == "double_click")
+ {
+ mouse_event = LLQtWebKit::ME_MOUSE_DOUBLE_CLICK;
+ }
+
+ LLQtWebKit::getInstance()->mouseEvent( mBrowserWindowId, mouse_event, button, mLastMouseX, mLastMouseY, decodeModifiers(modifiers));
+ checkEditState();
+ }
+ else if(message_name == "scroll_event")
+ {
+ S32 x = message_in.getValueS32("x");
+ S32 y = message_in.getValueS32("y");
+ std::string modifiers = message_in.getValue("modifiers");
+
+ // Incoming scroll events are adjusted so that 1 detent is approximately 1 unit.
+ // Qt expects 1 detent to be 120 units.
+ // It also seems that our y scroll direction is inverted vs. what Qt expects.
+
+ x *= 120;
+ y *= -120;
+
+ LLQtWebKit::getInstance()->scrollWheelEvent(mBrowserWindowId, mLastMouseX, mLastMouseY, x, y, decodeModifiers(modifiers));
+ }
+ else if(message_name == "key_event")
+ {
+ std::string event = message_in.getValue("event");
+ S32 key = message_in.getValueS32("key");
+ std::string modifiers = message_in.getValue("modifiers");
+
+ // Treat unknown events as key-up for safety.
+ LLQtWebKit::EKeyEvent key_event = LLQtWebKit::KE_KEY_UP;
+ if(event == "down")
+ {
+ key_event = LLQtWebKit::KE_KEY_DOWN;
+ }
+ else if(event == "repeat")
+ {
+ key_event = LLQtWebKit::KE_KEY_REPEAT;
+ }
+
+ keyEvent(key_event, key, decodeModifiers(modifiers));
+ }
+ else if(message_name == "text_event")
+ {
+ std::string text = message_in.getValue("text");
+ std::string modifiers = message_in.getValue("modifiers");
+
+ unicodeInput(text, decodeModifiers(modifiers));
+ }
+ if(message_name == "edit_cut")
+ {
+ LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_EDIT_CUT );
+ checkEditState();
+ }
+ if(message_name == "edit_copy")
+ {
+ LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_EDIT_COPY );
+ checkEditState();
+ }
+ if(message_name == "edit_paste")
+ {
+ LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_EDIT_PASTE );
+ checkEditState();
+ }
+ else
+ {
+// std::cerr << "MediaPluginWebKit::receiveMessage: unknown media message: " << message_string << std::endl;
+ };
+ }
+ else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER)
+ {
+ if(message_name == "focus")
+ {
+ bool val = message_in.getValueBoolean("focused");
+ LLQtWebKit::getInstance()->focusBrowser( mBrowserWindowId, val );
+ }
+ else if(message_name == "clear_cache")
+ {
+ LLQtWebKit::getInstance()->clearCache();
+ }
+ else if(message_name == "clear_cookies")
+ {
+ LLQtWebKit::getInstance()->clearAllCookies();
+ }
+ else if(message_name == "enable_cookies")
+ {
+ bool val = message_in.getValueBoolean("enable");
+ LLQtWebKit::getInstance()->enableCookies( val );
+ }
+ else if(message_name == "proxy_setup")
+ {
+ bool val = message_in.getValueBoolean("enable");
+ std::string host = message_in.getValue("host");
+ int port = message_in.getValueS32("port");
+ LLQtWebKit::getInstance()->enableProxy( val, host, port );
+ }
+ else if(message_name == "browse_stop")
+ {
+ LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_STOP );
+ }
+ else if(message_name == "browse_reload")
+ {
+ // foo = message_in.getValueBoolean("ignore_cache");
+ LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_RELOAD );
+ }
+ else if(message_name == "browse_forward")
+ {
+ LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_FORWARD );
+ }
+ else if(message_name == "browse_back")
+ {
+ LLQtWebKit::getInstance()->userAction( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_BACK );
+ }
+ else if(message_name == "set_status_redirect")
+ {
+ int code = message_in.getValueS32("code");
+ std::string url = message_in.getValue("url");
+ if ( 404 == code ) // browser lib only supports 404 right now
+ {
+ LLQtWebKit::getInstance()->set404RedirectUrl( mBrowserWindowId, url );
+ };
+ }
+ else if(message_name == "set_user_agent")
+ {
+ std::string user_agent = message_in.getValue("user_agent");
+ LLQtWebKit::getInstance()->setBrowserAgentId( user_agent );
+ }
+ else if(message_name == "init_history")
+ {
+ // Initialize browser history
+ LLSD history = message_in.getValueLLSD("history");
+ // First, clear the URL history
+ LLQtWebKit::getInstance()->clearHistory(mBrowserWindowId);
+ // Then, add the history items in order
+ LLSD::array_iterator iter_history = history.beginArray();
+ LLSD::array_iterator end_history = history.endArray();
+ for(; iter_history != end_history; ++iter_history)
+ {
+ std::string url = (*iter_history).asString();
+ if(! url.empty()) {
+ LLQtWebKit::getInstance()->prependHistoryUrl(mBrowserWindowId, url);
+ }
+ }
+ }
+ else
+ {
+// std::cerr << "MediaPluginWebKit::receiveMessage: unknown media_browser message: " << message_string << std::endl;
+ };
+ }
+ else
+ {
+// std::cerr << "MediaPluginWebKit::receiveMessage: unknown message class: " << message_class << std::endl;
+ };
+ }
+}
+
+int init_media_plugin(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data, LLPluginInstance::sendMessageFunction *plugin_send_func, void **plugin_user_data)
+{
+ MediaPluginWebKit *self = new MediaPluginWebKit(host_send_func, host_user_data);
+ *plugin_send_func = MediaPluginWebKit::staticReceiveMessage;
+ *plugin_user_data = (void*)self;
+
+ return 0;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl
index 8bd702a8da..28908a311d 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl
@@ -46,11 +46,15 @@ void main()
dlt /= max(-pos.z*dist_factor, 1.0);
- vec2 defined_weight = kern[0].xy; // special case the first (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free'
+ vec2 defined_weight = kern[0].xy; // special case the kern[0] (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free'
vec4 col = defined_weight.xyxx * ccol;
+
+ float center_e = 1.0 - (texture2DRect(edgeMap, vary_fragcoord.xy).a+
+ texture2DRect(edgeMap, vary_fragcoord.xy+dlt*0.333).a+
+ texture2DRect(edgeMap, vary_fragcoord.xy-dlt*0.333).a);
- float e = 1.0;
- for (int i = 0; i < 4; i++)
+ float e = center_e;
+ for (int i = 1; i < 4; i++)
{
vec2 tc = vary_fragcoord.xy + kern[i].z*dlt;
@@ -67,10 +71,8 @@ void main()
texture2DRect(edgeMap, tc.xy-dlt*0.333).a;
}
-
- e = 1.0;
-
- for (int i = 0; i < 4; i++)
+ e = center_e;
+ for (int i = 1; i < 4; i++)
{
vec2 tc = vary_fragcoord.xy - kern[i].z*dlt;
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index b976e6b2bd..b9a0b4293d 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -649,6 +649,7 @@ void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearab
else
{
wearable_vec[index] = wearable;
+ mAvatarObject->wearableUpdated(wearable->getType());
}
}
@@ -663,6 +664,7 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl
if (type < WT_COUNT || mWearableDatas[type].size() < MAX_WEARABLES_PER_TYPE)
{
mWearableDatas[type].push_back(wearable);
+ mAvatarObject->wearableUpdated(wearable->getType());
return mWearableDatas[type].size()-1;
}
return MAX_WEARABLES_PER_TYPE;
@@ -687,9 +689,11 @@ void LLAgentWearables::popWearable(LLWearable *wearable)
void LLAgentWearables::popWearable(const EWearableType type, U32 index)
{
- if (getWearable(type, index))
+ LLWearable *wearable = getWearable(type, index);
+ if (wearable)
{
mWearableDatas[type].erase(mWearableDatas[type].begin() + index);
+ mAvatarObject->wearableUpdated(wearable->getType());
}
}
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 8e1bef88c3..667cb94552 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -114,6 +114,7 @@ public:
void setWearableName(const LLUUID& item_id, const std::string& new_name);
void addLocalTextureObject(const EWearableType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index);
U32 getWearableIndex(LLWearable *wearable);
+
protected:
void setWearableFinal(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append = false);
static bool onSetWearableDialog(const LLSD& notification, const LLSD& response, LLWearable* wearable);
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index 7ae1b5cd4a..ebcda13dd4 100644
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -152,6 +152,8 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)
: LLIconCtrl(p),
mDrawTooltip(p.draw_tooltip)
{
+ mPriority = LLViewerFetchedTexture::BOOST_ICON;
+
LLRect rect = p.rect;
static LLUICachedControl<S32> llavatariconctrl_symbol_hpad("UIAvatariconctrlSymbolHPad", 2);
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index ebf46a6e3f..94058365be 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -101,12 +101,12 @@ void LLChatHistory::appendWidgetMessage(const LLUUID& avatar_id, std::string& fr
if (mLastFromName == from)
{
view = getSeparator();
- view_text = " ";
+ view_text = "\n";
}
else
{
view = getHeader(avatar_id, from, time);
- view_text = "\n" + from + MESSAGE_USERNAME_DATE_SEPARATOR + time;
+ view_text = from + MESSAGE_USERNAME_DATE_SEPARATOR + time + '\n';
}
//Prepare the rect for the view
LLRect target_rect = getDocumentView()->getRect();
@@ -118,7 +118,8 @@ void LLChatHistory::appendWidgetMessage(const LLUUID& avatar_id, std::string& fr
appendWidget(view, view_text, FALSE, TRUE, mLeftWidgetPad, 0);
//Append the text message
- appendText(message, TRUE, style_params);
+ message += '\n';
+ appendText(message, FALSE, style_params);
mLastFromName = from;
blockUndo();
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 488d71aa70..bdf9842b01 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1054,9 +1054,9 @@ BOOL LLPanelLandObjects::postBuild()
mBtnReturnOwnerList = getChild<LLButton>("Return objects...");
mBtnReturnOwnerList->setClickedCallback(onClickReturnOwnerList, this);
- mIconAvatarOnline = LLUIImageList::getInstance()->getUIImage("icon_avatar_online.tga");
- mIconAvatarOffline = LLUIImageList::getInstance()->getUIImage("icon_avatar_offline.tga");
- mIconGroup = LLUIImageList::getInstance()->getUIImage("icon_group.tga");
+ mIconAvatarOnline = LLUIImageList::getInstance()->getUIImage("icon_avatar_online.tga", 0);
+ mIconAvatarOffline = LLUIImageList::getInstance()->getUIImage("icon_avatar_offline.tga", 0);
+ mIconGroup = LLUIImageList::getInstance()->getUIImage("icon_group.tga", 0);
mOwnerList = getChild<LLNameListCtrl>("owner list");
mOwnerList->sortByColumnIndex(3, FALSE);
diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp
index 2e8084759a..83e694951b 100644
--- a/indra/newview/lllandmarklist.cpp
+++ b/indra/newview/lllandmarklist.cpp
@@ -37,6 +37,7 @@
#include "message.h"
#include "llassetstorage.h"
+#include "llappviewer.h"
#include "llagent.h"
#include "llnotify.h"
#include "llvfile.h"
@@ -63,20 +64,32 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t
}
else
{
- if ( gLandmarkList.mBadList.find(asset_uuid) == gLandmarkList.mBadList.end() )
+ if ( mBadList.find(asset_uuid) != mBadList.end() )
{
- if (cb)
+ return NULL;
+ }
+
+ landmark_requested_list_t::iterator iter = mRequestedList.find(asset_uuid);
+ if (iter != mRequestedList.end())
+ {
+ const F32 rerequest_time = 30.f; // 30 seconds between requests
+ if (gFrameTimeSeconds - iter->second < rerequest_time)
{
- loaded_callback_map_t::value_type vt(asset_uuid, cb);
- mLoadedCallbackMap.insert(vt);
+ return NULL;
}
-
- gAssetStorage->getAssetData(
- asset_uuid,
- LLAssetType::AT_LANDMARK,
- LLLandmarkList::processGetAssetReply,
- NULL);
}
+
+ if (cb)
+ {
+ loaded_callback_map_t::value_type vt(asset_uuid, cb);
+ mLoadedCallbackMap.insert(vt);
+ }
+
+ gAssetStorage->getAssetData(asset_uuid,
+ LLAssetType::AT_LANDMARK,
+ LLLandmarkList::processGetAssetReply,
+ NULL);
+ mRequestedList[asset_uuid] = gFrameTimeSeconds;
}
return NULL;
}
@@ -103,7 +116,8 @@ void LLLandmarkList::processGetAssetReply(
if (landmark)
{
gLandmarkList.mList[ uuid ] = landmark;
-
+ gLandmarkList.mRequestedList.erase(uuid);
+
LLVector3d pos;
if(!landmark->getGlobalPos(pos))
{
diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h
index ebf1b65e97..d9c3267142 100644
--- a/indra/newview/lllandmarklist.h
+++ b/indra/newview/lllandmarklist.h
@@ -74,7 +74,10 @@ protected:
typedef std::set<LLUUID> landmark_bad_list_t;
landmark_bad_list_t mBadList;
-
+
+ typedef std::map<LLUUID,F32> landmark_requested_list_t;
+ landmark_requested_list_t mRequestedList;
+
// *TODO: make the callback multimap a template class and make use of it
// here and in LLLandmark.
typedef std::multimap<LLUUID, loaded_callback_t> loaded_callback_map_t;
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 15efd0100a..8f29f908e5 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -51,6 +51,7 @@
#include "llpluginclassmedia.h"
#include "llslurl.h"
#include "lluictrlfactory.h" // LLDefaultChildRegistry
+#include "llkeyboard.h"
// linden library includes
#include "llfocusmgr.h"
@@ -193,7 +194,7 @@ BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask )
if (mMediaSource)
{
- mMediaSource->mouseMove(x, y);
+ mMediaSource->mouseMove(x, y, mask);
gViewerWindow->setCursor(mMediaSource->getLastSetCursor());
}
@@ -205,7 +206,7 @@ BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask )
BOOL LLMediaCtrl::handleScrollWheel( S32 x, S32 y, S32 clicks )
{
if (mMediaSource && mMediaSource->hasMedia())
- mMediaSource->getMediaPlugin()->scrollEvent(0, clicks, MASK_NONE);
+ mMediaSource->getMediaPlugin()->scrollEvent(0, clicks, gKeyboard->currentMask(TRUE));
return TRUE;
}
@@ -218,7 +219,7 @@ BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask )
if (mMediaSource)
{
- mMediaSource->mouseUp(x, y);
+ mMediaSource->mouseUp(x, y, mask);
// *HACK: LLMediaImplLLMozLib automatically takes focus on mouseup,
// in addition to the onFocusReceived() call below. Undo this. JC
@@ -241,7 +242,50 @@ BOOL LLMediaCtrl::handleMouseDown( S32 x, S32 y, MASK mask )
convertInputCoords(x, y);
if (mMediaSource)
- mMediaSource->mouseDown(x, y);
+ mMediaSource->mouseDown(x, y, mask);
+
+ gFocusMgr.setMouseCapture( this );
+
+ if (mTakeFocusOnClick)
+ {
+ setFocus( TRUE );
+ }
+
+ return TRUE;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+BOOL LLMediaCtrl::handleRightMouseUp( S32 x, S32 y, MASK mask )
+{
+ convertInputCoords(x, y);
+
+ if (mMediaSource)
+ {
+ mMediaSource->mouseUp(x, y, mask, 1);
+
+ // *HACK: LLMediaImplLLMozLib automatically takes focus on mouseup,
+ // in addition to the onFocusReceived() call below. Undo this. JC
+ if (!mTakeFocusOnClick)
+ {
+ mMediaSource->focus(false);
+ gViewerWindow->focusClient();
+ }
+ }
+
+ gFocusMgr.setMouseCapture( NULL );
+
+ return TRUE;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
+{
+ convertInputCoords(x, y);
+
+ if (mMediaSource)
+ mMediaSource->mouseDown(x, y, mask, 1);
gFocusMgr.setMouseCapture( this );
@@ -260,7 +304,7 @@ BOOL LLMediaCtrl::handleDoubleClick( S32 x, S32 y, MASK mask )
convertInputCoords(x, y);
if (mMediaSource)
- mMediaSource->mouseLeftDoubleClick( x, y );
+ mMediaSource->mouseDoubleClick( x, y, mask);
gFocusMgr.setMouseCapture( this );
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 5ea03f1e6c..76ddc61ebf 100644
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -86,6 +86,8 @@ public:
virtual BOOL handleHover( S32 x, S32 y, MASK mask );
virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
+ virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index 6ae42d23d3..512104a2f4 100755
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -367,8 +367,9 @@ BOOL LLMediaDataClient::QueueTimer::tick()
// Peel one off of the items from the queue, and execute request
request_ptr_t request = queue.top();
llassert(!request.isNull());
- const LLMediaDataClientObject *object = request->getObject();
+ const LLMediaDataClientObject *object = (request.isNull()) ? NULL : request->getObject();
bool performed_request = false;
+ bool error = false;
llassert(NULL != object);
if (NULL != object && object->hasMedia())
{
@@ -387,7 +388,11 @@ BOOL LLMediaDataClient::QueueTimer::tick()
}
}
else {
- if (NULL == object)
+ if (request.isNull())
+ {
+ LL_WARNS("LLMediaDataClient") << "Not Sending request: NULL request!" << LL_ENDL;
+ }
+ else if (NULL == object)
{
LL_WARNS("LLMediaDataClient") << "Not Sending request for " << *request << " NULL object!" << LL_ENDL;
}
@@ -395,9 +400,10 @@ BOOL LLMediaDataClient::QueueTimer::tick()
{
LL_WARNS("LLMediaDataClient") << "Not Sending request for " << *request << " hasMedia() is false!" << LL_ENDL;
}
+ error = true;
}
bool exceeded_retries = request->getRetryCount() > mMDC->mMaxNumRetries;
- if (performed_request || exceeded_retries) // Try N times before giving up
+ if (performed_request || exceeded_retries || error) // Try N times before giving up
{
if (exceeded_retries)
{
diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp
index f9dde03451..6a3617f008 100644
--- a/indra/newview/llpanelmediasettingsgeneral.cpp
+++ b/indra/newview/llpanelmediasettingsgeneral.cpp
@@ -207,7 +207,7 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable)
self->mHeightPixels ->setEnabled(editable);
self->mHomeURL ->setEnabled(editable);
self->mWidthPixels ->setEnabled(editable);
- self->mPreviewMedia->unloadMediaSource();
+ self->updateMediaPreview();
}
////////////////////////////////////////////////////////////////////////////////
@@ -312,10 +312,10 @@ void LLPanelMediaSettingsGeneral::updateMediaPreview()
mPreviewMedia->navigateTo( mHomeURL->getValue().asString() );
}
else
- // new home URL will be empty if media is deleted but
- // we still need to clean out the preview.
+ // new home URL will be empty if media is deleted so display a
+ // "preview goes here" data url page
{
- mPreviewMedia->unloadMediaSource();
+ mPreviewMedia->navigateTo( "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22100%%22 height=%22100%%22 %3E%3Cdefs%3E%3Cpattern id=%22checker%22 patternUnits=%22userSpaceOnUse%22 x=%220%22 y=%220%22 width=%22128%22 height=%22128%22 viewBox=%220 0 128 128%22 %3E%3Crect x=%220%22 y=%220%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3Crect x=%2264%22 y=%2264%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3C/pattern%3E%3C/defs%3E%3Crect x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22 fill=%22url(#checker)%22 /%3E%3C/svg%3E" );
};
}
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 22c3779050..a11ee05532 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -334,14 +334,19 @@ LLSideTrayTab* LLSideTray::getTab(const std::string& name)
}
-void LLSideTray::toggleTabButton (LLSideTrayTab* tab)
+void LLSideTray::toggleTabButton(LLSideTrayTab* tab)
{
if(tab == NULL)
return;
- string name = tab->getName();
- std::map<std::string,LLButton*>::iterator tIt = mTabButtons.find(name);
- if(tIt!=mTabButtons.end())
- tIt->second->setToggleState(!tIt->second->getToggleState());
+ std::string name = tab->getName();
+ std::map<std::string,LLButton*>::iterator it = mTabButtons.find(name);
+ if(it != mTabButtons.end())
+ {
+ LLButton* btn = it->second;
+ bool new_state = !btn->getToggleState();
+ btn->setToggleState(new_state);
+ btn->setImageOverlay( new_state ? tab->mImageSelected : tab->mImage );
+ }
}
bool LLSideTray::selectTabByIndex(size_t index)
@@ -349,9 +354,7 @@ bool LLSideTray::selectTabByIndex(size_t index)
if(index>=mTabs.size())
return false;
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(mTabs[index]);
- if(sidebar_tab == NULL)
- return false;
+ LLSideTrayTab* sidebar_tab = mTabs[index];
return selectTabByName(sidebar_tab->getName());
}
@@ -380,9 +383,7 @@ bool LLSideTray::selectTabByName (const std::string& name)
child_vector_const_iter_t child_it;
for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
{
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
+ LLSideTrayTab* sidebar_tab = *child_it;
sidebar_tab->setVisible(sidebar_tab == mActiveTab);
}
return true;
@@ -439,9 +440,7 @@ void LLSideTray::createButtons ()
child_vector_const_iter_t child_it = mTabs.begin();
for ( ; child_it != mTabs.end(); ++child_it)
{
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
+ LLSideTrayTab* sidebar_tab = *child_it;
std::string name = sidebar_tab->getName();
@@ -527,9 +526,7 @@ void LLSideTray::arrange ()
int offset = (sidetray_params.default_button_height+sidetray_params.default_button_margin)*2;
for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
{
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
+ LLSideTrayTab* sidebar_tab = *child_it;
ctrl_rect.setLeftTopAndSize(0,getRect().getHeight()-offset
,sidetray_params.default_button_width
@@ -552,10 +549,7 @@ void LLSideTray::arrange ()
//arrange tabs
for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
{
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
-
+ LLSideTrayTab* sidebar_tab = *child_it;
sidebar_tab->setRect(ctrl_rect);
sidebar_tab->arrange(mMaxBarWidth,getRect().getHeight());
}
@@ -564,6 +558,23 @@ void LLSideTray::arrange ()
void LLSideTray::collapseSideBar()
{
mCollapsed = true;
+ // Reset all overlay images, because there is no "selected" tab when the
+ // whole side tray is hidden.
+ child_vector_const_iter_t it = mTabs.begin();
+ for ( ; it != mTabs.end(); ++it )
+ {
+ LLSideTrayTab* tab = *it;
+ std::string name = tab->getName();
+ std::map<std::string,LLButton*>::const_iterator btn_it =
+ mTabButtons.find(name);
+ if (btn_it != mTabButtons.end())
+ {
+ LLButton* btn = btn_it->second;
+ btn->setImageOverlay( tab->mImage );
+ }
+ }
+
+ // Home tab doesn't put its button in mTabButtons
LLSideTrayTab* home_tab = getTab("sidebar_home");
if (home_tab)
{
@@ -643,9 +654,7 @@ void LLSideTray::reshape (S32 width, S32 height, BOOL called_from_parent)
int offset = (sidetray_params.default_button_height+sidetray_params.default_button_margin)*2;
for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
{
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
+ LLSideTrayTab* sidebar_tab = *child_it;
ctrl_rect.setLeftTopAndSize(0,getRect().getHeight()-offset
,sidetray_params.default_button_width
@@ -667,9 +676,7 @@ void LLSideTray::reshape (S32 width, S32 height, BOOL called_from_parent)
for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
{
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
+ LLSideTrayTab* sidebar_tab = *child_it;
sidebar_tab->reshape(mMaxBarWidth,getRect().getHeight());
ctrl_rect.setLeftTopAndSize(sidetray_params.default_button_width,getRect().getHeight(),mMaxBarWidth,getRect().getHeight());
sidebar_tab->setRect(ctrl_rect);
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 845eb86bc1..b49251ec79 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -69,7 +69,7 @@ public:
static bool instanceCreated ();
protected:
LLSideTray(Params& params);
- typedef std::vector<LLView*> child_vector_t;
+ typedef std::vector<LLSideTrayTab*> child_vector_t;
typedef child_vector_t::iterator child_vector_iter_t;
typedef child_vector_t::const_iterator child_vector_const_iter_t;
typedef child_vector_t::reverse_iterator child_vector_reverse_iter_t;
diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp
index ca888899ed..e1643af71d 100644
--- a/indra/newview/lltexlayerparams.cpp
+++ b/indra/newview/lltexlayerparams.cpp
@@ -42,7 +42,8 @@
//-----------------------------------------------------------------------------
LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
mTexLayer(layer),
- mAvatar(NULL)
+ mAvatar(NULL),
+ mIsWearableParam(TRUE)
{
if (mTexLayer != NULL)
{
@@ -55,7 +56,8 @@ LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
}
LLTexLayerParam::LLTexLayerParam(LLVOAvatar *avatar) :
- mTexLayer(NULL)
+ mTexLayer(NULL),
+ mIsWearableParam(FALSE)
{
mAvatar = avatar;
}
@@ -175,16 +177,15 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL set_by_user)
{
mCurWeight = new_weight;
- LLVOAvatar* avatar = mTexLayer->getTexLayerSet()->getAvatar();
- if (avatar->getSex() & getSex())
+ if ((mAvatar->getSex() & getSex()) && !mIsWearableParam) // only trigger a baked texture update if we're changing a wearable's visual param.
{
if (gAgent.cameraCustomizeAvatar())
{
set_by_user = FALSE;
}
- avatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user);
+ mAvatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user);
mTexLayer->invalidateMorphMasks();
- avatar->updateMeshTextures();
+ mAvatar->updateMeshTextures();
}
}
}
@@ -467,14 +468,16 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL set_by_user)
return;
}
- if (mAvatar->getSex() & getSex())
+ if ((mAvatar->getSex() & getSex()) && !mIsWearableParam) // only trigger a baked texture update if we're changing a wearable's visual param.
{
onGlobalColorChanged(set_by_user);
if (mTexLayer)
{
mAvatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user);
+ mAvatar->updateMeshTextures();
}
}
+
// llinfos << "param " << mName << " = " << new_weight << llendl;
}
}
diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h
index 98365864f9..dcb108bbf6 100644
--- a/indra/newview/lltexlayerparams.h
+++ b/indra/newview/lltexlayerparams.h
@@ -49,6 +49,7 @@ public:
protected:
LLTexLayerInterface* mTexLayer;
LLVOAvatar* mAvatar;
+ BOOL mIsWearableParam;
};
//-----------------------------------------------------------------------------
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index b035fd53fd..22ed1ec219 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -48,6 +48,7 @@
#include "lltooltip.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
+#include "llkeyboard.h"
#include "llmediaentry.h"
#include "llmenugl.h"
#include "llmutelist.h"
@@ -1048,7 +1049,7 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick)
}
else
{
- media_impl->mouseDown(pick.mUVCoords);
+ 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.
}
@@ -1098,7 +1099,7 @@ bool LLToolPie::handleMediaHover(const LLPickInfo& pick)
// If this is the focused media face, send mouse move events.
if (LLViewerMediaFocus::getInstance()->isFocusedOnFace(objectp, pick.mObjectFace))
{
- media_impl->mouseMove(pick.mUVCoords);
+ media_impl->mouseMove(pick.mUVCoords, gKeyboard->currentMask(TRUE));
gViewerWindow->setCursor(media_impl->getLastSetCursor());
}
else
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 0b6ac0e2e2..b0f22166a0 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -48,6 +48,7 @@
#include "llevent.h" // LLSimpleListener
#include "llnotifications.h"
#include "lluuid.h"
+#include "llkeyboard.h"
#include <boost/bind.hpp> // for SkinFolder listener
#include <boost/signals2.hpp>
@@ -170,6 +171,7 @@ typedef std::vector<LLViewerMediaImpl*> impl_list;
static impl_list sViewerMediaImplList;
static LLTimer sMediaCreateTimer;
static const F32 LLVIEWERMEDIA_CREATE_DELAY = 1.0f;
+static F32 sGlobalVolume = 1.0f;
//////////////////////////////////////////////////////////////////////////////////////////
static void add_media_impl(LLViewerMediaImpl* media)
@@ -387,16 +389,27 @@ bool LLViewerMedia::textureHasMedia(const LLUUID& texture_id)
// static
void LLViewerMedia::setVolume(F32 volume)
{
- impl_list::iterator iter = sViewerMediaImplList.begin();
- impl_list::iterator end = sViewerMediaImplList.end();
-
- for(; iter != end; iter++)
+ if(volume != sGlobalVolume)
{
- LLViewerMediaImpl* pimpl = *iter;
- pimpl->setVolume(volume);
+ sGlobalVolume = volume;
+ impl_list::iterator iter = sViewerMediaImplList.begin();
+ impl_list::iterator end = sViewerMediaImplList.end();
+
+ for(; iter != end; iter++)
+ {
+ LLViewerMediaImpl* pimpl = *iter;
+ pimpl->updateVolume();
+ }
}
}
+//////////////////////////////////////////////////////////////////////////////////////////
+// static
+F32 LLViewerMedia::getVolume()
+{
+ return sGlobalVolume;
+}
+
// This is the predicate function used to sort sViewerMediaImplList by priority.
static inline bool compare_impl_interest(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2)
{
@@ -591,6 +604,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id,
mDoNavigateOnLoadRediscoverType(false),
mDoNavigateOnLoadServerRequest(false),
mMediaSourceFailedInit(false),
+ mRequestedVolume(1.0f),
mIsUpdated(false)
{
@@ -792,8 +806,12 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
media_source->setLoop(mMediaLoop);
media_source->setAutoScale(mMediaAutoScale);
media_source->setBrowserUserAgent(LLViewerMedia::getCurrentUserAgent());
+ media_source->focus(mHasFocus);
mMediaSource = media_source;
+
+ updateVolume();
+
return true;
}
@@ -884,13 +902,26 @@ void LLViewerMediaImpl::seek(F32 time)
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::setVolume(F32 volume)
{
+ mRequestedVolume = volume;
+ updateVolume();
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+void LLViewerMediaImpl::updateVolume()
+{
if(mMediaSource)
{
- mMediaSource->setVolume(volume);
+ mMediaSource->setVolume(mRequestedVolume * LLViewerMedia::getVolume());
}
}
//////////////////////////////////////////////////////////////////////////////////////////
+F32 LLViewerMediaImpl::getVolume()
+{
+ return mRequestedVolume;
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::focus(bool focus)
{
mHasFocus = focus;
@@ -917,7 +948,7 @@ bool LLViewerMediaImpl::hasFocus() const
}
//////////////////////////////////////////////////////////////////////////////////////////
-void LLViewerMediaImpl::mouseDown(S32 x, S32 y)
+void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button)
{
scaleMouse(&x, &y);
mLastMouseX = x;
@@ -925,12 +956,12 @@ void LLViewerMediaImpl::mouseDown(S32 x, S32 y)
// llinfos << "mouse down (" << x << ", " << y << ")" << llendl;
if (mMediaSource)
{
- mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, x, y, 0);
+ mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, button, x, y, mask);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
-void LLViewerMediaImpl::mouseUp(S32 x, S32 y)
+void LLViewerMediaImpl::mouseUp(S32 x, S32 y, MASK mask, S32 button)
{
scaleMouse(&x, &y);
mLastMouseX = x;
@@ -938,12 +969,12 @@ void LLViewerMediaImpl::mouseUp(S32 x, S32 y)
// llinfos << "mouse up (" << x << ", " << y << ")" << llendl;
if (mMediaSource)
{
- mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, x, y, 0);
+ mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, button, x, y, mask);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
-void LLViewerMediaImpl::mouseMove(S32 x, S32 y)
+void LLViewerMediaImpl::mouseMove(S32 x, S32 y, MASK mask)
{
scaleMouse(&x, &y);
mLastMouseX = x;
@@ -951,50 +982,53 @@ void LLViewerMediaImpl::mouseMove(S32 x, S32 y)
// llinfos << "mouse move (" << x << ", " << y << ")" << llendl;
if (mMediaSource)
{
- mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, x, y, 0);
+ mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, 0, x, y, mask);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
-void LLViewerMediaImpl::mouseDown(const LLVector2& texture_coords)
+void LLViewerMediaImpl::mouseDown(const LLVector2& texture_coords, MASK mask, S32 button)
{
if(mMediaSource)
{
mouseDown(
llround(texture_coords.mV[VX] * mMediaSource->getTextureWidth()),
- llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()));
+ llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()),
+ mask, button);
}
}
-void LLViewerMediaImpl::mouseUp(const LLVector2& texture_coords)
+void LLViewerMediaImpl::mouseUp(const LLVector2& texture_coords, MASK mask, S32 button)
{
if(mMediaSource)
{
mouseUp(
llround(texture_coords.mV[VX] * mMediaSource->getTextureWidth()),
- llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()));
+ llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()),
+ mask, button);
}
}
-void LLViewerMediaImpl::mouseMove(const LLVector2& texture_coords)
+void LLViewerMediaImpl::mouseMove(const LLVector2& texture_coords, MASK mask)
{
if(mMediaSource)
{
mouseMove(
llround(texture_coords.mV[VX] * mMediaSource->getTextureWidth()),
- llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()));
+ llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()),
+ mask);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
-void LLViewerMediaImpl::mouseLeftDoubleClick(S32 x, S32 y)
+void LLViewerMediaImpl::mouseDoubleClick(S32 x, S32 y, MASK mask, S32 button)
{
scaleMouse(&x, &y);
mLastMouseX = x;
mLastMouseY = y;
if (mMediaSource)
{
- mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOUBLE_CLICK, x, y, 0);
+ mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOUBLE_CLICK, button, x, y, mask);
}
}
@@ -1003,7 +1037,7 @@ void LLViewerMediaImpl::onMouseCaptureLost()
{
if (mMediaSource)
{
- mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, mLastMouseX, mLastMouseY, 0);
+ mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, 0, mLastMouseX, mLastMouseY, 0);
}
}
@@ -1240,7 +1274,7 @@ bool LLViewerMediaImpl::handleUnicodeCharHere(llwchar uni_char)
if (uni_char >= 32 // discard 'control' characters
&& uni_char != 127) // SDL thinks this is 'delete' - yuck.
{
- mMediaSource->textInput(wstring_to_utf8str(LLWString(1, uni_char)));
+ mMediaSource->textInput(wstring_to_utf8str(LLWString(1, uni_char)), gKeyboard->currentMask(FALSE));
}
}
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index fc2776ee91..79bf3199d4 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -95,6 +95,7 @@ class LLViewerMedia
static void toggleMusicPlay(void*);
static void toggleMediaPlay(void*);
static void mediaStop(void*);
+ static F32 getVolume();
};
// Implementation functions not exported into header file
@@ -130,16 +131,18 @@ public:
void start();
void seek(F32 time);
void setVolume(F32 volume);
+ void updateVolume();
+ F32 getVolume();
void focus(bool focus);
// True if the impl has user focus.
bool hasFocus() const;
- void mouseDown(S32 x, S32 y);
- void mouseUp(S32 x, S32 y);
- void mouseMove(S32 x, S32 y);
- void mouseDown(const LLVector2& texture_coords);
- void mouseUp(const LLVector2& texture_coords);
- void mouseMove(const LLVector2& texture_coords);
- void mouseLeftDoubleClick(S32 x,S32 y );
+ void mouseDown(S32 x, S32 y, MASK mask, S32 button = 0);
+ void mouseUp(S32 x, S32 y, MASK mask, S32 button = 0);
+ void mouseMove(S32 x, S32 y, MASK mask);
+ void mouseDown(const LLVector2& texture_coords, MASK mask, S32 button = 0);
+ void mouseUp(const LLVector2& texture_coords, MASK mask, S32 button = 0);
+ void mouseMove(const LLVector2& texture_coords, MASK mask);
+ void mouseDoubleClick(S32 x,S32 y, MASK mask, S32 button = 0);
void mouseCapture();
void navigateBack();
@@ -286,6 +289,7 @@ public:
bool mDoNavigateOnLoadRediscoverType;
bool mDoNavigateOnLoadServerRequest;
bool mMediaSourceFailedInit;
+ F32 mRequestedVolume;
private:
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index cad8b5f0ce..ad48ec145b 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -77,7 +77,6 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac
if (media_impl.notNull() && objectp.notNull())
{
bool face_auto_zoom = false;
- media_impl->focus(true);
mFocusedImplID = media_impl->getMediaTextureID();
mFocusedObjectID = objectp->getID();
@@ -101,6 +100,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac
llwarns << "Can't find media entry for focused face" << llendl;
}
+ media_impl->focus(true);
gFocusMgr.setKeyboardFocus(this);
// We must do this before processing the media HUD zoom, or it may zoom to the wrong face.
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 95459a7116..e5c53c91c9 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -191,25 +191,25 @@ LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const U32 wid
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(
const LLUUID &image_id,
BOOL usemipmaps,
- BOOL level_immediate,
+ S32 boost_priority,
S8 texture_type,
LLGLint internal_format,
LLGLenum primary_format,
LLHost request_from_host)
{
- return gTextureList.getImage(image_id, usemipmaps, level_immediate, texture_type, internal_format, primary_format, request_from_host) ;
+ return gTextureList.getImage(image_id, usemipmaps, boost_priority, texture_type, internal_format, primary_format, request_from_host) ;
}
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile(
const std::string& filename,
BOOL usemipmaps,
- BOOL level_immediate,
+ S32 boost_priority,
S8 texture_type,
LLGLint internal_format,
LLGLenum primary_format,
const LLUUID& force_id)
{
- return gTextureList.getImageFromFile(filename, usemipmaps, level_immediate, texture_type, internal_format, primary_format, force_id) ;
+ return gTextureList.getImageFromFile(filename, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id) ;
}
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromHost(const LLUUID& image_id, LLHost host)
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 596bfea670..480e1c1cbc 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -118,10 +118,10 @@ public:
BOOST_SELECTED = 12,
BOOST_HUD = 13,
BOOST_AVATAR_BAKED_SELF = 14,
- BOOST_UI = 15,
- BOOST_PREVIEW = 16,
- BOOST_MAP = 17,
- BOOST_MAP_LAYER = 18,
+ BOOST_ICON = 15,
+ BOOST_UI = 16,
+ BOOST_PREVIEW = 17,
+ BOOST_MAP = 18,
BOOST_AVATAR_SELF = 19, // needed for baking avatar
BOOST_MAX_LEVEL
};
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 4ad4c8e1ea..b5986c70f5 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -111,10 +111,10 @@ void LLViewerTextureList::doPreloadImages()
LL_DEBUGS("ViewerImages") << "Preloading images..." << LL_ENDL;
// Set the "missing asset" image
- LLViewerFetchedTexture::sMissingAssetImagep = LLViewerTextureManager::getFetchedTextureFromFile("missing_asset.tga", MIPMAP_NO, IMMEDIATE_YES);
+ LLViewerFetchedTexture::sMissingAssetImagep = LLViewerTextureManager::getFetchedTextureFromFile("missing_asset.tga", MIPMAP_NO, LLViewerFetchedTexture::BOOST_UI);
// Set the "white" image
- LLViewerFetchedTexture::sWhiteImagep = LLViewerTextureManager::getFetchedTextureFromFile("white.tga", MIPMAP_NO, IMMEDIATE_YES);
+ LLViewerFetchedTexture::sWhiteImagep = LLViewerTextureManager::getFetchedTextureFromFile("white.tga", MIPMAP_NO, LLViewerFetchedTexture::BOOST_UI);
LLUIImageList* image_list = LLUIImageList::getInstance();
@@ -131,31 +131,31 @@ void LLViewerTextureList::doPreloadImages()
// prefetch specific UUIDs
LLViewerTextureManager::getFetchedTexture(IMG_SHOT, TRUE);
LLViewerTextureManager::getFetchedTexture(IMG_SMOKE_POOF, TRUE);
- LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", MIPMAP_YES, IMMEDIATE_YES);
+ LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
if (image)
{
image->setAddressMode(LLTexUnit::TAM_WRAP);
mImagePreloads.insert(image);
}
- image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", MIPMAP_YES, IMMEDIATE_YES);
+ image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
if (image)
{
image->setAddressMode(LLTexUnit::TAM_WRAP);
mImagePreloads.insert(image);
}
- image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", MIPMAP_YES, IMMEDIATE_YES);
+ image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
if (image)
{
image->setAddressMode(LLTexUnit::TAM_WRAP);
mImagePreloads.insert(image);
}
- image = LLViewerTextureManager::getFetchedTexture(DEFAULT_WATER_NORMAL, MIPMAP_YES, IMMEDIATE_YES);
+ image = LLViewerTextureManager::getFetchedTexture(DEFAULT_WATER_NORMAL, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
if (image)
{
image->setAddressMode(LLTexUnit::TAM_WRAP);
mImagePreloads.insert(image);
}
- image = LLViewerTextureManager::getFetchedTextureFromFile("transparent.j2c", MIPMAP_YES, IMMEDIATE_YES, LLViewerTexture::FETCHED_TEXTURE,
+ image = LLViewerTextureManager::getFetchedTextureFromFile("transparent.j2c", MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE,
0,0,LLUUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"));
if (image)
{
@@ -315,7 +315,7 @@ void LLViewerTextureList::restoreGL()
LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& filename,
BOOL usemipmaps,
- BOOL level_immediate,
+ S32 boost_priority,
S8 texture_type,
LLGLint internal_format,
LLGLenum primary_format,
@@ -369,10 +369,14 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
addImage(imagep);
- if (level_immediate)
+ if (boost_priority != 0)
{
- imagep->dontDiscard();
- imagep->setBoostLevel(LLViewerFetchedTexture::BOOST_UI);
+ if (boost_priority == LLViewerFetchedTexture::BOOST_UI ||
+ boost_priority == LLViewerFetchedTexture::BOOST_ICON)
+ {
+ imagep->dontDiscard();
+ }
+ imagep->setBoostLevel(boost_priority);
}
}
@@ -384,7 +388,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
BOOL usemipmaps,
- BOOL level_immediate,
+ S32 boost_priority,
S8 texture_type,
LLGLint internal_format,
LLGLenum primary_format,
@@ -403,7 +407,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
if (imagep.isNull())
{
- imagep = createImage(image_id, usemipmaps, level_immediate, texture_type, internal_format, primary_format, request_from_host) ;
+ imagep = createImage(image_id, usemipmaps, boost_priority, texture_type, internal_format, primary_format, request_from_host) ;
}
imagep->setGLTextureCreated(true);
@@ -414,7 +418,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
//when this function is called, there is no such texture in the gTextureList with image_id.
LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
BOOL usemipmaps,
- BOOL level_immediate,
+ S32 boost_priority,
S8 texture_type,
LLGLint internal_format,
LLGLenum primary_format,
@@ -443,16 +447,20 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
addImage(imagep);
- if (level_immediate)
+ if (boost_priority != 0)
{
- imagep->dontDiscard();
- imagep->setBoostLevel(LLViewerFetchedTexture::BOOST_UI);
+ if (boost_priority == LLViewerFetchedTexture::BOOST_UI ||
+ boost_priority == LLViewerFetchedTexture::BOOST_ICON)
+ {
+ imagep->dontDiscard();
+ }
+ imagep->setBoostLevel(boost_priority);
}
else
{
//by default, the texure can not be removed from memory even if it is not used.
//here turn this off
- //if this texture should be set to NO_DELETE, either pass level_immediate == TRUE here, or call setNoDelete() afterwards.
+ //if this texture should be set to NO_DELETE, call setNoDelete() afterwards.
imagep->forceActive() ;
}
@@ -1286,7 +1294,7 @@ void LLUIImageList::cleanUp()
mUITextureList.clear() ;
}
-LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id)
+LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id, S32 priority)
{
// use id as image name
std::string image_name = image_id.asString();
@@ -1298,10 +1306,12 @@ LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id)
return found_it->second;
}
- return loadUIImageByID(image_id);
+ const BOOL use_mips = FALSE;
+ const LLRect scale_rect = LLRect::null;
+ return loadUIImageByID(image_id, use_mips, scale_rect, priority);
}
-LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name)
+LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priority)
{
// look for existing image
uuid_ui_image_map_t::iterator found_it = mUIImages.find(image_name);
@@ -1310,18 +1320,24 @@ LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name)
return found_it->second;
}
- return loadUIImageByName(image_name, image_name);
+ const BOOL use_mips = FALSE;
+ const LLRect scale_rect = LLRect::null;
+ return loadUIImageByName(image_name, image_name, use_mips, scale_rect, priority);
}
-LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect)
+LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename,
+ BOOL use_mips, const LLRect& scale_rect, S32 boost_priority )
{
- LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, IMMEDIATE_YES);
+ if (boost_priority == 0) boost_priority = LLViewerFetchedTexture::BOOST_UI;
+ LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, boost_priority);
return loadUIImage(imagep, name, use_mips, scale_rect);
}
-LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, BOOL use_mips, const LLRect& scale_rect)
+LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id,
+ BOOL use_mips, const LLRect& scale_rect, S32 boost_priority)
{
- LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, IMMEDIATE_YES);
+ if (boost_priority == 0) boost_priority = LLViewerFetchedTexture::BOOST_UI;
+ LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, boost_priority);
return loadUIImage(imagep, id.asString(), use_mips, scale_rect);
}
@@ -1332,11 +1348,11 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st
imagep->setAddressMode(LLTexUnit::TAM_CLAMP);
//all UI images are non-deletable
- imagep->setNoDelete() ;
+ imagep->setNoDelete();
LLUIImagePtr new_imagep = new LLUIImage(name, imagep);
mUIImages.insert(std::make_pair(name, new_imagep));
- mUITextureList.push_back(imagep) ;
+ mUITextureList.push_back(imagep);
LLUIImageLoadData* datap = new LLUIImageLoadData;
datap->mImageName = name;
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 11d1dd855f..fda57ce981 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -202,8 +202,8 @@ class LLUIImageList : public LLImageProviderInterface, public LLSingleton<LLUIIm
{
public:
// LLImageProviderInterface
- LLUIImagePtr getUIImageByID(const LLUUID& id);
- LLUIImagePtr getUIImage(const std::string& name);
+ /*virtual*/ LLUIImagePtr getUIImageByID(const LLUUID& id, S32 priority);
+ /*virtual*/ LLUIImagePtr getUIImage(const std::string& name, S32 priority);
void cleanUp();
bool initFromFile();
@@ -212,8 +212,10 @@ public:
static void onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
private:
- LLUIImagePtr loadUIImageByName(const std::string& name, const std::string& filename, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null);
- LLUIImagePtr loadUIImageByID(const LLUUID& id, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null);
+ LLUIImagePtr loadUIImageByName(const std::string& name, const std::string& filename,
+ BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, S32 boost_priority = 0);
+ LLUIImagePtr loadUIImageByID(const LLUUID& id,
+ BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, S32 boost_priority = 0);
LLUIImagePtr loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null);
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 2b2ac81487..4760d5a472 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -973,8 +973,7 @@ void LLVOAvatarSelf::wearableUpdated( EWearableType type )
{
if (mBakedTextureDatas[index].mTexLayerSet)
{
- mBakedTextureDatas[index].mTexLayerSet->requestUpdate();
- mBakedTextureDatas[index].mTexLayerSet->requestUpload();
+ invalidateComposite(mBakedTextureDatas[index].mTexLayerSet, TRUE);
}
break;
}
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 3aad5c7378..823db027ee 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -368,7 +368,7 @@ void LLWorldMapView::draw()
continue;
}
- current_image->setBoostLevel(LLViewerTexture::BOOST_MAP_LAYER);
+ current_image->setBoostLevel(LLViewerTexture::BOOST_MAP);
current_image->setKnownDrawSize(llround(pix_width * LLUI::sGLScaleFactor.mV[VX]), llround(pix_height * LLUI::sGLScaleFactor.mV[VY]));
if (!current_image->hasGLTexture())
diff --git a/indra/newview/skins/default/textures/icons/Generic_Object.png b/indra/newview/skins/default/textures/icons/Generic_Object.png
new file mode 100644
index 0000000000..e3a80b2aef
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Generic_Object.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Info_Over.png b/indra/newview/skins/default/textures/icons/Info_Over.png
new file mode 100644
index 0000000000..be1cd0706f
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Info_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Animation.png b/indra/newview/skins/default/textures/icons/Inv_Animation.png
index 8b69434066..ab42c61a92 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Animation.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Animation.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_BodyShape.png b/indra/newview/skins/default/textures/icons/Inv_BodyShape.png
index 9d98bfaa7d..97e874d70d 100644
--- a/indra/newview/skins/default/textures/icons/Inv_BodyShape.png
+++ b/indra/newview/skins/default/textures/icons/Inv_BodyShape.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Clothing.png b/indra/newview/skins/default/textures/icons/Inv_Clothing.png
index 49a54b82e1..e8d246c6fa 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Clothing.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Clothing.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Eye.png b/indra/newview/skins/default/textures/icons/Inv_Eye.png
index 6d0321dde9..e619f56c2b 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Eye.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Eye.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png b/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png
index 30aa6e04ac..342a973d00 100644
--- a/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png
+++ b/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png b/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png
index 792ef446e8..0507c2cbaf 100644
--- a/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png
+++ b/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Gesture.png b/indra/newview/skins/default/textures/icons/Inv_Gesture.png
index c49ae523c8..52695ec19b 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Gesture.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Gesture.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Gloves.png b/indra/newview/skins/default/textures/icons/Inv_Gloves.png
index d81bc961d4..d6a2113aaf 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Gloves.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Gloves.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Hair.png b/indra/newview/skins/default/textures/icons/Inv_Hair.png
index 5e68f1ffea..ae941b0dd5 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Hair.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Hair.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Jacket.png b/indra/newview/skins/default/textures/icons/Inv_Jacket.png
index 0e28f45f19..3859666f7c 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Jacket.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Jacket.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Landmark.png b/indra/newview/skins/default/textures/icons/Inv_Landmark.png
index 6648a23393..f8ce765c50 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Landmark.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Landmark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Notecard.png b/indra/newview/skins/default/textures/icons/Inv_Notecard.png
index 830a71311f..4645ab8e91 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Notecard.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Notecard.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Object.png b/indra/newview/skins/default/textures/icons/Inv_Object.png
index a88d0dc4b3..f883696a82 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Object.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Object.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Pants.png b/indra/newview/skins/default/textures/icons/Inv_Pants.png
index 2527f7f9c3..fe2389f074 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Pants.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Pants.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Script.png b/indra/newview/skins/default/textures/icons/Inv_Script.png
index e9c9b163fd..0fba27a7aa 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Script.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Script.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Shirt.png b/indra/newview/skins/default/textures/icons/Inv_Shirt.png
index 7cc880a124..81c1538dd2 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Shirt.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Shirt.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Shoe.png b/indra/newview/skins/default/textures/icons/Inv_Shoe.png
index 0b148647eb..51e1c7bbb7 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Shoe.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Shoe.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Skin.png b/indra/newview/skins/default/textures/icons/Inv_Skin.png
index 8e20638bba..b7da922046 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Skin.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Skin.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Skirt.png b/indra/newview/skins/default/textures/icons/Inv_Skirt.png
index 40860a3599..246e9a87aa 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Skirt.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Skirt.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Snapshot.png b/indra/newview/skins/default/textures/icons/Inv_Snapshot.png
index 17e710a843..39efd2be1b 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Snapshot.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Snapshot.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Socks.png b/indra/newview/skins/default/textures/icons/Inv_Socks.png
index b8169dcb36..30d7d7c239 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Socks.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Socks.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Sound.png b/indra/newview/skins/default/textures/icons/Inv_Sound.png
index 1a50dd17da..44c271c868 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Sound.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Sound.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Texture.png b/indra/newview/skins/default/textures/icons/Inv_Texture.png
index 2d6d1b54bb..dbc41c5e99 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Texture.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Texture.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Underpants.png b/indra/newview/skins/default/textures/icons/Inv_Underpants.png
index 77f56c574f..b1e7c2a55f 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Underpants.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Underpants.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_Undershirt.png b/indra/newview/skins/default/textures/icons/Inv_Undershirt.png
index 954eab7660..9340dbb975 100644
--- a/indra/newview/skins/default/textures/icons/Inv_Undershirt.png
+++ b/indra/newview/skins/default/textures/icons/Inv_Undershirt.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 01976c9a5c..4d54838225 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -7,7 +7,7 @@
<texture name="Accordion_Off" file_name="containers/Accordion_Off.png" preload="false" />
<texture name="Accordion_Press" file_name="containers/Accordion_Press.png" preload="false" />
-<texture name="Activate_Checkmark" file_name="taskpanel/Activate_Checkmark.png" preload="false" />
+ <texture name="Activate_Checkmark" file_name="taskpanel/Activate_Checkmark.png" preload="false" />
<texture name="AddItem_Disabled" file_name="icons/AddItem_Disabled.png" preload="false" />
<texture name="AddItem_Off" file_name="icons/AddItem_Off.png" preload="false" />
@@ -102,6 +102,7 @@
<texture name="Generic_Group" file_name="icons/Generic_Group.png" preload="false" />
<texture name="Generic_Group_Large" file_name="icons/Generic_Group_Large.png" preload="false" />
+ <texture name="Generic_Object" file_name="icons/Generic_Object.png" preload="false" />
<texture name="Generic_Person" file_name="icons/Generic_Person.png" preload="false" />
<texture name="Generic_Person_Large" file_name="icons/Generic_Person_Large.png" preload="false" />
@@ -123,8 +124,6 @@
<texture name="Icon_Dock_Press" file_name="windows/Icon_Dock_Press.png" preload="true" />
<texture name="Icon_For_Sale" file_name="icons/Icon_For_sale.png" preload="false" />
- <texture name="Banner_ForSale" file_name="Banner_ForSale.png" preload="false" />
- <texture name="Banner_YouAreHere" file_name="Banner_YouAreHere.png" preload="false" />
<texture name="Icon_Gear_Background" file_name="windows/Icon_Gear_Background.png" preload="false" />
<texture name="Icon_Gear_Foreground" file_name="windows/Icon_Gear_Foreground.png" preload="false" />
@@ -151,7 +150,7 @@
<texture name="Inspector_Background" file_name="windows/Inspector_Background.png" preload="false" />
<texture name="Inspector_Hover" file_name="windows/Inspector_Hover.png" preload="false" />
- <texture name="Inv_Acessories" file_name="icons/Inv_Acessories.png" preload="false" />
+ <texture name="Inv_Acessories" file_name="icons/Inv_Accessories.png" preload="false" />
<texture name="Inv_Animation" file_name="icons/Inv_Animation.png" preload="false" />
<texture name="Inv_BodyShape" file_name="icons/Inv_BodyShape.png" preload="false" />
<texture name="Inv_CallingCard" file_name="icons/Inv_CallingCard.png" preload="false" />
@@ -229,6 +228,9 @@
<texture name="NearbyVoice_Lvl3" file_name="bottomtray/NearbyVoice_Lvl3.png" preload="false" />
<texture name="NearbyVoice_On" file_name="bottomtray/NearbyVoice_On.png" preload="false" />
+ <texture name="NoEntryLines" file_name="world/NoEntryLines.png" use_mips="true" preload="false" />
+ <texture name="NoEntryPassLines" file_name="world/NoEntryPassLines.png" use_mips="true" preload="false" />
+
<texture name="Object_Cone" file_name="build/Object_Cone.png" preload="false" />
<texture name="Object_Cube" file_name="build/Object_Cube.png" preload="false" />
<texture name="Object_Cylinder" file_name="build/Object_Cylinder.png" preload="false" />
@@ -256,6 +258,42 @@
<texture name="Overhead_M" file_name="world/Overhead_M.png" preload="false" />
<texture name="Overhead_S" file_name="world/Overhead_S.png" preload="false" />
+ <texture name="parcel_drk_Build" file_name="icons/parcel_drk_Build.png" preload="false" />
+ <texture name="parcel_drk_BuildNo" file_name="icons/parcel_drk_BuildNo.png" preload="false" />
+ <texture name="parcel_drk_Damage" file_name="icons/parcel_drk_Damage.png" preload="false" />
+ <texture name="parcel_drk_DamageNo" file_name="icons/parcel_drk_DamageNo.png" preload="false" />
+ <texture name="parcel_drk_Fly" file_name="icons/parcel_drk_Fly.png" preload="false" />
+ <texture name="parcel_drk_FlyNo" file_name="icons/parcel_drk_FlyNo.png" preload="false" />
+ <texture name="parcel_drk_ForSale" file_name="icons/parcel_drk_ForSale.png" preload="false" />
+ <texture name="parcel_drk_ForSaleNo" file_name="icons/parcel_drk_ForSaleNo.png" preload="false" />
+ <texture name="parcel_drk_M" file_name="icons/parcel_drk_M.png" preload="false" />
+ <texture name="parcel_drk_PG" file_name="icons/parcel_drk_PG.png" preload="false" />
+ <texture name="parcel_drk_Push" file_name="icons/parcel_drk_Push.png" preload="false" />
+ <texture name="parcel_drk_PushNo" file_name="icons/parcel_drk_PushNo.png" preload="false" />
+ <texture name="parcel_drk_R" file_name="icons/parcel_drk_R.png" preload="false" />
+ <texture name="parcel_drk_Scripts" file_name="icons/parcel_drk_Scripts.png" preload="false" />
+ <texture name="parcel_drk_ScriptsNo" file_name="icons/parcel_drk_ScriptsNo.png" preload="false" />
+ <texture name="parcel_drk_Voice" file_name="icons/parcel_drk_Voice.png" preload="false" />
+ <texture name="parcel_drk_VoiceNo" file_name="icons/parcel_drk_VoiceNo.png" preload="false" />
+
+ <texture name="parcel_lght_Build" file_name="icons/parcel_lght_Build.png" preload="false" />
+ <texture name="parcel_lght_BuildNo" file_name="icons/parcel_lght_BuildNo.png" preload="false" />
+ <texture name="parcel_lght_Damage" file_name="icons/parcel_lght_Damage.png" preload="false" />
+ <texture name="parcel_lght_DamageNo" file_name="icons/parcel_lght_DamageNo.png" preload="false" />
+ <texture name="parcel_lght_Fly" file_name="icons/parcel_lght_Fly.png" preload="false" />
+ <texture name="parcel_lght_FlyNo" file_name="icons/parcel_lght_FlyNo.png" preload="false" />
+ <texture name="parcel_lght_ForSale" file_name="icons/parcel_lght_ForSale.png" preload="false" />
+ <texture name="parcel_lght_ForSaleNo" file_name="icons/parcel_lght_ForSaleNo.png" preload="false" />
+ <texture name="parcel_lght_M" file_name="icons/parcel_lght_M.png" preload="false" />
+ <texture name="parcel_lght_PG" file_name="icons/parcel_lght_PG.png" preload="false" />
+ <texture name="parcel_lght_Push" file_name="icons/parcel_lght_Push.png" preload="false" />
+ <texture name="parcel_lght_PushNo" file_name="icons/parcel_lght_PushNo.png" preload="false" />
+ <texture name="parcel_lght_R" file_name="icons/parcel_lght_R.png" preload="false" />
+ <texture name="parcel_lght_Scripts" file_name="icons/parcel_lght_Scripts.png" preload="false" />
+ <texture name="parcel_lght_ScriptsNo" file_name="icons/parcel_lght_ScriptsNo.png" preload="false" />
+ <texture name="parcel_lght_Voice" file_name="icons/parcel_lght_Voice.png" preload="false" />
+ <texture name="parcel_lght_VoiceNo" file_name="icons/parcel_lght_VoiceNo.png" preload="false" />
+
<texture name="Progress_1" file_name="icons/Progress_1.png" preload="false" />
<texture name="Progress_2" file_name="icons/Progress_2.png" preload="false" />
<texture name="Progress_3" file_name="icons/Progress_3.png" preload="false" />
@@ -442,6 +480,9 @@
<!--WARNING OLD ART *do not use*-->
+ <texture name="Banner_ForSale" file_name="Banner_ForSale.png" preload="false" />
+ <texture name="Banner_YouAreHere" file_name="Banner_YouAreHere.png" preload="false" />
+
<texture name="btn_chatbar.tga" scale.left="20" scale.top="24" scale.right="44" scale.bottom="0" />
<texture name="btn_chatbar_selected.tga" scale.left="20" scale.top="24" scale.right="44" scale.bottom="0" />
@@ -559,54 +600,6 @@
<texture name="icon_popular.tga" />
<texture name="icon_top_pick.tga" />
- <texture name="inv_folder_animation.tga" />
- <texture name="inv_folder_bodypart.tga" />
- <texture name="inv_folder_callingcard.tga" />
- <texture name="inv_folder_clothing.tga" />
- <texture name="inv_folder_current_outfit.tga" />
- <texture name="inv_folder_gesture.tga" />
- <texture name="inv_folder_landmark.tga" />
- <texture name="inv_folder_lostandfound.tga" />
- <texture name="inv_folder_my_outfits.tga" />
- <texture name="inv_folder_notecard.tga" />
- <texture name="inv_folder_object.tga" />
- <texture name="inv_folder_outfit.tga" />
- <texture name="inv_folder_plain_closed.tga" />
- <texture name="inv_folder_script.tga" />
- <texture name="inv_folder_snapshot.tga" />
- <texture name="inv_folder_sound.tga" />
- <texture name="inv_folder_texture.tga" />
- <texture name="inv_folder_trash.tga" />
-
- <texture name="inv_item_animation.tga" />
- <texture name="inv_item_skin.tga" />
- <texture name="inv_item_callingcard_offline.tga" />
- <texture name="inv_item_callingcard_online.tga" />
- <texture name="inv_item_eyes.tga" />
- <texture name="inv_item_gesture.tga" />
- <texture name="inv_item_gloves.tga" />
- <texture name="inv_item_hair.tga" />
- <texture name="inv_item_jacket.tga" />
- <texture name="inv_item_landmark.tga" />
- <texture name="inv_item_landmark_visited.tga" />
- <texture name="inv_item_linkitem.tga" />
- <texture name="inv_item_linkfolder.tga" />
- <texture name="inv_item_notecard.tga" />
- <texture name="inv_item_object.tga" />
- <texture name="inv_item_object_multi.tga" />
- <texture name="inv_item_pants.tga" />
- <texture name="inv_item_script.tga" />
- <texture name="inv_item_shape.tga" />
- <texture name="inv_item_shirt.tga" />
- <texture name="inv_item_shoes.tga" />
- <texture name="inv_item_skirt.tga" />
- <texture name="inv_item_snapshot.tga" />
- <texture name="inv_item_socks.tga" />
- <texture name="inv_item_sound.tga" />
- <texture name="inv_item_texture.tga" />
- <texture name="inv_item_underpants.tga" />
- <texture name="inv_item_undershirt.tga" />
-
<texture name="lag_status_critical.tga" />
<texture name="lag_status_good.tga" />
<texture name="lag_status_warning.tga" />
@@ -625,45 +618,12 @@
<texture name="media_icon.tga" file_name="icn_label_media.tga" />
<texture name="music_icon.tga" file_name="icn_label_music.tga" />
- <texture name="NoEntryLines" file_name="world/NoEntryLines.png" use_mips="true" preload="false" />
- <texture name="NoEntryPassLines" file_name="world/NoEntryPassLines.png" use_mips="true" preload="false" />
<texture name="notify_tip_icon.tga" />
<texture name="notify_caution_icon.tga" />
<texture name="notify_next.png" preload="true" />
<texture name="notify_box_icon.tga" />
- <texture name="object_cone.tga" />
- <texture name="object_cone_active.tga" />
- <texture name="object_cube.tga" />
- <texture name="object_cube_active.tga" />
- <texture name="object_cylinder.tga" />
- <texture name="object_cylinder_active.tga" />
- <texture name="object_grass.tga" />
- <texture name="object_grass_active.tga" />
- <texture name="object_hemi_cone.tga" />
- <texture name="object_hemi_cone_active.tga" />
- <texture name="object_hemi_cylinder.tga" />
- <texture name="object_hemi_cylinder_active.tga" />
- <texture name="object_hemi_sphere.tga" />
- <texture name="object_hemi_sphere_active.tga" />
- <texture name="object_prism.tga" />
- <texture name="object_prism_active.tga" />
- <texture name="object_pyramid.tga" />
- <texture name="object_pyramid_active.tga" />
- <texture name="object_ring.tga" />
- <texture name="object_ring_active.tga" />
- <texture name="object_sphere.tga" />
- <texture name="object_sphere_active.tga" />
- <texture name="object_tetrahedron.tga" />
- <texture name="object_tetrahedron_active.tga" />
- <texture name="object_torus.tga" />
- <texture name="object_torus_active.tga" />
- <texture name="object_tree.tga" />
- <texture name="object_tree_active.tga" />
- <texture name="object_tube.tga" />
- <texture name="object_tube_active.tga" />
-
<texture name="pixiesmall.j2c" use_mips="true" />
<texture name="script_error.j2c" use_mips="true" />
<texture name="silhouette.j2c" use_mips="true" />
@@ -679,11 +639,6 @@
<texture name="status_no_push.tga" />
<texture name="status_no_scripts.tga" />
- <texture name="tool_dozer.tga" />
- <texture name="tool_dozer_active.tga" />
- <texture name="tool_zoom.tga" />
- <texture name="tool_zoom_active.tga" />
-
<texture name="icn_active-speakers-dot-lvl0.tga" />
<texture name="icn_active-speakers-dot-lvl1.tga" />
<texture name="icn_active-speakers-dot-lvl2.tga" />
diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml
index 25d337ccec..0bd4b441c6 100644
--- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml
@@ -14,6 +14,7 @@
save_rect="true"
title="Nearby Chat"
save_visibility="true"
+ single_instance="true"
width="320">
<chat_history
allow_html="true"
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 8cdcee6927..29fe046ed3 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -2836,8 +2836,8 @@
<button
follows="left|top"
height="20"
- label="Land profile"
- label_selected="Land profile"
+ label="About Land"
+ label_selected="About Land"
layout="topleft"
left_delta="0"
name="button about land"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 34d0498180..e98492feda 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -232,7 +232,7 @@
<menu_item_separator
layout="topleft" />
<menu_item_call
- label="Place Profile"
+ label="About Land"
layout="topleft"
name="About Land">
<menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
index f9e4b9e7c0..cc47e99c2c 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
@@ -32,6 +32,27 @@
<!-- <line_editor.commit_callback
function="Media.CommitHomeURL"/> -->
</line_editor>
+
+ <web_browser
+ border_visible="true"
+ bottom_delta="-133"
+ follows="top|left"
+ left="120"
+ name="preview_media"
+ width="128"
+ height="128"
+ start_url="about:blank"
+ decouple_texture_size="true" />
+
+ <text
+ bottom_delta="-15"
+ follows="top|left"
+ height="15"
+ left="164"
+ name="">
+ Preview
+ </text>
+
<text
bottom_delta="-20"
follows="top|left"
@@ -62,27 +83,6 @@
<button.commit_callback
function="Media.ResetCurrentUrl"/>
</button>
-
- <web_browser
- border_visible="false"
- bottom_delta="-133"
- follows="top|left"
- left="120"
- name="preview_media"
- width="128"
- height="128"
- start_url="about:blank"
- decouple_texture_size="true" />
-
- <text
- bottom_delta="-15"
- follows="top|left"
- height="15"
- left="164"
- name="">
- Preview
- </text>
-
<text
bottom_delta="-5"
follows="top|left"
diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml
index a32be90a33..73a759a8ba 100644
--- a/indra/newview/skins/default/xui/en/panel_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile.xml
@@ -53,7 +53,7 @@
left="10"
name="second_life_image_panel"
top="0"
- width="290">
+ width="280">
<texture_picker
allow_no_texture="true"
default_image_name="None"
@@ -75,13 +75,14 @@
text_color="white"
top_delta="0"
value="[SECOND_LIFE]:"
- width="170" />
+ width="165" />
<expandable_text
follows="left|top|right"
height="95"
layout="topleft"
left="107"
name="sl_description_edit"
+ top_pad="-3"
width="173"
expanded_bg_visible="true"
expanded_bg_color="DkGray">
@@ -95,7 +96,7 @@
top_pad="10"
left="10"
name="first_life_image_panel"
- width="290">
+ width="280">
<texture_picker
allow_no_texture="true"
default_image_name="None"
@@ -116,13 +117,14 @@
text_color="white"
top_delta="0"
value="Real World:"
- width="173" />
+ width="165" />
<expandable_text
follows="left|top|right"
height="95"
layout="topleft"
left="107"
name="fl_description_edit"
+ top_pad="-3"
width="173"
expanded_bg_visible="true"
expanded_bg_color="DkGray">
@@ -151,7 +153,7 @@
name="homepage_edit"
top_pad="0"
value="http://librarianavengers.org"
- width="290"
+ width="280"
word_wrap="false"
use_elipsis="true"
/>
@@ -205,7 +207,7 @@
name="acc_status_text"
top_pad="0"
value="Resident. No payment info on file."
- width="295"
+ width="280"
word_wrap="true" />
<text
follows="left|top"
@@ -215,7 +217,7 @@
left="10"
name="title_partner_text"
text_color="white"
- top_pad="10"
+ top_pad="5"
value="Partner:"
width="280" />
<panel
@@ -245,21 +247,21 @@
left="10"
name="title_groups_text"
text_color="white"
- top_pad="10"
+ top_pad="8"
value="Groups:"
width="280" />
- <text
+ <expandable_text
follows="left|top|bottom"
- height="160"
+ height="60"
layout="topleft"
left="10"
- name="sl_groups"
- top_pad="0"
- width="290"
- word_wrap="true"
- use_elipsis="true">
+ name="sl_groups"
+ top_pad="0"
+ width="280"
+ expanded_bg_visible="true"
+ expanded_bg_color="DkGray">
Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
- </text>
+ </expandable_text>
</panel>
</scroll_container>
<panel
@@ -270,17 +272,17 @@
top_pad="2"
bottom="10"
height="19"
- width="313">
+ width="303">
<button
follows="bottom|left"
height="19"
- label="Add"
+ label="Add Friend"
layout="topleft"
left="0"
mouse_opaque="false"
name="add_friend"
top="5"
- width="55" />
+ width="75" />
<button
follows="bottom|left"
height="19"
@@ -289,7 +291,7 @@
name="im"
top="5"
left_pad="5"
- width="40" />
+ width="45" />
<button
enabled="false"
follows="bottom|left"
@@ -299,7 +301,7 @@
name="call"
left_pad="5"
top="5"
- width="55" />
+ width="45" />
<button
enabled="false"
follows="bottom|left"
@@ -309,7 +311,7 @@
name="show_on_map_btn"
top="5"
left_pad="5"
- width="50" />
+ width="45" />
<button
follows="bottom|left"
height="19"
@@ -318,7 +320,7 @@
name="teleport"
left_pad="5"
top="5"
- width="90" />
+ width="80" />
</panel>
<panel
follows="bottom|left"
@@ -328,7 +330,7 @@
name="profile_me_buttons_panel"
visible="false"
height="19"
- width="313">
+ width="303">
<button
follows="bottom|right"
font="SansSerifSmall"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml
index 8a48574440..7a5781651d 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml
@@ -52,8 +52,9 @@
height="535"
layout="topleft"
left="10"
+ min_width="333"
name="tabs"
- tab_min_width="95"
+ tab_min_width="80"
tab_height="30"
tab_position="top"
top_pad="10"
@@ -61,21 +62,21 @@
<panel
class="panel_profile"
filename="panel_profile.xml"
- label="Profile"
+ label="PROFILE"
layout="topleft"
help_topic="profile_profile_tab"
name="panel_profile" />
<panel
class="panel_picks"
filename="panel_picks.xml"
- label="Picks"
+ label="PICKS"
layout="topleft"
help_topic="profile_picks_tab"
name="panel_picks" />
<panel
class="panel_notes"
filename="panel_notes.xml"
- label="Notes &amp; Privacy"
+ label="NOTES &amp; PRIVACY"
layout="topleft"
help_topic="profile_notes_tab"
name="panel_notes" />
diff --git a/indra/newview/skins/default/xui/en/panel_side_tray.xml b/indra/newview/skins/default/xui/en/panel_side_tray.xml
index 6abcbc40d2..3f64c9c633 100644
--- a/indra/newview/skins/default/xui/en/panel_side_tray.xml
+++ b/indra/newview/skins/default/xui/en/panel_side_tray.xml
@@ -35,6 +35,7 @@
tab_title="People"
description="Find your friends, contacts and people nearby."
image="TabIcon_People_Off"
+ image_selected="TabIcon_People_Selected"
mouse_opaque="false"
background_visible="true"
>
@@ -77,6 +78,7 @@
label="Places"
description="Find places to go and places you&apos;ve visited before."
image="TabIcon_Places_Off"
+ image_selected="TabIcon_Places_Selected"
mouse_opaque="false"
background_visible="true"
>
@@ -95,6 +97,7 @@
tab_title="Me"
description="Edit your public profile and Picks."
image="TabIcon_Me_Off"
+ image_selected="TabIcon_Me_Selected"
mouse_opaque="false"
background_visible="true"
>
@@ -112,6 +115,7 @@
tab_title="Appearance"
description="Change your appearance and current look."
image="TabIcon_Appearance_Off"
+ image_selected="TabIcon_Appearance_Selected"
mouse_opaque="false"
background_visible="true"
>
diff --git a/indra/test_apps/llplugintest/bookmarks.txt b/indra/test_apps/llplugintest/bookmarks.txt
index e5268fcac9..ef34167b29 100644
--- a/indra/test_apps/llplugintest/bookmarks.txt
+++ b/indra/test_apps/llplugintest/bookmarks.txt
@@ -8,6 +8,7 @@
(WK) Canvas Paint (DHTML version of MS Paint),http://www.canvaspaint.org
(WK) DHTML Lemmings!,http://www.elizium.nu/scripts/lemmings/
(WK) DHTML graphics demos,http://www.dhteumeuleu.com/
+(WK) Shared paint app,http://colorillo.com/ac79?1l0q6cp
(Flash) YouTube,http://youtube.com
(Flash) Vimeo,http://www.vimeo.com/1778399
(Flash) Simple whiteboard,http://www.imaginationcubed.com/
diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp
index 234422b68a..553d1ab131 100644
--- a/indra/test_apps/llplugintest/llmediaplugintest.cpp
+++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp
@@ -1190,7 +1190,7 @@ void LLMediaPluginTest::mouseButton( int button, int state, int x, int y )
windowPosToTexturePos( x, y, media_x, media_y, id );
if ( mSelectedPanel )
- mSelectedPanel->mMediaSource->mouseEvent( LLPluginClassMedia::MOUSE_EVENT_DOWN, media_x, media_y, 0 );
+ mSelectedPanel->mMediaSource->mouseEvent( LLPluginClassMedia::MOUSE_EVENT_DOWN, 0, media_x, media_y, 0 );
}
else
if ( state == GLUT_UP )
@@ -1206,7 +1206,7 @@ void LLMediaPluginTest::mouseButton( int button, int state, int x, int y )
selectPanelById( id );
if ( mSelectedPanel )
- mSelectedPanel->mMediaSource->mouseEvent( LLPluginClassMedia::MOUSE_EVENT_UP, media_x, media_y, 0 );
+ mSelectedPanel->mMediaSource->mouseEvent( LLPluginClassMedia::MOUSE_EVENT_UP, 0, media_x, media_y, 0 );
};
};
};
@@ -1220,7 +1220,7 @@ void LLMediaPluginTest::mousePassive( int x, int y )
windowPosToTexturePos( x, y, media_x, media_y, id );
if ( mSelectedPanel )
- mSelectedPanel->mMediaSource->mouseEvent( LLPluginClassMedia::MOUSE_EVENT_MOVE, media_x, media_y, 0 );
+ mSelectedPanel->mMediaSource->mouseEvent( LLPluginClassMedia::MOUSE_EVENT_MOVE, 0, media_x, media_y, 0 );
}
////////////////////////////////////////////////////////////////////////////////
@@ -1231,7 +1231,7 @@ void LLMediaPluginTest::mouseMove( int x, int y )
windowPosToTexturePos( x, y, media_x, media_y, id );
if ( mSelectedPanel )
- mSelectedPanel->mMediaSource->mouseEvent( LLPluginClassMedia::MOUSE_EVENT_MOVE, media_x, media_y, 0 );
+ mSelectedPanel->mMediaSource->mouseEvent( LLPluginClassMedia::MOUSE_EVENT_MOVE, 0, media_x, media_y, 0 );
}
////////////////////////////////////////////////////////////////////////////////