automated merge

meow-7.2.2
Loren Shih 2010-04-06 10:19:31 -04:00
commit ec5bd9c857
22 changed files with 326 additions and 107 deletions

View File

@ -372,11 +372,33 @@ void LLAccordionCtrl::arrangeSinge()
}
else
{
panel_height = expanded_height;
if(mFitParent)
{
panel_height = expanded_height;
}
else
{
if(accordion_tab->getAccordionView())
{
panel_height = accordion_tab->getAccordionView()->getRect().getHeight() +
accordion_tab->getHeaderHeight() + 2*BORDER_MARGIN;
}
else
{
panel_height = accordion_tab->getRect().getHeight();
}
}
}
// make sure at least header is shown
panel_height = llmax(panel_height, accordion_tab->getHeaderHeight());
ctrlSetLeftTopAndSize(mAccordionTabs[i], panel_left, panel_top, panel_width, panel_height);
panel_top-=mAccordionTabs[i]->getRect().getHeight();
}
show_hide_scrollbar(getRect().getWidth(), getRect().getHeight());
updateLayout(getRect().getWidth(), getRect().getHeight());
}
void LLAccordionCtrl::arrangeMultiple()

View File

@ -47,7 +47,12 @@ void LLScrollingPanelList::clearPanels()
{
deleteAllChildren();
mPanelList.clear();
reshape( 1, 1, FALSE );
LLRect rc = getRect();
rc.setLeftTopAndSize(rc.mLeft, rc.mTop, 1, 1);
setRect(rc);
notifySizeChanged(rc.getHeight());
}
S32 LLScrollingPanelList::addPanel( LLScrollingPanel* panel )
@ -67,7 +72,11 @@ S32 LLScrollingPanelList::addPanel( LLScrollingPanel* panel )
max_width = llmax( max_width, childp->getRect().getWidth() );
cur_gap = GAP_BETWEEN_PANELS;
}
reshape( max_width, total_height, FALSE );
LLRect rc = getRect();
rc.setLeftTopAndSize(rc.mLeft, rc.mTop, max_width, total_height);
setRect(rc);
notifySizeChanged(rc.getHeight());
// Reposition each of the child views
S32 cur_y = total_height;
@ -131,7 +140,11 @@ void LLScrollingPanelList::removePanel( U32 panel_index )
max_width = llmax( max_width, childp->getRect().getWidth() );
cur_gap = GAP_BETWEEN_PANELS;
}
reshape( max_width, total_height, FALSE );
LLRect rc = getRect();
rc.setLeftTopAndSize(rc.mLeft, rc.mTop, max_width, total_height);
setRect(rc);
notifySizeChanged(rc.getHeight());
// Reposition each of the child views
S32 cur_y = total_height;
@ -200,3 +213,12 @@ void LLScrollingPanelList::draw()
LLUICtrl::draw();
}
void LLScrollingPanelList::notifySizeChanged(S32 height)
{
LLSD info;
info["action"] = "size_changes";
info["height"] = height;
notifyParent(info);
}
// EOF

View File

@ -61,7 +61,6 @@ public:
Params()
{
name = "scrolling_panel_list";
follows.flags = FOLLOWS_LEFT | FOLLOWS_BOTTOM;
}
};
LLScrollingPanelList(const Params& p)
@ -86,6 +85,11 @@ public:
private:
void updatePanelVisiblilty();
/**
* Notify parent about size change, makes sense when used inside accordion
*/
void notifySizeChanged(S32 height);
panel_list_t mPanelList;
};

View File

@ -499,6 +499,35 @@ std::string LLUrlEntryInventory::getLabel(const std::string &url, const LLUrlLab
return LLURI::unescape(label.empty() ? url : label);
}
//
// LLUrlEntryObjectIM Describes a Second Life inspector for the object Url, e.g.,
// secondlife:///app/objectim/7bcd7864-da6b-e43f-4486-91d28a28d95b?name=Object&owner=3de548e1-57be-cfea-2b78-83ae3ad95998&slurl=Danger!%20Danger!/200/200/30/&groupowned=1
//
LLUrlEntryObjectIM::LLUrlEntryObjectIM()
{
mPattern = boost::regex("secondlife:///app/objectim/[\\da-f-]+\?.*",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_objectim.xml";
}
std::string LLUrlEntryObjectIM::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
{
LLURI uri(url);
LLSD query_map = uri.queryMap();
if (query_map.has("name"))
return query_map["name"];
return unescapeUrl(url);
}
std::string LLUrlEntryObjectIM::getLocation(const std::string &url) const
{
LLURI uri(url);
LLSD query_map = uri.queryMap();
if (query_map.has("slurl"))
return query_map["slurl"];
return LLUrlEntryBase::getLocation(url);
}
///
/// LLUrlEntryParcel Describes a Second Life parcel Url, e.g.,
/// secondlife:///app/parcel/0000060e-4b39-e00b-d0c3-d98b1934e3a8/about

View File

@ -201,6 +201,18 @@ public:
private:
};
///
/// LLUrlEntryObjectIM Describes a Second Life inspector for the object Url, e.g.,
/// secondlife:///app/objectim/7bcd7864-da6b-e43f-4486-91d28a28d95b?name=Object&owner=3de548e1-57be-cfea-2b78-83ae3ad95998&slurl=Danger!%20Danger!/200/200/30/&groupowned=1
///
class LLUrlEntryObjectIM : public LLUrlEntryBase
{
public:
LLUrlEntryObjectIM();
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
/*virtual*/ std::string getLocation(const std::string &url) const;
private:
};
///
/// LLUrlEntryParcel Describes a Second Life parcel Url, e.g.,

View File

@ -55,6 +55,7 @@ LLUrlRegistry::LLUrlRegistry()
registerUrl(new LLUrlEntryWorldMap());
registerUrl(new LLUrlEntryPlace());
registerUrl(new LLUrlEntryInventory());
registerUrl(new LLUrlEntryObjectIM());
//LLUrlEntrySL and LLUrlEntrySLLabel have more common pattern,
//so it should be registered in the end of list
registerUrl(new LLUrlEntrySL());

View File

@ -93,7 +93,7 @@ public:
payload["object_id"] = object_id;
payload["owner_id"] = query_map["owner"];
payload["name"] = query_map["name"];
payload["slurl"] = query_map["slurl"];
payload["slurl"] = LLWeb::escapeURL(query_map["slurl"]);
payload["group_owned"] = query_map["groupowned"];
LLFloaterReg::showInstance("inspect_remote_object", payload);
return true;
@ -632,7 +632,14 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
if (use_plain_text_chat_history)
{
mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, style_params);
LLStyle::Params timestamp_style(style_params);
if (!message_from_log)
{
LLColor4 timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor");
timestamp_style.color(timestamp_color);
timestamp_style.readonly_color(timestamp_color);
}
mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, timestamp_style);
if (utf8str_trim(chat.mFromName).size() != 0)
{

View File

@ -501,13 +501,15 @@ void LLFloaterPreference::onOpen(const LLSD& key)
// if they're not adult or a god, they shouldn't see the adult selection, so delete it
if (!gAgent.isAdult() && !gAgent.isGodlike())
{
// we're going to remove the adult entry from the combo. This obviously depends
// on the order of items in the XML file, but there doesn't seem to be a reasonable
// way to depend on the field in XML called 'name'.
maturity_combo->remove(0);
// we're going to remove the adult entry from the combo
LLScrollListCtrl* maturity_list = maturity_combo->findChild<LLScrollListCtrl>("ComboBox");
if (maturity_list)
{
maturity_list->deleteItems(LLSD(SIM_ACCESS_ADULT));
}
}
childSetVisible("maturity_desired_combobox", true);
childSetVisible("maturity_desired_textbox", false);
childSetVisible("maturity_desired_textbox", false);
}
else
{

View File

@ -390,8 +390,8 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
mAddLandmarkTooltip = LLTrans::getString("LocationCtrlAddLandmarkTooltip");
mEditLandmarkTooltip = LLTrans::getString("LocationCtrlEditLandmarkTooltip");
getChild<LLView>("Location History")->setToolTip(LLTrans::getString("LocationCtrlComboBtnTooltip"));
getChild<LLView>("Place Information")->setToolTip(LLTrans::getString("LocationCtrlInfoBtnTooltip"));
mButton->setToolTip(LLTrans::getString("LocationCtrlComboBtnTooltip"));
mInfoBtn->setToolTip(LLTrans::getString("LocationCtrlInfoBtnTooltip"));
}
LLLocationInputCtrl::~LLLocationInputCtrl()

View File

@ -489,7 +489,6 @@ void LLPanelEditWearable::initializePanel()
updateScrollingPanelUI();
}
}
void LLPanelEditWearable::updateScrollingPanelUI()
@ -640,14 +639,9 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value
{
LLPanel::Params p;
p.name("LLScrollingPanelParam");
p.rect(LLRect(0, LLScrollingPanelParam::PARAM_PANEL_HEIGHT, LLScrollingPanelParam::PARAM_PANEL_WIDTH, 0 ));
LLScrollingPanelParam* panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, TRUE, this->getWearable());
height = panel_list->addPanel( panel_param );
}
S32 width = tab->getRect().getWidth();
tab->reshape(width,height + tab->getHeaderHeight()+10,FALSE);
}
}

View File

@ -413,7 +413,11 @@ void LLPanelOutfitEdit::onLookItemSelectionChange(void)
{
S32 left_offset = -4;
S32 top_offset = -10;
LLRect rect = mLookContents->getLastSelectedItem()->getRect();
LLScrollListItem* item = mLookContents->getLastSelectedItem();
if (!item)
return;
LLRect rect = item->getRect();
LLRect btn_rect(
left_offset + rect.mRight - 50,
top_offset + rect.mTop,

View File

@ -297,6 +297,8 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we
return;
}
mCurrOutfitPanel->setVisible(!visible);
mEditWearable->setVisible(visible);
mEditWearable->setWearable(wearable);
mFilterEditor->setVisible(!visible);

View File

@ -41,6 +41,16 @@
using namespace LLNotificationsUI;
/*virtual*/
BOOL LLToastLifeTimer::tick()
{
if (mEventTimer.hasExpired())
{
mToast->expire();
}
return FALSE;
}
//--------------------------------------------------------------------------
LLToast::Params::Params()
: can_fade("can_fade", true),
@ -57,7 +67,6 @@ LLToast::Params::Params()
LLToast::LLToast(const LLToast::Params& p)
: LLModalDialog(LLSD(), p.is_modal),
mPanel(p.panel),
mToastLifetime(p.lifetime_secs),
mToastFadingTime(p.fading_time_secs),
mNotificationID(p.notif_id),
mSessionID(p.session_id),
@ -71,6 +80,8 @@ LLToast::LLToast(const LLToast::Params& p)
mIsTip(p.is_tip),
mWrapperPanel(NULL)
{
mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
LLUICtrlFactory::getInstance()->buildFloater(this, "panel_toast.xml", NULL);
setCanDrag(FALSE);
@ -105,7 +116,7 @@ BOOL LLToast::postBuild()
{
if(!mCanFade)
{
mTimer.stop();
mTimer->stop();
}
if (mIsTip)
@ -144,39 +155,11 @@ LLToast::~LLToast()
mOnToastDestroyedSignal(this);
}
//--------------------------------------------------------------------------
void LLToast::setAndStartTimer(F32 period)
{
if(mCanFade)
{
mToastLifetime = period;
mTimer.start();
}
}
//--------------------------------------------------------------------------
bool LLToast::lifetimeHasExpired()
{
if (mTimer.getStarted())
{
F32 elapsed_time = mTimer.getElapsedTimeF32();
if ((mToastLifetime - elapsed_time) <= mToastFadingTime)
{
setBackgroundOpaque(FALSE);
}
if (elapsed_time > mToastLifetime)
{
return true;
}
}
return false;
}
//--------------------------------------------------------------------------
void LLToast::hide()
{
setVisible(FALSE);
mTimer.stop();
mTimer->stop();
mIsHidden = true;
mOnFadeSignal(this);
}
@ -222,12 +205,13 @@ void LLToast::setCanFade(bool can_fade)
{
mCanFade = can_fade;
if(!mCanFade)
mTimer.stop();
mTimer->stop();
}
//--------------------------------------------------------------------------
void LLToast::tick()
void LLToast::expire()
{
// if toast has fade property - hide it
if(mCanFade)
{
hide();
@ -263,11 +247,6 @@ void LLToast::insertPanel(LLPanel* panel)
//--------------------------------------------------------------------------
void LLToast::draw()
{
if(lifetimeHasExpired())
{
tick();
}
LLFloater::draw();
if(!isBackgroundVisible())
@ -300,9 +279,9 @@ void LLToast::setVisible(BOOL show)
if(show)
{
setBackgroundOpaque(TRUE);
if(!mTimer.getStarted() && mCanFade)
if(!mTimer->getStarted() && mCanFade)
{
mTimer.start();
mTimer->start();
}
LLModalDialog::setFrontmost(FALSE);
}

View File

@ -36,7 +36,7 @@
#include "llpanel.h"
#include "llmodaldialog.h"
#include "lltimer.h"
#include "lleventtimer.h"
#include "llnotificationptr.h"
#include "llviewercontrol.h"
@ -48,12 +48,32 @@
namespace LLNotificationsUI
{
class LLToast;
/**
* Timer for toasts.
*/
class LLToastLifeTimer: public LLEventTimer
{
public:
LLToastLifeTimer(LLToast* toast, F32 period) : mToast(toast), LLEventTimer(period){}
/*virtual*/
BOOL tick();
void stop() { mEventTimer.stop(); }
void start() { mEventTimer.start(); }
void restart() {mEventTimer.reset(); }
BOOL getStarted() { return mEventTimer.getStarted(); }
private :
LLToast* mToast;
};
/**
* Represents toast pop-up.
* This is a parent view for all toast panels.
*/
class LLToast : public LLModalDialog
{
friend class LLToastLifeTimer;
public:
typedef boost::function<void (LLToast* toast)> toast_callback_t;
typedef boost::signals2::signal<void (LLToast* toast)> toast_signal_t;
@ -107,12 +127,10 @@ public:
LLPanel* getPanel() { return mPanel; }
// enable/disable Toast's Hide button
void setHideButtonEnabled(bool enabled);
// initialize and start Toast's timer
void setAndStartTimer(F32 period);
//
void resetTimer() { mTimer.start(); }
void resetTimer() { mTimer->start(); }
//
void stopTimer() { mTimer.stop(); }
void stopTimer() { mTimer->stop(); }
//
virtual void draw();
//
@ -176,10 +194,7 @@ private:
void handleTipToastClick(S32 x, S32 y, MASK mask);
// check timer
bool lifetimeHasExpired();
// on timer finished function
void tick();
void expire();
LLUUID mNotificationID;
LLUUID mSessionID;
@ -188,8 +203,8 @@ private:
LLPanel* mWrapperPanel;
// timer counts a lifetime of a toast
LLTimer mTimer;
F32 mToastLifetime; // in seconds
std::auto_ptr<LLToastLifeTimer> mTimer;
F32 mToastFadingTime; // in seconds
LLPanel* mPanel;

View File

@ -734,7 +734,10 @@
<color
name="ChatToastAgentNameColor"
reference="EmphasisColor" />
<color
<color
name="ColorSwatchBorderColor"
value="0.45098 0.517647 0.607843 1"/>
<color
name="ChatTimestampColor"
reference="White" />
</colors>

View File

@ -1,38 +1,43 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_visible="true"
follows="all"
height="400"
layout="topleft"
left="10"
name="edit_shape_panel"
top_pad="10"
width="313" >
width="333" >
<panel
border="true"
border="false"
bg_alpha_color="DkGray2"
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true"
follows="top|left"
height="50"
left="10"
layout="topleft"
name="avatar_sex_panel"
top="10"
width="293" >
top="0"
width="313" >
<text
follows="top|left"
height="16"
layout="topleft"
left="10"
name="gender_text"
width="303">
width="313">
Gender:
</text>
<radio_group
follows="all"
follows="left|top|right"
left="10"
height="34"
height="28"
layout="topleft"
name="sex_radio"
top_pad="3"
width="200" >
width="303" >
<radio_item
follows="all"
height="16"
@ -51,21 +56,41 @@
width="82" />
</radio_group>
</panel>
<panel
border="false"
bg_alpha_color="DkGray2"
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true"
follows="all"
height="345"
label="Shirt"
layout="topleft"
left="10"
name="accordion_panel"
top_pad="10"
width="313">
<accordion
follows="left|top|right|bottom"
height ="330"
left="10"
layout="topleft"
follows="all"
height ="345"
left="0"
name="wearable_accordion"
top_pad="10"
width="303">
top="0"
single_expansion="true"
fit_parent="false"
width="313">
<accordion_tab
layout="topleft"
min_height="150"
name="shape_body_tab"
fit_panel="false"
title="Body">
<scrolling_panel_list
layout="topleft"
follows="all"
left="0"
height="300"
name="shape_body_param_list"
top="0"
width="303" />
@ -73,11 +98,13 @@
<accordion_tab
layout="topleft"
min_height="150"
fit_panel="false"
name="shape_head_tab"
title="Head">
<scrolling_panel_list
<scrolling_panel_list
layout="topleft"
follows="all"
left="0"
left="10"
name="shape_head_param_list"
top="0"
width="303" />
@ -85,9 +112,11 @@
<accordion_tab
layout="topleft"
min_height="150"
fit_panel="false"
name="shape_eyes_tab"
title="Eyes">
<scrolling_panel_list
<scrolling_panel_list
layout="topleft"
follows="all"
left="0"
name="shape_eyes_param_list"
@ -97,9 +126,11 @@
<accordion_tab
layout="topleft"
min_height="150"
fit_panel="false"
name="shape_ears_tab"
title="Ears">
<scrolling_panel_list
<scrolling_panel_list
layout="topleft"
follows="all"
left="0"
name="shape_ears_param_list"
@ -110,8 +141,10 @@
layout="topleft"
min_height="150"
name="shape_nose_tab"
fit_panel="false"
title="Nose">
<scrolling_panel_list
<scrolling_panel_list
layout="topleft"
follows="all"
left="0"
name="shape_nose_param_list"
@ -122,8 +155,10 @@
layout="topleft"
min_height="150"
name="shape_mouth_tab"
fit_panel="false"
title="Mouth">
<scrolling_panel_list
<scrolling_panel_list
layout="topleft"
follows="all"
left="0"
name="shape_mouth_param_list"
@ -134,8 +169,10 @@
layout="topleft"
min_height="150"
name="shape_chin_tab"
fit_panel="false"
title="Chin">
<scrolling_panel_list
<scrolling_panel_list
layout="topleft"
follows="all"
left="0"
name="shape_chin_param_list"
@ -146,8 +183,10 @@
layout="topleft"
min_height="150"
name="shape_torso_tab"
fit_panel="false"
title="Torso">
<scrolling_panel_list
<scrolling_panel_list
layout="topleft"
follows="all"
left="0"
name="shape_torso_param_list"
@ -158,8 +197,10 @@
layout="topleft"
min_height="150"
name="shape_legs_tab"
fit_panel="false"
title="Legs">
<scrolling_panel_list
<scrolling_panel_list
layout="topleft"
follows="all"
left="0"
name="shape_legs_param_list"
@ -167,5 +208,6 @@
width="303" />
</accordion_tab>
</accordion>
</panel>
</panel>

View File

@ -150,7 +150,11 @@ left="0"
value="Editing Shape"
width="270" />
<panel
border="true"
border="false"
bg_alpha_color="DkGray2"
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true"
follows="top|left"
height="60"
label="Shirt"
@ -335,30 +339,76 @@ left="0"
visible="false"
width="333" />
</panel>
<panel
follows="left|right|bottom"
height="38"
label="gear_buttom_panel"
layout="bottom|left|right"
left="0"
bottom="25"
name="gear_buttom_panel"
width="333">
<button
follows="bottom|left"
tool_tip="Options"
height="18"
image_disabled="OptionsMenu_Disabled"
image_selected="OptionsMenu_Press"
image_unselected="OptionsMenu_Off"
layout="topleft"
left="10"
name="friends_viewsort_btn"
top="10"
width="18" />
<button
follows="bottom|left"
height="18"
image_selected="AddItem_Press"
image_unselected="AddItem_Off"
image_disabled="AddItem_Disabled"
layout="topleft"
left_pad="10"
name="add_btn"
tool_tip="TODO"
width="18" />
<button
follows="bottom|left"
height="18"
image_selected="TrashItem_Press"
image_unselected="TrashItem_Off"
image_disabled="TrashItem_Disabled"
layout="topleft"
left_pad="10"
right="-10"
name="del_btn"
tool_tip="TODO"
top_delta="0"
width="18" />
</panel>
<panel
follows="all"
follows="bottom|left|right"
height="25"
layout="bottom|left|right"
left="0"
name="button_panel"
top_pad="10"
bottom="5"
width="333" >
<button
follows="bottomleft"
layout="topleft"
height="23"
label="Save As"
left="10"
left="8"
name="save_as_button"
top="0"
width="100" />
width="153" />
<button
follows="bottomleft"
layout="topleft"
height="23"
label="Revert"
left_pad="10"
left_pad="7"
name="revert_button"
width="100" />
width="153" />
</panel>
</panel>

View File

@ -98,6 +98,7 @@ background_visible="true"
left="0"
top="0"
single_expansion="true"
fit_parent="true"
follows="all"
layout="topleft"
name="groups_accordion">

View File

@ -150,7 +150,7 @@
<button
follows="left|top|right"
height="23"
label="Leave Call"
label="End Call"
name="end_call_btn"
width="100" />
</layout_panel>

View File

@ -5,7 +5,7 @@
left="0"
name="LLScrollingPanelParam"
top="152"
width="270">
width="290">
<text
follows="left|top"
height="16"
@ -46,6 +46,36 @@
width="128">
Loading...
</text>
<view_border
layout="topleft"
follows="left|top"
left="2"
top="0"
width="132"
height="132"
thickness="2"
shadow_light_color="LtGray_50"
highlight_light_color="LtGray_50"
highlight_dark_color="LtGray_50"
shadow_dark_color="LtGray_50"
bevel_style="in"
name="left_border"
/>
<view_border
layout="topleft"
follows="left|top"
left_pad="2"
top_delta="0"
width="132"
height="132"
thickness="2"
shadow_light_color="LtGray_50"
highlight_light_color="LtGray_50"
highlight_dark_color="LtGray_50"
shadow_dark_color="LtGray_50"
bevel_style="in"
name="right_border"
/>
<button
enabled="false"
height="132"

View File

@ -120,6 +120,6 @@ width="333">
layout="topleft"
left="0"
name="panel_edit_wearable"
top="35"
top="0"
visible="false" />
</panel>

View File

@ -216,10 +216,10 @@ namespace tut
#ifndef LL_RELEASE_FOR_DOWNLOAD
ensure_equals("Agni grid label was not modified by grid file",
grid[GRID_LABEL_VALUE].asString(), std::string("Agni"));
#else \\ LL_RELEASE_FOR_DOWNLOAD
#else // LL_RELEASE_FOR_DOWNLOAD
ensure_equals("Agni grid label was not modified by grid file",
grid[GRID_LABEL_VALUE].asString(), std::string("Secondlife.com"));
#endif \\ LL_RELEASE_FOR_DOWNLOAD
#endif // LL_RELEASE_FOR_DOWNLOAD
ensure_equals("Agni name wasn't modified by grid file",
grid[GRID_VALUE].asString(), std::string("util.agni.lindenlab.com"));