Merge viewer-neko

master
Ansariel 2017-03-15 19:55:39 +01:00
commit 9c7ac9e101
20 changed files with 621 additions and 38 deletions

View File

@ -311,6 +311,7 @@ set(viewer_SOURCE_FILES
llfloaterautoreplacesettings.cpp
llfloateravatar.cpp
llfloateravatarpicker.cpp
llfloateravatarrendersettings.cpp
llfloateravatartextures.cpp
llfloaterbeacons.cpp
llfloaterbigpreview.cpp
@ -1060,6 +1061,7 @@ set(viewer_HEADER_FILES
llfloaterautoreplacesettings.h
llfloateravatar.h
llfloateravatarpicker.h
llfloateravatarrendersettings.h
llfloateravatartextures.h
llfloaterbeacons.h
llfloaterbigpreview.h

View File

@ -10852,6 +10852,17 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>1</integer>
</map>
<key>AlwaysRenderFriends</key>
<map>
<key>Comment</key>
<string>Always render friends regardless of max complexity</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RenderAvatar</key>
<map>
<key>Comment</key>

View File

@ -0,0 +1,238 @@
/**
* @file llfloateravatarrendersettings.cpp
* @brief Shows the list of avatars with non-default rendering settings
*
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2017, 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"
#if 0 // <FS:Ansariel> [FS Persisted Avatar Render Settings]
#include "llfloateravatarrendersettings.h"
#include "llavatarnamecache.h"
#include "llfiltereditor.h"
#include "llfloaterreg.h"
#include "llnamelistctrl.h"
#include "llmenugl.h"
#include "llviewerobjectlist.h"
#include "llvoavatar.h"
class LLSettingsContextMenu : public LLListContextMenu
{
public:
LLSettingsContextMenu(LLFloaterAvatarRenderSettings* floater_settings)
: mFloaterSettings(floater_settings)
{}
protected:
LLContextMenu* createMenu()
{
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
registrar.add("Settings.SetRendering", boost::bind(&LLFloaterAvatarRenderSettings::onCustomAction, mFloaterSettings, _2, mUUIDs.front()));
enable_registrar.add("Settings.IsSelected", boost::bind(&LLFloaterAvatarRenderSettings::isActionChecked, mFloaterSettings, _2, mUUIDs.front()));
LLContextMenu* menu = createFromFile("menu_avatar_rendering_settings.xml");
return menu;
}
LLFloaterAvatarRenderSettings* mFloaterSettings;
};
class LLAvatarRenderMuteListObserver : public LLMuteListObserver
{
/* virtual */ void onChange() { LLFloaterAvatarRenderSettings::setNeedsUpdate();}
};
static LLAvatarRenderMuteListObserver sAvatarRenderMuteListObserver;
LLFloaterAvatarRenderSettings::LLFloaterAvatarRenderSettings(const LLSD& key)
: LLFloater(key),
mAvatarSettingsList(NULL),
mNeedsUpdate(false)
{
mContextMenu = new LLSettingsContextMenu(this);
LLRenderMuteList::getInstance()->addObserver(&sAvatarRenderMuteListObserver);
}
LLFloaterAvatarRenderSettings::~LLFloaterAvatarRenderSettings()
{
delete mContextMenu;
LLRenderMuteList::getInstance()->removeObserver(&sAvatarRenderMuteListObserver);
}
BOOL LLFloaterAvatarRenderSettings::postBuild()
{
LLFloater::postBuild();
mAvatarSettingsList = getChild<LLNameListCtrl>("render_settings_list");
mAvatarSettingsList->setRightMouseDownCallback(boost::bind(&LLFloaterAvatarRenderSettings::onAvatarListRightClick, this, _1, _2, _3));
getChild<LLFilterEditor>("people_filter_input")->setCommitCallback(boost::bind(&LLFloaterAvatarRenderSettings::onFilterEdit, this, _2));
return TRUE;
}
void LLFloaterAvatarRenderSettings::draw()
{
if(mNeedsUpdate)
{
updateList();
mNeedsUpdate = false;
}
LLFloater::draw();
}
void LLFloaterAvatarRenderSettings::onAvatarListRightClick(LLUICtrl* ctrl, S32 x, S32 y)
{
LLNameListCtrl* list = dynamic_cast<LLNameListCtrl*>(ctrl);
if (!list) return;
list->selectItemAt(x, y, MASK_NONE);
uuid_vec_t selected_uuids;
if(list->getCurrentID().notNull())
{
selected_uuids.push_back(list->getCurrentID());
mContextMenu->show(ctrl, selected_uuids, x, y);
}
}
void LLFloaterAvatarRenderSettings::onOpen(const LLSD& key)
{
updateList();
}
void LLFloaterAvatarRenderSettings::updateList()
{
mAvatarSettingsList->deleteAllItems();
LLAvatarName av_name;
LLNameListCtrl::NameItem item_params;
for (std::map<LLUUID, S32>::iterator iter = LLRenderMuteList::getInstance()->sVisuallyMuteSettingsMap.begin(); iter != LLRenderMuteList::getInstance()->sVisuallyMuteSettingsMap.end(); iter++)
{
item_params.value = iter->first;
LLAvatarNameCache::get(iter->first, &av_name);
if(!isHiddenRow(av_name.getCompleteName()))
{
item_params.columns.add().value(av_name.getCompleteName()).column("name");
std::string setting = getString(iter->second == 1 ? "av_never_render" : "av_always_render");
item_params.columns.add().value(setting).column("setting");
mAvatarSettingsList->addNameItemRow(item_params);
}
}
}
void LLFloaterAvatarRenderSettings::onFilterEdit(const std::string& search_string)
{
std::string filter_upper = search_string;
LLStringUtil::toUpper(filter_upper);
if (mNameFilter != filter_upper)
{
mNameFilter = filter_upper;
mNeedsUpdate = true;
}
}
bool LLFloaterAvatarRenderSettings::isHiddenRow(const std::string& av_name)
{
if (mNameFilter.empty()) return false;
std::string upper_name = av_name;
LLStringUtil::toUpper(upper_name);
return std::string::npos == upper_name.find(mNameFilter);
}
static LLVOAvatar* find_avatar(const LLUUID& id)
{
LLViewerObject *obj = gObjectList.findObject(id);
while (obj && obj->isAttachment())
{
obj = (LLViewerObject *)obj->getParent();
}
if (obj && obj->isAvatar())
{
return (LLVOAvatar*)obj;
}
else
{
return NULL;
}
}
void LLFloaterAvatarRenderSettings::onCustomAction (const LLSD& userdata, const LLUUID& av_id)
{
const std::string command_name = userdata.asString();
S32 new_setting = 0;
if ("default" == command_name)
{
new_setting = S32(LLVOAvatar::AV_RENDER_NORMALLY);
}
else if ("never" == command_name)
{
new_setting = S32(LLVOAvatar::AV_DO_NOT_RENDER);
}
else if ("always" == command_name)
{
new_setting = S32(LLVOAvatar::AV_ALWAYS_RENDER);
}
LLVOAvatar *avatarp = find_avatar(av_id);
if (avatarp)
{
avatarp->setVisualMuteSettings(LLVOAvatar::VisualMuteSettings(new_setting));
}
else
{
LLRenderMuteList::getInstance()->saveVisualMuteSetting(av_id, new_setting);
}
}
bool LLFloaterAvatarRenderSettings::isActionChecked(const LLSD& userdata, const LLUUID& av_id)
{
const std::string command_name = userdata.asString();
S32 visual_setting = LLRenderMuteList::getInstance()->getSavedVisualMuteSetting(av_id);
if ("default" == command_name)
{
return (visual_setting == S32(LLVOAvatar::AV_RENDER_NORMALLY));
}
else if ("never" == command_name)
{
return (visual_setting == S32(LLVOAvatar::AV_DO_NOT_RENDER));
}
else if ("always" == command_name)
{
return (visual_setting == S32(LLVOAvatar::AV_ALWAYS_RENDER));
}
return false;
}
void LLFloaterAvatarRenderSettings::setNeedsUpdate()
{
LLFloaterAvatarRenderSettings* instance = LLFloaterReg::getTypedInstance<LLFloaterAvatarRenderSettings>("avatar_render_settings");
if(!instance) return;
instance->mNeedsUpdate = true;
}
#endif

View File

@ -0,0 +1,71 @@
/**
* @file llfloateravatarrendersettings.h
* @brief Shows the list of avatars with non-default rendering settings
*
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2017, 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$
*/
#if 0 // <FS:Ansariel> [FS Persisted Avatar Render Settings]
#ifndef LL_LLFLOATERAVATARRENDERSETTINGS_H
#define LL_LLFLOATERAVATARRENDERSETTINGS_H
#include "llfloater.h"
#include "lllistcontextmenu.h"
#include "llmutelist.h"
class LLNameListCtrl;
class LLFloaterAvatarRenderSettings : public LLFloater
{
public:
LLFloaterAvatarRenderSettings(const LLSD& key);
virtual ~LLFloaterAvatarRenderSettings();
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void draw();
void onAvatarListRightClick(LLUICtrl* ctrl, S32 x, S32 y);
void updateList();
void onFilterEdit(const std::string& search_string);
void onCustomAction (const LLSD& userdata, const LLUUID& av_id);
bool isActionChecked(const LLSD& userdata, const LLUUID& av_id);
static void setNeedsUpdate();
private:
bool isHiddenRow(const std::string& av_name);
bool mNeedsUpdate;
LLListContextMenu* mContextMenu;
LLNameListCtrl* mAvatarSettingsList;
std::string mNameFilter;
};
#endif //LL_LLFLOATERAVATARRENDERSETTINGS_H
#endif

View File

@ -509,6 +509,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.ClickEnablePopup", boost::bind(&LLFloaterPreference::onClickEnablePopup, this));
mCommitCallbackRegistrar.add("Pref.ClickDisablePopup", boost::bind(&LLFloaterPreference::onClickDisablePopup, this));
mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this));
mCommitCallbackRegistrar.add("Pref.RenderExceptions", boost::bind(&LLFloaterPreference::onClickRenderExceptions, this));
mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this));
mCommitCallbackRegistrar.add("Pref.AvatarImpostorsEnable", boost::bind(&LLFloaterPreference::onAvatarImpostorsEnable, this));
mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxComplexity", boost::bind(&LLFloaterPreference::updateMaxComplexity, this));
@ -539,7 +540,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2));
gSavedSettings.getControl("AppearanceCameraMovement")->getCommitSignal()->connect(boost::bind(&handleAppearanceCameraMovementChanged, _2));
LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this );
@ -1237,16 +1238,20 @@ void LLFloaterPreference::onOpen(const LLSD& key)
// <FS:Ansariel> Fix resetting graphics preset on cancel
saveGraphicsPreset(gSavedSettings.getString("PresetGraphicActive"));
// <FS:Ansariel> FIRE-19810: Make presets global since PresetGraphicActive setting is global as well
//bool started = (LLStartUp::getStartupState() == STATE_STARTED);
bool started = (LLStartUp::getStartupState() == STATE_STARTED);
// <FS:Ansariel> FIRE-19810: Make presets global since PresetGraphicActive setting is global as well
//LLButton* load_btn = findChild<LLButton>("PrefLoadButton");
//LLButton* save_btn = findChild<LLButton>("PrefSaveButton");
//LLButton* delete_btn = findChild<LLButton>("PrefDeleteButton");
//LLButton* exceptions_btn = findChild<LLButton>("RenderExceptionsButton");
//load_btn->setEnabled(started);
//save_btn->setEnabled(started);
//delete_btn->setEnabled(started);
//exceptions_btn->setEnabled(started);
LLButton* exceptions_btn = findChild<LLButton>("RenderExceptionsButton");
exceptions_btn->setEnabled(started);
// </FS:Ansariel>
// <FS:ND> Hook up and init for filtering
@ -3334,6 +3339,11 @@ void LLFloaterPreference::onClickSpellChecker()
LLFloaterReg::showInstance("prefs_spellchecker");
}
void LLFloaterPreference::onClickRenderExceptions()
{
LLFloaterReg::showInstance("avatar_render_settings");
}
void LLFloaterPreference::onClickAdvanced()
{
LLFloaterReg::showInstance("prefs_graphics_advanced");

View File

@ -255,6 +255,7 @@ public:
void onClickPermsDefault();
void onClickAutoReplace();
void onClickSpellChecker();
void onClickRenderExceptions();
void onClickAdvanced();
void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
void getUIColor(LLUICtrl* ctrl, const LLSD& param);

View File

@ -523,9 +523,12 @@ void LLInventoryModelBackgroundFetch::incrFetchCount(S32 fetching)
}
}
static LLTrace::BlockTimerStatHandle FTM_BULK_FETCH("Bulk Fetch");
// Bundle up a bunch of requests to send all at once.
void LLInventoryModelBackgroundFetch::bulkFetch()
{
LL_RECORD_BLOCK_TIME(FTM_BULK_FETCH);
//Background fetch is called from gIdleCallbacks in a loop until background fetch is stopped.
//If there are items in mFetchQueue, we want to check the time since the last bulkFetch was
//sent. If it exceeds our retry time, go ahead and fire off another batch.

View File

@ -873,3 +873,101 @@ void LLMuteList::notifyObserversDetailed(const LLMute& mute)
it = mObservers.upper_bound(observer);
}
}
#if 0 // <FS:Ansariel> [FS Persisted Avatar Render Settings]
LLRenderMuteList::LLRenderMuteList()
{}
bool LLRenderMuteList::saveToFile()
{
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "render_mute_settings.txt");
LLFILE* fp = LLFile::fopen(filename, "wb");
if (!fp)
{
LL_WARNS() << "Couldn't open render mute list file: " << filename << LL_ENDL;
return false;
}
for (std::map<LLUUID, S32>::iterator it = sVisuallyMuteSettingsMap.begin(); it != sVisuallyMuteSettingsMap.end(); ++it)
{
if (it->second != 0)
{
std::string id_string;
it->first.toString(id_string);
fprintf(fp, "%d %s\n", (S32)it->second, id_string.c_str());
}
}
fclose(fp);
return true;
}
bool LLRenderMuteList::loadFromFile()
{
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "render_mute_settings.txt");
LLFILE* fp = LLFile::fopen(filename, "rb");
if (!fp)
{
LL_WARNS() << "Couldn't open render mute list file: " << filename << LL_ENDL;
return false;
}
char id_buffer[MAX_STRING];
char buffer[MAX_STRING];
while (!feof(fp) && fgets(buffer, MAX_STRING, fp))
{
id_buffer[0] = '\0';
S32 setting = 0;
sscanf(buffer, " %d %254s\n", &setting, id_buffer);
sVisuallyMuteSettingsMap[LLUUID(id_buffer)] = setting;
}
fclose(fp);
return true;
}
void LLRenderMuteList::saveVisualMuteSetting(const LLUUID& agent_id, S32 setting)
{
if(setting == 0)
{
sVisuallyMuteSettingsMap.erase(agent_id);
}
else
{
sVisuallyMuteSettingsMap[agent_id] = setting;
}
saveToFile();
notifyObservers();
}
S32 LLRenderMuteList::getSavedVisualMuteSetting(const LLUUID& agent_id)
{
std::map<LLUUID, S32>::iterator iter = sVisuallyMuteSettingsMap.find(agent_id);
if (iter != sVisuallyMuteSettingsMap.end())
{
return iter->second;
}
return 0;
}
void LLRenderMuteList::addObserver(LLMuteListObserver* observer)
{
mObservers.insert(observer);
}
void LLRenderMuteList::removeObserver(LLMuteListObserver* observer)
{
mObservers.erase(observer);
}
void LLRenderMuteList::notifyObservers()
{
for (observer_set_t::iterator it = mObservers.begin();
it != mObservers.end();
)
{
LLMuteListObserver* observer = *it;
observer->onChange();
// In case onChange() deleted an entry.
it = mObservers.upper_bound(observer);
}
}
#endif

View File

@ -178,5 +178,26 @@ public:
virtual void onChangeDetailed(const LLMute& ) { }
};
#if 0 // <FS:Ansariel> [FS Persisted Avatar Render Settings]
class LLRenderMuteList : public LLSingleton<LLRenderMuteList>
{
LLSINGLETON(LLRenderMuteList);
public:
bool loadFromFile();
bool saveToFile();
S32 getSavedVisualMuteSetting(const LLUUID& agent_id);
void saveVisualMuteSetting(const LLUUID& agent_id, S32 setting);
void addObserver(LLMuteListObserver* observer);
void removeObserver(LLMuteListObserver* observer);
std::map<LLUUID, S32> sVisuallyMuteSettingsMap;
private:
void notifyObservers();
typedef std::set<LLMuteListObserver*> observer_set_t;
observer_set_t mObservers;
};
#endif
#endif //LL_MUTELIST_H

View File

@ -117,15 +117,13 @@ BOOL LLPanelSnapshotPostcard::postBuild()
// virtual
void LLPanelSnapshotPostcard::onOpen(const LLSD& key)
{
// <FS:Ansariel> Fill "From" field
LLLineEditor* from = getChild<LLLineEditor>("name_form");
if (from->getText().empty())
LLUICtrl* name_form = getChild<LLUICtrl>("name_form");
if (name_form && name_form->getValue().asString().empty())
{
std::string name_string;
LLAgentUI::buildFullname(name_string);
from->setText(name_string);
getChild<LLUICtrl>("name_form")->setValue(LLSD(name_string));
}
// </FS:Ansariel>
// <FS:Ansariel> For OpenSim compatibility
// pick up the user's up-to-date email address

View File

@ -655,6 +655,12 @@ bool LLSelectMgr::linkObjects()
return true;
}
if (!LLSelectMgr::getInstance()->selectGetSameRegion())
{
LLNotificationsUtil::add("CannotLinkAcrossRegions");
return true;
}
LLSelectMgr::getInstance()->sendLink();
return true;
@ -2872,6 +2878,35 @@ BOOL LLSelectMgr::selectGetRootsModify()
return TRUE;
}
//-----------------------------------------------------------------------------
// selectGetSameRegion() - return TRUE if all objects are in same region
//-----------------------------------------------------------------------------
BOOL LLSelectMgr::selectGetSameRegion()
{
if (getSelection()->isEmpty())
{
return TRUE;
}
LLViewerObject* object = getSelection()->getFirstObject();
if (!object)
{
return FALSE;
}
LLViewerRegion* current_region = object->getRegion();
for (LLObjectSelection::root_iterator iter = getSelection()->root_begin();
iter != getSelection()->root_end(); iter++)
{
LLSelectNode* node = *iter;
object = node->getObject();
if (!node->mValid || !object || current_region != object->getRegion())
{
return FALSE;
}
}
return TRUE;
}
//-----------------------------------------------------------------------------
// selectGetNonPermanentEnforced() - return TRUE if all objects are not

View File

@ -700,6 +700,9 @@ public:
BOOL selectGetRootsModify();
BOOL selectGetModify();
// returns TRUE if all objects are in same region
BOOL selectGetSameRegion();
// returns TRUE if is all objects are non-permanent-enforced
BOOL selectGetRootsNonPermanentEnforced();
BOOL selectGetNonPermanentEnforced();

View File

@ -1443,6 +1443,9 @@ bool idle_startup()
// Load media plugin cookies
LLViewerMedia::loadCookieFile();
// <FS:Ansariel> [FS Persisted Avatar Render Settings]
//LLRenderMuteList::getInstance()->loadFromFile();
//-------------------------------------------------
// Handle startup progress screen
//-------------------------------------------------

View File

@ -38,6 +38,7 @@
#include "llfloaterautoreplacesettings.h"
#include "llfloateravatar.h"
#include "llfloateravatarpicker.h"
//#include "llfloateravatarrendersettings.h" // <FS:Ansariel> [FS Persisted Avatar Render Settings]
#include "llfloateravatartextures.h"
#include "llfloaterbigpreview.h"
#include "llfloaterbeacons.h"
@ -239,6 +240,8 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
LLFloaterReg::add("avatar", "floater_avatar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatar>);
LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>);
// <FS:Ansariel> [FS Persisted Avatar Render Settings]
//LLFloaterReg::add("avatar_render_settings", "floater_avatar_render_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarRenderSettings>);
LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>);
LLFloaterReg::add("beacons", "floater_beacons.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBeacons>);

View File

@ -3134,8 +3134,16 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
return TRUE;
}
if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask))
||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)))
if (gAgent.isInitialized()
&& (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE || gAgent.getTeleportState() == LLAgent::TELEPORT_LOCAL)
&& gMenuBarView
&& gMenuBarView->handleAcceleratorKey(key, mask))
{
LLViewerEventRecorder::instance().logKeyEvent(key, mask);
return TRUE;
}
if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))
{
LLViewerEventRecorder::instance().logKeyEvent(key,mask);
return TRUE;
@ -3322,8 +3330,16 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// </FS:Ansariel> [FS Communication UI]
// give menus a chance to handle unmodified accelerator keys
if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask))
||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)))
if (gAgent.isInitialized()
&& (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE || gAgent.getTeleportState() == LLAgent::TELEPORT_LOCAL)
&& gMenuBarView
&& gMenuBarView->handleAcceleratorKey(key, mask))
{
LLViewerEventRecorder::instance().logKeyEvent(key, mask);
return TRUE;
}
if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))
{
return TRUE;
}

View File

@ -755,8 +755,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
LLSceneMonitor::getInstance()->freezeAvatar((LLCharacter*)this);
}
// <FS:Ansariel> Load persisted avatar render settings
//mVisuallyMuteSetting = getSavedVisualMuteSettings();
// <FS:Ansariel> [FS Persisted Avatar Render Settings]
//mVisuallyMuteSetting = LLVOAvatar::VisualMuteSettings(LLRenderMuteList::getInstance()->getSavedVisualMuteSetting(getID()));
mVisuallyMuteSetting = FSAvatarRenderPersistence::instance().getAvatarRenderSettings(id);
}
@ -7864,7 +7864,9 @@ BOOL LLVOAvatar::isFullyLoaded() const
bool LLVOAvatar::isTooComplex() const
{
bool too_complex;
if (isSelf() || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && gSavedSettings.getBOOL("AlwaysRenderFriends"));
if (isSelf() || render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
{
too_complex = false;
}
@ -10144,32 +10146,15 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
}
}
//static
// <FS:Ansariel> Load persisted avatar render settings
//std::map<LLUUID, LLVOAvatar::VisualMuteSettings> LLVOAvatar::sVisuallyMuteSettingsMap;
void LLVOAvatar::setVisualMuteSettings(VisualMuteSettings set)
{
mVisuallyMuteSetting = set;
mNeedsImpostorUpdate = TRUE;
// <FS:Ansariel> Load persisted avatar render settings
//sVisuallyMuteSettingsMap[getID()] = set;
// <FS:Ansariel> [FS Persisted Avatar Render Settings]
//LLRenderMuteList::getInstance()->saveVisualMuteSetting(getID(), S32(set));
FSAvatarRenderPersistence::instance().setAvatarRenderSettings(getID(), set);
}
// <FS:Ansariel> Load persisted avatar render settings
//LLVOAvatar::VisualMuteSettings LLVOAvatar::getSavedVisualMuteSettings()
//{
// std::map<LLUUID, VisualMuteSettings>::iterator iter = sVisuallyMuteSettingsMap.find(getID());
// if (iter != sVisuallyMuteSettingsMap.end())
// {
// return iter->second;
// }
//
// return AV_RENDER_NORMALLY;
//}
// </FS:Ansariel>
void LLVOAvatar::calcMutedAVColor()
{
LLColor4 new_color(mMutedAVColor);

View File

@ -419,8 +419,6 @@ public:
};
void setVisualMuteSettings(VisualMuteSettings set);
VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; };
// <FS:Ansariel> Load persisted avatar render settings
//VisualMuteSettings getSavedVisualMuteSettings();
U32 renderRigid();
U32 renderSkinned();
@ -454,8 +452,6 @@ public:
VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV
// <FS:Ansariel> Load persisted avatar render settings
//static std::map<LLUUID, VisualMuteSettings> sVisuallyMuteSettingsMap;
//--------------------------------------------------------------------
// Morph masks
//--------------------------------------------------------------------

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<floater
can_resize="true"
positioning="cascading"
height="200"
min_height="100"
min_width="230"
layout="topleft"
name="floater_avatar_render_settings"
save_rect="true"
single_instance="true"
reuse_instance="true"
title="AVATAR RENDER SETTINGS"
width="300">
<string
name="av_never_render"
value="Never"/>
<string
name="av_always_render"
value="Always"/>
<filter_editor
follows="left|top|right"
height="23"
layout="topleft"
left="8"
right="-8"
label="Filter People"
max_length_chars="300"
name="people_filter_input"
text_color="Black"
text_pad_left="10"
top="4" />
<name_list
allow_select="true"
bottom="-8"
draw_heading="true"
opaque="true"
follows="all"
left="8"
keep_selection_visible_on_reshape="true"
item_pad="2"
multi_select="false"
name="render_settings_list"
right="-8"
top="32">
<name_list.columns
label="Name"
name="name"
relative_width="0.65" />
<name_list.columns
label="Render setting"
name="setting"
relative_width="0.35" />
</name_list>
</floater>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<context_menu
layout="topleft"
name="Settings">
<menu_item_check
label="Default"
layout="topleft"
name="default">
<on_click function="Settings.SetRendering" parameter="default"/>
<on_check function="Settings.IsSelected" parameter="default" />
</menu_item_check>
<menu_item_check
label="Always render"
layout="topleft"
name="always_render">
<on_click function="Settings.SetRendering" parameter="always"/>
<on_check function="Settings.IsSelected" parameter="always" />
</menu_item_check>
<menu_item_check
label="Never render"
layout="topleft"
name="never_render">
<on_click function="Settings.SetRendering" parameter="never"/>
<on_check function="Settings.IsSelected" parameter="never" />
</menu_item_check>
</context_menu>

View File

@ -2018,6 +2018,14 @@ Please make sure none are locked, and that you own all of them.
<tag>fail</tag>
</notification>
<notification
icon="alertmodal.tga"
name="CannotLinkAcrossRegions"
type="alertmodal">
Objects cannot be linked across region boundaries.
<tag>fail</tag>
</notification>
<notification
icon="alertmodal.tga"
name="CannotLinkDifferentOwners"