diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 7dbca795d..ee9e74ae4 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -43,6 +43,8 @@ static LLRegisterWidget r("ui_ctrl"); LLUICtrl::LLUICtrl() : mViewModel(LLViewModelPtr(new LLViewModel)), + mMakeVisibleControlVariable(NULL), + mMakeInvisibleControlVariable(NULL), mCommitSignal(NULL), mValidateSignal(NULL), mMouseEnterSignal(NULL), @@ -144,6 +146,56 @@ LLViewModel* LLUICtrl::getViewModel() const { return mViewModel; } + +void LLUICtrl::setMakeVisibleControlVariable(LLControlVariable* control) +{ + if (mMakeVisibleControlVariable) + { + mMakeVisibleControlConnection.disconnect(); // disconnect current signal + mMakeVisibleControlVariable = NULL; + } + if (control) + { + mMakeVisibleControlVariable = control; + mMakeVisibleControlConnection = mMakeVisibleControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("visible"))); + setVisible(mMakeVisibleControlVariable->getValue().asBoolean()); + } +} + +void LLUICtrl::setMakeInvisibleControlVariable(LLControlVariable* control) +{ + if (mMakeInvisibleControlVariable) + { + mMakeInvisibleControlConnection.disconnect(); // disconnect current signal + mMakeInvisibleControlVariable = NULL; + } + if (control) + { + mMakeInvisibleControlVariable = control; + mMakeInvisibleControlConnection = mMakeInvisibleControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("invisible"))); + setVisible(!(mMakeInvisibleControlVariable->getValue().asBoolean())); + } +} +// static +bool LLUICtrl::controlListener(const LLSD& newvalue, LLHandle handle, std::string type) +{ + LLUICtrl* ctrl = handle.get(); + if (ctrl) + { + if (type == "visible") + { + ctrl->setVisible(newvalue.asBoolean()); + return true; + } + else if (type == "invisible") + { + ctrl->setVisible(!newvalue.asBoolean()); + return true; + } + } + return false; +} + // virtual BOOL LLUICtrl::setTextArg( const std::string& key, const LLStringExplicit& text ) { @@ -532,6 +584,19 @@ void LLUICtrl::initFromXML(LLXMLNodePtr node, LLView* parent) } } LLView::initFromXML(node, parent); + + if(node->getAttributeString("visibility_control",attrib_str) || node->getAttributeString("visiblity_control",attrib_str)) + { + LLControlVariable* control = findControl(attrib_str); + if (control) + setMakeVisibleControlVariable(control); + } + if(node->getAttributeString("invisibility_control",attrib_str) || node->getAttributeString("invisiblity_control",attrib_str)) + { + LLControlVariable* control = findControl(attrib_str); + if (control) + setMakeInvisibleControlVariable(control); + } } LLXMLNodePtr LLUICtrl::getXML(bool save_children) const diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index 79d8fd8fc..c1de060cb 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -80,6 +80,8 @@ public: virtual class LLCtrlSelectionInterface* getSelectionInterface(); virtual class LLCtrlListInterface* getListInterface(); virtual class LLCtrlScrollInterface* getScrollInterface(); + void setMakeVisibleControlVariable(LLControlVariable* control); + void setMakeInvisibleControlVariable(LLControlVariable* control); virtual void setTentative(BOOL b); virtual BOOL getTentative() const; @@ -116,6 +118,7 @@ public: BOOL focusLastItem(BOOL prefer_text_fields = FALSE); // Non Virtuals + LLHandle getHandle() const { return getDerivedHandle(); } BOOL getIsChrome() const; void setTabStop( BOOL b ); @@ -151,9 +154,11 @@ public: class CommitCallbackRegistry : public CallbackRegistry{}; // the enable callback registry is also used for visiblity callbacks class EnableCallbackRegistry : public CallbackRegistry{}; - + protected: + static bool controlListener(const LLSD& newvalue, LLHandle handle, std::string type); + commit_signal_t* mCommitSignal; enable_signal_t* mValidateSignal; @@ -162,6 +167,10 @@ protected: LLViewModelPtr mViewModel; + LLControlVariable* mMakeVisibleControlVariable; + boost::signals2::connection mMakeVisibleControlConnection; + LLControlVariable* mMakeInvisibleControlVariable; + boost::signals2::connection mMakeInvisibleControlConnection; private: BOOL mTabStop; diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 5f1f6311b..efb2c1f2f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -262,6 +262,7 @@ set(viewer_SOURCE_FILES llfloatervoiceeffect.cpp llfloaterwater.cpp llfloaterwebcontent.cpp + llfloaterwebprofile.cpp llfloaterwhitelistentry.cpp llfloaterwindlight.cpp llfloaterworldmap.cpp @@ -772,6 +773,7 @@ set(viewer_HEADER_FILES llfloatervoiceeffect.h llfloaterwater.h llfloaterwebcontent.h + llfloaterwebprofile.h llfloaterwhitelistentry.h llfloaterwindlight.h llfloaterworldmap.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8df4ae10d..e6c86b8fb 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -17025,6 +17025,22 @@ This should be as low as possible, but too low may break functionality Value 0 + WebProfileFloaterRect + + Comment + Web profile floater dimensions + Persist + 1 + Type + Rect + Value + + 0 + 680 + 485 + 0 + + SimulateFBOFailure Comment diff --git a/indra/newview/app_settings/settings_ascent.xml b/indra/newview/app_settings/settings_ascent.xml index e3d288568..dc52afbf3 100644 --- a/indra/newview/app_settings/settings_ascent.xml +++ b/indra/newview/app_settings/settings_ascent.xml @@ -609,5 +609,16 @@ Value 0 + UseWebProfiles + + Comment + Always use web profiles floaters instead of legacy profile floaters. + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp index 0dba5124c..cb37291f5 100644 --- a/indra/newview/ascentprefssys.cpp +++ b/indra/newview/ascentprefssys.cpp @@ -224,6 +224,7 @@ void LLPrefsAscentSys::refreshValues() mEnableClassicClouds = gSavedSettings.getBOOL("SkyUseClassicClouds"); mSpeedRez = gSavedSettings.getBOOL("SpeedRez"); mSpeedRezInterval = gSavedSettings.getU32("SpeedRezInterval"); + mUseWebProfiles = gSavedSettings.getBOOL("UseWebProfiles"); //Command Line ------------------------------------------------------------------------ mCmdLine = gSavedSettings.getBOOL("AscentCmdLine"); @@ -374,6 +375,7 @@ void LLPrefsAscentSys::cancel() gSavedSettings.setBOOL("SkyUseClassicClouds", mEnableClassicClouds); gSavedSettings.setBOOL("SpeedRez", mSpeedRez); gSavedSettings.setU32("SpeedRezInterval", mSpeedRezInterval); + gSavedSettings.setBOOL("UseWebProfiles", mUseWebProfiles); //Command Line ------------------------------------------------------------------------ gSavedSettings.setBOOL("AscentCmdLine", mCmdLine); diff --git a/indra/newview/ascentprefssys.h b/indra/newview/ascentprefssys.h index 8a7341481..8bc0f0d7f 100644 --- a/indra/newview/ascentprefssys.h +++ b/indra/newview/ascentprefssys.h @@ -72,6 +72,7 @@ protected: BOOL mEnableClassicClouds; BOOL mSpeedRez; U32 mSpeedRezInterval; + bool mUseWebProfiles; //Command Line ------------------------------------------------------------------------ BOOL mCmdLine; diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index a242a029b..1851e389b 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -39,11 +39,13 @@ #include "llfloateravatarinfo.h" #include "llfloatergroupinvite.h" #include "llfloatergroups.h" +#include "llfloaterwebprofile.h" #include "llfloaterworldmap.h" #include "llgivemoney.h" #include "llimview.h" // for gIMMgr #include "llinventoryobserver.h" #include "llmutelist.h" +#include "llpanelprofile.h" #include "lltrans.h" #include "llvoiceclient.h" #include "llweb.h" @@ -324,18 +326,16 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids) make_ui_sound("UISndStartIM"); } -/* Singu TODO: Web Profiles 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" : "profile"; } -*/ -static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name) +static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name, bool web) { - //if (!gSavedSettings.getBOOL("UseWebProfiles") - //{ + if (gSavedSettings.getString("WebProfileURL").empty() || !(web || gSavedSettings.getBOOL("UseWebProfiles"))) + { LLFloaterAvatarInfo* floater = LLFloaterAvatarInfo::getInstance(agent_id); if(!floater) { @@ -345,8 +345,7 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa // ...bring that window to front floater->open(); /*Flawfinder: ignore*/ - //} - /* + } else { std::string username = av_name.mUsername; @@ -362,21 +361,20 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa LLFloaterWebContent::Params p; p.url(url). id(agent_id.asString()); - LLFloaterReg::showInstance(get_profile_floater_name(agent_id), p); + LLFloaterWebProfile::showInstance(get_profile_floater_name(agent_id), p); } - */ } // static -void LLAvatarActions::showProfile(const LLUUID& id) +void LLAvatarActions::showProfile(const LLUUID& id, bool web) { if (id.notNull()) { LLAvatarName av_name; if (LLAvatarNameCache::get(id, &av_name)) // Bypass expiration, open NOW! - on_avatar_name_show_profile(id, av_name); + on_avatar_name_show_profile(id, av_name, web); else - LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_show_profile, _1, _2)); + LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_show_profile, _1, _2, web)); } } @@ -391,12 +389,11 @@ bool LLAvatarActions::profileVisible(const LLUUID& id) LLFloater* LLAvatarActions::getProfileFloater(const LLUUID& id) { LLFloater* browser; - //if (!gSavedSettings.getBOOL("UseWebProfiles") + if (gSavedSettings.getString("WebProfileURL").empty() || !gSavedSettings.getBOOL("UseWebProfiles")) browser = LLFloaterAvatarInfo::getInstance(id); - /*else - browser = dynamic_cast - (LLFloaterReg::findInstance(get_profile_floater_name(id), LLSD().with("id", id))); - */ + else + browser = + LLFloaterWebProfile::getInstance(id.asString()); return browser; } diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 64511e60e..b0ac68df0 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -85,7 +85,7 @@ public: /** * Show avatar profile. */ - static void showProfile(const LLUUID& id); + static void showProfile(const LLUUID& id, bool web = false); static void hideProfile(const LLUUID& id); static bool profileVisible(const LLUUID& id); static LLFloater* getProfileFloater(const LLUUID& id); diff --git a/indra/newview/llfloaterteleporthistory.cpp b/indra/newview/llfloaterteleporthistory.cpp index a4ffe91fa..173aaf5a7 100644 --- a/indra/newview/llfloaterteleporthistory.cpp +++ b/indra/newview/llfloaterteleporthistory.cpp @@ -334,7 +334,7 @@ void LLFloaterTeleportHistory::onTeleport(void* data) LLFloaterTeleportHistory* self = (LLFloaterTeleportHistory*) data; // build secondlife::/app link from simstring for instant teleport to destination - std::string slapp = "secondlife:///app/teleport/" + self->mPlacesList->getFirstSelected()->getColumn(LIST_SLURL)->getValue().asString(); + std::string slapp = "secondlife:///app/teleport/" + self->mPlacesList->getFirstSelected()->getColumn(LIST_SIMSTRING)->getValue().asString(); LLUrlAction::teleportToLocation(slapp); } diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index c47a893ff..6d2a2ae3e 100644 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -74,7 +74,6 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params ) mCommitCallbackRegistrar.add( "WebContent.Stop", boost::bind( &LLFloaterWebContent::onClickStop, this )); mCommitCallbackRegistrar.add( "WebContent.EnterAddress", boost::bind( &LLFloaterWebContent::onEnterAddress, this )); mCommitCallbackRegistrar.add( "WebContent.PopExternal", boost::bind( &LLFloaterWebContent::onPopExternal, this )); - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_web_content.xml"); mAgeTimer.reset(); } @@ -175,7 +174,7 @@ void LLFloaterWebContent::showInstance(const std::string& window_class, Params& assert(!old_inst); if(!old_inst) - LLFloaterWebContent::create(p); + LLUICtrlFactory::getInstance()->buildFloater(LLFloaterWebContent::create(p), "floater_web_content.xml"); } //static @@ -305,6 +304,12 @@ void LLFloaterWebContent::open_media(const Params& p) { setResizeLimits(100, 100); } + else + { + // Singu Note: currently only true with normal browser floater, if this changes, this workaround breaks + setRectControl("FloaterMediaRect"); + applyRectControl(); + } if (!p.preferred_media_size().isEmpty()) { diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h index 00d8c9532..9fabe42ac 100644 --- a/indra/newview/llfloaterwebcontent.h +++ b/indra/newview/llfloaterwebcontent.h @@ -81,6 +81,7 @@ public: /* virtual */ void draw(); protected: + friend class LLFloaterWebProfile; // inherited from LLViewerMediaObserver /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); diff --git a/indra/newview/llfloaterwebprofile.cpp b/indra/newview/llfloaterwebprofile.cpp new file mode 100755 index 000000000..c506c72fa --- /dev/null +++ b/indra/newview/llfloaterwebprofile.cpp @@ -0,0 +1,121 @@ +/** + * @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 "lluictrlfactory.h" +#include "llviewercontrol.h" + +LLFloaterWebProfile::LLFloaterWebProfile(const Params& key) : + LLFloaterWebContent(key) +{ +} + +void LLFloaterWebProfile::onOpen() +{ + Params p(mKey); + p.show_chrome(false). + window_class("profile"); + mKey = p; + LLFloaterWebContent::onOpen(); + applyPreferredRect(); +} + +// virtual +void LLFloaterWebProfile::handleReshape(const LLRect& new_rect, bool by_user) +{ + lldebugs << "handleReshape: " << new_rect << llendl; + + if (by_user && !isMinimized()) + { + lldebugs << "Storing new rect" << llendl; + gSavedSettings.setRect("WebProfileFloaterRect", new_rect); + } + + LLFloaterWebContent::handleReshape(new_rect, by_user); +} + +// Singu Note: this was copied from LLFloaterWebContent::showInstance +//static +void LLFloaterWebProfile::showInstance(const std::string& window_class, Params& p) +{ + p.window_class(window_class); + + LLSD key = p; + + instance_iter it = beginInstances(); + for(;it!=endInstances();++it) + { + if(it->mKey["window_class"].asString() == window_class) + { + if(it->matchesKey(key)) + { + it->mKey = key; + it->setKey(p.id()); + it->mAgeTimer.reset(); + it->open(); + return; + } + } + } + LLFloaterWebContent* old_inst = getInstance(p.id()); + if(old_inst) + { + llwarns << "Replacing unexpected duplicate floater: " << p.id() << llendl; + old_inst->mKey = key; + old_inst->mAgeTimer.reset(); + old_inst->open(); + } + assert(!old_inst); + + if(!old_inst) + LLUICtrlFactory::getInstance()->buildFloater(LLFloaterWebProfile::create(p), "floater_web_content.xml"); +} + +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"); + lldebugs << "Applying preferred rect: " << preferred_rect << llendl; + + // Don't override position that may have been set by floater stacking code. + // Singu Note: We do floater stacking here, actually + int left, top; + gFloaterView->getNewFloaterPosition(&left, &top); + LLRect new_rect = getRect(); + new_rect.setLeftTopAndSize( + left, top, //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 new file mode 100755 index 000000000..8944ddbc4 --- /dev/null +++ b/indra/newview/llfloaterwebprofile.h @@ -0,0 +1,60 @@ +/** + * @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(); + /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); + + static void showInstance(const std::string& window_class, Params& p); + static LLFloater* create(const LLSD& key); + +private: + void applyPreferredRect(); +}; + +#endif // LL_LLFLOATERWEBPROFILE_H + diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 88d8467df..6fc325481 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -563,7 +563,7 @@ BOOL LLFloaterIMPanel::postBuild() if (LLButton* btn = findChild("profile_callee_btn")) { - btn->setCommitCallback(boost::bind(LLAvatarActions::showProfile, mOtherParticipantUUID)); + btn->setCommitCallback(boost::bind(LLAvatarActions::showProfile, mOtherParticipantUUID, false)); if (!mProfileButtonEnabled) btn->setEnabled(false); } if (LLButton* btn = findChild("profile_tele_btn")) diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index bbf57a1b5..26e2f356f 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -1392,6 +1392,7 @@ LLPanelAvatar::LLPanelAvatar( factory_map["1st Life"] = LLCallbackMap(createPanelAvatarFirstLife, this); factory_map["My Notes"] = LLCallbackMap(createPanelAvatarNotes, this); + mCommitCallbackRegistrar.add("Profile.Web", boost::bind(LLAvatarActions::showProfile, boost::bind(&LLPanelAvatar::getAvatarID, this), true)); LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar.xml", &factory_map); selectTab(0); @@ -1408,6 +1409,7 @@ BOOL LLPanelAvatar::postBuild(void) childSetAction("Cancel", onClickCancel, this); childSetAction("copy_key",onClickGetKey,this); + getChildView("web_profile")->setVisible(!gSavedSettings.getString("WebProfileURL").empty()); if(mTab && !sAllowFirstLife) { diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 816ba6fba..76d96fd2e 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -33,20 +33,26 @@ #include "llpanelgroup.h" -#include "llagent.h" +// Library includes #include "llbutton.h" +#include "lltabcontainer.h" +#include "lltextbox.h" +#include "lluictrlfactory.h" +#include "llwindow.h" + +// Viewer includes +#include "llviewermessage.h" +#include "llviewerwindow.h" +#include "llappviewer.h" +#include "llnotificationsutil.h" + +#include "llagent.h" + +#include "llpanelgroupnotices.h" #include "llpanelgroupgeneral.h" #include "llpanelgrouproles.h" #include "llpanelgroupvoting.h" #include "llpanelgrouplandmoney.h" -#include "llpanelgroupnotices.h" -#include "lltabcontainer.h" -#include "lltextbox.h" -#include "llviewermessage.h" -#include "lluictrlfactory.h" -#include "llviewerwindow.h" -#include "llappviewer.h" -#include "llnotificationsutil.h" // static void* LLPanelGroupTab::createTab(void* data) @@ -123,6 +129,11 @@ void LLPanelGroupTab::handleClickHelp() } } +static void copy_group_profile_uri(const LLUUID& id) +{ + gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring("secondlife:///app/group/"+id.asString()+"/about")); +} + LLPanelGroup::LLPanelGroup(const LLUUID& group_id) : LLPanel("PanelGroup", LLRect(), FALSE), LLGroupMgrObserver( group_id ), @@ -152,6 +163,7 @@ LLPanelGroup::LLPanelGroup(const LLUUID& group_id) LLGroupMgr::getInstance()->addObserver(this); + mCommitCallbackRegistrar.add("Group.CopyURI", boost::bind(copy_group_profile_uri, group_id)); // Pass on construction of this panel to the control factory. LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group.xml", &getFactoryMap()); } diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 31482d15e..169da75a8 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -148,7 +148,7 @@ BOOL LLPanelGroupGeneral::postBuild() mListVisibleMembers = getChild("visible_members", recurse); if (mListVisibleMembers) { - mListVisibleMembers->setDoubleClickCallback(boost::bind(LLAvatarActions::showProfile, boost::bind(&LLScrollListCtrl::getCurrentID, mListVisibleMembers))); + mListVisibleMembers->setDoubleClickCallback(boost::bind(LLAvatarActions::showProfile, boost::bind(&LLScrollListCtrl::getCurrentID, mListVisibleMembers), false)); } // Options @@ -244,6 +244,7 @@ BOOL LLPanelGroupGeneral::postBuild() if (mGroupID.isNull()) { mGroupNameEditor->setEnabled(TRUE); + getChildView("copy_uri")->setVisible(false); // New group has no uri mEditCharter->setEnabled(TRUE); mCtrlShowInGroupList->setEnabled(TRUE); diff --git a/indra/newview/llpanelvoiceeffect.h b/indra/newview/llpanelvoiceeffect.h index 27face087..a6cbac181 100755 --- a/indra/newview/llpanelvoiceeffect.h +++ b/indra/newview/llpanelvoiceeffect.h @@ -30,11 +30,12 @@ #include "llpanel.h" #include "llvoiceclient.h" +#include "lllayoutstack.h" class LLComboBox; class LLPanelVoiceEffect - : public LLPanel + : public LLLayoutPanel , public LLVoiceEffectObserver { public: diff --git a/indra/newview/llprefsvoice.cpp b/indra/newview/llprefsvoice.cpp index b2f4342d4..c26fcb724 100644 --- a/indra/newview/llprefsvoice.cpp +++ b/indra/newview/llprefsvoice.cpp @@ -140,8 +140,6 @@ BOOL LLPrefsVoice::postBuild() childSetValue("ear_location", gSavedSettings.getS32("VoiceEarLocation")); childSetValue("enable_lip_sync_check", gSavedSettings.getBOOL("LipSyncEnabled")); - gSavedSettings.getControl("ShowDeviceSettings")->getSignal()->connect(boost::bind(&LLPanel::childSetVisible, this, "device_settings_panel", _2)); // Singu TODO: visibility_control - return TRUE; } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 2f3b7e33a..85f7e673e 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -4061,7 +4061,7 @@ bool process_login_success_response(std::string& password) if(gHippoGridManager->getConnectedGrid()->isOpenSimulator()) { std::string web_profile_url = response["web_profile_url"]; - if(!web_profile_url.empty()) + //if(!web_profile_url.empty()) // Singu Note: We're using this to check if this grid supports web profiles at all, so set empty if empty. gSavedSettings.setString("WebProfileURL", web_profile_url); } else if(!gHippoGridManager->getConnectedGrid()->isInProductionGrid()) diff --git a/indra/newview/skins/default/xui/en-us/floater_active_speakers.xml b/indra/newview/skins/default/xui/en-us/floater_active_speakers.xml index 7eb229a8c..b6410386d 100644 --- a/indra/newview/skins/default/xui/en-us/floater_active_speakers.xml +++ b/indra/newview/skins/default/xui/en-us/floater_active_speakers.xml @@ -3,28 +3,23 @@ height="300" min_height="200" min_width="180" name="active_speakers" rect_control="FloaterActiveSpeakersRect" title="Active Speakers" width="250"> - - - - - - - - - - + width="240" /> + Group Charter diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml index 33614f1b8..bebb4a2c0 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml @@ -37,6 +37,7 @@ seconds + diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml index 0320f315d..47f2aa065 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_vanity.xml @@ -13,7 +13,7 @@ - + diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml index 2c0ccf270..c2a19cd39 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_voice.xml @@ -16,5 +16,5 @@