From 8fdfda9b50e0dcee50652c502825783e8794815f Mon Sep 17 00:00:00 2001 From: thickbrick Date: Wed, 24 Nov 2010 23:48:10 +0200 Subject: Fix #729: Some PNG images lose alpha channel Ignore the background color specified in PNG's bKGD chunk, since it's only there as a fallback. --- linden/indra/llimage/llpngwrapper.cpp | 18 ++++-------------- linden/indra/llimage/llpngwrapper.h | 3 --- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/linden/indra/llimage/llpngwrapper.cpp b/linden/indra/llimage/llpngwrapper.cpp index 0dd991a..2274a38 100644 --- a/linden/indra/llimage/llpngwrapper.cpp +++ b/linden/indra/llimage/llpngwrapper.cpp @@ -56,8 +56,6 @@ LLPngWrapper::LLPngWrapper() mCompressionType( 0 ), mFilterMethod( 0 ), mFinalSize( 0 ), - mHasBKGD(false), - mBackgroundColor(), mGamma(0.f) { } @@ -117,9 +115,9 @@ void LLPngWrapper::writeFlush(png_structp png_ptr) } // Read the PNG file using the libpng. The low-level interface is used here -// because we want to do various transformations (including setting the -// matte background if any, and applying gama) which can't be done with -// the high-level interface. The scanline also begins at the bottom of +// because we want to do various transformations (including applying gama) +// which can't be done with the high-level interface. +// The scanline also begins at the bottom of // the image (per SecondLife conventions) instead of at the top, so we // must assign row-pointers in "reverse" order. BOOL LLPngWrapper::readPng(U8* src, LLImageRaw* rawImage, ImageInfo *infop) @@ -207,8 +205,7 @@ void LLPngWrapper::normalizeImage() // 2. Convert grayscales to RGB // 3. Create alpha layer from transparency // 4. Ensure 8-bpp for all images - // 5. Apply background matte if any - // 6. Set (or guess) gamma + // 5. Set (or guess) gamma if (mColorType == PNG_COLOR_TYPE_PALETTE) { @@ -235,12 +232,6 @@ void LLPngWrapper::normalizeImage() { png_set_strip_16(mReadPngPtr); } - mHasBKGD = png_get_bKGD(mReadPngPtr, mReadInfoPtr, &mBackgroundColor); - if (mHasBKGD) - { - png_set_background(mReadPngPtr, mBackgroundColor, - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); - } #if LL_DARWIN const F64 SCREEN_GAMMA = 1.8; @@ -267,7 +258,6 @@ void LLPngWrapper::updateMetaData() mBitDepth = png_get_bit_depth(mReadPngPtr, mReadInfoPtr); mColorType = png_get_color_type(mReadPngPtr, mReadInfoPtr); mChannels = png_get_channels(mReadPngPtr, mReadInfoPtr); - mHasBKGD = png_get_bKGD(mReadPngPtr, mReadInfoPtr, &mBackgroundColor); } // Method to write raw image into PNG at dest. The raw scanline begins diff --git a/linden/indra/llimage/llpngwrapper.h b/linden/indra/llimage/llpngwrapper.h index 2e6c1dc..0c3168c 100644 --- a/linden/indra/llimage/llpngwrapper.h +++ b/linden/indra/llimage/llpngwrapper.h @@ -94,9 +94,6 @@ private: U32 mFinalSize; - bool mHasBKGD; - png_color_16p mBackgroundColor; - F64 mGamma; std::string mErrorMessage; -- cgit v1.1 From a6ada6652524fc2b708bdae82ca3b5cb44bbbb2d Mon Sep 17 00:00:00 2001 From: thickbrick Date: Tue, 30 Nov 2010 16:53:55 +0200 Subject: Fix #673: IMs & Logging prefs don't persist Enable per-account settings only after we have an account. Also, make settings that are saved locally not depend on UserInfoReply being received. --- linden/indra/newview/llfloaterpreference.cpp | 14 ++ linden/indra/newview/llfloaterpreference.h | 3 + linden/indra/newview/llprefsim.cpp | 166 ++++++++++++--------- linden/indra/newview/llprefsim.h | 1 + linden/indra/newview/llstartup.cpp | 3 + .../default/xui/en-us/panel_preferences_im.xml | 3 + 6 files changed, 117 insertions(+), 73 deletions(-) diff --git a/linden/indra/newview/llfloaterpreference.cpp b/linden/indra/newview/llfloaterpreference.cpp index 2fe4b4d..0f81be6 100644 --- a/linden/indra/newview/llfloaterpreference.cpp +++ b/linden/indra/newview/llfloaterpreference.cpp @@ -362,6 +362,11 @@ void LLPreferenceCore::setPersonalInfo(const std::string& visibility, bool im_vi mPrefsIM->setPersonalInfo(visibility, im_via_email, email); } +void LLPreferenceCore::updateIsLoggedIn(bool enable) +{ + mPrefsIM->preparePerAccountPrefs(enable); +} + void LLPreferenceCore::refreshEnabledGraphics() { LLFloaterHardwareSettings::instance()->refreshEnabledState(); @@ -537,6 +542,15 @@ void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_ } } +// static +void LLFloaterPreference::updateIsLoggedIn(bool enable) +{ + if(sInstance && sInstance->mPreferenceCore) + { + sInstance->mPreferenceCore->updateIsLoggedIn(enable); + } +} + void LLFloaterPreference::refreshEnabledGraphics() { sInstance->mPreferenceCore->refreshEnabledGraphics(); diff --git a/linden/indra/newview/llfloaterpreference.h b/linden/indra/newview/llfloaterpreference.h index c52f541..931c8b6 100644 --- a/linden/indra/newview/llfloaterpreference.h +++ b/linden/indra/newview/llfloaterpreference.h @@ -73,6 +73,7 @@ public: LLTabContainer* getTabContainer() { return mTabContainer; } void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email); + void updateIsLoggedIn(bool enable); static void onTabChanged(void* user_data, bool from_click); @@ -113,6 +114,8 @@ public: // static data update, called from message handler static void updateUserInfo(const std::string& visibility, bool im_via_email, const std::string& email); + // static data update, called after login + static void updateIsLoggedIn(bool enable); // refresh all the graphics preferences menus static void refreshEnabledGraphics(); diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp index 9e86cd3..5ac2bb2 100644 --- a/linden/indra/newview/llprefsim.cpp +++ b/linden/indra/newview/llprefsim.cpp @@ -66,6 +66,7 @@ public: void apply(); void cancel(); void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email); + void preparePerAccountPrefs(bool enable); void enableHistory(); static void onClickLogPath(void* user_data); @@ -76,6 +77,7 @@ public: protected: bool mGotPersonalInfo; + bool mGotPerAccountSettings; bool mOriginalIMViaEmail; bool mOriginalHideOnlineStatus; @@ -86,7 +88,9 @@ protected: LLPrefsIMImpl::LLPrefsIMImpl() : LLPanel(std::string("IM Prefs Panel")), mGotPersonalInfo(false), - mOriginalIMViaEmail(false) + mGotPerAccountSettings(false), + mOriginalIMViaEmail(false), + mOriginalHideOnlineStatus(false) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_im.xml"); } @@ -106,55 +110,38 @@ BOOL LLPrefsIMImpl::postBuild() childSetLabelArg("send_im_to_email", "[EMAIL]", getString("log_in_to_change")); - // Don't enable this until we get personal data - // Unless we're already logged in. Some non-SL grids won't send us the data we need -- MC - childSetEnabled("include_im_in_chat_console", LLStartUp::isLoggedIn()); - childSetEnabled("include_im_in_chat_history", LLStartUp::isLoggedIn()); - childSetEnabled("show_timestamps_check", LLStartUp::isLoggedIn()); - childSetEnabled("friends_online_notify_checkbox", LLStartUp::isLoggedIn()); - - childSetEnabled("online_visibility", LLStartUp::isLoggedIn()); - childSetEnabled("send_im_to_email", LLStartUp::isLoggedIn()); - childSetEnabled("log_instant_messages", LLStartUp::isLoggedIn()); - childSetEnabled("log_chat", LLStartUp::isLoggedIn()); - childSetEnabled("log_show_history", LLStartUp::isLoggedIn()); - childSetEnabled("log_path_button", LLStartUp::isLoggedIn()); - childSetEnabled("busy_response", LLStartUp::isLoggedIn()); - childSetEnabled("log_instant_messages_timestamp", LLStartUp::isLoggedIn()); - childSetEnabled("log_chat_timestamp", LLStartUp::isLoggedIn()); - childSetEnabled("log_chat_IM", LLStartUp::isLoggedIn()); - childSetEnabled("log_date_timestamp", LLStartUp::isLoggedIn()); - - childSetText("busy_response", getString("log_in_to_change")); + // Don't enable these until we get personal data + childSetEnabled("online_visibility", false); + childSetEnabled("send_im_to_email", false); + // These are safe to enable + childSetEnabled("include_im_in_chat_console", true); + childSetEnabled("include_im_in_chat_history", true); + childSetEnabled("show_timestamps_check", true); + childSetEnabled("friends_online_notify_checkbox", true); + childSetEnabled("vertical-imtabs-toggle", true); childSetValue("include_im_in_chat_console", gSavedSettings.getBOOL("IMInChatConsole")); childSetValue("include_im_in_chat_history", gSavedSettings.getBOOL("IMInChatHistory")); childSetValue("show_timestamps_check", gSavedSettings.getBOOL("IMShowTimestamps")); childSetValue("friends_online_notify_checkbox", gSavedSettings.getBOOL("ChatOnlineNotification")); childSetValue("vertical-imtabs-toggle", gSavedSettings.getBOOL("VerticalIMTabs")); - childSetText("log_path_string", gSavedPerAccountSettings.getString("InstantMessageLogPath")); - childSetValue("log_instant_messages", gSavedPerAccountSettings.getBOOL("LogInstantMessages")); - childSetValue("log_chat", gSavedPerAccountSettings.getBOOL("LogChat")); - childSetValue("log_show_history", gSavedPerAccountSettings.getBOOL("LogShowHistory")); - childSetValue("log_instant_messages_timestamp", gSavedPerAccountSettings.getBOOL("IMLogTimestamp")); - childSetValue("log_chat_timestamp", gSavedPerAccountSettings.getBOOL("LogChatTimestamp")); - childSetValue("log_chat_IM", gSavedPerAccountSettings.getBOOL("LogChatIM")); - childSetValue("log_date_timestamp", gSavedPerAccountSettings.getBOOL("LogTimestampDate")); - childSetAction("log_path_button", onClickLogPath, this); childSetCommitCallback("log_chat",onCommitLogging,this); childSetCommitCallback("log_instant_messages",onCommitLogging,this); childSetAction("busy_adv_btn", onClickBusyAdvanced, this); + preparePerAccountPrefs(LLStartUp::isLoggedIn()); + return TRUE; } void LLPrefsIMImpl::enableHistory() { - if (childGetValue("log_instant_messages").asBoolean() || childGetValue("log_chat").asBoolean()) + if (mGotPerAccountSettings && + (childGetValue("log_instant_messages").asBoolean() || childGetValue("log_chat").asBoolean())) { childEnable("log_show_history"); childEnable("log_path_button"); @@ -168,23 +155,16 @@ void LLPrefsIMImpl::enableHistory() void LLPrefsIMImpl::apply() { - LLTextEditor* busy = getChild("busy_response"); - LLWString busy_response; - if (busy) busy_response = busy->getWText(); - LLWStringUtil::replaceTabsWithSpaces(busy_response, 4); - LLWStringUtil::replaceChar(busy_response, '\n', '^'); - LLWStringUtil::replaceChar(busy_response, ' ', '%'); - - if(mGotPersonalInfo) + if (mGotPerAccountSettings) { - + LLTextEditor* busy = getChild("busy_response"); + LLWString busy_response; + if (busy) busy_response = busy->getWText(); + LLWStringUtil::replaceTabsWithSpaces(busy_response, 4); + LLWStringUtil::replaceChar(busy_response, '\n', '^'); + LLWStringUtil::replaceChar(busy_response, ' ', '%'); gSavedPerAccountSettings.setString("BusyModeResponse", std::string(wstring_to_utf8str(busy_response))); - gSavedSettings.setBOOL("IMInChatConsole", childGetValue("include_im_in_chat_console").asBoolean()); - gSavedSettings.setBOOL("IMInChatHistory", childGetValue("include_im_in_chat_history").asBoolean()); - gSavedSettings.setBOOL("IMShowTimestamps", childGetValue("show_timestamps_check").asBoolean()); - gSavedSettings.setBOOL("ChatOnlineNotification", childGetValue("friends_online_notify_checkbox").asBoolean()); - gSavedPerAccountSettings.setString("InstantMessageLogPath", childGetText("log_path_string")); gSavedPerAccountSettings.setBOOL("LogInstantMessages",childGetValue("log_instant_messages").asBoolean()); gSavedPerAccountSettings.setBOOL("LogChat",childGetValue("log_chat").asBoolean()); @@ -207,7 +187,10 @@ void LLPrefsIMImpl::apply() gSavedSettings.getString("FirstName"), gSavedSettings.getString("LastName") ); } LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); - + } + + if (mGotPersonalInfo) + { bool new_im_via_email = childGetValue("send_im_to_email").asBoolean(); bool new_hide_online = childGetValue("online_visibility").asBoolean(); @@ -237,9 +220,15 @@ void LLPrefsIMImpl::apply() gAgent.sendReliableMessage(); } } + gSavedSettings.setBOOL("VerticalIMTabs", childGetValue("vertical-imtabs-toggle").asBoolean()); + gSavedSettings.setBOOL("IMInChatConsole", childGetValue("include_im_in_chat_console").asBoolean()); + gSavedSettings.setBOOL("IMInChatHistory", childGetValue("include_im_in_chat_history").asBoolean()); + gSavedSettings.setBOOL("IMShowTimestamps", childGetValue("show_timestamps_check").asBoolean()); + gSavedSettings.setBOOL("ChatOnlineNotification", childGetValue("friends_online_notify_checkbox").asBoolean()); } +// Enable and set the value of settings recieved from the sim in AgentInfoReply void LLPrefsIMImpl::setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email) { mGotPersonalInfo = true; @@ -261,36 +250,10 @@ void LLPrefsIMImpl::setPersonalInfo(const std::string& visibility, bool im_via_e mOriginalHideOnlineStatus = true; } - childEnable("include_im_in_chat_console"); - childEnable("include_im_in_chat_history"); - childEnable("show_timestamps_check"); - childEnable("friends_online_notify_checkbox"); - childSetValue("online_visibility", mOriginalHideOnlineStatus); childSetLabelArg("online_visibility", "[DIR_VIS]", mDirectoryVisibility); childEnable("send_im_to_email"); childSetValue("send_im_to_email", im_via_email); - childEnable("log_instant_messages"); - childEnable("log_chat"); - childEnable("busy_response"); - childEnable("log_instant_messages_timestamp"); - childEnable("log_chat_timestamp"); - childEnable("log_chat_IM"); - childEnable("log_date_timestamp"); - - //RN: get wide string so replace char can work (requires fixed-width encoding) - LLWString busy_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("BusyModeResponse") ); - LLWStringUtil::replaceChar(busy_response, '^', '\n'); - LLWStringUtil::replaceChar(busy_response, '%', ' '); - childSetText("busy_response", wstring_to_utf8str(busy_response)); -// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) - if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) - { - childDisable("busy_response"); - } -// [/RLVa:KB] - - enableHistory(); // Truncate the e-mail address if it's too long (to prevent going off // the edge of the dialog). @@ -300,10 +263,62 @@ void LLPrefsIMImpl::setPersonalInfo(const std::string& visibility, bool im_via_e display_email.resize(30); display_email += "..."; } - + else if (display_email.empty()) + { + display_email = getString("default_email_used"); + } childSetLabelArg("send_im_to_email", "[EMAIL]", display_email); } +// Enable and set the value of settings that need an account name +void LLPrefsIMImpl::preparePerAccountPrefs(bool enable) +{ + if (mGotPerAccountSettings && enable) + { + return; // prevent overwriting unsaved changes. + } + mGotPerAccountSettings = enable; + + childSetEnabled("log_chat", enable); + childSetEnabled("log_chat_timestamp", enable); + childSetEnabled("log_chat_IM", enable); + childSetEnabled("log_instant_messages_timestamp", enable); + childSetEnabled("log_instant_messages", enable); + childSetEnabled("log_date_timestamp", enable); + + childSetValue("log_chat", gSavedPerAccountSettings.getBOOL("LogChat")); + childSetValue("log_chat_timestamp", gSavedPerAccountSettings.getBOOL("LogChatTimestamp")); + childSetValue("log_chat_IM", gSavedPerAccountSettings.getBOOL("LogChatIM")); + childSetValue("log_instant_messages_timestamp", gSavedPerAccountSettings.getBOOL("IMLogTimestamp")); + childSetValue("log_instant_messages", gSavedPerAccountSettings.getBOOL("LogInstantMessages")); + childSetValue("log_date_timestamp", gSavedPerAccountSettings.getBOOL("LogTimestampDate")); + + childSetValue("log_show_history", gSavedPerAccountSettings.getBOOL("LogShowHistory")); + enableHistory(); + childSetText("log_path_string", gSavedPerAccountSettings.getString("InstantMessageLogPath")); + + childSetEnabled("busy_response", enable); + if (enable) + { + //RN: get wide string so replace char can work (requires fixed-width encoding) + LLWString busy_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("BusyModeResponse") ); + LLWStringUtil::replaceChar(busy_response, '^', '\n'); + LLWStringUtil::replaceChar(busy_response, '%', ' '); + childSetText("busy_response", wstring_to_utf8str(busy_response)); + } + else + { + childSetText("busy_response", getString("log_in_to_change")); + } +// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) + if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) + { + childDisable("busy_response"); + } +// [/RLVa:KB] + + childSetEnabled("busy_adv_btn", enable); +} // static void LLPrefsIMImpl::onClickBusyAdvanced(void* user_data) @@ -363,6 +378,11 @@ void LLPrefsIM::setPersonalInfo(const std::string& visibility, bool im_via_email impl.setPersonalInfo(visibility, im_via_email, email); } +void LLPrefsIM::preparePerAccountPrefs(bool enable) +{ + impl.preparePerAccountPrefs(enable); +} + LLPanel* LLPrefsIM::getPanel() { return &impl; diff --git a/linden/indra/newview/llprefsim.h b/linden/indra/newview/llprefsim.h index 90bf465..acf9b0f 100644 --- a/linden/indra/newview/llprefsim.h +++ b/linden/indra/newview/llprefsim.h @@ -46,6 +46,7 @@ public: void apply(); void cancel(); void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email); + void preparePerAccountPrefs(bool enable); LLPanel* getPanel(); diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index b744961..aba9bb6 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -101,6 +101,7 @@ #include "llfloatergesture.h" #include "llfloaterhud.h" #include "llfloaterland.h" +#include "llfloaterpreference.h" #include "llfloaterteleporthistory.h" #include "llfloatertopobjects.h" #include "llfloatertos.h" @@ -2876,6 +2877,8 @@ bool idle_startup() gDebugView->mFastTimerView->setVisible(TRUE); #endif + LLFloaterPreference::updateIsLoggedIn(true); + return TRUE; } diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml index e64f6c7..fe17e7a 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml @@ -22,6 +22,9 @@ log in to change + + using default address + getDataSize() > 0); + mLoadedDiscard = mDesiredDiscard; mState = DECODE_IMAGE; mWriteToCacheState = NOT_WRITE ; LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize() -- cgit v1.1 From 9f13705eb64c74184a67bb5eba24f3e8c6531e89 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Sat, 15 Jan 2011 00:06:28 +0200 Subject: Fix small potential leak of CacheReadResponder objects Taken from V2/Henry. --- linden/indra/newview/lltexturefetch.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index 6ab4d24..83a54e4 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp @@ -665,16 +665,17 @@ bool LLTextureFetchWorker::doWork(S32 param) mLoaded = FALSE; setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it - CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); if (mUrl.compare(0, 7, "file://") == 0) { // read file from local disk std::string filename = mUrl.substr(7, std::string::npos); + CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); mCacheReadHandle = mFetcher->mTextureCache->readFromCache(filename, mID, cache_priority, offset, size, responder); } else if (mUrl.empty()) { + CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); mCacheReadHandle = mFetcher->mTextureCache->readFromCache(mID, cache_priority, offset, size, responder); } -- cgit v1.1 From fe9a3fe4bfb5589332a21fd07ce4966aaf38117e Mon Sep 17 00:00:00 2001 From: thickbrick Date: Sat, 15 Jan 2011 01:11:46 +0200 Subject: Fix offset reading from local files Fix offset reading from local files (non-cached.) This is a bug, so needs fixing, even though the offset is always 0 here, currently. Taken from Cool Viewer (patch orginally by Max Fox.) --- linden/indra/newview/lltexturecache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp index a1a9a39..4efd10c 100644 --- a/linden/indra/newview/lltexturecache.cpp +++ b/linden/indra/newview/lltexturecache.cpp @@ -250,9 +250,9 @@ bool LLTextureCacheLocalFileWorker::doRead() } } #else - if (!mDataSize || mDataSize > local_size) + if (!mDataSize || mDataSize + mOffset > local_size) { - mDataSize = local_size; + mDataSize = local_size - mOffset; } mReadData = new U8[mDataSize]; -- cgit v1.1 From 77883aef4bb8531c83bdeac45a5463a76e1158d7 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Sun, 16 Jan 2011 02:03:16 +0200 Subject: Fix #756: Link button in build floater can crash Prevent null dereference when the selection has no primary object, e.g. rubber band selection. --- linden/indra/newview/llfloatertools.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 683ebd4..cc205ee 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp @@ -1256,7 +1256,8 @@ void LLFloaterTools::onClickLink(void* data) } S32 max_linked_prims = 0; - if(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()->usePhysics()) + LLViewerObject* first_rootp = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); + if(first_rootp && first_rootp->usePhysics()) { //Physical - use phys prim limit max_linked_prims = gHippoLimits->getMaxPhysLinkedPrims(); -- cgit v1.1 From 817c12436ed1c4a1500cb2e836625c4f3e9b32b7 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Thu, 20 Jan 2011 01:28:55 +0200 Subject: Fix #773: Crash in Advanced -> Rendering -> Debug GL Missing “POOL_VOIDWATER” item in pool names array caused crash. --- linden/indra/newview/pipeline.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index 9da0da0..36ffb05 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp @@ -157,6 +157,7 @@ std::string gPoolNames[] = "POOL_GROUND", "POOL_INVISIBLE", "POOL_AVATAR", + "POOL_VOIDWATER", "POOL_WATER", "POOL_GRASS", "POOL_FULLBRIGHT", -- cgit v1.1 From 02d06e7cf7c15ddd427197dbe177ea58ffc91319 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Thu, 20 Jan 2011 01:34:15 +0200 Subject: Add menu option for sculpt debugging in Advanced menu. The new option is Advanced -> Rendering -> Info Displays -> Sculpt. The code for displaying this debug info is old, but the menu option was lost when the Advanced menu was converted to xml. --- linden/indra/newview/llviewermenu.cpp | 4 ++++ linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index b81a2a2..da7d815 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -9192,6 +9192,10 @@ U32 info_display_from_string(std::string info_display) { return LLPipeline::RENDER_DEBUG_GLOW; } + else if ("sculpt" == info_display) + { + return LLPipeline::RENDER_DEBUG_SCULPTED; + } else { return 0; diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 53e9e2d..9ff5048 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -1279,6 +1279,12 @@ + + + + + + + + -- cgit v1.1 From 4e577785ba1417cd9ef6742a33e818016697b508 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Fri, 21 Jan 2011 15:10:56 +0200 Subject: Partial fix #772: Large sculpt maps are deformed This is a partial fix for cases where the sculpt map is larger than 128x128, like in some old sculpted trees. This was done by content creators to beat bugs in old viewers. The sculpties still need a lod change to trigger a rebuild once they are fully decoded, and that doesn't always happen, because we abuse RenderVolumeLODFactor. Ported from Snowglobe2 (GPL) --- linden/indra/newview/llviewerimage.cpp | 13 ++++++++++--- linden/indra/newview/llvovolume.cpp | 6 +++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/linden/indra/newview/llviewerimage.cpp b/linden/indra/newview/llviewerimage.cpp index 671a359..a600dc5 100644 --- a/linden/indra/newview/llviewerimage.cpp +++ b/linden/indra/newview/llviewerimage.cpp @@ -1759,13 +1759,19 @@ void LLViewerImage::setCachedRawImage() if(mForSculpt) { max_size = MAX_CACHED_RAW_SCULPT_IMAGE_AREA ; + // Even though we don't use the full pixel size, we want to decode up to discard 0, + // because some legacy sculpts are weird like that. + mCachedRawImageReady = !mRawDiscardLevel ; + } + else + { + mCachedRawImageReady = (!mRawDiscardLevel || ((w * h) >= max_size)) ; } while(((w >> i) * (h >> i)) > max_size) { ++i ; } - mCachedRawImageReady = (!mRawDiscardLevel || ((w * h) >= max_size)) ; if(i) { @@ -1776,7 +1782,8 @@ void LLViewerImage::setCachedRawImage() mRawImage->scale(w >> i, h >> i) ; } mCachedRawImage = mRawImage ; - mCachedRawDiscardLevel = mRawDiscardLevel + i ; + mRawDiscardLevel += i ; + mCachedRawDiscardLevel = mRawDiscardLevel ; } } @@ -1784,7 +1791,7 @@ void LLViewerImage::checkCachedRawSculptImage() { if(mCachedRawImageReady && mCachedRawDiscardLevel > 0) { - if(mCachedRawImage->getWidth() * mCachedRawImage->getHeight() < MAX_CACHED_RAW_SCULPT_IMAGE_AREA) + if(getDiscardLevel() != 0) { mCachedRawImageReady = FALSE ; } diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 73ff860..632bca2 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp @@ -527,8 +527,8 @@ void LLVOVolume::updateTextureVirtualSize() } } - S32 texture_discard = mSculptTexture->getCachedRawImageLevel(); //try to match the texture - S32 current_discard = mSculptLevel; + S32 texture_discard = mSculptTexture->getDiscardLevel(); //try to match the texture + S32 current_discard = getVolume() ? getVolume()->getSculptLevel() : -2 ; if (texture_discard >= 0 && //texture has some data available (texture_discard < current_discard || //texture has more data than last rebuild @@ -711,7 +711,7 @@ void LLVOVolume::sculpt() S8 sculpt_components = 0; const U8* sculpt_data = NULL; - S32 discard_level = mSculptTexture->getCachedRawImageLevel() ; + S32 discard_level = mSculptTexture->getDiscardLevel(); LLImageRaw* raw_image = mSculptTexture->getCachedRawImage() ; S32 max_discard = mSculptTexture->getMaxDiscardLevel(); -- cgit v1.1 From 981e88b92549cae661a077490df693f1d207c808 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Mon, 24 Jan 2011 19:40:13 +0200 Subject: Additional Fix #772 and other sculpt problems Port from V2 (Snowglobe2) that adds to each texture a list of faces and sculpt volumes that use that texture, and rebuild all sculpts when the texture is decoded. This is needed so that we don't depend on LOD changes which may never/rarely happen for some megaprim sculpts. --- linden/indra/newview/llface.h | 4 + linden/indra/newview/llviewerimage.cpp | 131 ++++++++++++++++++++++++++++++--- linden/indra/newview/llviewerimage.h | 26 ++++++- linden/indra/newview/llvovolume.cpp | 56 +++++++++++--- linden/indra/newview/llvovolume.h | 6 +- 5 files changed, 195 insertions(+), 28 deletions(-) diff --git a/linden/indra/newview/llface.h b/linden/indra/newview/llface.h index 4893e82..e31b93f 100644 --- a/linden/indra/newview/llface.h +++ b/linden/indra/newview/llface.h @@ -106,6 +106,9 @@ public: F32 getVirtualSize() const { return mVSize; } F32 getPixelArea() const { return mPixelArea; } + S32 getIndexInTex() const {return mIndexInTex ;} + void setIndexInTex(S32 index) { mIndexInTex = index ;} + void renderSetColor() const; S32 renderElements(const U16 *index_array) const; S32 renderIndexed (); @@ -225,6 +228,7 @@ private: U16 mGeomIndex; // index into draw pool U32 mIndicesCount; U32 mIndicesIndex; // index into draw pool for indices (yeah, I know!) + S32 mIndexInTex ; //previous rebuild's geometry info U16 mLastGeomCount; diff --git a/linden/indra/newview/llviewerimage.cpp b/linden/indra/newview/llviewerimage.cpp index a600dc5..28561ed 100644 --- a/linden/indra/newview/llviewerimage.cpp +++ b/linden/indra/newview/llviewerimage.cpp @@ -61,6 +61,7 @@ #include "llappviewer.h" #include "llface.h" #include "llviewercamera.h" +#include "llvovolume.h" /////////////////////////////////////////////////////////////////////////////// // statics @@ -352,6 +353,11 @@ void LLViewerImage::init(bool firstinit) mDesiredSavedRawDiscardLevel = -1 ; mCanUseHTTP = true; //default on if cap/settings allows us + + mNumFaces = 0 ; + mNumVolumes = 0; + mFaceList.clear() ; + mVolumeList.clear(); } // virtual @@ -388,6 +394,7 @@ LLViewerImage::~LLViewerImage() void LLViewerImage::cleanup() { mFaceList.clear() ; + mVolumeList.clear(); for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); iter != mLoadedCallbackList.end(); ) { @@ -754,19 +761,19 @@ void LLViewerImage::updateVirtualSize() { addTextureStats(0.f, FALSE) ;//reset } - if(mFaceList.size() > 0) + for(U32 i = 0 ; i < mNumFaces ; i++) { - for(std::list::iterator iter = mFaceList.begin(); iter != mFaceList.end(); ++iter) + LLFace* facep = mFaceList[i] ; + if(facep->getDrawable()->isRecentlyVisible()) { - LLFace* facep = *iter ; - if(facep->getDrawable()->isRecentlyVisible()) - { - addTextureStats(facep->getVirtualSize()) ; - setAdditionalDecodePriority(facep->getImportanceToCamera()) ; - } - } + addTextureStats(facep->getVirtualSize()) ; + setAdditionalDecodePriority(facep->getImportanceToCamera()) ; + } } + mNeedsResetMaxVirtualSize = TRUE ; + reorganizeFaceList(); + reorganizeVolumeList(); #endif } void LLViewerImage::scaleDown() @@ -1817,11 +1824,111 @@ void LLViewerImage::setForSculpt() checkCachedRawSculptImage() ; } +//virtual void LLViewerImage::addFace(LLFace* facep) { - mFaceList.push_back(facep) ; + if(mNumFaces >= mFaceList.size()) + { + mFaceList.resize(2 * mNumFaces + 1) ; + } + mFaceList[mNumFaces] = facep ; + facep->setIndexInTex(mNumFaces) ; + mNumFaces++ ; + mLastFaceListUpdateTimer.reset() ; +} + +//virtual +void LLViewerImage::removeFace(LLFace* facep) +{ + if(mNumFaces > 1) + { + S32 index = facep->getIndexInTex() ; + mFaceList[index] = mFaceList[--mNumFaces] ; + mFaceList[index]->setIndexInTex(index) ; + } + else + { + mFaceList.clear() ; + mNumFaces = 0 ; + } + mLastFaceListUpdateTimer.reset() ; +} + +S32 LLViewerImage::getNumFaces() const +{ + return mNumFaces ; +} + + +//virtual +void LLViewerImage::addVolume(LLVOVolume* volumep) +{ + if( mNumVolumes >= mVolumeList.size()) + { + mVolumeList.resize(2 * mNumVolumes + 1) ; + } + mVolumeList[mNumVolumes] = volumep ; + volumep->setIndexInTex(mNumVolumes) ; + mNumVolumes++ ; + mLastVolumeListUpdateTimer.reset() ; } -void LLViewerImage::removeFace(LLFace* facep) + +//virtual +void LLViewerImage::removeVolume(LLVOVolume* volumep) { - mFaceList.remove(facep) ; + if(mNumVolumes > 1) + { + S32 index = volumep->getIndexInTex() ; + mVolumeList[index] = mVolumeList[--mNumVolumes] ; + mVolumeList[index]->setIndexInTex(index) ; + } + else + { + mVolumeList.clear() ; + mNumVolumes = 0 ; + } + mLastVolumeListUpdateTimer.reset() ; +} + +S32 LLViewerImage::getNumVolumes() const +{ + return mNumVolumes ; +} + +void LLViewerImage::reorganizeFaceList() +{ + static const F32 MAX_WAIT_TIME = 20.f; // seconds + static const U32 MAX_EXTRA_BUFFER_SIZE = 4 ; + + if(mNumFaces + MAX_EXTRA_BUFFER_SIZE > mFaceList.size()) + { + return ; + } + + if(mLastFaceListUpdateTimer.getElapsedTimeF32() < MAX_WAIT_TIME) + { + return ; + } + + mLastFaceListUpdateTimer.reset() ; + mFaceList.erase(mFaceList.begin() + mNumFaces, mFaceList.end()); +} + +void LLViewerImage::reorganizeVolumeList() +{ + static const F32 MAX_WAIT_TIME = 20.f; // seconds + static const U32 MAX_EXTRA_BUFFER_SIZE = 4 ; + + if(mNumVolumes + MAX_EXTRA_BUFFER_SIZE > mVolumeList.size()) + { + return ; + } + + if(mLastVolumeListUpdateTimer.getElapsedTimeF32() < MAX_WAIT_TIME) + { + return ; + } + + mLastVolumeListUpdateTimer.reset() ; + mVolumeList.erase(mVolumeList.begin() + mNumVolumes, mVolumeList.end()); } diff --git a/linden/indra/newview/llviewerimage.h b/linden/indra/newview/llviewerimage.h index 3bee51c..c2e3303 100644 --- a/linden/indra/newview/llviewerimage.h +++ b/linden/indra/newview/llviewerimage.h @@ -51,6 +51,7 @@ typedef void (*loaded_callback_func)( BOOL success, LLViewerImage *src_vi, LLIma class LLVFile; class LLMessageSystem; +class LLVOVolume; class LLLoadedCallbackEntry { @@ -209,6 +210,9 @@ public: INVALID_DISCARD_LEVEL = 0x7fff }; + typedef std::vector ll_face_list_t; + typedef std::vector ll_volume_list_t; + protected: /*virtual*/ ~LLViewerImage(); @@ -311,8 +315,17 @@ public: BOOL isSameTexture(const LLViewerImage* tex) const ; - void addFace(LLFace* facep) ; - void removeFace(LLFace* facep) ; + virtual void addFace(LLFace* facep) ; + virtual void removeFace(LLFace* facep) ; + S32 getNumFaces() const; + const ll_face_list_t* getFaceList() const {return &mFaceList;} + void reorganizeFaceList() ; + + virtual void addVolume(LLVOVolume* volumep); + virtual void removeVolume(LLVOVolume* volumep); + S32 getNumVolumes() const; + const ll_volume_list_t* getVolumeList() const { return &mVolumeList; } + void reorganizeVolumeList() ; void setCanUseHTTP(bool can_use_http) {mCanUseHTTP = can_use_http;}; @@ -417,8 +430,13 @@ private: BOOL mForSculpt ; //a flag if the texture is used for a sculpt data. mutable BOOL mNeedsResetMaxVirtualSize ; - typedef std::list ll_face_list_t ; - ll_face_list_t mFaceList ; //reverse pointer pointing to the faces using this image as texture + ll_face_list_t mFaceList ; //reverse pointer pointing to the faces using this image as texture + U32 mNumFaces ; + LLFrameTimer mLastFaceListUpdateTimer ; + + ll_volume_list_t mVolumeList; + U32 mNumVolumes; + LLFrameTimer mLastVolumeListUpdateTimer; bool mCanUseHTTP; // can this image be fetched by http diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 632bca2..e4a0d0c 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp @@ -89,12 +89,12 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re mRelativeXformInvTrans.setIdentity(); mLOD = MIN_LOD; - mSculptLevel = -2; mTextureAnimp = NULL; mVObjRadius = LLVector3(1,1,0.5f).length(); mNumFaces = 0; mLODChanged = FALSE; mSculptChanged = FALSE; + mIndexInTex = 0; } LLVOVolume::~LLVOVolume() @@ -502,9 +502,8 @@ void LLVOVolume::updateTextureVirtualSize() if (isSculpted()) { - LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); - LLUUID id = sculpt_params->getSculptTexture(); - mSculptTexture = gImageList.getImage(id); + updateSculptTexture(); + if (mSculptTexture.notNull()) { mSculptTexture->setBoostLevel(llmax((S32)mSculptTexture->getBoostLevel(), @@ -682,25 +681,52 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &volume_params, const S32 detail mVolumeImpl->onSetVolume(volume_params, detail); } + updateSculptTexture(); + if (isSculpted()) { - mSculptTexture = gImageList.getImage(volume_params.getSculptID()); if (mSculptTexture.notNull()) { sculpt(); - mSculptLevel = getVolume()->getSculptLevel(); } } - else - { - mSculptTexture = NULL; - } return TRUE; } return FALSE; } +void LLVOVolume::updateSculptTexture() +{ + LLPointer old_sculpt = mSculptTexture; + + if (isSculpted()) + { + LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); + LLUUID id = sculpt_params->getSculptTexture(); + if (id.notNull()) + { + mSculptTexture = gImageList::getImage(id); + } + } + else + { + mSculptTexture = NULL; + } + + if (mSculptTexture != old_sculpt) + { + if (old_sculpt.notNull()) + { + old_sculpt->removeVolume(this); + } + if (mSculptTexture.notNull()) + { + mSculptTexture->addVolume(this); + } + } +} + // sculpt replaces generate() for sculpted surfaces void LLVOVolume::sculpt() { @@ -754,6 +780,16 @@ void LLVOVolume::sculpt() sculpt_data = raw_image->getData(); } getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level); + + //notify rebuild any other VOVolumes that reference this sculpty volume + for (S32 i = 0; i < mSculptTexture->getNumVolumes(); ++i) + { + LLVOVolume* volume = (*(mSculptTexture->getVolumeList()))[i]; + if (volume != this && volume->getVolume() == getVolume()) + { + gPipeline.markRebuild(volume->mDrawable, LLDrawable::REBUILD_GEOMETRY, FALSE); + } + } } } diff --git a/linden/indra/newview/llvovolume.h b/linden/indra/newview/llvovolume.h index a78aa37..7c8a68d 100644 --- a/linden/indra/newview/llvovolume.h +++ b/linden/indra/newview/llvovolume.h @@ -169,8 +169,10 @@ public: /*virtual*/ BOOL setMaterial(const U8 material); void setTexture(const S32 face); - + S32 getIndexInTex() const {return mIndexInTex ;} /*virtual*/ BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false); + void updateSculptTexture(); + void setIndexInTex(S32 index) { mIndexInTex = index ;} void sculpt(); void updateRelativeXform(); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); @@ -231,7 +233,6 @@ private: LLFrameTimer mTextureUpdateTimer; S32 mLOD; BOOL mLODChanged; - S32 mSculptLevel; BOOL mSculptChanged; LLMatrix4 mRelativeXform; LLMatrix3 mRelativeXformInvTrans; @@ -239,6 +240,7 @@ private: F32 mVObjRadius; LLVolumeInterface *mVolumeImpl; LLPointer mSculptTexture; + S32 mIndexInTex; // statics public: -- cgit v1.1 From 2de3325acadcb3a67978ae27ad69981c8c47aa29 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Mon, 24 Jan 2011 23:15:49 +0200 Subject: Fix a brain fart in 981e88b925 --- linden/indra/newview/llvovolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index e4a0d0c..204d641 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp @@ -706,7 +706,7 @@ void LLVOVolume::updateSculptTexture() LLUUID id = sculpt_params->getSculptTexture(); if (id.notNull()) { - mSculptTexture = gImageList::getImage(id); + mSculptTexture = gImageList.getImage(id); } } else -- cgit v1.1 From 21d0848f94c64b20fb7ceedd4ae7b71012a834d7 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Sun, 6 Feb 2011 23:42:37 +0200 Subject: Fix #778: Textures get stuck half fetched. Make sure partial textures are cached as partial, so that they will finish fetching in consequent sessions. This is a rare case, but does happen. Backported from viewer2. --- linden/indra/newview/lltexturefetch.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index 83a54e4..4b1a9cb 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp @@ -1116,6 +1116,17 @@ bool LLTextureFetchWorker::doWork(S32 param) return false; } S32 datasize = mFormattedImage->getDataSize(); + if(mFileSize < datasize)//This could happen when http fetching and sim fetching mixed. + { + if(mHaveAllData) + { + mFileSize = datasize ; + } + else + { + mFileSize = datasize + 1 ; //flag not fully loaded. + } + } llassert_always(datasize); setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it U32 cache_priority = mWorkPriority; -- cgit v1.1 From cff413945bdf7423797ad82220a20aad65587671 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Thu, 24 Feb 2011 19:09:20 +0200 Subject: Workaround #726: SIGSEGV in memcpy in LLImageRaw::LLImageRaw with data=0 Not sure why this happens, but is related to mForceToSaveRawImage=TRUE (e.g. in the texture preview floater.) This workaround seems to work for Singularity, as suggested by Siana Gears. --- linden/indra/llimage/llimage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linden/indra/llimage/llimage.cpp b/linden/indra/llimage/llimage.cpp index 776c481..1df3793 100644 --- a/linden/indra/llimage/llimage.cpp +++ b/linden/indra/llimage/llimage.cpp @@ -269,7 +269,7 @@ LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components) : LLImageBase() { mMemType = LLMemType::MTYPE_IMAGERAW; - if(allocateDataSize(width, height, components)) + if(allocateDataSize(width, height, components) && data) { memcpy(getData(), data, width*height*components); } -- cgit v1.1 From 6c6c66ea4d76fc5282fd03baf1112fbc44014cb9 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 27 Feb 2011 18:07:08 -0700 Subject: Fixed login menu bar not resizing with the window --- linden/indra/newview/skins/default/xui/en-us/menu_login.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_login.xml b/linden/indra/newview/skins/default/xui/en-us/menu_login.xml index 18fb8e6..c65a737 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_login.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_login.xml @@ -1,5 +1,5 @@ - + -- cgit v1.1 From d0fb6d12ed15efa02f881903b0741d7cc3139cab Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Tue, 1 Mar 2011 14:13:55 +0100 Subject: fix gstreamer plugin doesn't compile on linux --- .../gstreamer010/media_plugin_gstreamer010.cpp | 106 ++++++++++----------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp b/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp index 7e2833a..553cdd5 100755 --- a/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp +++ b/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp @@ -181,7 +181,7 @@ MediaPluginGStreamer010::MediaPluginGStreamer010( mVideoSink ( NULL ), mCommand ( COMMAND_NONE ) { - writeToLog("MediaPluginGStreamer010 PID=%u", U32(LL_GETPID())); + writeToLog((char*)"MediaPluginGStreamer010 PID=%u", U32(LL_GETPID())); } /////////////////////////////////////////////////////////////////////////////// @@ -236,7 +236,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, GST_MESSAGE_TYPE(message) != GST_MESSAGE_BUFFERING && GST_MESSAGE_TYPE(message) != GST_MESSAGE_TAG) { - writeToLog("Got GST message type: %s", GST_MESSAGE_TYPE_NAME (message)); + writeToLog((char*)"Got GST message type: %s", GST_MESSAGE_TYPE_NAME (message)); } switch (GST_MESSAGE_TYPE (message)) @@ -246,7 +246,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, // NEEDS GST 0.10.11+ and America discovered by C.Columbus gint percent = 0; gst_message_parse_buffering(message, &percent); - writeToLog("GST buffering: %d%%", percent); + writeToLog((char*)"GST buffering: %d%%", percent); break; } @@ -260,7 +260,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, &pending_state); #ifdef LL_GST_REPORT_STATE_CHANGES // not generally very useful, and rather spammy. - writeToLog("state change (old,,pending): %s,<%s>,%s", + writeToLog((char*)"state change (old,,pending): %s,<%s>,%s", get_gst_state_name(old_state), get_gst_state_name(new_state), get_gst_state_name(pending_state)); @@ -290,7 +290,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, gchar *debug = NULL; gst_message_parse_error (message, &err, &debug); - writeToLog("GST error: %s", err?err->message:"(unknown)"); + writeToLog((char*)"GST error: %s", err?err->message:"(unknown)"); if (err) g_error_free (err); g_free (debug); @@ -307,7 +307,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, gchar *debug = NULL; gst_message_parse_info (message, &err, &debug); - writeToLog("GST info: %s", err?err->message:"(unknown)"); + writeToLog((char*)"GST info: %s", err?err->message:"(unknown)"); if (err) g_error_free (err); g_free (debug); @@ -320,7 +320,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, gchar *debug = NULL; gst_message_parse_warning (message, &err, &debug); - writeToLog("GST warning: %s", err?err->message:"(unknown)"); + writeToLog((char*)"GST warning: %s", err?err->message:"(unknown)"); if (err) g_error_free (err); g_free (debug); @@ -337,7 +337,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, if ( gst_tag_list_get_string(new_tags, GST_TAG_TITLE, &title) ) { - //writeToLog("Title: %s", title); + //writeToLog((char*)"Title: %s", title); std::string newtitle(title); gst_tag_list_free(new_tags); @@ -356,10 +356,10 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, case GST_MESSAGE_EOS: { /* end-of-stream */ - writeToLog("GST end-of-stream."); + writeToLog((char*)"GST end-of-stream."); if (mIsLooping) { - //writeToLog("looping media..."); + //writeToLog((char*)"looping media..."); double eos_pos_sec = 0.0F; bool got_eos_position = getTimePos(eos_pos_sec); @@ -368,7 +368,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, // if we know that the movie is really short, don't // loop it else it can easily become a time-hog // because of GStreamer spin-up overhead - writeToLog("really short movie (%0.3fsec) - not gonna loop this, pausing instead.", eos_pos_sec); + writeToLog((char*)"really short movie (%0.3fsec) - not gonna loop this, pausing instead.", eos_pos_sec); // inject a COMMAND_PAUSE mCommand = COMMAND_PAUSE; } @@ -387,7 +387,7 @@ MediaPluginGStreamer010::processGSTEvents(GstBus *bus, else #endif // LLGST_LOOP_BY_SEEKING { // use clumsy stop-start to loop - writeToLog("didn't loop by rewinding - stopping and starting instead..."); + writeToLog((char*)"didn't loop by rewinding - stopping and starting instead..."); stop(); play(1.0); } @@ -433,7 +433,7 @@ MediaPluginGStreamer010::navigateTo ( const std::string urlIn ) setStatus(STATUS_LOADING); - writeToLog("Setting media URI: %s", urlIn.c_str()); + writeToLog((char*)"Setting media URI: %s", urlIn.c_str()); mSeekWanted = false; @@ -461,13 +461,13 @@ MediaPluginGStreamer010::update(int milliseconds) if (!mDoneInit) return false; // error - //writeToLog("updating media..."); + //writeToLog((char*)"updating media..."); // sanity check if (NULL == mPump || NULL == mPlaybin) { - writeToLog("dead media..."); + writeToLog((char*)"dead media..."); return false; } @@ -497,7 +497,7 @@ MediaPluginGStreamer010::update(int milliseconds) GST_OBJECT_LOCK(mVideoSink); if (mVideoSink->retained_frame_ready) { - writeToLog("NEW FRAME READY"); + writeToLog((char*)"NEW FRAME READY"); if (mVideoSink->retained_frame_width != mCurrentWidth || mVideoSink->retained_frame_height != mCurrentHeight) @@ -528,7 +528,7 @@ MediaPluginGStreamer010::update(int milliseconds) GST_OBJECT_UNLOCK(mVideoSink); mCurrentRowbytes = neww * newd; - writeToLog("video container resized to %dx%d", + writeToLog((char*)"video container resized to %dx%d", neww, newh); mDepth = newd; @@ -556,7 +556,7 @@ MediaPluginGStreamer010::update(int milliseconds) } GST_OBJECT_UNLOCK(mVideoSink); - writeToLog("NEW FRAME REALLY TRULY CONSUMED, TELLING HOST"); + writeToLog((char*)"NEW FRAME REALLY TRULY CONSUMED, TELLING HOST"); setDirty(0,0,mCurrentWidth,mCurrentHeight); } @@ -567,7 +567,7 @@ MediaPluginGStreamer010::update(int milliseconds) GST_OBJECT_UNLOCK(mVideoSink); - writeToLog("NEW FRAME not consumed, still waiting for a shm segment and/or shm resize"); + writeToLog((char*)"NEW FRAME not consumed, still waiting for a shm segment and/or shm resize"); } return true; @@ -606,7 +606,7 @@ MediaPluginGStreamer010::mouseMove( int x, int y ) bool MediaPluginGStreamer010::pause() { - writeToLog("pausing media..."); + writeToLog((char*)"pausing media..."); // todo: error-check this? gst_element_set_state(mPlaybin, GST_STATE_PAUSED); return true; @@ -615,7 +615,7 @@ MediaPluginGStreamer010::pause() bool MediaPluginGStreamer010::stop() { - writeToLog("stopping media..."); + writeToLog((char*)"stopping media..."); // todo: error-check this? gst_element_set_state(mPlaybin, GST_STATE_READY); return true; @@ -625,7 +625,7 @@ bool MediaPluginGStreamer010::play(double rate) { // NOTE: we don't actually support non-natural rate. - writeToLog("playing media... rate=%f", rate); + writeToLog((char*)"playing media... rate=%f", rate); // todo: error-check this? gst_element_set_state(mPlaybin, GST_STATE_PLAYING); return true; @@ -662,7 +662,7 @@ MediaPluginGStreamer010::seek(double time_sec) GST_SEEK_TYPE_SET, gint64(time_sec*GST_SECOND), GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); } - writeToLog("MEDIA SEEK REQUEST to %f sec result was %d", + writeToLog((char*)"MEDIA SEEK REQUEST to %f sec result was %d", float(time_sec), int(success)); return success; } @@ -716,7 +716,7 @@ MediaPluginGStreamer010::load() setStatus(STATUS_LOADING); - writeToLog("setting up media..."); + writeToLog((char*)"setting up media..."); mIsLooping = false; mVolume = (float) 0.1234567; // minor hack to force an initial volume update @@ -755,7 +755,7 @@ MediaPluginGStreamer010::load() GST_SLVIDEO(gst_element_factory_make ("private-slvideo", "slvideo")); if (!mVideoSink) { - writeToLog("Could not instantiate private-slvideo element."); + writeToLog((char*)"Could not instantiate private-slvideo element."); // todo: cleanup. setStatus(STATUS_ERROR); return false; // error @@ -774,7 +774,7 @@ MediaPluginGStreamer010::unload () if (!mDoneInit) return false; // error - writeToLog("unloading media..."); + writeToLog((char*)"unloading media..."); // stop getting callbacks for this bus g_source_remove(mBusWatchID); @@ -832,7 +832,7 @@ MediaPluginGStreamer010::startup() "libgstvideo-0.10.so.0") ) #endif { - writeToLog("Couldn't find suitable GStreamer 0.10 support on this system - video playback disabled."); + writeToLog((char*)"Couldn't find suitable GStreamer 0.10 support on this system - video playback disabled."); return false; } */ @@ -842,7 +842,7 @@ MediaPluginGStreamer010::startup() // } // else // { -// writeToLog("gst_segtrap_set_enabled() is not available; plugin crashes won't be caught."); +// writeToLog((char*)"gst_segtrap_set_enabled() is not available; plugin crashes won't be caught."); // } /* #if LL_LINUX @@ -885,12 +885,12 @@ MediaPluginGStreamer010::startup() { if (err) { - writeToLog("GST init failed: %s", err->message); + writeToLog((char*)"GST init failed: %s", err->message); g_error_free(err); } else { - writeToLog("GST init failed for unspecified reason."); + writeToLog((char*)"GST init failed for unspecified reason."); } return false; } @@ -903,7 +903,7 @@ MediaPluginGStreamer010::startup() gst_slvideo_init_class(); // List the plugins GStreamer can find - writeToLog("Found GStreamer plugins:"); + writeToLog((char*)"Found GStreamer plugins:"); GList *list; GstRegistry *registry = gst_registry_get_default(); std::string loaded = "No"; @@ -913,7 +913,7 @@ MediaPluginGStreamer010::startup() { GstPlugin *list_plugin = (GstPlugin *)list->data; if (gst_plugin_is_loaded(list_plugin)) loaded = "Yes"; - writeToLog("%s, loaded? %s", gst_plugin_get_name(list_plugin), loaded.c_str()); + writeToLog((char*)"%s, loaded? %s", gst_plugin_get_name(list_plugin), loaded.c_str()); } gst_plugin_list_free(list); @@ -960,11 +960,11 @@ void MediaPluginGStreamer010::set_gst_plugin_path() if( imp_dir == "" ) { - writeToLog("Could not get application directory, not setting GST_PLUGIN_PATH."); + writeToLog((char*)"Could not get application directory, not setting GST_PLUGIN_PATH."); return; } - writeToLog("Imprudence is installed at %s", imp_dir.c_str()); + writeToLog((char*)"Imprudence is installed at %s", imp_dir.c_str()); // ":" on Mac and 'Nix, ";" on Windows std::string separator = G_SEARCHPATH_SEPARATOR_S; @@ -974,7 +974,7 @@ void MediaPluginGStreamer010::set_gst_plugin_path() char *old_path = getenv("GST_PLUGIN_PATH"); if(old_path == NULL) { - writeToLog("Did not find user-set GST_PLUGIN_PATH."); + writeToLog((char*)"Did not find user-set GST_PLUGIN_PATH."); } else { @@ -1005,11 +1005,11 @@ void MediaPluginGStreamer010::set_gst_plugin_path() if( put_result == -1 ) { - writeToLog("Setting GST_PLUGIN_PATH failed!"); + writeToLog((char*)"Setting GST_PLUGIN_PATH failed!"); } else { - writeToLog("GST_PLUGIN_PATH set to %s", getenv("GST_PLUGIN_PATH")); + writeToLog((char*)"GST_PLUGIN_PATH set to %s", getenv("GST_PLUGIN_PATH")); } // Don't load system plugins. We only want to use ours, to avoid conflicts. @@ -1021,7 +1021,7 @@ void MediaPluginGStreamer010::set_gst_plugin_path() if( put_result == -1 ) { - writeToLog("Setting GST_PLUGIN_SYSTEM_PATH=\"\" failed!"); + writeToLog((char*)"Setting GST_PLUGIN_SYSTEM_PATH=\"\" failed!"); } #endif // LL_WINDOWS || LL_DARWIN @@ -1039,7 +1039,7 @@ MediaPluginGStreamer010::sizeChanged() { mNaturalWidth = mCurrentWidth; mNaturalHeight = mCurrentHeight; - writeToLog("Media NATURAL size better detected as %dx%d", + writeToLog((char*)"Media NATURAL size better detected as %dx%d", mNaturalWidth, mNaturalHeight); } @@ -1054,7 +1054,7 @@ MediaPluginGStreamer010::sizeChanged() message.setValue("name", mTextureSegmentName); message.setValueS32("width", mNaturalWidth); message.setValueS32("height", mNaturalHeight); - writeToLog("<--- Sending size change request to application with name: '%s' - natural size is %d x %d", mTextureSegmentName.c_str(), mNaturalWidth, mNaturalHeight); + writeToLog((char*)"<--- Sending size change request to application with name: '%s' - natural size is %d x %d", mTextureSegmentName.c_str(), mNaturalWidth, mNaturalHeight); sendMessage(message); } } @@ -1077,11 +1077,11 @@ MediaPluginGStreamer010::closedown() MediaPluginGStreamer010::~MediaPluginGStreamer010() { - //writeToLog("MediaPluginGStreamer010 destructor"); + //writeToLog((char*)"MediaPluginGStreamer010 destructor"); closedown(); - writeToLog("GStreamer010 closing down"); + writeToLog((char*)"GStreamer010 closing down"); } @@ -1125,11 +1125,11 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) if ( load() ) { - writeToLog("GStreamer010 media instance set up"); + writeToLog((char*)"GStreamer010 media instance set up"); } else { - writeToLog("GStreamer010 media instance failed to set up"); + writeToLog((char*)"GStreamer010 media instance failed to set up"); } message.setValue("plugin_version", getVersion()); @@ -1156,7 +1156,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) std::string name = message_in.getValue("name"); std::ostringstream str; - writeToLog("MediaPluginGStreamer010::receiveMessage: shared memory added, name: %s, size: %d, address: %p", name.c_str(), int(info.mSize), info.mAddress); + writeToLog((char*)"MediaPluginGStreamer010::receiveMessage: shared memory added, name: %s, size: %d, address: %p", name.c_str(), int(info.mSize), info.mAddress); mSharedSegments.insert(SharedSegmentMap::value_type(name, info)); } @@ -1164,7 +1164,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) { std::string name = message_in.getValue("name"); - writeToLog("MediaPluginGStreamer010::receiveMessage: shared memory remove, name = %s", name.c_str()); + writeToLog((char*)"MediaPluginGStreamer010::receiveMessage: shared memory remove, name = %s", name.c_str()); SharedSegmentMap::iterator iter = mSharedSegments.find(name); if(iter != mSharedSegments.end()) @@ -1182,7 +1182,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) } else { - writeToLog("MediaPluginGStreamer010::receiveMessage: unknown shared memory region!"); + writeToLog((char*)"MediaPluginGStreamer010::receiveMessage: unknown shared memory region!"); } // Send the response so it can be cleaned up. @@ -1193,7 +1193,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) else { std::ostringstream str; - writeToLog("MediaPluginGStreamer010::receiveMessage: unknown base message: %s", message_name.c_str()); + writeToLog((char*)"MediaPluginGStreamer010::receiveMessage: unknown base message: %s", message_name.c_str()); } } else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA) @@ -1236,7 +1236,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) S32 texture_height = message_in.getValueS32("texture_height"); std::ostringstream str; - writeToLog("---->Got size change instruction from application with shm name: %s - size is %d x %d", name.c_str(), width, height); + writeToLog((char*)"---->Got size change instruction from application with shm name: %s - size is %d x %d", name.c_str(), width, height); LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_response"); message.setValue("name", name); @@ -1252,8 +1252,8 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) SharedSegmentMap::iterator iter = mSharedSegments.find(name); if(iter != mSharedSegments.end()) { - writeToLog("*** Got size change with matching shm, new size is %d x %d", width, height); - writeToLog("*** Got size change with matching shm, texture size size is %d x %d", texture_width, texture_height); + writeToLog((char*)"*** Got size change with matching shm, new size is %d x %d", width, height); + writeToLog((char*)"*** Got size change with matching shm, texture size size is %d x %d", texture_width, texture_height); mPixels = (unsigned char*)iter->second.mAddress; mTextureSegmentName = name; @@ -1263,7 +1263,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) if (texture_width > 1 || texture_height > 1) // not a dummy size from the app, a real explicit forced size { - writeToLog("**** = REAL RESIZE REQUEST FROM APP"); + writeToLog((char*)"**** = REAL RESIZE REQUEST FROM APP"); GST_OBJECT_LOCK(mVideoSink); mVideoSink->resize_forced_always = true; @@ -1345,7 +1345,7 @@ void MediaPluginGStreamer010::receiveMessage(const char *message_string) } else { - writeToLog("MediaPluginGStreamer010::receiveMessage: unknown message class: %s", message_class.c_str()); + writeToLog((char*)"MediaPluginGStreamer010::receiveMessage: unknown message class: %s", message_class.c_str()); } } } -- cgit v1.1 From 340b9eda6fd80907deaa2757db63d3e1040599e6 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Tue, 1 Mar 2011 14:16:06 +0100 Subject: fix packaging fails on linux --- linden/indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index 56c2410..4703f16 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py @@ -134,7 +134,7 @@ class ViewerManifest(LLManifest): self.path("README.txt") self.path("MANIFESTO.txt") self.path("CONTRIBUTE.txt") - self.path("RELEASE_NOTES.txt") + #self.path("RELEASE_NOTES.txt") self.path("ChangeLog.txt", required=False) self.end_prefix("../../..") -- cgit v1.1 From 58d0360b3a78729d0446d3703160ecb4b97721a3 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Tue, 1 Mar 2011 14:19:55 +0100 Subject: fix news bar doesn't open internal browser --- linden/indra/llplugin/llpluginclassmedia.cpp | 3 ++- linden/indra/newview/app_settings/logcontrol.xml | 16 +++++++++------- linden/indra/newview/llmediactrl.cpp | 7 ++++++- linden/indra/newview/llpanellogin.cpp | 1 + 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/linden/indra/llplugin/llpluginclassmedia.cpp b/linden/indra/llplugin/llpluginclassmedia.cpp index 5a81c46..02da271 100755 --- a/linden/indra/llplugin/llpluginclassmedia.cpp +++ b/linden/indra/llplugin/llpluginclassmedia.cpp @@ -777,7 +777,7 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message) mDirtyRect.unionWith(newDirtyRect); } - LL_DEBUGS("PluginClassMedia") << "adjusted incoming rect is: (" + LL_DEBUGS("PluginClassMediaRect") << "adjusted incoming rect is: (" << newDirtyRect.mLeft << ", " << newDirtyRect.mTop << ", " << newDirtyRect.mRight << ", " @@ -973,6 +973,7 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message) { mClickURL = message.getValue("uri"); mClickTarget = message.getValue("target"); + LL_DEBUGS("PluginClassMedia") << "Click target \"" << mClickTarget << "\"" << LL_ENDL; mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_HREF); } else if(message_name == "click_nofollow") diff --git a/linden/indra/newview/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml index cdc837d..b7bc07b 100644 --- a/linden/indra/newview/app_settings/logcontrol.xml +++ b/linden/indra/newview/app_settings/logcontrol.xml @@ -57,7 +57,7 @@ - + @@ -65,15 +65,17 @@ + + NewsBar - Plugin + PluginClassMedia - PluginInstance - PluginPipe - PluginChild + + + - PluginParent - PluginViewerMedia + + diff --git a/linden/indra/newview/llmediactrl.cpp b/linden/indra/newview/llmediactrl.cpp index 8b60326..ff7ba22 100644 --- a/linden/indra/newview/llmediactrl.cpp +++ b/linden/indra/newview/llmediactrl.cpp @@ -37,6 +37,7 @@ // viewer includes #include "llfloaterhtml.h" +#include "llfloatermediabrowser.h" #include "llfloaterworldmap.h" #include "lluictrlfactory.h" #include "llurldispatcher.h" @@ -746,7 +747,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) case MEDIA_EVENT_CURSOR_CHANGED: { - LL_INFOS("Media") << "Media event: MEDIA_EVENT_CURSOR_CHANGED, new cursor is " << self->getCursorName() << LL_ENDL; + LL_DEBUGS("MediaEventCursor") << "Media event: MEDIA_EVENT_CURSOR_CHANGED, new cursor is " << self->getCursorName() << LL_ENDL; std::string cursor = self->getCursorName(); @@ -865,6 +866,7 @@ void LLMediaCtrl::onClickLinkHref( LLPluginClassMedia* self ) const std::string protocol2( "https://" ); if( mOpenLinksInExternalBrowser ) { + LL_DEBUGS("Media") << "OpenLinksInExternalBrowser" << LL_ENDL; if ( !url.empty() ) { if ( LLStringUtil::compareInsensitive( url.substr( 0, protocol1.length() ), protocol1 ) == 0 || @@ -877,6 +879,7 @@ void LLMediaCtrl::onClickLinkHref( LLPluginClassMedia* self ) else if( mOpenLinksInInternalBrowser ) { + LL_DEBUGS("Media") << "OpenLinksInInternalBrowser" << LL_ENDL; if ( !url.empty() ) { if ( LLStringUtil::compareInsensitive( url.substr( 0, protocol1.length() ), protocol1 ) == 0 || @@ -891,6 +894,8 @@ void LLMediaCtrl::onClickLinkHref( LLPluginClassMedia* self ) // "Second Life Browser", // open_links_externally, // mTrusted); + + LLFloaterMediaBrowser::getInstance()->openMedia(url); } } } diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index 4fe0624..e67f336 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -1216,6 +1216,7 @@ bool LLPanelLogin::loadNewsBar() curl_free(curl_version); curl_free(curl_skin); + LL_DEBUGS("NewsBar")<< "news bar setup to navigate to: " << full_url.str() << LL_ENDL; news_bar->navigateTo( full_url.str() ); -- cgit v1.1 From 3659dd79710a4cffd8ff6a76714de48af1c33aa6 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Tue, 1 Mar 2011 14:29:08 +0100 Subject: remove llfloaterhtml.* (not used anymore). --- linden/indra/newview/llfloaterchat.cpp | 1 - linden/indra/newview/llfloaterhtml.cpp | 253 ------------------------- linden/indra/newview/llfloaterhtml.h | 77 -------- linden/indra/newview/llfloatermediabrowser.cpp | 5 +- linden/indra/newview/llmediactrl.cpp | 1 - 5 files changed, 2 insertions(+), 335 deletions(-) delete mode 100644 linden/indra/newview/llfloaterhtml.cpp delete mode 100644 linden/indra/newview/llfloaterhtml.h diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index e9ea14b..79dddaa 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp @@ -73,7 +73,6 @@ #include "lllogchat.h" #include "lltexteditor.h" #include "lltextparser.h" -#include "llfloaterhtml.h" #include "llweb.h" #include "llstylemap.h" #include "llviewermenu.h" diff --git a/linden/indra/newview/llfloaterhtml.cpp b/linden/indra/newview/llfloaterhtml.cpp deleted file mode 100644 index 5822ed5..0000000 --- a/linden/indra/newview/llfloaterhtml.cpp +++ /dev/null @@ -1,253 +0,0 @@ -/** - * @file llfloaterhtml.cpp - * @brief In-world HTML dialog - * - * $LicenseInfo:firstyear=2005&license=viewergpl$ - * - * Copyright (c) 2005-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h" - -#include "llfloaterhtml.h" - -// viewer includes -#include "lluictrlfactory.h" -#include "llviewercontrol.h" -#include "lllineeditor.h" -#include "llviewerwindow.h" -#include "llweb.h" - - -LLFloaterHtml* LLFloaterHtml::sInstance = 0; - -//////////////////////////////////////////////////////////////////////////////// -// -LLFloaterHtml* LLFloaterHtml::getInstance() -{ - if ( ! sInstance ) - sInstance = new LLFloaterHtml(); - - return sInstance; -} - -//////////////////////////////////////////////////////////////////////////////// -// -LLFloaterHtml::LLFloaterHtml() -: LLFloater( std::string("HTML Floater") ) - - , - mWebBrowser( 0 ) -{ - LLUICtrlFactory::getInstance()->buildFloater( this, "floater_html.xml" ); - - childSetAction("back_btn", onClickBack, this); - childSetAction("home_btn", onClickHome, this); - childSetAction("forward_btn", onClickForward, this); - childSetAction("close_btn", onClickClose, this); - childSetCommitCallback("url_edit", onCommitUrlEdit, this ); - childSetAction("go_btn", onClickGo, this ); - - // reposition floater from saved settings - LLRect rect = gSavedSettings.getRect( "FloaterHtmlRect" ); - reshape( rect.getWidth(), rect.getHeight(), FALSE ); - setRect( rect ); - - mWebBrowser = getChild("html_floater_browser" ); - if ( mWebBrowser ) - { - // open links in internal browser - mWebBrowser->setOpenInExternalBrowser( false ); - } -} - -//////////////////////////////////////////////////////////////////////////////// -// -LLFloaterHtml::~LLFloaterHtml() -{ - // save position of floater - gSavedSettings.setRect( "FloaterHtmlRect", getRect() ); - - sInstance = 0; -} - -//////////////////////////////////////////////////////////////////////////////// -// virtual -void LLFloaterHtml::draw() -{ - // enable/disable buttons depending on state - if ( mWebBrowser ) - { - bool enable_back = mWebBrowser->canNavigateBack(); - childSetEnabled( "back_btn", enable_back ); - - bool enable_forward = mWebBrowser->canNavigateForward(); - childSetEnabled( "forward_btn", enable_forward ); - }; - - LLFloater::draw(); -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterHtml::show( std::string content_id, bool open_link_external, bool open_app_slurls ) -{ - // calculate the XML labels we'll need (if only XML folders worked) - std::string title_str = content_id + "_title"; - std::string url_str = content_id + "_url"; - - std::string title = getString( title_str ); - std::string url = getString( url_str ); - - show( url, title, open_link_external, open_app_slurls ); -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterHtml::show( std::string start_url, std::string title, bool open_link_external, bool trusted_browser ) -{ - // set the title - setTitle( title ); - - // navigate to the URL - if ( mWebBrowser ) - { - mWebBrowser->setTrusted( trusted_browser ); - mWebBrowser->setOpenInExternalBrowser( open_link_external ); - mWebBrowser->navigateTo( start_url ); - } - - // make floater appear - setVisibleAndFrontmost(); -} - -//////////////////////////////////////////////////////////////////////////////// -// -std::string LLFloaterHtml::getSupportUrl() -{ - return getString("support_page_url"); -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterHtml::onClose( bool app_quitting ) -{ - setVisible( false ); - // HACK for fast XML iteration replace with: - // destroy(); -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterHtml::onClickClose( void* data ) -{ - LLFloaterHtml* self = ( LLFloaterHtml* )data; - self->close(); -} - -//////////////////////////////////////////////////////////////////////////////// -// static -void LLFloaterHtml::onClickBack( void* data ) -{ - LLFloaterHtml* self = ( LLFloaterHtml* )data; - if ( self ) - { - if ( self->mWebBrowser ) - { - self->mWebBrowser->navigateBack(); - }; - }; -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterHtml::onClickHome( void* data ) -{ - LLFloaterHtml* self = ( LLFloaterHtml* )data; - if ( self ) - { - if ( self->mWebBrowser ) - { - std::string home_url = self->getString("home_page_url"); - if ( home_url.length() > 4 ) - { - self->mWebBrowser->navigateTo( home_url ); - } - else - { - llwarns << "Invalid home page specified for HTML floater - navigating to default" << llendl; - self->mWebBrowser->navigateTo( "http://secondlife.com" ); - } - }; - }; -} - -//////////////////////////////////////////////////////////////////////////////// -// static -void LLFloaterHtml::onClickForward( void* data ) -{ - LLFloaterHtml* self = ( LLFloaterHtml* )data; - if ( self ) - { - if ( self->mWebBrowser ) - { - self->mWebBrowser->navigateForward(); - }; - }; -} - -//////////////////////////////////////////////////////////////////////////////// -// static -void LLFloaterHtml::onCommitUrlEdit(LLUICtrl* ctrl, void* user_data) -{ - LLFloaterHtml* self = (LLFloaterHtml*)user_data; - - LLLineEditor* editor = (LLLineEditor*)ctrl; - std::string url = editor->getText(); - - if ( self->mWebBrowser ) - { - self->mWebBrowser->navigateTo( url ); - }; -} - -//////////////////////////////////////////////////////////////////////////////// -// static -void LLFloaterHtml::onClickGo( void* data ) -{ - LLFloaterHtml* self = ( LLFloaterHtml* )data; - if ( self ) - { - std::string url = self->childGetValue( "url_edit" ).asString(); - if ( url.length() ) - { - if ( self->mWebBrowser ) - { - self->mWebBrowser->navigateTo( url ); - } - } - } -} diff --git a/linden/indra/newview/llfloaterhtml.h b/linden/indra/newview/llfloaterhtml.h deleted file mode 100644 index 4383472..0000000 --- a/linden/indra/newview/llfloaterhtml.h +++ /dev/null @@ -1,77 +0,0 @@ - /** - * @file llfloaterhtml.h - * @author James Cook - * @brief In-world HTML dialog - * - * $LicenseInfo:firstyear=2005&license=viewergpl$ - * - * Copyright (c) 2005-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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$ - */ - -#ifndef LL_LLFLOATERHTML_H -#define LL_LLFLOATERHTML_H - -#include "llfloater.h" -#include "llhtmlhelp.h" - -class LLWebBrowserCtrl; - -class LLFloaterHtml : - public LLFloater -{ - public: - static LLFloaterHtml* getInstance(); - virtual ~LLFloaterHtml(); - - virtual void draw(); - virtual void onClose( bool app_quitting ); - - // Pass string like "in-world_help" or "additional help" - void show( std::string content_id, bool open_link_external, bool trusted_browser ); - - // Pass raw URL and window title - // Can be set to handle secondlife:///app/ URLs, but this should - // usually be false. - void show( std::string start_url, std::string title, bool open_link_external, bool trusted_browser ); - - std::string getSupportUrl(); - - static void onClickClose( void* data ); - static void onClickBack( void* data ); - static void onClickHome( void* data ); - static void onClickForward( void* data ); - static void onCommitUrlEdit(LLUICtrl* ctrl, void* user_data); - static void onClickGo( void* data ); - - private: - LLFloaterHtml(); - - LLWebBrowserCtrl* mWebBrowser; - static LLFloaterHtml* sInstance; - LLButton* mCloseButton; -}; - -#endif diff --git a/linden/indra/newview/llfloatermediabrowser.cpp b/linden/indra/newview/llfloatermediabrowser.cpp index d658a11..a78c9d1 100644 --- a/linden/indra/newview/llfloatermediabrowser.cpp +++ b/linden/indra/newview/llfloatermediabrowser.cpp @@ -1,6 +1,6 @@ /** - * @file llfloaterhtmlhelp.cpp - * @brief HTML Help floater - uses embedded web browser control + * @file llmediabrowser.cpp + * @brief embedded web browser * * $LicenseInfo:firstyear=2006&license=viewergpl$ * @@ -33,7 +33,6 @@ #include "llviewerprecompiledheaders.h" #include "llfloatermediabrowser.h" -#include "llfloaterhtml.h" #include "llchat.h" #include "llfloaterchat.h" diff --git a/linden/indra/newview/llmediactrl.cpp b/linden/indra/newview/llmediactrl.cpp index ff7ba22..8b10fa3 100644 --- a/linden/indra/newview/llmediactrl.cpp +++ b/linden/indra/newview/llmediactrl.cpp @@ -36,7 +36,6 @@ #include "llmediactrl.h" // viewer includes -#include "llfloaterhtml.h" #include "llfloatermediabrowser.h" #include "llfloaterworldmap.h" #include "lluictrlfactory.h" -- cgit v1.1 From de7bae0930e4830bbb90f12652d9a75088d431de Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Thu, 3 Feb 2011 22:24:21 +0100 Subject: Revolution Smythe: load voice module depending on login response --- linden/indra/newview/app_settings/settings.xml | 12 +++++++++++- linden/indra/newview/hippolimits.cpp | 5 ++++- linden/indra/newview/hippolimits.h | 3 ++- linden/indra/newview/kowopenregionsettings.cpp | 7 +++++++ linden/indra/newview/llvoiceclient.cpp | 23 +++++++++++++++++------ linden/indra/newview/llvoiceclient.h | 3 +++ 6 files changed, 44 insertions(+), 9 deletions(-) diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 17d4c3c..fbb51e8 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -37,7 +37,17 @@ Value 0 - + VoiceModule + + Comment + Executable file that runs voice. Platform specific parts (like .exe on windows) are added automatically. + Persist + 1 + Type + String + Value + SLVoice + AllowEditingOfTrees diff --git a/linden/indra/newview/hippolimits.cpp b/linden/indra/newview/hippolimits.cpp index d4c8efb..bb2e805 100644 --- a/linden/indra/newview/hippolimits.cpp +++ b/linden/indra/newview/hippolimits.cpp @@ -22,7 +22,8 @@ HippoLimits::HippoLimits() mMinPrimScale(0.001f), mMaxPrimScale(256.0f), mMaxLinkedPrims(-1), - mMaxDragDistance(0.f) + mMaxDragDistance(0.f), + mVoiceConnector("SLVoice") { setLimits(); } @@ -68,6 +69,7 @@ void HippoLimits::setOpenSimLimits() mEnableTeenMode = FALSE; mEnforceMaxBuild = FALSE; mRenderWater = TRUE; + mVoiceConnector = "SLVoice"; if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) { llinfos << "Using rendering compatible OpenSim limits" << llendl; @@ -110,6 +112,7 @@ void HippoLimits::setSecondLifeLimits() mEnableTeenMode = FALSE; mEnforceMaxBuild = FALSE; mRenderWater = TRUE; + mVoiceConnector = "SLVoice"; } F32 HippoLimits::getMaxPrimScale() const diff --git a/linden/indra/newview/hippolimits.h b/linden/indra/newview/hippolimits.h index 7792a2c..9d6b2f6 100644 --- a/linden/indra/newview/hippolimits.h +++ b/linden/indra/newview/hippolimits.h @@ -14,7 +14,7 @@ public: const S32& getMaxLinkedPrims() const { return mMaxLinkedPrims; } const S32& getMaxPhysLinkedPrims() const { return mMaxPhysLinkedPrims; } const F32& getMaxInventoryItemsTransfer() const { return mMaxInventoryItemsTransfer; } - + const std::string& getVoiceConnector() const { return mVoiceConnector; } // Returns the max prim size we can use on a grid F32 getMinPrimScale() const; @@ -59,6 +59,7 @@ public: BOOL mEnableTeenMode; BOOL mEnforceMaxBuild; BOOL mRenderWater; + std::string mVoiceConnector; private: void setOpenSimLimits(); diff --git a/linden/indra/newview/kowopenregionsettings.cpp b/linden/indra/newview/kowopenregionsettings.cpp index 8aac87c..ef14d2a 100644 --- a/linden/indra/newview/kowopenregionsettings.cpp +++ b/linden/indra/newview/kowopenregionsettings.cpp @@ -36,6 +36,7 @@ #include "llviewerobject.h" #include "llfloaterregioninfo.h" #include "llfloaterworldmap.h" +#include "llvoiceclient.h" //DEBUG includes //#include "llsdserialize.h" //LLSDNotationStreamer - for dumping LLSD to string @@ -200,6 +201,12 @@ class OpenRegionInfoUpdate : public LLHTTPNode { gHippoLimits->mAllowParcelWindLight = body["AllowParcelWindLight"].asInteger() == 1; } + if ( body.has("Voice") ) + { + gSavedSettings.setString("VoiceModule", body["Voice"].asString()); + //gVoiceClient->close(); + //gVoiceClient->start(); + } if (limitschanged) gFloaterTools->updateToolsSizeLimits(); diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index 7b1ed95..5517ca2 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp @@ -62,6 +62,7 @@ #include "llfirstuse.h" #include "llviewerwindow.h" #include "llviewercamera.h" +#include "hippolimits.h" #include "llfloaterfriends.h" //VIVOX, inorder to refresh communicate panel #include "llfloaterchat.h" // for LLFloaterChat::addChat() @@ -1524,6 +1525,15 @@ void LLVoiceClient::setState(state inState) mState = inState; } +void LLVoiceClient::close() +{ + setState(stateDisableCleanup); +} + +void LLVoiceClient::start() +{ + setState(stateStart); +} void LLVoiceClient::stateMachine() { @@ -1654,12 +1664,12 @@ void LLVoiceClient::stateMachine() //std::string exe_path = gDirUtilp->getAppRODataDir(); std::string exe_path = gDirUtilp->getExecutableDir(); exe_path += gDirUtilp->getDirDelimiter(); +#if LL_DARWIN + exe_path += "../Resources/"; +#endif + exe_path += gSavedSettings.getString("VoiceModule"); #if LL_WINDOWS - exe_path += "SLVoice.exe"; -#elif LL_DARWIN - exe_path += "../Resources/SLVoice"; -#else - exe_path += "SLVoice"; + exe_path += ".exe"; #endif // See if the vivox executable exists llstat s; @@ -1687,7 +1697,8 @@ void LLVoiceClient::stateMachine() STARTUPINFOA sinfo; memset(&sinfo, 0, sizeof(sinfo)); std::string exe_dir = gDirUtilp->getAppRODataDir(); - cmd = "SLVoice.exe"; + cmd = gSavedSettings.getString("VoiceModule"); + cmd += ".exe"; cmd += args; // So retarded. Windows requires that the second parameter to CreateProcessA be a writable (non-const) string... diff --git a/linden/indra/newview/llvoiceclient.h b/linden/indra/newview/llvoiceclient.h index cfc336b..9ef3be9 100644 --- a/linden/indra/newview/llvoiceclient.h +++ b/linden/indra/newview/llvoiceclient.h @@ -516,6 +516,9 @@ static void updatePosition(void); // Currently this will be false only for PSTN P2P calls. // NOTE: this will return true if the session can't be found. bool isSessionTextIMPossible(const LLUUID &session_id); + + void close(); + void start(); private: -- cgit v1.1 From d2180c8379f33351aecfce95833bcdbd176fa698 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Wed, 9 Feb 2011 16:16:29 +0100 Subject: fix: imprudence logo not showing in login screen; login screens not loading anymore after navigating to a broken one. This also shows an error page if the login screen page is broken. Todo: replace the trademarked logo. --- linden/indra/newview/llpanellogin.cpp | 14 ++------------ .../newview/skins/default/html/en-us/loading/loading.html | 9 +++++++++ 2 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 linden/indra/newview/skins/default/html/en-us/loading/loading.html diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index e67f336..0b91091 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -297,7 +297,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // don't make it a tab stop until SL-27594 is fixed web_browser->setTabStop(FALSE); - // web_browser->navigateToLocalPage( "loading", "loading.html" ); + web_browser->navigateToLocalPage( "loading", "loading.html" ); // make links open in external browser web_browser->setOpenInExternalBrowser( true ); @@ -338,16 +338,6 @@ void LLPanelLogin::setSiteIsAlive( bool alive ) else // the site is not available (missing page, server down, other badness) { -#if !USE_VIEWER_AUTH - if ( web_browser ) - { - // hide browser control (revealing default one) - web_browser->setVisible( FALSE ); - - // mark as unavailable - mHtmlAvailable = FALSE; - } -#else if ( web_browser ) { @@ -356,7 +346,7 @@ void LLPanelLogin::setSiteIsAlive( bool alive ) // mark as available mHtmlAvailable = TRUE; } -#endif + } } diff --git a/linden/indra/newview/skins/default/html/en-us/loading/loading.html b/linden/indra/newview/skins/default/html/en-us/loading/loading.html new file mode 100644 index 0000000..97174b0 --- /dev/null +++ b/linden/indra/newview/skins/default/html/en-us/loading/loading.html @@ -0,0 +1,9 @@ + + + + + +
+
   loading... +
+ -- cgit v1.1 From 4d29299ac5f83a7e5c6da2c277b8efff0bf787dd Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Wed, 16 Feb 2011 10:14:20 +0100 Subject: Add short documentation to which project/s (viewer/SLPlugin/libmediaplugin) llplugin* classes belong to Yes, I confess: I grepped for unique strings in the binaries, to be absolutely sure. --- linden/indra/llplugin/llpluginclassmedia.cpp | 2 ++ linden/indra/llplugin/llpluginclassmediaowner.h | 2 +- linden/indra/llplugin/llplugincookiestore.cpp | 2 ++ linden/indra/llplugin/llplugininstance.cpp | 2 ++ linden/indra/llplugin/llpluginmessage.cpp | 2 ++ linden/indra/llplugin/llpluginmessagepipe.cpp | 2 ++ linden/indra/llplugin/llpluginprocesschild.cpp | 2 ++ linden/indra/llplugin/llpluginprocessparent.cpp | 2 ++ linden/indra/llplugin/llpluginsharedmemory.cpp | 3 ++- linden/indra/llplugin/slplugin/slplugin.cpp | 1 + 10 files changed, 18 insertions(+), 2 deletions(-) diff --git a/linden/indra/llplugin/llpluginclassmedia.cpp b/linden/indra/llplugin/llpluginclassmedia.cpp index 02da271..520d9f5 100755 --- a/linden/indra/llplugin/llpluginclassmedia.cpp +++ b/linden/indra/llplugin/llpluginclassmedia.cpp @@ -33,6 +33,8 @@ * @endcond */ +/// IMPRUDENCE: this is part of the viewer + #include "linden_common.h" #include "indra_constants.h" diff --git a/linden/indra/llplugin/llpluginclassmediaowner.h b/linden/indra/llplugin/llpluginclassmediaowner.h index 9d1f352..0e54f7f 100755 --- a/linden/indra/llplugin/llpluginclassmediaowner.h +++ b/linden/indra/llplugin/llpluginclassmediaowner.h @@ -41,7 +41,7 @@ #include class LLPluginClassMedia; -class LLPluginCookieStore; +//class LLPluginCookieStore; // IMPRUDENCE: this is currently not used class LLPluginClassMediaOwner { diff --git a/linden/indra/llplugin/llplugincookiestore.cpp b/linden/indra/llplugin/llplugincookiestore.cpp index 283ba35..6b193de 100644 --- a/linden/indra/llplugin/llplugincookiestore.cpp +++ b/linden/indra/llplugin/llplugincookiestore.cpp @@ -33,6 +33,8 @@ * @endcond */ +/// IMPRUDENCE: this is currently not used + #include "linden_common.h" #include "indra_constants.h" diff --git a/linden/indra/llplugin/llplugininstance.cpp b/linden/indra/llplugin/llplugininstance.cpp index 67457f2..399f157 100755 --- a/linden/indra/llplugin/llplugininstance.cpp +++ b/linden/indra/llplugin/llplugininstance.cpp @@ -33,6 +33,8 @@ * @endcond */ +/// IMPRUDENCE: this is part of the SLPlugin + #include "linden_common.h" #include "llplugininstance.h" diff --git a/linden/indra/llplugin/llpluginmessage.cpp b/linden/indra/llplugin/llpluginmessage.cpp index 6452f4a..0810a04 100755 --- a/linden/indra/llplugin/llpluginmessage.cpp +++ b/linden/indra/llplugin/llpluginmessage.cpp @@ -33,6 +33,8 @@ * @endcond */ +/// IMPRUDENCE: this is part of the viewer and the SLPlugin and the libmedia_plugin_* libraries + #include "linden_common.h" #include "llpluginmessage.h" diff --git a/linden/indra/llplugin/llpluginmessagepipe.cpp b/linden/indra/llplugin/llpluginmessagepipe.cpp index ac3a902..2cad188 100755 --- a/linden/indra/llplugin/llpluginmessagepipe.cpp +++ b/linden/indra/llplugin/llpluginmessagepipe.cpp @@ -33,6 +33,8 @@ * @endcond */ +/// IMPRUDENCE: this is part of the viewer and the SLPlugin + #include "linden_common.h" #include "llpluginmessagepipe.h" diff --git a/linden/indra/llplugin/llpluginprocesschild.cpp b/linden/indra/llplugin/llpluginprocesschild.cpp index a1291c0..0d95cac 100755 --- a/linden/indra/llplugin/llpluginprocesschild.cpp +++ b/linden/indra/llplugin/llpluginprocesschild.cpp @@ -33,6 +33,8 @@ * @endcond */ +/// IMPRUDENCE: this is part of the SLPlugin + #include "linden_common.h" #include "llpluginprocesschild.h" diff --git a/linden/indra/llplugin/llpluginprocessparent.cpp b/linden/indra/llplugin/llpluginprocessparent.cpp index 5a66279..26572a0 100755 --- a/linden/indra/llplugin/llpluginprocessparent.cpp +++ b/linden/indra/llplugin/llpluginprocessparent.cpp @@ -33,6 +33,8 @@ * @endcond */ +/// IMPRUDENCE: this is part of the viewer + #include "linden_common.h" #include "llpluginprocessparent.h" diff --git a/linden/indra/llplugin/llpluginsharedmemory.cpp b/linden/indra/llplugin/llpluginsharedmemory.cpp index 6becb8d..882a2a1 100755 --- a/linden/indra/llplugin/llpluginsharedmemory.cpp +++ b/linden/indra/llplugin/llpluginsharedmemory.cpp @@ -33,6 +33,8 @@ * @endcond */ +/// IMPRUDENCE: this is part of the viewer and the SLPlugin + #include "linden_common.h" #include "llpluginsharedmemory.h" @@ -89,7 +91,6 @@ #include #endif // USE_APR_SHARED_MEMORY - int LLPluginSharedMemory::sSegmentNumber = 0; std::string LLPluginSharedMemory::createName(void) diff --git a/linden/indra/llplugin/slplugin/slplugin.cpp b/linden/indra/llplugin/slplugin/slplugin.cpp index 878577b..09331ca 100755 --- a/linden/indra/llplugin/slplugin/slplugin.cpp +++ b/linden/indra/llplugin/slplugin/slplugin.cpp @@ -35,6 +35,7 @@ * @endcond */ +/// IMPRUDENCE: this is part of the SLPlugin #include "linden_common.h" -- cgit v1.1 From c2756f03fd663619e793fa7fdb96172d9bb4501d Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Wed, 16 Feb 2011 10:36:45 +0100 Subject: remove unused webkit include in llplugin --- linden/indra/llplugin/CMakeLists.txt | 1 - linden/indra/llplugin/llpluginclassmedia.cpp | 2 -- 2 files changed, 3 deletions(-) diff --git a/linden/indra/llplugin/CMakeLists.txt b/linden/indra/llplugin/CMakeLists.txt index 7a7f4e5..5dbe07c 100644 --- a/linden/indra/llplugin/CMakeLists.txt +++ b/linden/indra/llplugin/CMakeLists.txt @@ -20,7 +20,6 @@ include_directories( ${LLRENDER_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} ${LLWINDOW_INCLUDE_DIRS} - ${LLQTWEBKIT_INCLUDE_DIR} ) set(llplugin_SOURCE_FILES diff --git a/linden/indra/llplugin/llpluginclassmedia.cpp b/linden/indra/llplugin/llpluginclassmedia.cpp index 520d9f5..f0a44f7 100755 --- a/linden/indra/llplugin/llpluginclassmedia.cpp +++ b/linden/indra/llplugin/llpluginclassmedia.cpp @@ -41,8 +41,6 @@ #include "llpluginclassmedia.h" #include "llpluginmessageclasses.h" -#include "llqtwebkit.h" - static int LOW_PRIORITY_TEXTURE_SIZE_DEFAULT = 256; static int nextPowerOf2( int value ) -- cgit v1.1 From 35f256d0597e55c6e2680ca612871c9b457a572a Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Wed, 16 Feb 2011 13:20:04 +0100 Subject: use logcontrol.xml also for SLPlugin --- linden/indra/llcommon/llerror.cpp | 2 +- linden/indra/llplugin/slplugin/slplugin.cpp | 39 ++++++++++++++++++++++++++--- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/linden/indra/llcommon/llerror.cpp b/linden/indra/llcommon/llerror.cpp index a9587c6..532a453 100644 --- a/linden/indra/llcommon/llerror.cpp +++ b/linden/indra/llcommon/llerror.cpp @@ -563,7 +563,7 @@ namespace #if LL_WINDOWS LLError::addRecorder(new RecordToWinDebug); #endif - + llwarns << "Load LogControlFile from Directory:"<< dir << llendl; LogControlFile& e = LogControlFile::fromDirectory(dir); // NOTE: We want to explicitly load the file before we add it to the event timer diff --git a/linden/indra/llplugin/slplugin/slplugin.cpp b/linden/indra/llplugin/slplugin/slplugin.cpp index 09331ca..347f1de 100755 --- a/linden/indra/llplugin/slplugin/slplugin.cpp +++ b/linden/indra/llplugin/slplugin/slplugin.cpp @@ -54,6 +54,20 @@ #include #endif +//imprudence: or we include lldir, or use apache runtime +//though the one is probably bloat and the other we rather want to avoid +#include // FILENAME_MAX +#ifdef WINDOWS + #include + #define getImpruDir _getcwd + #define DIR_DELIMITER "\\" +#else + #include + #define getImpruDir getcwd + #define DIR_DELIMITER "/" +#endif + + /* On Mac OS, since we call WaitNextEvent, this process will show up in the dock unless we set the LSBackgroundOnly or LSUIElement flag in the Info.plist. @@ -188,9 +202,28 @@ int main(int argc, char **argv) { // Set up llerror logging { - LLError::initForApplication("."); - LLError::setDefaultLevel(LLError::LEVEL_INFO); -// LLError::setTagLevel("Plugin", LLError::LEVEL_DEBUG); + std::string path; + char impruPath[FILENAME_MAX]; + + if (!getImpruDir(impruPath, sizeof(impruPath))) + { + path = "."; //FIXME: root directory of the system - bad idea + } + else + { + path = std::string(impruPath); + + path.append(DIR_DELIMITER); + path.append("app_settings"); + } + LLError::initForApplication(path); +// LLError::setDefaultLevel(LLError::LEVEL_INFO); +// LLError::setPrintLocation(true); +// LLError::setTagLevel("Plugin", LLError::LEVEL_DEBUG); +// LLError::setTagLevel("PluginPipe", LLError::LEVEL_DEBUG); +// LLError::setTagLevel("PluginChild", LLError::LEVEL_DEBUG); +// LLError::setTagLevel("PluginInstance", LLError::LEVEL_DEBUG); + // LLError::logToFile("slplugin.log"); } -- cgit v1.1 From 2ed44e4426cdd810cb204cbdafb78ff03964c1a8 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Tue, 1 Mar 2011 17:33:03 +0100 Subject: Improve the error message for a missing login screen --- .../default/html/en-us/loading-error/index.html | 54 ++++++++++++++-------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/linden/indra/newview/skins/default/html/en-us/loading-error/index.html b/linden/indra/newview/skins/default/html/en-us/loading-error/index.html index 71f9c86..37c8405 100644 --- a/linden/indra/newview/skins/default/html/en-us/loading-error/index.html +++ b/linden/indra/newview/skins/default/html/en-us/loading-error/index.html @@ -1,14 +1,14 @@ - + + DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -Unable to Connect -