diff options
93 files changed, 2447 insertions, 1907 deletions
@@ -43,3 +43,4 @@ tarfile_tmp ^indra/web/dataservice/locale.* ^indra/web/dataservice/lib/shared/vault.* ^indra/web/dataservice/vendor.* +glob:indra/newview/dbghelp.dll 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/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..570ca4b998 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -63,6 +63,7 @@ #include "llpanel.h" #include "llurlregistry.h" #include "lltooltip.h" +#include "llmenugl.h" #include <queue> #include "llcombobox.h" @@ -252,7 +253,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : mHandleEditKeysDirectly( p.handle_edit_keys_directly ), mMouseDownX(0), mMouseDownY(0), - mTabsToNextField(p.ignore_tab) + mTabsToNextField(p.ignore_tab), + mContextMenu(NULL) { mDefaultFont = p.font; @@ -273,7 +275,7 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : if (mShowLineNumbers) { mHPad += UI_TEXTEDITOR_LINE_NUMBER_MARGIN; - updateTextRect(); + updateRects(); } } @@ -301,6 +303,8 @@ LLTextEditor::~LLTextEditor() // Scrollbar is deleted by LLView std::for_each(mUndoStack.begin(), mUndoStack.end(), DeletePointer()); + + delete mContextMenu; } //////////////////////////////////////////////////////////// @@ -702,6 +706,19 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) return handled; } +BOOL LLTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + BOOL handled = LLTextBase::handleRightMouseDown(x, y, mask); + if (!handled && hasTabStop()) + { + setFocus( TRUE ); + showContextMenu(x, y); + handled = TRUE; + } + return handled; +} + + BOOL LLTextEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask) { @@ -736,7 +753,6 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask) setCursorAtLocalPos( clamped_x, clamped_y, true ); mSelectionEnd = mCursorPos; } - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl; getWindow()->setCursor(UI_CURSOR_IBEAM); handled = TRUE; @@ -1991,6 +2007,21 @@ void LLTextEditor::setEnabled(BOOL enabled) } } +void LLTextEditor::showContextMenu(S32 x, S32 y) +{ + if (!mContextMenu) + { + mContextMenu = LLUICtrlFactory::instance().createFromFile<LLContextMenu>("menu_text_editor.xml", + LLMenuGL::sMenuContainer, + LLMenuHolderGL::child_registry_t::instance()); + } + + S32 screen_x, screen_y; + localPointToScreen(x, y, &screen_x, &screen_y); + mContextMenu->show(screen_x, screen_y); +} + + void LLTextEditor::drawPreeditMarker() { static LLUICachedControl<F32> preedit_marker_brightness ("UIPreeditMarkerBrightness", 0); diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 481a4d1a78..4847f4d117 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -99,6 +99,7 @@ public: // mousehandler overrides virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); + virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask ); virtual BOOL handleMiddleMouseDown(S32 x,S32 y,MASK mask); @@ -201,6 +202,7 @@ public: void getSelectedSegments(segment_vec_t& segments) const; protected: + void showContextMenu(S32 x, S32 y); void drawPreeditMarker(); void assignEmbedded(const std::string &s); @@ -328,6 +330,8 @@ private: LLCoordGL mLastIMEPosition; // Last position of the IME editor keystroke_signal_t mKeystrokeSignal; + + LLContextMenu* mContextMenu; }; // end class LLTextEditor 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..7c9e27a760 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -1,842 +1,872 @@ -/**
- * @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; + bool mFirstFocus; + + //////////////////////////////////////////////////////////////////////////////// + // + 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; + mFirstFocus = true; +} + +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 ); + + if(mFirstFocus && val) + { + // On the first focus, post a tab key event. This fixes a problem with initial focus. + std::string empty; + keyEvent(LLQtWebKit::KE_KEY_DOWN, KEY_TAB, decodeModifiers(empty)); + keyEvent(LLQtWebKit::KE_KEY_UP, KEY_TAB, decodeModifiers(empty)); + mFirstFocus = false; + } + } + 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/settings.xml b/indra/newview/app_settings/settings.xml index 858da77418..6bc95b9cdb 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7340,17 +7340,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>ScriptErrorsAsChat</key> - <map> - <key>Comment</key> - <string>Display script errors and warning in chat history</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>ScriptHelpFollowsCursor</key> <map> <key>Comment</key> @@ -7665,6 +7654,28 @@ <key>Value</key> <integer>1</integer> </map> + <key>ShowScriptErrors</key> + <map> + <key>Comment</key> + <string>Show script errors</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>ShowScriptErrorsLocation</key> + <map> + <key>Comment</key> + <string>Show script error in chat or window</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>0</integer> + </map> <key>ShowSnapshotButton</key> <map> <key>Comment</key> 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/llappviewer.cpp b/indra/newview/llappviewer.cpp index 2ff414344a..06c9171d67 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -227,7 +227,6 @@ const F32 DEFAULT_AFK_TIMEOUT = 5.f * 60.f; // time with no input before user fl F32 gSimLastTime; // Used in LLAppViewer::init and send_stats() F32 gSimFrames; -BOOL gAllowTapTapHoldRun = TRUE; BOOL gShowObjectUpdates = FALSE; BOOL gUseQuickTime = TRUE; @@ -421,7 +420,6 @@ static void settings_to_globals() gAgent.setHideGroupTitle(gSavedSettings.getBOOL("RenderHideGroupTitle")); gDebugWindowProc = gSavedSettings.getBOOL("DebugWindowProc"); - gAllowTapTapHoldRun = gSavedSettings.getBOOL("AllowTapTapHoldRun"); gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates"); gMapScale = gSavedSettings.getF32("MapScale"); @@ -1350,7 +1348,11 @@ bool LLAppViewer::cleanup() // Destroy the UI if( gViewerWindow) gViewerWindow->shutdownViews(); - + + // Cleanup Inventory after the UI since it will delete any remaining observers + // (Deleted observers should have already removed themselves) + gInventory.cleanupInventory(); + // Clean up selection managers after UI is destroyed, as UI may be observing them. // Clean up before GL is shut down because we might be holding on to objects with texture references LLSelectMgr::cleanupGlobals(); @@ -2400,7 +2402,6 @@ void LLAppViewer::cleanupSavedSettings() gSavedSettings.setBOOL("DebugWindowProc", gDebugWindowProc); - gSavedSettings.setBOOL("AllowTapTapHoldRun", gAllowTapTapHoldRun); gSavedSettings.setBOOL("ShowObjectUpdates", gShowObjectUpdates); if (!gNoRender) diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index f95d7cb412..d970aa6ae1 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -282,8 +282,6 @@ const S32 AGENT_UPDATES_PER_SECOND = 10; // "// llstartup" indicates that llstartup is the only client for this global. extern LLSD gDebugInfo; - -extern BOOL gAllowTapTapHoldRun; extern BOOL gShowObjectUpdates; typedef enum diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 512773d215..38e8985188 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -299,12 +299,12 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& sty if (mLastFromName == chat.mFromName) { view = getSeparator(); - view_text = " "; + view_text = "\n"; } else { view = getHeader(chat); - view_text = "\n" + chat.mFromName + MESSAGE_USERNAME_DATE_SEPARATOR + formatCurrentTime(); + view_text = chat.mFromName + MESSAGE_USERNAME_DATE_SEPARATOR + formatCurrentTime() + '\n'; } //Prepare the rect for the view LLRect target_rect = getDocumentView()->getRect(); @@ -316,7 +316,8 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& sty appendWidget(view, view_text, FALSE, TRUE, mLeftWidgetPad, 0); //Append the text message - appendText(chat.mText, TRUE, style_params); + std::string message = chat.mText + '\n'; + appendText(message, FALSE, style_params); mLastFromName = chat.mFromName; blockUndo(); diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 976f02eeb7..d8c34581d5 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -442,6 +442,7 @@ void LLRenderPass::renderTexture(U32 type, U32 mask) void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture) { + llpushcallstacks ; for (LLCullResult::drawinfo_list_t::iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i) { LLDrawInfo* pparams = *i; diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 4246cbc27f..09b3ce1e86 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -856,6 +856,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, const LLMatrix4& mat_vert, const LLMatrix3& mat_normal, const U16 &index_offset) { + llpushcallstacks ; const LLVolumeFace &vf = volume.getVolumeFace(f); S32 num_vertices = (S32)vf.mVertices.size(); S32 num_indices = (S32)vf.mIndices.size(); @@ -864,7 +865,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, { if (num_indices + (S32) mIndicesIndex > mVertexBuffer->getNumIndices()) { - llwarns << "Index buffer overflow!" << llendl; + llwarns << "Index buffer overflow!" << llendl; + llwarns << "Indices Count: " << mIndicesCount + << " VF Num Indices: " << num_indices + << " Indices Index: " << mIndicesIndex + << " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl; + llwarns << "Last Indices Count: " << mLastIndicesCount + << " Last Indices Index: " << mLastIndicesIndex + << " Face Index: " << f + << " Pool Type: " << mPoolType << llendl; return FALSE; } diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 6d2e959352..86abebe7ce 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -204,12 +204,14 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) { - LLFloaterScriptDebug::addScriptLine(chat.mText, - chat.mFromName, - color, - chat.mFromID); - if (!gSavedSettings.getBOOL("ScriptErrorsAsChat")) + if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + return; + if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1) { + LLFloaterScriptDebug::addScriptLine(chat.mText, + chat.mFromName, + color, + chat.mFromID); return; } } @@ -315,9 +317,9 @@ void LLFloaterChat::addChat(const LLChat& chat, { LLColor4 text_color = get_text_color(chat); - BOOL invisible_script_debug_chat = - chat.mChatType == CHAT_TYPE_DEBUG_MSG - && !gSavedSettings.getBOOL("ScriptErrorsAsChat"); + BOOL invisible_script_debug_chat = ((gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) || + (chat.mChatType == CHAT_TYPE_DEBUG_MSG + && (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1))); if (!invisible_script_debug_chat && !chat.mMuted diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index dbee9ea309..8b3391726a 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -843,10 +843,7 @@ void LLFloaterPreference::refreshEnabledState() bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump"); getChild<LLCheckBoxCtrl>("BumpShiny")->setEnabled(bumpshiny ? TRUE : FALSE); - for (S32 i = 0; i < radio_reflection_detail->getItemCount(); ++i) - { - radio_reflection_detail->setIndexEnabled(i, ctrl_reflections->get() && reflections); - } + radio_reflection_detail->setEnabled(ctrl_reflections->get() && reflections); // Avatar Mode // Enable Avatar Shaders @@ -880,20 +877,10 @@ void LLFloaterPreference::refreshEnabledState() { mRadioTerrainDetail->setValue(1); mRadioTerrainDetail->setEnabled(FALSE); - for (S32 i = 0; i < mRadioTerrainDetail->getItemCount(); ++i) - { - mRadioTerrainDetail->setIndexEnabled(i, FALSE); - } } else { - mRadioTerrainDetail->setEnabled(TRUE); - - for (S32 i = 0; i < mRadioTerrainDetail->getItemCount(); ++i) - { - mRadioTerrainDetail->setIndexEnabled(i, TRUE); - } - + mRadioTerrainDetail->setEnabled(TRUE); } // WindLight diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 92980c22c7..3bec6f9e73 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -1141,7 +1141,7 @@ void LLFloaterTools::getMediaState() childSetEnabled( "edit_media", bool_has_media & editable ); childSetEnabled( "delete_media", bool_has_media & editable ); childSetEnabled( "add_media", ( ! bool_has_media ) & editable ); - media_info->setEnabled(bool_has_media & editable); + media_info->setEnabled(false); // TODO: display a list of all media on the face - use 'identical' flag } else // not all face has media but at least one does. @@ -1165,7 +1165,7 @@ void LLFloaterTools::getMediaState() } - media_info->setEnabled(TRUE); + media_info->setEnabled(false); media_info->setTentative(true); childSetEnabled("media_tex", TRUE); childSetEnabled( "edit_media", TRUE); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index d5a527773c..1d7cbde0d5 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -176,12 +176,21 @@ LLInventoryModel::LLInventoryModel() // Destroys the object LLInventoryModel::~LLInventoryModel() { + cleanupInventory(); +} + +void LLInventoryModel::cleanupInventory() +{ empty(); - for (observer_list_t::iterator iter = mObservers.begin(); - iter != mObservers.end(); ++iter) + // Deleting one observer might erase others from the list, so always pop off the front + while (!mObservers.empty()) { - delete *iter; + observer_list_t::iterator iter = mObservers.begin(); + LLInventoryObserver* observer = *iter; + mObservers.erase(iter); + delete observer; } + mObservers.clear(); } // This is a convenience function to check if one object has a parent diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 7d4f3372e9..d51460b374 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -112,7 +112,9 @@ public: // construction & destruction LLInventoryModel(); ~LLInventoryModel(); - + + void cleanupInventory(); + class fetchInventoryResponder : public LLHTTPClient::Responder { public: 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/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index b91e23eace..3802d13f8b 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -164,16 +164,7 @@ TODO: - Load navbar height from saved settings (as it's done for status bar) or think of a better way. */ -S32 NAVIGATION_BAR_HEIGHT = 60; // *HACK -LLNavigationBar* LLNavigationBar::sInstance = 0; - -LLNavigationBar* LLNavigationBar::getInstance() -{ - if (!sInstance) - sInstance = new LLNavigationBar(); - - return sInstance; -} +S32 NAVIGATION_BAR_HEIGHT = 60; // *HACK, used in llviewerwindow.cpp LLNavigationBar::LLNavigationBar() : mTeleportHistoryMenu(NULL), @@ -198,8 +189,6 @@ LLNavigationBar::LLNavigationBar() LLNavigationBar::~LLNavigationBar() { mTeleportFinishConnection.disconnect(); - sInstance = 0; - LLSearchHistory::getInstance()->save(); } diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index 8a65cd24fa..f1a1b85a86 100644 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -47,12 +47,12 @@ class LLSearchComboBox; * Web browser-like navigation bar. */ class LLNavigationBar -: public LLPanel + : public LLPanel, public LLSingleton<LLNavigationBar> { LOG_CLASS(LLNavigationBar); - + public: - static LLNavigationBar* getInstance(); + LLNavigationBar(); virtual ~LLNavigationBar(); /*virtual*/ void draw(); @@ -65,7 +65,6 @@ public: void showFavoritesPanel(BOOL visible); private: - LLNavigationBar(); void rebuildTeleportHistoryMenu(); void showTeleportHistoryMenu(); @@ -91,8 +90,6 @@ private: void fillSearchComboBox(); - static LLNavigationBar *sInstance; - LLMenuGL* mTeleportHistoryMenu; LLButton* mBtnBack; LLButton* mBtnForward; diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 8e297c5d95..12638ab855 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -204,12 +204,14 @@ void LLNearbyChat::addMessage(const LLChat& chat) if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) { - LLFloaterScriptDebug::addScriptLine(chat.mText, - chat.mFromName, - color, - chat.mFromID); - if (!gSavedSettings.getBOOL("ScriptErrorsAsChat")) + if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + return; + if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat")) { + LLFloaterScriptDebug::addScriptLine(chat.mText, + chat.mFromName, + color, + chat.mFromID); return; } } diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 4aefbd1a33..6b0d6d61e0 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -188,6 +188,17 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) return; } + int chat_type = notification["chat_type"].asInteger(); + + if( ((EChatType)chat_type == CHAT_TYPE_DEBUG_MSG)) + { + if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + return; + if(gSavedSettings.getS32("ShowScriptErrorsLocation")== 1) + return; + } + + //take 1st element from pool, (re)initialize it, put it in active toasts LLToast* toast = m_toast_pool.back(); @@ -330,6 +341,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg) notification["from_id"] = chat_msg.mFromID; notification["time"] = chat_msg.mTime; notification["source"] = (S32)chat_msg.mSourceType; + notification["chat_type"] = (S32)chat_msg.mChatType; channel->addNotification(notification); } 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/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..7c17699bf9 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,10 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick) } else { - media_impl->mouseDown(pick.mUVCoords); + // Make sure keyboard focus is set to the media focus object. + gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance()); + + 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 +1102,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/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index 2dc317e067..8fd646ee93 100644 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -99,7 +99,7 @@ static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode m gAgent.sendWalkRun(gAgent.getRunning()); } } - else if (gAllowTapTapHoldRun && + else if (gSavedSettings.getBOOL("AllowTapTapHoldRun") && KEYSTATE_DOWN == s && !gAgent.getRunning()) { diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 0b6ac0e2e2..02fda191be 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -48,6 +48,8 @@ #include "llevent.h" // LLSimpleListener #include "llnotifications.h" #include "lluuid.h" +#include "llkeyboard.h" +#include "llmutelist.h" #include <boost/bind.hpp> // for SkinFolder listener #include <boost/signals2.hpp> @@ -170,6 +172,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) @@ -193,6 +196,14 @@ static void remove_media_impl(LLViewerMediaImpl* media) } } +class LLViewerMediaMuteListObserver : public LLMuteListObserver +{ + /* virtual */ void onChange() { LLViewerMedia::muteListChanged();} +}; + +static LLViewerMediaMuteListObserver sViewerMediaMuteListObserver; +static bool sViewerMediaMuteListObserverInitialized = false; + ////////////////////////////////////////////////////////////////////////////////////////// // LLViewerMedia @@ -387,20 +398,56 @@ bool LLViewerMedia::textureHasMedia(const LLUUID& texture_id) // static void LLViewerMedia::setVolume(F32 volume) { + if(volume != sGlobalVolume) + { + 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; +} + +////////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::muteListChanged() +{ + // When the mute list changes, we need to check mute status on all impls. impl_list::iterator iter = sViewerMediaImplList.begin(); impl_list::iterator end = sViewerMediaImplList.end(); for(; iter != end; iter++) { LLViewerMediaImpl* pimpl = *iter; - pimpl->setVolume(volume); + pimpl->mNeedsMuteCheck = true; } } // This is the predicate function used to sort sViewerMediaImplList by priority. static inline bool compare_impl_interest(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2) { - if(i1->hasFocus()) + if(i1->mIsMuted || i1->mMediaSourceFailed) + { + // Muted or failed items always go to the end of the list, period. + return false; + } + else if(i2->mIsMuted || i2->mMediaSourceFailed) + { + // Muted or failed items always go to the end of the list, period. + return true; + } + else if(i1->hasFocus()) { // The item with user focus always comes to the front of the list, period. return true; @@ -474,8 +521,9 @@ void LLViewerMedia::updateMedia() LLPluginClassMedia::EPriority new_priority = LLPluginClassMedia::PRIORITY_NORMAL; - if(impl_count_total > (int)max_instances) + if(pimpl->mIsMuted || pimpl->mMediaSourceFailed || (impl_count_total > (int)max_instances)) { + // Never load muted or failed impls. // Hard limit on the number of instances that will be loaded at one time new_priority = LLPluginClassMedia::PRIORITY_UNLOADED; } @@ -535,6 +583,11 @@ void LLViewerMedia::updateMedia() } } + if(new_priority != LLPluginClassMedia::PRIORITY_UNLOADED) + { + impl_count_total++; + } + pimpl->setPriority(new_priority); #if 0 @@ -548,7 +601,6 @@ void LLViewerMedia::updateMedia() #endif total_cpu += pimpl->getCPUUsage(); - impl_count_total++; } LL_DEBUGS("PluginPriority") << "Total reported CPU usage is " << total_cpu << llendl; @@ -590,9 +642,19 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mDoNavigateOnLoad(false), mDoNavigateOnLoadRediscoverType(false), mDoNavigateOnLoadServerRequest(false), - mMediaSourceFailedInit(false), + mMediaSourceFailed(false), + mRequestedVolume(1.0f), + mIsMuted(false), + mNeedsMuteCheck(false), mIsUpdated(false) { + + // Set up the mute list observer if it hasn't been set up already. + if(!sViewerMediaMuteListObserverInitialized) + { + LLMuteList::getInstance()->addObserver(&sViewerMediaMuteListObserver); + sViewerMediaMuteListObserverInitialized = true; + } add_media_impl(this); @@ -782,7 +844,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) } // If we got here, we want to ignore previous init failures. - mMediaSourceFailedInit = false; + mMediaSourceFailed = false; LLPluginClassMedia* media_source = newSourceFromMediaType(mMimeType, this, mMediaWidth, mMediaHeight); @@ -792,13 +854,17 @@ 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; } // Make sure the timer doesn't try re-initing this plugin repeatedly until something else changes. - mMediaSourceFailedInit = true; + mMediaSourceFailed = true; return false; } @@ -884,13 +950,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 +996,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 +1004,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 +1017,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 +1030,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 +1085,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); } } @@ -1083,9 +1165,6 @@ void LLViewerMediaImpl::navigateHome() ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mime_type, bool rediscover_type, bool server_request) { - // Helpful to have media urls in log file. Shouldn't be spammy. - llinfos << "url=" << url << " mime_type=" << mime_type << llendl; - if(server_request) { setNavState(MEDIANAVSTATE_SERVER_SENT); @@ -1107,14 +1186,24 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi // and if this was a server request, the navigate on load will also need to be one. mDoNavigateOnLoadServerRequest = server_request; + + // An explicit navigate resets the "failed" flag. + mMediaSourceFailed = false; if(mPriority == LLPluginClassMedia::PRIORITY_UNLOADED) { + // Helpful to have media urls in log file. Shouldn't be spammy. + llinfos << "UNLOADED media id= " << mTextureId << " url=" << url << " mime_type=" << mime_type << llendl; + // This impl should not be loaded at this time. LL_DEBUGS("PluginPriority") << this << "Not loading (PRIORITY_UNLOADED)" << LL_ENDL; return; } + + // Helpful to have media urls in log file. Shouldn't be spammy. + llinfos << "media id= " << mTextureId << " url=" << url << " mime_type=" << mime_type << llendl; + // If the caller has specified a non-empty MIME type, look that up in our MIME types list. // If we have a plugin for that MIME type, use that instead of attempting auto-discovery. @@ -1223,6 +1312,8 @@ bool LLViewerMediaImpl::handleKeyHere(KEY key, MASK mask) if(!result) { result = mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_DOWN ,key, mask); + // Since the viewer internal event dispatching doesn't give us key-up events, simulate one here. + (void)mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_UP ,key, mask); } } @@ -1240,7 +1331,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)); } } @@ -1272,7 +1363,7 @@ bool LLViewerMediaImpl::canNavigateBack() ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::update() { - if(mMediaSource == NULL && !mMediaSourceFailedInit) + if(mMediaSource == NULL) { if(mPriority != LLPluginClassMedia::PRIORITY_UNLOADED) { @@ -1502,7 +1593,8 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla case MEDIA_EVENT_PLUGIN_FAILED_LAUNCH: { // The plugin failed to load properly. Make sure the timer doesn't retry. - mMediaSourceFailedInit = true; + // TODO: maybe mark this plugin as not loadable somehow? + mMediaSourceFailed = true; // TODO: may want a different message for this case? LLSD args; @@ -1513,6 +1605,9 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla case MEDIA_EVENT_PLUGIN_FAILED: { + // The plugin crashed. + mMediaSourceFailed = true; + LLSD args; args["PLUGIN"] = LLMIMETypes::implType(mMimeType); // SJB: This is getting called every frame if the plugin fails to load, continuously respawining the alert! @@ -1687,6 +1782,32 @@ void LLViewerMediaImpl::calculateInterest() // This will be a relatively common case now, since it will always be true for unloaded media. mInterest = 0.0f; } + + if(mNeedsMuteCheck) + { + // Check all objects this instance is associated with, and those objects' owners, against the mute list + mIsMuted = false; + + std::list< LLVOVolume* >::iterator iter = mObjectList.begin() ; + for(; iter != mObjectList.end() ; ++iter) + { + LLVOVolume *obj = *iter; + if(LLMuteList::getInstance()->isMuted(obj->getID())) + mIsMuted = true; + else + { + // We won't have full permissions data for all objects. Attempt to mute objects when we can tell their owners are muted. + LLPermissions* obj_perm = LLSelectMgr::getInstance()->findObjectPermissions(obj); + if(obj_perm) + { + if(LLMuteList::getInstance()->isMuted(obj_perm->getOwner())) + mIsMuted = true; + } + } + } + + mNeedsMuteCheck = false; + } } F64 LLViewerMediaImpl::getApproximateTextureInterest() @@ -1794,11 +1915,13 @@ void LLViewerMediaImpl::addObject(LLVOVolume* obj) } mObjectList.push_back(obj) ; + mNeedsMuteCheck = true; } void LLViewerMediaImpl::removeObject(LLVOVolume* obj) { mObjectList.remove(obj) ; + mNeedsMuteCheck = true; } const std::list< LLVOVolume* >* LLViewerMediaImpl::getObjectList() const diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index fc2776ee91..b15314e954 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -95,6 +95,8 @@ class LLViewerMedia static void toggleMusicPlay(void*); static void toggleMediaPlay(void*); static void mediaStop(void*); + static F32 getVolume(); + static void muteListChanged(); }; // Implementation functions not exported into header file @@ -130,16 +132,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(); @@ -169,6 +173,7 @@ public: bool isMediaPlaying(); bool isMediaPaused(); bool hasMedia(); + bool isMediaFailed() { return mMediaSourceFailed; }; ECursorType getLastSetCursor() { return mLastSetCursor; }; @@ -285,7 +290,10 @@ public: bool mDoNavigateOnLoad; bool mDoNavigateOnLoadRediscoverType; bool mDoNavigateOnLoadServerRequest; - bool mMediaSourceFailedInit; + bool mMediaSourceFailed; + F32 mRequestedVolume; + bool mIsMuted; + bool mNeedsMuteCheck; private: diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index cad8b5f0ce..b47e0b8406 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. @@ -114,7 +114,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac } else { - if(hasFocus()) + if(mFocusedImplID != LLUUID::null) { if(mMediaHUD.get()) { @@ -249,20 +249,18 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal, } void LLViewerMediaFocus::onFocusReceived() { - // Don't do this here -- this doesn't change "inworld media focus", it just changes whether the viewer's input is focused on the media. -// LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); -// if(media_impl.notNull()) -// media_impl->focus(true); + LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); + if(media_impl) + media_impl->focus(true); LLFocusableElement::onFocusReceived(); } void LLViewerMediaFocus::onFocusLost() { - // Don't do this here -- this doesn't change "inworld media focus", it just changes whether the viewer's input is focused on the media. -// LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); -// if(media_impl.notNull()) -// media_impl->focus(false); + LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); + if(media_impl) + media_impl->focus(false); gViewerWindow->focusClient(); LLFocusableElement::onFocusLost(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d46f155ad6..864cf9d57b 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1678,34 +1678,6 @@ class LLAdvancedTogglePG : public view_listener_t }; - -//////////////////////////// -// ALLOW TAP-TAP-HOLD RUN // -//////////////////////////// - - -class LLAdvancedToggleAllowTapTapHoldRun : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - gAllowTapTapHoldRun = !(gAllowTapTapHoldRun); - return true; - } -}; - -class LLAdvancedCheckAllowTapTapHoldRun : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - bool new_value = gAllowTapTapHoldRun; - return new_value; - } -}; - - - - - class LLAdvancedForceParamsToDefault : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -7965,8 +7937,6 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedTogglePG(), "Advanced.TogglePG"); // Advanced > Character (toplevel) - view_listener_t::addMenu(new LLAdvancedToggleAllowTapTapHoldRun(), "Advanced.ToggleAllowTapTapHoldRun"); - view_listener_t::addMenu(new LLAdvancedCheckAllowTapTapHoldRun(), "Advanced.CheckAllowTapTapHoldRun"); view_listener_t::addMenu(new LLAdvancedForceParamsToDefault(), "Advanced.ForceParamsToDefault"); view_listener_t::addMenu(new LLAdvancedReloadVertexShader(), "Advanced.ReloadVertexShader"); view_listener_t::addMenu(new LLAdvancedToggleAnimationInfo(), "Advanced.ToggleAnimationInfo"); diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 77b023f6dd..aa0987aa7d 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -843,8 +843,11 @@ void LLViewerParcelMgr::renderParcelCollision() if (mRenderCollision && gSavedSettings.getBOOL("ShowBanLines")) { LLViewerRegion* regionp = gAgent.getRegion(); - BOOL use_pass = mCollisionParcel->getParcelFlag(PF_USE_PASS_LIST); - renderCollisionSegments(mCollisionSegments, use_pass, regionp); + if (regionp) + { + BOOL use_pass = mCollisionParcel->getParcelFlag(PF_USE_PASS_LIST); + renderCollisionSegments(mCollisionSegments, use_pass, regionp); + } } } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index f3c1cf191a..b0b69fbae6 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1636,7 +1636,11 @@ void LLViewerWindow::shutdownViews() // DEV-40930: Clear sModalStack. Otherwise, any LLModalDialog left open // will crump with LL_ERRS. LLModalDialog::shutdownModals(); - + + // destroy the nav bar, not currently part of gViewerWindow + // *TODO: Make LLNavigationBar part of gViewerWindow + delete LLNavigationBar::getInstance(); + // Delete all child views. delete mRootView; mRootView = 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/llvovolume.cpp b/indra/newview/llvovolume.cpp index d896e1f7db..7d4bef3f7d 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2988,6 +2988,7 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt"); void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { + llpushcallstacks ; if (group->changeLOD()) { group->mLastUpdateDistance = group->mDistance; @@ -3218,6 +3219,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) static LLFastTimer::DeclareTimer FTM_VOLUME_GEOM("Volume Geometry"); void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) { + llpushcallstacks ; if (group->isState(LLSpatialGroup::MESH_DIRTY) && !group->isState(LLSpatialGroup::GEOM_DIRTY)) { LLFastTimer tm(FTM_VOLUME_GEOM); @@ -3308,6 +3310,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort) { + llpushcallstacks ; //calculate maximum number of vertices to store in a single buffer U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); max_vertices = llmin(max_vertices, (U32) 65535); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index b50e71bf48..a37de468b3 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1797,6 +1797,7 @@ void LLPipeline::rebuildPriorityGroups() void LLPipeline::rebuildGroups() { + llpushcallstacks ; // Iterate through some drawables on the non-priority build queue S32 size = (S32) mGroupQ2.size(); S32 min_count = llclamp((S32) ((F32) (size * size)/4096*0.25f), 1, size); diff --git a/indra/newview/skins/default/textures/icons/Generic_Object.png b/indra/newview/skins/default/textures/icons/Generic_Object.png Binary files differnew file mode 100644 index 0000000000..e3a80b2aef --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Generic_Object.png diff --git a/indra/newview/skins/default/textures/icons/Info_Over.png b/indra/newview/skins/default/textures/icons/Info_Over.png Binary files differnew file mode 100644 index 0000000000..be1cd0706f --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Info_Over.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Animation.png b/indra/newview/skins/default/textures/icons/Inv_Animation.png Binary files differindex 8b69434066..ab42c61a92 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Animation.png +++ b/indra/newview/skins/default/textures/icons/Inv_Animation.png diff --git a/indra/newview/skins/default/textures/icons/Inv_BodyShape.png b/indra/newview/skins/default/textures/icons/Inv_BodyShape.png Binary files differindex 9d98bfaa7d..97e874d70d 100644 --- a/indra/newview/skins/default/textures/icons/Inv_BodyShape.png +++ b/indra/newview/skins/default/textures/icons/Inv_BodyShape.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Clothing.png b/indra/newview/skins/default/textures/icons/Inv_Clothing.png Binary files differindex 49a54b82e1..e8d246c6fa 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Clothing.png +++ b/indra/newview/skins/default/textures/icons/Inv_Clothing.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Eye.png b/indra/newview/skins/default/textures/icons/Inv_Eye.png Binary files differindex 6d0321dde9..e619f56c2b 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Eye.png +++ b/indra/newview/skins/default/textures/icons/Inv_Eye.png diff --git a/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png b/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png Binary files differindex 30aa6e04ac..342a973d00 100644 --- a/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png +++ b/indra/newview/skins/default/textures/icons/Inv_FolderClosed.png diff --git a/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png b/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png Binary files differindex 792ef446e8..0507c2cbaf 100644 --- a/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png +++ b/indra/newview/skins/default/textures/icons/Inv_FolderOpen.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Gesture.png b/indra/newview/skins/default/textures/icons/Inv_Gesture.png Binary files differindex c49ae523c8..52695ec19b 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Gesture.png +++ b/indra/newview/skins/default/textures/icons/Inv_Gesture.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Gloves.png b/indra/newview/skins/default/textures/icons/Inv_Gloves.png Binary files differindex d81bc961d4..d6a2113aaf 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Gloves.png +++ b/indra/newview/skins/default/textures/icons/Inv_Gloves.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Hair.png b/indra/newview/skins/default/textures/icons/Inv_Hair.png Binary files differindex 5e68f1ffea..ae941b0dd5 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Hair.png +++ b/indra/newview/skins/default/textures/icons/Inv_Hair.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Jacket.png b/indra/newview/skins/default/textures/icons/Inv_Jacket.png Binary files differindex 0e28f45f19..3859666f7c 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Jacket.png +++ b/indra/newview/skins/default/textures/icons/Inv_Jacket.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Landmark.png b/indra/newview/skins/default/textures/icons/Inv_Landmark.png Binary files differindex 6648a23393..f8ce765c50 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Landmark.png +++ b/indra/newview/skins/default/textures/icons/Inv_Landmark.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Notecard.png b/indra/newview/skins/default/textures/icons/Inv_Notecard.png Binary files differindex 830a71311f..4645ab8e91 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Notecard.png +++ b/indra/newview/skins/default/textures/icons/Inv_Notecard.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Object.png b/indra/newview/skins/default/textures/icons/Inv_Object.png Binary files differindex a88d0dc4b3..f883696a82 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Object.png +++ b/indra/newview/skins/default/textures/icons/Inv_Object.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Pants.png b/indra/newview/skins/default/textures/icons/Inv_Pants.png Binary files differindex 2527f7f9c3..fe2389f074 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Pants.png +++ b/indra/newview/skins/default/textures/icons/Inv_Pants.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Script.png b/indra/newview/skins/default/textures/icons/Inv_Script.png Binary files differindex e9c9b163fd..0fba27a7aa 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Script.png +++ b/indra/newview/skins/default/textures/icons/Inv_Script.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Shirt.png b/indra/newview/skins/default/textures/icons/Inv_Shirt.png Binary files differindex 7cc880a124..81c1538dd2 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Shirt.png +++ b/indra/newview/skins/default/textures/icons/Inv_Shirt.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Shoe.png b/indra/newview/skins/default/textures/icons/Inv_Shoe.png Binary files differindex 0b148647eb..51e1c7bbb7 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Shoe.png +++ b/indra/newview/skins/default/textures/icons/Inv_Shoe.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Skin.png b/indra/newview/skins/default/textures/icons/Inv_Skin.png Binary files differindex 8e20638bba..b7da922046 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Skin.png +++ b/indra/newview/skins/default/textures/icons/Inv_Skin.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Skirt.png b/indra/newview/skins/default/textures/icons/Inv_Skirt.png Binary files differindex 40860a3599..246e9a87aa 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Skirt.png +++ b/indra/newview/skins/default/textures/icons/Inv_Skirt.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Snapshot.png b/indra/newview/skins/default/textures/icons/Inv_Snapshot.png Binary files differindex 17e710a843..39efd2be1b 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Snapshot.png +++ b/indra/newview/skins/default/textures/icons/Inv_Snapshot.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Socks.png b/indra/newview/skins/default/textures/icons/Inv_Socks.png Binary files differindex b8169dcb36..30d7d7c239 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Socks.png +++ b/indra/newview/skins/default/textures/icons/Inv_Socks.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Sound.png b/indra/newview/skins/default/textures/icons/Inv_Sound.png Binary files differindex 1a50dd17da..44c271c868 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Sound.png +++ b/indra/newview/skins/default/textures/icons/Inv_Sound.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Texture.png b/indra/newview/skins/default/textures/icons/Inv_Texture.png Binary files differindex 2d6d1b54bb..dbc41c5e99 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Texture.png +++ b/indra/newview/skins/default/textures/icons/Inv_Texture.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Underpants.png b/indra/newview/skins/default/textures/icons/Inv_Underpants.png Binary files differindex 77f56c574f..b1e7c2a55f 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Underpants.png +++ b/indra/newview/skins/default/textures/icons/Inv_Underpants.png diff --git a/indra/newview/skins/default/textures/icons/Inv_Undershirt.png b/indra/newview/skins/default/textures/icons/Inv_Undershirt.png Binary files differindex 954eab7660..9340dbb975 100644 --- a/indra/newview/skins/default/textures/icons/Inv_Undershirt.png +++ b/indra/newview/skins/default/textures/icons/Inv_Undershirt.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 01976c9a5c..b46b766fc0 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" /> @@ -71,7 +71,6 @@ <texture name="ComboButton_Press" file_name="widgets/ComboButton_Press.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="ComboButton_Selected" file_name="widgets/ComboButton_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="ComboButton_Off" file_name="widgets/ComboButton_Off.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> - <texture name="Container" file_name="containers/Container.png" preload="false" /> <texture name="DisclosureArrow_Closed_Off" file_name="widgets/DisclosureArrow_Closed_Off.png" preload="true" /> @@ -102,6 +101,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 +123,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 +149,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 +227,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 +257,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" /> @@ -336,7 +373,7 @@ <texture name="SliderThumb_Disabled" file_name="widgets/SliderThumb_Disabled.png" /> <texture name="SliderThumb_Press" file_name="widgets/SliderThumb_Press.png" /> - <texture name="Snapshot_Off" file_name="bottomtray/Snapshot_Off.png" preload="false" /> + <texture name="Snapshot_Off" file_name="bottomtray/Snapshot_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="Snapshot_Over" file_name="bottomtray/Snapshot_Over.png" preload="false" /> <texture name="Snapshot_Press" file_name="bottomtray/Snapshot_Press.png" preload="false" /> @@ -432,6 +469,7 @@ <texture name="VoicePTT_On" file_name="bottomtray/VoicePTT_On.png" preload="false" /> <texture name="Widget_DownArrow" file_name="icons/Widget_DownArrow.png" preload="true" /> + <texture name="Widget_UpArrow" file_name="icons/Widget_UpArrow.png" preload="true" /> <texture name="Window_Background" file_name="windows/Window_Background.png" preload="true" /> <texture name="Window_Foreground" file_name="windows/Window_Foreground.png" preload="true" /> @@ -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_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 285045f2c8..90a77b22b6 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -12,32 +12,32 @@ width="620"> <button follows="right|bottom" - height="20" + height="23" label="OK" label_selected="OK" layout="topleft" - left="427" + right="-105" name="OK" - top="435" + top="433" width="90"> <button.commit_callback function="Pref.OK" /> </button> <button follows="right|bottom" - height="20" + height="23" label="Cancel" label_selected="Cancel" layout="topleft" - left_pad="3" + left_pad="5" name="Cancel" - top_delta="0" + right="-10" width="90" > <button.commit_callback function="Pref.Cancel" /> </button> <tab_container - follows="left|top|right|bottom" + follows="all" height="410" layout="topleft" left="0" @@ -48,14 +48,14 @@ top="21" width="620"> <panel - class="panel_preference" + class="panel_preference" filename="panel_preferences_general.xml" label="General" layout="topleft" help_topic="preferences_general_tab" name="general" /> <panel - class="panel_preference" + class="panel_preference" filename="panel_preferences_graphics1.xml" label="Graphics" layout="topleft" @@ -103,13 +103,6 @@ layout="topleft" help_topic="preferences_advanced1_tab" name="advanced1" /> - <panel - class="panel_preference" - filename="panel_preferences_advanced2.xml" - label="Move or Kill" - layout="topleft" - help_topic="preferences_advanced2_tab" - name="advanced2" /> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml index a523f40bb8..11c4e5d8fb 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater auto_tile="true" - height="800" + height="460" layout="topleft" name="gesture_preview" help_topic="gesture_preview" @@ -46,10 +46,11 @@ height="10" layout="topleft" left="10" - name="Name" + name="desc_label" top="25" + font.style="BOLD" width="100"> - Name (not working yet): + Description: </text> <line_editor follows="left|top" @@ -67,70 +68,270 @@ height="10" layout="topleft" left="10" - name="desc_label" + font.style="BOLD" + name="trigger_label" top_pad="10" width="100"> - Description: + Trigger: </text> <line_editor follows="left|top" - height="40" + height="20" + layout="topleft" + left_delta="84" + max_length="31" + name="trigger_editor" + top_delta="-4" + width="180" /> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifSmall" + height="10" + layout="topleft" + left="10" + font.style="BOLD" + name="replace_text" + tool_tip="Replace the trigger word(s) with these words. For example, trigger 'hello' replace with 'howdy' will turn the chat 'I wanted to say hello' into 'I wanted to say howdy' as well as playing the gesture!" + top_pad="10" + width="200"> + Replace with: + </text> + <line_editor + follows="left|top" + height="20" + layout="topleft" + left_delta="84" + max_length="31" + name="replace_editor" + tool_tip="Replace the trigger word(s) with these words. For example, trigger 'hello' replace with 'howdy' will turn the chat 'I wanted to say hello' into 'I wanted to say howdy' as well as playing the gesture" + top_delta="-4" + width="180" /> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifSmall" + height="10" + layout="topleft" + left="10" + font.style="BOLD" + name="key_label" + top_pad="10" + width="100"> + Shortcut Key: + </text> + <combo_box + height="20" + label="None" layout="topleft" left_delta="84" - name="desc2" + name="modifier_combo" top_delta="-4" + width="75" /> + <combo_box + height="20" + label="None" + layout="topleft" + left_pad="10" + name="key_combo" + top_delta="0" + width="75" /> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifSmall" + height="10" + layout="topleft" + left="10" + font.style="BOLD" + name="library_label" + top="135" + width="100"> + Library: + </text> + <scroll_list + follows="top|left" + height="60" + layout="topleft" + left="10" + name="library_list" + top="150" + width="180"> + <scroll_list.rows + value="Animation" /> + <scroll_list.rows + value="Sound" /> + <scroll_list.rows + value="Chat" /> + <scroll_list.rows + value="Wait" /> + </scroll_list> + <button + follows="top|left" + height="20" + font="SansSerifSmall" + label="Add >>" + layout="topleft" + left_pad="10" + name="add_btn" + top_delta="0" + width="70" /> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifSmall" + height="10" + layout="topleft" + left="10" + font.style="BOLD" + name="steps_label" + top_pad="50" + width="100"> + Steps: + </text> + <scroll_list + follows="top|left" + height="85" + layout="topleft" + left="10" + name="step_list" + top_pad="5" width="180" /> - - <accordion - layout="topleft" - left="2" - width="276" - top="95" - height="580" - follows="all" - name="group_accordion"> - <accordion_tab - min_height="90" - title="Shortcuts" - name="snapshot_destination_tab" - an_resize="false"> - <panel - class="floater_preview_shortcut" - filename="floater_preview_gesture_shortcut.xml" - name="floater_preview_shortcut"/> - </accordion_tab> - <accordion_tab - min_height="400" - title="Steps" - name="snapshot_file_settings_tab" - can_resize="false"> - <panel - class="floater_preview_steps" - filename="floater_preview_gesture_steps.xml" - name="floater_preview_steps"/> - </accordion_tab> - <accordion_tab - min_height="155" - title="Info" - name="snapshot_capture_tab" - can_resize="false"> - <panel - class="floater_preview_info" - filename="floater_preview_gesture_info.xml" - name="floater_preview_info"/> - </accordion_tab> - <!--accordion_tab - min_height="100" - title="Permissions" - name="snapshot_capture_tab2" - can_resize="false"> - <panel - class="floater_snapshot_capture" - filename="floater_snapshot_Permissions.xml" - name="snapshot_capture_panel2"/> - </accordion_tab--> - </accordion> - <!--check_box + <button + follows="top|left" + height="20" + font="SansSerifSmall" + label="Up" + layout="topleft" + left_pad="10" + name="up_btn" + top_delta="0" + width="70" /> + <button + follows="top|left" + height="20" + font="SansSerifSmall" + label="Down" + layout="topleft" + left_delta="0" + name="down_btn" + top_pad="10" + width="70" /> + <button + follows="top|left" + height="20" + font="SansSerifSmall" + label="Remove" + layout="topleft" + left_delta="0" + name="delete_btn" + top_pad="10" + width="70" /> + <text + follows="top|left" + height="60" + layout="topleft" + left="15" + name="options_text" + top="330" + width="205" /> + <combo_box + follows="top|left" + height="20" + layout="topleft" + left_delta="15" + name="animation_list" + top="345" + width="100" /> + <combo_box + follows="top|left" + height="20" + layout="topleft" + left_delta="0" + name="sound_list" + top_delta="0" + width="100" /> + <line_editor + follows="top|left" + height="20" + layout="topleft" + left_delta="0" + max_length="127" + name="chat_editor" + top_delta="0" + width="100" /> + <radio_group + draw_border="false" + follows="top|left" + height="40" + layout="topleft" + left_pad="8" + name="animation_trigger_type" + top_delta="0" + width="80"> + <radio_item + height="16" + label="Start" + layout="topleft" + left="3" + name="start" + top="-11" + width="80" /> + <radio_item + height="16" + label="Stop" + layout="topleft" + left_delta="0" + name="stop" + top_pad="10" + width="80" /> + </radio_group> + <check_box + follows="top|left" + height="20" + label="until animations are done" + layout="topleft" + left="16" + name="wait_anim_check" + top="340" + width="100" /> + <check_box + follows="top|left" + height="20" + label="time in seconds" + layout="topleft" + left_delta="0" + name="wait_time_check" + top_delta="20" + width="100" /> + <line_editor + follows="top|left" + height="20" + layout="topleft" + left_pad="5" + max_length="15" + name="wait_time_editor" + top_delta="0" + width="50" /> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifSmall" + height="30" + layout="topleft" + left="10" + name="help_label" + top_pad="20" + word_wrap="true" + width="265"> + All steps happen simultaneously, unless you add wait steps. + </text> + <check_box follows="top|left" height="20" label="Active" @@ -138,35 +339,24 @@ left="20" name="active_check" tool_tip="Active gestures can be triggered by chatting their trigger phrases or pressing their hot keys. Gestures usually become inactive when there is a key binding conflict." - top="365" - width="100" /--> - + top_pad="0" + width="100" /> <button - follows="bottom|left" + follows="top|left" height="20" label="Preview" layout="topleft" - left="20" + left_delta="75" name="preview_btn" - top_pad="30" + top_delta="2" width="80" /> <button follows="top|left" height="20" label="Save" layout="topleft" - left_pad="5" + left_pad="10" name="save_btn" top_delta="0" width="80" /> - <button - follows="top|left" - height="20" - label="Cancel (not working)" - layout="topleft" - left_pad="5" - name="cancel_btn" - top_delta="0" - width="80" /> - </floater>
\ No newline at end of file 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_text_editor.xml b/indra/newview/skins/default/xui/en/menu_text_editor.xml new file mode 100644 index 0000000000..7c9e6f0796 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_text_editor.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + name="Text editor context menu"> + <menu_item_call + label="Cut" + layout="topleft" + name="Cut" + shortcut="control|X"> + <menu_item_call.on_click + function="Edit.Cut" /> + <menu_item_call.on_enable + function="Edit.EnableCut" /> + </menu_item_call> + <menu_item_call + label="Copy" + layout="topleft" + name="Copy" + shortcut="control|C"> + <menu_item_call.on_click + function="Edit.Copy" /> + <menu_item_call.on_enable + function="Edit.EnableCopy" /> + </menu_item_call> + <menu_item_call + label="Paste" + layout="topleft" + name="Paste" + shortcut="control|V"> + <menu_item_call.on_click + function="Edit.Paste" /> + <menu_item_call.on_enable + function="Edit.EnablePaste" /> + </menu_item_call> + <menu_item_call + label="Delete" + layout="topleft" + name="Delete" + shortcut="Del"> + <menu_item_call.on_click + function="Edit.Delete" /> + <menu_item_call.on_enable + function="Edit.EnableDelete" /> + </menu_item_call> + <menu_item_call + label="Select All" + layout="topleft" + name="Select All" + shortcut="control|A"> + <menu_item_call.on_click + function="Edit.SelectAll" /> + <menu_item_call.on_enable + function="Edit.EnableSelectAll" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 34d0498180..a59a8b065f 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 @@ -1620,6 +1620,234 @@ </menu_item_check> <menu_item_separator layout="topleft" /> + <menu + label="Shortcuts" + layout="topleft" + name="Shortcuts" + tear_off="true" + visible="false"> + <menu_item_check + label="Search" + layout="topleft" + name="Search" + shortcut="control|F"> + <menu_item_check.on_check + function="Floater.Visible" + parameter="search" /> + <menu_item_check.on_click + function="Floater.Toggle" + parameter="search" /> + </menu_item_check> + <menu_item_call + enabled="false" + label="Release Keys" + layout="topleft" + name="Release Keys"> + <menu_item_call.on_click + function="Tools.ReleaseKeys" + parameter="" /> + <menu_item_call.on_enable + function="Tools.EnableReleaseKeys" + parameter="" /> + </menu_item_call> + <menu_item_call + label="Set UI Size to Default" + layout="topleft" + name="Set UI Size to Default"> + <menu_item_call.on_click + function="View.DefaultUISize" /> + </menu_item_call> + <menu_item_separator + layout="topleft" /> + <menu_item_check + label="Always Run" + layout="topleft" + name="Always Run" + shortcut="control|R"> + <menu_item_check.on_check + function="World.CheckAlwaysRun" /> + <menu_item_check.on_click + function="World.AlwaysRun" /> + </menu_item_check> + <menu_item_check + label="Fly" + layout="topleft" + name="Fly" + shortcut="Home"> + <menu_item_check.on_click + function="Agent.toggleFlying" /> + <menu_item_check.on_enable + function="Agent.enableFlying" /> + </menu_item_check> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="Close Window" + layout="topleft" + name="Close Window" + shortcut="control|W"> + <menu_item_call.on_click + function="File.CloseWindow" /> + <menu_item_call.on_enable + function="File.EnableCloseWindow" /> + </menu_item_call> + <menu_item_call + label="Close All Windows" + layout="topleft" + name="Close All Windows" + shortcut="control|shift|W"> + <menu_item_call.on_click + function="File.CloseAllWindows" /> + <menu_item_call.on_enable + function="File.EnableCloseAllWindows" /> + </menu_item_call> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="Snapshot to Disk" + layout="topleft" + name="Snapshot to Disk" + shortcut="control|`" + use_mac_ctrl="true"> + <menu_item_call.on_click + function="File.TakeSnapshotToDisk" /> + </menu_item_call> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="Mouselook" + layout="topleft" + name="Mouselook" + shortcut="M"> + <menu_item_call.on_click + function="View.Mouselook" /> + <menu_item_call.on_enable + function="View.EnableMouselook" /> + </menu_item_call> + <menu_item_check + label="Joystick Flycam" + layout="topleft" + name="Joystick Flycam" + shortcut="alt|shift|F"> + <menu_item_check.on_check + function="View.CheckJoystickFlycam" /> + <menu_item_check.on_click + function="View.JoystickFlycam" /> + <menu_item_check.on_enable + function="View.EnableJoystickFlycam" /> + </menu_item_check> + <menu_item_call + label="Reset View" + layout="topleft" + name="Reset View" + shortcut="Esc"> + <menu_item_call.on_click + function="View.ResetView" /> + </menu_item_call> + <menu_item_call + label="Look at Last Chatter" + layout="topleft" + name="Look at Last Chatter" + shortcut="control|\"> + <menu_item_call.on_click + function="View.LookAtLastChatter" /> + <menu_item_call.on_enable + function="View.EnableLastChatter" /> + </menu_item_call> + <menu_item_separator + layout="topleft" /> + <menu + create_jump_keys="true" + label="Select Build Tool" + layout="topleft" + name="Select Tool" + tear_off="true"> + <menu_item_call + label="Focus Tool" + layout="topleft" + name="Focus" + shortcut="control|1"> + <menu_item_call.on_click + function="Tools.SelectTool" + parameter="focus" /> + </menu_item_call> + <menu_item_call + label="Move Tool" + layout="topleft" + name="Move" + shortcut="control|2"> + <menu_item_call.on_click + function="Tools.SelectTool" + parameter="move" /> + </menu_item_call> + <menu_item_call + label="Edit Tool" + layout="topleft" + name="Edit" + shortcut="control|3"> + <menu_item_call.on_click + function="Tools.SelectTool" + parameter="edit" /> + </menu_item_call> + <menu_item_call + label="Create Tool" + layout="topleft" + name="Create" + shortcut="control|4"> + <menu_item_call.on_click + function="Tools.SelectTool" + parameter="create" /> + </menu_item_call> + <menu_item_call + label="Land Tool" + layout="topleft" + name="Land" + shortcut="control|5"> + <menu_item_call.on_click + function="Tools.SelectTool" + parameter="land" /> + </menu_item_call> + </menu> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="Zoom In" + layout="topleft" + name="Zoom In" + shortcut="control|0"> + <menu_item_call.on_click + function="View.ZoomIn" /> + </menu_item_call> + <menu_item_call + label="Zoom Default" + layout="topleft" + name="Zoom Default" + shortcut="control|9"> + <menu_item_call.on_click + function="View.ZoomDefault" /> + </menu_item_call> + <menu_item_call + label="Zoom Out" + layout="topleft" + name="Zoom Out" + shortcut="control|8"> + <menu_item_call.on_click + function="View.ZoomOut" /> + </menu_item_call> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="Toggle Fullscreen" + layout="topleft" + name="Toggle Fullscreen" + > + <!-- Note: shortcut="alt|Enter" was deleted from the preceding node--> + <menu_item_call.on_click + function="View.Fullscreen" /> + </menu_item_call> + </menu> + <menu_item_separator + layout="topleft" /> <menu_item_call label="Show Debug Settings" layout="topleft" @@ -2416,232 +2644,6 @@ parameter="stop record" /> </menu_item_call> </menu> - <menu - label="Shortcuts" - layout="topleft" - name="Shortcuts" - tear_off="true" - visible="false"> - <menu_item_check - label="Search" - layout="topleft" - name="Search" - shortcut="control|F"> - <menu_item_check.on_check - function="Floater.Visible" - parameter="search" /> - <menu_item_check.on_click - function="Floater.Toggle" - parameter="search" /> - </menu_item_check> - <menu_item_call - enabled="false" - label="Release Keys" - layout="topleft" - name="Release Keys"> - <menu_item_call.on_click - function="Tools.ReleaseKeys" - parameter="" /> - <menu_item_call.on_enable - function="Tools.EnableReleaseKeys" - parameter="" /> - </menu_item_call> - <menu_item_call - label="Set UI Size to Default" - layout="topleft" - name="Set UI Size to Default"> - <menu_item_call.on_click - function="View.DefaultUISize" /> - </menu_item_call> - <menu_item_separator - layout="topleft" /> - <menu_item_check - label="Always Run" - layout="topleft" - name="Always Run" - shortcut="control|R"> - <menu_item_check.on_check - function="World.CheckAlwaysRun" /> - <menu_item_check.on_click - function="World.AlwaysRun" /> - </menu_item_check> - <menu_item_check - label="Fly" - layout="topleft" - name="Fly" - shortcut="Home"> - <menu_item_check.on_click - function="Agent.toggleFlying" /> - <menu_item_check.on_enable - function="Agent.enableFlying" /> - </menu_item_check> - <menu_item_separator - layout="topleft" /> - <menu_item_call - label="Close Window" - layout="topleft" - name="Close Window" - shortcut="control|W"> - <menu_item_call.on_click - function="File.CloseWindow" /> - <menu_item_call.on_enable - function="File.EnableCloseWindow" /> - </menu_item_call> - <menu_item_call - label="Close All Windows" - layout="topleft" - name="Close All Windows" - shortcut="control|shift|W"> - <menu_item_call.on_click - function="File.CloseAllWindows" /> - <menu_item_call.on_enable - function="File.EnableCloseAllWindows" /> - </menu_item_call> - <menu_item_separator - layout="topleft" /> - <menu_item_call - label="Snapshot to Disk" - layout="topleft" - name="Snapshot to Disk" - shortcut="control|`" - use_mac_ctrl="true"> - <menu_item_call.on_click - function="File.TakeSnapshotToDisk" /> - </menu_item_call> - <menu_item_separator - layout="topleft" /> - <menu_item_call - label="Mouselook" - layout="topleft" - name="Mouselook" - shortcut="M"> - <menu_item_call.on_click - function="View.Mouselook" /> - <menu_item_call.on_enable - function="View.EnableMouselook" /> - </menu_item_call> - <menu_item_check - label="Joystick Flycam" - layout="topleft" - name="Joystick Flycam" - shortcut="alt|shift|F"> - <menu_item_check.on_check - function="View.CheckJoystickFlycam" /> - <menu_item_check.on_click - function="View.JoystickFlycam" /> - <menu_item_check.on_enable - function="View.EnableJoystickFlycam" /> - </menu_item_check> - <menu_item_call - label="Reset View" - layout="topleft" - name="Reset View" - shortcut="Esc"> - <menu_item_call.on_click - function="View.ResetView" /> - </menu_item_call> - <menu_item_call - label="Look at Last Chatter" - layout="topleft" - name="Look at Last Chatter" - shortcut="control|\"> - <menu_item_call.on_click - function="View.LookAtLastChatter" /> - <menu_item_call.on_enable - function="View.EnableLastChatter" /> - </menu_item_call> - <menu_item_separator - layout="topleft" /> - <menu - create_jump_keys="true" - label="Select Build Tool" - layout="topleft" - name="Select Tool" - tear_off="true"> - <menu_item_call - label="Focus Tool" - layout="topleft" - name="Focus" - shortcut="control|1"> - <menu_item_call.on_click - function="Tools.SelectTool" - parameter="focus" /> - </menu_item_call> - <menu_item_call - label="Move Tool" - layout="topleft" - name="Move" - shortcut="control|2"> - <menu_item_call.on_click - function="Tools.SelectTool" - parameter="move" /> - </menu_item_call> - <menu_item_call - label="Edit Tool" - layout="topleft" - name="Edit" - shortcut="control|3"> - <menu_item_call.on_click - function="Tools.SelectTool" - parameter="edit" /> - </menu_item_call> - <menu_item_call - label="Create Tool" - layout="topleft" - name="Create" - shortcut="control|4"> - <menu_item_call.on_click - function="Tools.SelectTool" - parameter="create" /> - </menu_item_call> - <menu_item_call - label="Land Tool" - layout="topleft" - name="Land" - shortcut="control|5"> - <menu_item_call.on_click - function="Tools.SelectTool" - parameter="land" /> - </menu_item_call> - </menu> - <menu_item_separator - layout="topleft" /> - <menu_item_call - label="Zoom In" - layout="topleft" - name="Zoom In" - shortcut="control|0"> - <menu_item_call.on_click - function="View.ZoomIn" /> - </menu_item_call> - <menu_item_call - label="Zoom Default" - layout="topleft" - name="Zoom Default" - shortcut="control|9"> - <menu_item_call.on_click - function="View.ZoomDefault" /> - </menu_item_call> - <menu_item_call - label="Zoom Out" - layout="topleft" - name="Zoom Out" - shortcut="control|8"> - <menu_item_call.on_click - function="View.ZoomOut" /> - </menu_item_call> - <menu_item_separator - layout="topleft" /> - <menu_item_call - label="Toggle Fullscreen" - layout="topleft" - name="Toggle Fullscreen" - > - <!-- Note: shortcut="alt|Enter" was deleted from the preceding node--> - <menu_item_call.on_click - function="View.Fullscreen" /> - </menu_item_call> - </menu> <menu create_jump_keys="true" diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 1196d788e4..9065c6b3e8 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -2,21 +2,21 @@ <panel mouse_opaque="true" background_visible="true" - bg_alpha_color="0.25 0.25 0.25 1" - bg_opaque_color="0.25 0.25 0.25 1" + bg_alpha_color="DkGray" + bg_opaque_color="DkGray" follows="left|bottom|right" - height="28" + height="33" layout="topleft" left="0" name="bottom_tray" top="28" - border_visible="true" + border_visible="false" width="1000"> <layout_stack - mouse_opaque="false" + mouse_opaque="false" border_size="0" - clip="false" - follows="left|right|bottom|top" + clip="false" + follows="all" height="28" layout="topleft" left="0" @@ -26,39 +26,27 @@ width="1000"> <icon auto_resize="false" - color="0 0 0 0" follows="left|right" height="10" image_name="spacer24.tga" layout="topleft" left="0" top="0" - width="5"/> + width="4" /> <layout_panel - mouse_opaque="false" + mouse_opaque="false" auto_resize="false" follows="left|right" height="28" layout="topleft" - left="5" - min_height="28" + left="0" + min_height="23" width="310" top="0" min_width="300" name="chat_bar" user_resize="false" filename="panel_nearby_chat_bar.xml"/> - <icon - auto_resize="false" - color="0 0 0 0" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" - name="DUMMY" - top="0" - width="3"/> <layout_panel mouse_opaque="false" auto_resize="false" @@ -66,26 +54,25 @@ height="28" layout="topleft" min_height="28" - width="100" - top_delta="-10" - min_width="100" + width="96" + top_delta="0" + min_width="96" name="speak_panel" user_resize="false"> <chiclet_talk follows="right" - height="20" + height="23" speak_button.font="SansSerifMedium" speak_button.tab_stop="true" show_button.tab_stop="true" layout="topleft" left="0" name="talk" - top="6" - width="100" /> - </layout_panel> + top="3" + width="96" /> + </layout_panel> <icon auto_resize="false" - color="0 0 0 0" follows="left|right" height="10" image_name="spacer24.tga" @@ -93,7 +80,7 @@ left="0" name="DUMMY" top="0" - width="5"/> + width="4"/> <layout_panel mouse_opaque="false" auto_resize="false" @@ -101,20 +88,21 @@ height="28" layout="topleft" min_height="28" - width="90" - top_delta="-10" - min_width="90" + width="76" + top_delta="0" + min_width="76" name="gesture_panel" user_resize="false"> - <gesture_combo_box + <button follows="right" - height="20" - label="Gestures" + height="23" + label="Gesture" layout="topleft" name="Gesture" left="0" - top="6" - width="90" /> + top="3" + use_ellipses="true" + width="76" /> </layout_panel> <icon auto_resize="false" @@ -126,29 +114,28 @@ left="0" name="DUMMY" top="0" - width="5"/> + width="4"/> <layout_panel - mouse_opaque="false" + mouse_opaque="false" auto_resize="false" follows="right" height="28" layout="topleft" min_height="28" name="movement_panel" - width="70" - top_delta="-10" - min_width="70"> + width="76" + min_width="76"> <button follows="left|right" - height="20" + height="23" use_ellipses="true" is_toggle="true" label="Move" layout="topleft" name="movement_btn" - tool_tip="Shows/hides movement controls" - top="6" - width="70"> + tool_tip="Show/hide movement controls" + top="3" + width="76"> <button.init_callback function="Button.SetDockableFloaterToggle" parameter="moveview" /> @@ -164,75 +151,81 @@ left="0" name="DUMMY" top="0" - width="8"/> + width="4"/> <layout_panel - mouse_opaque="false" + mouse_opaque="false" auto_resize="false" follows="left|right" height="28" layout="topleft" min_height="28" - min_width="100" + min_width="76" name="cam_panel" top_delta="-10" width="100"> <button follows="left|right" - height="20" + height="23" use_ellipses="true" is_toggle="true" label="View" layout="topleft" left="0" - tool_tip="Shows/hides camera controls" - top="6" + tool_tip="Show/hide camera controls" + top="3" name="camera_btn" - width="70"> + width="76"> <button.init_callback function="Button.SetDockableFloaterToggle" parameter="camera" /> </button> </layout_panel> + <icon + auto_resize="false" + color="0 0 0 0" + follows="left|right" + height="10" + image_name="spacer24.tga" + layout="topleft" + left="0" + name="DUMMY" + top="0" + width="4"/> <layout_panel - mouse_opaque="false" + mouse_opaque="false" auto_resize="false" - follows="right" + follows="left|right" height="28" layout="topleft" - min_height="28" - min_width="35" name="snapshot_panel" - top_delta="-10" - width="35"> + width="35"> <split_button arrow_position="right" - follows="right" - height="18" + follows="left|right" + height="23" left="0" - layout="topleft" + layout="topleft" name="snapshots" - top="6" - width="35"> - <split_button.arrow_button - image_selected="camera_presets/camera_presets_arrow_right.png" - image_unselected="camera_presets/camera_presets_arrow_right.png" - image_disabled_selected="camera_presets/camera_presets_arrow_right.png" - image_disabled="camera_presets/camera_presets_arrow_right.png" - name="snapshot_settings" - tool_tip="Snapshot settings" /> + width="46" + top="3"> <split_button.item - image_selected="camera_presets/camera_presets_snapshot.png" - image_unselected="camera_presets/camera_presets_snapshot.png" + image_overlay="Snapshot_Off" name="snapshot" - tool_tip="Take snapshot" /> - </split_button> + tool_tip="Take snapshot" + /> + <split_button.arrow_button + name="snapshot_settings" + image_overlay="Widget_UpArrow" + tool_tip="Snapshot and Preset Views" + width="18" + /> + </split_button> </layout_panel> <layout_panel mouse_opaque="false" follows="left|right" height="28" layout="topleft" - min_height="28" top="0" name="chiclet_list_panel" width="189" @@ -240,13 +233,13 @@ user_resize="false" auto_resize="true"> <chiclet_panel - mouse_opaque="false" + mouse_opaque="false" follows="left|right" - height="25" + height="28" layout="topleft" left="0" name="chiclet_list" - top="1" + top="0" chiclet_padding="3" scrolling_offset="40" width="189" /> @@ -261,36 +254,6 @@ left="0" top="0" width="5"/> - <icon - auto_resize="false" - color="0 0 0 0" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" - top="0" - width="10"/> - <view_border - auto_resize="false" - bevel_style="in" - follows="left|right" - height="28" - layout="topleft" - left="270" - name="well_separator" - top="0" - width="1" /> - <icon - auto_resize="false" - color="0 0 0 0" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" - top="0" - width="10"/> <layout_panel auto_resize="false" follows="right" @@ -299,8 +262,8 @@ min_height="28" top="0" name="sys_well_panel" - width="48" - min_width="48" + width="34" + min_width="34" user_resize="false"> <chiclet_notification follows="right" @@ -308,24 +271,25 @@ layout="topleft" left="0" name="sys_well" - top="2" - width="48"> + top="3" + width="34"> <button - image_selected="bottom_tray_sys_notifications_selected.tga" - image_unselected="bottom_tray_sys_notifications.tga"/> - <unread_notifications - width="20" - height="20" + auto_resize="true" + halign="right" + height="23" + follows="right" + flash_color="EmphasisColor" + name="Unread" + picture_style="true" + image_overlay="Widget_UpArrow" /> + <unread_notifications + width="34" + height="23" left="22" - top="23"/> -<!-- - <chiclet_notification.commit_callback - function="Notification.Show" - parameter="ClickUnimplemented" /> - --> - </chiclet_notification> + top="23" /> + </chiclet_notification> </layout_panel> - <icon + <icon auto_resize="false" color="0 0 0 0" follows="left|right" @@ -334,6 +298,6 @@ layout="topleft" left="0" top="0" - width="5"/> + width="10"/> </layout_stack> </panel>
\ No newline at end of file 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_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml index 2fd82d8f3d..af00b96d27 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml @@ -6,7 +6,7 @@ layout="topleft" left="0" name="chat_bar" - top="24" + top="21" width="310"> <string name="min_width"> 310 @@ -18,20 +18,19 @@ border_style="line" border_thickness="1" follows="left|right" - height="20" + height="23" label="Click here to chat." layout="topleft" left_delta="7" left="0" name="chat_box" tool_tip="Press Enter to say, Ctrl+Enter to shout" - top="3" + top="0" width="250" /> <output_monitor auto_update="true" follows="right" draw_border="false" - halign="left" height="16" layout="topleft" left_pad="-24" @@ -40,15 +39,15 @@ top="4" visible="true" width="20" /> - <button - follows="right" + <button + follows="right" width="45" - top="3" - layout="topleft" - left_pad="5" - label="Log" - height="20" - tool_tip="Shows/hides nearby chat log"> + top="0" + layout="topleft" + left_pad="8" + label="Log" + height="23" + tool_tip="Show/hide nearby chat log"> <button.commit_callback function="Floater.Toggle" parameter="nearby_chat"/> </button> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 16fdbd7045..f42bab14de 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -235,7 +235,7 @@ Avatars: width="237" top_pad="0" /> <check_box - control_name="test" + control_name="ShowScriptErrors" height="20" label="Show script errors" layout="topleft" @@ -244,7 +244,7 @@ Avatars: width="256" top_pad="10"/> <radio_group - enabled_control="EnableShowScriptErrors" + enabled_control="ShowScriptErrors" control_name="ShowScriptErrorsLocation" draw_border="false" height="40" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 8a28719d98..832c9775ce 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel border="true" - follows="left|top|right|bottom" + follows="all" height="408" - label="Audio & Video" + label="Sounds" layout="topleft" left="102" name="Preference Media panel" @@ -12,18 +12,20 @@ <slider control_name="AudioLevelMaster" follows="left|top" + font.style="BOLD" height="15" increment="0.05" initial_value="0.5" label="Master volume" - label_width="125" + label_width="160" layout="topleft" - left="30" + left="0" name="System Volume" show_text="false" + slider_label.halign="right" top_pad="5" volume="true" - width="425"> + width="350"> <slider.commit_callback function="Pref.setControlFalse" parameter="MuteAudio" /> @@ -31,43 +33,44 @@ <button control_name="MuteAudio" follows="top|right" - height="16" - image_selected="icn_speaker-muted_dark.tga" - image_unselected="icn_speaker_dark.tga" + height="18" + image_selected="parcel_drk_VoiceNo" + image_unselected="parcel_drk_Voice" is_toggle="true" layout="topleft" - left_pad="30" + left_pad="16" name="mute_audio" picture_style="true" tab_stop="false" - top_delta="-1" - width="25" /> + top_delta="-2" + width="22" /> <check_box control_name="MuteWhenMinimized" - height="16" + height="15" initial_value="true" label="Mute if minimized" layout="topleft" - left="165" + left="167" name="mute_when_minimized" top_pad="5" width="215" /> <slider control_name="AudioLevelAmbient" disabled_control="MuteAudio" - follows="left|topt" + follows="left|top" height="15" increment="0.05" initial_value="0.5" label="Ambient" - label_width="125" + label_width="160" layout="topleft" - left="30" + left="0" name="Wind Volume" show_text="false" - top_pad="5" + slider_label.halign="right" + top_pad="7" volume="true" - width="300"> + width="350"> <slider.commit_callback function="Pref.setControlFalse" parameter="MuteAmbient" /> @@ -76,53 +79,54 @@ control_name="MuteAmbient" disabled_control="MuteAudio" follows="top|right" - height="16" - image_selected="icn_speaker-muted_dark.tga" - image_unselected="icn_speaker_dark.tga" + height="18" + image_selected="parcel_drk_VoiceNo" + image_unselected="parcel_drk_Voice" is_toggle="true" layout="topleft" - left_pad="30" + left_pad="16" name="mute_wind" picture_style="true" tab_stop="false" - top_delta="-1" - width="25" /> - <slider - control_name="AudioLevelSFX" + top_delta="-2" + width="22" /> + <slider + control_name="AudioLevelUI" disabled_control="MuteAudio" follows="left|top" height="15" increment="0.05" initial_value="0.5" - label="Sounds" - label_width="125" + label="Buttons" + label_width="160" layout="topleft" - left="30" - name="SFX Volume" + left="0" + name="UI Volume" show_text="false" - top_pad="5" + slider_label.halign="right" + top_pad="7" volume="true" - width="300"> + width="350"> <slider.commit_callback function="Pref.setControlFalse" - parameter="MuteSounds" /> + parameter="MuteUI" /> </slider> <button - control_name="MuteSounds" + control_name="MuteUI" disabled_control="MuteAudio" follows="top|right" - height="16" - image_selected="icn_speaker-muted_dark.tga" - image_unselected="icn_speaker_dark.tga" + height="18" + image_selected="parcel_drk_VoiceNo" + image_unselected="parcel_drk_Voice" is_toggle="true" layout="topleft" - left_pad="30" - name="mute_sfx" + left_pad="16" + name="mute_ui" picture_style="true" tab_stop="false" - top_delta="-1" - width="25" /> - <slider + top_delta="-2" + width="22" /> + <slider control_name="AudioLevelMedia" disabled_control="MuteAudio" follows="left|top" @@ -130,14 +134,15 @@ increment="0.05" initial_value="0.5" label="Media" - label_width="125" + label_width="160" layout="topleft" - left="30" + left="0" name="Media Volume" show_text="false" - top_pad="5" + slider_label.halign="right" + top_pad="7" volume="true" - width="300"> + width="350"> <slider.commit_callback function="Pref.setControlFalse" parameter="MuteMedia" /> @@ -146,52 +151,53 @@ control_name="MuteMedia" disabled_control="MuteAudio" follows="top|right" - height="16" - image_selected="icn_speaker-muted_dark.tga" - image_unselected="icn_speaker_dark.tga" + height="18" + image_selected="parcel_drk_VoiceNo" + image_unselected="parcel_drk_Voice" is_toggle="true" layout="topleft" - left_pad="30" + left_pad="16" name="mute_media" picture_style="true" tab_stop="false" - top_delta="-1" - width="25" /> + top_delta="-2" + width="22" /> <slider - control_name="AudioLevelUI" + control_name="AudioLevelSFX" disabled_control="MuteAudio" follows="left|top" height="15" increment="0.05" initial_value="0.5" - label="UI" - label_width="125" + label="Sound effects" + label_width="160" + slider_label.halign="right" layout="topleft" - left="30" - name="UI Volume" + left="0" + name="SFX Volume" show_text="false" - top_pad="5" + top_pad="7" volume="true" - width="300"> + width="350"> <slider.commit_callback function="Pref.setControlFalse" - parameter="MuteUI" /> + parameter="MuteSounds" /> </slider> <button - control_name="MuteUI" + control_name="MuteSounds" disabled_control="MuteAudio" follows="top|right" - height="16" - image_selected="icn_speaker-muted_dark.tga" - image_unselected="icn_speaker_dark.tga" + height="18" + image_selected="parcel_drk_VoiceNo" + image_unselected="parcel_drk_Voice" is_toggle="true" layout="topleft" - left_pad="30" - name="mute_ui" + left_pad="16" + name="mute_sfx" picture_style="true" tab_stop="false" - top_delta="-1" - width="25" /> + top_delta="-2" + width="22" /> <slider control_name="AudioLevelMusic" disabled_control="MuteAudio" @@ -199,15 +205,16 @@ height="15" increment="0.05" initial_value="0.5" - label="Music" - label_width="125" + label="Streaming music" + label_width="160" layout="topleft" - left="30" + left="0" name="Music Volume" + slider_label.halign="right" show_text="false" - top_pad="5" + top_pad="7" volume="true" - width="300"> + width="350"> <slider.commit_callback function="Pref.setControlFalse" parameter="MuteMusic" /> @@ -216,199 +223,206 @@ control_name="MuteMusic" disabled_control="MuteAudio" follows="top|right" - height="16" - image_selected="icn_speaker-muted_dark.tga" - image_unselected="icn_speaker_dark.tga" + height="18" + image_selected="parcel_drk_VoiceNo" + image_unselected="parcel_drk_Voice" is_toggle="true" layout="topleft" - left_pad="30" + left_pad="16" name="mute_music" picture_style="true" tab_stop="false" - top_delta="-1" - width="25" /> + top_delta="-2" + width="22" /> + <check_box + height="16" + control_name ="EnableVoiceChat" + disabled_control="CmdLineDisableVoice" + label="Enable Voice" + layout="topleft" + left="22" + name="enable_voice_check" + width="100"> + </check_box> <slider control_name="AudioLevelVoice" + enabled_control="EnableVoiceChat" disabled_control="MuteAudio" follows="left|top" height="15" increment="0.05" initial_value="0.5" - label="Voice" - label_width="125" + label="Voice" + label_width="60" layout="topleft" - left="30" + left="100" name="Voice Volume" show_text="false" - top_pad="5" + slider_label.halign="right" + top_pad="-15" volume="true" - width="300"> + width="250"> <slider.commit_callback function="Pref.setControlFalse" parameter="MuteVoice" /> </slider> <button control_name="MuteVoice" + enabled_control="EnableVoiceChat" disabled_control="MuteAudio" follows="top|right" - height="16" - image_selected="icn_speaker-muted_dark.tga" - image_unselected="icn_speaker_dark.tga" + height="18" + image_selected="parcel_drk_VoiceNo" + image_unselected="parcel_drk_Voice" is_toggle="true" layout="topleft" - left_pad="30" + left_pad="16" name="mute_voice" picture_style="true" tab_stop="false" - top_delta="-1" - width="25" /> + top_delta="-2" + width="22" /> <text type="string" length="1" follows="left|top" - height="16" + height="13" layout="topleft" - left="30" + left="170" name="Listen from" - top_pad="5" - width="100"> + width="200"> Listen from: </text> - <radio_group - enabled_control="EnableVoiceChat" - control_name="VoiceEarLocation" + <icon + follows="left" + height="18" + image_name="CameraView_Off" + name="camera_icon" + mouse_opaque="false" + visible="true" + width="18" /> + <icon + follows="left" + height="18" + image_name="Move_Walk_Off" + name="avatar_icon" + mouse_opaque="false" + visible="true" + width="18" /> + <radio_group + enabled_control="EnableVoiceChat" + control_name="VoiceEarLocation" draw_border="false" - height="40" - layout="topleft" - left_delta="50" - name="ear_location" - top_pad="0" - width="364"> + follows="left" + left_delta="20" + top = "210" + width="221" + height="38" + name="ear_location"> <radio_item height="16" - label="Listen from camera position" - layout="topleft" - left="3" + label="Camera position" + left_pad="1" + follows="topleft" name="0" - top="3" - width="315" /> + top_delta="-30" + width="200" /> <radio_item height="16" - label="Listen from avatar position" - layout="topleft" + follows="topleft" + label="Avatar position" left_delta="0" name="1" - top_delta="16" - width="315" /> + top_delta="19" + width="200" /> </radio_group> - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - left="30" - name="Sound out/in" - top_pad="2" - width="100"> - Sound out/in: - </text> <button control_name="ShowDeviceSettings" - follows="left|top" - height="20" + follows="left|bottom" + height="19" is_toggle="true" - label="Device settings" + label="Input / Output Devices" layout="topleft" - left_delta="55" + left="165" + top_pad="12" name="device_settings_btn" - top_pad="0" - width="155" /> + width="190" /> <panel + background_visible="true" + bg_alpha_color="DkGray" visiblity_control="ShowDeviceSettings" border="false" - follows="top|left" - height="260" + follows="top|left" + height="145" label="DeviceSettings" layout="topleft" left="0" name="Device Settings" - top_pad="5" - width="485"> + width="501"> + <icon + height="18" + image_name="Microphone_On" + left="80" + name="microphone_icon" + mouse_opaque="false" + top="7" + visible="true" + width="18" /> <text type="string" length="1" + font.style="BOLD" follows="left|top" height="16" layout="topleft" - left="30" - name="Input device (microphone):" - top_pad="0" + left_pad="3" + name="Input" width="200"> - Input device (microphone): + Input </text> <combo_box - height="18" + height="19" layout="topleft" - left_delta="55" + left="165" max_chars="128" name="voice_input_device" - top_pad="2" - width="225" /> - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - left="30" - name="Output device (speakers):" - top_pad="5" - width="200"> - Output device (speakers): - </text> - <combo_box - height="18" - layout="topleft" - left_delta="55" - max_chars="128" - name="voice_output_device" - top_pad="2" - width="225" /> - <text + top_pad="0" + width="200" /> + <text type="string" length="1" follows="left|top" height="16" layout="topleft" - left="30" - name="Input level:" + left="165" + name="My volume label" top_pad="10" width="200"> - Input level + My volume: </text> - <slider_bar + <slider follows="left|top" height="17" increment="0.05" initial_value="1.0" layout="topleft" - left_delta="125" + left="160" max_val="2" name="mic_volume_slider" tool_tip="Change the volume using this slider" - top_delta="-1" - width="175" /> + top_pad="0" + width="220" /> <text type="string" + text_color="EmphasisColor" length="1" follows="left|top" - height="20" + height="18" layout="topleft" left_pad="5" name="wait_text" - top_delta="1" - width="200"> + top_delta="0" + width="110"> Please wait </text> <locate @@ -446,16 +460,57 @@ name="bar4" top_delta="0" width="20" /> - <text + <!-- <text type="string" - height="40" + height="37" left="30" name="voice_intro_text1" top_pad="-4" - width="480" + width="410" word_wrap="true"> - Adjust the slider to control how loud you sound to other Residents. To test the input level, simply speak into your microphone. + Adjust the slider to control how loud you sound to other people. To test your volume, simply speak into your microphone + </text>--> + <icon + height="18" + image_name="parcel_lght_Voice" + left="80" + name="speaker_icon" + mouse_opaque="false" + top_pad="-8" + visible="true" + width="22" /> + <text + font.style="BOLD" + type="string" + length="1" + follows="left|top" + height="15" + layout="topleft" + left_pad="0" + name="Output" + width="200"> + Output </text> + <combo_box + height="19" + layout="topleft" + left="165" + max_chars="128" + name="voice_output_device" + top_pad="0" + width="200" /> + </panel> + <!-- Until new panel is hooked up to code, we need to be able to get to + the old window to change input devices. James --> + <button + follows="left|bottom" + label="Old" + name="legacy_device_window_btn" + height="16" + left="20" + top="-270" + width="40" + commit_callback.function="Floater.Show" + commit_callback.parameter="pref_voicedevicesettings" + /> </panel> - -</panel> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 8609d07be9..35d6478c48 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -1815,7 +1815,7 @@ this texture in your inventory <string name="broken_link" value=" (broken_link)" /> <string name="LoadingContents">Loading contents...</string> <string name="NoContents">No contents</string> - <string name="WornOnAttachmentPoint"> (worn on [ATTACHMENT_POINT])</string> + <string name="WornOnAttachmentPoint" value=" (worn on [ATTACHMENT_POINT])" /> <!-- Gestures labels --> <!-- use value="" because they have preceding spaces --> diff --git a/indra/newview/skins/default/xui/en/widgets/output_monitor.xml b/indra/newview/skins/default/xui/en/widgets/output_monitor.xml index 505c7ba936..98b3e2faaa 100644 --- a/indra/newview/skins/default/xui/en/widgets/output_monitor.xml +++ b/indra/newview/skins/default/xui/en/widgets/output_monitor.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <output_monitor - image_mute="mute_icon.tga" + image_mute="parcel_lght_VoiceNo" image_off="VoicePTT_Off" image_on="VoicePTT_On" image_level_1="VoicePTT_Lvl1" diff --git a/indra/newview/skins/default/xui/en/widgets/split_button.xml b/indra/newview/skins/default/xui/en/widgets/split_button.xml index c0d3c6d7f6..2ff9ada90a 100644 --- a/indra/newview/skins/default/xui/en/widgets/split_button.xml +++ b/indra/newview/skins/default/xui/en/widgets/split_button.xml @@ -1,24 +1,25 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<split_button +<split_button font="SansSerifSmall" arrow_position="left" follows="right|top"> - <split_button.arrow_button - name="Arrow Button" - label="" - font="SansSerifSmall" - scale_image="true" - image_selected="camera_presets/camera_presets_arrow.png" - image_unselected="camera_presets/camera_presets_arrow.png" - image_disabled_selected="camera_presets/camera_presets_arrow.png" - image_disabled="camera_presets/camera_presets_arrow.png" - width="10"/> <split_button.items_panel background_visible="true" border="true" bg_alpha_color="1 1 1 1" bg_opaq_color="1 1 1 1" + scale_image="false" + image_selected="SegmentedBtn_Left_Selected" + image_unselected="SegmentedBtn_Left_Off" layout="topleft" name="item_buttons" /> + <split_button.arrow_button + name="Arrow Button" + label="" + font="SansSerifSmall" + scale_image="false" + image_selected="SegmentedBtn_Right_Selected" + image_unselected="SegmentedBtn_Right_Off" + /> </split_button> 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 ); } //////////////////////////////////////////////////////////////////////////////// diff --git a/install.xml b/install.xml index 2ab458d88b..8e5c7e7ae4 100644 --- a/install.xml +++ b/install.xml @@ -948,23 +948,23 @@ anguage Infrstructure (CLI) international standard</string> <key>darwin</key> <map> <key>md5sum</key> - <string>1859f5f6335d702cc42aeb602669b55e</string> + <string>b40a13847ee773c9ee06f641fe0dd1c2</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-darwin-20090827.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-darwin-20091023.tar.bz2</uri> </map> <key>linux</key> <map> <key>md5sum</key> - <string>5e91fba63006aa5e6266496cf7497100</string> + <string>0d8aab394b4dc00aae44b4ada50c2d9f</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-linux-20090819a.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-linux-20091027.tar.bz2</uri> </map> <key>windows</key> <map> <key>md5sum</key> - <string>6c6282025d1b8cd9e70c0f858a14fdca</string> + <string>6f2f911545e5906edc87f4f3cda423a1</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-windows-20091001.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-windows-20091023.tar.bz2</uri> </map> </map> </map> |