diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index fa330ea77b..ed9c33f9e7 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -439,7 +439,6 @@ set(viewer_SOURCE_FILES llfloatervoiceeffect.cpp llfloatervoicevolume.cpp llfloaterwebcontent.cpp - llfloaterwebprofile.cpp llfloaterwhitelistentry.cpp llfloaterwindowsize.cpp llfloaterworldmap.cpp @@ -1200,7 +1199,6 @@ set(viewer_HEADER_FILES llfloatervoiceeffect.h llfloatervoicevolume.h llfloaterwebcontent.h - llfloaterwebprofile.h llfloaterwhitelistentry.h llfloaterwindowsize.h llfloaterworldmap.h diff --git a/indra/newview/fspanelprofile.cpp b/indra/newview/fspanelprofile.cpp index 79bb862e5c..1dba012728 100644 --- a/indra/newview/fspanelprofile.cpp +++ b/indra/newview/fspanelprofile.cpp @@ -809,21 +809,10 @@ void FSPanelProfileWeb::onOpen(const LLSD& key) BOOL FSPanelProfileWeb::postBuild() { - mWebProfileButton = getChild("web_profile"); - mLoadButton = getChild("load"); - mUrlEdit = getChild("url_edit"); - - mLoadButton->setCommitCallback(boost::bind(&FSPanelProfileWeb::onCommitLoad, this, _1)); - - mWebProfileButton->setCommitCallback(boost::bind(&FSPanelProfileWeb::onCommitWebProfile, this, _1)); - mWebProfileButton->setVisible(LLGridManager::getInstance()->isInSecondLife()); - mWebBrowser = getChild("profile_html"); mWebBrowser->addObserver(this); mWebBrowser->setHomePageUrl("about:blank"); - mUrlEdit->setEnabled(FALSE); - return TRUE; } @@ -834,9 +823,6 @@ void FSPanelProfileWeb::processProperties(void* data, EAvatarProcessorType type) const LLAvatarData* avatar_data = static_cast(data); if (avatar_data && getAvatarId() == avatar_data->avatar_id) { - mURLHome = avatar_data->profile_url; - mUrlEdit->setValue(mURLHome); - mLoadButton->setEnabled(mURLHome.length() > 0); enableControls(); } } @@ -844,14 +830,11 @@ void FSPanelProfileWeb::processProperties(void* data, EAvatarProcessorType type) void FSPanelProfileWeb::resetData() { - mURLHome = LLStringUtil::null; - mUrlEdit->setValue(mURLHome); mWebBrowser->navigateHome(); } void FSPanelProfileWeb::apply(LLAvatarData* data) { - data->profile_url = mUrlEdit->getValue().asString(); } void FSPanelProfileWeb::updateData() @@ -882,13 +865,12 @@ void FSPanelProfileWeb::onAvatarNameCache(const LLUUID& agent_id, const LLAvatar LLStringUtil::replaceChar(username, ' ', '.'); } - mURLWebProfile = getProfileURL(username); + mURLWebProfile = getProfileURL(username, true); if (mURLWebProfile.empty()) { return; } - mWebProfileButton->setEnabled(TRUE); - + if (getIsLoading()) //if the tab was opened before name was resolved, load the panel now { updateData(); @@ -919,30 +901,6 @@ void FSPanelProfileWeb::onCommitLoad(LLUICtrl* ctrl) } } -void FSPanelProfileWeb::onCommitWebProfile(LLUICtrl* ctrl) -{ - if (!mURLWebProfile.empty()) - { - LLSD::String valstr = ctrl->getValue().asString(); - if (valstr.empty()) - { - mWebBrowser->setVisible(TRUE); - mPerformanceTimer.start(); - mWebBrowser->navigateTo( mURLWebProfile, HTTP_CONTENT_TEXT_HTML ); - } - else if (valstr == "popout") - { - // open the web profile floater - LLAvatarActions::showProfileWeb(getAvatarId()); - } - else if (valstr == "external") - { - // open in external browser - LLWeb::loadURLExternal(mURLWebProfile); - } - } -} - void FSPanelProfileWeb::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) { switch(event) @@ -951,12 +909,6 @@ void FSPanelProfileWeb::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent e childSetValue("status_text", LLSD( self->getStatusText() ) ); break; - case MEDIA_EVENT_LOCATION_CHANGED: - // don't set this or user will set there url to profile url - // when clicking ok on there own profile. - // childSetText("url_edit", self->getLocation() ); - break; - case MEDIA_EVENT_NAVIGATE_BEGIN: { if (mFirstNavigate) @@ -987,11 +939,6 @@ void FSPanelProfileWeb::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent e void FSPanelProfileWeb::enableControls() { FSPanelProfileTab::enableControls(); - - if (getSelfProfile() && !getEmbedded()) - { - mUrlEdit->setEnabled(TRUE); - } } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/fspanelprofile.h b/indra/newview/fspanelprofile.h index b9d1171b21..ae43abc769 100644 --- a/indra/newview/fspanelprofile.h +++ b/indra/newview/fspanelprofile.h @@ -297,15 +297,11 @@ public: protected: void onCommitLoad(LLUICtrl* ctrl); - void onCommitWebProfile(LLUICtrl* ctrl); private: std::string mURLHome; std::string mURLWebProfile; LLMediaCtrl* mWebBrowser; - LLUICtrl* mWebProfileButton; - LLUICtrl* mLoadButton; - LLLineEditor* mUrlEdit; LLFrameTimer mPerformanceTimer; bool mFirstNavigate; diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index b4b3a6e731..80be90d251 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -464,22 +464,6 @@ const LLUUID LLAvatarActions::startConference(const uuid_vec_t& ids, const LLUUI return session_id; } -static const char* get_profile_floater_name(const LLUUID& avatar_id) -{ - // Use different floater XML for our profile to be able to save its rect. - return avatar_id == gAgentID ? "my_profile_web" : "profile_web"; -} - -static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name) -{ - std::string url = getProfileURL(av_name.getAccountName()); - - // PROFILES: open in webkit window - LLFloaterWebContent::Params p; - p.url(url).id(agent_id.asString()); - LLFloaterReg::showInstance(get_profile_floater_name(agent_id), p); -} - // static void LLAvatarActions::showProfile(const LLUUID& avatar_id) { @@ -648,16 +632,6 @@ LLFloater* LLAvatarActions::getProfileFloater(const LLUUID& avatar_id) return floater; } -// static -void LLAvatarActions::showProfileWeb(const LLUUID& avatar_id) -{ - if (avatar_id.notNull()) - { - LLAvatarNameCache::get(avatar_id, boost::bind(&on_avatar_name_show_profile, _1, _2)); - } -} - - //static void LLAvatarActions::hideProfile(const LLUUID& avatar_id) { diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index ada289b9ed..f4ef38d38a 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -111,7 +111,6 @@ public: static bool profileVisible(const LLUUID& avatar_id); static bool isPickTabSelected(const LLUUID& avatar_id); static LLFloater* getProfileFloater(const LLUUID& avatar_id); - static void showProfileWeb(const LLUUID& avatar_id); /** * Show avatar on world map. diff --git a/indra/newview/llfloaterwebprofile.cpp b/indra/newview/llfloaterwebprofile.cpp deleted file mode 100644 index 891bb90c0e..0000000000 --- a/indra/newview/llfloaterwebprofile.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @file llfloaterwebprofile.cpp - * @brief Avatar profile floater. - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llfloaterwebprofile.h" - -#include "llviewercontrol.h" - -LLFloaterWebProfile::LLFloaterWebProfile(const Params& key) : - LLFloaterWebContent(key) -{ -} - -void LLFloaterWebProfile::onOpen(const LLSD& key) -{ - Params p(key); - p.show_chrome(true); - p.window_class("profile"); - p.allow_address_entry(false); - p.trusted_content(true); - LLFloaterWebContent::onOpen(p); - applyPreferredRect(); -} - -// virtual -void LLFloaterWebProfile::handleReshape(const LLRect& new_rect, bool by_user) -{ - LL_DEBUGS() << "handleReshape: " << new_rect << LL_ENDL; - - if (by_user && !isMinimized()) - { - LL_DEBUGS() << "Storing new rect" << LL_ENDL; - gSavedSettings.setRect("WebProfileFloaterRect", new_rect); - } - - LLFloaterWebContent::handleReshape(new_rect, by_user); -} - -LLFloater* LLFloaterWebProfile::create(const LLSD& key) -{ - LLFloaterWebContent::Params p(key); - preCreate(p); - return new LLFloaterWebProfile(p); -} - -void LLFloaterWebProfile::applyPreferredRect() -{ - const LLRect preferred_rect = gSavedSettings.getRect("WebProfileFloaterRect"); - LL_DEBUGS() << "Applying preferred rect: " << preferred_rect << LL_ENDL; - - // Don't override position that may have been set by floater stacking code. - LLRect new_rect = getRect(); - new_rect.setLeftTopAndSize( - new_rect.mLeft, new_rect.mTop, - preferred_rect.getWidth(), preferred_rect.getHeight()); - setShape(new_rect); -} diff --git a/indra/newview/llfloaterwebprofile.h b/indra/newview/llfloaterwebprofile.h deleted file mode 100644 index 4c355e401b..0000000000 --- a/indra/newview/llfloaterwebprofile.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @file llfloaterwebprofile.h - * @brief Avatar profile floater. - * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLFLOATERWEBPROFILE_H -#define LL_LLFLOATERWEBPROFILE_H - -#include "llfloaterwebcontent.h" -#include "llviewermediaobserver.h" - -#include - -class LLMediaCtrl; - -/** - * Displays avatar profile web page. - */ -class LLFloaterWebProfile -: public LLFloaterWebContent -{ - LOG_CLASS(LLFloaterWebProfile); -public: - typedef LLFloaterWebContent::Params Params; - - LLFloaterWebProfile(const Params& key); - - /*virtual*/ void onOpen(const LLSD& key); - /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); - - static LLFloater* create(const LLSD& key); - -private: - void applyPreferredRect(); -}; - -#endif // LL_LLFLOATERWEBPROFILE_H - diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index ad8e09628d..b6bd6ce76e 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -1075,14 +1075,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) // try as slurl first if (!LLURLDispatcher::dispatch(url, "clicked", NULL, mTrusted)) { - if (self->isOverrideClickTarget() && target == "_navigate") - { - navigateTo(url, HTTP_CONTENT_TEXT_HTML); - } - else - { - LLWeb::loadURL(url, target, uuid); - } + LLWeb::loadURL(url, target, uuid); } // CP: removing this code because we no longer support popups so this breaks the flow. diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 6593298d5f..fbd8c320d2 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -991,28 +991,14 @@ void LLPanelProfileWeb::onOpen(const LLSD& key) resetData(); mAvatarNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileWeb::onAvatarNameCache, this, _1, _2)); - - if (mWebBrowser->getMediaPlugin()) - { - mWebBrowser->getMediaPlugin()->setOverrideClickTarget("_navigate"); - } } BOOL LLPanelProfileWeb::postBuild() { - mUrlEdit = getChild("url_edit"); - mLoadButton = getChild("load"); - mWebProfileButton = getChild("web_profile_popout_btn"); - - mLoadButton->setCommitCallback(boost::bind(&LLPanelProfileWeb::onCommitLoad, this, _1)); - mWebProfileButton->setCommitCallback(boost::bind(&LLPanelProfileWeb::onCommitWebProfile, this)); - mWebBrowser = getChild("profile_html"); mWebBrowser->addObserver(this); mWebBrowser->setHomePageUrl("about:blank"); - mUrlEdit->setEnabled(FALSE); - return TRUE; } @@ -1023,9 +1009,6 @@ void LLPanelProfileWeb::processProperties(void* data, EAvatarProcessorType type) const LLAvatarData* avatar_data = static_cast(data); if (avatar_data && getAvatarId() == avatar_data->avatar_id) { - mURLHome = avatar_data->profile_url; - mUrlEdit->setValue(mURLHome); - mLoadButton->setEnabled(mURLHome.length() > 0); updateButtons(); } } @@ -1033,14 +1016,12 @@ void LLPanelProfileWeb::processProperties(void* data, EAvatarProcessorType type) void LLPanelProfileWeb::resetData() { - mURLHome = LLStringUtil::null; - mUrlEdit->setValue(mURLHome); mWebBrowser->navigateHome(); } void LLPanelProfileWeb::apply(LLAvatarData* data) { - data->profile_url = mUrlEdit->getValue().asString(); + } void LLPanelProfileWeb::updateData() @@ -1104,12 +1085,6 @@ void LLPanelProfileWeb::onCommitLoad(LLUICtrl* ctrl) } } -void LLPanelProfileWeb::onCommitWebProfile() -{ - // open the web profile floater - LLAvatarActions::showProfileWeb(getAvatarId()); -} - void LLPanelProfileWeb::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) { switch(event) @@ -1118,12 +1093,6 @@ void LLPanelProfileWeb::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent e childSetValue("status_text", LLSD( self->getStatusText() ) ); break; - case MEDIA_EVENT_LOCATION_CHANGED: - // don't set this or user will set there url to profile url - // when clicking ok on there own profile. - // childSetText("url_edit", self->getLocation() ); - break; - case MEDIA_EVENT_NAVIGATE_BEGIN: { if (mFirstNavigate) @@ -1142,7 +1111,6 @@ void LLPanelProfileWeb::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent e LLStringUtil::format_map_t args; args["[TIME]"] = llformat("%.2f", mPerformanceTimer.getElapsedTimeF32()); childSetValue("status_text", LLSD( getString("LoadTime", args)) ); - resetLoading(); } break; @@ -1155,11 +1123,6 @@ void LLPanelProfileWeb::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent e void LLPanelProfileWeb::updateButtons() { LLPanelProfileTab::updateButtons(); - - if (getSelfProfile() && !getEmbedded()) - { - mUrlEdit->setEnabled(TRUE); - } } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index 2cec5fe203..256967f9d4 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -254,15 +254,11 @@ public: protected: /*virtual*/ void updateButtons(); void onCommitLoad(LLUICtrl* ctrl); - void onCommitWebProfile(); private: std::string mURLHome; std::string mURLWebProfile; LLMediaCtrl* mWebBrowser; - LLButton* mWebProfileButton; - LLUICtrl* mLoadButton; - LLLineEditor* mUrlEdit; LLFrameTimer mPerformanceTimer; bool mFirstNavigate; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 8f5cb0a708..1dc3c79d33 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -137,7 +137,6 @@ #include "llfloateruipreview.h" #include "llfloatervoiceeffect.h" #include "llfloaterwebcontent.h" -#include "llfloaterwebprofile.h" #include "llfloatervoicevolume.h" #include "llfloaterwhitelistentry.h" #include "llfloaterwindowsize.h" @@ -427,8 +426,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("outfit_snapshot", "floater_outfit_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); // Search floater is deferred to login now so we can tell what grid we're in. //LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("my_profile_web", "floater_my_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create); - LLFloaterReg::add("profile_web", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create); LLFloaterReg::add("profile", "floater_profile.xml",(LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); diff --git a/indra/newview/skins/default/xui/de/panel_fs_profile_web.xml b/indra/newview/skins/default/xui/de/panel_fs_profile_web.xml index f85ed284c2..c1440f29ef 100644 --- a/indra/newview/skins/default/xui/de/panel_fs_profile_web.xml +++ b/indra/newview/skins/default/xui/de/panel_fs_profile_web.xml @@ -1,13 +1,5 @@ - - - - - - - - diff --git a/indra/newview/skins/default/xui/en/panel_fs_profile_web.xml b/indra/newview/skins/default/xui/en/panel_fs_profile_web.xml index 2756e531b7..e764490a38 100644 --- a/indra/newview/skins/default/xui/en/panel_fs_profile_web.xml +++ b/indra/newview/skins/default/xui/en/panel_fs_profile_web.xml @@ -9,68 +9,8 @@ name="panel_profile_web" label="Web"> - - - - - - - - - - - - - - - - - (loading..) - - - - - - -