Merge branch 'Moap' of git://github.com/Shyotl/SingularityViewer into VoiceUpdate
Conflicts: indra/newview/llfloateractivespeakers.h - llparticipantlist.h got changed from a panel to a layoutpanel indra/newview/lloverlaybar.cpp - Silly conflict, I change one line, Shyotl changes the next two. Compile fixies: indra/newview/llavataractions.cpp needed to include llnotifications.h indra/newview/llvoicechannel.cpp needed to include llnotifications.h
@@ -222,6 +222,7 @@ set(viewer_SOURCE_FILES
|
||||
llfloaterlandholdings.cpp
|
||||
llfloaterlandmark.cpp
|
||||
llfloatermap.cpp
|
||||
llfloatermediasettings.cpp
|
||||
llfloatermemleak.cpp
|
||||
llfloatermessagelog.cpp
|
||||
llfloatermodelpreview.cpp
|
||||
@@ -263,6 +264,7 @@ set(viewer_SOURCE_FILES
|
||||
llfloatervoiceeffect.cpp
|
||||
llfloaterwater.cpp
|
||||
llfloaterwebcontent.cpp
|
||||
llfloaterwhitelistentry.cpp
|
||||
llfloaterwindlight.cpp
|
||||
llfloaterworldmap.cpp
|
||||
llfolderview.cpp
|
||||
@@ -369,6 +371,10 @@ set(viewer_SOURCE_FILES
|
||||
llpanellogin.cpp
|
||||
llpanelmaininventory.cpp
|
||||
llpanelmarketplaceoutboxinventory.cpp
|
||||
llpanelmediasettingsgeneral.cpp
|
||||
llpanelmediasettingspermissions.cpp
|
||||
llpanelmediasettingssecurity.cpp
|
||||
llpanelnearbymedia.cpp
|
||||
llpanelmorph.cpp
|
||||
llpanelmsgs.cpp
|
||||
llpanelnetwork.cpp
|
||||
@@ -729,6 +735,7 @@ set(viewer_HEADER_FILES
|
||||
llfloaterlandholdings.h
|
||||
llfloaterlandmark.h
|
||||
llfloatermap.h
|
||||
llfloatermediasettings.h
|
||||
llfloatermemleak.h
|
||||
llfloatermessagelog.h
|
||||
llfloatermodelpreview.h
|
||||
@@ -770,6 +777,7 @@ set(viewer_HEADER_FILES
|
||||
llfloatervoiceeffect.h
|
||||
llfloaterwater.h
|
||||
llfloaterwebcontent.h
|
||||
llfloaterwhitelistentry.h
|
||||
llfloaterwindlight.h
|
||||
llfloaterworldmap.h
|
||||
llfolderview.h
|
||||
@@ -876,6 +884,10 @@ set(viewer_HEADER_FILES
|
||||
llpanellogin.h
|
||||
llpanelmaininventory.h
|
||||
llpanelmarketplaceoutboxinventory.h
|
||||
llpanelmediasettingsgeneral.h
|
||||
llpanelmediasettingspermissions.h
|
||||
llpanelmediasettingssecurity.h
|
||||
llpanelnearbymedia.h
|
||||
llpanelmorph.h
|
||||
llpanelmsgs.h
|
||||
llpanelnetwork.h
|
||||
|
||||
@@ -425,7 +425,19 @@
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<!-- Begin: AO-->
|
||||
<key>ShowNearbyMediaFloater</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show nearby media floter</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
<!-- Begin: AO-->
|
||||
|
||||
<key>ShowAOSitPopup</key>
|
||||
<map>
|
||||
@@ -1147,7 +1159,7 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Comment</key>
|
||||
<string>Show Windlight popup</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
@@ -8828,6 +8840,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LastMediaSettingsTab</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Last selected tab in media settings window</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LastRunVersion</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -17088,6 +17111,22 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<integer>473</integer>
|
||||
</array>
|
||||
</map>
|
||||
<key>FloaterNearbyMediaRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Rectangle for nearby media floater.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Rect</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</map>
|
||||
<key>WindEnabled</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -506,7 +506,7 @@ void HippoGridInfo::formatFee(std::string &fee, int cost, bool showFree) const
|
||||
}
|
||||
|
||||
//static
|
||||
std::string HippoGridInfo::sanitizeGridNick(std::string &gridnick)
|
||||
std::string HippoGridInfo::sanitizeGridNick(const std::string &gridnick)
|
||||
{
|
||||
std::string tmp;
|
||||
int size = gridnick.size();
|
||||
@@ -529,7 +529,7 @@ std::string HippoGridInfo::sanitizeGridNick(std::string &gridnick)
|
||||
}
|
||||
|
||||
|
||||
std::string HippoGridInfo::getGridNick()
|
||||
std::string HippoGridInfo::getGridNick() const
|
||||
{
|
||||
if(!mGridNick.empty())
|
||||
{
|
||||
@@ -684,42 +684,57 @@ void HippoGridManager::discardAndReload()
|
||||
|
||||
HippoGridInfo* HippoGridManager::getGrid(const std::string& grid) const
|
||||
{
|
||||
if(grid.empty())
|
||||
return NULL;
|
||||
|
||||
std::map<std::string, HippoGridInfo*>::const_iterator it;
|
||||
it = mGridInfo.find(grid);
|
||||
|
||||
//The grids are keyed by 'name' which equates to something like "Second Life"
|
||||
//Try to match such first.
|
||||
if (it != mGridInfo.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
else
|
||||
else //Fall back to nick short names. (so something like "secondlife" will work)
|
||||
{
|
||||
return 0;
|
||||
for(it = mGridInfo.begin(); it != mGridInfo.end(); ++it)
|
||||
{
|
||||
if(it->second && LLStringUtil::compareInsensitive(it->second->getGridNick(), grid)==0)
|
||||
return it->second;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
HippoGridInfo* HippoGridManager::getCurrentGrid() const
|
||||
{
|
||||
HippoGridInfo* grid = getGrid(mCurrentGrid);
|
||||
if (grid)
|
||||
if(!grid)
|
||||
{
|
||||
return grid;
|
||||
}
|
||||
else
|
||||
{
|
||||
return &HippoGridInfo::FALLBACK_GRIDINFO;
|
||||
grid = getGrid(mDefaultGrid);
|
||||
}
|
||||
return grid ? grid : &HippoGridInfo::FALLBACK_GRIDINFO;
|
||||
}
|
||||
|
||||
const std::string& HippoGridManager::getDefaultGridNick() const
|
||||
std::string HippoGridManager::getDefaultGridNick() const
|
||||
{
|
||||
HippoGridInfo* grid = getGrid(mDefaultGrid);
|
||||
return grid ? grid->getGridNick() : HippoGridInfo::FALLBACK_GRIDINFO.getGridNick();
|
||||
}
|
||||
|
||||
std::string HippoGridManager::getCurrentGridNick() const
|
||||
{
|
||||
return getCurrentGrid()->getGridNick();
|
||||
}
|
||||
|
||||
const std::string& HippoGridManager::getDefaultGridName() const
|
||||
{
|
||||
return mDefaultGrid;
|
||||
}
|
||||
|
||||
const std::string& HippoGridManager::getCurrentGridNick() const
|
||||
const std::string& HippoGridManager::getCurrentGridName() const
|
||||
{
|
||||
if (mCurrentGrid.empty())
|
||||
{
|
||||
return mDefaultGrid;
|
||||
}
|
||||
return mCurrentGrid;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
const std::string& getVoiceConnector() const { return mVoiceConnector; }
|
||||
std::string getSearchUrl(SearchType ty, bool is_web) const;
|
||||
bool isRenderCompat() const { return mRenderCompat; }
|
||||
std::string getGridNick();
|
||||
std::string getGridNick() const;
|
||||
int getMaxAgentGroups() const { return mMaxAgentGroups; }
|
||||
|
||||
const std::string& getCurrencySymbol() const { return mCurrencySymbol; }
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
bool retrieveGridInfo();
|
||||
|
||||
static const char* getPlatformString(Platform platform);
|
||||
static std::string sanitizeGridNick(std::string &gridnick);
|
||||
static std::string sanitizeGridNick(const std::string &gridnick);
|
||||
|
||||
static HippoGridInfo FALLBACK_GRIDINFO;
|
||||
static void initFallback();
|
||||
@@ -163,8 +163,10 @@ public:
|
||||
HippoGridInfo* getConnectedGrid() const { return mConnectedGrid ? mConnectedGrid : getCurrentGrid(); }
|
||||
|
||||
HippoGridInfo* getCurrentGrid() const;
|
||||
const std::string& getDefaultGridNick() const;
|
||||
const std::string& getCurrentGridNick() const;
|
||||
std::string getDefaultGridNick() const;
|
||||
std::string getCurrentGridNick() const;
|
||||
const std::string& getDefaultGridName() const;
|
||||
const std::string& getCurrentGridName() const;
|
||||
|
||||
void setDefaultGrid(const std::string& grid);
|
||||
void setCurrentGrid(const std::string& grid);
|
||||
|
||||
@@ -164,7 +164,7 @@ BOOL HippoPanelGridsImpl::postBuild()
|
||||
// called internally too
|
||||
void HippoPanelGridsImpl::refresh()
|
||||
{
|
||||
const std::string &defaultGrid = gHippoGridManager->getDefaultGridNick();
|
||||
const std::string &defaultGrid = gHippoGridManager->getDefaultGridName();
|
||||
|
||||
LLComboBox *grids = getChild<LLComboBox>("grid_selector");
|
||||
S32 selectIndex = -1, i = 0;
|
||||
@@ -365,7 +365,7 @@ bool HippoPanelGridsImpl::saveCurGrid()
|
||||
void HippoPanelGridsImpl::reset()
|
||||
{
|
||||
mState = NORMAL;
|
||||
mCurGrid = gHippoGridManager->getCurrentGridNick();
|
||||
mCurGrid = gHippoGridManager->getCurrentGridName();
|
||||
loadCurGrid();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "llavataractions.h"
|
||||
|
||||
#include "llavatarnamecache.h" // IDEVO
|
||||
#include "llnotifications.h"
|
||||
#include "llnotificationsutil.h" // for LLNotificationsUtil
|
||||
#include "roles_constants.h" // for GP_MEMBER_INVITE
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ private:
|
||||
//
|
||||
|
||||
LLChatBar::LLChatBar()
|
||||
: LLPanel(LLStringUtil::null, LLRect(), BORDER_NO),
|
||||
: LLPanel(),
|
||||
mInputEditor(NULL),
|
||||
mGestureLabelTimer(),
|
||||
mLastSpecialChatChannel(0),
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "llpanel.h"
|
||||
#include "llframetimer.h"
|
||||
#include "llchat.h"
|
||||
#include "lllayoutstack.h"
|
||||
|
||||
class LLLineEditor;
|
||||
class LLMessageSystem;
|
||||
@@ -45,8 +46,7 @@ class LLFrameTimer;
|
||||
class LLChatBarGestureObserver;
|
||||
class LLComboBox;
|
||||
|
||||
class LLChatBar
|
||||
: public LLPanel
|
||||
class LLChatBar : public LLPanel
|
||||
{
|
||||
public:
|
||||
// constructor for inline chat-bars (e.g. hosted in chat history window)
|
||||
|
||||
@@ -352,9 +352,6 @@ LLXMLNodePtr LLColorSwatchCtrl::getXML(bool save_children) const
|
||||
|
||||
LLView* LLColorSwatchCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
||||
{
|
||||
std::string name("colorswatch");
|
||||
node->getAttributeString("name", name);
|
||||
|
||||
std::string label;
|
||||
node->getAttributeString("label", label);
|
||||
|
||||
@@ -373,7 +370,7 @@ LLView* LLColorSwatchCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFa
|
||||
}
|
||||
|
||||
LLColorSwatchCtrl* color_swatch = new LLColorSwatchCtrl(
|
||||
name,
|
||||
"colorswatch",
|
||||
rect,
|
||||
label,
|
||||
color );
|
||||
|
||||
@@ -123,7 +123,7 @@ void LLFloaterDayCycle::onClickHelp(void* data)
|
||||
LLFloaterDayCycle* self = LLFloaterDayCycle::instance();
|
||||
|
||||
std::string xml_alert = *(std::string *) data;
|
||||
LLNotifications::instance().add(self->contextualNotification(xml_alert));
|
||||
self->addContextualNotification(xml_alert);
|
||||
}
|
||||
|
||||
void LLFloaterDayCycle::initHelpBtn(const std::string& name, const std::string& xml_alert)
|
||||
|
||||
@@ -71,6 +71,8 @@
|
||||
#include "llviewerregion.h"
|
||||
#include "llwindow.h"
|
||||
|
||||
#include "llnotifications.h"
|
||||
|
||||
const char* market_panel = "market_panel";
|
||||
|
||||
class LLPanelDirMarket : public LLPanelDirFind
|
||||
|
||||
@@ -70,7 +70,7 @@ LLFloaterEnvSettings::~LLFloaterEnvSettings()
|
||||
void LLFloaterEnvSettings::onClickHelp(void* data)
|
||||
{
|
||||
LLFloaterEnvSettings* self = (LLFloaterEnvSettings*)data;
|
||||
LLNotifications::instance().add(self->contextualNotification("EnvSettingsHelpButton"));
|
||||
self->addContextualNotification("EnvSettingsHelpButton");
|
||||
}
|
||||
|
||||
void LLFloaterEnvSettings::initCallbacks(void)
|
||||
|
||||
319
indra/newview/llfloatermediasettings.cpp
Normal file
@@ -0,0 +1,319 @@
|
||||
/**
|
||||
* @file llfloatermediasettings.cpp
|
||||
* @brief Tabbed dialog for media settings - class implementation
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&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 "llfloatermediasettings.h"
|
||||
#include "llfloaterwhitelistentry.h"
|
||||
#include "llpanelmediasettingsgeneral.h"
|
||||
#include "llpanelmediasettingssecurity.h"
|
||||
#include "llpanelmediasettingspermissions.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llbutton.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llsdutil.h"
|
||||
|
||||
LLFloaterMediaSettings* LLFloaterMediaSettings::sInstance = NULL;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
LLFloaterMediaSettings::LLFloaterMediaSettings(const LLSD& key)
|
||||
: LLFloater(key),
|
||||
mTabContainer(NULL),
|
||||
mPanelMediaSettingsGeneral(NULL),
|
||||
mPanelMediaSettingsSecurity(NULL),
|
||||
mPanelMediaSettingsPermissions(NULL),
|
||||
mWaitingToClose( false ),
|
||||
mIdenticalHasMediaInfo( true ),
|
||||
mMultipleMedia(false),
|
||||
mMultipleValidMedia(false)
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this,"floater_media_settings.xml");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
LLFloaterMediaSettings::~LLFloaterMediaSettings()
|
||||
{
|
||||
if ( mPanelMediaSettingsGeneral )
|
||||
{
|
||||
delete mPanelMediaSettingsGeneral;
|
||||
mPanelMediaSettingsGeneral = NULL;
|
||||
}
|
||||
|
||||
if ( mPanelMediaSettingsSecurity )
|
||||
{
|
||||
delete mPanelMediaSettingsSecurity;
|
||||
mPanelMediaSettingsSecurity = NULL;
|
||||
}
|
||||
|
||||
if ( mPanelMediaSettingsPermissions )
|
||||
{
|
||||
delete mPanelMediaSettingsPermissions;
|
||||
mPanelMediaSettingsPermissions = NULL;
|
||||
}
|
||||
|
||||
sInstance = NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
BOOL LLFloaterMediaSettings::postBuild()
|
||||
{
|
||||
mApplyBtn = getChild<LLButton>("Apply");
|
||||
mApplyBtn->setClickedCallback(onBtnApply, this);
|
||||
|
||||
mCancelBtn = getChild<LLButton>("Cancel");
|
||||
mCancelBtn->setClickedCallback(onBtnCancel, this);
|
||||
|
||||
mOKBtn = getChild<LLButton>("OK");
|
||||
mOKBtn->setClickedCallback(onBtnOK, this);
|
||||
|
||||
mTabContainer = getChild<LLTabContainer>( "tab_container" );
|
||||
|
||||
mPanelMediaSettingsGeneral = new LLPanelMediaSettingsGeneral();
|
||||
mTabContainer->addTabPanel( mPanelMediaSettingsGeneral, mPanelMediaSettingsGeneral->getLabel() );
|
||||
mPanelMediaSettingsGeneral->setParent( this );
|
||||
|
||||
// note that "permissions" tab is really "Controls" tab - refs to 'perms' and
|
||||
// 'permissions' not changed to 'controls' since we don't want to change
|
||||
// shared files in server code and keeping everything the same seemed best.
|
||||
mPanelMediaSettingsPermissions = new LLPanelMediaSettingsPermissions();
|
||||
mTabContainer->addTabPanel( mPanelMediaSettingsPermissions, mPanelMediaSettingsPermissions->getLabel() );
|
||||
|
||||
mPanelMediaSettingsSecurity = new LLPanelMediaSettingsSecurity();
|
||||
mTabContainer->addTabPanel( mPanelMediaSettingsSecurity, mPanelMediaSettingsSecurity->getLabel() );
|
||||
mPanelMediaSettingsSecurity->setParent( this );
|
||||
|
||||
// restore the last tab viewed from persistance variable storage
|
||||
if (!mTabContainer->selectTab(gSavedSettings.getS32("LastMediaSettingsTab")))
|
||||
{
|
||||
mTabContainer->selectFirstTab();
|
||||
};
|
||||
|
||||
sInstance = this;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//static
|
||||
LLFloaterMediaSettings* LLFloaterMediaSettings::getInstance()
|
||||
{
|
||||
if ( !sInstance )
|
||||
{
|
||||
sInstance = new LLFloaterMediaSettings(LLSD());
|
||||
sInstance->setVisible(FALSE);
|
||||
}
|
||||
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterMediaSettings::apply()
|
||||
{
|
||||
if (sInstance->haveValuesChanged())
|
||||
{
|
||||
LLSD settings;
|
||||
sInstance->mPanelMediaSettingsGeneral->preApply();
|
||||
sInstance->mPanelMediaSettingsGeneral->getValues( settings, false );
|
||||
sInstance->mPanelMediaSettingsSecurity->preApply();
|
||||
sInstance->mPanelMediaSettingsSecurity->getValues( settings, false );
|
||||
sInstance->mPanelMediaSettingsPermissions->preApply();
|
||||
sInstance->mPanelMediaSettingsPermissions->getValues( settings, false );
|
||||
|
||||
LLSelectMgr::getInstance()->selectionSetMedia( LLTextureEntry::MF_HAS_MEDIA, settings );
|
||||
|
||||
sInstance->mPanelMediaSettingsGeneral->postApply();
|
||||
sInstance->mPanelMediaSettingsSecurity->postApply();
|
||||
sInstance->mPanelMediaSettingsPermissions->postApply();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void LLFloaterMediaSettings::onClose(bool app_quitting)
|
||||
{
|
||||
if(mPanelMediaSettingsGeneral)
|
||||
{
|
||||
mPanelMediaSettingsGeneral->onClose(app_quitting);
|
||||
}
|
||||
if(LLFloaterWhiteListEntry::instanceExists())
|
||||
LLFloaterWhiteListEntry::getInstance()->close(app_quitting);
|
||||
|
||||
LLFloater::onClose(app_quitting);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//static
|
||||
void LLFloaterMediaSettings::initValues( const LLSD& media_settings, bool editable )
|
||||
{
|
||||
if (sInstance->hasFocus()) return;
|
||||
|
||||
sInstance->clearValues(editable);
|
||||
// update all panels with values from simulator
|
||||
sInstance->mPanelMediaSettingsGeneral->
|
||||
initValues( sInstance->mPanelMediaSettingsGeneral, media_settings, editable );
|
||||
|
||||
sInstance->mPanelMediaSettingsSecurity->
|
||||
initValues( sInstance->mPanelMediaSettingsSecurity, media_settings, editable );
|
||||
|
||||
sInstance->mPanelMediaSettingsPermissions->
|
||||
initValues( sInstance->mPanelMediaSettingsPermissions, media_settings, editable );
|
||||
|
||||
// Squirrel away initial values
|
||||
sInstance->mInitialValues.clear();
|
||||
sInstance->mPanelMediaSettingsGeneral->getValues( sInstance->mInitialValues );
|
||||
sInstance->mPanelMediaSettingsSecurity->getValues( sInstance->mInitialValues );
|
||||
sInstance->mPanelMediaSettingsPermissions->getValues( sInstance->mInitialValues );
|
||||
|
||||
sInstance->mApplyBtn->setEnabled(editable);
|
||||
sInstance->mOKBtn->setEnabled(editable);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLFloaterMediaSettings::commitFields()
|
||||
{
|
||||
if (hasFocus())
|
||||
{
|
||||
LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
|
||||
if (cur_focus && cur_focus->acceptsTextInput())
|
||||
{
|
||||
cur_focus->onCommit();
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//static
|
||||
void LLFloaterMediaSettings::clearValues( bool editable)
|
||||
{
|
||||
if (sInstance)
|
||||
{
|
||||
// clean up all panels before updating
|
||||
sInstance->mPanelMediaSettingsGeneral ->clearValues(sInstance->mPanelMediaSettingsGeneral, editable);
|
||||
sInstance->mPanelMediaSettingsSecurity ->clearValues(sInstance->mPanelMediaSettingsSecurity, editable);
|
||||
sInstance->mPanelMediaSettingsPermissions->clearValues(sInstance->mPanelMediaSettingsPermissions, editable);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLFloaterMediaSettings::onBtnOK( void* userdata )
|
||||
{
|
||||
sInstance->commitFields();
|
||||
|
||||
sInstance->apply();
|
||||
|
||||
sInstance->close();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLFloaterMediaSettings::onBtnApply( void* userdata )
|
||||
{
|
||||
sInstance->commitFields();
|
||||
|
||||
sInstance->apply();
|
||||
|
||||
sInstance->mInitialValues.clear();
|
||||
sInstance->mPanelMediaSettingsGeneral->getValues( sInstance->mInitialValues );
|
||||
sInstance->mPanelMediaSettingsSecurity->getValues( sInstance->mInitialValues );
|
||||
sInstance->mPanelMediaSettingsPermissions->getValues( sInstance->mInitialValues );
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLFloaterMediaSettings::onBtnCancel( void* userdata )
|
||||
{
|
||||
sInstance->close();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLFloaterMediaSettings::onTabChanged(void* user_data, bool from_click)
|
||||
{
|
||||
LLTabContainer* self = (LLTabContainer*)user_data;
|
||||
gSavedSettings.setS32("LastMediaSettingsTab", self->getCurrentPanelIndex());
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
const std::string LLFloaterMediaSettings::getHomeUrl()
|
||||
{
|
||||
if ( mPanelMediaSettingsGeneral )
|
||||
return mPanelMediaSettingsGeneral->getHomeUrl();
|
||||
else
|
||||
return std::string( "" );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// virtual
|
||||
void LLFloaterMediaSettings::draw()
|
||||
{
|
||||
if (NULL != mApplyBtn)
|
||||
{
|
||||
// Set the enabled state of the "Apply" button if values changed
|
||||
mApplyBtn->setEnabled( haveValuesChanged() );
|
||||
}
|
||||
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
||||
|
||||
//private
|
||||
bool LLFloaterMediaSettings::haveValuesChanged() const
|
||||
{
|
||||
bool values_changed = false;
|
||||
// *NOTE: The code below is very inefficient. Better to do this
|
||||
// only when data change.
|
||||
// Every frame, check to see what the values are. If they are not
|
||||
// the same as the initial media data, enable the OK/Apply buttons
|
||||
LLSD settings;
|
||||
sInstance->mPanelMediaSettingsGeneral->getValues( settings );
|
||||
sInstance->mPanelMediaSettingsSecurity->getValues( settings );
|
||||
sInstance->mPanelMediaSettingsPermissions->getValues( settings );
|
||||
LLSD::map_const_iterator iter = settings.beginMap();
|
||||
LLSD::map_const_iterator end = settings.endMap();
|
||||
for ( ; iter != end; ++iter )
|
||||
{
|
||||
const std::string ¤t_key = iter->first;
|
||||
const LLSD ¤t_value = iter->second;
|
||||
if ( ! llsd_equals(current_value, mInitialValues[current_key]))
|
||||
{
|
||||
values_changed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return values_changed;
|
||||
}
|
||||
|
||||
bool LLFloaterMediaSettings::instanceExists()
|
||||
{
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
|
||||
89
indra/newview/llfloatermediasettings.h
Normal file
@@ -0,0 +1,89 @@
|
||||
/**
|
||||
* @file llfloatermediasettings.cpp
|
||||
* @brief Tabbed dialog for media settings - class definition
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&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_LLFLOATERMEDIASETTINGS_H
|
||||
#define LL_LLFLOATERMEDIASETTINGS_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "lltabcontainer.h"
|
||||
|
||||
class LLPanelMediaSettingsGeneral;
|
||||
class LLPanelMediaSettingsSecurity;
|
||||
class LLPanelMediaSettingsPermissions;
|
||||
|
||||
class LLFloaterMediaSettings :
|
||||
public LLFloater
|
||||
{
|
||||
public:
|
||||
LLFloaterMediaSettings(const LLSD& key);
|
||||
~LLFloaterMediaSettings();
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
|
||||
static LLFloaterMediaSettings* getInstance();
|
||||
static bool instanceExists();
|
||||
static void apply();
|
||||
static void initValues( const LLSD& media_settings , bool editable);
|
||||
static void clearValues( bool editable);
|
||||
|
||||
LLPanelMediaSettingsSecurity* getPanelSecurity(){return mPanelMediaSettingsSecurity;};
|
||||
const std::string getHomeUrl();
|
||||
//bool passesWhiteList( const std::string& test_url );
|
||||
|
||||
virtual void draw();
|
||||
|
||||
bool mIdenticalHasMediaInfo;
|
||||
bool mMultipleMedia;
|
||||
bool mMultipleValidMedia;
|
||||
|
||||
protected:
|
||||
LLButton *mOKBtn;
|
||||
LLButton *mCancelBtn;
|
||||
LLButton *mApplyBtn;
|
||||
|
||||
LLTabContainer *mTabContainer;
|
||||
LLPanelMediaSettingsGeneral* mPanelMediaSettingsGeneral;
|
||||
LLPanelMediaSettingsSecurity* mPanelMediaSettingsSecurity;
|
||||
LLPanelMediaSettingsPermissions* mPanelMediaSettingsPermissions;
|
||||
|
||||
static void onBtnOK(void*);
|
||||
static void onBtnCancel(void*);
|
||||
static void onBtnApply(void*);
|
||||
static void onTabChanged(void* user_data, bool from_click);
|
||||
void commitFields();
|
||||
|
||||
static LLFloaterMediaSettings* sInstance;
|
||||
|
||||
private:
|
||||
|
||||
bool haveValuesChanged() const;
|
||||
|
||||
LLSD mInitialValues;
|
||||
bool mWaitingToClose;
|
||||
};
|
||||
|
||||
#endif // LL_LLFLOATERMEDIASETTINGS_H
|
||||
@@ -43,7 +43,7 @@
|
||||
const S32 NOTIFICATION_PANEL_HEADER_HEIGHT = 20;
|
||||
const S32 HEADER_PADDING = 38;
|
||||
|
||||
class LLNotificationChannelPanel : public LLPanel
|
||||
class LLNotificationChannelPanel : public LLLayoutPanel
|
||||
{
|
||||
public:
|
||||
LLNotificationChannelPanel(const std::string& channel_name);
|
||||
@@ -59,8 +59,9 @@ private:
|
||||
};
|
||||
|
||||
LLNotificationChannelPanel::LLNotificationChannelPanel(const std::string& channel_name)
|
||||
: LLPanel(channel_name)
|
||||
: LLLayoutPanel(NOTIFICATION_PANEL_HEADER_HEIGHT,true,true)
|
||||
{
|
||||
setName(channel_name);
|
||||
mChannelPtr = LLNotifications::instance().getChannel(channel_name);
|
||||
mChannelRejectsPtr = LLNotificationChannelPtr(
|
||||
LLNotificationChannel::buildChannel(channel_name + "rejects", mChannelPtr->getParentChannelName(), !boost::bind(mChannelPtr->getFilter(), _1)));
|
||||
@@ -203,7 +204,7 @@ void LLFloaterNotificationConsole::addChannel(const std::string& name, bool open
|
||||
{
|
||||
LLLayoutStack& stack = getChildRef<LLLayoutStack>("notification_channels");
|
||||
LLNotificationChannelPanel* panelp = new LLNotificationChannelPanel(name);
|
||||
stack.addPanel(panelp, 0, NOTIFICATION_PANEL_HEADER_HEIGHT, TRUE, TRUE, LLLayoutStack::ANIMATE);
|
||||
stack.addPanel(panelp, LLLayoutStack::ANIMATE);
|
||||
|
||||
LLButton& header_button = panelp->getChildRef<LLButton>("header");
|
||||
header_button.setToggleState(!open);
|
||||
@@ -217,7 +218,7 @@ void LLFloaterNotificationConsole::removeChannel(const std::string& name)
|
||||
LLPanel* panelp = getChild<LLPanel>(name, TRUE, FALSE);
|
||||
if (panelp)
|
||||
{
|
||||
getChildRef<LLLayoutStack>("notification_channels").removePanel(panelp);
|
||||
getChildRef<LLLayoutStack>("notification_channels").removeChild(panelp);
|
||||
delete panelp;
|
||||
}
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@ public:
|
||||
static void closeWithoutSaving();
|
||||
|
||||
protected:
|
||||
friend class LLPanelNearByMedia;
|
||||
LLPreferenceCore *mPreferenceCore;
|
||||
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
|
||||
@@ -49,6 +49,7 @@ class LLPanelLandInfo;
|
||||
class LLSlider;
|
||||
class LLTabContainer;
|
||||
class LLTextBox;
|
||||
class LLMediaCtrl;
|
||||
class LLTool;
|
||||
class LLParcelSelection;
|
||||
class LLObjectSelection;
|
||||
@@ -71,11 +72,11 @@ public:
|
||||
LLFloaterTools();
|
||||
virtual ~LLFloaterTools();
|
||||
|
||||
virtual void onOpen();
|
||||
virtual BOOL canClose();
|
||||
virtual void onClose(bool app_quitting);
|
||||
/*virtual*/ void onOpen();
|
||||
/*virtual*/ BOOL canClose();
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
/*virtual*/ void draw();
|
||||
virtual void onFocusReceived();
|
||||
/*virtual*/ void onFocusReceived();
|
||||
|
||||
// call this once per frame to handle visibility, rect location,
|
||||
// button highlights, etc.
|
||||
@@ -100,13 +101,25 @@ public:
|
||||
|
||||
void setStatusText(const std::string& text);
|
||||
static void setEditTool(void* data);
|
||||
void setTool(const LLSD& user_data);
|
||||
void saveLastTool();
|
||||
void onClickBtnDeleteMedia();
|
||||
void onClickBtnAddMedia();
|
||||
void onClickBtnEditMedia();
|
||||
void clearMediaSettings();
|
||||
void updateMediaTitle();
|
||||
void navigateToTitleMedia( const std::string url );
|
||||
bool selectedMediaEditable();
|
||||
|
||||
private:
|
||||
void refresh();
|
||||
|
||||
void refreshMedia();
|
||||
void getMediaState();
|
||||
void updateMediaSettings();
|
||||
static bool deleteMediaConfirm(const LLSD& notification, const LLSD& response);
|
||||
static bool multipleFacesSelectedConfirm(const LLSD& notification, const LLSD& response);
|
||||
static void setObjectType( LLPCode pcode );
|
||||
static void onClickGridOptions(void* data);
|
||||
void onClickGridOptions();
|
||||
|
||||
public:
|
||||
LLButton *mBtnFocus;
|
||||
@@ -190,6 +203,8 @@ public:
|
||||
LLParcelSelectionHandle mParcelSelection;
|
||||
LLObjectSelectionHandle mObjectSelection;
|
||||
|
||||
LLMediaCtrl *mTitleMedia;
|
||||
bool mNeedMediaTitle;
|
||||
private:
|
||||
BOOL mDirty;
|
||||
|
||||
@@ -197,6 +212,8 @@ private:
|
||||
|
||||
void updateTreeGrassCombo(bool visible);
|
||||
static void onSelectTreesGrass(LLUICtrl*, void*);
|
||||
protected:
|
||||
LLSD mMediaSettings;
|
||||
};
|
||||
|
||||
extern LLFloaterTools *gFloaterTools;
|
||||
|
||||
@@ -174,7 +174,7 @@ void LLFloaterWater::onClickHelp(void* data)
|
||||
LLFloaterWater* self = LLFloaterWater::instance();
|
||||
|
||||
const std::string* xml_alert = (std::string*)data;
|
||||
LLNotifications::instance().add(self->contextualNotification(*xml_alert));
|
||||
self->addContextualNotification(*xml_alert);
|
||||
}
|
||||
|
||||
void LLFloaterWater::initHelpBtn(const std::string& name, const std::string& xml_alert)
|
||||
|
||||
91
indra/newview/llfloaterwhitelistentry.cpp
Normal file
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* @file llfloaterwhitelistentry.cpp
|
||||
* @brief LLFloaterWhistListEntry class implementation
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&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 "llfloatermediasettings.h"
|
||||
#include "llfloaterwhitelistentry.h"
|
||||
#include "llpanelmediasettingssecurity.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llwindow.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "lllineeditor.h"
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
LLFloaterWhiteListEntry::LLFloaterWhiteListEntry() :
|
||||
LLFloater()
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_whitelist_entry.xml");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
LLFloaterWhiteListEntry::~LLFloaterWhiteListEntry()
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
BOOL LLFloaterWhiteListEntry::postBuild()
|
||||
{
|
||||
mWhiteListEdit = getChild<LLLineEditor>("whitelist_entry");
|
||||
|
||||
childSetAction("cancel_btn", onBtnCancel, this);
|
||||
childSetAction("ok_btn", onBtnOK, this);
|
||||
|
||||
setDefaultBtn("ok_btn");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLFloaterWhiteListEntry::onBtnOK( void* userdata )
|
||||
{
|
||||
LLFloaterWhiteListEntry *self =(LLFloaterWhiteListEntry *)userdata;
|
||||
|
||||
LLPanelMediaSettingsSecurity* panel = LLFloaterMediaSettings::instanceExists() ? LLFloaterMediaSettings::getInstance()->getPanelSecurity() : NULL;
|
||||
if ( panel )
|
||||
{
|
||||
std::string white_list_item = self->mWhiteListEdit->getText();
|
||||
|
||||
panel->addWhiteListEntry( white_list_item );
|
||||
panel->updateWhitelistEnableStatus();
|
||||
};
|
||||
|
||||
self->close();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLFloaterWhiteListEntry::onBtnCancel( void* userdata )
|
||||
{
|
||||
LLFloaterWhiteListEntry *self =(LLFloaterWhiteListEntry *)userdata;
|
||||
|
||||
self->close();
|
||||
}
|
||||
50
indra/newview/llfloaterwhitelistentry.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @file llfloaterwhitelistentry.h
|
||||
* @brief LLFloaterWhiteListEntry class definition
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&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_LLFLOATERWHITELISTENTRY_H
|
||||
#define LL_LLFLOATERWHITELISTENTRY_H
|
||||
|
||||
#include "llfloater.h"
|
||||
|
||||
class LLLineEditor;
|
||||
|
||||
class LLFloaterWhiteListEntry :
|
||||
public LLFloater, public LLSingleton<LLFloaterWhiteListEntry>
|
||||
{
|
||||
public:
|
||||
LLFloaterWhiteListEntry();
|
||||
~LLFloaterWhiteListEntry();
|
||||
|
||||
BOOL postBuild();
|
||||
|
||||
private:
|
||||
LLLineEditor* mWhiteListEdit;
|
||||
|
||||
static void onBtnOK(void*);
|
||||
static void onBtnCancel(void*);
|
||||
};
|
||||
|
||||
#endif // LL_LLFLOATERWHITELISTENTRY_H
|
||||
@@ -231,7 +231,7 @@ void LLFloaterWindLight::onClickHelp(void* data)
|
||||
LLFloaterWindLight* self = LLFloaterWindLight::instance();
|
||||
|
||||
const std::string xml_alert = *(std::string*)data;
|
||||
LLNotifications::instance().add(self->contextualNotification(xml_alert));
|
||||
self->addContextualNotification(xml_alert);
|
||||
}
|
||||
|
||||
void LLFloaterWindLight::initHelpBtn(const std::string& name, const std::string& xml_alert)
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
#include "llviewertexturelist.h"
|
||||
//#include "lltoolobjpicker.h"
|
||||
#include "llhudmanager.h" // HACK for creating flex obj's
|
||||
#include "llviewermenu.h"
|
||||
#include "llviewermedia.h"
|
||||
#include "llmediaentry.h"
|
||||
|
||||
#include "llhudmanager.h" // For testing effects
|
||||
#include "llhudeffect.h"
|
||||
@@ -294,201 +297,257 @@ void LLHoverView::updateText()
|
||||
//
|
||||
BOOL suppressObjectHoverDisplay = !gSavedSettings.getBOOL("ShowAllObjectHoverTip");
|
||||
|
||||
LLSelectNode *nodep = LLSelectMgr::getInstance()->getHoverNode();;
|
||||
LLSelectNode *nodep = LLSelectMgr::getInstance()->getHoverNode();
|
||||
if (nodep)
|
||||
{
|
||||
line.clear();
|
||||
if (nodep->mName.empty())
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipNoName"));
|
||||
}
|
||||
else
|
||||
{
|
||||
line.append( nodep->mName );
|
||||
}
|
||||
mText.push_back(line);
|
||||
|
||||
if (!nodep->mDescription.empty()
|
||||
&& nodep->mDescription != DEFAULT_DESC)
|
||||
bool for_copy = nodep->mValid && nodep->mPermissions->getMaskEveryone() & PERM_COPY && hit_object && hit_object->permCopy();
|
||||
bool for_sale = nodep->mValid && for_sale_selection(nodep);
|
||||
|
||||
bool has_media = false;
|
||||
bool is_time_based_media = false;
|
||||
bool is_web_based_media = false;
|
||||
bool is_media_playing = false;
|
||||
bool is_media_displaying = false;
|
||||
|
||||
// Does this face have media?
|
||||
const LLTextureEntry* tep = hit_object ? hit_object->getTE(mLastPickInfo.mObjectFace) : NULL;
|
||||
|
||||
if(tep)
|
||||
{
|
||||
mText.push_back( nodep->mDescription );
|
||||
}
|
||||
|
||||
// Line: "Owner: James Linden"
|
||||
line.clear();
|
||||
line.append(LLTrans::getString("TooltipOwner") + " ");
|
||||
|
||||
if (nodep->mValid)
|
||||
{
|
||||
LLUUID owner;
|
||||
std::string name;
|
||||
if (!nodep->mPermissions->isGroupOwned())
|
||||
has_media = tep->hasMedia();
|
||||
const LLMediaEntry* mep = has_media ? tep->getMediaData() : NULL;
|
||||
if (mep)
|
||||
{
|
||||
owner = nodep->mPermissions->getOwner();
|
||||
if (LLUUID::null == owner)
|
||||
viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID());
|
||||
LLPluginClassMedia* media_plugin = NULL;
|
||||
|
||||
if (media_impl.notNull() && (media_impl->hasMedia()))
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipPublic"));
|
||||
}
|
||||
else if(LLAvatarNameCache::getPNSName(owner, name))
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
name = RlvStrings::getAnonym(name);
|
||||
is_media_displaying = true;
|
||||
//LLStringUtil::format_map_t args;
|
||||
|
||||
media_plugin = media_impl->getMediaPlugin();
|
||||
if(media_plugin)
|
||||
{
|
||||
if(media_plugin->pluginSupportsMediaTime())
|
||||
{
|
||||
is_time_based_media = true;
|
||||
is_web_based_media = false;
|
||||
//args["[CurrentURL]"] = media_impl->getMediaURL();
|
||||
is_media_playing = media_impl->isMediaPlaying();
|
||||
}
|
||||
else
|
||||
{
|
||||
is_time_based_media = false;
|
||||
is_web_based_media = true;
|
||||
//args["[CurrentURL]"] = media_plugin->getLocation();
|
||||
}
|
||||
//tooltip_msg.append(LLTrans::getString("CurrentURL", args));
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
line.append(name);
|
||||
|
||||
// Avoid showing tip over media that's displaying unless it's for sale
|
||||
// also check the primary node since sometimes it can have an action even though
|
||||
// the root node doesn't
|
||||
|
||||
if(!suppressObjectHoverDisplay || !is_media_displaying || for_sale)
|
||||
{
|
||||
if (nodep->mName.empty())
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipNoName"));
|
||||
}
|
||||
else
|
||||
{
|
||||
line.append( nodep->mName );
|
||||
}
|
||||
|
||||
mText.push_back(line);
|
||||
|
||||
if (!nodep->mDescription.empty()
|
||||
&& nodep->mDescription != DEFAULT_DESC)
|
||||
{
|
||||
mText.push_back( nodep->mDescription );
|
||||
}
|
||||
|
||||
// Line: "Owner: James Linden"
|
||||
line.clear();
|
||||
line.append(LLTrans::getString("TooltipOwner") + " ");
|
||||
|
||||
if (nodep->mValid)
|
||||
{
|
||||
LLUUID owner;
|
||||
std::string name;
|
||||
if (!nodep->mPermissions->isGroupOwned())
|
||||
{
|
||||
owner = nodep->mPermissions->getOwner();
|
||||
if (LLUUID::null == owner)
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipPublic"));
|
||||
}
|
||||
else if(LLAvatarNameCache::getPNSName(owner, name))
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
name = RlvStrings::getAnonym(name);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
line.append(name);
|
||||
}
|
||||
else
|
||||
{
|
||||
line.append(LLTrans::getString("RetrievingData"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
line.append(LLTrans::getString("RetrievingData"));
|
||||
std::string name;
|
||||
owner = nodep->mPermissions->getGroup();
|
||||
if (gCacheName->getGroupName(owner, name))
|
||||
{
|
||||
line.append(name);
|
||||
line.append(LLTrans::getString("TooltipIsGroup"));
|
||||
}
|
||||
else
|
||||
{
|
||||
line.append(LLTrans::getString("RetrievingData"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string name;
|
||||
owner = nodep->mPermissions->getGroup();
|
||||
if (gCacheName->getGroupName(owner, name))
|
||||
{
|
||||
line.append(name);
|
||||
line.append(LLTrans::getString("TooltipIsGroup"));
|
||||
}
|
||||
else
|
||||
{
|
||||
line.append(LLTrans::getString("RetrievingData"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
line.append(LLTrans::getString("RetrievingData"));
|
||||
}
|
||||
mText.push_back(line);
|
||||
|
||||
// Build a line describing any special properties of this object.
|
||||
LLViewerObject *object = hit_object;
|
||||
LLViewerObject *parent = (LLViewerObject *)object->getParent();
|
||||
|
||||
if (object &&
|
||||
(object->flagUsePhysics() ||
|
||||
object->flagScripted() ||
|
||||
object->flagHandleTouch() || (parent && parent->flagHandleTouch()) ||
|
||||
object->flagTakesMoney() || (parent && parent->flagTakesMoney()) ||
|
||||
object->flagAllowInventoryAdd() ||
|
||||
object->flagTemporary() ||
|
||||
object->flagPhantom()) )
|
||||
{
|
||||
line.clear();
|
||||
if (object->flagScripted())
|
||||
{
|
||||
|
||||
line.append(LLTrans::getString("TooltipFlagScript") + " ");
|
||||
}
|
||||
|
||||
if (object->flagUsePhysics())
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFlagPhysics") + " ");
|
||||
}
|
||||
|
||||
if (object->flagHandleTouch() || (parent && parent->flagHandleTouch()) )
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFlagTouch") + " ");
|
||||
suppressObjectHoverDisplay = FALSE; // Show tip
|
||||
}
|
||||
|
||||
if (object->flagTakesMoney() || (parent && parent->flagTakesMoney()) )
|
||||
{
|
||||
line.append(gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + " ");
|
||||
suppressObjectHoverDisplay = FALSE; // Show tip
|
||||
}
|
||||
|
||||
if (object->flagAllowInventoryAdd())
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFlagDropInventory") + " ");
|
||||
suppressObjectHoverDisplay = FALSE; // Show tip
|
||||
}
|
||||
|
||||
if (object->flagPhantom())
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFlagPhantom") + " ");
|
||||
}
|
||||
|
||||
if (object->flagTemporary())
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFlagTemporary") + " ");
|
||||
}
|
||||
|
||||
if (object->flagUsePhysics() ||
|
||||
object->flagHandleTouch() ||
|
||||
(parent && parent->flagHandleTouch()) )
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFlagRightClickMenu") + " ");
|
||||
line.append(LLTrans::getString("RetrievingData"));
|
||||
}
|
||||
mText.push_back(line);
|
||||
}
|
||||
|
||||
// Free to copy / For Sale: L$
|
||||
line.clear();
|
||||
if (nodep->mValid)
|
||||
{
|
||||
BOOL for_copy = nodep->mPermissions->getMaskEveryone() & PERM_COPY && object->permCopy();
|
||||
BOOL for_sale = nodep->mSaleInfo.isForSale() &&
|
||||
nodep->mPermissions->getMaskOwner() & PERM_TRANSFER &&
|
||||
(nodep->mPermissions->getMaskOwner() & PERM_COPY ||
|
||||
nodep->mSaleInfo.getSaleType() != LLSaleInfo::FS_COPY);
|
||||
if (for_copy)
|
||||
// Build a line describing any special properties of this object.
|
||||
LLViewerObject *object = hit_object;
|
||||
LLViewerObject *parent = (LLViewerObject *)object->getParent();
|
||||
|
||||
if (object &&
|
||||
(object->flagUsePhysics() ||
|
||||
object->flagScripted() ||
|
||||
object->flagHandleTouch() || (parent && parent->flagHandleTouch()) ||
|
||||
object->flagTakesMoney() || (parent && parent->flagTakesMoney()) ||
|
||||
object->flagAllowInventoryAdd() ||
|
||||
object->flagTemporary() ||
|
||||
object->flagPhantom()) )
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFreeToCopy"));
|
||||
suppressObjectHoverDisplay = FALSE; // Show tip
|
||||
line.clear();
|
||||
if (object->flagScripted())
|
||||
{
|
||||
|
||||
line.append(LLTrans::getString("TooltipFlagScript") + " ");
|
||||
}
|
||||
|
||||
if (object->flagUsePhysics())
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFlagPhysics") + " ");
|
||||
}
|
||||
|
||||
if (object->flagHandleTouch() || (parent && parent->flagHandleTouch()) )
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFlagTouch") + " ");
|
||||
suppressObjectHoverDisplay = FALSE; // Show tip
|
||||
}
|
||||
|
||||
if (object->flagTakesMoney() || (parent && parent->flagTakesMoney()) )
|
||||
{
|
||||
line.append(gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + " ");
|
||||
suppressObjectHoverDisplay = FALSE; // Show tip
|
||||
}
|
||||
|
||||
if (object->flagAllowInventoryAdd())
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFlagDropInventory") + " ");
|
||||
suppressObjectHoverDisplay = FALSE; // Show tip
|
||||
}
|
||||
|
||||
if (object->flagPhantom())
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFlagPhantom") + " ");
|
||||
}
|
||||
|
||||
if (object->flagTemporary())
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFlagTemporary") + " ");
|
||||
}
|
||||
|
||||
if (object->flagUsePhysics() ||
|
||||
object->flagHandleTouch() ||
|
||||
(parent && parent->flagHandleTouch()) )
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFlagRightClickMenu") + " ");
|
||||
}
|
||||
mText.push_back(line);
|
||||
}
|
||||
else if (for_sale)
|
||||
|
||||
// Free to copy / For Sale: L$
|
||||
line.clear();
|
||||
if (nodep->mValid)
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[AMOUNT]"] = llformat("%d", nodep->mSaleInfo.getSalePrice());
|
||||
line.append(LLTrans::getString("TooltipForSaleL$", args));
|
||||
suppressObjectHoverDisplay = FALSE; // Show tip
|
||||
if (for_copy)
|
||||
{
|
||||
line.append(LLTrans::getString("TooltipFreeToCopy"));
|
||||
suppressObjectHoverDisplay = FALSE; // Show tip
|
||||
}
|
||||
else if (for_sale)
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[AMOUNT]"] = llformat("%d", nodep->mSaleInfo.getSalePrice());
|
||||
line.append(LLTrans::getString("TooltipForSaleL$", args));
|
||||
suppressObjectHoverDisplay = FALSE; // Show tip
|
||||
}
|
||||
else
|
||||
{
|
||||
// Nothing if not for sale
|
||||
// line.append("Not for sale");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Nothing if not for sale
|
||||
// line.append("Not for sale");
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[MESSAGE]"] = LLTrans::getString("RetrievingData");
|
||||
line.append(LLTrans::getString("TooltipForSaleMsg", args));
|
||||
}
|
||||
mText.push_back(line);
|
||||
line.clear();
|
||||
S32 prim_count = LLSelectMgr::getInstance()->getHoverObjects()->getObjectCount();
|
||||
line.append(llformat("Prims: %d", prim_count));
|
||||
mText.push_back(line);
|
||||
|
||||
line.clear();
|
||||
line.append("Position: ");
|
||||
|
||||
LLViewerRegion *region = gAgent.getRegion();
|
||||
LLVector3 position = region->getPosRegionFromGlobal(hit_object->getPositionGlobal());//regionp->getOriginAgent();
|
||||
LLVector3 mypos = region->getPosRegionFromGlobal(gAgent.getPositionGlobal());
|
||||
|
||||
|
||||
LLVector3 delta = position - mypos;
|
||||
F32 distance = (F32)delta.magVec();
|
||||
|
||||
line.append(llformat("<%.02f,%.02f,%.02f>",position.mV[0],position.mV[1],position.mV[2]));
|
||||
mText.push_back(line);
|
||||
line.clear();
|
||||
line.append(llformat("Distance: %.02fm",distance));
|
||||
mText.push_back(line);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[MESSAGE]"] = LLTrans::getString("RetrievingData");
|
||||
line.append(LLTrans::getString("TooltipForSaleMsg", args));
|
||||
suppressObjectHoverDisplay = TRUE;
|
||||
}
|
||||
// If the hover tip shouldn't be shown, delete all the object text
|
||||
if (suppressObjectHoverDisplay)
|
||||
{
|
||||
mText.clear();
|
||||
}
|
||||
mText.push_back(line);
|
||||
}
|
||||
line.clear();
|
||||
S32 prim_count = LLSelectMgr::getInstance()->getHoverObjects()->getObjectCount();
|
||||
line.append(llformat("Prims: %d", prim_count));
|
||||
mText.push_back(line);
|
||||
|
||||
line.clear();
|
||||
line.append("Position: ");
|
||||
|
||||
LLViewerRegion *region = gAgent.getRegion();
|
||||
LLVector3 position = region->getPosRegionFromGlobal(hit_object->getPositionGlobal());//regionp->getOriginAgent();
|
||||
LLVector3 mypos = region->getPosRegionFromGlobal(gAgent.getPositionGlobal());
|
||||
|
||||
|
||||
LLVector3 delta = position - mypos;
|
||||
F32 distance = (F32)delta.magVec();
|
||||
|
||||
line.append(llformat("<%.02f,%.02f,%.02f>",position.mV[0],position.mV[1],position.mV[2]));
|
||||
mText.push_back(line);
|
||||
line.clear();
|
||||
line.append(llformat("Distance: %.02fm",distance));
|
||||
mText.push_back(line);
|
||||
|
||||
// If the hover tip shouldn't be shown, delete all the object text
|
||||
if (suppressObjectHoverDisplay)
|
||||
{
|
||||
mText.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "llpreview.h" // For LLMultiPreview
|
||||
#include "lltrans.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llnotifications.h"
|
||||
|
||||
extern LLUUID gAgentID;
|
||||
|
||||
|
||||
@@ -331,9 +331,6 @@ LLXMLNodePtr LLJoystickAgentTurn::getXML(bool save_children) const
|
||||
|
||||
LLView* LLJoystickAgentTurn::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
||||
{
|
||||
std::string name("button");
|
||||
node->getAttributeString("name", name);
|
||||
|
||||
std::string image_unselected;
|
||||
if (node->hasAttribute("image_unselected")) node->getAttributeString("image_unselected",image_unselected);
|
||||
|
||||
@@ -343,7 +340,7 @@ LLView* LLJoystickAgentTurn::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrl
|
||||
EJoystickQuadrant quad = JQ_ORIGIN;
|
||||
if (node->hasAttribute("quadrant")) quad = selectQuadrant(node);
|
||||
|
||||
LLJoystickAgentTurn *button = new LLJoystickAgentTurn(name,
|
||||
LLJoystickAgentTurn *button = new LLJoystickAgentTurn("button",
|
||||
LLRect(),
|
||||
image_unselected,
|
||||
image_selected,
|
||||
@@ -449,9 +446,6 @@ LLXMLNodePtr LLJoystickAgentSlide::getXML(bool save_children) const
|
||||
// static
|
||||
LLView* LLJoystickAgentSlide::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
||||
{
|
||||
std::string name("button");
|
||||
node->getAttributeString("name", name);
|
||||
|
||||
std::string image_unselected;
|
||||
if (node->hasAttribute("image_unselected")) node->getAttributeString("image_unselected",image_unselected);
|
||||
|
||||
@@ -462,7 +456,7 @@ LLView* LLJoystickAgentSlide::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtr
|
||||
EJoystickQuadrant quad = JQ_ORIGIN;
|
||||
if (node->hasAttribute("quadrant")) quad = selectQuadrant(node);
|
||||
|
||||
LLJoystickAgentSlide *button = new LLJoystickAgentSlide(name,
|
||||
LLJoystickAgentSlide *button = new LLJoystickAgentSlide("button",
|
||||
LLRect(),
|
||||
image_unselected,
|
||||
image_selected,
|
||||
|
||||
@@ -102,7 +102,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
|
||||
mHomePageMimeType(p.initial_mime_type),
|
||||
mErrorPageURL(p.error_page_url),
|
||||
mTrusted(p.trusted_content),
|
||||
mHoverTextChanged(false)
|
||||
mHoverTextChanged(false),
|
||||
mContextMenu()
|
||||
{
|
||||
{
|
||||
LLColor4 color = p.caret_color().get();
|
||||
@@ -308,6 +309,14 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
|
||||
setFocus( TRUE );
|
||||
}
|
||||
|
||||
LLMenuGL* menu = (LLMenuGL*)mContextMenu.get();
|
||||
if (menu)
|
||||
{
|
||||
menu->buildDrawLabels();
|
||||
menu->updateParent(LLMenuGL::sMenuContainer);
|
||||
LLMenuGL::showPopup(this,menu, x, y);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -370,6 +379,12 @@ void LLMediaCtrl::onFocusLost()
|
||||
//
|
||||
BOOL LLMediaCtrl::postBuild ()
|
||||
{
|
||||
LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_media_ctrl.xml",LLMenuGL::sMenuContainer);
|
||||
if(menu)
|
||||
{
|
||||
mContextMenu = menu->getHandle();
|
||||
}
|
||||
|
||||
setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChange, this, _2));
|
||||
return true;
|
||||
}
|
||||
@@ -1161,7 +1176,7 @@ LLView* LLMediaCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
|
||||
if(node->getAttributeBOOL("focus_on_click", bval))
|
||||
p.focus_on_click = bval;
|
||||
if(node->getAttributeBOOL("decouple_texture_size", bval))
|
||||
p.focus_on_click = bval;
|
||||
p.decouple_texture_size = bval;
|
||||
if(node->getAttributeBOOL("trusted_content", bval))
|
||||
p.trusted_content = bval;
|
||||
if(node->getAttributeS32("texture_width", ival))
|
||||
|
||||
@@ -209,6 +209,7 @@ public:
|
||||
viewer_media_t mMediaSource;
|
||||
S32 mTextureWidth,
|
||||
mTextureHeight;
|
||||
LLHandle<LLView> mContextMenu;
|
||||
};
|
||||
|
||||
#endif // LL_LLMediaCtrl_H
|
||||
|
||||
@@ -46,20 +46,18 @@
|
||||
// statics
|
||||
std::set<LLNameBox*> LLNameBox::sInstances;
|
||||
|
||||
static LLRegisterWidget<LLNameBox> r("name_box");
|
||||
|
||||
LLNameBox::LLNameBox(const std::string& name, const LLRect& rect, const LLUUID& name_id, BOOL is_group, const LLFontGL* font, BOOL mouse_opaque)
|
||||
: LLTextBox(name, rect, std::string("(retrieving)"), font, mouse_opaque),
|
||||
mNameID(name_id)
|
||||
|
||||
LLNameBox::LLNameBox(const std::string& name)
|
||||
: LLTextBox(name, LLRect(), "" , NULL, TRUE)
|
||||
{
|
||||
mNameID = LLUUID::null;
|
||||
mLink = false;
|
||||
//mParseHTML = mLink; // STORM-215
|
||||
mInitialValue = "(retrieving)";
|
||||
LLNameBox::sInstances.insert(this);
|
||||
if(!name_id.isNull())
|
||||
{
|
||||
setNameID(name_id, is_group);
|
||||
}
|
||||
else
|
||||
{
|
||||
setText(LLStringUtil::null);
|
||||
}
|
||||
setText(LLStringUtil::null);
|
||||
}
|
||||
|
||||
LLNameBox::~LLNameBox()
|
||||
@@ -72,25 +70,30 @@ void LLNameBox::setNameID(const LLUUID& name_id, BOOL is_group)
|
||||
mNameID = name_id;
|
||||
|
||||
std::string name;
|
||||
BOOL got_name = FALSE;
|
||||
|
||||
if (!is_group)
|
||||
{
|
||||
gCacheName->getFullName(name_id, name);
|
||||
got_name = gCacheName->getFullName(name_id, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
gCacheName->getGroupName(name_id, name);
|
||||
got_name = gCacheName->getGroupName(name_id, name);
|
||||
}
|
||||
|
||||
setText(name);
|
||||
// Got the name already? Set it.
|
||||
// Otherwise it will be set later in refresh().
|
||||
if (got_name)
|
||||
setName(name, is_group);
|
||||
else
|
||||
setText(mInitialValue);
|
||||
}
|
||||
|
||||
void LLNameBox::refresh(const LLUUID& id, const std::string& full_name, bool is_group)
|
||||
|
||||
{
|
||||
if (id == mNameID)
|
||||
{
|
||||
setText(full_name);
|
||||
setName(full_name, is_group);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,3 +108,39 @@ void LLNameBox::refreshAll(const LLUUID& id, const std::string& full_name, bool
|
||||
box->refresh(id, full_name, is_group);
|
||||
}
|
||||
}
|
||||
|
||||
void LLNameBox::setName(const std::string& name, BOOL is_group)
|
||||
{
|
||||
if (mLink)
|
||||
{
|
||||
std::string url;
|
||||
|
||||
if (is_group)
|
||||
url = "[secondlife:///app/group/" + mNameID.asString() + "/about " + name + "]";
|
||||
else
|
||||
url = "[secondlife:///app/agent/" + mNameID.asString() + "/about " + name + "]";
|
||||
|
||||
setText(url);
|
||||
}
|
||||
else
|
||||
{
|
||||
setText(name);
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLNameBox::initFromXML(LLXMLNodePtr node, LLView* parent)
|
||||
{
|
||||
LLTextBox::initFromXML(node, parent);
|
||||
node->getAttributeBOOL("link", mLink);
|
||||
node->getAttributeString("initial_value", mInitialValue);
|
||||
}
|
||||
|
||||
// static
|
||||
LLView* LLNameBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
||||
{
|
||||
LLNameBox* name_box = new LLNameBox("name_box");
|
||||
name_box->initFromXML(node,parent);
|
||||
return name_box;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,10 +44,9 @@ class LLNameBox
|
||||
: public LLTextBox
|
||||
{
|
||||
public:
|
||||
LLNameBox(const std::string& name, const LLRect& rect, const LLUUID& name_id = LLUUID::null, BOOL is_group = FALSE, const LLFontGL* font = NULL, BOOL mouse_opaque = TRUE );
|
||||
// By default, follows top and left and is mouse-opaque.
|
||||
// If no text, text = name.
|
||||
// If no font, uses default system font.
|
||||
virtual void initFromXML(LLXMLNodePtr node, LLView* parent);
|
||||
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
|
||||
|
||||
virtual ~LLNameBox();
|
||||
|
||||
void setNameID(const LLUUID& name_id, BOOL is_group);
|
||||
@@ -56,11 +55,19 @@ public:
|
||||
|
||||
static void refreshAll(const LLUUID& id, const std::string& full_name, bool is_group);
|
||||
|
||||
protected:
|
||||
LLNameBox (const std::string& name);
|
||||
|
||||
friend class LLUICtrlFactory;
|
||||
private:
|
||||
void setName(const std::string& name, BOOL is_group);
|
||||
|
||||
static std::set<LLNameBox*> sInstances;
|
||||
|
||||
private:
|
||||
LLUUID mNameID;
|
||||
BOOL mLink;
|
||||
std::string mInitialValue;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -132,9 +132,6 @@ LLXMLNodePtr LLNameEditor::getXML(bool save_children) const
|
||||
|
||||
LLView* LLNameEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
||||
{
|
||||
std::string name("name_editor");
|
||||
node->getAttributeString("name", name);
|
||||
|
||||
LLRect rect;
|
||||
createRect(node, rect, parent, LLRect());
|
||||
|
||||
@@ -143,7 +140,7 @@ LLView* LLNameEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
|
||||
|
||||
LLFontGL* font = LLView::selectFont(node);
|
||||
|
||||
LLNameEditor* line_editor = new LLNameEditor(name,
|
||||
LLNameEditor* line_editor = new LLNameEditor("name_editor",
|
||||
rect,
|
||||
LLUUID::null, FALSE,
|
||||
font,
|
||||
|
||||
@@ -319,9 +319,6 @@ LLXMLNodePtr LLNameListCtrl::getXML(bool save_children) const
|
||||
|
||||
LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
||||
{
|
||||
std::string name("name_list");
|
||||
node->getAttributeString("name", name);
|
||||
|
||||
LLRect rect;
|
||||
createRect(node, rect, parent, LLRect());
|
||||
|
||||
@@ -337,7 +334,7 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto
|
||||
S32 name_column_index = 0;
|
||||
node->getAttributeS32("name_column_index", name_column_index);
|
||||
|
||||
LLNameListCtrl* name_list = new LLNameListCtrl(name,
|
||||
LLNameListCtrl* name_list = new LLNameListCtrl("name_list",
|
||||
rect,
|
||||
multi_select,
|
||||
draw_border,
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
#include "llmediactrl.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "wlfPanel_AdvSettings.h"
|
||||
|
||||
#include "llpanelnearbymedia.h"
|
||||
|
||||
|
||||
|
||||
@@ -90,7 +90,6 @@ LLOverlayBar *gOverlayBar = NULL;
|
||||
extern S32 MENU_BAR_HEIGHT;
|
||||
extern ImportTracker gImportTracker;
|
||||
|
||||
BOOL LLOverlayBar::sAdvSettingsPopup;
|
||||
BOOL LLOverlayBar::sChatVisible;
|
||||
|
||||
//
|
||||
@@ -115,9 +114,7 @@ void* LLOverlayBar::createVoiceRemote(void* userdata)
|
||||
|
||||
void* LLOverlayBar::createAdvSettings(void* userdata)
|
||||
{
|
||||
LLOverlayBar *self = (LLOverlayBar*)userdata;
|
||||
self->mAdvSettings = new wlfPanel_AdvSettings();
|
||||
return self->mAdvSettings;
|
||||
return wlfPanel_AdvSettings::getInstance();
|
||||
}
|
||||
|
||||
void* LLOverlayBar::createAORemote(void* userdata)
|
||||
@@ -134,7 +131,7 @@ void* LLOverlayBar::createChatBar(void* userdata)
|
||||
}
|
||||
|
||||
LLOverlayBar::LLOverlayBar()
|
||||
: LLPanel(),
|
||||
: LLLayoutPanel(),
|
||||
mMediaRemote(NULL),
|
||||
mVoiceRemote(NULL),
|
||||
mAORemote(NULL),
|
||||
@@ -156,11 +153,21 @@ LLOverlayBar::LLOverlayBar()
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml", &factory_map);
|
||||
}
|
||||
|
||||
bool updateAdvSettingsPopup(const LLSD &data)
|
||||
bool LLOverlayBar::updateAdvSettingsPopup()
|
||||
{
|
||||
LLOverlayBar::sAdvSettingsPopup = gSavedSettings.getBOOL("wlfAdvSettingsPopup");
|
||||
gOverlayBar->childSetVisible("AdvSettings_container", !LLOverlayBar::sAdvSettingsPopup);
|
||||
gOverlayBar->childSetVisible("AdvSettings_container_exp", LLOverlayBar::sAdvSettingsPopup);
|
||||
bool wfl_adv_settings_popup = gSavedSettings.getBOOL("wlfAdvSettingsPopup");
|
||||
wlfPanel_AdvSettings::updateClass();
|
||||
if(LLLayoutStack* layout_stack = findChild<LLLayoutStack>("overlay_layout_panel"))
|
||||
{
|
||||
LLLayoutPanel* layout_panel = layout_stack->findChild<LLLayoutPanel>("AdvSettings_container");
|
||||
if(layout_panel)
|
||||
{
|
||||
layout_stack->collapsePanel(layout_panel,!wfl_adv_settings_popup);
|
||||
if(wfl_adv_settings_popup)
|
||||
layout_panel->setTargetDim(layout_panel->getChild<LLView>("Adv_Settings")->getBoundingRect().getWidth());
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -176,6 +183,11 @@ bool updateAORemote(const LLSD &data)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool updateNearbyMediaFloater(const LLSD &data)
|
||||
{
|
||||
LLFloaterNearbyMedia::updateClass();
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLOverlayBar::postBuild()
|
||||
{
|
||||
@@ -204,16 +216,16 @@ BOOL LLOverlayBar::postBuild()
|
||||
|
||||
layoutButtons();
|
||||
|
||||
sAdvSettingsPopup = gSavedSettings.getBOOL("wlfAdvSettingsPopup");
|
||||
sChatVisible = gSavedSettings.getBOOL("ChatVisible");
|
||||
|
||||
gSavedSettings.getControl("wlfAdvSettingsPopup")->getSignal()->connect(boost::bind(&updateAdvSettingsPopup,_2));
|
||||
gSavedSettings.getControl("wlfAdvSettingsPopup")->getSignal()->connect(boost::bind(&LLOverlayBar::updateAdvSettingsPopup,this));
|
||||
gSavedSettings.getControl("ChatVisible")->getSignal()->connect(boost::bind(&updateChatVisible,_2));
|
||||
gSavedSettings.getControl("EnableAORemote")->getSignal()->connect(boost::bind(&updateAORemote,_2));
|
||||
childSetVisible("AdvSettings_container", !sAdvSettingsPopup);
|
||||
childSetVisible("AdvSettings_container_exp", sAdvSettingsPopup);
|
||||
gSavedSettings.getControl("ShowNearbyMediaFloater")->getSignal()->connect(boost::bind(&updateNearbyMediaFloater,_2));
|
||||
|
||||
childSetVisible("ao_remote_container", gSavedSettings.getBOOL("EnableAORemote"));
|
||||
|
||||
updateAdvSettingsPopup();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -342,7 +354,6 @@ void LLOverlayBar::refresh()
|
||||
childSetVisible("media_remote_container", FALSE);
|
||||
childSetVisible("voice_remote_container", FALSE);
|
||||
childSetVisible("AdvSettings_container", FALSE);
|
||||
childSetVisible("AdvSettings_container_exp", FALSE);
|
||||
childSetVisible("ao_remote_container", FALSE);
|
||||
childSetVisible("state_management_buttons_container", FALSE);
|
||||
}
|
||||
@@ -351,8 +362,7 @@ void LLOverlayBar::refresh()
|
||||
// update "remotes"
|
||||
childSetVisible("media_remote_container", TRUE);
|
||||
childSetVisible("voice_remote_container", LLVoiceClient::getInstance()->voiceEnabled());
|
||||
childSetVisible("AdvSettings_container", !sAdvSettingsPopup);//!gSavedSettings.getBOOL("wlfAdvSettingsPopup"));
|
||||
childSetVisible("AdvSettings_container_exp", sAdvSettingsPopup);//gSavedSettings.getBOOL("wlfAdvSettingsPopup"));
|
||||
childSetVisible("AdvSettings_container", TRUE);
|
||||
childSetVisible("ao_remote_container", gSavedSettings.getBOOL("EnableAORemote"));
|
||||
childSetVisible("state_management_buttons_container", TRUE);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#define LL_LLOVERLAYBAR_H
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "lllayoutstack.h"
|
||||
|
||||
// "Constants" loaded from settings.xml at start time
|
||||
extern S32 STATUS_BAR_HEIGHT;
|
||||
@@ -55,7 +56,7 @@ class AORemoteCtrl;
|
||||
class LLChatBar;
|
||||
|
||||
class LLOverlayBar
|
||||
: public LLPanel
|
||||
: public LLLayoutPanel
|
||||
{
|
||||
public:
|
||||
LLOverlayBar();
|
||||
@@ -98,7 +99,6 @@ public:
|
||||
void setCancelTPButtonVisible(BOOL b, const std::string& label);
|
||||
|
||||
static BOOL sChatVisible;
|
||||
static BOOL sAdvSettingsPopup;
|
||||
protected:
|
||||
static void* createMediaRemote(void* userdata);
|
||||
static void* createVoiceRemote(void* userdata);
|
||||
@@ -109,10 +109,10 @@ protected:
|
||||
void enableMediaButtons();
|
||||
|
||||
protected:
|
||||
friend class LLFloaterNearbyMedia; //Crappy workaround to access mMediaRemote
|
||||
LLMediaRemoteCtrl* mMediaRemote;
|
||||
LLVoiceRemoteCtrl* mVoiceRemote;
|
||||
LLButton* mCancelBtn;
|
||||
wlfPanel_AdvSettings* mAdvSettings;
|
||||
AORemoteCtrl* mAORemote;
|
||||
bool mBuilt; // dialog constructed yet?
|
||||
enum { STOPPED=0, PLAYING=1, PAUSED=2 };
|
||||
@@ -130,8 +130,8 @@ protected:
|
||||
private:
|
||||
|
||||
|
||||
/*static void updateAdvSettingsPopup(const LLSD &data);
|
||||
static void updateChatVisible(const LLSD &data);*/
|
||||
bool updateAdvSettingsPopup();
|
||||
//static void updateChatVisible(const LLSD &data);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -82,6 +82,13 @@
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
const char* LLPanelContents::TENTATIVE_SUFFIX = "_tentative";
|
||||
const char* LLPanelContents::PERMS_OWNER_INTERACT_KEY = "perms_owner_interact";
|
||||
const char* LLPanelContents::PERMS_OWNER_CONTROL_KEY = "perms_owner_control";
|
||||
const char* LLPanelContents::PERMS_GROUP_INTERACT_KEY = "perms_group_interact";
|
||||
const char* LLPanelContents::PERMS_GROUP_CONTROL_KEY = "perms_group_control";
|
||||
const char* LLPanelContents::PERMS_ANYONE_INTERACT_KEY = "perms_anyone_interact";
|
||||
const char* LLPanelContents::PERMS_ANYONE_CONTROL_KEY = "perms_anyone_control";
|
||||
|
||||
BOOL LLPanelContents::postBuild()
|
||||
{
|
||||
|
||||
@@ -54,6 +54,17 @@ public:
|
||||
static void onClickNewScript( void* userdata);
|
||||
static void onClickPermissions( void* userdata);
|
||||
|
||||
// Key suffix for "tentative" fields
|
||||
static const char* TENTATIVE_SUFFIX;
|
||||
|
||||
// These aren't fields in LLMediaEntry, so we have to define them ourselves for checkbox control
|
||||
static const char* PERMS_OWNER_INTERACT_KEY;
|
||||
static const char* PERMS_OWNER_CONTROL_KEY;
|
||||
static const char* PERMS_GROUP_INTERACT_KEY;
|
||||
static const char* PERMS_GROUP_CONTROL_KEY;
|
||||
static const char* PERMS_ANYONE_INTERACT_KEY;
|
||||
static const char* PERMS_ANYONE_CONTROL_KEY;
|
||||
|
||||
protected:
|
||||
void getState(LLViewerObject *object);
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "llscrollingpanelparam.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llnotifications.h"
|
||||
|
||||
#include "llcolorswatch.h"
|
||||
#include "lltexturectrl.h"
|
||||
|
||||
@@ -79,6 +79,22 @@
|
||||
|
||||
BOOL LLPanelFace::postBuild()
|
||||
{
|
||||
childSetCommitCallback("combobox shininess",&LLPanelFace::onCommitShiny,this);
|
||||
childSetCommitCallback("combobox bumpiness",&LLPanelFace::onCommitBump,this);
|
||||
|
||||
childSetCommitCallback("TexScaleU",&LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetCommitCallback("checkbox flip s",&LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetCommitCallback("TexScaleV",&LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetCommitCallback("checkbox flip t",&LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetCommitCallback("TexRot",&LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetAction("button apply",&LLPanelFace::onClickApply,this);
|
||||
childSetCommitCallback("checkbox planar align",&LLPanelFace::onCommitPlanarAlign, this);
|
||||
childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetAction("button align",&LLPanelFace::onClickAutoFix,this);
|
||||
childSetAction("copytextures",&LLPanelFace::onClickCopy,this);
|
||||
childSetAction("pastetextures",&LLPanelFace::onClickPaste,this);
|
||||
|
||||
LLTextureCtrl* mTextureCtrl;
|
||||
LLColorSwatchCtrl* mColorSwatch;
|
||||
|
||||
@@ -96,7 +112,7 @@ BOOL LLPanelFace::postBuild()
|
||||
if(mTextureCtrl)
|
||||
{
|
||||
mTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectTexture" )));
|
||||
mTextureCtrl->setCommitCallback( LLPanelFace::onCommitTexture );
|
||||
mTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitTexture, this, _2) );
|
||||
mTextureCtrl->setOnCancelCallback( LLPanelFace::onCancelTexture );
|
||||
mTextureCtrl->setOnSelectCallback( LLPanelFace::onSelectTexture );
|
||||
mTextureCtrl->setDragCallback(LLPanelFace::onDragTexture);
|
||||
@@ -127,7 +143,7 @@ BOOL LLPanelFace::postBuild()
|
||||
mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
|
||||
if(mColorSwatch)
|
||||
{
|
||||
mColorSwatch->setCommitCallback(LLPanelFace::onCommitColor);
|
||||
mColorSwatch->setCommitCallback(boost::bind(&LLPanelFace::onCommitColor, this, _2));
|
||||
mColorSwatch->setOnCancelCallback(LLPanelFace::onCancelColor);
|
||||
mColorSwatch->setOnSelectCallback(LLPanelFace::onSelectColor);
|
||||
mColorSwatch->setCallbackUserData( this );
|
||||
@@ -146,8 +162,7 @@ BOOL LLPanelFace::postBuild()
|
||||
mCtrlColorTransp = getChild<LLSpinCtrl>("ColorTrans");
|
||||
if(mCtrlColorTransp)
|
||||
{
|
||||
mCtrlColorTransp->setCommitCallback(LLPanelFace::onCommitAlpha);
|
||||
mCtrlColorTransp->setCallbackUserData(this);
|
||||
mCtrlColorTransp->setCommitCallback(boost::bind(&LLPanelFace::onCommitAlpha, this, _2));
|
||||
mCtrlColorTransp->setPrecision(0);
|
||||
mCtrlColorTransp->setFollowsTop();
|
||||
mCtrlColorTransp->setFollowsLeft();
|
||||
@@ -156,39 +171,22 @@ BOOL LLPanelFace::postBuild()
|
||||
mCheckFullbright = getChild<LLCheckBoxCtrl>("checkbox fullbright");
|
||||
if (mCheckFullbright)
|
||||
{
|
||||
mCheckFullbright->setCommitCallback(LLPanelFace::onCommitFullbright);
|
||||
mCheckFullbright->setCallbackUserData( this );
|
||||
mCheckFullbright->setCommitCallback(LLPanelFace::onCommitFullbright, this);
|
||||
}
|
||||
|
||||
mComboTexGen = getChild<LLComboBox>("combobox texgen");
|
||||
if(mComboTexGen)
|
||||
{
|
||||
mComboTexGen->setCommitCallback(LLPanelFace::onCommitTexGen);
|
||||
mComboTexGen->setCommitCallback(LLPanelFace::onCommitTexGen, this);
|
||||
mComboTexGen->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);
|
||||
mComboTexGen->setCallbackUserData( this );
|
||||
}
|
||||
|
||||
mCtrlGlow = getChild<LLSpinCtrl>("glow");
|
||||
if(mCtrlGlow)
|
||||
{
|
||||
mCtrlGlow->setCommitCallback(LLPanelFace::onCommitGlow);
|
||||
mCtrlGlow->setCallbackUserData(this);
|
||||
mCtrlGlow->setCommitCallback(LLPanelFace::onCommitGlow, this);
|
||||
}
|
||||
|
||||
childSetCommitCallback("combobox shininess",&LLPanelFace::onCommitShiny,this);
|
||||
childSetCommitCallback("combobox bumpiness",&LLPanelFace::onCommitBump,this);
|
||||
childSetCommitCallback("checkbox planar align",&LLPanelFace::onCommitPlanarAlign, this);
|
||||
childSetCommitCallback("TexScaleU",&LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetCommitCallback("checkbox flip s",&LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetCommitCallback("TexScaleV",&LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetCommitCallback("checkbox flip t",&LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetCommitCallback("TexRot",&LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetAction("button apply",&onClickApply,this);
|
||||
childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureInfo, this);
|
||||
childSetAction("button align",onClickAutoFix,this);
|
||||
childSetAction("copytextures",onClickCopy,this);
|
||||
childSetAction("pastetextures",onClickPaste,this);
|
||||
|
||||
clearCtrls();
|
||||
|
||||
@@ -521,12 +519,9 @@ void LLPanelFace::getState()
|
||||
{
|
||||
BOOL editable = objectp->permModify() && !objectp->isPermanentEnforced();
|
||||
|
||||
|
||||
// only turn on auto-adjust button if there is a media renderer and the media is loaded
|
||||
childSetEnabled("textbox autofix",FALSE);
|
||||
//mLabelTexAutoFix->setEnabled ( FALSE );
|
||||
childSetEnabled("button align",FALSE);
|
||||
//mBtnAutoFix->setEnabled ( FALSE );
|
||||
getChildView("textbox autofix")->setEnabled(editable);
|
||||
getChildView("button align")->setEnabled(editable);
|
||||
|
||||
//if ( LLMediaEngine::getInstance()->getMediaRenderer () )
|
||||
// if ( LLMediaEngine::getInstance()->getMediaRenderer ()->isLoaded () )
|
||||
@@ -543,7 +538,7 @@ void LLPanelFace::getState()
|
||||
childSetEnabled("copytextures", single_volume && editable);
|
||||
childSetEnabled("pastetextures", single_volume && editable);
|
||||
childSetEnabled("textbox params", single_volume && editable);
|
||||
childSetEnabled("button apply",editable);
|
||||
getChildView("button apply")->setEnabled(editable);
|
||||
|
||||
bool identical;
|
||||
LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("texture control");
|
||||
@@ -684,7 +679,7 @@ void LLPanelFace::getState()
|
||||
|
||||
// Texture scale
|
||||
{
|
||||
childSetEnabled("tex scale",editable);
|
||||
getChildView("tex scale")->setEnabled(editable);
|
||||
//mLabelTexScale->setEnabled( editable );
|
||||
F32 scale_s = 1.f;
|
||||
struct f2 : public LLSelectedTEGetFunctor<F32>
|
||||
@@ -696,12 +691,12 @@ void LLPanelFace::getState()
|
||||
} func;
|
||||
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, scale_s );
|
||||
identical = align_planar ? identical_planar_aligned : identical;
|
||||
childSetValue("TexScaleU",editable ? llabs(scale_s) : 0);
|
||||
childSetTentative("TexScaleU",LLSD((BOOL)(!identical)));
|
||||
childSetEnabled("TexScaleU",editable);
|
||||
childSetValue("checkbox flip s",LLSD((BOOL)(scale_s < 0 ? TRUE : FALSE )));
|
||||
childSetTentative("checkbox flip s",LLSD((BOOL)((!identical) ? TRUE : FALSE )));
|
||||
childSetEnabled("checkbox flip s",editable);
|
||||
getChild<LLUICtrl>("TexScaleU")->setValue(editable ? llabs(scale_s) : 0);
|
||||
getChild<LLUICtrl>("TexScaleU")->setTentative(LLSD((BOOL)(!identical)));
|
||||
getChildView("TexScaleU")->setEnabled(editable);
|
||||
getChild<LLUICtrl>("checkbox flip s")->setValue(LLSD((BOOL)(scale_s < 0 ? TRUE : FALSE )));
|
||||
getChild<LLUICtrl>("checkbox flip s")->setTentative(LLSD((BOOL)((!identical) ? TRUE : FALSE )));
|
||||
getChildView("checkbox flip s")->setEnabled(editable);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -716,17 +711,17 @@ void LLPanelFace::getState()
|
||||
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, scale_t );
|
||||
identical = align_planar ? identical_planar_aligned : identical;
|
||||
|
||||
childSetValue("TexScaleV",llabs(editable ? llabs(scale_t) : 0));
|
||||
childSetTentative("TexScaleV",LLSD((BOOL)(!identical)));
|
||||
childSetEnabled("TexScaleV",editable);
|
||||
childSetValue("checkbox flip t",LLSD((BOOL)(scale_t< 0 ? TRUE : FALSE )));
|
||||
childSetTentative("checkbox flip t",LLSD((BOOL)((!identical) ? TRUE : FALSE )));
|
||||
childSetEnabled("checkbox flip t",editable);
|
||||
getChild<LLUICtrl>("TexScaleV")->setValue(llabs(editable ? llabs(scale_t) : 0));
|
||||
getChild<LLUICtrl>("TexScaleV")->setTentative(LLSD((BOOL)(!identical)));
|
||||
getChildView("TexScaleV")->setEnabled(editable);
|
||||
getChild<LLUICtrl>("checkbox flip t")->setValue(LLSD((BOOL)(scale_t< 0 ? TRUE : FALSE )));
|
||||
getChild<LLUICtrl>("checkbox flip t")->setTentative(LLSD((BOOL)((!identical) ? TRUE : FALSE )));
|
||||
getChildView("checkbox flip t")->setEnabled(editable);
|
||||
}
|
||||
|
||||
// Texture offset
|
||||
{
|
||||
childSetEnabled("tex offset",editable);
|
||||
getChildView("tex offset")->setEnabled(editable);
|
||||
F32 offset_s = 0.f;
|
||||
struct f4 : public LLSelectedTEGetFunctor<F32>
|
||||
{
|
||||
@@ -737,9 +732,9 @@ void LLPanelFace::getState()
|
||||
} func;
|
||||
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, offset_s );
|
||||
identical = align_planar ? identical_planar_aligned : identical;
|
||||
childSetValue("TexOffsetU", editable ? offset_s : 0);
|
||||
childSetTentative("TexOffsetU",!identical);
|
||||
childSetEnabled("TexOffsetU",editable);
|
||||
getChild<LLUICtrl>("TexOffsetU")->setValue(editable ? offset_s : 0);
|
||||
getChild<LLUICtrl>("TexOffsetU")->setTentative(!identical);
|
||||
getChildView("TexOffsetU")->setEnabled(editable);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -753,14 +748,14 @@ void LLPanelFace::getState()
|
||||
} func;
|
||||
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, offset_t );
|
||||
identical = align_planar ? identical_planar_aligned : identical;
|
||||
childSetValue("TexOffsetV", editable ? offset_t : 0);
|
||||
childSetTentative("TexOffsetV",!identical);
|
||||
childSetEnabled("TexOffsetV",editable);
|
||||
getChild<LLUICtrl>("TexOffsetV")->setValue(editable ? offset_t : 0);
|
||||
getChild<LLUICtrl>("TexOffsetV")->setTentative(!identical);
|
||||
getChildView("TexOffsetV")->setEnabled(editable);
|
||||
}
|
||||
|
||||
// Texture rotation
|
||||
{
|
||||
childSetEnabled("tex rotate",editable);
|
||||
getChildView("tex rotate")->setEnabled(editable);
|
||||
F32 rotation = 0.f;
|
||||
struct f6 : public LLSelectedTEGetFunctor<F32>
|
||||
{
|
||||
@@ -771,9 +766,9 @@ void LLPanelFace::getState()
|
||||
} func;
|
||||
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, rotation );
|
||||
identical = align_planar ? identical_planar_aligned : identical;
|
||||
childSetValue("TexRot", editable ? rotation * RAD_TO_DEG : 0);
|
||||
childSetTentative("TexRot",!identical);
|
||||
childSetEnabled("TexRot",editable);
|
||||
getChild<LLUICtrl>("TexRot")->setValue(editable ? rotation * RAD_TO_DEG : 0);
|
||||
getChild<LLUICtrl>("TexRot")->setTentative(!identical);
|
||||
getChildView("TexRot")->setEnabled(editable);
|
||||
}
|
||||
|
||||
// Color swatch
|
||||
@@ -799,13 +794,13 @@ void LLPanelFace::getState()
|
||||
}
|
||||
// Color transparency
|
||||
{
|
||||
childSetEnabled("color trans",editable);
|
||||
getChildView("color trans")->setEnabled(editable);
|
||||
}
|
||||
|
||||
F32 transparency = (1.f - color.mV[VALPHA]) * 100.f;
|
||||
{
|
||||
childSetValue("ColorTrans", editable ? transparency : 0);
|
||||
childSetEnabled("ColorTrans",editable);
|
||||
getChild<LLUICtrl>("ColorTrans")->setValue(editable ? transparency : 0);
|
||||
getChildView("ColorTrans")->setEnabled(editable);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -819,10 +814,10 @@ void LLPanelFace::getState()
|
||||
} func;
|
||||
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, glow );
|
||||
|
||||
childSetValue("glow",glow);
|
||||
childSetEnabled("glow",editable);
|
||||
childSetTentative("glow",!identical);
|
||||
childSetEnabled("glow label",editable);
|
||||
getChild<LLUICtrl>("glow")->setValue(glow);
|
||||
getChildView("glow")->setEnabled(editable);
|
||||
getChild<LLUICtrl>("glow")->setTentative(!identical);
|
||||
getChildView("glow label")->setEnabled(editable);
|
||||
|
||||
}
|
||||
|
||||
@@ -847,9 +842,9 @@ void LLPanelFace::getState()
|
||||
{
|
||||
llwarns << "failed childGetSelectionInterface for 'combobox shininess'" << llendl;
|
||||
}
|
||||
childSetEnabled("combobox shininess",editable);
|
||||
childSetTentative("combobox shininess",!identical);
|
||||
childSetEnabled("label shininess",editable);
|
||||
getChildView("combobox shininess")->setEnabled(editable);
|
||||
getChild<LLUICtrl>("combobox shininess")->setTentative(!identical);
|
||||
getChildView("label shininess")->setEnabled(editable);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -872,9 +867,9 @@ void LLPanelFace::getState()
|
||||
{
|
||||
llwarns << "failed childGetSelectionInterface for 'combobox bumpiness'" << llendl;
|
||||
}
|
||||
childSetEnabled("combobox bumpiness",editable);
|
||||
childSetTentative("combobox bumpiness",!identical);
|
||||
childSetEnabled("label bumpiness",editable);
|
||||
getChildView("combobox bumpiness")->setEnabled(editable);
|
||||
getChild<LLUICtrl>("combobox bumpiness")->setTentative(!identical);
|
||||
getChildView("label bumpiness")->setEnabled(editable);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -898,19 +893,21 @@ void LLPanelFace::getState()
|
||||
{
|
||||
llwarns << "failed childGetSelectionInterface for 'combobox texgen'" << llendl;
|
||||
}
|
||||
childSetEnabled("combobox texgen",editable);
|
||||
childSetTentative("combobox texgen",!identical);
|
||||
childSetEnabled("tex gen",editable);
|
||||
getChildView("combobox texgen")->setEnabled(editable);
|
||||
getChild<LLUICtrl>("combobox texgen")->setTentative(!identical);
|
||||
getChildView("tex gen")->setEnabled(editable);
|
||||
|
||||
if (selected_texgen == 1)
|
||||
{
|
||||
childSetText("tex scale",getString("string repeats per meter"));
|
||||
childSetValue("TexScaleU", 2.0f * childGetValue("TexScaleU").asReal() );
|
||||
childSetValue("TexScaleV", 2.0f * childGetValue("TexScaleV").asReal() );
|
||||
getChild<LLUICtrl>("TexScaleU")->setValue(2.0f * getChild<LLUICtrl>("TexScaleU")->getValue().asReal() );
|
||||
getChild<LLUICtrl>("TexScaleV")->setValue(2.0f * getChild<LLUICtrl>("TexScaleV")->getValue().asReal() );
|
||||
|
||||
// EXP-1507 (change label based on the mapping mode)
|
||||
getChild<LLUICtrl>("tex scale")->setValue(getString("string repeats per meter"));
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetText("tex scale",getString("string repeats per face"));
|
||||
getChild<LLUICtrl>("tex scale")->setValue(getString("string repeats per face"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -926,14 +923,14 @@ void LLPanelFace::getState()
|
||||
} func;
|
||||
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, fullbrightf );
|
||||
|
||||
childSetValue("checkbox fullbright",(S32)fullbrightf);
|
||||
childSetEnabled("checkbox fullbright",editable);
|
||||
childSetTentative("checkbox fullbright",!identical);
|
||||
getChild<LLUICtrl>("checkbox fullbright")->setValue((S32)fullbrightf);
|
||||
getChildView("checkbox fullbright")->setEnabled(editable);
|
||||
getChild<LLUICtrl>("checkbox fullbright")->setTentative(!identical);
|
||||
}
|
||||
|
||||
// Repeats per meter label
|
||||
{
|
||||
childSetEnabled("rpt",editable);
|
||||
getChildView("rpt")->setEnabled(editable);
|
||||
}
|
||||
|
||||
// Repeats per meter
|
||||
@@ -953,14 +950,14 @@ void LLPanelFace::getState()
|
||||
} func;
|
||||
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, repeats );
|
||||
|
||||
childSetValue("rptctrl", editable ? repeats : 0);
|
||||
childSetTentative("rptctrl",!identical);
|
||||
getChild<LLUICtrl>("rptctrl")->setValue(editable ? repeats : 0);
|
||||
getChild<LLUICtrl>("rptctrl")->setTentative(!identical);
|
||||
LLComboBox* mComboTexGen = getChild<LLComboBox>("combobox texgen");
|
||||
if (mComboTexGen)
|
||||
{
|
||||
BOOL enabled = editable && (!mComboTexGen || mComboTexGen->getCurrentIndex() != 1);
|
||||
childSetEnabled("rptctrl",enabled);
|
||||
childSetEnabled("button apply",enabled);
|
||||
getChildView("rptctrl")->setEnabled(enabled);
|
||||
getChildView("button apply")->setEnabled(enabled);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -994,19 +991,21 @@ void LLPanelFace::getState()
|
||||
mColorSwatch->setFallbackImageName("locked_image.j2c" );
|
||||
mColorSwatch->setValid(FALSE);
|
||||
}
|
||||
childSetEnabled("color trans",FALSE);
|
||||
childSetEnabled("rpt",FALSE);
|
||||
childSetEnabled("tex scale",FALSE);
|
||||
childSetEnabled("tex offset",FALSE);
|
||||
childSetEnabled("tex rotate",FALSE);
|
||||
childSetEnabled("tex gen",FALSE);
|
||||
childSetEnabled("label shininess",FALSE);
|
||||
childSetEnabled("label bumpiness",FALSE);
|
||||
getChildView("color trans")->setEnabled(FALSE);
|
||||
getChildView("rpt")->setEnabled(FALSE);
|
||||
getChildView("tex scale")->setEnabled(FALSE);
|
||||
getChildView("tex offset")->setEnabled(FALSE);
|
||||
getChildView("tex rotate")->setEnabled(FALSE);
|
||||
getChildView("tex gen")->setEnabled(FALSE);
|
||||
getChildView("label shininess")->setEnabled(FALSE);
|
||||
getChildView("label bumpiness")->setEnabled(FALSE);
|
||||
|
||||
childSetEnabled("textbox autofix",FALSE);
|
||||
getChildView("textbox autofix")->setEnabled(FALSE);
|
||||
|
||||
childSetEnabled("button align",FALSE);
|
||||
childSetEnabled("button apply",FALSE);
|
||||
getChildView("button align")->setEnabled(FALSE);
|
||||
getChildView("button apply")->setEnabled(FALSE);
|
||||
//getChildView("has media")->setEnabled(FALSE);
|
||||
//getChildView("media info set")->setEnabled(FALSE);
|
||||
|
||||
|
||||
// Set variable values for numeric expressions
|
||||
@@ -1037,18 +1036,14 @@ F32 LLPanelFace::valueGlow(LLViewerObject* object, S32 face)
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLPanelFace::onCommitColor(LLUICtrl* ctrl, void* userdata)
|
||||
void LLPanelFace::onCommitColor(const LLSD& data)
|
||||
{
|
||||
LLPanelFace* self = (LLPanelFace*) userdata;
|
||||
self->sendColor();
|
||||
sendColor();
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelFace::onCommitAlpha(LLUICtrl* ctrl, void* userdata)
|
||||
void LLPanelFace::onCommitAlpha(const LLSD& data)
|
||||
{
|
||||
LLPanelFace* self = (LLPanelFace*) userdata;
|
||||
self->sendAlpha();
|
||||
sendAlpha();
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -1118,14 +1113,10 @@ BOOL LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item, void*)
|
||||
return accept;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelFace::onCommitTexture( LLUICtrl* ctrl, void* userdata )
|
||||
void LLPanelFace::onCommitTexture( const LLSD& data )
|
||||
{
|
||||
LLPanelFace* self = (LLPanelFace*) userdata;
|
||||
|
||||
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
|
||||
|
||||
self->sendTexture();
|
||||
sendTexture();
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -1138,7 +1129,7 @@ void LLPanelFace::onCancelTexture(LLUICtrl* ctrl, void* userdata)
|
||||
void LLPanelFace::onSelectTexture(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
LLPanelFace* self = (LLPanelFace*) userdata;
|
||||
LLSelectMgr::getInstance()->saveSelectedObjectTextures();
|
||||
LLSelectMgr::getInstance()->saveSelectedObjectTextures();
|
||||
self->sendTexture();
|
||||
}
|
||||
|
||||
@@ -1159,12 +1150,10 @@ void LLPanelFace::onClickApply(void* userdata)
|
||||
gFocusMgr.setKeyboardFocus( NULL );
|
||||
|
||||
//F32 repeats_per_meter = self->mCtrlRepeatsPerMeter->get();
|
||||
F32 repeats_per_meter = (F32)self->childGetValue( "rptctrl" ).asReal();//self->mCtrlRepeatsPerMeter->get();
|
||||
F32 repeats_per_meter = (F32)self->getChild<LLUICtrl>("rptctrl")->getValue().asReal();//self->mCtrlRepeatsPerMeter->get();
|
||||
LLSelectMgr::getInstance()->selectionTexScaleAutofit( repeats_per_meter );
|
||||
}
|
||||
|
||||
// commit the fit media texture to prim button
|
||||
|
||||
struct LLPanelFaceSetMediaFunctor : public LLSelectedTEFunctor
|
||||
{
|
||||
virtual bool apply(LLViewerObject* object, S32 te)
|
||||
|
||||
@@ -73,17 +73,18 @@ protected:
|
||||
void sendGlow();
|
||||
void sendMedia();
|
||||
|
||||
// this function is to return TRUE if the dra should succeed.
|
||||
// this function is to return TRUE if the drag should succeed.
|
||||
static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
|
||||
|
||||
static void onCommitTexture( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCancelTexture( LLUICtrl* ctrl, void* userdata);
|
||||
static void onSelectTexture( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitTextureInfo( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitColor( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitAlpha( LLUICtrl* ctrl, void* userdata);
|
||||
void onCommitTexture(const LLSD& data);
|
||||
static void onCancelTexture( LLUICtrl* ctrl, void* userdata);
|
||||
static void onSelectTexture( LLUICtrl* ctrl, void* userdata);
|
||||
void onCommitColor(const LLSD& data);
|
||||
void onCommitAlpha(const LLSD& data);
|
||||
static void onCancelColor( LLUICtrl* ctrl, void* userdata);
|
||||
static void onSelectColor( LLUICtrl* ctrl, void* userdata);
|
||||
|
||||
static void onCommitTextureInfo( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitBump( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitTexGen( LLUICtrl* ctrl, void* userdata);
|
||||
static void onCommitShiny( LLUICtrl* ctrl, void* userdata);
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llcallingcard.h"
|
||||
#include "llnotifications.h"
|
||||
|
||||
LLPanelGeneral::LLPanelGeneral()
|
||||
{
|
||||
|
||||
@@ -119,9 +119,7 @@ void LLPanelGroupTab::handleClickHelp()
|
||||
LLSD args;
|
||||
args["MESSAGE"] = help_text;
|
||||
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
|
||||
LLNotification::Params params(parent_floater->contextualNotification("GenericAlert"));
|
||||
params.substitutions(args);
|
||||
LLNotifications::instance().add(params);
|
||||
parent_floater->addContextualNotification("GenericAlert",args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -143,14 +143,7 @@ BOOL LLPanelGroupGeneral::postBuild()
|
||||
mBtnInfo->setClickedCallback(boost::bind(LLGroupActions::show, mGroupID));
|
||||
}
|
||||
|
||||
LLTextBox* founder = getChild<LLTextBox>("founder_name");
|
||||
if (founder)
|
||||
{
|
||||
mFounderName = new LLNameBox(founder->getName(),founder->getRect(),LLUUID::null,FALSE,founder->getFont(),founder->getMouseOpaque());
|
||||
removeChild(founder);
|
||||
delete founder;
|
||||
addChild(mFounderName);
|
||||
}
|
||||
mFounderName = getChild<LLNameBox>("founder_name");
|
||||
|
||||
mListVisibleMembers = getChild<LLNameListCtrl>("visible_members", recurse);
|
||||
if (mListVisibleMembers)
|
||||
|
||||
@@ -130,7 +130,8 @@ static std::string nameJoin(const std::string& first,const std::string& last, bo
|
||||
}
|
||||
|
||||
static std::string getDisplayString(const std::string& first, const std::string& last, const std::string& grid, bool is_secondlife) {
|
||||
if(grid == gHippoGridManager->getDefaultGridNick())
|
||||
//grid comes via LLSavedLoginEntry, which uses full grid names, not nicks
|
||||
if(grid == gHippoGridManager->getDefaultGridName())
|
||||
return nameJoin(first, last, is_secondlife);
|
||||
else
|
||||
return nameJoin(first, last, is_secondlife) + " (" + grid + ")";
|
||||
@@ -633,7 +634,9 @@ void LLPanelLogin::setFields(const LLSavedLoginEntry& entry, bool takeFocus)
|
||||
//sInstance->childSetText("name_combo", fullname);
|
||||
|
||||
std::string grid = entry.getGrid();
|
||||
if(!grid.empty() && gHippoGridManager->getGrid(grid) && grid != gHippoGridManager->getCurrentGridNick()) {
|
||||
//grid comes via LLSavedLoginEntry, which uses full grid names, not nicks
|
||||
if(!grid.empty() && gHippoGridManager->getGrid(grid) && grid != gHippoGridManager->getCurrentGridName())
|
||||
{
|
||||
gHippoGridManager->setCurrentGrid(grid);
|
||||
LLPanelLogin::refreshLoginPage();
|
||||
}
|
||||
@@ -791,27 +794,34 @@ void LLPanelLogin::setAlwaysRefresh(bool refresh)
|
||||
|
||||
void LLPanelLogin::updateGridCombo()
|
||||
{
|
||||
const std::string &defaultGrid = gHippoGridManager->getDefaultGridNick();
|
||||
const std::string ¤tGrid = gHippoGridManager->getCurrentGridNick();
|
||||
const std::string &defaultGrid = gHippoGridManager->getDefaultGridName();
|
||||
|
||||
LLComboBox *grids = getChild<LLComboBox>("grids_combo");
|
||||
S32 selectIndex = -1, i = 0;
|
||||
std::string top_entry;
|
||||
|
||||
grids->removeall();
|
||||
if (defaultGrid != "") {
|
||||
grids->add(defaultGrid);
|
||||
selectIndex = i++;
|
||||
}
|
||||
|
||||
const HippoGridInfo *curGrid = gHippoGridManager->getCurrentGrid();
|
||||
const HippoGridInfo *defGrid = gHippoGridManager->getGrid(defaultGrid);
|
||||
|
||||
HippoGridManager::GridIterator it, end = gHippoGridManager->endGrid();
|
||||
for (it = gHippoGridManager->beginGrid(); it != end; ++it) {
|
||||
for (it = gHippoGridManager->beginGrid(); it != end; ++it)
|
||||
{
|
||||
std::string grid = it->second->getGridName();
|
||||
if (grid != defaultGrid) {
|
||||
grids->add(grid);
|
||||
if (grid == currentGrid) selectIndex = i;
|
||||
i++;
|
||||
}
|
||||
if(grid.empty() || it->second == defGrid || it->second == curGrid)
|
||||
continue;
|
||||
grids->add(grid);
|
||||
}
|
||||
if (selectIndex >= 0) {
|
||||
grids->setCurrentByIndex(selectIndex);
|
||||
} else {
|
||||
if(curGrid || defGrid)
|
||||
{
|
||||
if(defGrid)
|
||||
grids->add(defGrid->getGridName(),ADD_TOP);
|
||||
if(curGrid && defGrid != curGrid)
|
||||
grids->add(curGrid->getGridName(),ADD_TOP);
|
||||
grids->setCurrentByIndex(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
grids->setLabel(LLStringExplicit("")); // LLComboBox::removeall() does not clear the label
|
||||
}
|
||||
}
|
||||
|
||||
515
indra/newview/llpanelmediasettingsgeneral.cpp
Normal file
@@ -0,0 +1,515 @@
|
||||
/**
|
||||
* @file llpanelmediasettingsgeneral.cpp
|
||||
* @brief LLPanelMediaSettingsGeneral class implementation
|
||||
*
|
||||
* $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 "llpanelmediasettingsgeneral.h"
|
||||
|
||||
// library includes
|
||||
#include "llcombobox.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llspinctrl.h"
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
// project includes
|
||||
#include "llagent.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewermedia.h"
|
||||
#include "llsdutil.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llbutton.h"
|
||||
#include "lltexturectrl.h"
|
||||
#include "llurl.h"
|
||||
#include "llwindow.h"
|
||||
#include "llmediaentry.h"
|
||||
#include "llmediactrl.h"
|
||||
#include "llpanelcontents.h"
|
||||
#include "llpermissions.h"
|
||||
#include "llpluginclassmedia.h"
|
||||
#include "llfloatermediasettings.h"
|
||||
#include "llfloatertools.h"
|
||||
#include "lltrans.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llpanelmediasettingssecurity.h"
|
||||
|
||||
const char *CHECKERBOARD_DATA_URL = "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22100%%22 height=%22100%%22 %3E%3Cdefs%3E%3Cpattern id=%22checker%22 patternUnits=%22userSpaceOnUse%22 x=%220%22 y=%220%22 width=%22128%22 height=%22128%22 viewBox=%220 0 128 128%22 %3E%3Crect x=%220%22 y=%220%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3Crect x=%2264%22 y=%2264%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3C/pattern%3E%3C/defs%3E%3Crect x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22 fill=%22url(#checker)%22 /%3E%3C/svg%3E";
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() :
|
||||
mAutoLoop( NULL ),
|
||||
mFirstClick( NULL ),
|
||||
mAutoZoom( NULL ),
|
||||
mAutoPlay( NULL ),
|
||||
mAutoScale( NULL ),
|
||||
mWidthPixels( NULL ),
|
||||
mHeightPixels( NULL ),
|
||||
mHomeURL( NULL ),
|
||||
mCurrentURL( NULL ),
|
||||
mParent( NULL ),
|
||||
mMediaEditable(false)
|
||||
{
|
||||
// build dialog from XML
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this,"panel_media_settings_general.xml");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
BOOL LLPanelMediaSettingsGeneral::postBuild()
|
||||
{
|
||||
// connect member vars with UI widgets
|
||||
mAutoLoop = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_LOOP_KEY );
|
||||
mAutoPlay = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_PLAY_KEY );
|
||||
mAutoScale = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_SCALE_KEY );
|
||||
mAutoZoom = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_ZOOM_KEY );
|
||||
mCurrentURL = getChild< LLTextBox >( LLMediaEntry::CURRENT_URL_KEY );
|
||||
mFirstClick = getChild< LLCheckBoxCtrl >( LLMediaEntry::FIRST_CLICK_INTERACT_KEY );
|
||||
mHeightPixels = getChild< LLSpinCtrl >( LLMediaEntry::HEIGHT_PIXELS_KEY );
|
||||
mHomeURL = getChild< LLLineEditor >( LLMediaEntry::HOME_URL_KEY );
|
||||
mWidthPixels = getChild< LLSpinCtrl >( LLMediaEntry::WIDTH_PIXELS_KEY );
|
||||
mPreviewMedia = getChild<LLMediaCtrl>("preview_media");
|
||||
mFailWhiteListText = getChild<LLTextBox>( "home_fails_whitelist_label" );
|
||||
|
||||
// watch commit action for HOME URL
|
||||
childSetCommitCallback( LLMediaEntry::HOME_URL_KEY, onCommitHomeURL, this);
|
||||
childSetCommitCallback( "current_url_reset_btn",onBtnResetCurrentUrl, this);
|
||||
|
||||
// interrogates controls and updates widgets as required
|
||||
updateMediaPreview();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// virtual
|
||||
LLPanelMediaSettingsGeneral::~LLPanelMediaSettingsGeneral()
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLPanelMediaSettingsGeneral::draw()
|
||||
{
|
||||
// housekeeping
|
||||
LLPanel::draw();
|
||||
|
||||
// TODO: we need to call this repeatedly until the floater panels are fully
|
||||
// created but once we have a valid answer, we should stop looking here - the
|
||||
// commit callback will handle it
|
||||
checkHomeUrlPassesWhitelist();
|
||||
|
||||
// enable/disable pixel values image entry based on auto scale checkbox
|
||||
if ( mAutoScale->getValue().asBoolean() == false )
|
||||
{
|
||||
getChildView( LLMediaEntry::WIDTH_PIXELS_KEY )->setEnabled( true );
|
||||
getChildView( LLMediaEntry::HEIGHT_PIXELS_KEY )->setEnabled( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
getChildView( LLMediaEntry::WIDTH_PIXELS_KEY )->setEnabled( false );
|
||||
getChildView( LLMediaEntry::HEIGHT_PIXELS_KEY )->setEnabled( false );
|
||||
};
|
||||
|
||||
// enable/disable UI based on type of media
|
||||
bool reset_button_is_active = true;
|
||||
if( mPreviewMedia )
|
||||
{
|
||||
LLPluginClassMedia* media_plugin = mPreviewMedia->getMediaPlugin();
|
||||
if( media_plugin )
|
||||
{
|
||||
// turn off volume (if we can) for preview. Note: this really only
|
||||
// works for QuickTime movies right now - no way to control the
|
||||
// volume of a flash app embedded in a page for example
|
||||
media_plugin->setVolume( 0 );
|
||||
|
||||
// some controls are only appropriate for time or browser type plugins
|
||||
// so we selectively enable/disable them - need to do it in draw
|
||||
// because the information from plugins arrives assynchronously
|
||||
bool show_time_controls = media_plugin->pluginSupportsMediaTime();
|
||||
if ( show_time_controls )
|
||||
{
|
||||
getChildView( LLMediaEntry::CURRENT_URL_KEY )->setEnabled( false );
|
||||
reset_button_is_active = false;
|
||||
getChildView("current_url_label")->setEnabled(false );
|
||||
getChildView( LLMediaEntry::AUTO_LOOP_KEY )->setEnabled( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
getChildView( LLMediaEntry::CURRENT_URL_KEY )->setEnabled( true );
|
||||
reset_button_is_active = true;
|
||||
getChildView("current_url_label")->setEnabled(true );
|
||||
getChildView( LLMediaEntry::AUTO_LOOP_KEY )->setEnabled( false );
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// current URL can change over time, update it here
|
||||
updateCurrentUrl();
|
||||
|
||||
LLPermissions perm;
|
||||
bool user_can_press_reset = mMediaEditable;
|
||||
|
||||
// several places modify this widget so we must collect states in one place
|
||||
if ( reset_button_is_active )
|
||||
{
|
||||
// user has perms to press reset button and it is active
|
||||
if ( user_can_press_reset )
|
||||
{
|
||||
getChildView("current_url_reset_btn")->setEnabled(true );
|
||||
}
|
||||
// user does not has perms to press reset button and it is active
|
||||
else
|
||||
{
|
||||
getChildView("current_url_reset_btn")->setEnabled(false );
|
||||
};
|
||||
}
|
||||
else
|
||||
// reset button is inactive so we just slam it to off - other states don't matter
|
||||
{
|
||||
getChildView("current_url_reset_btn")->setEnabled(false );
|
||||
};
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable)
|
||||
{
|
||||
LLPanelMediaSettingsGeneral *self =(LLPanelMediaSettingsGeneral *)userdata;
|
||||
self->mAutoLoop->clear();
|
||||
self->mAutoPlay->clear();
|
||||
self->mAutoScale->clear();
|
||||
self->mAutoZoom ->clear();
|
||||
self->mCurrentURL->setValue("");
|
||||
self->mFirstClick->clear();
|
||||
self->mHeightPixels->clear();
|
||||
self->mHomeURL->clear();
|
||||
self->mWidthPixels->clear();
|
||||
self->mAutoLoop ->setEnabled(editable);
|
||||
self->mAutoPlay ->setEnabled(editable);
|
||||
self->mAutoScale ->setEnabled(editable);
|
||||
self->mAutoZoom ->setEnabled(editable);
|
||||
self->mCurrentURL ->setEnabled(editable);
|
||||
self->mFirstClick ->setEnabled(editable);
|
||||
self->mHeightPixels ->setEnabled(editable);
|
||||
self->mHomeURL ->setEnabled(editable);
|
||||
self->mWidthPixels ->setEnabled(editable);
|
||||
self->updateMediaPreview();
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLPanelMediaSettingsGeneral::isMultiple()
|
||||
{
|
||||
// IF all the faces have media (or all dont have media)
|
||||
if ( LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo )
|
||||
{
|
||||
if(LLFloaterMediaSettings::getInstance()->mMultipleMedia)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(LLFloaterMediaSettings::getInstance()->mMultipleValidMedia)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& _media_settings, bool editable)
|
||||
{
|
||||
LLPanelMediaSettingsGeneral *self =(LLPanelMediaSettingsGeneral *)userdata;
|
||||
self->mMediaEditable = editable;
|
||||
|
||||
LLSD media_settings = _media_settings;
|
||||
|
||||
if ( LLPanelMediaSettingsGeneral::isMultiple() )
|
||||
{
|
||||
// *HACK: "edit" the incoming media_settings
|
||||
media_settings[LLMediaEntry::CURRENT_URL_KEY] = LLTrans::getString("Multiple Media");
|
||||
media_settings[LLMediaEntry::HOME_URL_KEY] = LLTrans::getString("Multiple Media");
|
||||
}
|
||||
|
||||
std::string base_key( "" );
|
||||
std::string tentative_key( "" );
|
||||
|
||||
struct
|
||||
{
|
||||
std::string key_name;
|
||||
LLUICtrl* ctrl_ptr;
|
||||
std::string ctrl_type;
|
||||
|
||||
} data_set [] =
|
||||
{
|
||||
{ LLMediaEntry::AUTO_LOOP_KEY, self->mAutoLoop, "LLCheckBoxCtrl" },
|
||||
{ LLMediaEntry::AUTO_PLAY_KEY, self->mAutoPlay, "LLCheckBoxCtrl" },
|
||||
{ LLMediaEntry::AUTO_SCALE_KEY, self->mAutoScale, "LLCheckBoxCtrl" },
|
||||
{ LLMediaEntry::AUTO_ZOOM_KEY, self->mAutoZoom, "LLCheckBoxCtrl" },
|
||||
{ LLMediaEntry::CURRENT_URL_KEY, self->mCurrentURL, "LLTextBox" },
|
||||
{ LLMediaEntry::HEIGHT_PIXELS_KEY, self->mHeightPixels, "LLSpinCtrl" },
|
||||
{ LLMediaEntry::HOME_URL_KEY, self->mHomeURL, "LLLineEditor" },
|
||||
{ LLMediaEntry::FIRST_CLICK_INTERACT_KEY, self->mFirstClick, "LLCheckBoxCtrl" },
|
||||
{ LLMediaEntry::WIDTH_PIXELS_KEY, self->mWidthPixels, "LLSpinCtrl" },
|
||||
{ "", NULL , "" }
|
||||
};
|
||||
|
||||
for( int i = 0; data_set[ i ].key_name.length() > 0; ++i )
|
||||
{
|
||||
base_key = std::string( data_set[ i ].key_name );
|
||||
tentative_key = base_key + std::string( LLPanelContents::TENTATIVE_SUFFIX );
|
||||
// TODO: CP - I bet there is a better way to do this using Boost
|
||||
if ( media_settings[ base_key ].isDefined() )
|
||||
{
|
||||
if ( data_set[ i ].ctrl_type == "LLLineEditor" )
|
||||
{
|
||||
static_cast< LLLineEditor* >( data_set[ i ].ctrl_ptr )->
|
||||
setText( media_settings[ base_key ].asString() );
|
||||
}
|
||||
else
|
||||
if ( data_set[ i ].ctrl_type == "LLCheckBoxCtrl" )
|
||||
static_cast< LLCheckBoxCtrl* >( data_set[ i ].ctrl_ptr )->
|
||||
setValue( media_settings[ base_key ].asBoolean() );
|
||||
else
|
||||
if ( data_set[ i ].ctrl_type == "LLComboBox" )
|
||||
static_cast< LLComboBox* >( data_set[ i ].ctrl_ptr )->
|
||||
setCurrentByIndex( media_settings[ base_key ].asInteger() );
|
||||
else
|
||||
if ( data_set[ i ].ctrl_type == "LLSpinCtrl" )
|
||||
static_cast< LLSpinCtrl* >( data_set[ i ].ctrl_ptr )->
|
||||
setValue( media_settings[ base_key ].asInteger() );
|
||||
|
||||
data_set[ i ].ctrl_ptr->setEnabled(self->mMediaEditable);
|
||||
data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() );
|
||||
};
|
||||
};
|
||||
|
||||
// interrogates controls and updates widgets as required
|
||||
self->updateMediaPreview();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Helper to set media control to media URL as required
|
||||
void LLPanelMediaSettingsGeneral::updateMediaPreview()
|
||||
{
|
||||
if ( mHomeURL->getValue().asString().length() > 0 )
|
||||
{
|
||||
if(mPreviewMedia->getCurrentNavUrl() != mHomeURL->getValue().asString())
|
||||
{
|
||||
mPreviewMedia->navigateTo( mHomeURL->getValue().asString() );
|
||||
}
|
||||
}
|
||||
else
|
||||
// new home URL will be empty if media is deleted so display a
|
||||
// "preview goes here" data url page
|
||||
{
|
||||
if(mPreviewMedia->getCurrentNavUrl() != CHECKERBOARD_DATA_URL)
|
||||
{
|
||||
mPreviewMedia->navigateTo( CHECKERBOARD_DATA_URL );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// virtual
|
||||
void LLPanelMediaSettingsGeneral::onClose(bool app_quitting)
|
||||
{
|
||||
if(mPreviewMedia)
|
||||
{
|
||||
mPreviewMedia->unloadMediaSource();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsGeneral::checkHomeUrlPassesWhitelist()
|
||||
{
|
||||
// parent floater has not constructed the security panel yet
|
||||
if ( mParent->getPanelSecurity() == 0 )
|
||||
return;
|
||||
|
||||
std::string home_url = getHomeUrl();
|
||||
if ( home_url.empty() || mParent->getPanelSecurity()->urlPassesWhiteList( home_url ) )
|
||||
{
|
||||
// Home URL is empty or passes the white list so hide the warning message
|
||||
mFailWhiteListText->setVisible( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Home URL does not pass the white list so show the warning message
|
||||
mFailWhiteListText->setVisible( true );
|
||||
};
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLPanelMediaSettingsGeneral::onCommitHomeURL( LLUICtrl* ctrl, void *userdata )
|
||||
{
|
||||
LLPanelMediaSettingsGeneral* self =(LLPanelMediaSettingsGeneral *)userdata;
|
||||
|
||||
// check home url passes whitelist and display warning if not
|
||||
self->checkHomeUrlPassesWhitelist();
|
||||
|
||||
self->updateMediaPreview();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLPanelMediaSettingsGeneral::onBtnResetCurrentUrl(LLUICtrl* ctrl, void *userdata)
|
||||
{
|
||||
LLPanelMediaSettingsGeneral* self =(LLPanelMediaSettingsGeneral *)userdata;
|
||||
self->navigateHomeSelectedFace(false);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsGeneral::preApply()
|
||||
{
|
||||
// Make sure the home URL entry is committed
|
||||
mHomeURL->onCommit();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in, bool include_tentative )
|
||||
{
|
||||
if (include_tentative || !mAutoLoop->getTentative()) fill_me_in[LLMediaEntry::AUTO_LOOP_KEY] = (LLSD::Boolean)mAutoLoop->getValue();
|
||||
if (include_tentative || !mAutoPlay->getTentative()) fill_me_in[LLMediaEntry::AUTO_PLAY_KEY] = (LLSD::Boolean)mAutoPlay->getValue();
|
||||
if (include_tentative || !mAutoScale->getTentative()) fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = (LLSD::Boolean)mAutoScale->getValue();
|
||||
if (include_tentative || !mAutoZoom->getTentative()) fill_me_in[LLMediaEntry::AUTO_ZOOM_KEY] = (LLSD::Boolean)mAutoZoom->getValue();
|
||||
//Don't fill in current URL: this is only supposed to get changed via navigate
|
||||
// if (include_tentative || !mCurrentURL->getTentative()) fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue();
|
||||
if (include_tentative || !mHeightPixels->getTentative()) fill_me_in[LLMediaEntry::HEIGHT_PIXELS_KEY] = (LLSD::Integer)mHeightPixels->getValue();
|
||||
// Don't fill in the home URL if it is the special "Multiple Media" string!
|
||||
if ((include_tentative || !mHomeURL->getTentative())
|
||||
&& LLTrans::getString("Multiple Media") != mHomeURL->getValue())
|
||||
fill_me_in[LLMediaEntry::HOME_URL_KEY] = (LLSD::String)mHomeURL->getValue();
|
||||
if (include_tentative || !mFirstClick->getTentative()) fill_me_in[LLMediaEntry::FIRST_CLICK_INTERACT_KEY] = (LLSD::Boolean)mFirstClick->getValue();
|
||||
if (include_tentative || !mWidthPixels->getTentative()) fill_me_in[LLMediaEntry::WIDTH_PIXELS_KEY] = (LLSD::Integer)mWidthPixels->getValue();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsGeneral::postApply()
|
||||
{
|
||||
// Make sure to navigate to the home URL if the current URL is empty and
|
||||
// autoplay is on
|
||||
navigateHomeSelectedFace(true);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsGeneral::setParent( LLFloaterMediaSettings* parent )
|
||||
{
|
||||
mParent = parent;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_is_empty)
|
||||
{
|
||||
struct functor_navigate_media : public LLSelectedTEGetFunctor< bool>
|
||||
{
|
||||
functor_navigate_media(bool flag) : only_if_current_is_empty(flag) {}
|
||||
bool get( LLViewerObject* object, S32 face )
|
||||
{
|
||||
if ( object && object->getTE(face) && object->permModify() )
|
||||
{
|
||||
const LLMediaEntry *media_data = object->getTE(face)->getMediaData();
|
||||
if ( media_data )
|
||||
{
|
||||
if (!only_if_current_is_empty || (media_data->getCurrentURL().empty() && media_data->getAutoPlay()))
|
||||
{
|
||||
viewer_media_t media_impl =
|
||||
LLViewerMedia::getMediaImplFromTextureID(object->getTE(face)->getMediaData()->getMediaID());
|
||||
if(media_impl)
|
||||
{
|
||||
media_impl->navigateHome();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
bool only_if_current_is_empty;
|
||||
|
||||
} functor_navigate_media(only_if_current_is_empty);
|
||||
|
||||
bool all_face_media_navigated = false;
|
||||
LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection();
|
||||
selected_objects->getSelectedTEValue( &functor_navigate_media, all_face_media_navigated );
|
||||
|
||||
// Note: we don't update the 'current URL' field until the media data itself changes
|
||||
|
||||
return all_face_media_navigated;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
const std::string LLPanelMediaSettingsGeneral::getHomeUrl()
|
||||
{
|
||||
return mHomeURL->getValue().asString();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsGeneral::updateCurrentUrl()
|
||||
{
|
||||
// Get the current URL from the selection
|
||||
const LLMediaEntry default_media_data;
|
||||
std::string value_str = default_media_data.getCurrentURL();
|
||||
struct functor_getter_current_url : public LLSelectedTEGetFunctor< std::string >
|
||||
{
|
||||
functor_getter_current_url(const LLMediaEntry& entry): mMediaEntry(entry) {}
|
||||
|
||||
std::string get( LLViewerObject* object, S32 face )
|
||||
{
|
||||
if ( object )
|
||||
if ( object->getTE(face) )
|
||||
if ( object->getTE(face)->getMediaData() )
|
||||
return object->getTE(face)->getMediaData()->getCurrentURL();
|
||||
return mMediaEntry.getCurrentURL();
|
||||
};
|
||||
|
||||
const LLMediaEntry & mMediaEntry;
|
||||
|
||||
} func_current_url(default_media_data);
|
||||
bool identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func_current_url, value_str );
|
||||
mCurrentURL->setText(value_str);
|
||||
mCurrentURL->setTentative(identical);
|
||||
|
||||
if ( LLPanelMediaSettingsGeneral::isMultiple() )
|
||||
{
|
||||
mCurrentURL->setText(LLTrans::getString("Multiple Media"));
|
||||
}
|
||||
}
|
||||
100
indra/newview/llpanelmediasettingsgeneral.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/**
|
||||
* @file llpanelmediasettingsgeneral.h
|
||||
* @brief LLPanelMediaSettingsGeneral class definition
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&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_LLPANELMEDIAMEDIASETTINGSGENERAL_H
|
||||
#define LL_LLPANELMEDIAMEDIASETTINGSGENERAL_H
|
||||
|
||||
#include "llpanel.h"
|
||||
|
||||
class LLButton;
|
||||
class LLCheckBoxCtrl;
|
||||
class LLLineEditor;
|
||||
class LLSpinCtrl;
|
||||
class LLTextureCtrl;
|
||||
class LLMediaCtrl;
|
||||
class LLTextBox;
|
||||
class LLFloaterMediaSettings;
|
||||
|
||||
class LLPanelMediaSettingsGeneral : public LLPanel
|
||||
{
|
||||
public:
|
||||
LLPanelMediaSettingsGeneral();
|
||||
~LLPanelMediaSettingsGeneral();
|
||||
|
||||
// XXX TODO: put these into a common parent class?
|
||||
// Hook that the floater calls before applying changes from the panel
|
||||
void preApply();
|
||||
// Function that asks the panel to fill in values associated with the panel
|
||||
// 'include_tentative' means fill in tentative values as well, otherwise do not
|
||||
void getValues(LLSD &fill_me_in, bool include_tentative = true);
|
||||
// Hook that the floater calls after applying changes to the panel
|
||||
void postApply();
|
||||
|
||||
BOOL postBuild();
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
|
||||
void setParent( LLFloaterMediaSettings* parent );
|
||||
static void initValues( void* userdata, const LLSD& media_settings ,bool editable);
|
||||
static void clearValues( void* userdata, bool editable);
|
||||
|
||||
// Navigates the current selected face to the Home URL.
|
||||
// If 'only_if_current_is_empty' is "true", it only performs
|
||||
// the operation if: 1) the current URL is empty, and 2) auto play is true.
|
||||
bool navigateHomeSelectedFace(bool only_if_current_is_empty);
|
||||
|
||||
void updateMediaPreview();
|
||||
|
||||
const std::string getHomeUrl();
|
||||
|
||||
protected:
|
||||
LLFloaterMediaSettings* mParent;
|
||||
bool mMediaEditable;
|
||||
|
||||
private:
|
||||
void updateCurrentUrl();
|
||||
|
||||
static void onBtnResetCurrentUrl(LLUICtrl* ctrl, void *userdata);
|
||||
static void onCommitHomeURL(LLUICtrl* ctrl, void *userdata );
|
||||
|
||||
static bool isMultiple();
|
||||
|
||||
void checkHomeUrlPassesWhitelist();
|
||||
|
||||
LLCheckBoxCtrl* mAutoLoop;
|
||||
LLCheckBoxCtrl* mFirstClick;
|
||||
LLCheckBoxCtrl* mAutoZoom;
|
||||
LLCheckBoxCtrl* mAutoPlay;
|
||||
LLCheckBoxCtrl* mAutoScale;
|
||||
LLSpinCtrl* mWidthPixels;
|
||||
LLSpinCtrl* mHeightPixels;
|
||||
LLLineEditor* mHomeURL;
|
||||
LLTextBox* mCurrentURL;
|
||||
LLMediaCtrl* mPreviewMedia;
|
||||
LLTextBox* mFailWhiteListText;
|
||||
};
|
||||
|
||||
#endif // LL_LLPANELMEDIAMEDIASETTINGSGENERAL_H
|
||||
285
indra/newview/llpanelmediasettingspermissions.cpp
Normal file
@@ -0,0 +1,285 @@
|
||||
/**
|
||||
* @file llpanelmediasettingspermissions.cpp
|
||||
* @brief LLPanelMediaSettingsPermissions class implementation
|
||||
*
|
||||
* note that "permissions" tab is really "Controls" tab - refs to 'perms' and
|
||||
* 'permissions' not changed to 'controls' since we don't want to change
|
||||
* shared files in server code and keeping everything the same seemed best.
|
||||
*
|
||||
* $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 "llpanelmediasettingspermissions.h"
|
||||
#include "llpanelcontents.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llspinctrl.h"
|
||||
#include "llurlhistory.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llwindow.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llsdutil.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llmediaentry.h"
|
||||
#include "llnamebox.h"
|
||||
#include "lltrans.h"
|
||||
#include "llfloatermediasettings.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
LLPanelMediaSettingsPermissions::LLPanelMediaSettingsPermissions() :
|
||||
mControls( NULL ),
|
||||
mPermsOwnerInteract( 0 ),
|
||||
mPermsOwnerControl( 0 ),
|
||||
mPermsGroupName( 0 ),
|
||||
mPermsGroupInteract( 0 ),
|
||||
mPermsGroupControl( 0 ),
|
||||
mPermsWorldInteract( 0 ),
|
||||
mPermsWorldControl( 0 )
|
||||
{
|
||||
// build dialog from XML
|
||||
//buildFromFile( "panel_media_settings_permissions.xml");
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this,"panel_media_settings_permissions.xml");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
BOOL LLPanelMediaSettingsPermissions::postBuild()
|
||||
{
|
||||
// connect member vars with UI widgets
|
||||
mControls = getChild< LLComboBox >( LLMediaEntry::CONTROLS_KEY );
|
||||
mPermsOwnerInteract = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_OWNER_INTERACT_KEY );
|
||||
mPermsOwnerControl = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_OWNER_CONTROL_KEY );
|
||||
mPermsGroupInteract = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_GROUP_INTERACT_KEY );
|
||||
mPermsGroupControl = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_GROUP_CONTROL_KEY );
|
||||
mPermsWorldInteract = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_ANYONE_INTERACT_KEY );
|
||||
mPermsWorldControl = getChild< LLCheckBoxCtrl >( LLPanelContents::PERMS_ANYONE_CONTROL_KEY );
|
||||
|
||||
mPermsGroupName = getChild< LLNameBox >( "perms_group_name" );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// virtual
|
||||
LLPanelMediaSettingsPermissions::~LLPanelMediaSettingsPermissions()
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// virtual
|
||||
void LLPanelMediaSettingsPermissions::draw()
|
||||
{
|
||||
// housekeeping
|
||||
LLPanel::draw();
|
||||
|
||||
getChild<LLUICtrl>("perms_group_name")->setValue(LLStringUtil::null);
|
||||
LLUUID group_id;
|
||||
BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
|
||||
if (groups_identical)
|
||||
{
|
||||
if(mPermsGroupName)
|
||||
{
|
||||
mPermsGroupName->setNameID(group_id, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mPermsGroupName)
|
||||
{
|
||||
mPermsGroupName->setNameID(LLUUID::null, TRUE);
|
||||
mPermsGroupName->refresh(LLUUID::null, std::string(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLPanelMediaSettingsPermissions::clearValues( void* userdata, bool editable)
|
||||
{
|
||||
LLPanelMediaSettingsPermissions *self =(LLPanelMediaSettingsPermissions *)userdata;
|
||||
|
||||
self->mControls->clear();
|
||||
self->mPermsOwnerInteract->clear();
|
||||
self->mPermsOwnerControl->clear();
|
||||
self->mPermsGroupInteract->clear();
|
||||
self->mPermsGroupControl->clear();
|
||||
self->mPermsWorldInteract->clear();
|
||||
self->mPermsWorldControl->clear();
|
||||
|
||||
self->mControls->setEnabled(editable);
|
||||
self->mPermsOwnerInteract->setEnabled(editable);
|
||||
self->mPermsOwnerControl->setEnabled(editable);
|
||||
self->mPermsGroupInteract->setEnabled(editable);
|
||||
self->mPermsGroupControl->setEnabled(editable);
|
||||
self->mPermsWorldInteract->setEnabled(editable);
|
||||
self->mPermsWorldControl->setEnabled(editable);
|
||||
|
||||
self->getChild< LLTextBox >("controls_label")->setEnabled(editable);
|
||||
self->getChild< LLTextBox >("owner_label")->setEnabled(editable);
|
||||
self->getChild< LLTextBox >("group_label")->setEnabled(editable);
|
||||
self->getChild< LLNameBox >("perms_group_name")->setEnabled(editable);
|
||||
self->getChild< LLTextBox >("anyone_label")->setEnabled(editable);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLPanelMediaSettingsPermissions::initValues( void* userdata, const LLSD& media_settings , bool editable)
|
||||
{
|
||||
LLPanelMediaSettingsPermissions *self =(LLPanelMediaSettingsPermissions *)userdata;
|
||||
std::string base_key( "" );
|
||||
std::string tentative_key( "" );
|
||||
|
||||
struct
|
||||
{
|
||||
std::string key_name;
|
||||
LLUICtrl* ctrl_ptr;
|
||||
std::string ctrl_type;
|
||||
|
||||
} data_set [] =
|
||||
{
|
||||
{ LLMediaEntry::CONTROLS_KEY, self->mControls, "LLComboBox" },
|
||||
{ LLPanelContents::PERMS_OWNER_INTERACT_KEY, self->mPermsOwnerInteract, "LLCheckBoxCtrl" },
|
||||
{ LLPanelContents::PERMS_OWNER_CONTROL_KEY, self->mPermsOwnerControl, "LLCheckBoxCtrl" },
|
||||
{ LLPanelContents::PERMS_GROUP_INTERACT_KEY, self->mPermsGroupInteract, "LLCheckBoxCtrl" },
|
||||
{ LLPanelContents::PERMS_GROUP_CONTROL_KEY, self->mPermsGroupControl, "LLCheckBoxCtrl" },
|
||||
{ LLPanelContents::PERMS_ANYONE_INTERACT_KEY, self->mPermsWorldInteract, "LLCheckBoxCtrl" },
|
||||
{ LLPanelContents::PERMS_ANYONE_CONTROL_KEY, self->mPermsWorldControl, "LLCheckBoxCtrl" },
|
||||
{ "", NULL , "" }
|
||||
};
|
||||
|
||||
for( int i = 0; data_set[ i ].key_name.length() > 0; ++i )
|
||||
{
|
||||
base_key = std::string( data_set[ i ].key_name );
|
||||
tentative_key = base_key + std::string( LLPanelContents::TENTATIVE_SUFFIX );
|
||||
|
||||
// TODO: CP - I bet there is a better way to do this using Boost
|
||||
if ( media_settings[ base_key ].isDefined() )
|
||||
{
|
||||
if ( data_set[ i ].ctrl_type == "LLCheckBoxCtrl" )
|
||||
{
|
||||
// Most recent change to the "sense" of these checkboxes
|
||||
// means the value in the checkbox matches that on the server
|
||||
static_cast< LLCheckBoxCtrl* >( data_set[ i ].ctrl_ptr )->
|
||||
setValue( media_settings[ base_key ].asBoolean() );
|
||||
}
|
||||
else
|
||||
if ( data_set[ i ].ctrl_type == "LLComboBox" )
|
||||
static_cast< LLComboBox* >( data_set[ i ].ctrl_ptr )->
|
||||
setCurrentByIndex( media_settings[ base_key ].asInteger() );
|
||||
|
||||
data_set[ i ].ctrl_ptr->setEnabled(editable);
|
||||
data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() );
|
||||
};
|
||||
};
|
||||
|
||||
// *NOTE: If any of a particular flavor is tentative, we have to disable
|
||||
// them all because of an architectural issue: namely that we represent
|
||||
// these as a bit field, and we can't selectively apply only one bit to all selected
|
||||
// faces if they don't match. Also see the *NOTE below.
|
||||
if ( self->mPermsOwnerInteract->getTentative() ||
|
||||
self->mPermsGroupInteract->getTentative() ||
|
||||
self->mPermsWorldInteract->getTentative())
|
||||
{
|
||||
self->mPermsOwnerInteract->setEnabled(false);
|
||||
self->mPermsGroupInteract->setEnabled(false);
|
||||
self->mPermsWorldInteract->setEnabled(false);
|
||||
}
|
||||
if ( self->mPermsOwnerControl->getTentative() ||
|
||||
self->mPermsGroupControl->getTentative() ||
|
||||
self->mPermsWorldControl->getTentative())
|
||||
{
|
||||
self->mPermsOwnerControl->setEnabled(false);
|
||||
self->mPermsGroupControl->setEnabled(false);
|
||||
self->mPermsWorldControl->setEnabled(false);
|
||||
}
|
||||
|
||||
self->getChild< LLTextBox >("controls_label")->setEnabled(editable);
|
||||
self->getChild< LLTextBox >("owner_label")->setEnabled(editable);
|
||||
self->getChild< LLTextBox >("group_label")->setEnabled(editable);
|
||||
self->getChild< LLNameBox >("perms_group_name")->setEnabled(editable);
|
||||
self->getChild< LLTextBox >("anyone_label")->setEnabled(editable);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsPermissions::preApply()
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsPermissions::getValues( LLSD &fill_me_in, bool include_tentative )
|
||||
{
|
||||
// moved over from the 'General settings' tab
|
||||
if (include_tentative || !mControls->getTentative()) fill_me_in[LLMediaEntry::CONTROLS_KEY] = (LLSD::Integer)mControls->getCurrentIndex();
|
||||
|
||||
// *NOTE: For some reason, gcc does not like these symbol references in the
|
||||
// expressions below (inside the static_casts). I have NO idea why :(.
|
||||
// For some reason, assigning them to const temp vars here fixes the link
|
||||
// error. Bizarre.
|
||||
const U8 none = LLMediaEntry::PERM_NONE;
|
||||
const U8 owner = LLMediaEntry::PERM_OWNER;
|
||||
const U8 group = LLMediaEntry::PERM_GROUP;
|
||||
const U8 anyone = LLMediaEntry::PERM_ANYONE;
|
||||
const LLSD::Integer control = static_cast<LLSD::Integer>(
|
||||
(mPermsOwnerControl->getValue() ? owner : none ) |
|
||||
(mPermsGroupControl->getValue() ? group: none ) |
|
||||
(mPermsWorldControl->getValue() ? anyone : none ));
|
||||
const LLSD::Integer interact = static_cast<LLSD::Integer>(
|
||||
(mPermsOwnerInteract->getValue() ? owner: none ) |
|
||||
(mPermsGroupInteract->getValue() ? group : none ) |
|
||||
(mPermsWorldInteract->getValue() ? anyone : none ));
|
||||
|
||||
// *TODO: This will fill in the values of all permissions values, even if
|
||||
// one or more is tentative. This is not quite the user expectation...what
|
||||
// it should do is only change the bit that was made "untentative", but in
|
||||
// a multiple-selection situation, this isn't possible given the architecture
|
||||
// for how settings are applied.
|
||||
if (include_tentative ||
|
||||
!mPermsOwnerControl->getTentative() ||
|
||||
!mPermsGroupControl->getTentative() ||
|
||||
!mPermsWorldControl->getTentative())
|
||||
{
|
||||
fill_me_in[LLMediaEntry::PERMS_CONTROL_KEY] = control;
|
||||
}
|
||||
if (include_tentative ||
|
||||
!mPermsOwnerInteract->getTentative() ||
|
||||
!mPermsGroupInteract->getTentative() ||
|
||||
!mPermsWorldInteract->getTentative())
|
||||
{
|
||||
fill_me_in[LLMediaEntry::PERMS_INTERACT_KEY] = interact;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsPermissions::postApply()
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
||||
|
||||
73
indra/newview/llpanelmediasettingspermissions.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* @file llpanelmediasettingspermissions.h
|
||||
* @brief LLPanelMediaSettingsPermissions class definition
|
||||
*
|
||||
* note that "permissions" tab is really "Controls" tab - refs to 'perms' and
|
||||
* 'permissions' not changed to 'controls' since we don't want to change
|
||||
* shared files in server code and keeping everything the same seemed best.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&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_LLPANELMEDIAMEDIASETTINGSPERMISSIONS_H
|
||||
#define LL_LLPANELMEDIAMEDIASETTINGSPERMISSIONS_H
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "lluuid.h"
|
||||
|
||||
class LLComboBox;
|
||||
class LLCheckBoxCtrl;
|
||||
class LLNameBox;
|
||||
|
||||
class LLPanelMediaSettingsPermissions : public LLPanel
|
||||
{
|
||||
public:
|
||||
LLPanelMediaSettingsPermissions();
|
||||
~LLPanelMediaSettingsPermissions();
|
||||
|
||||
BOOL postBuild();
|
||||
virtual void draw();
|
||||
|
||||
// XXX TODO: put these into a common parent class?
|
||||
// Hook that the floater calls before applying changes from the panel
|
||||
void preApply();
|
||||
// Function that asks the panel to fill in values associated with the panel
|
||||
// 'include_tentative' means fill in tentative values as well, otherwise do not
|
||||
void getValues(LLSD &fill_me_in, bool include_tentative = true);
|
||||
// Hook that the floater calls after applying changes to the panel
|
||||
void postApply();
|
||||
|
||||
static void initValues( void* userdata, const LLSD& media_settings, bool editable );
|
||||
static void clearValues( void* userdata, bool editable);
|
||||
|
||||
private:
|
||||
LLComboBox* mControls;
|
||||
LLCheckBoxCtrl* mPermsOwnerInteract;
|
||||
LLCheckBoxCtrl* mPermsOwnerControl;
|
||||
LLNameBox* mPermsGroupName;
|
||||
LLCheckBoxCtrl* mPermsGroupInteract;
|
||||
LLCheckBoxCtrl* mPermsGroupControl;
|
||||
LLCheckBoxCtrl* mPermsWorldInteract;
|
||||
LLCheckBoxCtrl* mPermsWorldControl;
|
||||
};
|
||||
|
||||
#endif // LL_LLPANELMEDIAMEDIASETTINGSPERMISSIONS_H
|
||||
366
indra/newview/llpanelmediasettingssecurity.cpp
Normal file
@@ -0,0 +1,366 @@
|
||||
/**
|
||||
* @file llpanelmediasettingssecurity.cpp
|
||||
* @brief LLPanelMediaSettingsSecurity class implementation
|
||||
*
|
||||
* $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 "llpanelmediasettingssecurity.h"
|
||||
|
||||
#include "llpanelcontents.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llwindow.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llsdutil.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llmediaentry.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llfloaterwhitelistentry.h"
|
||||
#include "llfloatermediasettings.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
LLPanelMediaSettingsSecurity::LLPanelMediaSettingsSecurity() :
|
||||
mParent( NULL )
|
||||
{
|
||||
mCommitCallbackRegistrar.add("Media.whitelistAdd", boost::bind(&LLPanelMediaSettingsSecurity::onBtnAdd, this));
|
||||
mCommitCallbackRegistrar.add("Media.whitelistDelete", boost::bind(&LLPanelMediaSettingsSecurity::onBtnDel, this));
|
||||
|
||||
// build dialog from XML
|
||||
//buildFromFile( "panel_media_settings_security.xml");
|
||||
LLUICtrlFactory::getInstance()->buildPanel(this,"panel_media_settings_security.xml");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
BOOL LLPanelMediaSettingsSecurity::postBuild()
|
||||
{
|
||||
mEnableWhiteList = getChild< LLCheckBoxCtrl >( LLMediaEntry::WHITELIST_ENABLE_KEY );
|
||||
mWhiteListList = getChild< LLScrollListCtrl >( LLMediaEntry::WHITELIST_KEY );
|
||||
mHomeUrlFailsWhiteListText = getChild<LLTextBox>( "home_url_fails_whitelist" );
|
||||
|
||||
setDefaultBtn("whitelist_add");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// virtual
|
||||
LLPanelMediaSettingsSecurity::~LLPanelMediaSettingsSecurity()
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsSecurity::draw()
|
||||
{
|
||||
// housekeeping
|
||||
LLPanel::draw();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLPanelMediaSettingsSecurity::initValues( void* userdata, const LLSD& media_settings , bool editable)
|
||||
{
|
||||
LLPanelMediaSettingsSecurity *self =(LLPanelMediaSettingsSecurity *)userdata;
|
||||
std::string base_key( "" );
|
||||
std::string tentative_key( "" );
|
||||
|
||||
struct
|
||||
{
|
||||
std::string key_name;
|
||||
LLUICtrl* ctrl_ptr;
|
||||
std::string ctrl_type;
|
||||
|
||||
} data_set [] =
|
||||
{
|
||||
{ LLMediaEntry::WHITELIST_ENABLE_KEY, self->mEnableWhiteList, "LLCheckBoxCtrl" },
|
||||
{ LLMediaEntry::WHITELIST_KEY, self->mWhiteListList, "LLScrollListCtrl" },
|
||||
{ "", NULL , "" }
|
||||
};
|
||||
|
||||
for( int i = 0; data_set[ i ].key_name.length() > 0; ++i )
|
||||
{
|
||||
base_key = std::string( data_set[ i ].key_name );
|
||||
tentative_key = base_key + std::string( LLPanelContents::TENTATIVE_SUFFIX );
|
||||
|
||||
bool enabled_overridden = false;
|
||||
|
||||
// TODO: CP - I bet there is a better way to do this using Boost
|
||||
if ( media_settings[ base_key ].isDefined() )
|
||||
{
|
||||
if ( data_set[ i ].ctrl_type == "LLCheckBoxCtrl" )
|
||||
{
|
||||
static_cast< LLCheckBoxCtrl* >( data_set[ i ].ctrl_ptr )->
|
||||
setValue( media_settings[ base_key ].asBoolean() );
|
||||
}
|
||||
else
|
||||
if ( data_set[ i ].ctrl_type == "LLScrollListCtrl" )
|
||||
{
|
||||
// get control
|
||||
LLScrollListCtrl* list = static_cast< LLScrollListCtrl* >( data_set[ i ].ctrl_ptr );
|
||||
list->deleteAllItems();
|
||||
|
||||
// points to list of white list URLs
|
||||
LLSD url_list = media_settings[ base_key ];
|
||||
|
||||
// better be the whitelist
|
||||
llassert(data_set[ i ].ctrl_ptr == self->mWhiteListList);
|
||||
|
||||
// If tentative, don't add entries
|
||||
if (media_settings[ tentative_key ].asBoolean())
|
||||
{
|
||||
self->mWhiteListList->setEnabled(false);
|
||||
enabled_overridden = true;
|
||||
}
|
||||
else {
|
||||
// iterate over them and add to scroll list
|
||||
LLSD::array_iterator iter = url_list.beginArray();
|
||||
while( iter != url_list.endArray() )
|
||||
{
|
||||
std::string entry = *iter;
|
||||
self->addWhiteListEntry( entry );
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
};
|
||||
if ( ! enabled_overridden) data_set[ i ].ctrl_ptr->setEnabled(editable);
|
||||
data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() );
|
||||
};
|
||||
};
|
||||
|
||||
// initial update - hides/shows status messages etc.
|
||||
self->updateWhitelistEnableStatus();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLPanelMediaSettingsSecurity::clearValues( void* userdata , bool editable)
|
||||
{
|
||||
LLPanelMediaSettingsSecurity *self =(LLPanelMediaSettingsSecurity *)userdata;
|
||||
self->mEnableWhiteList->clear();
|
||||
self->mWhiteListList->deleteAllItems();
|
||||
self->mEnableWhiteList->setEnabled(editable);
|
||||
self->mWhiteListList->setEnabled(editable);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsSecurity::preApply()
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsSecurity::getValues( LLSD &fill_me_in, bool include_tentative )
|
||||
{
|
||||
if (include_tentative || !mEnableWhiteList->getTentative())
|
||||
fill_me_in[LLMediaEntry::WHITELIST_ENABLE_KEY] = (LLSD::Boolean)mEnableWhiteList->getValue();
|
||||
|
||||
if (include_tentative || !mWhiteListList->getTentative())
|
||||
{
|
||||
// iterate over white list and extract items
|
||||
std::vector< LLScrollListItem* > whitelist_items = mWhiteListList->getAllData();
|
||||
std::vector< LLScrollListItem* >::iterator iter = whitelist_items.begin();
|
||||
|
||||
// *NOTE: need actually set the key to be an emptyArray(), or the merge
|
||||
// we do with this LLSD will think there's nothing to change.
|
||||
fill_me_in[LLMediaEntry::WHITELIST_KEY] = LLSD::emptyArray();
|
||||
while( iter != whitelist_items.end() )
|
||||
{
|
||||
LLScrollListCell* cell = (*iter)->getColumn( ENTRY_COLUMN );
|
||||
std::string whitelist_url = cell->getValue().asString();
|
||||
|
||||
fill_me_in[ LLMediaEntry::WHITELIST_KEY ].append( whitelist_url );
|
||||
++iter;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsSecurity::postApply()
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Try to make a valid URL if a fragment (
|
||||
// white list list box widget and build a list to test against. Can also
|
||||
const std::string LLPanelMediaSettingsSecurity::makeValidUrl( const std::string& src_url )
|
||||
{
|
||||
// use LLURI to determine if we have a valid scheme
|
||||
LLURI candidate_url( src_url );
|
||||
if ( candidate_url.scheme().empty() )
|
||||
{
|
||||
// build a URL comprised of default scheme and the original fragment
|
||||
const std::string default_scheme( "http://" );
|
||||
return default_scheme + src_url;
|
||||
};
|
||||
|
||||
// we *could* test the "default scheme" + "original fragment" URL again
|
||||
// using LLURI to see if it's valid but I think the outcome is the same
|
||||
// in either case - our only option is to return the original URL
|
||||
|
||||
// we *think* the original url passed in was valid
|
||||
return src_url;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// wrapper for testing a URL against the whitelist. We grab entries from
|
||||
// white list list box widget and build a list to test against.
|
||||
bool LLPanelMediaSettingsSecurity::urlPassesWhiteList( const std::string& test_url )
|
||||
{
|
||||
// If the whitlelist list is tentative, it means we have multiple settings.
|
||||
// In that case, we have no choice but to return true
|
||||
if ( mWhiteListList->getTentative() ) return true;
|
||||
|
||||
// the checkUrlAgainstWhitelist(..) function works on a vector
|
||||
// of strings for the white list entries - in this panel, the white list
|
||||
// is stored in the widgets themselves so we need to build something compatible.
|
||||
std::vector< std::string > whitelist_strings;
|
||||
whitelist_strings.clear(); // may not be required - I forget what the spec says.
|
||||
|
||||
// step through whitelist widget entries and grab them as strings
|
||||
std::vector< LLScrollListItem* > whitelist_items = mWhiteListList->getAllData();
|
||||
std::vector< LLScrollListItem* >::iterator iter = whitelist_items.begin();
|
||||
while( iter != whitelist_items.end() )
|
||||
{
|
||||
LLScrollListCell* cell = (*iter)->getColumn( ENTRY_COLUMN );
|
||||
std::string whitelist_url = cell->getValue().asString();
|
||||
|
||||
whitelist_strings.push_back( whitelist_url );
|
||||
|
||||
++iter;
|
||||
};
|
||||
|
||||
// possible the URL is just a fragment so we validize it
|
||||
const std::string valid_url = makeValidUrl( test_url );
|
||||
|
||||
// indicate if the URL passes whitelist
|
||||
return LLMediaEntry::checkUrlAgainstWhitelist( valid_url, whitelist_strings );
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsSecurity::updateWhitelistEnableStatus()
|
||||
{
|
||||
// get the value for home URL and make it a valid URL
|
||||
const std::string valid_url = makeValidUrl( mParent->getHomeUrl() );
|
||||
|
||||
// now check to see if the home url passes the whitelist in its entirity
|
||||
if ( urlPassesWhiteList( valid_url ) )
|
||||
{
|
||||
mEnableWhiteList->setEnabled( true );
|
||||
mHomeUrlFailsWhiteListText->setVisible( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
mEnableWhiteList->set( false );
|
||||
mEnableWhiteList->setEnabled( false );
|
||||
mHomeUrlFailsWhiteListText->setVisible( true );
|
||||
};
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Add an entry to the whitelist scrollbox and indicate if the current
|
||||
// home URL passes this entry or not using an icon
|
||||
void LLPanelMediaSettingsSecurity::addWhiteListEntry( const std::string& entry )
|
||||
{
|
||||
// grab the home url
|
||||
std::string home_url( "" );
|
||||
if ( mParent )
|
||||
home_url = mParent->getHomeUrl();
|
||||
|
||||
// try to make a valid URL based on what the user entered - missing scheme for example
|
||||
const std::string valid_url = makeValidUrl( home_url );
|
||||
|
||||
// check the home url against this single whitelist entry
|
||||
std::vector< std::string > whitelist_entries;
|
||||
whitelist_entries.push_back( entry );
|
||||
bool home_url_passes_entry = LLMediaEntry::checkUrlAgainstWhitelist( valid_url, whitelist_entries );
|
||||
|
||||
// build an icon cell based on whether or not the home url pases it or not
|
||||
LLSD row;
|
||||
if ( home_url_passes_entry || home_url.empty() )
|
||||
{
|
||||
row[ "columns" ][ ICON_COLUMN ][ "type" ] = "icon";
|
||||
row[ "columns" ][ ICON_COLUMN ][ "value" ] = "";
|
||||
row[ "columns" ][ ICON_COLUMN ][ "width" ] = 20;
|
||||
}
|
||||
else
|
||||
{
|
||||
row[ "columns" ][ ICON_COLUMN ][ "type" ] = "icon";
|
||||
row[ "columns" ][ ICON_COLUMN ][ "value" ] = "Parcel_Exp_Color.png";
|
||||
row[ "columns" ][ ICON_COLUMN ][ "width" ] = 20;
|
||||
};
|
||||
|
||||
// always add in the entry itself
|
||||
row[ "columns" ][ ENTRY_COLUMN ][ "type" ] = "text";
|
||||
row[ "columns" ][ ENTRY_COLUMN ][ "value" ] = entry;
|
||||
|
||||
// add to the white list scroll box
|
||||
mWhiteListList->addElement( row );
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLPanelMediaSettingsSecurity::onBtnAdd( void* userdata )
|
||||
{
|
||||
|
||||
LLPanelMediaSettingsSecurity* self = (LLPanelMediaSettingsSecurity*)userdata;
|
||||
LLFloaterWhiteListEntry::getInstance()->open();
|
||||
|
||||
for(LLView* parent = self->getParent(); parent !=NULL; parent = parent->getParent())
|
||||
{
|
||||
if(dynamic_cast<LLFloater*>(parent))
|
||||
{
|
||||
LLFloaterWhiteListEntry::getInstance()->centerWithin(parent->getRect());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// static
|
||||
void LLPanelMediaSettingsSecurity::onBtnDel( void* userdata )
|
||||
{
|
||||
LLPanelMediaSettingsSecurity *self =(LLPanelMediaSettingsSecurity *)userdata;
|
||||
|
||||
self->mWhiteListList->deleteSelectedItems();
|
||||
|
||||
// contents of whitelist changed so recheck it against home url
|
||||
self->updateWhitelistEnableStatus();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void LLPanelMediaSettingsSecurity::setParent( LLFloaterMediaSettings* parent )
|
||||
{
|
||||
mParent = parent;
|
||||
};
|
||||
82
indra/newview/llpanelmediasettingssecurity.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* @file llpanelmediasettingssecurity.h
|
||||
* @brief LLPanelMediaSettingsSecurity class definition
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&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_LLPANELMEDIAMEDIASETTINGSSECURITY_H
|
||||
#define LL_LLPANELMEDIAMEDIASETTINGSSECURITY_H
|
||||
|
||||
#include "llpanel.h"
|
||||
|
||||
class LLCheckBoxCtrl;
|
||||
class LLScrollListCtrl;
|
||||
class LLTextBox;
|
||||
class LLFloaterMediaSettings;
|
||||
|
||||
class LLPanelMediaSettingsSecurity : public LLPanel
|
||||
{
|
||||
public:
|
||||
LLPanelMediaSettingsSecurity();
|
||||
~LLPanelMediaSettingsSecurity();
|
||||
|
||||
BOOL postBuild();
|
||||
virtual void draw();
|
||||
|
||||
// XXX TODO: put these into a common parent class?
|
||||
// Hook that the floater calls before applying changes from the panel
|
||||
void preApply();
|
||||
// Function that asks the panel to fill in values associated with the panel
|
||||
// 'include_tentative' means fill in tentative values as well, otherwise do not
|
||||
void getValues(LLSD &fill_me_in, bool include_tentative = true);
|
||||
// Hook that the floater calls after applying changes to the panel
|
||||
void postApply();
|
||||
|
||||
static void initValues( void* userdata, const LLSD& media_settings, bool editable);
|
||||
static void clearValues( void* userdata, bool editable);
|
||||
void addWhiteListEntry( const std::string& url );
|
||||
void setParent( LLFloaterMediaSettings* parent );
|
||||
bool urlPassesWhiteList( const std::string& test_url );
|
||||
const std::string makeValidUrl( const std::string& src_url );
|
||||
|
||||
void updateWhitelistEnableStatus();
|
||||
|
||||
protected:
|
||||
LLFloaterMediaSettings* mParent;
|
||||
|
||||
private:
|
||||
enum ColumnIndex
|
||||
{
|
||||
ICON_COLUMN = 0,
|
||||
ENTRY_COLUMN = 1,
|
||||
};
|
||||
|
||||
LLCheckBoxCtrl* mEnableWhiteList;
|
||||
LLScrollListCtrl* mWhiteListList;
|
||||
LLTextBox* mHomeUrlFailsWhiteListText;
|
||||
|
||||
static void onBtnAdd(void*);
|
||||
static void onBtnDel(void*);
|
||||
};
|
||||
|
||||
#endif // LL_LLPANELMEDIAMEDIASETTINGSSECURITY_H
|
||||
1314
indra/newview/llpanelnearbymedia.cpp
Normal file
198
indra/newview/llpanelnearbymedia.h
Normal file
@@ -0,0 +1,198 @@
|
||||
/**
|
||||
* @file llpanelnearbymedia.h
|
||||
* @brief Management interface for muting and controlling nearby media
|
||||
*
|
||||
* $LicenseInfo:firstyear=2005&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_LLPANELNEARBYMEDIA_H
|
||||
#define LL_LLPANELNEARBYMEDIA_H
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "llfloater.h"
|
||||
#include "llsingleton.h"
|
||||
|
||||
class LLPanelNearbyMedia;
|
||||
class LLButton;
|
||||
class LLScrollListCtrl;
|
||||
class LLSlider;
|
||||
class LLSliderCtrl;
|
||||
class LLCheckBoxCtrl;
|
||||
class LLTextBox;
|
||||
class LLComboBox;
|
||||
class LLViewerMediaImpl;
|
||||
|
||||
class LLPanelNearByMedia : public LLPanel
|
||||
{
|
||||
public:
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
|
||||
/*virtual*/ void onTopLost();
|
||||
/*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
|
||||
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
|
||||
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
|
||||
|
||||
// this is part of the nearby media *dialog* so we can track whether
|
||||
// the user *implicitly* wants audio on or off via their *explicit*
|
||||
// interaction with our buttons.
|
||||
bool getParcelAudioAutoStart();
|
||||
|
||||
// callback for when the auto play media preference changes
|
||||
// to update mParcelAudioAutoStart
|
||||
void handleMediaAutoPlayChanged(const LLSD& newvalue);
|
||||
|
||||
LLPanelNearByMedia(bool standalone_panel = true);
|
||||
virtual ~LLPanelNearByMedia();
|
||||
|
||||
private:
|
||||
|
||||
enum ColumnIndex {
|
||||
CHECKBOX_COLUMN = 0,
|
||||
PROXIMITY_COLUMN = 1,
|
||||
VISIBILITY_COLUMN = 2,
|
||||
CLASS_COLUMN = 3,
|
||||
NAME_COLUMN = 4,
|
||||
DEBUG_COLUMN = 5
|
||||
};
|
||||
|
||||
// Media "class" enumeration
|
||||
enum MediaClass {
|
||||
MEDIA_CLASS_ALL = 0,
|
||||
MEDIA_CLASS_FOCUSED = 1,
|
||||
MEDIA_CLASS_WITHIN_PARCEL = 2,
|
||||
MEDIA_CLASS_OUTSIDE_PARCEL = 3,
|
||||
MEDIA_CLASS_ON_OTHERS = 4
|
||||
};
|
||||
|
||||
// Add/remove an LLViewerMediaImpl to/from the list
|
||||
LLScrollListItem* addListItem(const LLUUID &id);
|
||||
void updateListItem(LLScrollListItem* item, LLViewerMediaImpl* impl);
|
||||
void updateListItem(LLScrollListItem* item,
|
||||
const std::string &item_name,
|
||||
const std::string &item_tooltip,
|
||||
S32 proximity,
|
||||
bool is_disabled,
|
||||
bool has_media,
|
||||
bool is_time_based_and_playing,
|
||||
MediaClass media_class,
|
||||
const std::string &debug_str);
|
||||
void removeListItem(const LLUUID &id);
|
||||
|
||||
// Refresh the list in the UI
|
||||
void refreshList();
|
||||
|
||||
void refreshParcelItems();
|
||||
|
||||
// UI Callbacks
|
||||
void onClickEnableAll();
|
||||
void onClickDisableAll();
|
||||
void onClickEnableParcelMedia();
|
||||
void onClickDisableParcelMedia();
|
||||
void onClickMuteParcelMedia();
|
||||
void onParcelMediaVolumeSlider();
|
||||
void onClickParcelMediaPlay();
|
||||
void onClickParcelMediaStop();
|
||||
void onClickParcelMediaPause();
|
||||
void onClickParcelAudioPlay();
|
||||
void onClickParcelAudioStop();
|
||||
void onClickParcelAudioPause();
|
||||
void onCheckAutoPlay();
|
||||
void onAdvancedButtonClick();
|
||||
void onMoreLess();
|
||||
|
||||
void onCheckItem(LLUICtrl* ctrl, const LLUUID &row_id);
|
||||
|
||||
static void onZoomMedia(void* user_data);
|
||||
|
||||
private:
|
||||
bool setDisabled(const LLUUID &id, bool disabled);
|
||||
|
||||
static void getNameAndUrlHelper(LLViewerMediaImpl* impl, std::string& name, std::string & url, const std::string &defaultName);
|
||||
|
||||
void updateColumns();
|
||||
|
||||
bool shouldShow(LLViewerMediaImpl* impl);
|
||||
|
||||
void showBasicControls(bool playing, bool include_zoom, bool is_zoomed, bool muted, F32 volume);
|
||||
void showTimeBasedControls(bool playing, bool include_zoom, bool is_zoomed, bool muted, F32 volume);
|
||||
void showDisabledControls();
|
||||
void updateControls();
|
||||
|
||||
void onClickSelectedMediaStop();
|
||||
void onClickSelectedMediaPlay();
|
||||
void onClickSelectedMediaPause();
|
||||
void onClickSelectedMediaMute();
|
||||
void onCommitSelectedMediaVolume();
|
||||
void onClickSelectedMediaZoom();
|
||||
void onClickSelectedMediaUnzoom();
|
||||
|
||||
LLUICtrl* mNearbyMediaPanel;
|
||||
LLScrollListCtrl* mMediaList;
|
||||
LLUICtrl* mEnableAllCtrl;
|
||||
LLUICtrl* mDisableAllCtrl;
|
||||
LLComboBox* mShowCtrl;
|
||||
|
||||
// Dynamic (selection-dependent) controls
|
||||
LLUICtrl* mStopCtrl;
|
||||
LLUICtrl* mPlayCtrl;
|
||||
LLUICtrl* mPauseCtrl;
|
||||
LLUICtrl* mMuteCtrl;
|
||||
LLUICtrl* mVolumeSliderCtrl;
|
||||
LLUICtrl* mZoomCtrl;
|
||||
LLUICtrl* mUnzoomCtrl;
|
||||
LLSlider* mVolumeSlider;
|
||||
LLButton* mMuteBtn;
|
||||
|
||||
bool mAllMediaDisabled;
|
||||
bool mDebugInfoVisible;
|
||||
bool mParcelAudioAutoStart;
|
||||
std::string mEmptyNameString;
|
||||
std::string mPlayingString;
|
||||
std::string mParcelMediaName;
|
||||
std::string mParcelAudioName;
|
||||
|
||||
LLRect mMoreRect;
|
||||
LLRect mLessRect;
|
||||
LLFrameTimer mHoverTimer;
|
||||
LLScrollListItem* mParcelMediaItem;
|
||||
LLScrollListItem* mParcelAudioItem;
|
||||
|
||||
bool mStandalonePanel;
|
||||
};
|
||||
|
||||
class LLFloaterNearbyMedia : public LLFloater, public LLSingleton<LLFloaterNearbyMedia>
|
||||
{
|
||||
public:
|
||||
LLFloaterNearbyMedia();
|
||||
|
||||
static void updateClass();
|
||||
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
/*virtual*/ void onOpen();
|
||||
|
||||
virtual void handleReshape(const LLRect& new_rect, bool by_user);
|
||||
};
|
||||
|
||||
#endif // LL_LLPANELNEARBYMEDIA_H
|
||||
@@ -730,7 +730,7 @@ void LLPanelPrimMediaControls::draw()
|
||||
}
|
||||
}
|
||||
|
||||
F32 alpha = 1.f;
|
||||
F32 alpha = getDrawContext().mAlpha;
|
||||
if(mHideImmediately)
|
||||
{
|
||||
//hide this panel
|
||||
@@ -781,7 +781,7 @@ void LLPanelPrimMediaControls::draw()
|
||||
}
|
||||
|
||||
{
|
||||
//LLViewDrawContext context(alpha);
|
||||
LLViewDrawContext context(alpha);
|
||||
LLPanel::draw();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
#ifndef LL_PARTICIPANTLIST_H
|
||||
#define LL_PARTICIPANTLIST_H
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "lllayoutstack.h"
|
||||
|
||||
class LLSpeakerMgr;
|
||||
class LLScrollListCtrl;
|
||||
class LLUICtrl;
|
||||
|
||||
class LLParticipantList : public LLPanel
|
||||
class LLParticipantList : public LLLayoutPanel
|
||||
{
|
||||
LOG_CLASS(LLParticipantList);
|
||||
public:
|
||||
|
||||
@@ -845,5 +845,52 @@ template <typename T> bool LLObjectSelection::getSelectedTEValue(LLSelectedTEGet
|
||||
return identical;
|
||||
}
|
||||
|
||||
// Templates
|
||||
//-----------------------------------------------------------------------------
|
||||
// isMultipleTEValue iterate through all TEs and test for uniqueness
|
||||
// with certain return value ignored when performing the test.
|
||||
// e.g. when testing if the selection has a unique non-empty homeurl :
|
||||
// you can set ignore_value = "" and it will only compare among the non-empty
|
||||
// homeUrls and ignore the empty ones.
|
||||
//-----------------------------------------------------------------------------
|
||||
template <typename T> bool LLObjectSelection::isMultipleTEValue(LLSelectedTEGetFunctor<T>* func, const T& ignore_value)
|
||||
{
|
||||
bool have_first = false;
|
||||
T selected_value = T();
|
||||
|
||||
// Now iterate through all TEs to test for sameness
|
||||
bool unique = TRUE;
|
||||
for (iterator iter = begin(); iter != end(); iter++)
|
||||
{
|
||||
LLSelectNode* node = *iter;
|
||||
LLViewerObject* object = node->getObject();
|
||||
for (S32 te = 0; te < object->getNumTEs(); ++te)
|
||||
{
|
||||
if (!node->isTESelected(te))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
T value = func->get(object, te);
|
||||
if(value == ignore_value)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!have_first)
|
||||
{
|
||||
have_first = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value !=selected_value )
|
||||
{
|
||||
unique = false;
|
||||
return !unique;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return !unique;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -53,11 +53,14 @@ const char* LLSLURL::SLURL_REGION_PATH = "region";
|
||||
const char* LLSLURL::SIM_LOCATION_HOME = "home";
|
||||
const char* LLSLURL::SIM_LOCATION_LAST = "last";
|
||||
|
||||
|
||||
const std::string MAIN_GRID_SLURL_BASE = "http://maps.secondlife.com/secondlife/";
|
||||
const std::string SYSTEM_GRID_APP_SLURL_BASE = "secondlife:///app";
|
||||
#define MAINGRID "util.agni.lindenlab.com"
|
||||
|
||||
const char* SYSTEM_GRID_SLURL_BASE = "secondlife://%s/secondlife/";
|
||||
const char* DEFAULT_SLURL_BASE = "https://%s/region/";
|
||||
const char* DEFAULT_APP_SLURL_BASE = "x-grid-location-info://%s/app";
|
||||
|
||||
#define MAINGRID "secondlife"
|
||||
// resolve a simstring from a slurl
|
||||
LLSLURL::LLSLURL(const std::string& slurl)
|
||||
{
|
||||
@@ -87,7 +90,19 @@ LLSLURL::LLSLURL(const std::string& slurl)
|
||||
// where the user can type in <regionname>/<x>/<y>/<z>
|
||||
//std::string fixed_slurl = LLGridManager::getInstance()->getSLURLBase();
|
||||
//Singu TODO: Implement LLHippoGridMgr::getSLURLBase some day. For now it's hardcoded.
|
||||
std::string fixed_slurl = MAIN_GRID_SLURL_BASE;
|
||||
std::string fixed_slurl;
|
||||
|
||||
if(gHippoGridManager->getCurrentGrid()->isSecondLife())
|
||||
{
|
||||
if(gHippoGridManager->getCurrentGrid()->isInProductionGrid())
|
||||
fixed_slurl = MAIN_GRID_SLURL_BASE;
|
||||
else
|
||||
fixed_slurl = llformat(SYSTEM_GRID_SLURL_BASE, gHippoGridManager->getCurrentGridNick().c_str());
|
||||
}
|
||||
else
|
||||
fixed_slurl = llformat(DEFAULT_SLURL_BASE, gHippoGridManager->getCurrentGridNick().c_str());
|
||||
|
||||
//std::string fixed_slurl = MAIN_GRID_SLURL_BASE;
|
||||
|
||||
// the slurl that was passed in might have a prepended /, or not. So,
|
||||
// we strip off the prepended '/' so we don't end up with http://slurl.com/secondlife/<region>/<x>/<y>/<z>
|
||||
@@ -147,7 +162,15 @@ LLSLURL::LLSLURL(const std::string& slurl)
|
||||
// so parse the grid name to derive the grid ID
|
||||
if (!slurl_uri.hostName().empty())
|
||||
{
|
||||
mGrid = gHippoGridManager->getGrid(slurl_uri.hostName())->getGridNick();
|
||||
if(slurl_uri.hostName() == "util.agni.lindenlab.com")
|
||||
mGrid = MAINGRID;
|
||||
else if(slurl_uri.hostName() == "util.aditi.lindenlab.com")
|
||||
mGrid = "secondlife_beta";
|
||||
else
|
||||
{
|
||||
HippoGridInfo* grid = gHippoGridManager->getGrid(slurl_uri.hostName());
|
||||
mGrid = grid ? grid->getGridNick() : gHippoGridManager->getDefaultGridNick();
|
||||
}
|
||||
}
|
||||
else if(path_array[0].asString() == LLSLURL::SLURL_SECONDLIFE_PATH)
|
||||
{
|
||||
@@ -353,8 +376,8 @@ LLSLURL::LLSLURL(const std::string& grid,
|
||||
const std::string& region,
|
||||
const LLVector3d& global_position)
|
||||
{
|
||||
HippoGridInfo* target_grid = gHippoGridManager->getGrid(grid);
|
||||
*this = LLSLURL((target_grid ? target_grid->getGridNick() : ""),
|
||||
HippoGridInfo* gridp = gHippoGridManager->getGrid(grid);
|
||||
*this = LLSLURL(gridp ? gridp->getGridNick() : gHippoGridManager->getDefaultGridNick(),
|
||||
region, LLVector3(global_position.mdV[VX],
|
||||
global_position.mdV[VY],
|
||||
global_position.mdV[VZ]));
|
||||
@@ -394,7 +417,17 @@ std::string LLSLURL::getSLURLString() const
|
||||
S32 z = llround( (F32)mPosition[VZ] );
|
||||
//return LLGridManager::getInstance()->getSLURLBase(mGrid) +
|
||||
//Singu TODO: Implement LLHippoGridMgr::getSLURLBase some day. For now it's hardcoded.
|
||||
return MAIN_GRID_SLURL_BASE +
|
||||
std::string fixed_slurl;
|
||||
if(gHippoGridManager->getCurrentGrid()->isSecondLife())
|
||||
{
|
||||
if(gHippoGridManager->getCurrentGrid()->isInProductionGrid())
|
||||
fixed_slurl = MAIN_GRID_SLURL_BASE;
|
||||
else
|
||||
fixed_slurl = llformat(SYSTEM_GRID_SLURL_BASE, gHippoGridManager->getCurrentGridNick().c_str());
|
||||
}
|
||||
else
|
||||
fixed_slurl = llformat(DEFAULT_SLURL_BASE, gHippoGridManager->getCurrentGridNick().c_str());
|
||||
return fixed_slurl +
|
||||
LLURI::escape(mRegion) + llformat("/%d/%d/%d",x,y,z);
|
||||
}
|
||||
case APP:
|
||||
@@ -402,7 +435,10 @@ std::string LLSLURL::getSLURLString() const
|
||||
std::ostringstream app_url;
|
||||
//app_url << LLGridManager::getInstance()->getAppSLURLBase() << "/" << mAppCmd;
|
||||
//Singu TODO: Implement LLHippoGridMgr::getAppSLURLBase some day. For now it's hardcoded.
|
||||
app_url << SYSTEM_GRID_APP_SLURL_BASE << "/" << mAppCmd;
|
||||
if(gHippoGridManager->getCurrentGrid()->isSecondLife())
|
||||
app_url << SYSTEM_GRID_APP_SLURL_BASE << "/" << mAppCmd;
|
||||
else
|
||||
app_url << llformat(DEFAULT_APP_SLURL_BASE, gHippoGridManager->getCurrentGridNick().c_str()) << "/" << mAppCmd;
|
||||
for(LLSD::array_const_iterator i = mAppPath.beginArray();
|
||||
i != mAppPath.endArray();
|
||||
i++)
|
||||
|
||||
@@ -1675,8 +1675,6 @@ bool idle_startup()
|
||||
// object is created. I think this must be done after setting the region. JC
|
||||
gAgent.setPositionAgent(agent_start_position_region);
|
||||
|
||||
wlfPanel_AdvSettings::fixPanel();
|
||||
|
||||
display_startup();
|
||||
LLStartUp::setStartupState( STATE_MULTIMEDIA_INIT );
|
||||
return FALSE;
|
||||
@@ -3935,11 +3933,11 @@ bool process_login_success_response(std::string& password)
|
||||
std::string history_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "saved_logins_sg2.xml");
|
||||
|
||||
LLSavedLogins history_data = LLSavedLogins::loadFile(history_file);
|
||||
std::string grid_nick = gHippoGridManager->getConnectedGrid()->getGridName();
|
||||
history_data.deleteEntry(firstname, lastname, grid_nick);
|
||||
std::string grid_name = gHippoGridManager->getConnectedGrid()->getGridName();
|
||||
history_data.deleteEntry(firstname, lastname, grid_name);
|
||||
if (gSavedSettings.getBOOL("RememberLogin"))
|
||||
{
|
||||
LLSavedLoginEntry login_entry(firstname, lastname, password, grid_nick);
|
||||
LLSavedLoginEntry login_entry(firstname, lastname, password, grid_name);
|
||||
history_data.addEntry(login_entry);
|
||||
}
|
||||
else
|
||||
@@ -4224,8 +4222,6 @@ bool process_login_success_response(std::string& password)
|
||||
LLViewerMedia::openIDSetup(openid_url, openid_token);
|
||||
}
|
||||
|
||||
gIMMgr->loadIgnoreGroup();
|
||||
|
||||
bool success = false;
|
||||
// JC: gesture loading done below, when we have an asset system
|
||||
// in place. Don't delete/clear user_credentials until then.
|
||||
|
||||
@@ -1173,9 +1173,6 @@ LLXMLNodePtr LLTextureCtrl::getXML(bool save_children) const
|
||||
|
||||
LLView* LLTextureCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
||||
{
|
||||
std::string name("texture_picker");
|
||||
node->getAttributeString("name", name);
|
||||
|
||||
LLRect rect;
|
||||
createRect(node, rect, parent);
|
||||
|
||||
@@ -1206,7 +1203,7 @@ LLView* LLTextureCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor
|
||||
}
|
||||
|
||||
LLTextureCtrl* texture_picker = new LLTextureCtrl(
|
||||
name,
|
||||
"texture_picker",
|
||||
rect,
|
||||
label,
|
||||
LLUUID(image_id),
|
||||
|
||||
@@ -66,6 +66,21 @@ LLTool::~LLTool()
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLTool::handleAnyMouseClick(S32 x, S32 y, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down)
|
||||
{
|
||||
BOOL result = LLMouseHandler::handleAnyMouseClick(x, y, mask, clicktype, down);
|
||||
|
||||
// This behavior was moved here from LLViewerWindow::handleAnyMouseClick, so it can be selectively overridden by LLTool subclasses.
|
||||
if(down && result)
|
||||
{
|
||||
// This is necessary to force clicks in the world to cause edit
|
||||
// boxes that might have keyboard focus to relinquish it, and hence
|
||||
// cause a commit to update their value. JC
|
||||
gFocusMgr.setKeyboardFocus(NULL);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOL LLTool::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
|
||||
@@ -55,6 +55,7 @@ public:
|
||||
virtual BOOL isView() const { return FALSE; }
|
||||
|
||||
// Virtual functions inherited from LLMouseHandler
|
||||
virtual BOOL handleAnyMouseClick(S32 x, S32 y, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down);
|
||||
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
|
||||
|
||||
@@ -114,7 +114,7 @@ F32 LLToolBar::sInventoryAutoOpenTime = 1.f;
|
||||
//
|
||||
|
||||
LLToolBar::LLToolBar()
|
||||
: LLPanel()
|
||||
: LLLayoutPanel()
|
||||
#if LL_DARWIN
|
||||
, mResizeHandle(NULL)
|
||||
#endif // LL_DARWIN
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#define LL_LLTOOLBAR_H
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "lllayoutstack.h"
|
||||
|
||||
#include "llframetimer.h"
|
||||
|
||||
@@ -47,7 +48,7 @@ extern S32 TOOL_BAR_HEIGHT;
|
||||
class LLFlyoutButton;
|
||||
|
||||
class LLToolBar
|
||||
: public LLPanel
|
||||
: public LLLayoutPanel
|
||||
{
|
||||
public:
|
||||
LLToolBar();
|
||||
|
||||
@@ -92,6 +92,15 @@ LLToolPie::LLToolPie()
|
||||
{
|
||||
}
|
||||
|
||||
BOOL LLToolPie::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktype, BOOL down)
|
||||
{
|
||||
BOOL result = LLMouseHandler::handleAnyMouseClick(x, y, mask, clicktype, down);
|
||||
|
||||
// This override DISABLES the keyboard focus reset that LLTool::handleAnyMouseClick adds.
|
||||
// LLToolPie will do the right thing in its pick callback.
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
@@ -892,7 +901,6 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick)
|
||||
pick.mObjectFace < 0 ||
|
||||
pick.mObjectFace >= objectp->getNumTEs())
|
||||
{
|
||||
LLSelectMgr::getInstance()->deselect();
|
||||
LLViewerMediaFocus::getInstance()->clearFocus();
|
||||
|
||||
return false;
|
||||
@@ -930,7 +938,6 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick)
|
||||
return true;
|
||||
}
|
||||
|
||||
LLSelectMgr::getInstance()->deselect();
|
||||
LLViewerMediaFocus::getInstance()->clearFocus();
|
||||
|
||||
return false;
|
||||
|
||||
@@ -46,6 +46,7 @@ public:
|
||||
LLToolPie( );
|
||||
|
||||
// Virtual functions inherited from LLMouseHandler
|
||||
virtual BOOL handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktype, BOOL down);
|
||||
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
|
||||
|
||||
@@ -216,9 +216,9 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const LLSLURL&
|
||||
{
|
||||
LLSD args;
|
||||
args["SLURL"] = slurl.getLocationString();
|
||||
args["CURRENT_GRID"] = gHippoGridManager->getCurrentGridNick();
|
||||
args["CURRENT_GRID"] = gHippoGridManager->getCurrentGrid()->getGridName();
|
||||
|
||||
std::string grid_label = new_grid ? new_grid->getGridNick() : "";
|
||||
std::string grid_label = new_grid ? new_grid->getGridName() : "";
|
||||
|
||||
if(!grid_label.empty())
|
||||
{
|
||||
@@ -226,7 +226,7 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const LLSLURL&
|
||||
}
|
||||
else
|
||||
{
|
||||
args["GRID"] = slurl.getGrid();
|
||||
args["GRID"] = slurl.getGrid() + " (Unrecognized)";
|
||||
}
|
||||
LLNotificationsUtil::add("CantTeleportToGrid", args);
|
||||
return;
|
||||
@@ -255,8 +255,7 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const LLSLURL&
|
||||
{
|
||||
url_displayp->setSnapshotDisplay(snapshot_id);
|
||||
}
|
||||
LLVector3 pos = slurl.getPosition();
|
||||
std::string locationString = llformat("%s %d, %d, %d", slurl.getRegion().c_str(), local_pos.mV[VX],local_pos.mV[VY],local_pos.mV[VZ]);
|
||||
std::string locationString = llformat("%s %i, %i, %i", slurl.getRegion().c_str(), (S32)local_pos.mV[VX],(S32)local_pos.mV[VY],(S32)local_pos.mV[VZ]);
|
||||
url_displayp->setLocationString(locationString);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "linden_common.h"
|
||||
#include "llpluginclassmedia.h"
|
||||
#include "llpluginclassmediaowner.h"
|
||||
#include "llviewermedia.h"
|
||||
|
||||
#include "llviewermedia_streamingaudio.h"
|
||||
@@ -63,18 +64,18 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url)
|
||||
if (!mMediaPlugin) // lazy-init the underlying media plugin
|
||||
{
|
||||
mMediaPlugin = initializeMedia("audio/mpeg"); // assumes that whatever media implementation supports mp3 also supports vorbis.
|
||||
llinfos << "mMediaPlugin is now " << mMediaPlugin << llendl;
|
||||
llinfos << "streaming audio mMediaPlugin is now " << mMediaPlugin << llendl;
|
||||
}
|
||||
|
||||
if(!mMediaPlugin)
|
||||
return;
|
||||
|
||||
|
||||
if (!url.empty()) {
|
||||
llinfos << "Starting internet stream: " << url << llendl;
|
||||
mURL = url;
|
||||
mMediaPlugin->loadURI ( url );
|
||||
mMediaPlugin->start();
|
||||
llinfos << "Playing....." << llendl;
|
||||
llinfos << "Playing stream..." << llendl;
|
||||
} else {
|
||||
llinfos << "setting stream to NULL"<< llendl;
|
||||
mURL.clear();
|
||||
@@ -84,11 +85,9 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url)
|
||||
|
||||
void LLStreamingAudio_MediaPlugins::stop()
|
||||
{
|
||||
llinfos << "entered LLStreamingAudio_MediaPlugins::stop()" << llendl;
|
||||
|
||||
llinfos << "Stopping internet stream." << llendl;
|
||||
if(mMediaPlugin)
|
||||
{
|
||||
llinfos << "Stopping internet stream: " << mURL << llendl;
|
||||
mMediaPlugin->stop();
|
||||
}
|
||||
|
||||
@@ -102,10 +101,12 @@ void LLStreamingAudio_MediaPlugins::pause(int pause)
|
||||
|
||||
if(pause)
|
||||
{
|
||||
llinfos << "Pausing internet stream." << llendl;
|
||||
mMediaPlugin->pause();
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "Unpausing internet stream." << llendl;
|
||||
mMediaPlugin->start();
|
||||
}
|
||||
}
|
||||
@@ -119,20 +120,21 @@ void LLStreamingAudio_MediaPlugins::update()
|
||||
int LLStreamingAudio_MediaPlugins::isPlaying()
|
||||
{
|
||||
if (!mMediaPlugin)
|
||||
return 0;
|
||||
return 0; // stopped
|
||||
|
||||
// *TODO: can probably do better than this
|
||||
if (mMediaPlugin->isPluginRunning())
|
||||
{
|
||||
return 1; // Active and playing
|
||||
}
|
||||
LLPluginClassMediaOwner::EMediaStatus status =
|
||||
mMediaPlugin->getStatus();
|
||||
|
||||
if (mMediaPlugin->isPluginExited())
|
||||
switch (status)
|
||||
{
|
||||
case LLPluginClassMediaOwner::MEDIA_LOADING: // but not MEDIA_LOADED
|
||||
case LLPluginClassMediaOwner::MEDIA_PLAYING:
|
||||
return 1; // Active and playing
|
||||
case LLPluginClassMediaOwner::MEDIA_PAUSED:
|
||||
return 2; // paused
|
||||
default:
|
||||
return 0; // stopped
|
||||
}
|
||||
|
||||
return 2; // paused
|
||||
}
|
||||
|
||||
void LLStreamingAudio_MediaPlugins::setGain(F32 vol)
|
||||
|
||||
@@ -419,13 +419,13 @@ void LLViewerMediaFocus::update()
|
||||
// We have an object and impl to point at.
|
||||
|
||||
// Make sure the media HUD object exists.
|
||||
/*if(! mMediaControls.get())
|
||||
if(! mMediaControls.get())
|
||||
{
|
||||
LLPanelPrimMediaControls* media_controls = new LLPanelPrimMediaControls();
|
||||
mMediaControls = media_controls->getHandle();
|
||||
gHUDView->addChild(media_controls);
|
||||
}
|
||||
mMediaControls.get()->setMediaFace(viewer_object, face, media_impl, normal);*/
|
||||
mMediaControls.get()->setMediaFace(viewer_object, face, media_impl, normal);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -434,6 +434,7 @@ void LLViewerMediaFocus::update()
|
||||
{
|
||||
mMediaControls.get()->setMediaFace(NULL, 0, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ public:
|
||||
/*virtual*/ S32 setTEGlow(const U8 te, const F32 glow);
|
||||
/*virtual*/ BOOL setMaterial(const U8 material);
|
||||
virtual void setTEImage(const U8 te, LLViewerTexture *imagep); // Not derived from LLPrimitive
|
||||
void changeTEImage(S32 index, LLViewerTexture* new_image) ;
|
||||
virtual void changeTEImage(S32 index, LLViewerTexture* new_image) ;
|
||||
LLViewerTexture *getTEImage(const U8 te) const;
|
||||
|
||||
void fitFaceTexture(const U8 face);
|
||||
|
||||
@@ -35,12 +35,14 @@
|
||||
#include "llviewerparcelmedia.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewermedia.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llparcel.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "lluuid.h"
|
||||
#include "message.h"
|
||||
#include "llviewertexturelist.h" // for texture stats
|
||||
#include "llagent.h"
|
||||
#include "llmimetypes.h"
|
||||
|
||||
const F32 AUTOPLAY_TIME = 5; // how many seconds before we autoplay
|
||||
const F32 AUTOPLAY_SIZE = 24*24; // how big the texture must be (pixel area) before we autoplay
|
||||
@@ -48,6 +50,8 @@ const F32 AUTOPLAY_SPEED = 0.1f; // how slow should the agent be moving t
|
||||
|
||||
LLViewerParcelMediaAutoPlay::LLViewerParcelMediaAutoPlay() :
|
||||
LLEventTimer(1),
|
||||
|
||||
mLastParcelID(-1),
|
||||
mPlayed(FALSE),
|
||||
mTimeInParcel(0)
|
||||
{
|
||||
@@ -81,39 +85,54 @@ void LLViewerParcelMediaAutoPlay::playStarted()
|
||||
BOOL LLViewerParcelMediaAutoPlay::tick()
|
||||
{
|
||||
LLParcel *this_parcel = NULL;
|
||||
LLViewerRegion *this_region = NULL;
|
||||
std::string this_media_url;
|
||||
std::string this_media_type;
|
||||
LLUUID this_media_texture_id;
|
||||
S32 this_parcel_id = 0;
|
||||
LLUUID this_region_id;
|
||||
|
||||
this_region = gAgent.getRegion();
|
||||
|
||||
if (this_region)
|
||||
{
|
||||
this_region_id = this_region->getRegionID();
|
||||
}
|
||||
|
||||
this_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
|
||||
|
||||
if (this_parcel)
|
||||
{
|
||||
this_media_url = std::string(this_parcel->getMediaURL());
|
||||
this_media_url = this_parcel->getMediaURL();
|
||||
|
||||
this_media_type = this_parcel->getMediaType();
|
||||
|
||||
this_media_texture_id = this_parcel->getMediaID();
|
||||
|
||||
this_parcel_id = this_parcel->getLocalID();
|
||||
}
|
||||
|
||||
if (this_parcel_id != mLastParcelID)
|
||||
if (this_parcel_id != mLastParcelID ||
|
||||
this_region_id != mLastRegionID)
|
||||
{
|
||||
// we've entered a new parcel
|
||||
mPlayed = FALSE; // we haven't autoplayed yet
|
||||
mTimeInParcel = 0; // reset our timer
|
||||
mLastParcelID = this_parcel_id;
|
||||
mLastRegionID = this_region_id;
|
||||
}
|
||||
|
||||
mTimeInParcel += mPeriod; // increase mTimeInParcel by the amount of time between ticks
|
||||
mTimeInParcel += mPeriod; // increase mTimeInParcel by the amount of time between ticks
|
||||
|
||||
if ((!mPlayed) && // if we've never played
|
||||
(mTimeInParcel > AUTOPLAY_TIME) && // and if we've been here for so many seconds
|
||||
(this_media_url.size() != 0) && // and if the parcel has media
|
||||
(LLViewerParcelMedia::sMediaImpl.isNull())) // and if the media is not already playing
|
||||
if ((!mPlayed) && // if we've never played
|
||||
(mTimeInParcel > AUTOPLAY_TIME) && // and if we've been here for so many seconds
|
||||
(!this_media_url.empty()) && // and if the parcel has media
|
||||
(stricmp(this_media_type.c_str(), LLMIMETypes::getDefaultMimeType().c_str()) != 0) &&
|
||||
(LLViewerParcelMedia::sMediaImpl.isNull())) // and if the media is not already playing
|
||||
{
|
||||
if (this_media_texture_id.notNull()) // and if the media texture is good
|
||||
if (this_media_texture_id.notNull()) // and if the media texture is good
|
||||
{
|
||||
LLViewerTexture *image = LLViewerTextureManager::getFetchedTexture(this_media_texture_id, FALSE);
|
||||
LLViewerMediaTexture *image = LLViewerTextureManager::getMediaTexture(this_media_texture_id, FALSE) ;
|
||||
|
||||
F32 image_size = 0;
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#define LLVIEWERPARCELMEDIAAUTOPLAY_H
|
||||
|
||||
#include "lleventtimer.h"
|
||||
#include "lluuid.h"
|
||||
|
||||
// timer to automatically play media
|
||||
class LLViewerParcelMediaAutoPlay : LLEventTimer
|
||||
@@ -47,6 +48,7 @@ class LLViewerParcelMediaAutoPlay : LLEventTimer
|
||||
|
||||
private:
|
||||
S32 mLastParcelID;
|
||||
LLUUID mLastRegionID;
|
||||
BOOL mPlayed;
|
||||
F32 mTimeInParcel;
|
||||
};
|
||||
|
||||
@@ -1633,9 +1633,6 @@ LLXMLNodePtr LLViewerTextEditor::getXML(bool save_children) const
|
||||
|
||||
LLView* LLViewerTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
||||
{
|
||||
std::string name("text_editor");
|
||||
node->getAttributeString("name", name);
|
||||
|
||||
LLRect rect;
|
||||
createRect(node, rect, parent, LLRect());
|
||||
|
||||
@@ -1656,7 +1653,7 @@ LLView* LLViewerTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlF
|
||||
text.erase(max_text_length);
|
||||
}
|
||||
|
||||
LLViewerTextEditor* text_editor = new LLViewerTextEditor(name,
|
||||
LLViewerTextEditor* text_editor = new LLViewerTextEditor("text_editor",
|
||||
rect,
|
||||
max_text_length,
|
||||
LLStringUtil::null,
|
||||
|
||||
@@ -185,6 +185,8 @@
|
||||
|
||||
#include "llfloaternotificationsconsole.h"
|
||||
|
||||
#include "llpanelnearbymedia.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
@@ -945,6 +947,12 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
|
||||
handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleMouseUp(local_x, local_y, mask);
|
||||
}
|
||||
|
||||
// Mark the click as handled and return if we aren't within the root view to avoid spurious bugs
|
||||
if( !mRootView->pointInView(x, y) )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Give the UI views a chance to process the click
|
||||
if( mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) )
|
||||
{
|
||||
@@ -959,43 +967,17 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
|
||||
llinfos << buttonname << " Mouse " << buttonstatestr << " not handled by view" << llendl;
|
||||
}
|
||||
|
||||
if (down)
|
||||
// Do not allow tool manager to handle mouseclicks if we have disconnected
|
||||
if(!gDisconnected && LLToolMgr::getInstance()->getCurrentTool()->handleAnyMouseClick( x, y, mask, clicktype, down ) )
|
||||
{
|
||||
// Do not allow tool manager to handle mouseclicks if we have disconnected
|
||||
if (gDisconnected)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (LLToolMgr::getInstance()->getCurrentTool()->handleAnyMouseClick( x, y, mask, clicktype, down ) )
|
||||
{
|
||||
// This is necessary to force clicks in the world to cause edit
|
||||
// boxes that might have keyboard focus to relinquish it, and hence
|
||||
// cause a commit to update their value. JC
|
||||
gFocusMgr.setKeyboardFocus(NULL);
|
||||
return TRUE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
mWindow->releaseMouse();
|
||||
|
||||
|
||||
LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
|
||||
if( !handled )
|
||||
{
|
||||
handled = mRootView->handleAnyMouseClick(x, y, mask, clicktype, down);
|
||||
}
|
||||
|
||||
if( !handled )
|
||||
{
|
||||
if (tool)
|
||||
{
|
||||
handled = tool->handleAnyMouseClick(x, y, mask, clicktype, down);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (!down);
|
||||
// If we got this far on a down-click, it wasn't handled.
|
||||
// Up-clicks, though, are always handled as far as the OS is concerned.
|
||||
BOOL default_rtn = !down;
|
||||
return default_rtn;
|
||||
}
|
||||
|
||||
BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
|
||||
@@ -1009,8 +991,12 @@ BOOL LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK ma
|
||||
// try handling as a double-click first, then a single-click if that
|
||||
// wasn't handled.
|
||||
BOOL down = TRUE;
|
||||
return handleAnyMouseClick(window, pos, mask, LLMouseHandler::CLICK_DOUBLELEFT, down) ||
|
||||
handleMouseDown(window, pos, mask);
|
||||
if (handleAnyMouseClick(window, pos, mask,
|
||||
LLMouseHandler::CLICK_DOUBLELEFT, down))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return handleMouseDown(window, pos, mask);
|
||||
}
|
||||
|
||||
BOOL LLViewerWindow::handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
|
||||
@@ -2108,11 +2094,24 @@ void LLViewerWindow::adjustControlRectanglesForFirstUse(const LLRect& window)
|
||||
void LLViewerWindow::initWorldUI()
|
||||
{
|
||||
pre_init_menus();
|
||||
if(!gMenuHolder)
|
||||
{
|
||||
//
|
||||
// Tools for building
|
||||
//
|
||||
init_menus();
|
||||
}
|
||||
}
|
||||
|
||||
// initWorldUI that wasn't before logging in. Some of this may require the access the 'LindenUserDir'.
|
||||
void LLViewerWindow::initWorldUI_postLogin()
|
||||
{
|
||||
S32 height = mRootView->getRect().getHeight();
|
||||
S32 width = mRootView->getRect().getWidth();
|
||||
LLRect full_window(0, height, width, 0);
|
||||
|
||||
//============================================
|
||||
//Begin LLViewerWindow::initWorlUI
|
||||
// Don't re-enter if objects are alreay created
|
||||
if (gBottomPanel == NULL)
|
||||
{
|
||||
@@ -2120,18 +2119,15 @@ void LLViewerWindow::initWorldUI()
|
||||
gBottomPanel = new LLBottomPanel(mRootView->getRect());
|
||||
mRootView->addChild(gBottomPanel);
|
||||
|
||||
LLFloaterNearbyMedia::updateClass(); //Dependent on the overlay panel being fully initialized.
|
||||
|
||||
// View for hover information
|
||||
gHoverView = new LLHoverView(std::string("gHoverView"), full_window);
|
||||
gHoverView->setVisible(TRUE);
|
||||
mRootView->addChild(gHoverView);
|
||||
|
||||
gIMMgr = LLIMMgr::getInstance();
|
||||
|
||||
//
|
||||
// Tools for building
|
||||
//
|
||||
|
||||
init_menus();
|
||||
gIMMgr->loadIgnoreGroup();
|
||||
|
||||
// Toolbox floater
|
||||
gFloaterTools = new LLFloaterTools();
|
||||
@@ -2150,19 +2146,16 @@ void LLViewerWindow::initWorldUI()
|
||||
// put behind everything else in the UI
|
||||
mRootView->addChildInBack(gHUDView);
|
||||
}
|
||||
//End LLViewerWindow::initWorlUI
|
||||
//============================================
|
||||
|
||||
|
||||
LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("state_management_buttons_container");
|
||||
panel_ssf_container->setVisible(TRUE);
|
||||
|
||||
LLMenuOptionPathfindingRebakeNavmesh::getInstance()->initialize();
|
||||
}
|
||||
|
||||
// initWorldUI that wasn't before logging in. Some of this may require the access the 'LindenUserDir'.
|
||||
void LLViewerWindow::initWorldUI_postLogin()
|
||||
{
|
||||
S32 height = mRootView->getRect().getHeight();
|
||||
S32 width = mRootView->getRect().getWidth();
|
||||
LLRect full_window(0, height, width, 0);
|
||||
|
||||
|
||||
// Don't re-enter if objects are alreay created.
|
||||
if (!gStatusBar)
|
||||
@@ -2237,7 +2230,8 @@ void LLViewerWindow::shutdownViews()
|
||||
mRootView = NULL;
|
||||
llinfos << "RootView deleted." << llendl ;
|
||||
|
||||
LLMenuOptionPathfindingRebakeNavmesh::getInstance()->quit();
|
||||
if(LLMenuOptionPathfindingRebakeNavmesh::instanceExists())
|
||||
LLMenuOptionPathfindingRebakeNavmesh::getInstance()->quit();
|
||||
|
||||
// Automatically deleted as children of mRootView. Fix the globals.
|
||||
gFloaterTools = NULL;
|
||||
@@ -2444,6 +2438,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
|
||||
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width);
|
||||
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_HEIGHT, (F64)height);
|
||||
gResizeScreenTexture = TRUE;
|
||||
LLLayoutStack::updateClass();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3023,6 +3018,8 @@ void LLViewerWindow::updateUI()
|
||||
LLFastTimer t(ftm);
|
||||
|
||||
static std::string last_handle_msg;
|
||||
// animate layout stacks so we have up to date rect for world view
|
||||
LLLayoutStack::updateClass();
|
||||
|
||||
LLView::sMouseHandlerMessage.clear();
|
||||
|
||||
@@ -3056,8 +3053,134 @@ void LLViewerWindow::updateUI()
|
||||
BOOL handled = FALSE;
|
||||
|
||||
LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
|
||||
|
||||
LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
|
||||
LLView* captor_view = dynamic_cast<LLView*>(mouse_captor);
|
||||
|
||||
//FIXME: only include captor and captor's ancestors if mouse is truly over them --RN
|
||||
|
||||
//build set of views containing mouse cursor by traversing UI hierarchy and testing
|
||||
//screen rect against mouse cursor
|
||||
view_handle_set_t mouse_hover_set;
|
||||
|
||||
// constraint mouse enter events to children of mouse captor
|
||||
LLView* root_view = captor_view;
|
||||
|
||||
// if mouse captor doesn't exist or isn't a LLView
|
||||
// then allow mouse enter events on entire UI hierarchy
|
||||
if (!root_view)
|
||||
{
|
||||
root_view = mRootView;
|
||||
}
|
||||
|
||||
// only update mouse hover set when UI is visible (since we shouldn't send hover events to invisible UI
|
||||
// if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
|
||||
{
|
||||
// include all ancestors of captor_view as automatically having mouse
|
||||
if (captor_view)
|
||||
{
|
||||
LLView* captor_parent_view = captor_view->getParent();
|
||||
while(captor_parent_view)
|
||||
{
|
||||
mouse_hover_set.insert(captor_parent_view->getHandle());
|
||||
captor_parent_view = captor_parent_view->getParent();
|
||||
}
|
||||
}
|
||||
|
||||
// while the top_ctrl contains the mouse cursor, only it and its descendants will receive onMouseEnter events
|
||||
if (top_ctrl && top_ctrl->calcScreenBoundingRect().pointInRect(x, y))
|
||||
{
|
||||
// iterator over contents of top_ctrl, and throw into mouse_hover_set
|
||||
for (LLView::tree_iterator_t it = top_ctrl->beginTreeDFS();
|
||||
it != top_ctrl->endTreeDFS();
|
||||
++it)
|
||||
{
|
||||
LLView* viewp = *it;
|
||||
if (viewp->getVisible()
|
||||
&& viewp->calcScreenBoundingRect().pointInRect(x, y))
|
||||
{
|
||||
// we have a view that contains the mouse, add it to the set
|
||||
mouse_hover_set.insert(viewp->getHandle());
|
||||
}
|
||||
else
|
||||
{
|
||||
// skip this view and all of its children
|
||||
it.skipDescendants();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// walk UI tree in depth-first order
|
||||
for (LLView::tree_iterator_t it = root_view->beginTreeDFS();
|
||||
it != root_view->endTreeDFS();
|
||||
++it)
|
||||
{
|
||||
LLView* viewp = *it;
|
||||
// calculating the screen rect involves traversing the parent, so this is less than optimal
|
||||
if (viewp->getVisible()
|
||||
&& viewp->calcScreenBoundingRect().pointInRect(x, y))
|
||||
{
|
||||
|
||||
// if this view is mouse opaque, nothing behind it should be in mouse_hover_set
|
||||
if (viewp->getMouseOpaque())
|
||||
{
|
||||
// constrain further iteration to children of this widget
|
||||
it = viewp->beginTreeDFS();
|
||||
}
|
||||
|
||||
// we have a view that contains the mouse, add it to the set
|
||||
mouse_hover_set.insert(viewp->getHandle());
|
||||
}
|
||||
else
|
||||
{
|
||||
// skip this view and all of its children
|
||||
it.skipDescendants();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typedef std::vector<LLHandle<LLView> > view_handle_list_t;
|
||||
|
||||
// call onMouseEnter() on all views which contain the mouse cursor but did not before
|
||||
view_handle_list_t mouse_enter_views;
|
||||
std::set_difference(mouse_hover_set.begin(), mouse_hover_set.end(),
|
||||
mMouseHoverViews.begin(), mMouseHoverViews.end(),
|
||||
std::back_inserter(mouse_enter_views));
|
||||
for (view_handle_list_t::iterator it = mouse_enter_views.begin();
|
||||
it != mouse_enter_views.end();
|
||||
++it)
|
||||
{
|
||||
LLView* viewp = it->get();
|
||||
if (viewp)
|
||||
{
|
||||
LLRect view_screen_rect = viewp->calcScreenRect();
|
||||
viewp->onMouseEnter(x - view_screen_rect.mLeft, y - view_screen_rect.mBottom, mask);
|
||||
}
|
||||
}
|
||||
|
||||
// call onMouseLeave() on all views which no longer contain the mouse cursor
|
||||
view_handle_list_t mouse_leave_views;
|
||||
std::set_difference(mMouseHoverViews.begin(), mMouseHoverViews.end(),
|
||||
mouse_hover_set.begin(), mouse_hover_set.end(),
|
||||
std::back_inserter(mouse_leave_views));
|
||||
for (view_handle_list_t::iterator it = mouse_leave_views.begin();
|
||||
it != mouse_leave_views.end();
|
||||
++it)
|
||||
{
|
||||
LLView* viewp = it->get();
|
||||
if (viewp)
|
||||
{
|
||||
LLRect view_screen_rect = viewp->calcScreenRect();
|
||||
viewp->onMouseLeave(x - view_screen_rect.mLeft, y - view_screen_rect.mBottom, mask);
|
||||
}
|
||||
}
|
||||
|
||||
// store resulting hover set for next frame
|
||||
swap(mMouseHoverViews, mouse_hover_set);
|
||||
|
||||
// only handle hover events when UI is enabled
|
||||
// if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
|
||||
{
|
||||
|
||||
if( mouse_captor )
|
||||
@@ -3312,7 +3435,7 @@ void LLViewerWindow::updateLayout()
|
||||
}
|
||||
|
||||
// Update rectangles for the various toolbars
|
||||
if (gOverlayBar && gNotifyBoxView && gConsole && gToolBar)
|
||||
if (gOverlayBar && gNotifyBoxView && gConsole && gToolBar && gHUDView)
|
||||
{
|
||||
LLRect bar_rect(-1, STATUS_BAR_HEIGHT, getWindowWidth()+1, -1);
|
||||
|
||||
|
||||
@@ -433,6 +433,8 @@ protected:
|
||||
|
||||
BOOL mMouseInWindow; // True if the mouse is over our window or if we have captured the mouse.
|
||||
BOOL mFocusCycleMode;
|
||||
typedef std::set<LLHandle<LLView> > view_handle_set_t;
|
||||
view_handle_set_t mMouseHoverViews;
|
||||
|
||||
// Variables used for tool override switching based on modifier keys. JC
|
||||
MASK mLastMask; // used to detect changes in modifier mask
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "llagent.h"
|
||||
#include "llhttpclient.h"
|
||||
#include "llimview.h"
|
||||
#include "llnotifications.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llvoicechannel.h"
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "llviewerstats.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llworld.h"
|
||||
#include "llnotifications.h"
|
||||
|
||||
#include "../lscript/lscript_byteformat.h" //Need LSCRIPTRunTimePermissionBits and SCRIPT_PERMISSION_*
|
||||
|
||||
|
||||
BIN
indra/newview/skins/default/textures/Flag.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
indra/newview/skins/default/textures/Parcel_Exp_Color.png
Normal file
|
After Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 485 B After Width: | Height: | Size: 485 B |
BIN
indra/newview/skins/default/textures/go-media-pause.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
indra/newview/skins/default/textures/go-media-play.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
indra/newview/skins/default/textures/go-media-skip-backwards.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
indra/newview/skins/default/textures/go-media-skip-forward.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
indra/newview/skins/default/textures/go-media-stop.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
indra/newview/skins/default/textures/go-media-unzoom.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
indra/newview/skins/default/textures/go-media-zoom.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 508 B After Width: | Height: | Size: 508 B |
|
Before Width: | Height: | Size: 467 B After Width: | Height: | Size: 467 B |
|
Before Width: | Height: | Size: 786 B After Width: | Height: | Size: 786 B |
BIN
indra/newview/skins/default/textures/go-stop.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
indra/newview/skins/default/textures/lock.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
@@ -403,11 +403,15 @@
|
||||
<texture name="media_panel_divider.png"/>
|
||||
<texture name="media_panel_scrollbg.png"/>
|
||||
|
||||
<texture name="go-previous-4.png"/>
|
||||
<texture name="go-next-4.png"/>
|
||||
<texture name="view-refresh-5.png"/>
|
||||
<texture name="go-home-4.png"/>
|
||||
|
||||
<texture name="Parcel_Exp_Color.png" file_name="Parcel_Exp_Color.png" preload="false" />
|
||||
<texture name="Flag.png" file_name="Flag.png" preload="false" />
|
||||
<texture name="go-previous.png"/>
|
||||
<texture name="go-next.png"/>
|
||||
<texture name="go-reload.png"/>
|
||||
<texture name="go-home.png"/>
|
||||
<texture name="go-media-play.png"/>
|
||||
<texture name="go-media-stop.png"/>
|
||||
|
||||
<texture name="Inv_WindLight.png" preload="true"/>
|
||||
<texture name="Inv_WaterLight.png" preload="true"/>
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
select_on_focus="false" tab_group="1" tool_tip="Search Second Life"
|
||||
width="160" spell_check="true" />
|
||||
<button bottom="-26" follows="top|right" font="SansSerifSmall" height="25"
|
||||
label="" left="230" name="back_btn" width="25" image_overlay="go-previous-4.png"/>
|
||||
label="" left="230" name="back_btn" width="25" image_overlay="go-previous.png"/>
|
||||
<button bottom="-26" follows="top|right" font="SansSerifSmall" height="25"
|
||||
label="" left_delta="27" name="forward_btn" width="25" image_overlay="go-next-4.png" />
|
||||
label="" left_delta="27" name="forward_btn" width="25" image_overlay="go-next.png" />
|
||||
<button bottom="-26" follows="top|right" font="SansSerifSmall" height="25"
|
||||
label="" left_delta="27" name="reload_btn" width="25" image_overlay="view-refresh-5.png"/>
|
||||
label="" left_delta="27" name="reload_btn" width="25" image_overlay="go-reload.png"/>
|
||||
<button bottom="-48" follows="top|right" font="SansSerif" height="20"
|
||||
label="Search" left="121" name="search_btn" width="95" />
|
||||
<combo_box allow_text_entry="false" bottom="-46" follows="right|top" height="18"
|
||||
@@ -315,17 +315,17 @@
|
||||
<string name="not_found_text">None Found.</string>
|
||||
<button bottom="-30" follows="top|left" font="SansSerifSmall" height="25"
|
||||
label=""
|
||||
image_overlay="go-previous-4.png"
|
||||
image_overlay="go-previous.png"
|
||||
left="10"
|
||||
name="back_btn" width="25" />
|
||||
<button bottom_delta="0" follows="top|left" font="SansSerifSmall" height="25"
|
||||
label=""
|
||||
image_overlay="go-next-4.png"
|
||||
image_overlay="go-next.png"
|
||||
left_delta="27"
|
||||
name="forward_btn" width="25" />
|
||||
<button bottom_delta="0" follows="top|left" font="SansSerifSmall" height="25"
|
||||
label=""
|
||||
image_overlay="view-refresh-5.png"
|
||||
image_overlay="go-reload.png"
|
||||
left_delta="27"
|
||||
name="reload_btn" width="25" />
|
||||
<!-- No mature content checkbox, showcase is all PG -->
|
||||
@@ -687,9 +687,9 @@ To buy direct, visit the land and click on the place name in the title bar.
|
||||
mouse_opaque="true" name="result_text" v_pad="0" width="328" />
|
||||
</panel>
|
||||
<panel bottom="-549" follows="all" height="533" label="Marketplace" left="1" mouse_opaque="false" name="market_panel" width="778">
|
||||
<button bottom="-30" follows="top|left" height="25" label="" left="10" name="back_btn" width="25" image_overlay="go-previous-4.png"/>
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" left_delta="27" name="forward_btn" width="25" image_overlay="go-next-4.png" />
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" left_delta="27" name="reload_btn" width="25" image_overlay="view-refresh-5.png"/>
|
||||
<button bottom="-30" follows="top|left" height="25" label="" left="10" name="back_btn" width="25" image_overlay="go-previous.png"/>
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" left_delta="27" name="forward_btn" width="25" image_overlay="go-next.png" />
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" left_delta="27" name="reload_btn" width="25" image_overlay="go-reload.png"/>
|
||||
<web_browser name="market_browser" trusted_content="true" bottom="25" follows="all" left="10" right="-10" top="-40"/>
|
||||
<text bottom="5" follows="bottom|left" left="10" height="16" name="status_text"/>
|
||||
<string name="loading_text">Loading...</string>
|
||||
|
||||
@@ -623,10 +623,10 @@ To buy direct, visit the land and click on the place name in the title bar.
|
||||
mouse_opaque="true" name="result_text" v_pad="0" width="328" />
|
||||
</panel>
|
||||
<panel bottom="-549" follows="all" height="533" label="Marketplace" left="1" mouse_opaque="false" name="market_panel" width="778">
|
||||
<button bottom="-30" follows="top|left" height="25" label="" left="10" name="back_btn" width="25" image_overlay="go-previous-4.png"/>
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" left_delta="27" name="forward_btn" width="25" image_overlay="go-next-4.png" />
|
||||
<button bottom="-30" follows="top|left" height="25" label="" left="10" name="back_btn" width="25" image_overlay="go-previous.png"/>
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" left_delta="27" name="forward_btn" width="25" image_overlay="go-next.png" />
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" left_delta="27" name="reload_btn" width="25" image_overlay="view-refresh-5.png"/>
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" tooltip="reset" left_delta="27" name="reset_btn" width="25" image_overlay="go-home-4.png"/>
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" tooltip="reset" left_delta="27" name="reset_btn" width="25" image_overlay="go-reload.png"/>
|
||||
<web_browser name="market_browser" trusted_content="true" bottom="25" follows="all" left="10" right="-10" top="-40"/>
|
||||
<text bottom="5" follows="bottom|left" left="10" height="16" name="status_text"/>
|
||||
<string name="loading_text">Loading...</string>
|
||||
|
||||
@@ -86,11 +86,11 @@
|
||||
select_on_focus="false" tab_group="1" tool_tip="Search Second Life"
|
||||
width="160" spell_check="true" />
|
||||
<button bottom="-26" follows="top|right" font="SansSerifSmall" height="25"
|
||||
label="" left="230" name="back_btn" width="25" image_overlay="go-previous-4.png"/>
|
||||
label="" left="230" name="back_btn" width="25" image_overlay="go-previous.png"/>
|
||||
<button bottom="-26" follows="top|right" font="SansSerifSmall" height="25"
|
||||
label="" left_delta="27" name="forward_btn" width="25" image_overlay="go-next-4.png" />
|
||||
label="" left_delta="27" name="forward_btn" width="25" image_overlay="go-next.png" />
|
||||
<button bottom="-26" follows="top|right" font="SansSerifSmall" height="25"
|
||||
label="" left_delta="27" name="reload_btn" width="25" image_overlay="view-refresh-5.png"/>
|
||||
label="" left_delta="27" name="reload_btn" width="25" image_overlay="go-reload.png"/>
|
||||
<button bottom="-48" follows="top|right" font="SansSerif" height="20"
|
||||
label="Search" left="121" name="search_btn" width="95" />
|
||||
<combo_box allow_text_entry="false" bottom="-46" follows="right|top" height="18"
|
||||
@@ -374,17 +374,17 @@
|
||||
<string name="not_found_text">None Found.</string>
|
||||
<button bottom="-30" follows="top|left" font="SansSerifSmall" height="25"
|
||||
label=""
|
||||
image_overlay="go-previous-4.png"
|
||||
image_overlay="go-previous.png"
|
||||
left="10"
|
||||
name="back_btn" width="25" />
|
||||
<button bottom_delta="0" follows="top|left" font="SansSerifSmall" height="25"
|
||||
label=""
|
||||
image_overlay="go-next-4.png"
|
||||
image_overlay="go-next.png"
|
||||
left_delta="27"
|
||||
name="forward_btn" width="25" />
|
||||
<button bottom_delta="0" follows="top|left" font="SansSerifSmall" height="25"
|
||||
label=""
|
||||
image_overlay="view-refresh-5.png"
|
||||
image_overlay="go-reload.png"
|
||||
left_delta="27"
|
||||
name="reload_btn" width="25" />
|
||||
<!-- No mature content checkbox, showcase is all PG -->
|
||||
@@ -746,10 +746,10 @@ To buy direct, visit the land and click on the place name in the title bar.
|
||||
mouse_opaque="true" name="result_text" v_pad="0" width="328" />
|
||||
</panel>
|
||||
<panel bottom="-549" follows="all" height="533" label="Marketplace" left="1" mouse_opaque="false" name="market_panel" width="778">
|
||||
<button bottom="-30" follows="top|left" height="25" label="" left="10" name="back_btn" width="25" image_overlay="go-previous-4.png"/>
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" left_delta="27" name="forward_btn" width="25" image_overlay="go-next-4.png" />
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" left_delta="27" name="reload_btn" width="25" image_overlay="view-refresh-5.png"/>
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" tooltip="reset" left_delta="27" name="reset_btn" width="25" image_overlay="go-home-4.png"/>
|
||||
<button bottom="-30" follows="top|left" height="25" label="" left="10" name="back_btn" width="25" image_overlay="go-previous.png"/>
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" left_delta="27" name="forward_btn" width="25" image_overlay="go-next.png" />
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" left_delta="27" name="reload_btn" width="25" image_overlay="go-reload.png"/>
|
||||
<button bottom_delta="0" follows="top|left" height="25" label="" tooltip="reset" left_delta="27" name="reset_btn" width="25" image_overlay="go-home.png"/>
|
||||
<web_browser name="market_browser" trusted_content="true" bottom="25" follows="all" left="10" right="-10" top="-40"/>
|
||||
<text bottom="5" follows="bottom|left" left="10" height="16" name="status_text"/>
|
||||
<string name="loading_text">Loading...</string>
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
|
||||
height="440" min_height="140" min_width="467" name="floater_about"
|
||||
rect_control="FloaterMediaRect" title="Media Browser" width="820">
|
||||
<layout_stack name="stack1" bottom="0" follows="left|right|top|bottom" left="10" top="-20" width="800">
|
||||
<layout_panel auto_resize="false" bottom="0" height="25" left="0" name="nav_controls" user_resize="false"
|
||||
width="800">
|
||||
<button bottom="0" follows="left|top" height="25" label="" image_overlay="go-previous-4.png" left="0" name="back"
|
||||
width="25" />
|
||||
<button bottom_delta="0" follows="left|top" height="25" label="" image_overlay="go-next-4.png" left_delta="27"
|
||||
name="forward" width="25" />
|
||||
<button bottom_delta="0" enabled="false" follows="left|top" height="25" label="" image_overlay="view-refresh-5.png"
|
||||
left_delta="27" name="reload" width="25" />
|
||||
<combo_box allow_text_entry="true" bottom_delta="4" follows="left|top|right" height="20"
|
||||
left_delta="29" max_chars="255" name="address" width="657" />
|
||||
<button bottom_delta="-4" enabled="false" follows="right|top" height="25" label="Go" font="SansSerif"
|
||||
left_delta="660" name="go" width="55" />
|
||||
<!--button bottom_delta="0" enabled="true" follows="right|top" height="25" label="" image_overlay="go-home-4.png"
|
||||
left_delta="58" name="home" width="35" /-->
|
||||
</layout_panel>
|
||||
<layout_panel auto_resize="false" bottom="0" height="20" left="0" name="time_controls" user_resize="false"
|
||||
width="800">
|
||||
<button bottom="0" follows="left|top" height="20" label="rewind" left="0" name="rewind"
|
||||
width="55" />
|
||||
<button bottom_delta="0" follows="left|top" height="20" label="" left_delta="55"
|
||||
name="play" width="55" image_unselected="button_anim_play.tga" image_selected="button_anim_play_selected.tga" scale_image="true" />
|
||||
<button bottom_delta="0" follows="left|top" height="20" label="" left_delta="0"
|
||||
name="pause" width="55" image_unselected="button_anim_pause.tga" image_selected="button_anim_pause_selected.tga" scale_image="true" />
|
||||
<button bottom_delta="0" follows="left|top" height="20" label="stop"
|
||||
left_delta="65" name="stop" width="55" />
|
||||
<button bottom_delta="0" follows="left|top" height="20" label="forward"
|
||||
left_delta="75" name="seek" width="55" />
|
||||
</layout_panel>
|
||||
<layout_panel auto_resize="false" bottom="0" height="20" left="0"
|
||||
name="parcel_owner_controls" user_resize="false" width="540">
|
||||
<button bottom="0" enabled="false" follows="left|top" height="22"
|
||||
label="Send Current URL To Parcel" left="0" name="assign" width="200" />
|
||||
</layout_panel>
|
||||
<layout_panel auto_resize="true" bottom="0" height="20" left="0" name="external_controls" user_resize="false"
|
||||
width="540">
|
||||
<web_browser bottom="30" follows="left|right|top|bottom" left="0" name="browser" top="20"
|
||||
width="540" />
|
||||
<button bottom="5" follows="bottom|left" height="20" label="Open in My Web Browser"
|
||||
left="0" name="open_browser" width="185" />
|
||||
<check_box bottom="5" control_name="UseExternalBrowser" follows="bottom|left" height="20"
|
||||
label="Always open in my web browser" left_delta="190" name="open_always"
|
||||
width="200" />
|
||||
<!--button bottom="5" follows="bottom|right" height="20" label="Close" left="-70"
|
||||
name="close" width="70" /-->
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
<string name="home_page_url">
|
||||
http://www.secondlife.com
|
||||
</string>
|
||||
<string name="support_page_url">
|
||||
http://wiki.secondlife.com/wiki/Knowledge_Base
|
||||
</string>
|
||||
</floater>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
legacy_header_height="18"
|
||||
can_close="true"
|
||||
can_drag_on_left="false"
|
||||
can_minimize="true"
|
||||
can_resize="false"
|
||||
can_tear_off="true"
|
||||
default_tab_group="1"
|
||||
enabled="true"
|
||||
width="365"
|
||||
height="535"
|
||||
min_height="535"
|
||||
min_width="365"
|
||||
mouse_opaque="true"
|
||||
name="media_settings"
|
||||
help_topic = "media_settings"
|
||||
title="MEDIA SETTINGS">
|
||||
<button
|
||||
bottom="-525"
|
||||
enabled="true"
|
||||
follows="right|bottom"
|
||||
font="SansSerif"
|
||||
halign="center"
|
||||
height="20"
|
||||
label="OK"
|
||||
label_selected="OK"
|
||||
left="75"
|
||||
mouse_opaque="true"
|
||||
name="OK"
|
||||
scale_image="true"
|
||||
width="90" />
|
||||
<button
|
||||
bottom_delta="0"
|
||||
enabled="true"
|
||||
follows="right|bottom"
|
||||
font="SansSerif"
|
||||
halign="center"
|
||||
height="20"
|
||||
label="Cancel"
|
||||
label_selected="Cancel"
|
||||
left_delta="93"
|
||||
mouse_opaque="true"
|
||||
name="Cancel"
|
||||
scale_image="true"
|
||||
width="90" />
|
||||
<button
|
||||
bottom_delta="0"
|
||||
enabled="true"
|
||||
follows="right|bottom"
|
||||
font="SansSerif"
|
||||
halign="center"
|
||||
height="20"
|
||||
label="Apply"
|
||||
label_selected="Apply"
|
||||
left_delta="93"
|
||||
mouse_opaque="true"
|
||||
name="Apply"
|
||||
scale_image="true"
|
||||
width="90" />
|
||||
<tab_container
|
||||
bottom="-500"
|
||||
enabled="true"
|
||||
follows="left|top|right|bottom"
|
||||
height="485"
|
||||
left="0"
|
||||
mouse_opaque="false"
|
||||
name="tab_container"
|
||||
tab_group="1"
|
||||
tab_position="top"
|
||||
tab_width="80"
|
||||
width="365" />
|
||||
</floater>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<floater
|
||||
name="Nearby Media"
|
||||
title="Nearby Media"
|
||||
can_resize="true"
|
||||
can_close="true"
|
||||
height="208"
|
||||
min_width="300"
|
||||
min_height="122"
|
||||
width="328">
|
||||
<panel
|
||||
name="nearby_media"
|
||||
width="328"
|
||||
height="190"
|
||||
bottom="-208"
|
||||
left="0"
|
||||
follows="all"
|
||||
mouse_opaque="false"
|
||||
/>
|
||||
</floater>
|
||||
@@ -11,75 +11,135 @@
|
||||
image_disabled="tool_zoom.tga" image_disabled_selected="tool_zoom_active.tga"
|
||||
image_selected="tool_zoom_active.tga" image_unselected="tool_zoom.tga"
|
||||
label="" label_selected="" left="4" mouse_opaque="true" name="button focus"
|
||||
tool_tip="Focus" width="32" />
|
||||
tool_tip="Focus" width="32" >
|
||||
<button.commit_callback
|
||||
function="BuildTool.setTool"
|
||||
parameter="Focus" />
|
||||
</button>
|
||||
<button bottom="-34" follows="left|top" font="SansSerif" halign="center" height="32"
|
||||
image_disabled="UIImgGrabUUID" image_disabled_selected="UIImgGrabSelectedUUID"
|
||||
image_selected="UIImgGrabSelectedUUID" image_unselected="UIImgGrabUUID"
|
||||
label="" label_selected="" left="40" mouse_opaque="true" name="button move"
|
||||
tool_tip="Move" width="32" />
|
||||
tool_tip="Move" width="32" >
|
||||
<button.commit_callback
|
||||
function="BuildTool.setTool"
|
||||
parameter="Move" />
|
||||
</button>
|
||||
<button bottom="-34" follows="left|top" font="SansSerif" halign="center" height="32"
|
||||
image_disabled="UIImgFaceUUID" image_disabled_selected="UIImgFaceSelectedUUID"
|
||||
image_selected="UIImgFaceSelectedUUID" image_unselected="UIImgFaceUUID"
|
||||
label="" label_selected="" left="76" mouse_opaque="true" name="button edit"
|
||||
tool_tip="Edit" width="32" />
|
||||
tool_tip="Edit" width="32" >
|
||||
<button.commit_callback
|
||||
function="BuildTool.setTool"
|
||||
parameter="Edit" />
|
||||
</button>
|
||||
<button bottom="-34" follows="left|top" font="SansSerif" halign="center" height="32"
|
||||
image_disabled="UIImgCreateUUID" image_disabled_selected="UIImgCreateSelectedUUID"
|
||||
image_selected="UIImgCreateSelectedUUID" image_unselected="UIImgCreateUUID"
|
||||
label="" label_selected="" left="112" mouse_opaque="true"
|
||||
name="button create" tool_tip="Create" width="32" />
|
||||
name="button create" tool_tip="Create" width="32" >
|
||||
<button.commit_callback
|
||||
function="BuildTool.setTool"
|
||||
parameter="Create" />
|
||||
</button>
|
||||
<button bottom="-34" follows="left|top" font="SansSerif" halign="center" height="32"
|
||||
image_disabled="tool_dozer.tga" image_disabled_selected="tool_dozer_active.tga"
|
||||
image_selected="tool_dozer_active.tga" image_unselected="tool_dozer.tga"
|
||||
label="" label_selected="" left="148" mouse_opaque="true"
|
||||
name="button land" tool_tip="Land" width="32" />
|
||||
name="button land" tool_tip="Land" width="32" >
|
||||
<button.commit_callback
|
||||
function="BuildTool.setTool"
|
||||
parameter="Land" />
|
||||
</button>
|
||||
|
||||
<!-- Focus panel -->
|
||||
|
||||
<check_box bottom="-70" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Zoom" left="4" mouse_opaque="true"
|
||||
name="radio zoom" radio_style="true" width="114" />
|
||||
name="radio zoom" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioFocus"/>
|
||||
</check_box>
|
||||
|
||||
<volume_slider bottom="-69" follows="left|top" height="14" increment="0.01"
|
||||
initial_val="0.125" left="114" max_val="0.5" min_val="0"
|
||||
mouse_opaque="true" name="slider zoom" width="134" />
|
||||
mouse_opaque="true" name="slider zoom" width="134" >
|
||||
<volume_slider.commit_callback
|
||||
function="BuildTool.commitZoom"/>
|
||||
</volume_slider>
|
||||
<check_box bottom="-84" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Orbit (Ctrl)" left="4" mouse_opaque="true"
|
||||
name="radio orbit" radio_style="true" width="114" />
|
||||
name="radio orbit" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioFocus"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Pan (Ctrl-Shift)" left="4"
|
||||
mouse_opaque="true" name="radio pan" radio_style="true" width="114" />
|
||||
mouse_opaque="true" name="radio pan" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioFocus"/>
|
||||
</check_box>
|
||||
|
||||
<!-- Move panel -->
|
||||
|
||||
<check_box bottom="-70" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Move" left="4" mouse_opaque="true"
|
||||
name="radio move" radio_style="true" width="114" />
|
||||
name="radio move" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioMove"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Lift (Ctrl)" left="4" mouse_opaque="true"
|
||||
name="radio lift" radio_style="true" width="114" />
|
||||
name="radio lift" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioMove"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Spin (Ctrl-Shift)" left="4"
|
||||
mouse_opaque="true" name="radio spin" radio_style="true" width="114" />
|
||||
mouse_opaque="true" name="radio spin" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioMove"/>
|
||||
</check_box>
|
||||
|
||||
<!-- Edit panel -->
|
||||
<check_box bottom="-70" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Position" left="4" mouse_opaque="true"
|
||||
name="radio position" radio_style="true" width="114" />
|
||||
name="radio position" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioEdit"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Rotate (Ctrl)" left="4" mouse_opaque="true"
|
||||
name="radio rotate" radio_style="true" width="114" />
|
||||
name="radio rotate" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioEdit"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Stretch (Ctrl-Shift)" left="4"
|
||||
mouse_opaque="true" name="radio stretch" radio_style="true" width="123" />
|
||||
mouse_opaque="true" name="radio stretch" radio_style="true" width="123" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioEdit"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Select Texture" left="4" mouse_opaque="true"
|
||||
name="radio select face" radio_style="true" width="114" />
|
||||
name="radio select face" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioEdit"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Align (Ctrl-A)" left="4" mouse_opaque="true"
|
||||
name="radio align" radio_style="true" width="114" />
|
||||
name="radio align" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioEdit"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" control_name="EditLinkedParts" follows="left|top"
|
||||
font="SansSerifSmall" height="16" initial_value="false"
|
||||
label="Edit linked parts" left="4" mouse_opaque="true"
|
||||
name="checkbox edit linked parts" width="114" />
|
||||
name="checkbox edit linked parts" width="114">
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.selectComponent"/>
|
||||
</check_box>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom_delta="-17" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="14" left="6"
|
||||
@@ -98,6 +158,8 @@
|
||||
<combo_item name="Reference" value="Reference">
|
||||
Reference
|
||||
</combo_item>
|
||||
<combo_box.commit_callback
|
||||
function="BuildTool.gridMode"/>
|
||||
</combo_box>
|
||||
<check_box bottom="-67" control_name="ScaleUniform" follows="left|top"
|
||||
font="SansSerifSmall" height="15" initial_value="false"
|
||||
@@ -120,7 +182,10 @@
|
||||
left_delta="0" mouse_opaque="true" name="checkbox snap to grid" width="134" />
|
||||
<button bottom_delta="0" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
valign="center" height="18" label="Options..." label_selected="Options..."
|
||||
left_delta="64" mouse_opaque="true" name="Options..." scale_image="TRUE" width="75" />
|
||||
left_delta="64" mouse_opaque="true" name="Options..." scale_image="TRUE" width="75" >
|
||||
<button.commit_callback
|
||||
function="BuildTool.gridOptions"/>
|
||||
</button>
|
||||
|
||||
<!-- Help text -->
|
||||
|
||||
@@ -249,29 +314,53 @@
|
||||
|
||||
<check_box bottom="-69" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Select Land" left="4" mouse_opaque="true"
|
||||
name="radio select land" radio_style="true" width="114" />
|
||||
name="radio select land" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioLand"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Flatten" left="4" mouse_opaque="true"
|
||||
name="radio flatten" radio_style="true" width="114" />
|
||||
name="radio flatten" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioLand"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Raise" left="4" mouse_opaque="true"
|
||||
name="radio raise" radio_style="true" width="114" />
|
||||
name="radio raise" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioLand"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Lower" left="4" mouse_opaque="true"
|
||||
name="radio lower" radio_style="true" width="114" />
|
||||
name="radio lower" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioLand"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Smooth" left="4" mouse_opaque="true"
|
||||
name="radio smooth" radio_style="true" width="114" />
|
||||
name="radio smooth" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioLand"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Roughen" left="4" mouse_opaque="true"
|
||||
name="radio noise" radio_style="true" width="114" />
|
||||
name="radio noise" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioLand"/>
|
||||
</check_box>
|
||||
<check_box bottom_delta="-15" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Revert" left="4" mouse_opaque="true"
|
||||
name="radio revert" radio_style="true" width="114" />
|
||||
name="radio revert" radio_style="true" width="114" >
|
||||
<check_box.commit_callback
|
||||
function="BuildTool.commitRadioLand"/>
|
||||
</check_box>
|
||||
<button bottom="-72" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Apply" label_selected="Apply"
|
||||
left="116" mouse_opaque="true" name="button apply to selection"
|
||||
scale_image="TRUE" tool_tip="Modify Selected Land" width="78" />
|
||||
scale_image="TRUE" tool_tip="Modify Selected Land" width="78" >
|
||||
<button.commit_callback
|
||||
function="BuildTool.applyToSelection"/>
|
||||
</button>
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false"
|
||||
border_visible="false" bottom_delta="-16" drop_shadow_visible="true" enabled="true"
|
||||
follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" height="12" left="118"
|
||||
@@ -286,7 +375,10 @@
|
||||
</text>
|
||||
<volume_slider bottom_delta="-4" follows="left|top" height="16" hidden="false"
|
||||
increment="0.1" initial_val="2.0" left="178" max_val="11.0" min_val="1.0"
|
||||
mouse_opaque="true" name="slider brush size" width="80" />
|
||||
mouse_opaque="true" name="slider brush size" width="80" >
|
||||
<volume_slider.commit_callback
|
||||
function="BuildTool.commitDozerSize"/>
|
||||
</volume_slider>
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false"
|
||||
border_visible="false" bottom_delta="-18" drop_shadow_visible="true" enabled="true"
|
||||
follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" height="12" left="132"
|
||||
@@ -295,7 +387,10 @@
|
||||
</text>
|
||||
<volume_slider bottom_delta="-4" follows="left|top" height="16" hidden="false"
|
||||
increment="0.1" initial_val="0.00" left="178" max_val="2.0" min_val="-1.0"
|
||||
mouse_opaque="true" name="slider force" width="80" />
|
||||
mouse_opaque="true" name="slider force" width="80" >
|
||||
<volume_slider.commit_callback
|
||||
function="BuildTool.LandBrushForce"/>
|
||||
</volume_slider>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-160" left="118" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="right" height="16" visible="false"
|
||||
@@ -388,13 +483,14 @@
|
||||
mouse_opaque="true" name="Group:" v_pad="0" width="78">
|
||||
Group:
|
||||
</text>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-126" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78"
|
||||
mouse_opaque="true" name="Group Name Proxy" v_pad="0" visible="false"
|
||||
width="88">
|
||||
The Lindens
|
||||
</text>
|
||||
<name_box
|
||||
follows="left|top"
|
||||
height="16"
|
||||
initial_value="Loading..."
|
||||
bottom="-126"
|
||||
left_delta="78"
|
||||
name="Group Name Proxy"
|
||||
width="142"/>
|
||||
<button bottom="-126" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="16" label="Set" label_selected="Set..." left_delta="94"
|
||||
mouse_opaque="true" name="button set group" scale_image="TRUE" width="30" />
|
||||
@@ -1415,12 +1511,12 @@
|
||||
initial_value="false" label="Flip" left_delta="170" mouse_opaque="true"
|
||||
name="checkbox flip t" width="70" />
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-228" drop_shadow_visible="true" follows="left|top"
|
||||
bottom="-208" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||
mouse_opaque="true" name="tex rotate" v_pad="0" width="102">
|
||||
Rotation (degrees)
|
||||
</text>
|
||||
<spinner bottom="-234" decimal_digits="2" follows="left|top" height="16" increment="1"
|
||||
<spinner bottom="-214" decimal_digits="2" follows="left|top" height="16" increment="1"
|
||||
initial_val="0" left="112" max_val="9999" min_val="-9999"
|
||||
mouse_opaque="true" name="TexRot" width="68" />
|
||||
<string name="string repeats per meter">
|
||||
@@ -1430,40 +1526,127 @@
|
||||
Repeats Per Face
|
||||
</string>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-250" drop_shadow_visible="true" follows="left|top"
|
||||
bottom="-226" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||
mouse_opaque="true" name="rpt" v_pad="0" width="160">
|
||||
Repeats Per Meter
|
||||
</text>
|
||||
<spinner bottom="-256" decimal_digits="1" follows="left|top" height="16" increment="0.1"
|
||||
<spinner bottom="-232" decimal_digits="1" follows="left|top" height="16" increment="0.1"
|
||||
initial_val="1" left="112" max_val="10" min_val="0.1" mouse_opaque="true"
|
||||
name="rptctrl" width="68" />
|
||||
<button bottom="-256" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
<button bottom="-232" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Apply" label_selected="Apply" left_delta="78"
|
||||
mouse_opaque="true" name="button apply" scale_image="TRUE" width="75" />
|
||||
mouse_opaque="true" name="button apply" scale_image="TRUE" width="68" />
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-288" drop_shadow_visible="true" follows="left|top"
|
||||
bottom="-244" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||
mouse_opaque="true" name="tex offset" v_pad="0" width="160">
|
||||
Offset
|
||||
</text>
|
||||
<spinner bottom="-308" decimal_digits="4" follows="top" height="16" increment="0.01" initial_val="0" label="Horizontal (U)" label_width="90" left="20"
|
||||
<spinner bottom="-264" decimal_digits="4" follows="top" height="16" increment="0.01" initial_val="0" label="Horizontal (U)" label_width="90" left="20"
|
||||
max_val="1" min_val="-1" mouse_opaque="true" name="TexOffsetU" width="160"/>
|
||||
<spinner bottom_delta="-18" decimal_digits="4" follows="top" height="16" increment="0.01" initial_val="0" label="Vertical (V)" label_width="90"
|
||||
left="20" max_val="1" min_val="-1" name="TexOffsetV"
|
||||
width="160"/>
|
||||
<text bottom="-352" height="20" left="10" name="textbox autofix" v_pad="0" width="160">Align media texture
|
||||
(must load first)</text>
|
||||
<button bottom="-360" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Align" label_selected="Align" left="112"
|
||||
mouse_opaque="true" name="button align" scale_image="TRUE" width="68" />
|
||||
<text bottom="-322" drop_shadow_visible="true" follows="left|top" height="20" left="185" name="textbox params">Texture Params</text>
|
||||
<button bottom_delta="-18" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
<text bottom="-244" v_pad="0" drop_shadow_visible="true" follows="left|top" height="10" left="185" width="85" name="textbox params">Texture Params</text>
|
||||
<button bottom_delta="-24" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Copy" left_delta="5" mouse_opaque="true" name="copytextures" enabled="true"
|
||||
tool_tip="Copy Testure Params from Clipboard" width="68" />
|
||||
tool_tip="Copy Texture Params from Clipboard" width="68" />
|
||||
<button bottom_delta="-20" follows="top" height="20" label="Paste" name="pastetextures" tool_tip="Paste Texture Params from Clipboard" width="68" />
|
||||
</panel>
|
||||
<panel border="true" bottom="-383" follows="left|top|right|bottom" height="367"
|
||||
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
height="18"
|
||||
bottom="-307"
|
||||
left="10"
|
||||
top_pad="3"
|
||||
name="media_tex"
|
||||
width="190">
|
||||
Media:
|
||||
</text>
|
||||
<panel
|
||||
border="true"
|
||||
follows="left|top"
|
||||
mouse_opaque="false"
|
||||
background_visible="false"
|
||||
name="Add_Media"
|
||||
left="5"
|
||||
bottom="-358"
|
||||
height="54"
|
||||
width="260">
|
||||
<button
|
||||
follows="top|left"
|
||||
height="20"
|
||||
label="Add"
|
||||
name="add_media"
|
||||
tab_stop="false"
|
||||
top_delta="0"
|
||||
tool_tip="Add Media"
|
||||
left="153"
|
||||
bottom="-25"
|
||||
width="35">
|
||||
<button.commit_callback
|
||||
function="BuildTool.AddMedia"/>
|
||||
</button>
|
||||
<button
|
||||
follows="top|left"
|
||||
height="20"
|
||||
label="Rem"
|
||||
name="delete_media"
|
||||
tool_tip="Delete this media texture"
|
||||
left="188"
|
||||
bottom="-25"
|
||||
width="40">
|
||||
<button.commit_callback
|
||||
function="BuildTool.DeleteMedia"/>
|
||||
</button>
|
||||
<button
|
||||
follows="top|left"
|
||||
tool_tip="Edit this Media"
|
||||
height="20"
|
||||
label=">>"
|
||||
name="edit_media"
|
||||
left="228"
|
||||
bottom="-25"
|
||||
width="30">
|
||||
<button.commit_callback
|
||||
function="BuildTool.EditMedia"/>
|
||||
</button>
|
||||
<text
|
||||
follows="left|top|right"
|
||||
height="18"
|
||||
left="10"
|
||||
bottom="-46"
|
||||
use_ellipses="true"
|
||||
read_only="true"
|
||||
name="media_info"
|
||||
width="180" />
|
||||
<web_browser
|
||||
visible="false"
|
||||
enabled="false"
|
||||
border_visible="true"
|
||||
bottom_delta="0"
|
||||
follows="top|left"
|
||||
bottom="-5"
|
||||
name="title_media"
|
||||
width="4"
|
||||
height="4"
|
||||
start_url="about:blank"
|
||||
decouple_texture_size="true" />
|
||||
<button
|
||||
follows="right|top"
|
||||
height="20"
|
||||
label="Align"
|
||||
left="166"
|
||||
name="button align"
|
||||
bottom="-48"
|
||||
tool_tip="Align media texture (must load first)"
|
||||
width="80" />
|
||||
</panel>
|
||||
</panel>
|
||||
<panel border="true" bottom="-383" follows="left|top|right|bottom" height="367"
|
||||
label="Content" left="1" mouse_opaque="false" name="Contents" width="270">
|
||||
<button bottom="-30" follows="left|top" font="SansSerif" halign="center" height="20" label="New Script" label_selected="New Script" left="10" name="button new script" scale_image="TRUE" width="100"/>
|
||||
<button bottom_delta="0" left_delta="110" width="100" height="20" follows="left|top"
|
||||
|
||||
@@ -32,10 +32,11 @@
|
||||
width="815">
|
||||
<button
|
||||
bottom="0"
|
||||
tool_tip="Navigate back"
|
||||
follows="left|top"
|
||||
height="25"
|
||||
label=""
|
||||
image_overlay="go-previous-4.png"
|
||||
image_overlay="go-previous.png"
|
||||
left="0"
|
||||
name="back"
|
||||
width="25" >
|
||||
@@ -43,10 +44,11 @@
|
||||
function="WebContent.Back" />
|
||||
</button>
|
||||
<button
|
||||
tool_tip="Navigate forward"
|
||||
bottom_delta="0"
|
||||
follows="left|top"
|
||||
height="25" label=""
|
||||
image_overlay="go-next-4.png"
|
||||
image_overlay="go-next.png"
|
||||
left_delta="27"
|
||||
name="forward"
|
||||
width="25" >
|
||||
@@ -55,11 +57,12 @@
|
||||
</button>
|
||||
<button
|
||||
bottom_delta="0"
|
||||
tool_tip="Stop navigation"
|
||||
enabled="true"
|
||||
follows="left|top"
|
||||
height="25"
|
||||
label=""
|
||||
image_overlay="media_btn_stoploading.png"
|
||||
image_overlay="go-stop.png"
|
||||
name="stop"
|
||||
left_delta="27"
|
||||
width="25">
|
||||
@@ -67,11 +70,12 @@
|
||||
function="WebContent.Stop" />
|
||||
</button>
|
||||
<button
|
||||
tool_tip="Reload page"
|
||||
bottom_delta="0"
|
||||
follows="left|top"
|
||||
height="25"
|
||||
label=""
|
||||
image_overlay="view-refresh-5.png"
|
||||
image_overlay="go-reload.png"
|
||||
name="reload"
|
||||
left_delta="0"
|
||||
width="25" >
|
||||
@@ -86,20 +90,31 @@
|
||||
left_delta="29"
|
||||
max_chars="1024"
|
||||
name="address"
|
||||
tool_tip="Enter URL here"
|
||||
select_all_on_focus_received="true"
|
||||
bottom_delta="4"
|
||||
width="706">
|
||||
<combo_box.commit_callback
|
||||
function="WebContent.EnterAddress" />
|
||||
</combo_box>
|
||||
<icon
|
||||
name="media_secure_lock_flag"
|
||||
height="16"
|
||||
follows="top|right"
|
||||
image_name="lock.png"
|
||||
left_delta="667"
|
||||
bottom="6"
|
||||
tool_tip="Secured Browsing"
|
||||
width="16" />
|
||||
<button
|
||||
bottom_delta="-4"
|
||||
bottom_delta="-6"
|
||||
tool_tip="Open current URL in your desktop browser"
|
||||
follows="right|top"
|
||||
enabled="true"
|
||||
height="25"
|
||||
label=""
|
||||
image_overlay="media_btn_newwindow.png"
|
||||
left_delta="709"
|
||||
left_delta="41"
|
||||
name="popexternal"
|
||||
width="25">
|
||||
<button.commit_callback
|
||||
@@ -117,7 +132,7 @@
|
||||
width="540">
|
||||
<web_browser
|
||||
bottom="0"
|
||||
follows="left|right|top|bottom"
|
||||
follows="all"
|
||||
left="0"
|
||||
name="webbrowser"
|
||||
border_visible="false"
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
legacy_header_height="18"
|
||||
can_close="true"
|
||||
can_minimize="false"
|
||||
height="108"
|
||||
layout="topleft"
|
||||
name="whitelist_entry"
|
||||
single_instance="true"
|
||||
help_topic="whitelist_entry"
|
||||
title="WHITELIST ENTRY"
|
||||
width="390">
|
||||
|
||||
<text type="string" length="1" bottom="-35" follows="top|left" height="15"
|
||||
left="10" name="media_label">
|
||||
Enter a URL or URL pattern to add to the list of allowed domains
|
||||
</text>
|
||||
|
||||
<line_editor bottom_delta="-25" enabled="true" follows="left|top" font="SansSerif"
|
||||
height="20" left="10" name="whitelist_entry"
|
||||
tool_tip="Enter a URL or URL pattern to White List"
|
||||
width="350" />
|
||||
|
||||
<button follows="top|left" height="20" label="OK"
|
||||
layout="topleft" left="10" name="ok_btn" bottom_delta="-28" width="64" />
|
||||
|
||||
<button follows="top|left" height="20" label="Cancel"
|
||||
layout="topleft" left="79" name="cancel_btn" bottom_delta="0" width="64" />
|
||||
</floater>
|
||||
31
indra/newview/skins/default/xui/en-us/menu_media_ctrl.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<menu
|
||||
name="media ctrl context menu">
|
||||
<menu_item_call
|
||||
label="Cut"
|
||||
layout="topleft"
|
||||
name="Cut">
|
||||
<menu_item_call.on_click
|
||||
function="Edit.Cut" />
|
||||
<menu_item_call.on_enable
|
||||
function="Edit.EnableCut" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Copy"
|
||||
layout="topleft"
|
||||
name="Copy">
|
||||
<menu_item_call.on_click
|
||||
function="Edit.Copy" />
|
||||
<menu_item_call.on_enable
|
||||
function="Edit.EnableCopy" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Paste"
|
||||
layout="topleft"
|
||||
name="Paste">
|
||||
<menu_item_call.on_click
|
||||
function="Edit.Paste" />
|
||||
<menu_item_call.on_enable
|
||||
function="Edit.EnablePaste" />
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
@@ -952,6 +952,20 @@ This entire region is damage enabled.
|
||||
Scripts must be allowed to run for weapons to work.
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="MultipleFacesSelected"
|
||||
type="alertmodal">
|
||||
Multiple faces are currently selected.
|
||||
If you continue this action, separate instances of media will be set on multiple faces of the object.
|
||||
To place the media on only one face, choose Select Face and click on the desired face of that object then click Add.
|
||||
<tag>confirm</tag>
|
||||
<usetemplate
|
||||
ignoretext="Media will be set on multiple selected faces"
|
||||
name="okcancelignore"
|
||||
notext="Cancel"
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="MustBeInParcel"
|
||||
@@ -1107,6 +1121,21 @@ There is no reimbursement for fees paid.
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="DeleteMedia"
|
||||
type="alertmodal">
|
||||
You have selected to delete the media associated with this face.
|
||||
Are you sure you want to continue?
|
||||
<tag>confirm</tag>
|
||||
<usetemplate
|
||||
ignoretext="Confirm before I delete media from an object"
|
||||
name="okcancelignore"
|
||||
notext="No"
|
||||
yestext="Yes"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="ClassifiedSave"
|
||||
@@ -7612,6 +7641,23 @@ Your shape, skin, hair or eyes might be defect.
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
name="PopupAttempt"
|
||||
icon="alertmodal.tga"
|
||||
type="browser">
|
||||
A pop-up was prevented from opening.
|
||||
<form name="form">
|
||||
<ignore name="ignore"
|
||||
control="MediaEnablePopups"
|
||||
invert_control="true"
|
||||
text="Enable all pop-ups"/>
|
||||
<button default="true"
|
||||
index="0"
|
||||
name="open"
|
||||
text="Open pop-up window"/>
|
||||
</form>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
label="All settings reset"
|
||||
|
||||