Merge from default branch.

--HG--
branch : product-engine
meow-7.2.2
Vadim Savchuk 2009-12-24 16:30:10 +02:00
commit ed802c19ce
17 changed files with 174 additions and 90 deletions

View File

@ -135,7 +135,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
S32 scaled_max_pixels = max_pixels == S32_MAX ? S32_MAX : llceil((F32)max_pixels * sScaleX);
// determine which style flags need to be added programmatically by striping off the
// determine which style flags need to be added programmatically by stripping off the
// style bits that are drawn by the underlying Freetype font
U8 style_to_add = (style | mFontDescriptor.getStyle()) & ~mFontFreetype->getStyle();

View File

@ -842,7 +842,7 @@ BOOL LLTextBase::handleMouseUp(S32 x, S32 y, MASK mask)
{
// Did we just click on a link?
if (cur_segment->getStyle()
&& cur_segment->getStyle()->isLink())
&& cur_segment->getStyle()->isLink())
{
// *TODO: send URL here?
mURLClickSignal(this, LLSD() );
@ -1477,7 +1477,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url)
}
}
void LLTextBase::setText(const LLStringExplicit &utf8str ,const LLStyle::Params& input_params)
void LLTextBase::setText(const LLStringExplicit &utf8str, const LLStyle::Params& input_params)
{
// clear out the existing text and segments
getViewModel()->setDisplay(LLWStringUtil::null);
@ -2320,14 +2320,14 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
S32 end = llmin( selection_start, seg_end );
S32 length = end - start;
font->render(text, start,
rect.mLeft, rect.mTop,
color,
LLFontGL::LEFT, LLFontGL::TOP,
0,
mStyle->getShadowType(),
length, rect.getWidth(),
&right_x,
mEditor.getUseEllipses());
rect.mLeft, rect.mTop,
color,
LLFontGL::LEFT, LLFontGL::TOP,
LLFontGL::NORMAL,
mStyle->getShadowType(),
length, rect.getWidth(),
&right_x,
mEditor.getUseEllipses());
}
rect.mLeft = (S32)ceil(right_x);
@ -2339,14 +2339,14 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
S32 length = end - start;
font->render(text, start,
rect.mLeft, rect.mTop,
LLColor4( 1.f - color.mV[0], 1.f - color.mV[1], 1.f - color.mV[2], 1.f ),
LLFontGL::LEFT, LLFontGL::TOP,
0,
LLFontGL::NO_SHADOW,
length, rect.getWidth(),
&right_x,
mEditor.getUseEllipses());
rect.mLeft, rect.mTop,
LLColor4( 1.f - color.mV[0], 1.f - color.mV[1], 1.f - color.mV[2], 1.f ),
LLFontGL::LEFT, LLFontGL::TOP,
LLFontGL::NORMAL,
LLFontGL::NO_SHADOW,
length, rect.getWidth(),
&right_x,
mEditor.getUseEllipses());
}
rect.mLeft = (S32)ceil(right_x);
if( selection_end < seg_end )
@ -2356,14 +2356,14 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
S32 end = seg_end;
S32 length = end - start;
font->render(text, start,
rect.mLeft, rect.mTop,
color,
LLFontGL::LEFT, LLFontGL::TOP,
0,
mStyle->getShadowType(),
length, rect.getWidth(),
&right_x,
mEditor.getUseEllipses());
rect.mLeft, rect.mTop,
color,
LLFontGL::LEFT, LLFontGL::TOP,
LLFontGL::NORMAL,
mStyle->getShadowType(),
length, rect.getWidth(),
&right_x,
mEditor.getUseEllipses());
}
return right_x;
}

View File

@ -3585,7 +3585,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]</string>
<string>http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]</string>
</map>
<key>HighResSnapshot</key>
<map>

View File

@ -4555,18 +4555,8 @@ void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
}
else if (isRemoveAction(action))
{
if (get_is_item_worn(mUUID))
{
LLViewerInventoryItem* item = getItem();
if (item)
{
LLWearableList::instance().getAsset(item->getAssetUUID(),
item->getName(),
item->getType(),
LLWearableBridge::onRemoveFromAvatarArrived,
new OnRemoveStruct(mUUID));
}
}
removeFromAvatar();
return;
}
else LLItemBridge::performAction(folder, model, action);
}
@ -4949,6 +4939,66 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
delete on_remove_struct;
}
/* static */
void LLWearableBridge::removeAllClothesFromAvatar()
{
// Remove COF links.
for (S32 itype = WT_SHAPE; itype < WT_COUNT; ++itype)
{
if (itype == WT_SHAPE || itype == WT_SKIN || itype == WT_HAIR || itype == WT_EYES)
continue;
// MULTI-WEARABLES: fixed to index 0
LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(
gAgentWearables.getWearableInventoryItem((EWearableType)itype, 0));
if (!item)
continue;
const LLUUID &item_id = gInventory.getLinkedItemID(item->getUUID());
const LLWearable *wearable = gAgentWearables.getWearableFromItemID(item_id);
if (!wearable)
continue;
// Find and remove this item from the COF.
LLInventoryModel::item_array_t items = gInventory.collectLinkedItems(
item_id, LLAppearanceManager::instance().getCOF());
llassert(items.size() == 1); // Should always have one and only one item linked to this in the COF.
for (LLInventoryModel::item_array_t::const_iterator iter = items.begin();
iter != items.end();
++iter)
{
const LLViewerInventoryItem *linked_item = (*iter);
const LLUUID &item_id = linked_item->getUUID();
gInventory.purgeObject(item_id);
}
}
gInventory.notifyObservers();
// Remove wearables from gAgentWearables
LLAgentWearables::userRemoveAllClothes();
}
/* static */
void LLWearableBridge::removeItemFromAvatar(LLViewerInventoryItem *item)
{
if (item)
{
LLWearableList::instance().getAsset(item->getAssetUUID(),
item->getName(),
item->getType(),
LLWearableBridge::onRemoveFromAvatarArrived,
new OnRemoveStruct(item->getUUID()));
}
}
void LLWearableBridge::removeFromAvatar()
{
if (get_is_item_worn(mUUID))
{
LLViewerInventoryItem* item = getItem();
removeItemFromAvatar(item);
}
}
LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_type,
const LLUUID& uuid,LLInventoryModel* model)
{

View File

@ -572,7 +572,10 @@ public:
static BOOL canRemoveFromAvatar( void* userdata );
static void onRemoveFromAvatar( void* userdata );
static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata );
static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata );
static void removeItemFromAvatar(LLViewerInventoryItem *item);
static void removeAllClothesFromAvatar();
void removeFromAvatar();
protected:
LLWearableBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLAssetType::EType asset_type, LLInventoryType::EType inv_type, EWearableType wearable_type) :

View File

@ -198,7 +198,7 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive)
}
else
{
mChatHistory->appendMessage(chat,use_plain_text_chat_history);
mChatHistory->appendMessage(chat, use_plain_text_chat_history);
}
}

View File

@ -335,7 +335,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
if (tmp_chat.mChatStyle == CHAT_STYLE_IRC)
{
if(!tmp_chat.mFromName.empty())
tmp_chat.mText = tmp_chat.mFromName + " " + tmp_chat.mText.substr(3);
tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3);
else
tmp_chat.mText = tmp_chat.mText.substr(3);
}

View File

@ -160,6 +160,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect)
mBtnVolume = getChild<LLButton>( "volume_btn" );
mBtnVolume->setClickedCallback( onClickVolume, this );
mBtnVolume->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterVolume, this));
mBtnVolume->setIsChrome(TRUE);
gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2));

View File

@ -842,10 +842,10 @@ bool LLTextureFetchWorker::doWork(S32 param)
mLoaded = FALSE;
mGetStatus = 0;
mGetReason.clear();
lldebugs << "HTTP GET: " << mID << " Offset: " << offset
<< " Bytes: " << mRequestedSize
<< " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << max_bandwidth
<< llendl;
LL_DEBUGS("Texture") << "HTTP GET: " << mID << " Offset: " << offset
<< " Bytes: " << mRequestedSize
<< " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << max_bandwidth
<< LL_ENDL;
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
mState = WAIT_HTTP_REQ;
@ -1257,7 +1257,7 @@ void LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels,
gTextureList.sTextureBits += data_size * 8; // Approximate - does not include header bits
//llinfos << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << llendl;
LL_DEBUGS("Texture") << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << LL_ENDL;
if (data_size > 0)
{
// *TODO: set the formatted image data here directly to avoid the copy
@ -1450,8 +1450,9 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con
if (!url.empty() && (!exten.empty() && LLImageBase::getCodecFromExtension(exten) != IMG_CODEC_J2C))
{
// Only do partial requests for J2C at the moment
//llinfos << "Merov : LLTextureFetch::createRequest(), blocking fetch on " << url << llendl;
//llinfos << "Merov : LLTextureFetch::createRequest(), blocking fetch on " << url << llendl;
desired_size = MAX_IMAGE_DATA_SIZE;
desired_discard = 0;
}
else if (desired_discard == 0)
{

View File

@ -35,13 +35,14 @@
#include "llnotifications.h"
#include "llinstantmessage.h"
#include "llviewerchat.h"
const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6;
//--------------------------------------------------------------------------
LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notification),
mAvatar(NULL), mUserName(NULL),
mTime(NULL), mMessage(NULL)
mAvatar(NULL), mUserName(NULL),
mTime(NULL), mMessage(NULL)
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_instant_message.xml");
@ -52,8 +53,11 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
mMessage = getChild<LLTextBox>("message");
LLStyle::Params style_params;
style_params.font.name(LLFontGL::nameFromFont(style_params.font));
style_params.font.size(LLFontGL::sizeFromFont(style_params.font));
LLFontGL* fontp = LLViewerChat::getChatFont();
std::string font_name = LLFontGL::nameFromFont(fontp);
std::string font_size = LLFontGL::sizeFromFont(fontp);
style_params.font.name(font_name);
style_params.font.size(font_size);
style_params.font.style = "UNDERLINE";
//Handle IRC styled /me messages.
@ -63,13 +67,16 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
mMessage->clear();
style_params.font.style ="ITALIC";
mMessage->appendText(p.from + " ", FALSE, style_params);
mMessage->appendText(p.from, FALSE, style_params);
style_params.font.style = "ITALIC";
mMessage->appendText(p.message.substr(3), FALSE, style_params);
}
else
{
mMessage->setValue(p.message);
}
mUserName->setValue(p.from);
mTime->setValue(p.time);
mSessionID = p.session_id;

View File

@ -6479,21 +6479,27 @@ void menu_toggle_attached_particles(void* user_data)
LLPipeline::sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles");
}
class LLAdvancedHandleAttchedLightParticles: public view_listener_t
class LLAdvancedHandleAttachedLightParticles: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
std::string control_name = userdata.asString();
// toggle the control
gSavedSettings.setBOOL(control_name,
!gSavedSettings.getBOOL(control_name));
// update internal flags
if (control_name == "RenderAttachedLights")
{
{
menu_toggle_attached_lights(NULL);
}
}
else if (control_name == "RenderAttachedParticles")
{
{
menu_toggle_attached_particles(NULL);
}
}
return true;
}
}
};
class LLSomethingSelected : public view_listener_t
@ -7423,12 +7429,17 @@ class LLEditTakeOff : public view_listener_t
{
std::string clothing = userdata.asString();
if (clothing == "all")
LLAgentWearables::userRemoveAllClothes();
LLWearableBridge::removeAllClothesFromAvatar();
else
{
EWearableType type = LLWearableDictionary::typeNameToType(clothing);
if (type >= WT_SHAPE && type < WT_COUNT)
LLAgentWearables::userRemoveWearable(type);
{
// MULTI-WEARABLES
LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(gAgentWearables.getWearableInventoryItem(type,0));
LLWearableBridge::removeItemFromAvatar(item);
}
}
return true;
}
@ -7758,7 +7769,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedVectorizePerfTest(), "Advanced.VectorizePerfTest");
view_listener_t::addMenu(new LLAdvancedToggleFrameTest(), "Advanced.ToggleFrameTest");
view_listener_t::addMenu(new LLAdvancedCheckFrameTest(), "Advanced.CheckFrameTest");
view_listener_t::addMenu(new LLAdvancedHandleAttchedLightParticles(), "Advanced.HandleAttchedLightParticles");
view_listener_t::addMenu(new LLAdvancedHandleAttachedLightParticles(), "Advanced.HandleAttachedLightParticles");
#ifdef TOGGLE_HACKED_GODLIKE_VIEWER

View File

@ -2526,14 +2526,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
std::string prefix = mesg.substr(0, 4);
if (prefix == "/me " || prefix == "/me'")
{
// chat.mText = from_name;
// chat.mText += mesg.substr(3);
ircstyle = TRUE;
}
// else
// {
chat.mText = mesg;
// }
chat.mText = mesg;
// Look for the start of typing so we can put "..." in the bubbles.
if (CHAT_TYPE_START == chat.mChatType)

View File

@ -38,10 +38,12 @@
// Library includes
#include "llwindow.h" // spawnWebBrowser()
#include "llagent.h"
#include "llappviewer.h"
#include "llfloatermediabrowser.h"
#include "llfloaterreg.h"
#include "lllogininstance.h"
#include "llparcel.h"
#include "llsd.h"
#include "lltoastalertpanel.h"
#include "llui.h"
@ -49,6 +51,8 @@
#include "llversioninfo.h"
#include "llviewercontrol.h"
#include "llviewernetwork.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "llviewerwindow.h"
class URLLoader : public LLToastAlertPanel::URLLoader
@ -144,7 +148,27 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
substitution["LANGUAGE"] = LLUI::getLanguage();
substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel();
substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
substitution["SESSION_ID"] = gAgent.getSessionID();
// find the region ID
LLUUID region_id;
LLViewerRegion *region = gAgent.getRegion();
if (region)
{
region_id = region->getRegionID();
}
substitution["REGION_ID"] = region_id;
// find the parcel ID
LLUUID parcel_id;
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (parcel)
{
parcel_id = parcel->getID();
}
substitution["PARCEL_ID"] = parcel_id;
// expand all of the substitution strings and escape the url
std::string expanded_url = url;
LLStringUtil::format(expanded_url, substitution);

View File

@ -186,9 +186,8 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32
LLPointer<LLViewerFetchedTexture> LLWorldMipmap::loadObjectsTile(U32 grid_x, U32 grid_y, S32 level)
{
// Get the grid coordinates
// std::string imageurl = llformat("http://map.secondlife.com.s3.amazonaws.com/%d/%05d/%05d/map-%d-%d-%d-objects.jpg",
std::string imageurl = llformat("http://map.secondlife.com.s3.amazonaws.com/map-%d-%d-%d-objects.jpg",
level, grid_x, grid_y, level, grid_x, grid_y);
level, grid_x, grid_y);
// DO NOT COMMIT!! DEBUG ONLY!!!
// Use a local jpeg for every tile to test map speed without S3 access

View File

@ -480,7 +480,10 @@
name="location"
select_on_focus="true"
tool_tip="Type the name of a region"
width="152" />
width="152">
<search_editor.commit_callback
function="WMap.Location" />
</search_editor>
<button
follows="top|right"
height="23"

View File

@ -2481,30 +2481,30 @@
name="Debug Pipeline">
<menu_item_check.on_check
function="CheckControl"
parameter="RenderDebugGL" />
parameter="RenderDebugPipeline" />
<menu_item_check.on_click
function="ToggleControl"
parameter="RenderDebugGL" />
parameter="RenderDebugPipeline" />
</menu_item_check>
<menu_item_check
label="Fast Alpha"
name="Fast Alpha">
<menu_item_check.on_check
function="CheckControl"
parameter="RenderDebugGL" />
parameter="RenderFastAlpha" />
<menu_item_check.on_click
function="ToggleControl"
parameter="RenderDebugGL" />
parameter="RenderFastAlpha" />
</menu_item_check>
<menu_item_check
label="Animation Textures"
name="Animation Textures">
<menu_item_check.on_check
function="CheckControl"
parameter="RenderDebugGL" />
parameter="AnimateTextures" />
<menu_item_check.on_click
function="ToggleControl"
parameter="RenderDebugGL" />
parameter="AnimateTextures" />
</menu_item_check>
<menu_item_check
label="Disable Textures"
@ -2555,7 +2555,7 @@
function="CheckControl"
parameter="RenderAttachedLights" />
<menu_item_check.on_click
function="Advanced.HandleAttchedLightParticles"
function="Advanced.HandleAttachedLightParticles"
parameter="RenderAttachedLights" />
</menu_item_check>
<menu_item_check
@ -2565,7 +2565,7 @@
function="CheckControl"
parameter="RenderAttachedParticles" />
<menu_item_check.on_click
function="Advanced.HandleAttchedLightParticles"
function="Advanced.HandleAttachedLightParticles"
parameter="RenderAttachedParticles" />
</menu_item_check>
<menu_item_check

View File

@ -80,16 +80,6 @@
name="volume_btn"
tool_tip="Global Volume Control"
width="16" />
<panel
class="panel_volume_pulldown"
follows="all"
height="533"
layout="topleft"
left="0"
name="volume_pulldown"
top="5"
visible="false"
width="313" />
<text
enabled="true"