Richard Nelson 2011-08-31 11:51:38 -07:00
commit 2154bccdc4
29 changed files with 3179 additions and 2886 deletions

View File

@ -1206,9 +1206,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>a7c80fd8516df3b879b669b2b220067f</string>
<string>9cd66e879908f047d9af665b92946ecc</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/232420/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20110608.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/239803/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20110830.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@ -1230,9 +1230,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>b9cc0333cc274c9cc40256ab7146b4fc</string>
<string>ab9393795515cbbe9526bde33b41bf2a</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/232420/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20110608.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/239670/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20110829.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>

View File

@ -936,13 +936,18 @@ LLStringUtil::size_type LLStringUtil::getSubstitution(const std::string& instr,
{
const std::string delims (",");
// Find the first ]
size_type pos2 = instr.find(']', start);
// Find the first [
size_type pos1 = instr.find('[', start);
if (pos1 == std::string::npos)
return std::string::npos;
//Find the first ] after the initial [
size_type pos2 = instr.find(']', pos1);
if (pos2 == std::string::npos)
return std::string::npos;
// Find the last [ before ]
size_type pos1 = instr.find_last_of('[', pos2-1);
// Find the last [ before ] in case of nested [[]]
pos1 = instr.find_last_of('[', pos2-1);
if (pos1 == std::string::npos || pos1 < start)
return std::string::npos;

View File

@ -624,6 +624,14 @@ namespace tut
subcount = LLStringUtil::format(s, fmt_map);
ensure_equals("LLStringUtil::format: Assorted Test2 result", s, "?Am I not a long string?short[A]bbbaaaba[A]");
ensure_equals("LLStringUtil::format: Assorted Test2 result count", 9, subcount);
// Test on nested brackets
std::string srcs6 = "[[TRICK1]][[A]][[B]][[AAA]][[BBB]][[TRICK2]][[KEYLONGER]][[KEYSHORTER]]?[[DELETE]]";
s = srcs6;
subcount = LLStringUtil::format(s, fmt_map);
ensure_equals("LLStringUtil::format: Assorted Test2 result", s, "[[A]][a][b][aaa][bbb][[A]][short][Am I not a long string?]?[]");
ensure_equals("LLStringUtil::format: Assorted Test2 result count", 9, subcount);
// Test an assorted substitution
std::string srcs8 = "foo[DELETE]bar?";

View File

@ -564,4 +564,22 @@ namespace tut
z1 = U8_to_F32(F32_to_U8(z, lowerz, upperz), lowerz, upperz);
ensure("2:quantize8: Fail ", is_approx_equal(x1, vec3a.mV[VX]) && is_approx_equal(y1, vec3a.mV[VY]) && is_approx_equal(z1, vec3a.mV[VZ]));
}
template<> template<>
void v3math_object::test<35>()
{
LLSD sd = LLSD::emptyArray();
sd[0] = 1.f;
LLVector3 parsed_1(sd);
ensure("1:LLSD parse: Fail ", is_approx_equal(parsed_1.mV[VX], 1.f) && is_approx_equal(parsed_1.mV[VY], 0.f) && is_approx_equal(parsed_1.mV[VZ], 0.f));
sd[1] = 2.f;
LLVector3 parsed_2(sd);
ensure("2:LLSD parse: Fail ", is_approx_equal(parsed_2.mV[VX], 1.f) && is_approx_equal(parsed_2.mV[VY], 2.f) && is_approx_equal(parsed_2.mV[VZ], 0.f));
sd[2] = 3.f;
LLVector3 parsed_3(sd);
ensure("3:LLSD parse: Fail ", is_approx_equal(parsed_3.mV[VX], 1.f) && is_approx_equal(parsed_3.mV[VY], 2.f) && is_approx_equal(parsed_3.mV[VZ], 3.f));
}
}

File diff suppressed because it is too large Load Diff

View File

@ -118,6 +118,9 @@ public:
void scrollEvent(int x, int y, MASK modifiers);
// enable/disable media plugin debugging messages and info spam
void enableMediaPluginDebugging( bool enable );
// Javascript <-> viewer events
void jsEnableObject( bool enable );
void jsAgentLocationEvent( double x, double y, double z );
@ -209,6 +212,7 @@ public:
void browse_forward();
void browse_back();
void setBrowserUserAgent(const std::string& user_agent);
void showWebInspector( bool show );
void proxyWindowOpened(const std::string &target, const std::string &uuid);
void proxyWindowClosed(const std::string &uuid);
void ignore_ssl_cert_errors(bool ignore);
@ -244,6 +248,10 @@ public:
// This is valid during MEDIA_EVENT_CLICK_LINK_HREF and MEDIA_EVENT_GEOMETRY_CHANGE
std::string getClickUUID() const { return mClickUUID; };
// These are valid during MEDIA_EVENT_DEBUG_MESSAGE
std::string getDebugMessageText() const { return mDebugMessageText; };
std::string getDebugMessageLevel() const { return mDebugMessageLevel; };
// This is valid after MEDIA_EVENT_NAVIGATE_ERROR_PAGE
S32 getStatusCode() const { return mStatusCode; };
@ -395,6 +403,8 @@ protected:
std::string mClickNavType;
std::string mClickTarget;
std::string mClickUUID;
std::string mDebugMessageText;
std::string mDebugMessageLevel;
S32 mGeometryX;
S32 mGeometryY;
S32 mGeometryWidth;

View File

@ -64,6 +64,8 @@ public:
MEDIA_EVENT_AUTH_REQUEST, // The plugin wants to display an auth dialog
MEDIA_EVENT_DEBUG_MESSAGE, // plugin sending back debug information for host to process
MEDIA_EVENT_LINK_HOVERED // Got a "link hovered" event from the plugin
} EMediaEvent;

File diff suppressed because it is too large Load Diff

View File

@ -5481,6 +5481,17 @@
<key>Value</key>
<real>60.0</real>
</map>
<key>MediaPluginDebugging</key>
<map>
<key>Comment</key>
<string>Turn on debugging messages that may help diagnosing media issues (WARNING: May reduce performance).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>MediaControlFadeTime</key>
<map>
<key>Comment</key>

View File

@ -2285,7 +2285,9 @@ void LLAppearanceMgr::autopopulateOutfits()
void LLAppearanceMgr::onFirstFullyVisible()
{
gAgentAvatarp->debugAvatarVisible();
autopopulateOutfits();
// The auto-populate is failing at the point of generating outfits
// folders, so don't do the library copy until that is resolved.
// autopopulateOutfits();
}
bool LLAppearanceMgr::updateBaseOutfit()

View File

@ -181,6 +181,7 @@ LLFolderView::Params::Params()
// Default constructor
LLFolderView::LLFolderView(const Params& p)
: LLFolderViewFolder(p),
mRunningHeight(0),
mScrollContainer( NULL ),
mPopupMenuHandle(),
mAllowMultiSelect(p.allow_multiselect),
@ -479,6 +480,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
target_height = running_height;
}
mRunningHeight = running_height;
LLRect scroll_rect = mScrollContainer->getContentWindowRect();
reshape( llmax(scroll_rect.getWidth(), total_width), running_height );
@ -524,10 +526,11 @@ void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent)
LLRect scroll_rect;
if (mScrollContainer)
{
LLView::reshape(width, height, called_from_parent);
scroll_rect = mScrollContainer->getContentWindowRect();
}
width = llmax(mMinWidth, scroll_rect.getWidth());
height = llmax(height, scroll_rect.getHeight());
height = llmax(mRunningHeight, scroll_rect.getHeight());
// restrict width with scroll container's width
if (mUseEllipses)
@ -1915,9 +1918,9 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
if (!handled)
{
if (getListener()->getUUID().notNull())
{
LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
}
{
LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
}
else
{
if (!mFolders.empty())

View File

@ -314,6 +314,7 @@ protected:
signal_t mReshapeSignal;
S32 mSignalSelectCallback;
S32 mMinWidth;
S32 mRunningHeight;
std::map<LLUUID, LLFolderViewItem*> mItemMap;
BOOL mDragAndDropThisFrame;

View File

@ -319,6 +319,11 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
if (mContextMenu)
{
// hide/show debugging options
bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging");
mContextMenu->setItemVisible("open_webinspector", media_plugin_debugging_enabled );
mContextMenu->setItemVisible("debug_separator", media_plugin_debugging_enabled );
mContextMenu->show(x, y);
LLMenuGL::showPopup(this, mContextMenu, x, y);
}
@ -385,12 +390,22 @@ void LLMediaCtrl::onFocusLost()
//
BOOL LLMediaCtrl::postBuild ()
{
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registar;
registar.add("Open.WebInspector", boost::bind(&LLMediaCtrl::onOpenWebInspector, this));
mContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
"menu_media_ctrl.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChange, this, _2));
return TRUE;
}
void LLMediaCtrl::onOpenWebInspector()
{
if (mMediaSource && mMediaSource->hasMedia())
mMediaSource->getMediaPlugin()->showWebInspector( true );
}
////////////////////////////////////////////////////////////////////////////////
//
BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask )
@ -1065,6 +1080,12 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
mHoverTextChanged = true;
};
break;
case MEDIA_EVENT_DEBUG_MESSAGE:
{
LL_INFOS("media") << self->getDebugMessageText() << LL_ENDL;
};
break;
};
// chain all events to any potential observers of this object.

View File

@ -166,6 +166,9 @@ public:
// Incoming media event dispatcher
virtual void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
// right click debugging item
void onOpenWebInspector();
LLUUID getTextureID() {return mMediaTextureID;}
protected:

View File

@ -154,6 +154,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
}
updateLocationCombo(false);
LLUICtrl& mode_combo = getChildRef<LLUICtrl>("mode_combo");
mode_combo.setValue(gSavedSettings.getString("SessionSettingsFile"));
mode_combo.setCommitCallback(boost::bind(&LLPanelLogin::onModeChange, this, getChild<LLUICtrl>("mode_combo")->getValue(), _2));
LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo");
server_choice_combo->setCommitCallback(onSelectServer, NULL);
server_choice_combo->setFocusLostCallback(boost::bind(onServerComboLostFocus, _1));
@ -1021,6 +1025,32 @@ void LLPanelLogin::updateLoginPanelLinks()
sInstance->getChildView("forgot_password_text")->setVisible( system_grid);
}
void LLPanelLogin::onModeChange(const LLSD& original_value, const LLSD& new_value)
{
if (original_value.asString() != new_value.asString())
{
LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(&LLPanelLogin::onModeChangeConfirm, this, original_value, new_value, _1, _2));
}
}
void LLPanelLogin::onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch (option)
{
case 0:
gSavedSettings.getControl("SessionSettingsFile")->set(new_value);
LLAppViewer::instance()->requestQuit();
break;
case 1:
// revert to original value
getChild<LLUICtrl>("mode_combo")->setValue(original_value);
break;
default:
break;
}
}
std::string canonicalize_username(const std::string& name)
{
std::string cname = name;

View File

@ -87,6 +87,8 @@ private:
void reshapeBrowser();
void addFavoritesToStartLocation();
void addUsersWithFavoritesToUsername();
void onModeChange(const LLSD& original_value, const LLSD& new_value);
void onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response);
static void onClickConnect(void*);
static void onClickNewAccount(void*);
static void onClickVersion(void*);
@ -97,7 +99,6 @@ private:
static void onServerComboLostFocus(LLFocusableElement*);
static void updateServerCombo();
static void updateStartSLURL();
static void updateLoginPanelLinks();
private:

View File

@ -273,11 +273,11 @@ LLSLURL::LLSLURL(const std::string& slurl)
mRegion = LLURI::unescape(path_array[0].asString());
path_array.erase(0);
// parse the x, y, z
if(path_array.size() >= 3)
// parse the x, y, and optionally z
if(path_array.size() >= 2)
{
mPosition = LLVector3(path_array);
mPosition = LLVector3(path_array); // this construction handles LLSD without all components (values default to 0.f)
if((F32(mPosition[VX]) < 0.f) ||
(mPosition[VX] > REGION_WIDTH_METERS) ||
(F32(mPosition[VY]) < 0.f) ||

View File

@ -162,6 +162,8 @@ BOOL LLStatusBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
BOOL LLStatusBar::postBuild()
{
LLControlVariablePtr mode_control = gSavedSettings.getControl("SessionSettingsFile");
gMenuBarView->setRightMouseDownCallback(boost::bind(&show_navbar_context_menu, _1, _2, _3));
mTextTime = getChild<LLTextBox>("TimeText" );
@ -233,9 +235,40 @@ BOOL LLStatusBar::postBuild()
mScriptOut = getChildView("scriptout");
LLUICtrl& mode_combo = getChildRef<LLUICtrl>("mode_combo");
mode_combo.setValue(gSavedSettings.getString("SessionSettingsFile"));
mode_combo.setCommitCallback(boost::bind(&LLStatusBar::onModeChange, this, getChild<LLUICtrl>("mode_combo")->getValue(), _2));
return TRUE;
}
void LLStatusBar::onModeChange(const LLSD& original_value, const LLSD& new_value)
{
if (original_value.asString() != new_value.asString())
{
LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(&LLStatusBar::onModeChangeConfirm, this, original_value, new_value, _1, _2));
}
}
void LLStatusBar::onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch (option)
{
case 0:
gSavedSettings.getControl("SessionSettingsFile")->set(new_value);
LLAppViewer::instance()->requestQuit();
break;
case 1:
// revert to original value
getChild<LLUICtrl>("mode_combo")->setValue(original_value);
break;
default:
break;
}
}
// Per-frame updates of visibility
void LLStatusBar::refresh()
{

View File

@ -92,6 +92,8 @@ private:
void onMouseEnterVolume();
void onMouseEnterNearbyMedia();
void onClickScreen(S32 x, S32 y);
void onModeChange(const LLSD& original_value, const LLSD& new_value);
void onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response);
static void onClickMediaToggle(void* data);
static void onClickBalance(void* data);

View File

@ -1776,6 +1776,7 @@ void LLViewerMediaImpl::createMediaSource()
LL_WARNS("Media") << "Failed to initialize media for mime type " << mMimeType << LL_ENDL;
}
}
}
//////////////////////////////////////////////////////////////////////////////////////////
@ -1880,7 +1881,10 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
// collect 'javascript enabled' setting from prefs and send to embedded browser
bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" );
media_source->setJavascriptEnabled( javascript_enabled );
bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging");
media_source->enableMediaPluginDebugging( media_plugin_debugging_enabled );
media_source->setTarget(target);
const std::string plugin_dir = gDirUtilp->getLLPluginDir();

View File

@ -485,6 +485,12 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
{
switch(event)
{
case MEDIA_EVENT_DEBUG_MESSAGE:
{
// LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_DEBUG_MESSAGE " << LL_ENDL;
};
break;
case MEDIA_EVENT_CONTENT_UPDATED:
{
// LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CONTENT_UPDATED " << LL_ENDL;

View File

@ -28,4 +28,16 @@
<menu_item_call.on_enable
function="Edit.EnablePaste" />
</menu_item_call>
<menu_item_separator
layout="topleft"
name="debug_separator"
visible="false" />
<menu_item_call
label="Open Web Inspector"
layout="topleft"
name="open_webinspector"
visible="false">
<menu_item_call.on_click
function="Open.WebInspector" />
</menu_item_call>
</context_menu>

View File

@ -117,17 +117,33 @@ label="Remember password"
name="connect_btn"
top="35"
width="90" />
<!-- Utf code in label is a filled up-pointing triangle -->
<menu_button
left_pad="5"
top="35"
width="80"
<text
follows="left|bottom"
font="SansSerifSmall"
height="15"
left_pad="10"
name="mode_selection_text"
top="20"
width="130">
Mode:
</text>
<combo_box
follows="left|bottom"
height="23"
label="Mode &#9650;"
name="mode_menu"
max_chars="128"
tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
menu_filename="menu_mode_change.xml"
/>
top_pad="0"
name="mode_combo"
width="110">
<combo_box.item
label="Basic"
name="Basic"
value="settings_minimal.xml" />
<combo_box.item
label="Advanced"
name="Advanced"
value="" />
</combo_box>
<text
follows="left|bottom"
font="SansSerifSmall"

View File

@ -97,7 +97,7 @@
mouse_opaque="false"
name="location_combo"
top_delta="0"
width="266">
width="246">
<combo_list
mouse_wheel_opaque="true"/>
<!-- *TODO: Delete. Let the location_input use the correct art sizes.
@ -137,7 +137,7 @@
name="search_combo_box"
tool_tip="Search"
top_delta="0"
width="200" >
width="220" >
<combo_editor
label="Search [SECOND_LIFE]"
name="search_combo_editor"/>

View File

@ -35,7 +35,7 @@
</panel.string>
<panel
height="18"
left="-315"
left="-335"
width="95"
top="1"
follows="right|top"
@ -77,19 +77,24 @@
top="0"
width="55" />
</panel>
<!-- UTF 9660 code in label below is a down-pointing filled-in triangle -->
<menu_button
<combo_box
follows="right|top"
image_color="0 0 0 0"
hover_glow_amount="0"
left_pad="5"
top="2"
width="55"
height="18"
label="Mode &#9660;"
top="0"
width="100"
height="20"
name="mode_combo"
tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
menu_filename="menu_mode_change.xml"
/>
>
<combo_box.item
label="Basic Mode"
name="Basic"
value="settings_minimal.xml" />
<combo_box.item
label="Advanced Mode"
name="Advanced"
value="" />
</combo_box>
<text
type="string"
font="SansSerifSmall"
@ -102,7 +107,7 @@
left_pad="5"
name="TimeText"
tool_tip="Current time (Pacific)"
width="90">
width="75">
24:00 AM PST
</text>
<button

View File

@ -187,9 +187,9 @@
name="status_bar_container"
tab_stop="false"
height="30"
left="-120"
left="-160"
top="0"
width="120"
width="160"
visible="false"/>
<panel follows="top|bottom"
height="500"

View File

@ -118,16 +118,33 @@ label="Remember password"
name="connect_btn"
top="35"
width="90" />
<menu_button
left_pad="10"
top="35"
width="80"
height="23"
label="Mode ▲"
name="mode_menu"
tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
menu_filename="menu_mode_change.xml"
/>
<text
follows="left|bottom"
font="SansSerifSmall"
height="15"
left_pad="10"
name="mode_selection_text"
top="20"
width="130">
Mode:
</text>
<combo_box
follows="left|bottom"
height="23"
max_chars="128"
tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
top_pad="0"
name="mode_combo"
width="110">
<combo_box.item
label="Basic"
name="Basic"
value="settings_minimal.xml" />
<combo_box.item
label="Advanced"
name="Advanced"
value="" />
</combo_box>
</layout_panel>
<layout_panel
tab_stop="false"

View File

@ -63,7 +63,7 @@ width="31" />
mouse_opaque="false"
name="location_combo"
top_delta="0"
width="390">
width="350">
</location_input>
<icon follows="right"
height="20"

View File

@ -12,7 +12,7 @@
name="status"
top="19"
tab_stop="false"
width="120">
width="160">
<panel.string
name="packet_loss_tooltip">
Packet Loss
@ -33,18 +33,27 @@
name="buycurrencylabel">
L$ [AMT]
</panel.string>
<menu_button
follows="right|top"
image_color="0 0 0 0"
hover_glow_amount="0"
left="5"
top="7"
width="55"
height="18"
label="Mode ▼"
tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
menu_filename="menu_mode_change.xml"
/>
<combo_box
follows="right|top"
left="5"
drop_down_button.image_color="0 0 0 0"
drop_down_button.hover_glow_amount="0"
drop_down_button.pad_right="0"
top="7"
width="95"
height="20"
name="mode_combo"
tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
>
<combo_box.item
label="Basic Mode"
name="Basic"
value="settings_minimal.xml" />
<combo_box.item
label="Advanced Mode"
name="Advanced"
value="" />
</combo_box>
<button
follows="right|top"
height="16"
@ -53,7 +62,7 @@
image_pressed="Pause_Press"
image_pressed_selected="Play_Press"
is_toggle="true"
left="65"
left_pad="5"
top="7"
name="media_toggle_btn"
tool_tip="Start/Stop All Media (Music, Video, Web pages)"