summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorEli Linden <eli@lindenlab.com>2010-03-17 11:00:44 -0700
committerEli Linden <eli@lindenlab.com>2010-03-17 11:00:44 -0700
commitd59038e53587b97d2fc98115d28f8b83da5f5d1b (patch)
tree0fde9fb6c18bac6dce900bed376f21914dcc0b7f /indra
parent0cd91c3df6d1c7473763a14b3a1ace755be062b2 (diff)
parent6e761bb5f2fac9155b03b74008cfca141968ae6c (diff)
Merge
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llcursortypes.cpp3
-rw-r--r--indra/llcommon/llcursortypes.h3
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp24
-rw-r--r--indra/llplugin/llpluginclassmedia.h8
-rw-r--r--indra/llplugin/llpluginprocesschild.cpp4
-rw-r--r--indra/llplugin/llpluginprocesschild.h3
-rw-r--r--indra/llplugin/llpluginprocessparent.cpp9
-rw-r--r--indra/llplugin/llpluginprocessparent.h7
-rw-r--r--indra/llui/llurlentry.cpp58
-rw-r--r--indra/llui/llurlentry.h1
-rw-r--r--indra/llui/llview.cpp2
-rw-r--r--indra/llwindow/llwindowmacosx.cpp9
-rw-r--r--indra/llwindow/llwindowwin32.cpp6
-rw-r--r--indra/media_plugins/example/media_plugin_example.cpp26
-rw-r--r--indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp58
-rw-r--r--indra/media_plugins/quicktime/media_plugin_quicktime.cpp66
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp255
-rw-r--r--indra/newview/cursors_mac/UI_CURSOR_TOOLBUY.tifbin0 -> 59044 bytes
-rw-r--r--indra/newview/cursors_mac/UI_CURSOR_TOOLOPEN.tifbin0 -> 58560 bytes
-rw-r--r--indra/newview/cursors_mac/UI_CURSOR_TOOLSIT.tifbin0 -> 58464 bytes
-rw-r--r--indra/newview/llfloaterinventory.cpp36
-rw-r--r--indra/newview/llfloaterinventory.h4
-rw-r--r--indra/newview/llpanelmaininventory.cpp31
-rw-r--r--indra/newview/llpanelmaininventory.h3
-rw-r--r--indra/newview/lltextureview.cpp11
-rw-r--r--indra/newview/lltoolpie.cpp16
-rw-r--r--indra/newview/llviewermedia.cpp5
-rw-r--r--indra/newview/res/toolbuy.curbin0 -> 4286 bytes
-rw-r--r--indra/newview/res/toolopen.curbin0 -> 4286 bytes
-rw-r--r--indra/newview/res/toolsit.curbin0 -> 4286 bytes
-rw-r--r--indra/newview/res/viewerRes.rc31
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory.xml16
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml63
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml14
-rw-r--r--indra/test_apps/llplugintest/bookmarks.txt24
-rw-r--r--indra/test_apps/llplugintest/llmediaplugintest.cpp7
36 files changed, 476 insertions, 327 deletions
diff --git a/indra/llcommon/llcursortypes.cpp b/indra/llcommon/llcursortypes.cpp
index 23ede97af3..6751c235f6 100644
--- a/indra/llcommon/llcursortypes.cpp
+++ b/indra/llcommon/llcursortypes.cpp
@@ -72,6 +72,9 @@ ECursorType getCursorFromString(const std::string& cursor_string)
cursor_string_table["UI_CURSOR_TOOLPAUSE"] = UI_CURSOR_TOOLPAUSE;
cursor_string_table["UI_CURSOR_TOOLMEDIAOPEN"] = UI_CURSOR_TOOLMEDIAOPEN;
cursor_string_table["UI_CURSOR_PIPETTE"] = UI_CURSOR_PIPETTE;
+ cursor_string_table["UI_CURSOR_TOOLSIT"] = UI_CURSOR_TOOLSIT;
+ cursor_string_table["UI_CURSOR_TOOLBUY"] = UI_CURSOR_TOOLBUY;
+ cursor_string_table["UI_CURSOR_TOOLOPEN"] = UI_CURSOR_TOOLOPEN;
}
std::map<std::string,U32>::const_iterator iter = cursor_string_table.find(cursor_string);
diff --git a/indra/llcommon/llcursortypes.h b/indra/llcommon/llcursortypes.h
index a1b8178bfe..143c2c64cf 100644
--- a/indra/llcommon/llcursortypes.h
+++ b/indra/llcommon/llcursortypes.h
@@ -68,6 +68,9 @@ enum ECursorType {
UI_CURSOR_TOOLPAUSE,
UI_CURSOR_TOOLMEDIAOPEN,
UI_CURSOR_PIPETTE,
+ UI_CURSOR_TOOLSIT,
+ UI_CURSOR_TOOLBUY,
+ UI_CURSOR_TOOLOPEN,
UI_CURSOR_COUNT // Number of elements in this enum (NOT a cursor)
};
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index d48f4ad0f5..cb62e46271 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -65,15 +65,19 @@ LLPluginClassMedia::~LLPluginClassMedia()
reset();
}
-bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path, const std::string &language_code)
+bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug)
{
LL_DEBUGS("Plugin") << "launcher: " << launcher_filename << LL_ENDL;
LL_DEBUGS("Plugin") << "plugin: " << plugin_filename << LL_ENDL;
- LL_DEBUGS("Plugin") << "user_data_path: " << user_data_path << LL_ENDL;
mPlugin = new LLPluginProcessParent(this);
mPlugin->setSleepTime(mSleepTime);
- mPlugin->init(launcher_filename, plugin_filename, debug, user_data_path,language_code);
+
+ // Queue up the media init message -- it will be sent after all the currently queued messages.
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "init");
+ sendMessage(message);
+
+ mPlugin->init(launcher_filename, plugin_filename, debug);
return true;
}
@@ -678,6 +682,20 @@ void LLPluginClassMedia::paste()
sendMessage(message);
}
+void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_user_data_path");
+ message.setValue("path", user_data_path);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::setLanguageCode(const std::string &language_code)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_language_code");
+ message.setValue("language", language_code);
+ sendMessage(message);
+}
+
LLPluginClassMedia::ETargetType getTargetTypeFromLLQtWebkit(int target_type)
{
// convert a LinkTargetType value from llqtwebkit to an ETargetType
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index ce49241e84..6318c67f12 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -51,9 +51,7 @@ public:
// local initialization, called by the media manager when creating a source
virtual bool init(const std::string &launcher_filename,
const std::string &plugin_filename,
- bool debug,
- const std::string &user_data_path,
- const std::string &language_code);
+ bool debug);
// undoes everything init() didm called by the media manager when destroying a source
virtual void reset();
@@ -177,6 +175,10 @@ public:
void paste();
bool canPaste() const { return mCanPaste; };
+
+ // These can be called before init(), and they will be queued and sent before the media init message.
+ void setUserDataPath(const std::string &user_data_path);
+ void setLanguageCode(const std::string &language_code);
///////////////////////////////////
// media browser class functions
diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp
index 9b43ec0e3e..ccaf95b36d 100644
--- a/indra/llplugin/llpluginprocesschild.cpp
+++ b/indra/llplugin/llpluginprocesschild.cpp
@@ -155,8 +155,6 @@ void LLPluginProcessChild::idle(void)
{
setState(STATE_PLUGIN_INITIALIZING);
LLPluginMessage message("base", "init");
- message.setValue("user_data_path", mUserDataPath);
- message.setValue("language_code", mLanguageCode);
sendMessageToPlugin(message);
}
break;
@@ -329,8 +327,6 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
if(message_name == "load_plugin")
{
mPluginFile = parsed.getValue("file");
- mUserDataPath = parsed.getValue("user_data_path");
- mLanguageCode = parsed.getValue("language_code");
}
else if(message_name == "shm_add")
{
diff --git a/indra/llplugin/llpluginprocesschild.h b/indra/llplugin/llpluginprocesschild.h
index af76ec1fa5..0e5e85406a 100644
--- a/indra/llplugin/llpluginprocesschild.h
+++ b/indra/llplugin/llpluginprocesschild.h
@@ -98,9 +98,6 @@ private:
std::string mPluginFile;
- std::string mUserDataPath;
- std::string mLanguageCode;
-
LLPluginInstance *mInstance;
typedef std::map<std::string, LLPluginSharedMemory*> sharedMemoryRegionsType;
diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp
index 0ce2c759ba..895c858979 100644
--- a/indra/llplugin/llpluginprocessparent.cpp
+++ b/indra/llplugin/llpluginprocessparent.cpp
@@ -98,15 +98,12 @@ void LLPluginProcessParent::errorState(void)
setState(STATE_ERROR);
}
-void LLPluginProcessParent::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path, const std::string &language_code)
+void LLPluginProcessParent::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug)
{
mProcess.setExecutable(launcher_filename);
mPluginFile = plugin_filename;
mCPUUsage = 0.0f;
- mDebug = debug;
- mUserDataPath = user_data_path;
- mLanguageCode = language_code;
-
+ mDebug = debug;
setState(STATE_INITIALIZED);
}
@@ -363,8 +360,6 @@ void LLPluginProcessParent::idle(void)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "load_plugin");
message.setValue("file", mPluginFile);
- message.setValue("user_data_path", mUserDataPath);
- message.setValue("language_code", mLanguageCode);
sendMessage(message);
}
diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h
index 23702814c8..cc6c513615 100644
--- a/indra/llplugin/llpluginprocessparent.h
+++ b/indra/llplugin/llpluginprocessparent.h
@@ -61,9 +61,7 @@ public:
void init(const std::string &launcher_filename,
const std::string &plugin_filename,
- bool debug,
- const std::string &user_data_path,
- const std::string &language_code);
+ bool debug);
void idle(void);
@@ -148,9 +146,6 @@ private:
std::string mPluginFile;
- std::string mUserDataPath;
- std::string mLanguageCode;
-
LLPluginProcessParentOwner *mOwner;
typedef std::map<std::string, LLPluginSharedMemory*> sharedMemoryRegionsType;
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 35428e4227..e8e3459673 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -310,7 +310,6 @@ LLUrlEntryAgent::LLUrlEntryAgent()
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_agent.xml";
mIcon = "Generic_Person";
- mTooltip = LLTrans::getString("TooltipAgentUrl");
mColor = LLUIColorTable::instance().getColor("AgentLinkColor");
}
@@ -323,6 +322,38 @@ void LLUrlEntryAgent::onAgentNameReceived(const LLUUID& id,
callObservers(id.asString(), first + " " + last);
}
+std::string LLUrlEntryAgent::getTooltip(const std::string &string) const
+{
+ // return a tooltip corresponding to the URL type instead of the generic one
+ std::string url = getUrl(string);
+
+ if (LLStringUtil::endsWith(url, "/mute"))
+ {
+ return LLTrans::getString("TooltipAgentMute");
+ }
+ if (LLStringUtil::endsWith(url, "/unmute"))
+ {
+ return LLTrans::getString("TooltipAgentUnmute");
+ }
+ if (LLStringUtil::endsWith(url, "/im"))
+ {
+ return LLTrans::getString("TooltipAgentIM");
+ }
+ if (LLStringUtil::endsWith(url, "/pay"))
+ {
+ return LLTrans::getString("TooltipAgentPay");
+ }
+ if (LLStringUtil::endsWith(url, "/offerteleport"))
+ {
+ return LLTrans::getString("TooltipAgentOfferTeleport");
+ }
+ if (LLStringUtil::endsWith(url, "/requestfriend"))
+ {
+ return LLTrans::getString("TooltipAgentRequestFriend");
+ }
+ return LLTrans::getString("TooltipAgentUrl");
+}
+
std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
{
if (!gCacheName)
@@ -346,6 +377,31 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa
}
else if (gCacheName->getFullName(agent_id, full_name))
{
+ // customize label string based on agent SLapp suffix
+ if (LLStringUtil::endsWith(url, "/mute"))
+ {
+ return LLTrans::getString("SLappAgentMute") + " " + full_name;
+ }
+ if (LLStringUtil::endsWith(url, "/unmute"))
+ {
+ return LLTrans::getString("SLappAgentUnmute") + " " + full_name;
+ }
+ if (LLStringUtil::endsWith(url, "/im"))
+ {
+ return LLTrans::getString("SLappAgentIM") + " " + full_name;
+ }
+ if (LLStringUtil::endsWith(url, "/pay"))
+ {
+ return LLTrans::getString("SLappAgentPay") + " " + full_name;
+ }
+ if (LLStringUtil::endsWith(url, "/offerteleport"))
+ {
+ return LLTrans::getString("SLappAgentOfferTeleport") + " " + full_name;
+ }
+ if (LLStringUtil::endsWith(url, "/requestfriend"))
+ {
+ return LLTrans::getString("SLappAgentRequestFriend") + " " + full_name;
+ }
return full_name;
}
else
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index c947ef7259..84d0968779 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -169,6 +169,7 @@ class LLUrlEntryAgent : public LLUrlEntryBase
public:
LLUrlEntryAgent();
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
+ /*virtual*/ std::string getTooltip(const std::string &string) const;
private:
void onAgentNameReceived(const LLUUID& id, const std::string& first,
const std::string& last, BOOL is_group);
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index d34083a384..57beb71a01 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -152,7 +152,7 @@ LLView::~LLView()
//llinfos << "Deleting view " << mName << ":" << (void*) this << llendl;
if (LLView::sIsDrawing)
{
- llwarns << "Deleting view " << mName << " during UI draw() phase" << llendl;
+ lldebugs << "Deleting view " << mName << " during UI draw() phase" << llendl;
}
// llassert(LLView::sIsDrawing == FALSE);
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 924acaf148..224314a490 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -2807,6 +2807,9 @@ const char* cursorIDToName(int id)
case UI_CURSOR_TOOLPAUSE: return "UI_CURSOR_TOOLPAUSE";
case UI_CURSOR_TOOLMEDIAOPEN: return "UI_CURSOR_TOOLMEDIAOPEN";
case UI_CURSOR_PIPETTE: return "UI_CURSOR_PIPETTE";
+ case UI_CURSOR_TOOLSIT: return "UI_CURSOR_TOOLSIT";
+ case UI_CURSOR_TOOLBUY: return "UI_CURSOR_TOOLBUY";
+ case UI_CURSOR_TOOLOPEN: return "UI_CURSOR_TOOLOPEN";
}
llerrs << "cursorIDToName: unknown cursor id" << id << llendl;
@@ -2909,6 +2912,9 @@ void LLWindowMacOSX::setCursor(ECursorType cursor)
case UI_CURSOR_TOOLPLAY:
case UI_CURSOR_TOOLPAUSE:
case UI_CURSOR_TOOLMEDIAOPEN:
+ case UI_CURSOR_TOOLSIT:
+ case UI_CURSOR_TOOLBUY:
+ case UI_CURSOR_TOOLOPEN:
result = setImageCursor(gCursors[cursor]);
break;
@@ -2950,6 +2956,9 @@ void LLWindowMacOSX::initCursors()
initPixmapCursor(UI_CURSOR_TOOLPLAY, 1, 1);
initPixmapCursor(UI_CURSOR_TOOLPAUSE, 1, 1);
initPixmapCursor(UI_CURSOR_TOOLMEDIAOPEN, 1, 1);
+ initPixmapCursor(UI_CURSOR_TOOLSIT, 20, 15);
+ initPixmapCursor(UI_CURSOR_TOOLBUY, 20, 15);
+ initPixmapCursor(UI_CURSOR_TOOLOPEN, 20, 15);
initPixmapCursor(UI_CURSOR_SIZENWSE, 10, 10);
initPixmapCursor(UI_CURSOR_SIZENESW, 10, 10);
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 4be5d06c2b..5f778d6208 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -46,6 +46,7 @@
#include "llerror.h"
#include "llgl.h"
#include "llstring.h"
+#include "lldir.h"
// System includes
#include <commdlg.h>
@@ -1545,6 +1546,11 @@ void LLWindowWin32::initCursors()
mCursor[ UI_CURSOR_PIPETTE ] = LoadCursor(module, TEXT("TOOLPIPETTE"));
// Color cursors
+ gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "res", "toolbuy.cur");
+
+ mCursor[UI_CURSOR_TOOLSIT] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + "res" + gDirUtilp->getDirDelimiter() + "toolsit.cur").c_str());
+ mCursor[UI_CURSOR_TOOLBUY] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + "res" + gDirUtilp->getDirDelimiter() + "toolbuy.cur").c_str());
+ mCursor[UI_CURSOR_TOOLOPEN] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + "res" + gDirUtilp->getDirDelimiter() + "toolopen.cur").c_str());
mCursor[UI_CURSOR_TOOLPLAY] = loadColorCursor(TEXT("TOOLPLAY"));
mCursor[UI_CURSOR_TOOLPAUSE] = loadColorCursor(TEXT("TOOLPAUSE"));
mCursor[UI_CURSOR_TOOLMEDIAOPEN] = loadColorCursor(TEXT("TOOLMEDIAOPEN"));
diff --git a/indra/media_plugins/example/media_plugin_example.cpp b/indra/media_plugins/example/media_plugin_example.cpp
index f5b077fea0..49bbca6c52 100644
--- a/indra/media_plugins/example/media_plugin_example.cpp
+++ b/indra/media_plugins/example/media_plugin_example.cpp
@@ -119,17 +119,6 @@ void MediaPluginExample::receiveMessage( const char* message_string )
std::string plugin_version = "Example media plugin, Example Version 1.0.0.0";
message.setValue( "plugin_version", plugin_version );
sendMessage( message );
-
- // Plugin gets to decide the texture parameters to use.
- message.setMessage( LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params" );
- message.setValueS32( "default_width", mWidth );
- message.setValueS32( "default_height", mHeight );
- message.setValueS32( "depth", mDepth );
- message.setValueU32( "internalformat", GL_RGBA );
- message.setValueU32( "format", GL_RGBA );
- message.setValueU32( "type", GL_UNSIGNED_BYTE );
- message.setValueBoolean( "coords_opengl", false );
- sendMessage( message );
}
else
if ( message_name == "idle" )
@@ -191,7 +180,20 @@ void MediaPluginExample::receiveMessage( const char* message_string )
else
if ( message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA )
{
- if ( message_name == "size_change" )
+ if ( message_name == "init" )
+ {
+ // Plugin gets to decide the texture parameters to use.
+ LLPluginMessage message( LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params" );
+ message.setValueS32( "default_width", mWidth );
+ message.setValueS32( "default_height", mHeight );
+ message.setValueS32( "depth", mDepth );
+ message.setValueU32( "internalformat", GL_RGBA );
+ message.setValueU32( "format", GL_RGBA );
+ message.setValueU32( "type", GL_UNSIGNED_BYTE );
+ message.setValueBoolean( "coords_opengl", false );
+ sendMessage( message );
+ }
+ else if ( message_name == "size_change" )
{
std::string name = message_in.getValue( "name" );
S32 width = message_in.getValueS32( "width" );
diff --git a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
index 26173314a7..a69da3ff5a 100644
--- a/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
+++ b/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
@@ -946,33 +946,6 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string)
message.setValue("plugin_version", getVersion());
sendMessage(message);
-
- // Plugin gets to decide the texture parameters to use.
- message.setMessage(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
- // lame to have to decide this now, it depends on the movie. Oh well.
- mDepth = 4;
-
- mCurrentWidth = 1;
- mCurrentHeight = 1;
- mPreviousWidth = 1;
- mPreviousHeight = 1;
- mNaturalWidth = 1;
- mNaturalHeight = 1;
- mWidth = 1;
- mHeight = 1;
- mTextureWidth = 1;
- mTextureHeight = 1;
-
- message.setValueU32("format", GL_RGBA);
- message.setValueU32("type", GL_UNSIGNED_INT_8_8_8_8_REV);
-
- message.setValueS32("depth", mDepth);
- message.setValueS32("default_width", mWidth);
- message.setValueS32("default_height", mHeight);
- message.setValueU32("internalformat", GL_RGBA8);
- message.setValueBoolean("coords_opengl", true); // true == use OpenGL-style coordinates, false == (0,0) is upper left.
- message.setValueBoolean("allow_downsample", true); // we respond with grace and performance if asked to downscale
- sendMessage(message);
}
else if(message_name == "idle")
{
@@ -1037,7 +1010,36 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string)
}
else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
{
- if(message_name == "size_change")
+ if(message_name == "init")
+ {
+ // Plugin gets to decide the texture parameters to use.
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
+ // lame to have to decide this now, it depends on the movie. Oh well.
+ mDepth = 4;
+
+ mCurrentWidth = 1;
+ mCurrentHeight = 1;
+ mPreviousWidth = 1;
+ mPreviousHeight = 1;
+ mNaturalWidth = 1;
+ mNaturalHeight = 1;
+ mWidth = 1;
+ mHeight = 1;
+ mTextureWidth = 1;
+ mTextureHeight = 1;
+
+ message.setValueU32("format", GL_RGBA);
+ message.setValueU32("type", GL_UNSIGNED_INT_8_8_8_8_REV);
+
+ message.setValueS32("depth", mDepth);
+ message.setValueS32("default_width", mWidth);
+ message.setValueS32("default_height", mHeight);
+ message.setValueU32("internalformat", GL_RGBA8);
+ message.setValueBoolean("coords_opengl", true); // true == use OpenGL-style coordinates, false == (0,0) is upper left.
+ message.setValueBoolean("allow_downsample", true); // we respond with grace and performance if asked to downscale
+ sendMessage(message);
+ }
+ else if(message_name == "size_change")
{
std::string name = message_in.getValue("name");
S32 width = message_in.getValueS32("width");
diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
index e230fcc280..1f88301ca7 100644
--- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
+++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp
@@ -859,36 +859,6 @@ void MediaPluginQuickTime::receiveMessage(const char *message_string)
plugin_version += codec.str();
message.setValue("plugin_version", plugin_version);
sendMessage(message);
-
- // Plugin gets to decide the texture parameters to use.
- message.setMessage(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
- #if defined(LL_WINDOWS)
- // Values for Windows
- mDepth = 3;
- message.setValueU32("format", GL_RGB);
- message.setValueU32("type", GL_UNSIGNED_BYTE);
-
- // We really want to pad the texture width to a multiple of 32 bytes, but since we're using 3-byte pixels, it doesn't come out even.
- // Padding to a multiple of 3*32 guarantees it'll divide out properly.
- message.setValueU32("padding", 32 * 3);
- #else
- // Values for Mac
- mDepth = 4;
- message.setValueU32("format", GL_BGRA_EXT);
- #ifdef __BIG_ENDIAN__
- message.setValueU32("type", GL_UNSIGNED_INT_8_8_8_8_REV );
- #else
- message.setValueU32("type", GL_UNSIGNED_INT_8_8_8_8);
- #endif
-
- // Pad texture width to a multiple of 32 bytes, to line up with cache lines.
- message.setValueU32("padding", 32);
- #endif
- message.setValueS32("depth", mDepth);
- message.setValueU32("internalformat", GL_RGB);
- message.setValueBoolean("coords_opengl", true); // true == use OpenGL-style coordinates, false == (0,0) is upper left.
- message.setValueBoolean("allow_downsample", true);
- sendMessage(message);
}
else if(message_name == "idle")
{
@@ -953,7 +923,41 @@ void MediaPluginQuickTime::receiveMessage(const char *message_string)
}
else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
{
- if(message_name == "size_change")
+ if(message_name == "init")
+ {
+ // This is the media init message -- all necessary data for initialization should have been received.
+
+ // Plugin gets to decide the texture parameters to use.
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
+ #if defined(LL_WINDOWS)
+ // Values for Windows
+ mDepth = 3;
+ message.setValueU32("format", GL_RGB);
+ message.setValueU32("type", GL_UNSIGNED_BYTE);
+
+ // We really want to pad the texture width to a multiple of 32 bytes, but since we're using 3-byte pixels, it doesn't come out even.
+ // Padding to a multiple of 3*32 guarantees it'll divide out properly.
+ message.setValueU32("padding", 32 * 3);
+ #else
+ // Values for Mac
+ mDepth = 4;
+ message.setValueU32("format", GL_BGRA_EXT);
+ #ifdef __BIG_ENDIAN__
+ message.setValueU32("type", GL_UNSIGNED_INT_8_8_8_8_REV );
+ #else
+ message.setValueU32("type", GL_UNSIGNED_INT_8_8_8_8);
+ #endif
+
+ // Pad texture width to a multiple of 32 bytes, to line up with cache lines.
+ message.setValueU32("padding", 32);
+ #endif
+ message.setValueS32("depth", mDepth);
+ message.setValueU32("internalformat", GL_RGB);
+ message.setValueBoolean("coords_opengl", true); // true == use OpenGL-style coordinates, false == (0,0) is upper left.
+ message.setValueBoolean("allow_downsample", true);
+ sendMessage(message);
+ }
+ else if(message_name == "size_change")
{
std::string name = message_in.getValue("name");
S32 width = message_in.getValueS32("width");
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index afde904be6..24c53638d2 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -88,10 +88,12 @@ public:
private:
std::string mProfileDir;
+ std::string mHostLanguage;
enum
{
- INIT_STATE_UNINITIALIZED, // Browser instance hasn't been set up yet
+ INIT_STATE_UNINITIALIZED, // LLQtWebkit hasn't been set up yet
+ INIT_STATE_INITIALIZED, // LLQtWebkit has been set up, but no browser window has been created yet.
INIT_STATE_NAVIGATING, // Browser instance has been set up and initial navigate to about:blank has been issued
INIT_STATE_NAVIGATE_COMPLETE, // initial navigate to about:blank has completed
INIT_STATE_WAIT_REDRAW, // First real navigate begin has been received, waiting for page changed event to start handling redraws
@@ -191,13 +193,6 @@ private:
if ( mInitState > INIT_STATE_UNINITIALIZED )
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 ))
@@ -208,12 +203,12 @@ private:
std::string application_dir = std::string( cwd );
#if LL_DARWIN
- // When running under the Xcode debugger, there's a setting called "Break on Debugger()/DebugStr()" which defaults to being turned on.
- // This causes the environment variable USERBREAK to be set to 1, which causes these legacy calls to break into the debugger.
- // This wouldn't cause any problems except for the fact that the current release version of the Flash plugin has a call to Debugger() in it
- // which gets hit when the plugin is probed by webkit.
- // Unsetting the environment variable here works around this issue.
- unsetenv("USERBREAK");
+ // When running under the Xcode debugger, there's a setting called "Break on Debugger()/DebugStr()" which defaults to being turned on.
+ // This causes the environment variable USERBREAK to be set to 1, which causes these legacy calls to break into the debugger.
+ // This wouldn't cause any problems except for the fact that the current release version of the Flash plugin has a call to Debugger() in it
+ // which gets hit when the plugin is probed by webkit.
+ // Unsetting the environment variable here works around this issue.
+ unsetenv("USERBREAK");
#endif
#if LL_WINDOWS
@@ -254,66 +249,92 @@ private:
bool result = LLQtWebKit::getInstance()->init( application_dir, component_dir, mProfileDir, native_window_handle );
if ( result )
{
- // create single browser window
- mBrowserWindowId = LLQtWebKit::getInstance()->createBrowserWindow( mWidth, mHeight );
+ mInitState = INIT_STATE_INITIALIZED;
+
+ return true;
+ };
+
+ return false;
+ };
+
+ ////////////////////////////////////////////////////////////////////////////////
+ //
+ bool initBrowserWindow()
+ {
+ // already initialized
+ if ( mInitState > INIT_STATE_INITIALIZED )
+ 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 host language before creating browser window
+ if(!mHostLanguage.empty())
+ {
+ LLQtWebKit::getInstance()->setHostLanguage(mHostLanguage);
+ }
+
+ // create single browser window
+ mBrowserWindowId = LLQtWebKit::getInstance()->createBrowserWindow( mWidth, mHeight );
#if LL_WINDOWS
- // Enable plugins
- LLQtWebKit::getInstance()->enablePlugins(true);
+ // Enable plugins
+ LLQtWebKit::getInstance()->enablePlugins(true);
#elif LL_DARWIN
- // Enable plugins
- LLQtWebKit::getInstance()->enablePlugins(true);
+ // Enable plugins
+ LLQtWebKit::getInstance()->enablePlugins(true);
#elif LL_LINUX
- // Enable plugins
- LLQtWebKit::getInstance()->enablePlugins(true);
+ // Enable plugins
+ LLQtWebKit::getInstance()->enablePlugins(true);
#endif
- // Enable cookies
- LLQtWebKit::getInstance()->enableCookies( true );
+ // Enable cookies
+ LLQtWebKit::getInstance()->enableCookies( true );
- // tell LLQtWebKit about the size of the browser window
- LLQtWebKit::getInstance()->setSize( mBrowserWindowId, mWidth, mHeight );
+ // 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 );
+ // observer events that LLQtWebKit emits
+ LLQtWebKit::getInstance()->addObserver( mBrowserWindowId, this );
- // append details to agent string
- LLQtWebKit::getInstance()->setBrowserAgentId( "LLPluginMedia Web Browser" );
+ // append details to agent string
+ LLQtWebKit::getInstance()->setBrowserAgentId( "LLPluginMedia Web Browser" );
#if !LL_QTWEBKIT_USES_PIXMAPS
- // don't flip bitmap
- LLQtWebKit::getInstance()->flipWindow( mBrowserWindowId, true );
+ // don't flip bitmap
+ LLQtWebKit::getInstance()->flipWindow( mBrowserWindowId, true );
#endif // !LL_QTWEBKIT_USES_PIXMAPS
-
- // set background color
- // convert background color channels from [0.0, 1.0] to [0, 255];
- LLQtWebKit::getInstance()->setBackgroundColor( mBrowserWindowId, int(mBackgroundR * 255.0f), int(mBackgroundG * 255.0f), int(mBackgroundB * 255.0f) );
-
- // Set state _before_ starting the navigate, since onNavigateBegin might get called before this call returns.
- setInitState(INIT_STATE_NAVIGATING);
-
- // Don't do this here -- it causes the dreaded "white flash" when loading a browser instance.
- // FIXME: Re-added this because navigating to a "page" initializes things correctly - especially
- // for the HTTP AUTH dialog issues (DEV-41731). Will fix at a later date.
- // Build a data URL like this: "data:text/html,%3Chtml%3E%3Cbody bgcolor=%22#RRGGBB%22%3E%3C/body%3E%3C/html%3E"
- // where RRGGBB is the background color in HTML style
- std::stringstream url;
-
- url << "data:text/html,%3Chtml%3E%3Cbody%20bgcolor=%22#";
- // convert background color channels from [0.0, 1.0] to [0, 255];
- url << std::setfill('0') << std::setw(2) << std::hex << int(mBackgroundR * 255.0f);
- url << std::setfill('0') << std::setw(2) << std::hex << int(mBackgroundG * 255.0f);
- url << std::setfill('0') << std::setw(2) << std::hex << int(mBackgroundB * 255.0f);
- url << "%22%3E%3C/body%3E%3C/html%3E";
-
- lldebugs << "data url is: " << url.str() << llendl;
-
- LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, url.str() );
-// LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, "about:blank" );
-
- return true;
- };
+
+ // set background color
+ // convert background color channels from [0.0, 1.0] to [0, 255];
+ LLQtWebKit::getInstance()->setBackgroundColor( mBrowserWindowId, int(mBackgroundR * 255.0f), int(mBackgroundG * 255.0f), int(mBackgroundB * 255.0f) );
+
+ // Set state _before_ starting the navigate, since onNavigateBegin might get called before this call returns.
+ setInitState(INIT_STATE_NAVIGATING);
+
+ // Don't do this here -- it causes the dreaded "white flash" when loading a browser instance.
+ // FIXME: Re-added this because navigating to a "page" initializes things correctly - especially
+ // for the HTTP AUTH dialog issues (DEV-41731). Will fix at a later date.
+ // Build a data URL like this: "data:text/html,%3Chtml%3E%3Cbody bgcolor=%22#RRGGBB%22%3E%3C/body%3E%3C/html%3E"
+ // where RRGGBB is the background color in HTML style
+ std::stringstream url;
+
+ url << "data:text/html,%3Chtml%3E%3Cbody%20bgcolor=%22#";
+ // convert background color channels from [0.0, 1.0] to [0, 255];
+ url << std::setfill('0') << std::setw(2) << std::hex << int(mBackgroundR * 255.0f);
+ url << std::setfill('0') << std::setw(2) << std::hex << int(mBackgroundG * 255.0f);
+ url << std::setfill('0') << std::setw(2) << std::hex << int(mBackgroundB * 255.0f);
+ url << "%22%3E%3C/body%3E%3C/html%3E";
+
+ lldebugs << "data url is: " << url.str() << llendl;
+
+ LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, url.str() );
+// LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, "about:blank" );
- return false;
- };
+ return true;
+ }
void setVolume(F32 vol);
@@ -676,9 +697,6 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
{
if(message_name == "init")
{
- std::string user_data_path = message_in.getValue("user_data_path"); // n.b. always has trailing platform-specific dir-delimiter
- mProfileDir = user_data_path + "browser_profile";
-
LLPluginMessage message("base", "init_response");
LLSD versions = LLSD::emptyMap();
versions[LLPLUGIN_MESSAGE_CLASS_BASE] = LLPLUGIN_MESSAGE_CLASS_BASE_VERSION;
@@ -690,23 +708,6 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
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);
-#if LL_QTWEBKIT_USES_PIXMAPS
- message.setValueU32("format", GL_BGRA_EXT); // I hope this isn't system-dependant... is it? If so, we'll have to check the root window's pixel layout or something... yuck.
-#else
- message.setValueU32("format", GL_RGBA);
-#endif // LL_QTWEBKIT_USES_PIXMAPS
- message.setValueU32("type", GL_UNSIGNED_BYTE);
- message.setValueBoolean("coords_opengl", true);
- sendMessage(message);
}
else if(message_name == "idle")
{
@@ -771,7 +772,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
// std::cerr << "MediaPluginWebKit::receiveMessage: unknown base message: " << message_name << std::endl;
}
}
- else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME)
+ else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME)
{
if(message_name == "set_volume")
{
@@ -781,7 +782,50 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
}
else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
{
- if(message_name == "size_change")
+ if(message_name == "init")
+ {
+ // This is the media init message -- all necessary data for initialization should have been received.
+ if(initBrowser())
+ {
+
+ // Plugin gets to decide the texture parameters to use.
+ mDepth = 4;
+
+ LLPluginMessage message(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);
+ #if LL_QTWEBKIT_USES_PIXMAPS
+ message.setValueU32("format", GL_BGRA_EXT); // I hope this isn't system-dependant... is it? If so, we'll have to check the root window's pixel layout or something... yuck.
+ #else
+ message.setValueU32("format", GL_RGBA);
+ #endif // LL_QTWEBKIT_USES_PIXMAPS
+ message.setValueU32("type", GL_UNSIGNED_BYTE);
+ message.setValueBoolean("coords_opengl", true);
+ sendMessage(message);
+ }
+ else
+ {
+ // if initialization failed, we're done.
+ mDeleteMe = true;
+ }
+
+ }
+ else if(message_name == "set_user_data_path")
+ {
+ std::string user_data_path = message_in.getValue("path"); // n.b. always has trailing platform-specific dir-delimiter
+ mProfileDir = user_data_path + "browser_profile";
+
+ // FIXME: Should we do anything with this if it comes in after the browser has been initialized?
+ }
+ else if(message_name == "set_language_code")
+ {
+ mHostLanguage = message_in.getValue("language");
+
+ // FIXME: Should we do anything with this if it comes in after the browser has been initialized?
+ }
+ else if(message_name == "size_change")
{
std::string name = message_in.getValue("name");
S32 width = message_in.getValueS32("width");
@@ -803,29 +847,36 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
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)
+ if(initBrowserWindow())
{
- texture_width = real_width;
+
+ // 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;
+ }
}
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;
+ // Setting up the browser window failed. This is a fatal error.
mDeleteMe = true;
- return;
}
+
mTextureWidth = texture_width;
mTextureHeight = texture_height;
diff --git a/indra/newview/cursors_mac/UI_CURSOR_TOOLBUY.tif b/indra/newview/cursors_mac/UI_CURSOR_TOOLBUY.tif
new file mode 100644
index 0000000000..f366026c33
--- /dev/null
+++ b/indra/newview/cursors_mac/UI_CURSOR_TOOLBUY.tif
Binary files differ
diff --git a/indra/newview/cursors_mac/UI_CURSOR_TOOLOPEN.tif b/indra/newview/cursors_mac/UI_CURSOR_TOOLOPEN.tif
new file mode 100644
index 0000000000..e9e6a20cd9
--- /dev/null
+++ b/indra/newview/cursors_mac/UI_CURSOR_TOOLOPEN.tif
Binary files differ
diff --git a/indra/newview/cursors_mac/UI_CURSOR_TOOLSIT.tif b/indra/newview/cursors_mac/UI_CURSOR_TOOLSIT.tif
new file mode 100644
index 0000000000..bea3d9d442
--- /dev/null
+++ b/indra/newview/cursors_mac/UI_CURSOR_TOOLSIT.tif
Binary files differ
diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp
index 844f0ac509..6842d3dc74 100644
--- a/indra/newview/llfloaterinventory.cpp
+++ b/indra/newview/llfloaterinventory.cpp
@@ -64,42 +64,6 @@ BOOL LLFloaterInventory::postBuild()
return TRUE;
}
-
-void LLFloaterInventory::draw()
-{
- updateTitle();
- LLFloater::draw();
-}
-
-void LLFloaterInventory::updateTitle()
-{
- LLLocale locale(LLLocale::USER_LOCALE);
- std::string item_count_string;
- LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
-
- LLStringUtil::format_map_t string_args;
- string_args["[ITEM_COUNT]"] = item_count_string;
- string_args["[FILTER]"] = mPanelMainInventory->getFilterText();
-
- if (LLInventoryModel::backgroundFetchActive())
- {
- setTitle(getString("TitleFetching", string_args));
- }
- else if (LLInventoryModel::isEverythingFetched())
- {
- setTitle(getString("TitleCompleted", string_args));
- }
- else
- {
- setTitle(getString("Title"));
- }
-}
-
-void LLFloaterInventory::changed(U32 mask)
-{
- updateTitle();
-}
-
LLInventoryPanel* LLFloaterInventory::getPanel()
{
if (mPanelMainInventory)
diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h
index b661c391a7..473d2b189d 100644
--- a/indra/newview/llfloaterinventory.h
+++ b/indra/newview/llfloaterinventory.h
@@ -63,13 +63,9 @@ public:
static void cleanup();
// Inherited functionality
- /*virtual*/ void changed(U32 mask);
- /*virtual*/ void draw();
/*virtual*/ void onOpen(const LLSD& key);
LLInventoryPanel* getPanel();
-protected:
- void updateTitle();
private:
LLPanelMainInventory* mPanelMainInventory;
};
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 421c9df9a1..d40141c91d 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -44,6 +44,7 @@
#include "llfiltereditor.h"
#include "llfloaterreg.h"
#include "llpreviewtexture.h"
+#include "llresmgr.h"
#include "llscrollcontainer.h"
#include "llsdserialize.h"
#include "llspinctrl.h"
@@ -538,7 +539,7 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
// virtual
void LLPanelMainInventory::changed(U32)
{
- // empty, but must have this defined for abstract base class.
+ updateItemcountText();
}
@@ -550,6 +551,34 @@ void LLPanelMainInventory::draw()
mFilterEditor->setText(mFilterSubString);
}
LLPanel::draw();
+ updateItemcountText();
+}
+
+void LLPanelMainInventory::updateItemcountText()
+{
+ LLLocale locale(LLLocale::USER_LOCALE);
+ std::string item_count_string;
+ LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
+
+ LLStringUtil::format_map_t string_args;
+ string_args["[ITEM_COUNT]"] = item_count_string;
+ string_args["[FILTER]"] = getFilterText();
+
+ std::string text = "";
+
+ if (LLInventoryModel::backgroundFetchActive())
+ {
+ text = getString("ItemcountFetching", string_args);
+ }
+ else if (LLInventoryModel::isEverythingFetched())
+ {
+ text = getString("ItemcountCompleted", string_args);
+ }
+ else
+ {
+ text = getString("ItemcountUnknown");
+ }
+ childSetText("ItemcountText",text);
}
void LLPanelMainInventory::setFilterTextFromFilter()
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index d9ea0da2da..b43e057f83 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -113,7 +113,8 @@ protected:
void setSortBy(const LLSD& userdata);
void saveTexture(const LLSD& userdata);
bool isSaveTextureEnabled(const LLSD& userdata);
-
+ void updateItemcountText();
+
private:
LLFloaterInventoryFinder* getFinder();
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 6cd8a78b25..43913f3632 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -660,8 +660,9 @@ struct compare_decode_pair
struct KillView
{
- void operator()(LLView* viewp) const
+ void operator()(LLView* viewp)
{
+ viewp->getParent()->removeChild(viewp);
viewp->die();
}
};
@@ -676,8 +677,12 @@ void LLTextureView::draw()
for_each(mTextureBars.begin(), mTextureBars.end(), KillView());
mTextureBars.clear();
- delete mGLTexMemBar;
- mGLTexMemBar = 0;
+ if (mGLTexMemBar)
+ {
+ removeChild(mGLTexMemBar);
+ mGLTexMemBar->die();
+ mGLTexMemBar = 0;
+ }
typedef std::multiset<decode_pair_t, compare_decode_pair > display_list_t;
display_list_t display_image_list;
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 2f4a69a53c..d15db536e6 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -412,24 +412,24 @@ ECursorType cursor_from_object(LLViewerObject* object)
case CLICK_ACTION_SIT:
if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // not already sitting?
{
- cursor = UI_CURSOR_HAND;
+ cursor = UI_CURSOR_TOOLSIT;
}
break;
case CLICK_ACTION_BUY:
- cursor = UI_CURSOR_HAND;
+ cursor = UI_CURSOR_TOOLBUY;
break;
case CLICK_ACTION_OPEN:
// Open always opens the parent.
if (parent && parent->allowOpen())
{
- cursor = UI_CURSOR_HAND;
+ cursor = UI_CURSOR_TOOLOPEN;
}
break;
case CLICK_ACTION_PAY:
if ((object && object->flagTakesMoney())
|| (parent && parent->flagTakesMoney()))
{
- cursor = UI_CURSOR_HAND;
+ cursor = UI_CURSOR_TOOLBUY;
}
break;
case CLICK_ACTION_ZOOM:
@@ -964,7 +964,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
}
}
}
-
+
// Avoid showing tip over media that's displaying unless it's for sale
// also check the primary node since sometimes it can have an action even though
@@ -972,9 +972,9 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
bool needs_tip = (!is_media_displaying ||
for_sale) &&
- (has_media ||
- needs_tooltip(nodep) ||
- needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode()));
+ (has_media ||
+ needs_tooltip(nodep) ||
+ needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode()));
if (show_all_object_tips || needs_tip)
{
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 64dcd62a6a..b9509a98f5 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1258,8 +1258,9 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
{
LLPluginClassMedia* media_source = new LLPluginClassMedia(owner);
media_source->setSize(default_width, default_height);
- std::string language_code = LLUI::getLanguage();
- if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"), user_data_path, language_code))
+ media_source->setUserDataPath(user_data_path);
+ media_source->setLanguageCode(LLUI::getLanguage());
+ if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins")))
{
return media_source;
}
diff --git a/indra/newview/res/toolbuy.cur b/indra/newview/res/toolbuy.cur
new file mode 100644
index 0000000000..7fd552a78e
--- /dev/null
+++ b/indra/newview/res/toolbuy.cur
Binary files differ
diff --git a/indra/newview/res/toolopen.cur b/indra/newview/res/toolopen.cur
new file mode 100644
index 0000000000..1562f5bc95
--- /dev/null
+++ b/indra/newview/res/toolopen.cur
Binary files differ
diff --git a/indra/newview/res/toolsit.cur b/indra/newview/res/toolsit.cur
new file mode 100644
index 0000000000..a1f99cfe6d
--- /dev/null
+++ b/indra/newview/res/toolsit.cur
Binary files differ
diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc
index 38291e45c9..7a965cf57e 100644
--- a/indra/newview/res/viewerRes.rc
+++ b/indra/newview/res/viewerRes.rc
@@ -2,19 +2,12 @@
//
#include "resource.h"
-#ifdef IDC_STATIC
-#undef IDC_STATIC
-#endif
-#define IDC_STATIC (-1)
-#include "winresrc.h"
-
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
-// Commented out because it only compiles if you have MFC installed.
-//#include "winres.h"
+#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -34,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
@@ -84,9 +77,8 @@ END
//
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
+GUIDELINES DESIGNINFO
BEGIN
-
"SPLASHSCREEN", DIALOG
BEGIN
LEFTMARGIN, 7
@@ -127,6 +119,9 @@ TOOLPIPETTE CURSOR "toolpipette.cur"
TOOLPLAY CURSOR "toolplay.cur"
TOOLPAUSE CURSOR "toolpause.cur"
TOOLMEDIAOPEN CURSOR "toolmediaopen.cur"
+TOOLOPEN CURSOR "toolopen.cur"
+TOOLSIT CURSOR "toolsit.cur"
+TOOLBUY CURSOR "toolbuy.cur"
/////////////////////////////////////////////////////////////////////////////
//
@@ -134,8 +129,8 @@ TOOLMEDIAOPEN CURSOR "toolmediaopen.cur"
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,0,200030
- PRODUCTVERSION 2,0,0,200030
+ FILEVERSION 2,0,0,3422
+ PRODUCTVERSION 2,0,0,3422
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -166,12 +161,6 @@ BEGIN
END
END
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
-
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/skins/default/xui/en/floater_inventory.xml b/indra/newview/skins/default/xui/en/floater_inventory.xml
index 0d381fe5cb..ba2e0d3277 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory.xml
@@ -14,22 +14,6 @@
single_instance="false"
title="MY INVENTORY"
width="467">
- <floater.string
- name="Title">
- MY INVENTORY
- </floater.string>
- <floater.string
- name="TitleFetching">
- MY INVENTORY (Fetching [ITEM_COUNT] Items...) [FILTER]
- </floater.string>
- <floater.string
- name="TitleCompleted">
- MY INVENTORY ([ITEM_COUNT] Items) [FILTER]
- </floater.string>
- <floater.string
- name="Fetched">
- Fetched
- </floater.string>
<panel
bottom="560"
class="panel_main_inventory"
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index 50983d2976..c7768c6eb6 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -10,9 +10,34 @@
name="main inventory panel"
width="330">
<panel.string
- name="Title">
- Things
+ name="Itemcount">
</panel.string>
+ <panel.string
+ name="ItemcountFetching">
+ Fetching [ITEM_COUNT] Items... [FILTER]
+ </panel.string>
+ <panel.string
+ name="ItemcountCompleted">
+ [ITEM_COUNT] Items [FILTER]
+ </panel.string>
+ <panel.string
+ name="ItemcountUnknown">
+
+ </panel.string>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="13"
+ layout="topleft"
+ left="12"
+ name="ItemcountText"
+ font="SansSerifMedium"
+ text_color="EmphasisColor"
+ top_pad="0"
+ width="300">
+ Items:
+ </text>
<menu_bar
bg_visible="false"
follows="left|top|right"
@@ -21,8 +46,8 @@
left="10"
mouse_opaque="false"
name="Inventory Menu"
- top="0"
- visible="true"
+ top="+10"
+ visible="true"
width="290">
<menu
height="101"
@@ -377,30 +402,30 @@
<filter_editor
text_pad_left="10"
follows="left|top|right"
- height="23"
+ height="23"
label="Filter Inventory"
layout="topleft"
left="10"
-max_length="300"
+ max_length="300"
name="inventory search editor"
- top="26"
+ top="+31"
width="303" />
<tab_container
- bg_opaque_color="DkGray2"
+ bg_opaque_color="DkGray2"
bg_alpha_color="DkGray2"
background_visible="true"
background_opaque="true"
-follows="all"
-halign="center"
- height="305"
- layout="topleft"
- left="6"
- name="inventory filter tabs"
- tab_height="30"
- tab_position="top"
- tab_min_width="100"
- top_pad="10"
- width="315">
+ follows="all"
+ halign="center"
+ height="300"
+ layout="topleft"
+ left="6"
+ name="inventory filter tabs"
+ tab_height="30"
+ tab_position="top"
+ tab_min_width="100"
+ top_pad="10"
+ width="315">
<inventory_panel
bg_opaque_color="DkGray2"
bg_alpha_color="DkGray2"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 111daec242..2a46311fce 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -79,6 +79,12 @@
<string name="TooltipHttpUrl">Click to view this web page</string>
<string name="TooltipSLURL">Click to view this location's information</string>
<string name="TooltipAgentUrl">Click to view this Resident's profile</string>
+ <string name="TooltipAgentMute">Click to mute this Resident</string>
+ <string name="TooltipAgentUnmute">Click to unmute this Resident</string>
+ <string name="TooltipAgentIM">Click to IM this Resident</string>
+ <string name="TooltipAgentPay">Click to Pay this Resident</string>
+ <string name="TooltipAgentOfferTeleport">Click to offer a teleport request to this Resident</string>
+ <string name="TooltipAgentRequestFriend">Click to send a friend request to this Resident</string>
<string name="TooltipGroupUrl">Click to view this group's description</string>
<string name="TooltipEventUrl">Click to view this event's description</string>
<string name="TooltipClassifiedUrl">Click to view this classified</string>
@@ -95,6 +101,14 @@
<string name="SLurlLabelTeleport">Teleport to</string>
<string name="SLurlLabelShowOnMap">Show Map for</string>
+ <!-- label strings for secondlife:///app/agent SLapps -->
+ <string name="SLappAgentMute">Mute</string>
+ <string name="SLappAgentUnmute">Unmute</string>
+ <string name="SLappAgentIM">IM</string>
+ <string name="SLappAgentPay">Pay</string>
+ <string name="SLappAgentOfferTeleport">Offer Teleport to </string>
+ <string name="SLappAgentRequestFriend">Friend Request </string>
+
<!-- ButtonToolTips, llfloater.cpp -->
<string name="BUTTON_CLOSE_DARWIN">Close (&#8984;W)</string>
<string name="BUTTON_CLOSE_WIN">Close (Ctrl+W)</string>
diff --git a/indra/test_apps/llplugintest/bookmarks.txt b/indra/test_apps/llplugintest/bookmarks.txt
index b8b83df386..2ff64f217f 100644
--- a/indra/test_apps/llplugintest/bookmarks.txt
+++ b/indra/test_apps/llplugintest/bookmarks.txt
@@ -18,20 +18,20 @@
(Flash) Scribd,http://www.scribd.com/doc/14427744/Second-Life-Quickstart-Guide
(Flash) MAME,http://yvern.com/fMAME/fMAME.html
(QT) Local sample,file:///C|/Program Files/QuickTime/Sample.mov
-(QT) Movie - Watchmen Trailer,http://movies.apple.com/movies/wb/watchmen/watchmen-tlr2_480p.mov
-(QT) Movie - Transformers - Revenge of the Fallen,http://movies.apple.com/movies/paramount/transformers2/transformersrevengeofthefallen-tlr1_h.320.mov
-(QT) Movie - Terminator Salvation,http://movies.apple.com/movies/wb/terminatorsalvation/terminatorsalvation-tlr3_h.320.mov
-(QT) Movie - Angels and Demons,http://movies.apple.com/movies/sony_pictures/angelsanddemons/angelsanddemons-video_h.320.mov
-(QT) Movie - Sin City Trailer,http://movies.apple.com/movies/miramax/sin_city/sin_city_480.mov
-(QT) Movie - The Incredibles Trailer,http://movies.apple.com/movies/disney/the_incredibles/the_incredibles-tlr_a480.mov
+(QT) Movie - Watchmen Trailer,http://trailers.apple.com/movies/wb/watchmen/watchmen-tlr2_480p.mov
+(QT) Movie - Transformers - Revenge of the Fallen,http://trailers.apple.com/movies/paramount/transformers2/transformersrevengeofthefallen-tlr1_h.320.mov
+(QT) Movie - Terminator Salvation,http://trailers.apple.com/movies/wb/terminatorsalvation/terminatorsalvation-tlr3_h.320.mov
+(QT) Movie - Angels and Demons,http://trailers.apple.com/movies/sony_pictures/angelsanddemons/angelsanddemons-video_h.320.mov
+(QT) Movie - Sin City Trailer,http://trailers.apple.com/movies/miramax/sin_city/sin_city_480.mov
+(QT) Movie - The Incredibles Trailer,http://trailers.apple.com/movies/disney/the_incredibles/the_incredibles-tlr_a480.mov
(QT) Movie - Streaming Apple Event,http://stream.qtv.apple.com/events/mar/0903lajkszg/m_090374535329zdwg_650_ref.mov
(QT) Movie - MPEG-4 from Amazon S3,http://s3.amazonaws.com/callum-linden/flashdemo/interactive_flash_demo.mp4
-(QT) Movie - Star Trek,http://movies.apple.com/movies/paramount/star_trek/startrek-tlr3_h.320.mov
-(QT) Movie - Ice Age 3,http://movies.apple.com/movies/fox/ice_age_iii/iceage3-tlrd_h.320.mov
-(QT) Movie - AstroBoy,http://movies.apple.com/movies/summit/astroboy/astroboy-tsr_h.320.mov
-(QT) Movie - Ante Up,http://movies.apple.com/movies/independent/anteup/anteup_h.320.mov
-(QT) Movie - Every Little Step,http://movies.apple.com/movies/sony/everylittlestep/everylittlestep-clip_h.320.mov
-(QT) Movie - The Informers,http://movies.apple.com/movies/independent/theinformers/theinformers_h.320.mov
+(QT) Movie - Star Trek,http://trailers.apple.com/movies/paramount/star_trek/startrek-tlr3_h.320.mov
+(QT) Movie - Ice Age 3,http://trailers.apple.com/movies/fox/ice_age_iii/iceage3-tlrd_h.320.mov
+(QT) Movie - AstroBoy,http://trailers.apple.com/movies/summit/astroboy/astroboy-tsr_h.320.mov
+(QT) Movie - Ante Up,http://trailers.apple.com/movies/independent/anteup/anteup_h.320.mov
+(QT) Movie - Every Little Step,http://trailers.apple.com/movies/sony/everylittlestep/everylittlestep-clip_h.320.mov
+(QT) Movie - The Informers,http://trailers.apple.com/movies/independent/theinformers/theinformers_h.320.mov
(QT) Animated GIF,http://upload.wikimedia.org/wikipedia/commons/4/44/Optical.greysquares.arp-animated.gif
(QT) Apple Text Descriptors,http://ubrowser.com/tmp/apple_text.txt
(EX) Example Plugin,example://blah
diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp
index e5a846f15a..5677308fb0 100644
--- a/indra/test_apps/llplugintest/llmediaplugintest.cpp
+++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp
@@ -1593,8 +1593,8 @@ void LLMediaPluginTest::addMediaPanel( std::string url )
}
std::string user_data_path = std::string( cwd ) + "/";
#endif
-
- media_source->init( launcher_name, plugin_name, false, user_data_path );
+ media_source->setUserDataPath(user_data_path);
+ media_source->init( launcher_name, plugin_name, false );
media_source->setDisableTimeout(mDisableTimeout);
// make a new panel and save parameters
@@ -1831,7 +1831,8 @@ void LLMediaPluginTest::replaceMediaPanel( mediaPanel* panel, std::string url )
std::string user_data_path = std::string( cwd ) + "/";
#endif
- media_source->init( launcher_name, plugin_name, false, user_data_path );
+ media_source->setUserDataPath(user_data_path);
+ media_source->init( launcher_name, plugin_name, false );
media_source->setDisableTimeout(mDisableTimeout);
// make a new panel and save parameters