Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer into Frosting
Conflicts: indra/newview/llviewerwindow.cpp
This commit is contained in:
@@ -373,7 +373,7 @@ void AIEngine::setMaxCount(F32 StateMachineMaxTime)
|
||||
sMaxCount = calc_clock_frequency() * StateMachineMaxTime / 1000;
|
||||
}
|
||||
|
||||
#ifdef CWDEBUG
|
||||
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
|
||||
char const* AIStateMachine::event_str(event_type event)
|
||||
{
|
||||
switch(event)
|
||||
|
||||
@@ -271,7 +271,7 @@ class AIStateMachine : public LLThreadSafeRefCount
|
||||
|
||||
// Return stringified state, for debugging purposes.
|
||||
char const* state_str(base_state_type state);
|
||||
#ifdef CWDEBUG
|
||||
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
|
||||
char const* event_str(event_type event);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ if (WINDOWS)
|
||||
endif (MSVC10)
|
||||
|
||||
# Remove default /Zm1000 flag that cmake inserts
|
||||
string (REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
string (REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
|
||||
# Don't build DLLs.
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.6.4)
|
||||
project(ndPathingLib CXX C)
|
||||
|
||||
if( MSVC )
|
||||
add_definitions(-D_HAS_ITERATOR_DEBUGGING=0 -D_SECURE_SCL=0 -D_CRT_SECURE_NO_WARNINGS=1)
|
||||
add_definitions(-D_SECURE_SCL=0 -D_CRT_SECURE_NO_WARNINGS=1)
|
||||
endif( MSVC )
|
||||
|
||||
file (GLOB SOURCE_FILES *.cpp )
|
||||
|
||||
@@ -1022,6 +1022,16 @@ void mask_to_string(U32 mask, char* str)
|
||||
{
|
||||
*str = ' ';
|
||||
}
|
||||
str++;
|
||||
|
||||
if (mask & PERM_EXPORT)
|
||||
{
|
||||
*str = 'E';
|
||||
}
|
||||
else
|
||||
{
|
||||
*str = ' ';
|
||||
}
|
||||
str++;
|
||||
*str = '\0';
|
||||
}
|
||||
|
||||
@@ -52,6 +52,9 @@ const PermissionBit PERM_MODIFY = (1 << 14); // 0x00004000
|
||||
// objects, allow copy
|
||||
const PermissionBit PERM_COPY = (1 << 15); // 0x00008000
|
||||
|
||||
// objects, allow exporting
|
||||
const PermissionBit PERM_EXPORT = (1 << 16); // 0x00010000
|
||||
|
||||
// parcels, allow entry, deprecated
|
||||
//const PermissionBit PERM_ENTER = (1 << 16); // 0x00010000
|
||||
|
||||
|
||||
@@ -110,11 +110,13 @@ protected:
|
||||
LLGLEnable mBlend, mAlphaTest;
|
||||
LLGLDisable mCullFace;
|
||||
LLGLDepthTest mDepthTest;
|
||||
LLGLDisable mMSAA;
|
||||
public:
|
||||
LLGLSUIDefault()
|
||||
: mBlend(GL_BLEND), mAlphaTest(GL_ALPHA_TEST),
|
||||
mCullFace(GL_CULL_FACE),
|
||||
mDepthTest(GL_FALSE, GL_TRUE, GL_LEQUAL)
|
||||
mDepthTest(GL_FALSE, GL_TRUE, GL_LEQUAL),
|
||||
mMSAA(GL_MULTISAMPLE_ARB)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
@@ -1495,7 +1495,7 @@ void LLRender::translateUI(F32 x, F32 y, F32 z)
|
||||
llerrs << "Need to push a UI translation frame before offsetting" << llendl;
|
||||
}
|
||||
|
||||
LLVector4a add(x,y,x);
|
||||
LLVector4a add(x,y,z);
|
||||
mUIOffset.back()->add(add);
|
||||
}
|
||||
|
||||
@@ -1564,13 +1564,13 @@ LLVector3 LLRender::getUIScale()
|
||||
{
|
||||
return LLVector3(1,1,1);
|
||||
}
|
||||
return LLVector3(mUIOffset.back()->getF32ptr());
|
||||
return LLVector3(mUIScale.back()->getF32ptr());
|
||||
}
|
||||
|
||||
|
||||
void LLRender::loadUIIdentity()
|
||||
{
|
||||
if (mUIOffset.empty())
|
||||
if (mUIOffset.empty() || mUIScale.empty())
|
||||
{
|
||||
llerrs << "Need to push UI translation frame before clearing offset." << llendl;
|
||||
}
|
||||
@@ -1730,8 +1730,10 @@ void LLRender::blendFunc(eBlendFactor color_sfactor, eBlendFactor color_dfactor,
|
||||
mCurrBlendAlphaSFactor = alpha_sfactor;
|
||||
mCurrBlendColorDFactor = color_dfactor;
|
||||
mCurrBlendAlphaDFactor = alpha_dfactor;
|
||||
blendfunc_debug[0]=blendfunc_debug[2]=color_sfactor;
|
||||
blendfunc_debug[1]=blendfunc_debug[3]=alpha_sfactor;
|
||||
blendfunc_debug[0]=color_sfactor;
|
||||
blendfunc_debug[1]=alpha_sfactor;
|
||||
blendfunc_debug[2]=color_dfactor;
|
||||
blendfunc_debug[3]=alpha_dfactor;
|
||||
flush();
|
||||
glBlendFuncSeparateEXT(sGLBlendFactor[color_sfactor], sGLBlendFactor[color_dfactor],
|
||||
sGLBlendFactor[alpha_sfactor], sGLBlendFactor[alpha_dfactor]);
|
||||
|
||||
@@ -107,7 +107,7 @@ static const LLFONT_ID FONT_NAME = LLFONT_SANSSERIF;
|
||||
LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal)
|
||||
: LLModalDialog( notification->getLabel(), 100, 100, modal ), // dummy size. Will reshape below.
|
||||
LLInstanceTracker<LLAlertDialog, LLUUID>(notification->getID()),
|
||||
mDefaultOption( 0 ),
|
||||
mDefaultButton( NULL ),
|
||||
mCheck(NULL),
|
||||
mCaution(notification->getPriority() >= NOTIFICATION_PRIORITY_HIGH),
|
||||
mLabel(notification->getName()),
|
||||
@@ -126,35 +126,24 @@ LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal)
|
||||
setBackgroundVisible(TRUE);
|
||||
setBackgroundOpaque(TRUE);
|
||||
|
||||
|
||||
typedef std::vector<std::pair<std::string, std::string> > options_t;
|
||||
options_t supplied_options;
|
||||
typedef std::list<ButtonData> options_t;
|
||||
options_t options;
|
||||
|
||||
// for now, get LLSD to iterator over form elements
|
||||
LLSD form_sd = form->asLLSD();
|
||||
|
||||
S32 option_index = 0;
|
||||
for (LLSD::array_const_iterator it = form_sd.beginArray(); it != form_sd.endArray(); ++it)
|
||||
{
|
||||
std::string type = (*it)["type"].asString();
|
||||
if (type == "button")
|
||||
{
|
||||
if((*it)["default"])
|
||||
{
|
||||
mDefaultOption = option_index;
|
||||
}
|
||||
|
||||
supplied_options.push_back(std::make_pair((*it)["name"].asString(), (*it)["text"].asString()));
|
||||
|
||||
ButtonData data;
|
||||
data.mSelf = this;
|
||||
if (option_index == mNote->getURLOption())
|
||||
{
|
||||
data.mURL = mNote->getURL();
|
||||
}
|
||||
|
||||
mButtonData.push_back(data);
|
||||
option_index++;
|
||||
options.push_back(ButtonData());
|
||||
ButtonData& button_data = options.back();
|
||||
button_data.mName = (*it)["name"].asString();
|
||||
button_data.mText = (*it)["text"].asString();
|
||||
button_data.mDefault = (*it)["default"].asBoolean();
|
||||
if(options.size()-1 == mNote->getURLOption())
|
||||
button_data.mUrl = mNote->getURL();
|
||||
}
|
||||
else if (type == "text")
|
||||
{
|
||||
@@ -168,23 +157,14 @@ LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal)
|
||||
is_password = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Buttons
|
||||
options_t options;
|
||||
if (supplied_options.empty())
|
||||
if (options.empty())
|
||||
{
|
||||
options.push_back(std::make_pair(std::string("close"), std::string("Close")));
|
||||
|
||||
// add data for ok button.
|
||||
ButtonData ok_button;
|
||||
ok_button.mSelf = this;
|
||||
|
||||
mButtonData.push_back(ok_button);
|
||||
mDefaultOption = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
options = supplied_options;
|
||||
options.push_back(ButtonData());
|
||||
ButtonData& button_data = options.back();
|
||||
button_data.mName = "close";
|
||||
button_data.mText = "Close";
|
||||
button_data.mDefault = true;
|
||||
}
|
||||
|
||||
S32 num_options = options.size();
|
||||
@@ -192,9 +172,9 @@ LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal)
|
||||
// Calc total width of buttons
|
||||
S32 button_width = 0;
|
||||
S32 sp = font->getWidth(std::string("OO"));
|
||||
for( S32 i = 0; i < num_options; i++ )
|
||||
for( options_t::iterator it = options.begin(); it != options.end(); it++ )
|
||||
{
|
||||
S32 w = S32(font->getWidth( options[i].second ) + 0.99f) + sp + 2 * LLBUTTON_H_PAD;
|
||||
S32 w = S32(font->getWidth( it->mText ) + 0.99f) + sp + 2 * LLBUTTON_H_PAD;
|
||||
button_width = llmax( w, button_width );
|
||||
}
|
||||
S32 btn_total_width = button_width;
|
||||
@@ -261,33 +241,37 @@ LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal)
|
||||
// Buttons
|
||||
S32 button_left = (getRect().getWidth() - btn_total_width) / 2;
|
||||
|
||||
for( S32 i = 0; i < num_options; i++ )
|
||||
for( options_t::iterator it = options.begin(); it != options.end(); it++ )
|
||||
{
|
||||
LLRect button_rect;
|
||||
button_rect.setOriginAndSize( button_left, VPAD, button_width, BTN_HEIGHT );
|
||||
|
||||
ButtonData& button_data = *it;
|
||||
|
||||
LLButton* btn = new LLButton(
|
||||
options[i].first, button_rect,
|
||||
button_data.mName, button_rect,
|
||||
"","", "",
|
||||
NULL, NULL,
|
||||
font,
|
||||
options[i].second,
|
||||
options[i].second);
|
||||
button_data.mText,
|
||||
button_data.mText);
|
||||
|
||||
mButtonData[i].mButton = btn;
|
||||
|
||||
btn->setClickedCallback(&LLAlertDialog::onButtonPressed, (void*)(&mButtonData[i]));
|
||||
btn->setClickedCallback(boost::bind(&LLAlertDialog::onButtonPressed, this, _1, button_data.mUrl));
|
||||
|
||||
addChild(btn);
|
||||
|
||||
if( i == mDefaultOption )
|
||||
if(!mDefaultButton || button_data.mDefault)
|
||||
{
|
||||
btn->setFocus(TRUE);
|
||||
mDefaultButton = btn;
|
||||
}
|
||||
|
||||
button_left += button_width + BTN_HPAD;
|
||||
}
|
||||
|
||||
llassert(mDefaultButton); //'options' map should never be empty, thus mDefaultButton should always get set in the above loop.
|
||||
mDefaultButton->setFocus(TRUE);
|
||||
|
||||
|
||||
// (Optional) Edit Box
|
||||
if (!edit_text_name.empty())
|
||||
{
|
||||
@@ -346,7 +330,7 @@ bool LLAlertDialog::show()
|
||||
mLineEditor->setFocus(TRUE);
|
||||
mLineEditor->selectAll();
|
||||
}
|
||||
if(mDefaultOption >= 0)
|
||||
if(mDefaultButton)
|
||||
{
|
||||
// delay before enabling default button
|
||||
mDefaultBtnTimer.start(DEFAULT_BUTTON_DELAY);
|
||||
@@ -385,7 +369,8 @@ bool LLAlertDialog::setCheckBox( const std::string& check_title, const std::stri
|
||||
check_rect.setOriginAndSize(msg_x, VPAD+BTN_HEIGHT+LINE_HEIGHT/2,
|
||||
max_msg_width, LINE_HEIGHT);
|
||||
|
||||
mCheck = new LLCheckboxCtrl(std::string("check"), check_rect, check_title, font, onClickIgnore, this);
|
||||
mCheck = new LLCheckboxCtrl(std::string("check"), check_rect, check_title, font);
|
||||
mCheck->setCommitCallback(boost::bind(&LLAlertDialog::onClickIgnore, this, _1));
|
||||
addChild(mCheck);
|
||||
|
||||
return true;
|
||||
@@ -402,8 +387,49 @@ void LLAlertDialog::setVisible( BOOL visible )
|
||||
}
|
||||
}
|
||||
|
||||
//Fixing a hole in alert logic. If the alert isn't modal, clicking 'x' to close its floater would result
|
||||
//in a dangling notification. To address this we try to find the most reasonable button to emulate clicking.
|
||||
//Close tends to be the best, as it's most accurate, and is the default for alerts that lack defined buttons.
|
||||
//Next up is cancel, which is the correct behavior for a majority of alert notifications
|
||||
//After that, try 'ok', which is the only button that exists for a few alert notifications. 'ok' for these equates to 'dismiss'.
|
||||
//Finally, if none of the above are found, issue the respond procedure with the dummy button name 'close'.
|
||||
void LLAlertDialog::onClose(bool app_quitting)
|
||||
{
|
||||
if(mNote.get() && !mNote->isRespondedTo() && !mNote->isIgnored())
|
||||
{
|
||||
LLButton* btn = NULL;
|
||||
bool found_cancel = false;
|
||||
for(child_list_const_iter_t it = beginChild(); it != endChild(); ++it)
|
||||
{
|
||||
LLButton* cur_btn = dynamic_cast<LLButton*>(*it);
|
||||
if(!cur_btn)
|
||||
continue;
|
||||
if( LLStringUtil::compareInsensitive(cur_btn->getName(), "close") == 0 )//prefer 'close' over anything else.
|
||||
{
|
||||
btn = cur_btn;
|
||||
break;
|
||||
}
|
||||
else if(LLStringUtil::compareInsensitive(cur_btn->getName(), "cancel") == 0 )//prefer 'cancel' over 'ok'.
|
||||
{
|
||||
btn = cur_btn;
|
||||
found_cancel = true;
|
||||
}
|
||||
else if(!found_cancel && LLStringUtil::compareInsensitive(cur_btn->getName(), "ok") == 0 )//accept 'ok' as last resort.
|
||||
{
|
||||
btn = cur_btn;
|
||||
}
|
||||
}
|
||||
LLSD response = mNote->getResponseTemplate();
|
||||
if(btn)
|
||||
response[btn->getName()] = true;
|
||||
else
|
||||
{ //We found no acceptable button so just feed it a fake one.
|
||||
//LLNotification::getSelectedOption will return -1 in notification callbacks.
|
||||
response["Close"] = true;
|
||||
}
|
||||
mNote->respond(response);
|
||||
|
||||
}
|
||||
LLModalDialog::onClose(app_quitting);
|
||||
}
|
||||
|
||||
@@ -458,7 +484,7 @@ void LLAlertDialog::draw()
|
||||
if(mDefaultBtnTimer.hasExpired() && mDefaultBtnTimer.getStarted())
|
||||
{
|
||||
mDefaultBtnTimer.stop(); // prevent this block from being run more than once
|
||||
setDefaultBtn(mButtonData[mDefaultOption].mButton);
|
||||
setDefaultBtn(mDefaultButton);
|
||||
}
|
||||
|
||||
static LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow");
|
||||
@@ -483,44 +509,37 @@ void LLAlertDialog::setEditTextArgs(const LLSD& edit_args)
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLAlertDialog::onButtonPressed( void* userdata )
|
||||
void LLAlertDialog::onButtonPressed( LLUICtrl* ctrl, const std::string url )
|
||||
{
|
||||
ButtonData* button_data = (ButtonData*)userdata;
|
||||
LLAlertDialog* self = button_data->mSelf;
|
||||
|
||||
LLSD response = self->mNote->getResponseTemplate();
|
||||
if (self->mLineEditor)
|
||||
LLSD response = mNote->getResponseTemplate();
|
||||
if (mLineEditor)
|
||||
{
|
||||
response[self->mLineEditor->getName()] = self->mLineEditor->getValue();
|
||||
response[mLineEditor->getName()] = mLineEditor->getValue();
|
||||
}
|
||||
response[button_data->mButton->getName()] = true;
|
||||
response[ctrl->getName()] = true;
|
||||
|
||||
// If we declared a URL and chose the URL option, go to the url
|
||||
if (!button_data->mURL.empty() && sURLLoader != NULL)
|
||||
if (!url.empty() && sURLLoader != NULL)
|
||||
{
|
||||
sURLLoader->load(button_data->mURL);
|
||||
sURLLoader->load(url);
|
||||
}
|
||||
|
||||
self->mNote->respond(response); // new notification reponse
|
||||
self->close(); // deletes self
|
||||
mNote->respond(response); // new notification reponse
|
||||
close(); // deletes self
|
||||
}
|
||||
|
||||
//static
|
||||
void LLAlertDialog::onClickIgnore(LLUICtrl* ctrl, void* user_data)
|
||||
void LLAlertDialog::onClickIgnore(LLUICtrl* ctrl)
|
||||
{
|
||||
LLAlertDialog* self = (LLAlertDialog*)user_data;
|
||||
|
||||
// checkbox sometimes means "hide and do the default" and
|
||||
// other times means "warn me again". Yuck. JC
|
||||
BOOL check = ctrl->getValue();
|
||||
if (self->mNote->getForm()->getIgnoreType() == LLNotificationForm::IGNORE_SHOW_AGAIN)
|
||||
if (mNote->getForm()->getIgnoreType() == LLNotificationForm::IGNORE_SHOW_AGAIN)
|
||||
{
|
||||
// question was "show again" so invert value to get "ignore"
|
||||
check = !check;
|
||||
}
|
||||
|
||||
self->mNote->setIgnored(check);
|
||||
mNote->setIgnored(check);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -87,8 +87,8 @@ public:
|
||||
//statics
|
||||
static void initClass();
|
||||
static bool onNewNotification(const LLSD& notify, bool is_modal);
|
||||
static void onButtonPressed(void* userdata);
|
||||
static void onClickIgnore(LLUICtrl* ctrl, void* user_data);
|
||||
void onButtonPressed( LLUICtrl* ctrl, const std::string url );
|
||||
void onClickIgnore( LLUICtrl* ctrl );
|
||||
|
||||
private:
|
||||
LLNotificationPtr mNote;
|
||||
@@ -102,18 +102,18 @@ private:
|
||||
BOOL hasTitleBar() const;
|
||||
|
||||
private:
|
||||
struct ButtonData
|
||||
{
|
||||
std::string mName;
|
||||
std::string mText;
|
||||
bool mDefault;
|
||||
std::string mUrl;
|
||||
};
|
||||
|
||||
static URLLoader* sURLLoader;
|
||||
static LLControlGroup* sSettings;
|
||||
|
||||
struct ButtonData
|
||||
{
|
||||
LLAlertDialog* mSelf;
|
||||
LLButton* mButton;
|
||||
std::string mURL;
|
||||
};
|
||||
std::vector<ButtonData> mButtonData;
|
||||
|
||||
S32 mDefaultOption;
|
||||
LLButton* mDefaultButton;
|
||||
LLCheckBoxCtrl* mCheck;
|
||||
BOOL mCaution;
|
||||
BOOL mUnique;
|
||||
|
||||
@@ -1094,6 +1094,7 @@ LLNotificationChannelPtr LLNotifications::getChannel(const std::string& channelN
|
||||
if(p == mChannels.end())
|
||||
{
|
||||
llerrs << "Did not find channel named " << channelName << llendl;
|
||||
return LLNotificationChannelPtr();
|
||||
}
|
||||
return p->second;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
|
||||
BOOL focusNextItem(BOOL text_entry_only);
|
||||
BOOL focusPrevItem(BOOL text_entry_only);
|
||||
BOOL focusFirstItem(BOOL prefer_text_fields = FALSE, BOOL focus_flash = TRUE );
|
||||
virtual BOOL focusFirstItem(BOOL prefer_text_fields = FALSE, BOOL focus_flash = TRUE );
|
||||
BOOL focusLastItem(BOOL prefer_text_fields = FALSE);
|
||||
|
||||
// Non Virtuals
|
||||
|
||||
@@ -97,6 +97,7 @@ set(viewer_SOURCE_FILES
|
||||
hippopanelgrids.cpp
|
||||
importtracker.cpp
|
||||
jcfloaterareasearch.cpp
|
||||
lfsimfeaturehandler.cpp
|
||||
lggdicdownload.cpp
|
||||
lgghunspell_wrapper.cpp
|
||||
llaccountingcostmanager.cpp
|
||||
@@ -597,6 +598,7 @@ set(viewer_HEADER_FILES
|
||||
hippopanelgrids.h
|
||||
importtracker.h
|
||||
jcfloaterareasearch.h
|
||||
lfsimfeaturehandler.h
|
||||
lggdicdownload.h
|
||||
lgghunspell_wrapper.h
|
||||
llaccountingcostmanager.h
|
||||
|
||||
@@ -314,6 +314,17 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>EveryoneExport</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether content you upload has exportability permission by default</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RLVaLoginLastLocation</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
<key>Value</key>
|
||||
<real>1</real>
|
||||
</map>
|
||||
<key>SHAlphaMaskMaxRMSE</key>
|
||||
<key>SHAutoMaskMaxRMSE</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Sets the maximum random mean square error cutoff used when detecting suitable textures for alphamasking. (SHUseRMSEAutoMask must be TRUE for this to have any effect)</string>
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#include <llradiogroup.h>
|
||||
#include <lluictrlfactory.h>
|
||||
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llviewerwindow.h"
|
||||
|
||||
|
||||
@@ -58,7 +60,7 @@ class HippoFloaterXmlImpl : public LLFloater
|
||||
BOOL postBuild();
|
||||
void onClose(bool quitting);
|
||||
|
||||
static bool execute(LLUICtrl *ctrl,
|
||||
static bool execute(LLFloater *floater, LLUICtrl *ctrl,
|
||||
const std::string &cmds, std::string::size_type &offset,
|
||||
std::string &response);
|
||||
|
||||
@@ -218,7 +220,7 @@ void HippoFloaterXml::execute(const std::string &cmds)
|
||||
if (token == "{") {
|
||||
if (floater) {
|
||||
std::string response;
|
||||
if (!floater->execute(floater, cmds, offset, response))
|
||||
if (!floater->execute(floater, floater, cmds, offset, response))
|
||||
break;
|
||||
if (!response.empty())
|
||||
send_chat_from_viewer(response, CHAT_TYPE_WHISPER, CHANNEL);
|
||||
@@ -275,6 +277,30 @@ static void notifyCallback(void *c)
|
||||
send_chat_from_viewer(msg, CHAT_TYPE_WHISPER, CHANNEL);
|
||||
}
|
||||
|
||||
void callbackAvatarPick(void *c, const uuid_vec_t& ids, const std::vector<LLAvatarName>& names)
|
||||
{
|
||||
LLUICtrl *ctrl = (LLUICtrl *)c;
|
||||
|
||||
LLUUID id = ids[0];
|
||||
|
||||
std::string msg = "PICKER:";
|
||||
msg += ctrl->getName();
|
||||
msg += ':';
|
||||
msg += id.asString();
|
||||
msg += ':';
|
||||
msg += names[0].getCompleteName();
|
||||
send_chat_from_viewer(msg, CHAT_TYPE_WHISPER, CHANNEL);
|
||||
}
|
||||
|
||||
static void pickerCallback(void *c, void *f)
|
||||
{
|
||||
LLUICtrl *ctrl = (LLUICtrl *)c;
|
||||
HippoFloaterXmlImpl* floaterp = (HippoFloaterXmlImpl*)f;
|
||||
|
||||
floaterp->addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&callbackAvatarPick, ctrl, _1, _2), FALSE, TRUE));
|
||||
//send_chat_from_viewer(msg, CHAT_TYPE_WHISPER, CHANNEL);
|
||||
}
|
||||
|
||||
void HippoFloaterXmlImpl::onClose(bool quitting)
|
||||
{
|
||||
if (mIsNotifyOnClose)
|
||||
@@ -283,11 +309,10 @@ void HippoFloaterXmlImpl::onClose(bool quitting)
|
||||
LLFloater::onClose(quitting);
|
||||
}
|
||||
|
||||
|
||||
// ********************************************************************
|
||||
// execute commands on instance
|
||||
|
||||
bool HippoFloaterXmlImpl::execute(LLUICtrl *ctrl,
|
||||
bool HippoFloaterXmlImpl::execute(LLFloater *floater, LLUICtrl *ctrl,
|
||||
const std::string &cmds, std::string::size_type &offset,
|
||||
std::string &response)
|
||||
{
|
||||
@@ -313,7 +338,7 @@ bool HippoFloaterXmlImpl::execute(LLUICtrl *ctrl,
|
||||
if (!child) return false;
|
||||
if (!cmdGetToken(cmds, offset, token)) return false;
|
||||
if (token != "{") return false;
|
||||
if (!execute(child, cmds, offset, response))
|
||||
if (!execute(floater, child, cmds, offset, response))
|
||||
return false;
|
||||
} else if (key == "setValue") {
|
||||
ctrl->setValue(value);
|
||||
@@ -331,6 +356,14 @@ bool HippoFloaterXmlImpl::execute(LLUICtrl *ctrl,
|
||||
else
|
||||
ctrl->setCommitCallback(0);
|
||||
}
|
||||
} else if (key == "picker") {
|
||||
bool set = (value != "0");
|
||||
if (!dynamic_cast<HippoFloaterXmlImpl*>(ctrl)) {
|
||||
if (set)
|
||||
ctrl->setCommitCallback(boost::bind(&pickerCallback, _1, floater), ctrl);
|
||||
else
|
||||
ctrl->setCommitCallback(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
66
indra/newview/lfsimfeaturehandler.cpp
Normal file
66
indra/newview/lfsimfeaturehandler.cpp
Normal file
@@ -0,0 +1,66 @@
|
||||
/* Copyright (C) 2013 Liru Færs
|
||||
*
|
||||
* 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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 */
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "lfsimfeaturehandler.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llenvmanager.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "hippogridmanager.h"
|
||||
|
||||
LFSimFeatureHandler::LFSimFeatureHandler()
|
||||
: mSupportsExport(false)
|
||||
{
|
||||
if (!gHippoGridManager->getCurrentGrid()->isSecondLife()) // Remove this line if we ever handle SecondLife sim features
|
||||
LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LFSimFeatureHandler::handleRegionChange, this));
|
||||
}
|
||||
|
||||
void LFSimFeatureHandler::handleRegionChange()
|
||||
{
|
||||
if (LLViewerRegion* region = gAgent.getRegion())
|
||||
{
|
||||
if (region->getFeaturesReceived())
|
||||
{
|
||||
setSupportedFeatures();
|
||||
}
|
||||
else
|
||||
{
|
||||
region->setFeaturesReceivedCallback(boost::bind(&LFSimFeatureHandler::setSupportedFeatures, this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LFSimFeatureHandler::setSupportedFeatures()
|
||||
{
|
||||
if (LLViewerRegion* region = gAgent.getRegion())
|
||||
{
|
||||
LLSD info;
|
||||
region->getSimulatorFeatures(info);
|
||||
//if (!gHippoGridManager->getCurrentGrid()->isSecondLife()) // Non-SL specific sim features
|
||||
{
|
||||
mSupportsExport = info.has("ExportSupported");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boost::signals2::connection LFSimFeatureHandler::setSupportsExportCallback(const boost::signals2::signal<void()>::slot_type& slot)
|
||||
{
|
||||
return mSupportsExport.connect(slot);
|
||||
}
|
||||
|
||||
70
indra/newview/lfsimfeaturehandler.h
Normal file
70
indra/newview/lfsimfeaturehandler.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/* Copyright (C) 2013 Liru Færs
|
||||
*
|
||||
* 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; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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 */
|
||||
|
||||
#ifndef LFSIMFEATUREHANDLER_H
|
||||
#define LFSIMFEATUREHANDLER_H
|
||||
|
||||
#include "llsingleton.h"
|
||||
|
||||
template<typename Type>
|
||||
class SignaledType
|
||||
{
|
||||
public:
|
||||
SignaledType(Type b) : mValue(b) {}
|
||||
|
||||
template<typename Slot>
|
||||
boost::signals2::connection connect(Slot slot) { return mSignal.connect(slot); }
|
||||
|
||||
SignaledType& operator =(Type val)
|
||||
{
|
||||
if (val != mValue)
|
||||
{
|
||||
mValue = val;
|
||||
mSignal();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
operator Type() const { return mValue; }
|
||||
|
||||
private:
|
||||
boost::signals2::signal<void()> mSignal;
|
||||
Type mValue;
|
||||
};
|
||||
|
||||
class LFSimFeatureHandler : public LLSingleton<LFSimFeatureHandler>
|
||||
{
|
||||
protected:
|
||||
friend class LLSingleton<LFSimFeatureHandler>;
|
||||
LFSimFeatureHandler();
|
||||
|
||||
public:
|
||||
void handleRegionChange();
|
||||
void setSupportedFeatures();
|
||||
|
||||
// Connection setters
|
||||
boost::signals2::connection setSupportsExportCallback(const boost::signals2::signal<void()>::slot_type& slot);
|
||||
|
||||
// Accessors
|
||||
bool simSupportsExport() const { return mSupportsExport; }
|
||||
|
||||
private:
|
||||
// SignaledTypes
|
||||
SignaledType<bool> mSupportsExport;
|
||||
};
|
||||
|
||||
#endif //LFSIMFEATUREHANDLER_H
|
||||
|
||||
@@ -1068,10 +1068,10 @@ bool LLFace::canRenderAsMask()
|
||||
const LLTextureEntry* te = getTextureEntry();
|
||||
|
||||
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
||||
static const LLCachedControl<F32> alpha_mas_max_rmse("SHAlphaMaskMaxRMSE",.09f);
|
||||
static const LLCachedControl<F32> auto_mask_max_rmse("SHAutoMaskMaxRMSE",.09f);
|
||||
if ((te->getColor().mV[3] == 1.0f) && // can't treat as mask if we have face alpha
|
||||
(te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask
|
||||
getTexture()->getIsAlphaMask(use_rmse_auto_mask ? alpha_mas_max_rmse : -1.f)) // texture actually qualifies for masking (lazily recalculated but expensive)
|
||||
(!getViewerObject()->isAttachment() && getTexture()->getIsAlphaMask(use_rmse_auto_mask ? auto_mask_max_rmse : -1.f))) // texture actually qualifies for masking (lazily recalculated but expensive)
|
||||
{
|
||||
if (LLPipeline::sRenderDeferred)
|
||||
{
|
||||
|
||||
@@ -187,7 +187,15 @@ void LLFloaterChat::handleVisibilityChange(BOOL new_visibility)
|
||||
// virtual
|
||||
void LLFloaterChat::onFocusReceived()
|
||||
{
|
||||
gFocusMgr.setKeyboardFocus(getChildView("Chat Editor")); // Work around the chat bar no longer focusing from within the layout_stack
|
||||
LLView* chat_editor = getChildView("Chat Editor");
|
||||
if (getVisible() && childIsVisible("Chat Editor"))
|
||||
{
|
||||
gFocusMgr.setKeyboardFocus(chat_editor);
|
||||
|
||||
LLUICtrl * ctrl = static_cast<LLUICtrl*>(chat_editor);
|
||||
ctrl->setFocus(TRUE);
|
||||
}
|
||||
|
||||
LLFloater::onFocusReceived();
|
||||
}
|
||||
|
||||
@@ -740,3 +748,20 @@ void LLFloaterChat::hide(LLFloater* instance, const LLSD& key)
|
||||
VisibilityPolicy<LLFloater>::hide(instance, key);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLFloaterChat::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash )
|
||||
{
|
||||
LLView* chat_editor = getChildView("Chat Editor");
|
||||
if (getVisible() && childIsVisible("Chat Editor"))
|
||||
{
|
||||
gFocusMgr.setKeyboardFocus(chat_editor);
|
||||
|
||||
LLUICtrl * ctrl = static_cast<LLUICtrl*>(chat_editor);
|
||||
ctrl->setFocus(TRUE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return LLUICtrl::focusFirstItem(prefer_text_fields, focus_flash);
|
||||
}
|
||||
|
||||
|
||||
@@ -98,6 +98,8 @@ public:
|
||||
LLPanelActiveSpeakers* mPanel;
|
||||
BOOL mScrolledToEnd;
|
||||
|
||||
BOOL focusFirstItem(BOOL prefer_text_fields = FALSE, BOOL focus_flash = TRUE );
|
||||
|
||||
CachedUICtrl<LLButton> mToggleActiveSpeakersBtn;
|
||||
CachedUICtrl<LLChatBar> mChatPanel;
|
||||
};
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "lfsimfeaturehandler.h"
|
||||
#include "llalertdialog.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llfloaterperms.h"
|
||||
@@ -40,7 +41,35 @@
|
||||
#include "llviewerwindow.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llpermissions.h"
|
||||
#include "hippogridmanager.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
bool everyone_export;
|
||||
void handle_checkboxes(LLUICtrl* ctrl, const LLSD& value)
|
||||
{
|
||||
LLPanel* view = static_cast<LLPanel*>(ctrl->getParent());
|
||||
if (ctrl->getName() == "everyone_export")
|
||||
{
|
||||
view->childSetEnabled("next_owner_copy", !value);
|
||||
view->childSetEnabled("next_owner_modify", !value);
|
||||
view->childSetEnabled("next_owner_transfer", !value);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ctrl->getName() == "next_owner_copy")
|
||||
{
|
||||
if (!value) // Implements fair use
|
||||
gSavedSettings.setBOOL("NextOwnerTransfer", true);
|
||||
view->childSetEnabled("next_owner_transfer", value);
|
||||
}
|
||||
if (!value) // If any of these are unchecked, export can no longer be checked.
|
||||
view->childSetEnabled("everyone_export", false);
|
||||
else
|
||||
view->childSetEnabled("everyone_export", LFSimFeatureHandler::instance().simSupportsExport() && (LLFloaterPerms::getNextOwnerPerms() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LLFloaterPerms::LLFloaterPerms(const LLSD& seed)
|
||||
{
|
||||
@@ -49,11 +78,35 @@ LLFloaterPerms::LLFloaterPerms(const LLSD& seed)
|
||||
|
||||
BOOL LLFloaterPerms::postBuild()
|
||||
{
|
||||
childSetEnabled("next_owner_transfer", gSavedSettings.getBOOL("NextOwnerCopy"));
|
||||
//handle_checkboxes
|
||||
{
|
||||
bool export_support = LFSimFeatureHandler::instance().simSupportsExport();
|
||||
const U32 next_owner_perms = getNextOwnerPerms();
|
||||
childSetEnabled("everyone_export", export_support && (next_owner_perms & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED);
|
||||
if (!gHippoGridManager->getCurrentGrid()->isSecondLife())
|
||||
childSetVisible("everyone_export", false);
|
||||
|
||||
if (!(next_owner_perms & PERM_COPY))
|
||||
{
|
||||
childSetEnabled("next_owner_transfer", false);
|
||||
}
|
||||
else if (export_support)
|
||||
{
|
||||
bool export_off = !gSavedPerAccountSettings.getBOOL("EveryoneExport");
|
||||
childSetEnabled("next_owner_copy", export_off);
|
||||
childSetEnabled("next_owner_modify", export_off);
|
||||
childSetEnabled("next_owner_transfer", export_off);
|
||||
}
|
||||
else // Set EveryoneExport false, just in case.
|
||||
gSavedPerAccountSettings.setBOOL("EveryoneExport", false);
|
||||
}
|
||||
childSetAction("help", onClickHelp, this);
|
||||
childSetAction("ok", onClickOK, this);
|
||||
childSetAction("cancel", onClickCancel, this);
|
||||
childSetCommitCallback("next_owner_copy", &onCommitCopy, this);
|
||||
getChild<LLUICtrl>("next_owner_copy")->setCommitCallback(handle_checkboxes);
|
||||
getChild<LLUICtrl>("next_owner_modify")->setCommitCallback(handle_checkboxes);
|
||||
getChild<LLUICtrl>("next_owner_transfer")->setCommitCallback(handle_checkboxes);
|
||||
getChild<LLUICtrl>("everyone_export")->setCommitCallback(handle_checkboxes);
|
||||
|
||||
refresh();
|
||||
|
||||
@@ -76,20 +129,6 @@ void LLFloaterPerms::onClickCancel(void* data)
|
||||
self->close();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterPerms::onCommitCopy(LLUICtrl* ctrl, void* data)
|
||||
{
|
||||
LLFloaterPerms* self = static_cast<LLFloaterPerms*>(data);
|
||||
// Implements fair use
|
||||
BOOL copyable = gSavedSettings.getBOOL("NextOwnerCopy");
|
||||
if(!copyable)
|
||||
{
|
||||
gSavedSettings.setBOOL("NextOwnerTransfer", TRUE);
|
||||
}
|
||||
LLCheckBoxCtrl* xfer = self->getChild<LLCheckBoxCtrl>("next_owner_transfer");
|
||||
xfer->setEnabled(copyable);
|
||||
}
|
||||
|
||||
void LLFloaterPerms::ok()
|
||||
{
|
||||
refresh(); // Changes were already applied to saved settings. Refreshing internal values makes it official.
|
||||
@@ -102,6 +141,7 @@ void LLFloaterPerms::cancel()
|
||||
gSavedSettings.setBOOL("NextOwnerCopy", mNextOwnerCopy);
|
||||
gSavedSettings.setBOOL("NextOwnerModify", mNextOwnerModify);
|
||||
gSavedSettings.setBOOL("NextOwnerTransfer", mNextOwnerTransfer);
|
||||
gSavedPerAccountSettings.setBOOL("EveryoneExport", everyone_export);
|
||||
}
|
||||
|
||||
void LLFloaterPerms::refresh()
|
||||
@@ -111,6 +151,7 @@ void LLFloaterPerms::refresh()
|
||||
mNextOwnerCopy = gSavedSettings.getBOOL("NextOwnerCopy");
|
||||
mNextOwnerModify = gSavedSettings.getBOOL("NextOwnerModify");
|
||||
mNextOwnerTransfer = gSavedSettings.getBOOL("NextOwnerTransfer");
|
||||
everyone_export = gSavedPerAccountSettings.getBOOL("EveryoneExport");
|
||||
}
|
||||
|
||||
void LLFloaterPerms::onClose(bool app_quitting)
|
||||
@@ -130,7 +171,12 @@ U32 LLFloaterPerms::getGroupPerms(std::string prefix)
|
||||
//static
|
||||
U32 LLFloaterPerms::getEveryonePerms(std::string prefix)
|
||||
{
|
||||
return gSavedSettings.getBOOL(prefix+"EveryoneCopy") ? PERM_COPY : PERM_NONE;
|
||||
U32 flags = PERM_NONE;
|
||||
if (LFSimFeatureHandler::instance().simSupportsExport() && prefix.empty() && gSavedPerAccountSettings.getBOOL("EveryoneExport")) // TODO: Bulk enable export?
|
||||
flags |= PERM_EXPORT;
|
||||
if (gSavedSettings.getBOOL(prefix+"EveryoneCopy"))
|
||||
flags |= PERM_COPY;
|
||||
return flags;
|
||||
}
|
||||
|
||||
//static
|
||||
|
||||
@@ -47,7 +47,6 @@ public:
|
||||
void cancel();
|
||||
static void onClickOK(void*);
|
||||
static void onClickCancel(void*);
|
||||
static void onCommitCopy(LLUICtrl* ctrl, void* data);
|
||||
// Convenience methods to get current permission preference bitfields from saved settings:
|
||||
static U32 getEveryonePerms(std::string prefix=""); // prefix + "EveryoneCopy"
|
||||
static U32 getGroupPerms(std::string prefix=""); // prefix + "ShareWithGroup"
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
|
||||
#include "lluictrlfactory.h"
|
||||
|
||||
#include "lfsimfeaturehandler.h"
|
||||
#include "hippogridmanager.h"
|
||||
|
||||
|
||||
@@ -67,6 +68,8 @@
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
bool can_set_export(const U32& base, const U32& own, const U32& next);
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Class LLPropertiesObserver
|
||||
//
|
||||
@@ -197,6 +200,9 @@ LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect&
|
||||
// everyone permissions
|
||||
childSetCommitCallback("CheckEveryoneCopy",&onCommitPermissions, this);
|
||||
childSetCommitCallback("CheckEveryoneMove",&onCommitPermissions, this);
|
||||
childSetCommitCallback("CheckExport", &onCommitPermissions, this);
|
||||
if (!gHippoGridManager->getCurrentGrid()->isSecondLife())
|
||||
LFSimFeatureHandler::instance().setSupportsExportCallback(boost::bind(&LLFloaterProperties::refresh, this));
|
||||
// next owner permissions
|
||||
childSetCommitCallback("CheckNextOwnerModify",&onCommitPermissions, this);
|
||||
childSetCommitCallback("CheckNextOwnerCopy",&onCommitPermissions, this);
|
||||
@@ -251,11 +257,13 @@ void LLFloaterProperties::refresh()
|
||||
"CheckOwnerModify",
|
||||
"CheckOwnerCopy",
|
||||
"CheckOwnerTransfer",
|
||||
"CheckOwnerExport",
|
||||
"CheckGroupCopy",
|
||||
"CheckGroupMod",
|
||||
"CheckGroupMove",
|
||||
"CheckEveryoneCopy",
|
||||
"CheckEveryoneMove",
|
||||
"CheckExport",
|
||||
"CheckNextOwnerModify",
|
||||
"CheckNextOwnerCopy",
|
||||
"CheckNextOwnerTransfer",
|
||||
@@ -437,6 +445,12 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
||||
childSetEnabled("CheckOwnerTransfer",FALSE);
|
||||
childSetValue("CheckOwnerTransfer",LLSD((BOOL)(owner_mask & PERM_TRANSFER)));
|
||||
|
||||
bool supports_export = LFSimFeatureHandler::instance().simSupportsExport();
|
||||
childSetEnabled("CheckOwnerExport",false);
|
||||
childSetValue("CheckOwnerExport", supports_export && owner_mask & PERM_EXPORT);
|
||||
if (!gHippoGridManager->getCurrentGrid()->isSecondLife())
|
||||
childSetVisible("CheckOwnerExport", false);
|
||||
|
||||
///////////////////////
|
||||
// DEBUG PERMISSIONS //
|
||||
///////////////////////
|
||||
@@ -459,11 +473,15 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
||||
|
||||
perm_string = "B: ";
|
||||
perm_string += mask_to_string(base_mask);
|
||||
if (!supports_export && base_mask & PERM_EXPORT) // Hide Export when not available
|
||||
perm_string.erase(perm_string.find_last_of("E"));
|
||||
childSetText("BaseMaskDebug",perm_string);
|
||||
childSetVisible("BaseMaskDebug",TRUE);
|
||||
|
||||
perm_string = "O: ";
|
||||
perm_string += mask_to_string(owner_mask);
|
||||
if (!supports_export && owner_mask & PERM_EXPORT) // Hide Export when not available
|
||||
perm_string.erase(perm_string.find_last_of("E"));
|
||||
childSetText("OwnerMaskDebug",perm_string);
|
||||
childSetVisible("OwnerMaskDebug",TRUE);
|
||||
|
||||
@@ -476,6 +494,8 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
||||
perm_string = "E";
|
||||
perm_string += overwrite_everyone ? "*: " : ": ";
|
||||
perm_string += mask_to_string(everyone_mask);
|
||||
if (!supports_export && everyone_mask & PERM_EXPORT) // Hide Export when not available
|
||||
perm_string.erase(perm_string.find_last_of("E"));
|
||||
childSetText("EveryoneMaskDebug",perm_string);
|
||||
childSetVisible("EveryoneMaskDebug",TRUE);
|
||||
|
||||
@@ -519,6 +539,8 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
||||
childSetEnabled("CheckEveryoneCopy",false);
|
||||
childSetEnabled("CheckEveryoneMove",false);
|
||||
}
|
||||
childSetEnabled("CheckExport", supports_export && item->getType() != LLAssetType::AT_OBJECT && gAgentID == item->getCreatorUUID()
|
||||
&& can_set_export(base_mask, owner_mask, next_owner_mask));
|
||||
|
||||
// Set values.
|
||||
BOOL is_group_copy = (group_mask & PERM_COPY) ? TRUE : FALSE;
|
||||
@@ -531,6 +553,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
||||
|
||||
childSetValue("CheckEveryoneCopy",LLSD((BOOL)(everyone_mask & PERM_COPY)));
|
||||
childSetValue("CheckEveryoneMove",LLSD((BOOL)(everyone_mask & PERM_MOVE)));
|
||||
childSetValue("CheckExport", supports_export && everyone_mask & PERM_EXPORT);
|
||||
|
||||
///////////////
|
||||
// SALE INFO //
|
||||
@@ -545,10 +568,11 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
||||
childSetEnabled("SaleLabel",is_complete);
|
||||
childSetEnabled("CheckPurchase",is_complete);
|
||||
|
||||
childSetEnabled("NextOwnerLabel",TRUE);
|
||||
childSetEnabled("CheckNextOwnerModify",base_mask & PERM_MODIFY);
|
||||
childSetEnabled("CheckNextOwnerCopy",base_mask & PERM_COPY);
|
||||
childSetEnabled("CheckNextOwnerTransfer",next_owner_mask & PERM_COPY);
|
||||
bool no_export = !(everyone_mask & PERM_EXPORT); // Next owner perms can't be changed if set
|
||||
childSetEnabled("NextOwnerLabel", no_export);
|
||||
childSetEnabled("CheckNextOwnerModify", no_export && base_mask & PERM_MODIFY);
|
||||
childSetEnabled("CheckNextOwnerCopy", no_export && base_mask & PERM_COPY);
|
||||
childSetEnabled("CheckNextOwnerTransfer", no_export && next_owner_mask & PERM_COPY);
|
||||
|
||||
childSetEnabled("RadioSaleType",is_complete && is_for_sale);
|
||||
childSetEnabled("TextPrice",is_complete && is_for_sale);
|
||||
@@ -750,6 +774,11 @@ void LLFloaterProperties::onCommitPermissions(LLUICtrl* ctrl, void* data)
|
||||
perm.setEveryoneBits(gAgent.getID(), gAgent.getGroupID(),
|
||||
CheckEveryoneCopy->get(), PERM_COPY);
|
||||
}
|
||||
LLCheckBoxCtrl* CheckExport = self->getChild<LLCheckBoxCtrl>("CheckExport");
|
||||
if(CheckExport)
|
||||
{
|
||||
perm.setEveryoneBits(gAgent.getID(), gAgent.getGroupID(), CheckExport->get(), PERM_EXPORT);
|
||||
}
|
||||
|
||||
LLCheckBoxCtrl* CheckNextOwnerModify = self->getChild<LLCheckBoxCtrl>("CheckNextOwnerModify");
|
||||
if(CheckNextOwnerModify)
|
||||
|
||||
@@ -2606,3 +2606,32 @@ const bool LLFloaterIMPanel::isModerator(const LLUUID& speaker_id)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL LLFloaterIMPanel::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash )
|
||||
{
|
||||
LLView* chat_editor = getChildView("chat_editor");
|
||||
if (getVisible() && childIsVisible("chat_editor"))
|
||||
{
|
||||
gFocusMgr.setKeyboardFocus(chat_editor);
|
||||
|
||||
LLUICtrl * ctrl = static_cast<LLUICtrl*>(chat_editor);
|
||||
ctrl->setFocus(TRUE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return LLUICtrl::focusFirstItem(prefer_text_fields, focus_flash);
|
||||
}
|
||||
|
||||
void LLFloaterIMPanel::onFocusReceived()
|
||||
{
|
||||
LLView* chat_editor = getChildView("chat_editor");
|
||||
if (getVisible() && childIsVisible("chat_editor"))
|
||||
{
|
||||
gFocusMgr.setKeyboardFocus(chat_editor);
|
||||
|
||||
LLUICtrl * ctrl = static_cast<LLUICtrl*>(chat_editor);
|
||||
ctrl->setFocus(TRUE);
|
||||
}
|
||||
|
||||
LLFloater::onFocusReceived();
|
||||
}
|
||||
|
||||
@@ -231,6 +231,9 @@ public:
|
||||
void *cargo_data, EAcceptance *accept,
|
||||
std::string& tooltip_msg);
|
||||
|
||||
BOOL focusFirstItem(BOOL prefer_text_fields = FALSE, BOOL focus_flash = TRUE );
|
||||
|
||||
void onFocusReceived();
|
||||
void onInputEditorFocusReceived();
|
||||
void onInputEditorFocusLost();
|
||||
static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata);
|
||||
|
||||
@@ -105,7 +105,7 @@ LLPanelDisplay::LLPanelDisplay()
|
||||
BOOL LLPanelDisplay::postBuild()
|
||||
{
|
||||
// return to default values
|
||||
childSetAction("Defaults", setHardwareDefaults, NULL);
|
||||
getChild<LLButton>("Defaults")->setClickedCallback(boost::bind(&LLPanelDisplay::setHardwareDefaults));
|
||||
|
||||
//============================================================================
|
||||
// Resolution
|
||||
@@ -113,8 +113,7 @@ BOOL LLPanelDisplay::postBuild()
|
||||
// radio set for fullscreen size
|
||||
|
||||
mCtrlWindowed = getChild<LLCheckBoxCtrl>( "windowed mode");
|
||||
mCtrlWindowed->setCommitCallback(&LLPanelDisplay::onCommitWindowedMode);
|
||||
mCtrlWindowed->setCallbackUserData(this);
|
||||
mCtrlWindowed->setCommitCallback(boost::bind(&LLPanelDisplay::onCommitWindowedMode,this));
|
||||
|
||||
mAspectRatioLabel1 = getChild<LLTextBox>("AspectRatioLabel1");
|
||||
mDisplayResLabel = getChild<LLTextBox>("DisplayResLabel");
|
||||
@@ -194,25 +193,22 @@ BOOL LLPanelDisplay::postBuild()
|
||||
}
|
||||
|
||||
mCtrlAspectRatio = getChild<LLComboBox>( "aspect_ratio");
|
||||
mCtrlAspectRatio->setTextEntryCallback(onKeystrokeAspectRatio);
|
||||
mCtrlAspectRatio->setCommitCallback(onSelectAspectRatio);
|
||||
mCtrlAspectRatio->setCallbackUserData(this);
|
||||
mCtrlAspectRatio->setTextEntryCallback(&LLPanelDisplay::onKeystrokeAspectRatio);
|
||||
mCtrlAspectRatio->setCallbackUserData(this);
|
||||
mCtrlAspectRatio->setCommitCallback(boost::bind(&LLPanelDisplay::onSelectAspectRatio,this));
|
||||
// add default aspect ratios
|
||||
mCtrlAspectRatio->add(aspect_ratio_text, &mAspectRatio, ADD_TOP);
|
||||
mCtrlAspectRatio->setCurrentByIndex(0);
|
||||
|
||||
mCtrlAutoDetectAspect = getChild<LLCheckBoxCtrl>( "aspect_auto_detect");
|
||||
mCtrlAutoDetectAspect->setCommitCallback(onCommitAutoDetectAspect);
|
||||
mCtrlAutoDetectAspect->setCallbackUserData(this);
|
||||
mCtrlAutoDetectAspect->setCommitCallback(boost::bind(&LLPanelDisplay::onCommitAutoDetectAspect,this,_2));
|
||||
|
||||
// radio performance box
|
||||
mCtrlSliderQuality = getChild<LLSliderCtrl>("QualityPerformanceSelection");
|
||||
mCtrlSliderQuality->setSliderMouseUpCallback(boost::bind(&LLPanelDisplay::onChangeQuality,mCtrlSliderQuality,this));
|
||||
mCtrlSliderQuality->setCallbackUserData(this);
|
||||
mCtrlSliderQuality->setSliderMouseUpCallback(boost::bind(&LLPanelDisplay::onChangeQuality,this,_1));
|
||||
|
||||
mCtrlCustomSettings = getChild<LLCheckBoxCtrl>("CustomSettings");
|
||||
mCtrlCustomSettings->setCommitCallback(onChangeCustom);
|
||||
mCtrlCustomSettings->setCallbackUserData(this);
|
||||
mCtrlCustomSettings->setCommitCallback(boost::bind(&LLPanelDisplay::onChangeCustom));
|
||||
|
||||
//mGraphicsBorder = getChild<LLViewBorder>("GraphicsBorder");
|
||||
|
||||
@@ -226,24 +222,19 @@ BOOL LLPanelDisplay::postBuild()
|
||||
//----------------------------------------------------------------------------
|
||||
// Enable Reflections
|
||||
mCtrlReflectionDetail = getChild<LLComboBox>("ReflectionDetailCombo");
|
||||
mCtrlReflectionDetail->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
||||
mCtrlReflectionDetail->setCallbackUserData(this);
|
||||
mCtrlReflectionDetail->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||
|
||||
// WindLight
|
||||
mCtrlWindLight = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
|
||||
mCtrlWindLight->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
||||
mCtrlWindLight->setCallbackUserData(this);
|
||||
mCtrlWindLight->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||
|
||||
// Deferred
|
||||
mCtrlDeferred = getChild<LLCheckBoxCtrl>("RenderDeferred");
|
||||
mCtrlDeferred->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
||||
mCtrlDeferred->setCallbackUserData(this);
|
||||
mCtrlDeferred->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||
mCtrlDeferredDoF = getChild<LLCheckBoxCtrl>("RenderDepthOfField");
|
||||
mCtrlDeferredDoF->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
||||
mCtrlDeferredDoF->setCallbackUserData(this);
|
||||
mCtrlDeferredDoF->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||
mCtrlShadowDetail = getChild<LLComboBox>("ShadowDetailCombo");
|
||||
mCtrlShadowDetail->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
||||
mCtrlShadowDetail->setCallbackUserData(this);
|
||||
mCtrlShadowDetail->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Terrain Scale
|
||||
@@ -252,15 +243,13 @@ BOOL LLPanelDisplay::postBuild()
|
||||
//----------------------------------------------------------------------------
|
||||
// Enable Avatar Shaders
|
||||
mCtrlAvatarVP = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
|
||||
mCtrlAvatarVP->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
||||
mCtrlAvatarVP->setCallbackUserData(this);
|
||||
mCtrlAvatarVP->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Avatar Render Mode
|
||||
mCtrlAvatarCloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
|
||||
mCtrlAvatarImpostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
|
||||
mCtrlAvatarImpostors->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
||||
mCtrlAvatarImpostors->setCallbackUserData(this);
|
||||
mCtrlAvatarImpostors->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||
mCtrlNonImpostors = getChild<LLSliderCtrl>("AvatarMaxVisible");
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -278,8 +267,7 @@ BOOL LLPanelDisplay::postBuild()
|
||||
//----------------------------------------------------------------------------
|
||||
// Global Shader Enable
|
||||
mCtrlShaderEnable = getChild<LLCheckBoxCtrl>("BasicShaders");
|
||||
mCtrlShaderEnable->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
||||
mCtrlShaderEnable->setCallbackUserData(this);
|
||||
mCtrlShaderEnable->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||
|
||||
//============================================================================
|
||||
|
||||
@@ -287,50 +275,42 @@ BOOL LLPanelDisplay::postBuild()
|
||||
mCtrlDrawDistance = getChild<LLSliderCtrl>("DrawDistance");
|
||||
mDrawDistanceMeterText1 = getChild<LLTextBox>("DrawDistanceMeterText1");
|
||||
mDrawDistanceMeterText2 = getChild<LLTextBox>("DrawDistanceMeterText2");
|
||||
mCtrlDrawDistance->setCommitCallback(&LLPanelDisplay::updateMeterText);
|
||||
mCtrlDrawDistance->setCallbackUserData(this);
|
||||
mCtrlDrawDistance->setCommitCallback(boost::bind(&LLPanelDisplay::updateMeterText, this));
|
||||
|
||||
// Object detail slider
|
||||
mCtrlLODFactor = getChild<LLSliderCtrl>("ObjectMeshDetail");
|
||||
mLODFactorText = getChild<LLTextBox>("ObjectMeshDetailText");
|
||||
mCtrlLODFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
||||
mCtrlLODFactor->setCallbackUserData(mLODFactorText);
|
||||
mCtrlLODFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1,mLODFactorText));
|
||||
|
||||
// Flex object detail slider
|
||||
mCtrlFlexFactor = getChild<LLSliderCtrl>("FlexibleMeshDetail");
|
||||
mFlexFactorText = getChild<LLTextBox>("FlexibleMeshDetailText");
|
||||
mCtrlFlexFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
||||
mCtrlFlexFactor->setCallbackUserData(mFlexFactorText);
|
||||
mCtrlFlexFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText,_1, mFlexFactorText));
|
||||
|
||||
// Tree detail slider
|
||||
mCtrlTreeFactor = getChild<LLSliderCtrl>("TreeMeshDetail");
|
||||
mTreeFactorText = getChild<LLTextBox>("TreeMeshDetailText");
|
||||
mCtrlTreeFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
||||
mCtrlTreeFactor->setCallbackUserData(mTreeFactorText);
|
||||
mCtrlTreeFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mTreeFactorText));
|
||||
|
||||
// Avatar detail slider
|
||||
mCtrlAvatarFactor = getChild<LLSliderCtrl>("AvatarMeshDetail");
|
||||
mAvatarFactorText = getChild<LLTextBox>("AvatarMeshDetailText");
|
||||
mCtrlAvatarFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
||||
mCtrlAvatarFactor->setCallbackUserData(mAvatarFactorText);
|
||||
mCtrlAvatarFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mAvatarFactorText));
|
||||
|
||||
// Avatar physics detail slider
|
||||
mCtrlAvatarPhysicsFactor = getChild<LLSliderCtrl>("AvatarPhysicsDetail");
|
||||
mAvatarPhysicsFactorText = getChild<LLTextBox>("AvatarPhysicsDetailText");
|
||||
mCtrlAvatarPhysicsFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
||||
mCtrlAvatarPhysicsFactor->setCallbackUserData(mAvatarPhysicsFactorText);
|
||||
mCtrlAvatarPhysicsFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mAvatarPhysicsFactorText));
|
||||
|
||||
// Terrain detail slider
|
||||
mCtrlTerrainFactor = getChild<LLSliderCtrl>("TerrainMeshDetail");
|
||||
mTerrainFactorText = getChild<LLTextBox>("TerrainMeshDetailText");
|
||||
mCtrlTerrainFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
||||
mCtrlTerrainFactor->setCallbackUserData(mTerrainFactorText);
|
||||
mCtrlTerrainFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mTerrainFactorText));
|
||||
|
||||
// Terrain detail slider
|
||||
mCtrlSkyFactor = getChild<LLSliderCtrl>("SkyMeshDetail");
|
||||
mSkyFactorText = getChild<LLTextBox>("SkyMeshDetailText");
|
||||
mCtrlSkyFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
||||
mCtrlSkyFactor->setCallbackUserData(mSkyFactorText);
|
||||
mCtrlSkyFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mSkyFactorText));
|
||||
|
||||
// Particle detail slider
|
||||
mCtrlMaxParticle = getChild<LLSliderCtrl>("MaxParticleCount");
|
||||
@@ -338,8 +318,7 @@ BOOL LLPanelDisplay::postBuild()
|
||||
// Glow detail slider
|
||||
mCtrlPostProcess = getChild<LLSliderCtrl>("RenderPostProcess");
|
||||
mPostProcessText = getChild<LLTextBox>("PostProcessText");
|
||||
mCtrlPostProcess->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
||||
mCtrlPostProcess->setCallbackUserData(mPostProcessText);
|
||||
mCtrlPostProcess->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mPostProcessText));
|
||||
|
||||
// Text boxes (for enabling/disabling)
|
||||
mShaderText = getChild<LLTextBox>("ShadersText");
|
||||
@@ -351,7 +330,11 @@ BOOL LLPanelDisplay::postBuild()
|
||||
mTerrainScaleText = getChild<LLTextBox>("TerrainScaleText");
|
||||
|
||||
// Hardware tab
|
||||
childSetCommitCallback("vbo", &LLPanelDisplay::onRenderVBOEnable, this);
|
||||
mVBO = getChild<LLCheckBoxCtrl>("vbo");
|
||||
mVBO->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||
|
||||
mVBOStream = getChild<LLCheckBoxCtrl>("vbo_stream");
|
||||
|
||||
|
||||
refresh();
|
||||
|
||||
@@ -598,13 +581,13 @@ void LLPanelDisplay::refreshEnabledState()
|
||||
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") ||
|
||||
!gGLManager.mHasVertexBufferObject)
|
||||
{
|
||||
childSetEnabled("vbo", false);
|
||||
mVBO->setEnabled(false);
|
||||
//Streaming VBOs -Shyotl
|
||||
childSetEnabled("vbo_stream", false);
|
||||
mVBOStream->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetEnabled("vbo_stream", LLVertexBuffer::sEnableVBOs);
|
||||
mVBOStream->setEnabled(gSavedSettings.getBOOL("RenderVBOEnable"));
|
||||
}
|
||||
|
||||
// if no windlight shaders, enable gamma, and fog distance
|
||||
@@ -811,7 +794,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
|
||||
// hide one meter text if we're making things visible
|
||||
if(!isHidden)
|
||||
{
|
||||
updateMeterText(mCtrlDrawDistance, this);
|
||||
updateMeterText();
|
||||
}
|
||||
|
||||
mMeshDetailText->setVisible(!isHidden);
|
||||
@@ -900,12 +883,11 @@ void LLPanelDisplay::apply()
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelDisplay::onChangeQuality(LLUICtrl *ctrl, void *data)
|
||||
void LLPanelDisplay::onChangeQuality(LLUICtrl* caller)
|
||||
{
|
||||
LLSliderCtrl* sldr = static_cast<LLSliderCtrl*>(ctrl);
|
||||
LLPanelDisplay* cur_panel = static_cast<LLPanelDisplay*>(data);
|
||||
LLSliderCtrl* sldr = static_cast<LLSliderCtrl*>(caller);
|
||||
|
||||
if(sldr == NULL || cur_panel == NULL)
|
||||
if(sldr == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -914,19 +896,14 @@ void LLPanelDisplay::onChangeQuality(LLUICtrl *ctrl, void *data)
|
||||
LLFeatureManager::getInstance()->setGraphicsLevel(set, true);
|
||||
|
||||
LLFloaterPreference::refreshEnabledGraphics();
|
||||
cur_panel->refresh();
|
||||
refresh();
|
||||
}
|
||||
|
||||
void LLPanelDisplay::onChangeCustom(LLUICtrl *ctrl, void *data)
|
||||
void LLPanelDisplay::onChangeCustom()
|
||||
{
|
||||
LLFloaterPreference::refreshEnabledGraphics();
|
||||
}
|
||||
|
||||
void LLPanelDisplay::onApplyResolution(LLUICtrl* src, void* user_data)
|
||||
{
|
||||
((LLPanelDisplay*) src)->applyResolution();
|
||||
}
|
||||
|
||||
void LLPanelDisplay::applyResolution()
|
||||
{
|
||||
|
||||
@@ -1018,20 +995,14 @@ void LLPanelDisplay::applyWindowSize()
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPanelDisplay::onCommitWindowedMode(LLUICtrl* ctrl, void *data)
|
||||
void LLPanelDisplay::onCommitWindowedMode()
|
||||
{
|
||||
LLPanelDisplay *panel = (LLPanelDisplay*)data;
|
||||
|
||||
panel->refresh();
|
||||
refresh();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPanelDisplay::onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data)
|
||||
void LLPanelDisplay::onCommitAutoDetectAspect(const LLSD& value)
|
||||
{
|
||||
LLPanelDisplay *panel = (LLPanelDisplay*)data;
|
||||
|
||||
BOOL auto_detect = ((LLCheckBoxCtrl*)ctrl)->get();
|
||||
BOOL auto_detect = value.asBoolean();
|
||||
F32 ratio;
|
||||
|
||||
if (auto_detect)
|
||||
@@ -1053,27 +1024,23 @@ void LLPanelDisplay::onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data)
|
||||
aspect = llformat("%.3f", gViewerWindow->mWindow->getNativeAspectRatio());
|
||||
}
|
||||
|
||||
panel->mCtrlAspectRatio->setLabel(aspect);
|
||||
mCtrlAspectRatio->setLabel(aspect);
|
||||
|
||||
ratio = gViewerWindow->mWindow->getNativeAspectRatio();
|
||||
gSavedSettings.setF32("FullScreenAspectRatio", ratio);
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPanelDisplay::onKeystrokeAspectRatio(LLLineEditor* caller, void* user_data)
|
||||
void LLPanelDisplay::onKeystrokeAspectRatio(LLLineEditor* caller, void *user_data)
|
||||
{
|
||||
LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
|
||||
LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
|
||||
|
||||
panel->mCtrlAutoDetectAspect->set(FALSE);
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPanelDisplay::onSelectAspectRatio(LLUICtrl*, void* user_data)
|
||||
void LLPanelDisplay::onSelectAspectRatio()
|
||||
{
|
||||
LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
|
||||
|
||||
panel->mCtrlAutoDetectAspect->set(FALSE);
|
||||
mCtrlAutoDetectAspect->set(FALSE);
|
||||
}
|
||||
|
||||
//static
|
||||
@@ -1092,22 +1059,13 @@ void LLPanelDisplay::fractionFromDecimal(F32 decimal_val, S32& numerator, S32& d
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPanelDisplay::onVertexShaderEnable(LLUICtrl* self, void* data)
|
||||
void LLPanelDisplay::onVertexShaderEnable()
|
||||
{
|
||||
LLFloaterPreference::refreshEnabledGraphics();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPanelDisplay::onRenderVBOEnable(LLUICtrl* self, void* data)
|
||||
{
|
||||
LLPanelDisplay* panel = (LLPanelDisplay*)data;
|
||||
bool enable = panel->childGetValue("vbo").asBoolean();
|
||||
panel->childSetEnabled("vbo_stream", enable);
|
||||
if(!enable) panel->childSetValue("vbo_stream", false);
|
||||
}
|
||||
|
||||
void LLPanelDisplay::setHardwareDefaults(void* user_data)
|
||||
void LLPanelDisplay::setHardwareDefaults()
|
||||
{
|
||||
LLFeatureManager::getInstance()->applyRecommendedSettings();
|
||||
LLControlVariable* controlp = gSavedSettings.getControl("RenderAvatarMaxVisible");
|
||||
@@ -1118,11 +1076,11 @@ void LLPanelDisplay::setHardwareDefaults(void* user_data)
|
||||
LLFloaterPreference::refreshEnabledGraphics();
|
||||
}
|
||||
|
||||
void LLPanelDisplay::updateSliderText(LLUICtrl* ctrl, void* user_data)
|
||||
//static
|
||||
void LLPanelDisplay::updateSliderText(LLUICtrl* ctrl, LLTextBox* text_box)
|
||||
{
|
||||
// get our UI widgets
|
||||
LLTextBox* text_box = (LLTextBox*)user_data;
|
||||
LLSliderCtrl* slider = (LLSliderCtrl*) ctrl;
|
||||
LLSliderCtrl* slider = dynamic_cast<LLSliderCtrl*>(ctrl);
|
||||
if(text_box == NULL || slider == NULL)
|
||||
{
|
||||
return;
|
||||
@@ -1160,20 +1118,13 @@ void LLPanelDisplay::updateSliderText(LLUICtrl* ctrl, void* user_data)
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelDisplay::updateMeterText(LLUICtrl* ctrl, void* user_data)
|
||||
void LLPanelDisplay::updateMeterText()
|
||||
{
|
||||
// get our UI widgets
|
||||
LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
|
||||
LLSliderCtrl* slider = (LLSliderCtrl*) ctrl;
|
||||
|
||||
LLTextBox* m1 = panel->getChild<LLTextBox>("DrawDistanceMeterText1");
|
||||
LLTextBox* m2 = panel->getChild<LLTextBox>("DrawDistanceMeterText2");
|
||||
|
||||
// toggle the two text boxes based on whether we have 2 or 3 digits
|
||||
F32 val = slider->getValueF32();
|
||||
F32 val = mCtrlDrawDistance->getValueF32();
|
||||
bool two_digits = val < 100;
|
||||
m1->setVisible(two_digits);
|
||||
m2->setVisible(!two_digits);
|
||||
mDrawDistanceMeterText1->setVisible(two_digits);
|
||||
mDrawDistanceMeterText2->setVisible(!two_digits);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -146,6 +146,9 @@ protected:
|
||||
LLTextBox *mShadowDetailText;
|
||||
LLTextBox *mTerrainScaleText;
|
||||
|
||||
LLCheckBoxCtrl *mVBO;
|
||||
LLCheckBoxCtrl *mVBOStream;
|
||||
|
||||
BOOL mFSAutoDetectAspect;
|
||||
F32 mAspectRatio;
|
||||
|
||||
@@ -192,31 +195,24 @@ protected:
|
||||
S32 mVideoCardMem;
|
||||
F32 mFogRatio;
|
||||
|
||||
static void setGraphicsSettings(LLControlGroup& group);
|
||||
static void createGroup();
|
||||
|
||||
// if the quality radio buttons are changed
|
||||
static void onChangeQuality(LLUICtrl *ctrl, void *data);
|
||||
void onChangeQuality(LLUICtrl* caller);
|
||||
|
||||
// if the custom settings box is clicked
|
||||
static void onChangeCustom(LLUICtrl *ctrl, void *data);
|
||||
static void onChangeCustom();
|
||||
|
||||
static void onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data);
|
||||
static void onKeystrokeAspectRatio(LLLineEditor* caller, void* user_data);
|
||||
static void onSelectAspectRatio(LLUICtrl*, void*);
|
||||
static void onCommitWindowedMode(LLUICtrl* ctrl, void *data);
|
||||
static void onApplyResolution(LLUICtrl* ctrl, void* data);
|
||||
static void updateSliderText(LLUICtrl* ctrl, void* user_data);
|
||||
static void updateMeterText(LLUICtrl* ctrl, void* user_data);
|
||||
void onCommitAutoDetectAspect(const LLSD& value);
|
||||
static void onKeystrokeAspectRatio(LLLineEditor* caller, void *user_data);
|
||||
void onSelectAspectRatio();
|
||||
void onCommitWindowedMode();
|
||||
static void updateSliderText(LLUICtrl* ctrl, LLTextBox* text_box);
|
||||
void updateMeterText();
|
||||
|
||||
/// callback for defaults
|
||||
static void setHardwareDefaults(void *data);
|
||||
static void setHardwareDefaults();
|
||||
|
||||
// callback for when client turns on shaders
|
||||
static void onVertexShaderEnable(LLUICtrl*, void*);
|
||||
|
||||
// callbacks for hardware tab
|
||||
static void onRenderVBOEnable(LLUICtrl*, void*);
|
||||
static void onVertexShaderEnable();
|
||||
|
||||
// helper function
|
||||
static void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
|
||||
|
||||
@@ -67,7 +67,9 @@
|
||||
#include "lluictrlfactory.h"
|
||||
#include "roles_constants.h"
|
||||
#include "lltrans.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
|
||||
#include "lfsimfeaturehandler.h"
|
||||
#include "hippogridmanager.h"
|
||||
|
||||
|
||||
@@ -76,6 +78,32 @@
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
// base and own must have EXPORT, next owner must be UNRESTRICTED
|
||||
bool can_set_export(const U32& base, const U32& own, const U32& next)
|
||||
{
|
||||
return base & PERM_EXPORT && own & PERM_EXPORT && (next & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED;
|
||||
}
|
||||
|
||||
bool perms_allow_export(const LLPermissions& perms)
|
||||
{
|
||||
return perms.getMaskBase() & PERM_EXPORT && perms.getMaskEveryone() & PERM_EXPORT;
|
||||
}
|
||||
|
||||
bool is_asset_exportable(const LLUUID& asset_id)
|
||||
{
|
||||
if (asset_id.isNull()) return true; // Don't permission-check null textures
|
||||
LLViewerInventoryCategory::cat_array_t cats;
|
||||
LLViewerInventoryItem::item_array_t items;
|
||||
LLAssetIDMatches asset_id_matches(asset_id);
|
||||
gInventory.collectDescendentsIf(LLUUID::null, cats, items, true, asset_id_matches, false);
|
||||
|
||||
for (int i = 0; i < items.count(); ++i)
|
||||
{
|
||||
if (perms_allow_export(items[i]->getPermissions())) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class llpanelpermissions
|
||||
///----------------------------------------------------------------------------
|
||||
@@ -112,6 +140,8 @@ BOOL LLPanelPermissions::postBuild()
|
||||
|
||||
childSetCommitCallback("checkbox allow everyone copy",LLPanelPermissions::onCommitEveryoneCopy,this);
|
||||
|
||||
getChild<LLUICtrl>("checkbox allow export")->setCommitCallback(boost::bind(&LLPanelPermissions::onCommitExport, this, _2));
|
||||
|
||||
childSetCommitCallback("checkbox for sale",LLPanelPermissions::onCommitSaleInfo,this);
|
||||
|
||||
childSetCommitCallback("Edit Cost",LLPanelPermissions::onCommitSaleInfo,this);
|
||||
@@ -136,6 +166,9 @@ BOOL LLPanelPermissions::postBuild()
|
||||
mLabelGroupName = NULL;
|
||||
}
|
||||
|
||||
if (!gHippoGridManager->getCurrentGrid()->isSecondLife())
|
||||
LFSimFeatureHandler::instance().setSupportsExportCallback(boost::bind(&LLPanelPermissions::refresh, this));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -145,6 +178,13 @@ LLPanelPermissions::~LLPanelPermissions()
|
||||
// base class will take care of everything
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLPanelPermissions::handleVisibilityChange(BOOL new_visibility)
|
||||
{
|
||||
if (new_visibility)
|
||||
refresh();
|
||||
LLPanel::handleVisibilityChange(new_visibility);
|
||||
}
|
||||
|
||||
void LLPanelPermissions::refresh()
|
||||
{
|
||||
@@ -223,10 +263,13 @@ void LLPanelPermissions::refresh()
|
||||
childSetEnabled("checkbox share with group",false);
|
||||
childSetEnabled("button deed",false);
|
||||
|
||||
childSetEnabled("text anyone can", false);
|
||||
childSetValue("checkbox allow everyone move",FALSE);
|
||||
childSetEnabled("checkbox allow everyone move",false);
|
||||
childSetValue("checkbox allow everyone copy",FALSE);
|
||||
childSetEnabled("checkbox allow everyone copy",false);
|
||||
childSetValue("checkbox allow export", false);
|
||||
childSetEnabled("checkbox allow export", false);
|
||||
|
||||
//Next owner can:
|
||||
childSetEnabled("Next owner can:",false);
|
||||
@@ -601,6 +644,7 @@ void LLPanelPermissions::refresh()
|
||||
&next_owner_mask_on,
|
||||
&next_owner_mask_off);
|
||||
|
||||
bool supports_export = LFSimFeatureHandler::instance().simSupportsExport();
|
||||
|
||||
if( gSavedSettings.getBOOL("DebugPermissions") )
|
||||
{
|
||||
@@ -610,6 +654,8 @@ void LLPanelPermissions::refresh()
|
||||
{
|
||||
perm_string = "B: ";
|
||||
perm_string += mask_to_string(base_mask_on);
|
||||
if (!supports_export && base_mask_on & PERM_EXPORT) // Hide Export when not available
|
||||
perm_string.erase(perm_string.find_last_of("E"));
|
||||
if (U32 diff_mask = base_mask_on ^ owner_mask_on) // When different, show the user's potential permissions lowercase.
|
||||
{
|
||||
if (diff_mask & PERM_MOVE)
|
||||
@@ -620,12 +666,16 @@ void LLPanelPermissions::refresh()
|
||||
LLStringUtil::replaceChar(perm_string, 'C', 'c');
|
||||
if (diff_mask & PERM_TRANSFER)
|
||||
LLStringUtil::replaceChar(perm_string, 'T', 't');
|
||||
if (diff_mask & PERM_EXPORT)
|
||||
LLStringUtil::replaceChar(perm_string, 'E', 'e');
|
||||
}
|
||||
childSetText("B:",perm_string);
|
||||
childSetVisible("B:",true);
|
||||
|
||||
perm_string = "O: ";
|
||||
perm_string += mask_to_string(owner_mask_on);
|
||||
if (!supports_export && owner_mask_on & PERM_EXPORT) // Hide Export when not available
|
||||
perm_string.erase(perm_string.find_last_of("E"));
|
||||
childSetText("O:",perm_string);
|
||||
childSetVisible("O:",true);
|
||||
|
||||
@@ -636,6 +686,8 @@ void LLPanelPermissions::refresh()
|
||||
|
||||
perm_string = "E: ";
|
||||
perm_string += mask_to_string(everyone_mask_on);
|
||||
if (!supports_export && everyone_mask_on & PERM_EXPORT) // Hide Export when not available
|
||||
perm_string.erase(perm_string.find_last_of("E"));
|
||||
childSetText("E:",perm_string);
|
||||
childSetVisible("E:",true);
|
||||
|
||||
@@ -688,16 +740,41 @@ void LLPanelPermissions::refresh()
|
||||
if (has_change_perm_ability)
|
||||
{
|
||||
childSetEnabled("checkbox share with group",true);
|
||||
childSetEnabled("text anyone can", true);
|
||||
childSetEnabled("checkbox allow everyone move",owner_mask_on & PERM_MOVE);
|
||||
childSetEnabled("checkbox allow everyone copy",owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER);
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetEnabled("checkbox share with group", FALSE);
|
||||
childSetEnabled("text anyone can", false);
|
||||
childSetEnabled("checkbox allow everyone move", FALSE);
|
||||
childSetEnabled("checkbox allow everyone copy", FALSE);
|
||||
}
|
||||
|
||||
// Is this user allowed to toggle export on this object?
|
||||
if (supports_export && self_owned && mCreatorID == mOwnerID && can_set_export(base_mask_on, owner_mask_on, next_owner_mask_on))
|
||||
{
|
||||
bool can_export = true;
|
||||
LLInventoryObject::object_list_t objects;
|
||||
objectp->getInventoryContents(objects);
|
||||
for (LLInventoryObject::object_list_t::iterator i = objects.begin(); can_export && i != objects.end() ; ++i) //The object's inventory must have EXPORT.
|
||||
{
|
||||
LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(i->get()); //getInventoryContents() filters out categories, static_cast.
|
||||
can_export = perms_allow_export(item->getPermissions());
|
||||
}
|
||||
for (U8 i = 0; can_export && i < objectp->getNumTEs(); ++i) // Can the textures be exported?
|
||||
if (LLTextureEntry* texture = objectp->getTE(i))
|
||||
can_export = is_asset_exportable(texture->getID());
|
||||
childSetEnabled("checkbox allow export", can_export);
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetEnabled("checkbox allow export", false);
|
||||
if (!gHippoGridManager->getCurrentGrid()->isSecondLife())
|
||||
childSetVisible("checkbox allow export", false);
|
||||
}
|
||||
|
||||
if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER))
|
||||
{
|
||||
childSetEnabled("checkbox for sale", can_transfer || (!can_transfer && num_for_sale));
|
||||
@@ -706,10 +783,11 @@ void LLPanelPermissions::refresh()
|
||||
childSetTentative("checkbox for sale", is_for_sale_mixed);
|
||||
childSetEnabled("sale type",num_for_sale && can_transfer && !is_sale_price_mixed);
|
||||
|
||||
childSetEnabled("Next owner can:", TRUE);
|
||||
childSetEnabled("checkbox next owner can modify",base_mask_on & PERM_MODIFY);
|
||||
childSetEnabled("checkbox next owner can copy",base_mask_on & PERM_COPY);
|
||||
childSetEnabled("checkbox next owner can transfer",next_owner_mask_on & PERM_COPY);
|
||||
bool no_export = everyone_mask_off & PERM_EXPORT; // Next owner perms can't be changed if set
|
||||
childSetEnabled("Next owner can:", no_export);
|
||||
childSetEnabled("checkbox next owner can modify", no_export && base_mask_on & PERM_MODIFY);
|
||||
childSetEnabled("checkbox next owner can copy", no_export && base_mask_on & PERM_COPY);
|
||||
childSetEnabled("checkbox next owner can transfer", no_export && next_owner_mask_on & PERM_COPY);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -779,6 +857,31 @@ void LLPanelPermissions::refresh()
|
||||
childSetValue("checkbox allow everyone copy",TRUE);
|
||||
childSetTentative("checkbox allow everyone copy",true);
|
||||
}
|
||||
|
||||
// Export
|
||||
if (supports_export)
|
||||
{
|
||||
if(everyone_mask_on & PERM_EXPORT)
|
||||
{
|
||||
childSetValue("checkbox allow export", true);
|
||||
childSetTentative("checkbox allow export", false);
|
||||
}
|
||||
else if(everyone_mask_off & PERM_EXPORT)
|
||||
{
|
||||
childSetValue("checkbox allow export", false);
|
||||
childSetTentative("checkbox allow export", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetValue("checkbox allow export", true);
|
||||
childSetTentative("checkbox allow export", true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
childSetValue("checkbox allow export", false);
|
||||
childSetTentative("checkbox allow export", false);
|
||||
}
|
||||
}
|
||||
|
||||
if(valid_next_perms)
|
||||
@@ -1064,6 +1167,11 @@ void LLPanelPermissions::onCommitEveryoneCopy(LLUICtrl *ctrl, void *data)
|
||||
onCommitPerm(ctrl, data, PERM_EVERYONE, PERM_COPY);
|
||||
}
|
||||
|
||||
void LLPanelPermissions::onCommitExport(const LLSD& param)
|
||||
{
|
||||
LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_EVERYONE, param, PERM_EXPORT);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelPermissions::onCommitNextOwnerModify(LLUICtrl* ctrl, void* data)
|
||||
{
|
||||
|
||||
@@ -57,6 +57,7 @@ public:
|
||||
virtual ~LLPanelPermissions();
|
||||
|
||||
virtual BOOL postBuild();
|
||||
virtual void handleVisibilityChange(BOOL new_visibility);
|
||||
|
||||
// MANIPULATORS
|
||||
void refresh(); // refresh all labels as needed
|
||||
@@ -86,6 +87,7 @@ protected:
|
||||
static void onCommitEveryoneMove(LLUICtrl *ctrl, void *data);
|
||||
static void onCommitEveryoneCopy(LLUICtrl *ctrl, void *data);
|
||||
//static void onCommitEveryoneModify(LLUICtrl *ctrl, void *data);
|
||||
void onCommitExport(const LLSD& param);
|
||||
|
||||
static void onCommitNextOwnerModify(LLUICtrl* ctrl, void* data);
|
||||
static void onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data);
|
||||
|
||||
@@ -283,8 +283,8 @@ void LLPreviewTexture::draw()
|
||||
mImage);
|
||||
|
||||
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
||||
static const LLCachedControl<F32> alpha_mas_max_rmse("SHAlphaMaskMaxRMSE",.09f);
|
||||
if (mAlphaMaskResult != mImage->getIsAlphaMask(use_rmse_auto_mask ? alpha_mas_max_rmse : -1.f))
|
||||
static const LLCachedControl<F32> auto_mask_max_rmse("SHAutoMaskMaxRMSE",.09f);
|
||||
if (mAlphaMaskResult != mImage->getIsAlphaMask(use_rmse_auto_mask ? auto_mask_max_rmse : -1.f))
|
||||
{
|
||||
mAlphaMaskResult = !mAlphaMaskResult;
|
||||
if (!mAlphaMaskResult)
|
||||
|
||||
@@ -1339,7 +1339,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
}
|
||||
LLHTTPClient::request(mUrl, LLHTTPClient::HTTP_GET, NULL,
|
||||
new HTTPGetResponder(mFetcher, mID, LLTimer::getTotalTime(), mRequestedSize, mRequestedOffset, true),
|
||||
headers/*,*/ DEBUG_CURLIO_PARAM(false), keep_alive, no_does_authentication, allow_compressed_reply, NULL, 0, NULL);
|
||||
headers/*,*/ DEBUG_CURLIO_PARAM(debug_off), keep_alive, no_does_authentication, allow_compressed_reply, NULL, 0, NULL);
|
||||
res = true;
|
||||
}
|
||||
if (!res)
|
||||
|
||||
@@ -675,7 +675,7 @@ void settings_setup_listeners()
|
||||
gSavedSettings.getControl("RenderAutoMaskAlphaDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
gSavedSettings.getControl("SHUseRMSEAutoMask")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
gSavedSettings.getControl("SHAlphaMaskMaxRMSE")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
gSavedSettings.getControl("SHAutoMaskMaxRMSE")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
|
||||
//See LL jira VWR-3258 comment section. Implemented by LL in 2.1 -Shyotl
|
||||
|
||||
@@ -123,7 +123,7 @@ void LLViewerParcelMedia::update(LLParcel* parcel)
|
||||
if( ! mediaUrl.empty() && gSavedSettings.getWarning("FirstStreamingVideo") )
|
||||
{
|
||||
LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(),
|
||||
boost::bind(callback_play_media, _1, _2, parcel));
|
||||
boost::bind(&callback_play_media, _1, _2, parcel));
|
||||
return;
|
||||
|
||||
}
|
||||
@@ -903,35 +903,43 @@ void callback_media_alert(const LLSD ¬ification, const LLSD &response, LLParc
|
||||
LLViewerParcelMedia::playStreamingMusic(parcel, false);
|
||||
}
|
||||
}
|
||||
else if (option == 1 || option == 2) // Deny or Blacklist
|
||||
else
|
||||
{
|
||||
LLViewerParcelMedia::sDeniedMedia.insert(domain);
|
||||
if (ip != domain && domain.find('/') == std::string::npos)
|
||||
{
|
||||
LLViewerParcelMedia::sDeniedMedia.insert(ip);
|
||||
}
|
||||
if (type == 1)
|
||||
{
|
||||
LLViewerParcelMedia::stopStreamingMusic();
|
||||
}
|
||||
if (option == 1) // Deny
|
||||
else
|
||||
{
|
||||
LLNotificationsUtil::add("MediaBlocked", args);
|
||||
LLViewerParcelMedia::stopStreamingMusic();
|
||||
}
|
||||
else // Blacklist
|
||||
if (option == 1 || option == 2) // Deny or Blacklist
|
||||
{
|
||||
LLSD newmedia;
|
||||
newmedia["domain"] = domain;
|
||||
newmedia["action"] = "deny";
|
||||
LLViewerParcelMedia::sMediaFilterList.append(newmedia);
|
||||
LLViewerParcelMedia::sDeniedMedia.insert(domain);
|
||||
if (ip != domain && domain.find('/') == std::string::npos)
|
||||
{
|
||||
newmedia["domain"] = ip;
|
||||
LLViewerParcelMedia::sMediaFilterList.append(newmedia);
|
||||
LLViewerParcelMedia::sDeniedMedia.insert(ip);
|
||||
}
|
||||
|
||||
if (option == 1) // Deny
|
||||
{
|
||||
LLNotificationsUtil::add("MediaBlocked", args);
|
||||
}
|
||||
else // Blacklist
|
||||
{
|
||||
LLSD newmedia;
|
||||
newmedia["domain"] = domain;
|
||||
newmedia["action"] = "deny";
|
||||
LLViewerParcelMedia::sMediaFilterList.append(newmedia);
|
||||
if (ip != domain && domain.find('/') == std::string::npos)
|
||||
{
|
||||
newmedia["domain"] = ip;
|
||||
LLViewerParcelMedia::sMediaFilterList.append(newmedia);
|
||||
}
|
||||
LLViewerParcelMedia::saveDomainFilterList();
|
||||
args["LISTED"] = "blacklisted";
|
||||
LLNotificationsUtil::add("MediaListed", args);
|
||||
}
|
||||
LLViewerParcelMedia::saveDomainFilterList();
|
||||
args["LISTED"] = "blacklisted";
|
||||
LLNotificationsUtil::add("MediaListed", args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -372,8 +372,8 @@ public:
|
||||
}
|
||||
}
|
||||
static const LLCachedControl<bool> use_rmse_auto_mask("SHUseRMSEAutoMask",false);
|
||||
static const LLCachedControl<F32> alpha_mas_max_rmse("SHAlphaMaskMaxRMSE",.09f);
|
||||
addText(xpos, ypos, llformat("Mask: %s", imagep->getIsAlphaMask(use_rmse_auto_mask ? alpha_mas_max_rmse : -1.f) ? "TRUE":"FALSE")); ypos += y_inc;
|
||||
static const LLCachedControl<F32> auto_mask_max_rmse("SHAutoMaskMaxRMSE",.09f);
|
||||
addText(xpos, ypos, llformat("Mask: %s", imagep->getIsAlphaMask(use_rmse_auto_mask ? auto_mask_max_rmse : -1.f) ? "TRUE":"FALSE")); ypos += y_inc;
|
||||
addText(xpos, ypos, llformat("ID: %s", imagep->getID().asString().c_str())); ypos += y_inc;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
indra/newview/skins/default/textures/inv_reset.tga
Normal file
BIN
indra/newview/skins/default/textures/inv_reset.tga
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
@@ -12,7 +12,7 @@
|
||||
label="" image_overlay="inv_expand_all.tga" name="Inventory.ExpandAll" mouse_opaque="true" font="SansSerif"
|
||||
tool_tip="Expand All"/>
|
||||
<button left="50" bottom_delta="0" height="22" width="22" follows="left|top" label="" scale_image="true"
|
||||
image_selected="UIImgBtnClosePressedUUID" image_unselected="UIImgBtnCloseActiveUUID" name="Inventory.ResetAll" tool_tip="Reset inventory: clear filters and collapse all folders."/>
|
||||
image_overlay="inv_reset.tga" name="Inventory.ResetAll" tool_tip="Reset inventory: clear filters and collapse all folders."/>
|
||||
<text name="group_titles_textbox" halign="right" font="SansSerifSmall" follows="left|top"
|
||||
height="16" left="43" bottom_delta="2" right="108">Type:</text>
|
||||
<!-- Inventory Type Filter Labels -->
|
||||
|
||||
@@ -80,9 +80,10 @@
|
||||
initial_value="false" label="Copy" left_delta="78" mouse_opaque="true"
|
||||
name="CheckOwnerCopy" radio_style="false" width="88" />
|
||||
<check_box bottom="-155" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Resell/Give away" left_delta="88"
|
||||
initial_value="false" label="Transfer" left_delta="88"
|
||||
mouse_opaque="true" name="CheckOwnerTransfer" radio_style="false"
|
||||
width="106" />
|
||||
<check_box name="CheckOwnerExport" label="Export" bottom_delta="0" follows="left|top" left_delta="88" enabled="false"/>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-165" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||
@@ -140,6 +141,7 @@
|
||||
<check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Move" left_delta="88" mouse_opaque="true"
|
||||
name="CheckEveryoneMove" radio_style="false" width="88" />
|
||||
<check_box name="CheckExport" label="Export" bottom_delta="0" follows="left|top" left_delta="88"/>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom_delta="-13" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
|
||||
@@ -153,7 +155,7 @@
|
||||
initial_value="false" label="Copy" left_delta="78" mouse_opaque="true"
|
||||
name="CheckNextOwnerCopy" radio_style="false" width="88" />
|
||||
<check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Resell/Give away" left_delta="88"
|
||||
initial_value="false" label="Transfer" left_delta="88"
|
||||
mouse_opaque="true" name="CheckNextOwnerTransfer" radio_style="false"
|
||||
width="106" />
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
<panel label="Permissions" name="permissions" width="292" height="120" left="10" border="true" bottom="-140">
|
||||
<button name="help" label="?" label_selected="?" bottom_delta="-25" height="18" width="22" left="260"/>
|
||||
<check_box bottom_delta="0" width="106" height="16" left="10" initial_value="false" label="Share with group" name="share_with_group" control_name="ShareWithGroup"/>
|
||||
<check_box bottom_delta="-32" width="130" height="16" initial_value="false" label="Allow anyone to copy" name="everyone_copy" control_name="EveryoneCopy"/>
|
||||
<text bottom_delta="-26" name="NextOwnerLabel" height="10">Next owner can:</text>
|
||||
<check_box bottom_delta="-20" width="130" height="16" initial_value="false" label="Allow anyone to copy" name="everyone_copy" control_name="EveryoneCopy"/>
|
||||
<check_box bottom_delta="-20" label="Allow exportation" name="everyone_export" control_name="EveryoneExport"/>
|
||||
<text bottom_delta="-18" name="NextOwnerLabel" height="10">Next owner can:</text>
|
||||
<check_box bottom_delta="-30" width="78" height="16" initial_value="false" label="Modify" name="next_owner_modify" control_name="NextOwnerModify"/>
|
||||
<check_box bottom_delta="0" width="88" height="16" left_delta="78" initial_value="false" label="Copy" name="next_owner_copy" control_name="NextOwnerCopy"/>
|
||||
<check_box bottom_delta="0" width="106" height="16" left_delta="88" initial_value="true" label="Resell/Give away" name="next_owner_transfer" control_name="NextOwnerTransfer"/>
|
||||
|
||||
@@ -429,12 +429,14 @@
|
||||
mouse_opaque="true" name="button deed" scale_image="TRUE"
|
||||
tool_tip="Group shared objects can be deeded by a group officer."
|
||||
width="78" />
|
||||
<check_box bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Allow anyone to move" left="10"
|
||||
<text name="text anyone can" bottom_delta="-12" left="10" follows="left|top">Anyone can:</text>
|
||||
<check_box bottom_delta="-24" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Move"
|
||||
mouse_opaque="true" name="checkbox allow everyone move" width="142" />
|
||||
<check_box bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Allow anyone to copy" left="10"
|
||||
<check_box bottom_delta="0" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Copy" left_delta="60"
|
||||
mouse_opaque="true" name="checkbox allow everyone copy" width="141" />
|
||||
<check_box name="checkbox allow export" label="Export" bottom_delta="0" left_delta="60" follows="left|top"/>
|
||||
<check_box bottom_delta="-18" follows="left|top" font="SansSerifSmall" height="16"
|
||||
initial_value="false" label="Show in search" left="10" name="search_check"
|
||||
tool_tip="Let people see this object in search results" width="78" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<panel bg_visible="false" border="false" border_visible="false" height="200" name="Adv_Settings" use_bounding_rect="true" width="220">
|
||||
<panel bottom="1" filename="panel_bg_tab.xml" height="197" width="197"/>
|
||||
<slider bottom="177" left="5" control_name="RenderFarClip" decimal_digits="0" height="20" increment="8" label="Draw Dist.:" can_edit_text="true" label_width="60" max_val="1024" min_val="24" val_width="36" name="DrawDistance" width="189" tool_tip="Change your Draw Distance"/>
|
||||
<panel bg_visible="false" border="false" border_visible="false" height="180" name="Adv_Settings" use_bounding_rect="true" width="220">
|
||||
<panel bottom="1" filename="panel_bg_tab.xml" height="177" width="197"/>
|
||||
<slider bottom="157" left="5" control_name="RenderFarClip" decimal_digits="0" height="20" increment="8" label="Draw Dist.:" can_edit_text="true" label_width="60" max_val="1024" min_val="24" val_width="36" name="DrawDistance" width="189" tool_tip="Change your Draw Distance"/>
|
||||
<slider bottom_delta="-20" control_name="RenderMaxPartCount" decimal_digits="0" height="20" increment="256" label="Particles:" can_edit_text="true" label_width="60" max_val="8192" min_val="0" val_width="36" name="MaxParticleCount" width="189" tool_tip="Amount of particles to render"/>
|
||||
<slider bottom_delta="-20" control_name="RenderAvatarMaxVisible" decimal_digits="0" height="20" increment="1" label="Max Avs:" can_edit_text="true" label_width="60" max_val="50" min_val="1" val_width="36" name="RenderAvatarMaxVisible" width="189" tool_tip="How many avatars to fully render on screen. Lowering this greatly improves FPS in crowded situations. Requires Avatar Impostors to be on. [Default 35]"/>
|
||||
<slider bottom_delta="-20" control_name="RenderVolumeLODFactor" height="20" increment="0.125" label="Obj. Detail:" can_edit_text="true" label_width="60" max_val="4" min_val="0.5" name="Object Detail" val_width="36" width="189" tool_tip="Controls level of detail of primitives (multiplier for current screen area when calculated level of detail[0.5 to 2.0 is stable])"/>
|
||||
|
||||
Reference in New Issue
Block a user