summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-08-14 14:44:36 -0400
committerNat Goodspeed <nat@lindenlab.com>2009-08-14 14:44:36 -0400
commit21bfcbde7ec6e6b3e8a92237b7c33879216c4e82 (patch)
tree5346bb05d7f74d2f2021883ff0ee4f32bbb56f4a /indra
parent2da8eb43d57ae6876f9955386f604f2c56849211 (diff)
parentaff85ed92c5aad3a9445cf4ec5447cc56c44dfc0 (diff)
Merge changes
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llassettype.cpp6
-rw-r--r--indra/llcommon/llassettype.h1
-rw-r--r--indra/llinventory/llinventory.cpp5
-rw-r--r--indra/llinventory/llinventory.h6
-rw-r--r--indra/llinventory/llpermissions.h6
-rw-r--r--indra/llui/CMakeLists.txt2
-rw-r--r--indra/llui/llbutton.cpp252
-rw-r--r--indra/llui/llbutton.h121
-rw-r--r--indra/llui/llcheckboxctrl.cpp1
-rw-r--r--indra/llui/llclipboard.cpp6
-rw-r--r--indra/llui/llclipboard.h1
-rw-r--r--indra/llui/llcombobox.cpp21
-rw-r--r--indra/llui/llcombobox.h3
-rw-r--r--indra/llui/llfiltereditor.cpp6
-rw-r--r--indra/llui/llfiltereditor.h1
-rw-r--r--indra/llui/llflyoutbutton.cpp7
-rw-r--r--indra/llui/llflyoutbutton.h1
-rw-r--r--indra/llui/llfocusmgr.cpp52
-rw-r--r--indra/llui/llfocusmgr.h8
-rw-r--r--indra/llui/lllineeditor.cpp12
-rw-r--r--indra/llui/llmenugl.cpp11
-rw-r--r--indra/llui/llmenugl.h11
-rw-r--r--indra/llui/llmultislider.h2
-rw-r--r--indra/llui/llscrollbar.cpp9
-rw-r--r--indra/llui/llscrolllistctrl.cpp3
-rw-r--r--indra/llui/llslider.cpp42
-rw-r--r--indra/llui/llslider.h10
-rw-r--r--indra/llui/lltextbox.cpp6
-rw-r--r--indra/llui/lluictrl.cpp23
-rw-r--r--indra/llui/lluictrl.h18
-rw-r--r--indra/llui/lluictrlfactory.h8
-rw-r--r--indra/llui/llview.cpp2
-rw-r--r--indra/newview/CMakeLists.txt48
-rw-r--r--indra/newview/app_settings/foldertypes.xml16
-rw-r--r--indra/newview/app_settings/settings.xml107
-rw-r--r--indra/newview/build_win32_appConfig.py73
-rw-r--r--indra/newview/llagent.cpp82
-rw-r--r--indra/newview/llagent.h37
-rw-r--r--indra/newview/llagentwearables.cpp259
-rw-r--r--indra/newview/llagentwearables.h50
-rw-r--r--indra/newview/llavataractions.cpp14
-rw-r--r--indra/newview/llavataractions.h5
-rw-r--r--indra/newview/llavatarlist.cpp18
-rw-r--r--indra/newview/llavatarlist.h8
-rw-r--r--indra/newview/llbottomtray.cpp90
-rw-r--r--indra/newview/llbottomtray.h3
-rw-r--r--indra/newview/llchannelmanager.cpp21
-rw-r--r--indra/newview/llchannelmanager.h2
-rw-r--r--indra/newview/llchatbar.cpp2
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp101
-rw-r--r--indra/newview/llchiclet.cpp8
-rw-r--r--indra/newview/llchiclet.h5
-rw-r--r--indra/newview/llfavoritesbar.cpp117
-rw-r--r--indra/newview/llfavoritesbar.h4
-rw-r--r--indra/newview/llfloatercamera.cpp31
-rw-r--r--indra/newview/llfloaterchat.cpp3
-rw-r--r--indra/newview/llfloatergroups.cpp4
-rw-r--r--indra/newview/llfloaterinventory.cpp5
-rw-r--r--indra/newview/llfloaterinventory.h2
-rw-r--r--indra/newview/llfloaterlagmeter.cpp24
-rw-r--r--indra/newview/llfloaterland.cpp7
-rw-r--r--indra/newview/llfloaterlandholdings.cpp5
-rw-r--r--indra/newview/llfloaternotificationsconsole.cpp9
-rw-r--r--indra/newview/llfloaterpreference.cpp4
-rw-r--r--indra/newview/llfloaterproperties.cpp6
-rw-r--r--indra/newview/llfloaterworldmap.cpp3
-rw-r--r--indra/newview/llfolderview.cpp21
-rw-r--r--indra/newview/llfoldervieweventlistener.h1
-rw-r--r--indra/newview/llfolderviewitem.cpp8
-rw-r--r--indra/newview/llgesturemgr.cpp2
-rw-r--r--indra/newview/llgroupactions.cpp126
-rw-r--r--indra/newview/llgroupactions.h24
-rw-r--r--indra/newview/llgroupmgr.cpp15
-rw-r--r--indra/newview/llimpanel.cpp36
-rw-r--r--indra/newview/llimview.cpp24
-rw-r--r--indra/newview/llinventorybridge.cpp165
-rw-r--r--indra/newview/llinventorybridge.h4
-rw-r--r--indra/newview/llinventoryfilter.cpp32
-rw-r--r--indra/newview/llinventoryfilter.h5
-rw-r--r--indra/newview/llinventorymodel.cpp69
-rw-r--r--indra/newview/llinventorymodel.h8
-rw-r--r--indra/newview/lllocationhistory.cpp59
-rw-r--r--indra/newview/lllocationhistory.h13
-rw-r--r--indra/newview/lllocationinputctrl.cpp68
-rw-r--r--indra/newview/lllocationinputctrl.h1
-rw-r--r--indra/newview/lllookshistorypanel.h72
-rw-r--r--indra/newview/llmoveview.cpp8
-rw-r--r--indra/newview/llnavigationbar.cpp233
-rw-r--r--indra/newview/llnavigationbar.h27
-rw-r--r--indra/newview/llnearbychat.cpp192
-rw-r--r--indra/newview/llnearbychat.h3
-rw-r--r--indra/newview/llnearbychatbar.cpp65
-rw-r--r--indra/newview/llnearbychatbar.h9
-rw-r--r--indra/newview/llnearbychathandler.cpp12
-rw-r--r--indra/newview/llnotificationalerthandler.cpp19
-rw-r--r--indra/newview/llnotificationgrouphandler.cpp27
-rw-r--r--indra/newview/llnotificationhandler.h4
-rw-r--r--indra/newview/llpanelappearancetab.h65
-rw-r--r--indra/newview/llpanelavatar.cpp769
-rw-r--r--indra/newview/llpanelavatar.h204
-rw-r--r--indra/newview/llpanelgroup.cpp556
-rw-r--r--indra/newview/llpanelgroup.h99
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp165
-rw-r--r--indra/newview/llpanelgroupgeneral.h9
-rw-r--r--indra/newview/llpanelgrouplandmoney.cpp326
-rw-r--r--indra/newview/llpanelgrouplandmoney.h6
-rw-r--r--indra/newview/llpanelgroupnotices.cpp30
-rw-r--r--indra/newview/llpanelgroupnotices.h5
-rw-r--r--indra/newview/llpanelgrouproles.cpp95
-rw-r--r--indra/newview/llpanelgrouproles.h23
-rw-r--r--indra/newview/llpanelpeople.cpp18
-rw-r--r--indra/newview/llpanelpermissions.cpp4
-rw-r--r--indra/newview/llpanelpicks.cpp38
-rw-r--r--indra/newview/llpanelplaceinfo.cpp41
-rw-r--r--indra/newview/llpanelplaces.cpp73
-rw-r--r--indra/newview/llpanelplaces.h1
-rw-r--r--indra/newview/llpanelprofile.cpp63
-rw-r--r--indra/newview/llpanelprofile.h28
-rw-r--r--indra/newview/llpanelprofileview.cpp47
-rw-r--r--indra/newview/llpanelprofileview.h28
-rw-r--r--indra/newview/llpreviewnotecard.cpp27
-rw-r--r--indra/newview/llpreviewnotecard.h1
-rw-r--r--indra/newview/llscreenchannel.cpp263
-rw-r--r--indra/newview/llscreenchannel.h106
-rw-r--r--indra/newview/llsidetray.cpp6
-rw-r--r--indra/newview/llsidetray.h16
-rw-r--r--indra/newview/llslurl.cpp7
-rw-r--r--indra/newview/llslurl.h7
-rw-r--r--indra/newview/llstatusbar.cpp75
-rw-r--r--indra/newview/llstatusbar.h9
-rw-r--r--indra/newview/llsyswellitem.cpp105
-rw-r--r--indra/newview/llsyswellitem.h90
-rw-r--r--indra/newview/llsyswellwindow.cpp210
-rw-r--r--indra/newview/llsyswellwindow.h89
-rw-r--r--indra/newview/lltoast.cpp99
-rw-r--r--indra/newview/lltoast.h101
-rw-r--r--indra/newview/lltoastgroupnotifypanel.cpp12
-rw-r--r--indra/newview/lltoastpanel.cpp23
-rw-r--r--indra/newview/lltoastpanel.h5
-rw-r--r--indra/newview/llurllineeditorctrl.cpp97
-rw-r--r--indra/newview/llurllineeditorctrl.h100
-rw-r--r--indra/newview/llviewercontrol.cpp3
-rw-r--r--indra/newview/llviewerfloaterreg.cpp8
-rw-r--r--indra/newview/llviewerinventory.cpp120
-rw-r--r--indra/newview/llviewerinventory.h12
-rw-r--r--indra/newview/llviewermenu.cpp32
-rw-r--r--indra/newview/llviewermenu.h1
-rw-r--r--indra/newview/llviewermessage.cpp7
-rw-r--r--indra/newview/llviewerparcelmgr.cpp1
-rw-r--r--indra/newview/llviewertexteditor.cpp7
-rw-r--r--indra/newview/llviewerwindow.cpp20
-rw-r--r--indra/newview/llvoiceclient.cpp11
-rw-r--r--indra/newview/llvoiceclient.h5
-rw-r--r--indra/newview/skins/default/textures/icons/ForwardArrow_Off.pngbin0 -> 220 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ForwardArrow_Press.pngbin0 -> 220 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Off.pngbin0 -> 808 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Selected.pngbin0 -> 835 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml23
-rw-r--r--indra/newview/skins/default/textures/widgets/Arrow_Down.pngbin0 -> 3066 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Arrow_Up.pngbin0 -> 363 bytes
-rw-r--r--indra/newview/skins/default/xui/en/favorites_bar_button.xml22
-rw-r--r--indra/newview/skins/default/xui/en/floater_avatar_picker.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_land.xml24
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory.xml16
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml244
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_notecard.xml16
-rw-r--r--indra/newview/skins/default/xui/en/floater_sys_well.xml99
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml24
-rw-r--r--indra/newview/skins/default/xui/en/menu_nearby_chat.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml18
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_general.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml88
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_land_money.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_roles.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_navigation_bar.xml230
-rw-r--r--indra/newview/skins/default/xui/en/panel_notes.xml182
-rw-r--r--indra/newview/skins/default/xui/en/panel_people.xml56
-rw-r--r--indra/newview/skins/default/xui/en/panel_pick_info.xml32
-rw-r--r--indra/newview/skins/default/xui/en/panel_pick_list_item.xml60
-rw-r--r--indra/newview/skins/default/xui/en/panel_picks.xml104
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_advanced.xml26
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_chat.xml9
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_general.xml12
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile.xml235
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_view.xml79
-rw-r--r--indra/newview/skins/default/xui/en/panel_side_tray.xml113
-rw-r--r--indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml25
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_sys_well_item.xml64
-rw-r--r--indra/newview/skins/default/xui/en/panel_toast.xml12
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml205
-rw-r--r--indra/newview/skins/default/xui/en/widgets/check_box.xml4
-rw-r--r--indra/newview/skins/default/xui/en/widgets/location_input.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/radio_item.xml4
-rw-r--r--indra/newview/skins/default/xui/en/widgets/slider_bar.xml2
-rwxr-xr-xindra/newview/viewer_manifest.py6
197 files changed, 6383 insertions, 3237 deletions
diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp
index d431071c25..835cdbca04 100644
--- a/indra/llcommon/llassettype.cpp
+++ b/indra/llcommon/llassettype.cpp
@@ -282,6 +282,12 @@ bool LLAssetType::lookupIsProtectedCategoryType(EType asset_type)
return true;
}
+// static
+bool LLAssetType::lookupIsEnsembleCategoryType(EType asset_type)
+{
+ return (asset_type >= AT_FOLDER_ENSEMBLE_START &&
+ asset_type <= AT_FOLDER_ENSEMBLE_END);
+}
// static. Generate a good default description
void LLAssetType::generateDescriptionFor(LLAssetType::EType asset_type,
diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h
index eb6ad494db..8b29c8defa 100644
--- a/indra/llcommon/llassettype.h
+++ b/indra/llcommon/llassettype.h
@@ -186,6 +186,7 @@ public:
static const char* lookupCategoryName(EType asset_type);
static bool lookupIsProtectedCategoryType(EType asset_type);
+ static bool lookupIsEnsembleCategoryType(EType asset_type);
/* TODO: Change return types from "const char *" to "const std::string &".
This is fairly straightforward, but requires changing some calls to use .c_str().
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 59aca12de2..e2a77f1d1e 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -133,6 +133,11 @@ LLAssetType::EType LLInventoryObject::getActualType() const
return mType;
}
+BOOL LLInventoryObject::getIsLinkType() const
+{
+ return LLAssetType::lookupIsLinkType(mType);
+}
+
// See LLInventoryItem override.
// virtual
const LLUUID& LLInventoryObject::getLinkedUUID() const
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index ce64317f48..2b4d8ed831 100644
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -97,7 +97,7 @@ public:
virtual const std::string& getName() const;
virtual LLAssetType::EType getType() const;
LLAssetType::EType getActualType() const; // bypasses indirection for linked items
-
+ BOOL getIsLinkType() const;
// mutators - will not call updateServer();
void setUUID(const LLUUID& new_uuid);
void rename(const std::string& new_name);
@@ -263,6 +263,10 @@ public:
void setInventoryType(LLInventoryType::EType inv_type);
void setFlags(U32 flags);
void setCreationDate(time_t creation_date_utc);
+
+ // This is currently only used in the Viewer to handle calling cards
+ // where the creator is actually used to store the target.
+ void setCreator(const LLUUID& creator) { mPermissions.setCreator(creator); }
// Put this inventory item onto the current outgoing mesage. It
// assumes you have already called nextBlock().
diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h
index d4ec399436..864088148f 100644
--- a/indra/llinventory/llpermissions.h
+++ b/indra/llinventory/llpermissions.h
@@ -252,7 +252,11 @@ public:
BOOL setGroupBits( const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
BOOL setEveryoneBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
BOOL setNextOwnerBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
-
+
+ // This is currently only used in the Viewer to handle calling cards
+ // where the creator is actually used to store the target. Use with care.
+ void setCreator(const LLUUID& creator) { mCreator = creator; }
+
//
// METHODS
//
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 49230833f8..bb1eb17806 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -49,6 +49,7 @@ set(llui_SOURCE_FILES
llkeywords.cpp
lllayoutstack.cpp
lllineeditor.cpp
+ lllink.cpp
llmenugl.cpp
llmodaldialog.cpp
llmultifloater.cpp
@@ -128,6 +129,7 @@ set(llui_HEADER_FILES
lllayoutstack.h
lllazyvalue.h
lllineeditor.h
+ lllink.h
llmenugl.h
llmodaldialog.h
llmultifloater.h
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index fc3af34951..c566282bef 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -64,12 +64,15 @@ LLButton::Params::Params()
: label_selected("label_selected"), // requires is_toggle true
label_shadow("label_shadow", true),
auto_resize("auto_resize", false),
+ use_ellipses("use_ellipses", false),
image_unselected("image_unselected"),
image_selected("image_selected"),
image_hover_selected("image_hover_selected"),
image_hover_unselected("image_hover_unselected"),
image_disabled_selected("image_disabled_selected"),
image_disabled("image_disabled"),
+ image_pressed("image_pressed"),
+ image_pressed_selected("image_pressed_selected"),
image_overlay("image_overlay"),
image_overlay_alignment("image_overlay_alignment", std::string("center")),
label_color("label_color"),
@@ -108,7 +111,6 @@ LLButton::LLButton(const LLButton::Params& p)
mFlashing( FALSE ),
mCurGlowStrength(0.f),
mNeedsHighlight(FALSE),
- mImagep( NULL ),
mUnselectedLabel(p.label()),
mSelectedLabel(p.label_selected()),
mGLFont(p.font),
@@ -118,6 +120,8 @@ LLButton::LLButton(const LLButton::Params& p)
mImageSelected(p.image_selected),
mImageDisabled(p.image_disabled),
mImageDisabledSelected(p.image_disabled_selected),
+ mImagePressed(p.image_pressed),
+ mImagePressedSelected(p.image_pressed_selected),
mImageHoverSelected(p.image_hover_selected),
mImageHoverUnselected(p.image_hover_unselected),
mUnselectedLabelColor(p.label_color()),
@@ -135,6 +139,7 @@ LLButton::LLButton(const LLButton::Params& p)
mScaleImage(p.scale_image),
mDropShadowedText(p.label_shadow),
mAutoResize(p.auto_resize),
+ mUseEllipses( p.use_ellipses ),
mHAlign(p.font_halign),
mLeftHPad(p.pad_left),
mRightHPad(p.pad_right),
@@ -182,6 +187,11 @@ LLButton::LLButton(const LLButton::Params& p)
mImageDisabled = p.image_unselected;
mFadeWhenDisabled = TRUE;
}
+
+ if (p.image_pressed_selected == default_params.image_pressed_selected)
+ {
+ mImagePressedSelected = mImageUnselected;
+ }
}
// if custom selected button image provided...
@@ -193,6 +203,21 @@ LLButton::LLButton(const LLButton::Params& p)
mImageDisabledSelected = p.image_selected;
mFadeWhenDisabled = TRUE;
}
+
+ if (p.image_pressed == default_params.image_pressed)
+ {
+ mImagePressed = mImageSelected;
+ }
+ }
+
+ if (!p.image_pressed.isProvided())
+ {
+ mImagePressed = mImageSelected;
+ }
+
+ if (!p.image_pressed_selected.isProvided())
+ {
+ mImagePressedSelected = mImageUnselected;
}
if (mImageUnselected.isNull())
@@ -257,11 +282,6 @@ boost::signals2::connection LLButton::setHeldDownCallback( const commit_signal_t
{
return mHeldDownSignal.connect(cb);
}
-
-boost::signals2::connection LLButton::setRightClickedCallback( const commit_signal_t::slot_type& cb )
-{
- return mRightClickSignal.connect(cb);
-}
// *TODO: Deprecate (for backwards compatability only)
@@ -414,7 +434,7 @@ BOOL LLButton::handleRightMouseUp(S32 x, S32 y, MASK mask)
if (pointInView(x, y))
{
- mRightClickSignal(this, getValue());
+ mRightClickSignal(this, x,y,mask);
}
}
else
@@ -427,7 +447,7 @@ BOOL LLButton::handleRightMouseUp(S32 x, S32 y, MASK mask)
void LLButton::onMouseEnter(S32 x, S32 y, MASK mask)
{
- if (getEnabled())
+ if (isInEnabledChain())
mNeedsHighlight = TRUE;
}
@@ -462,7 +482,7 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
// virtual
void LLButton::draw()
{
- BOOL flash = FALSE;
+ bool flash = FALSE;
static LLUICachedControl<F32> button_flash_rate("ButtonFlashRate", 0);
static LLUICachedControl<S32> button_flash_count("ButtonFlashCount", 0);
@@ -474,7 +494,7 @@ void LLButton::draw()
flash = (flash_count % 2 == 0) || flash_count > S32((F32)button_flash_count * 2.f);
}
- BOOL pressed_by_keyboard = FALSE;
+ bool pressed_by_keyboard = FALSE;
if (hasFocus())
{
pressed_by_keyboard = gKeyboard->getKeyDown(' ') || (mCommitOnReturn && gKeyboard->getKeyDown(KEY_RETURN));
@@ -485,24 +505,31 @@ void LLButton::draw()
S32 local_mouse_y;
LLUI::getCursorPositionLocal(this, &local_mouse_x, &local_mouse_y);
- BOOL pressed = pressed_by_keyboard
- || (hasMouseCapture() && pointInView(local_mouse_x, local_mouse_y))
- || getToggleState();
+ bool enabled = isInEnabledChain();
+
+ bool pressed = pressed_by_keyboard
+ || (hasMouseCapture() && pointInView(local_mouse_x, local_mouse_y));
+ bool selected = getToggleState();
- BOOL use_glow_effect = FALSE;
+ bool use_glow_effect = FALSE;
LLColor4 glow_color = LLColor4::white;
LLRender::eBlendType glow_type = LLRender::BT_ADD_WITH_ALPHA;
- if ( mNeedsHighlight )
+ LLUIImage* imagep = NULL;
+ if (pressed)
{
- if (pressed)
+ imagep = selected ? mImagePressedSelected : mImagePressed;
+ }
+ else if ( mNeedsHighlight )
+ {
+ if (selected)
{
if (mImageHoverSelected)
{
- mImagep = mImageHoverSelected;
+ imagep = mImageHoverSelected;
}
else
{
- mImagep = mImageSelected;
+ imagep = mImageSelected;
use_glow_effect = TRUE;
}
}
@@ -510,22 +537,37 @@ void LLButton::draw()
{
if (mImageHoverUnselected)
{
- mImagep = mImageHoverUnselected;
+ imagep = mImageHoverUnselected;
}
else
{
- mImagep = mImageUnselected;
+ imagep = mImageUnselected;
use_glow_effect = TRUE;
}
}
}
- else if ( pressed )
+ else
{
- mImagep = mImageSelected;
+ imagep = selected ? mImageSelected : mImageUnselected;
}
- else
+
+ // Override if more data is available
+ // HACK: Use gray checked state to mean either:
+ // enabled and tentative
+ // or
+ // disabled but checked
+ if (!mImageDisabledSelected.isNull()
+ &&
+ ( (enabled && getTentative())
+ || (!enabled && selected ) ) )
{
- mImagep = mImageUnselected;
+ imagep = mImageDisabledSelected;
+ }
+ else if (!mImageDisabled.isNull()
+ && !enabled
+ && !selected)
+ {
+ imagep = mImageDisabled;
}
if (mFlashing)
@@ -540,26 +582,7 @@ void LLButton::draw()
glow_color = flash_color;
}
- // Override if more data is available
- // HACK: Use gray checked state to mean either:
- // enabled and tentative
- // or
- // disabled but checked
- if (!mImageDisabledSelected.isNull()
- &&
- ( (getEnabled() && getTentative())
- || (!getEnabled() && pressed ) ) )
- {
- mImagep = mImageDisabledSelected;
- }
- else if (!mImageDisabled.isNull()
- && !getEnabled()
- && !pressed)
- {
- mImagep = mImageDisabled;
- }
-
- if (mNeedsHighlight && !mImagep)
+ if (mNeedsHighlight && !imagep)
{
use_glow_effect = TRUE;
}
@@ -568,7 +591,7 @@ void LLButton::draw()
LLColor4 label_color;
// label changes when button state changes, not when pressed
- if ( getEnabled() )
+ if ( enabled )
{
if ( getToggleState() )
{
@@ -596,32 +619,18 @@ void LLButton::draw()
if( getToggleState() )
{
- if( getEnabled() || mDisabledSelectedLabel.empty() )
- {
- label = mSelectedLabel;
- }
- else
- {
- label = mDisabledSelectedLabel;
- }
+ label = mSelectedLabel;
}
else
{
- if( getEnabled() || mDisabledLabel.empty() )
- {
- label = mUnselectedLabel;
- }
- else
- {
- label = mDisabledLabel;
- }
+ label = mUnselectedLabel;
}
// overlay with keyboard focus border
if (hasFocus())
{
F32 lerp_amt = gFocusMgr.getFocusFlashAmt();
- drawBorder(gFocusMgr.getFocusColor(), llround(lerp(1.f, 3.f, lerp_amt)));
+ drawBorder(imagep, gFocusMgr.getFocusColor(), llround(lerp(1.f, 3.f, lerp_amt)));
}
if (use_glow_effect)
@@ -638,27 +647,27 @@ void LLButton::draw()
// Draw button image, if available.
// Otherwise draw basic rectangular button.
- if (mImagep.notNull())
+ if (imagep != NULL)
{
// apply automatic 50% alpha fade to disabled image
LLColor4 disabled_color = mFadeWhenDisabled ? mDisabledImageColor.get() % 0.5f : mDisabledImageColor.get();
if ( mScaleImage)
{
- mImagep->draw(getLocalRect(), getEnabled() ? mImageColor.get() : disabled_color );
+ imagep->draw(getLocalRect(), enabled ? mImageColor.get() : disabled_color );
if (mCurGlowStrength > 0.01f)
{
gGL.setSceneBlendType(glow_type);
- mImagep->drawSolid(0, 0, getRect().getWidth(), getRect().getHeight(), glow_color % mCurGlowStrength);
+ imagep->drawSolid(0, 0, getRect().getWidth(), getRect().getHeight(), glow_color % mCurGlowStrength);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
}
else
{
- mImagep->draw(0, 0, getEnabled() ? mImageColor.get() : disabled_color );
+ imagep->draw(0, 0, enabled ? mImageColor.get() : disabled_color );
if (mCurGlowStrength > 0.01f)
{
gGL.setSceneBlendType(glow_type);
- mImagep->drawSolid(0, 0, glow_color % mCurGlowStrength);
+ imagep->drawSolid(0, 0, glow_color % mCurGlowStrength);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
}
@@ -699,7 +708,7 @@ void LLButton::draw()
// fade out overlay images on disabled buttons
LLColor4 overlay_color = mImageOverlayColor.get();
- if (!getEnabled())
+ if (!enabled)
{
overlay_color.mV[VALPHA] = 0.5f;
}
@@ -768,28 +777,33 @@ void LLButton::draw()
x++;
}
+ // *NOTE: mantipov: before mUseEllipses is implemented in EXT-279 U32_MAX has been passed as
+ // max_chars.
+ // LLFontGL::render expects S32 max_chars variable but process in a separate way -1 value.
+ // Due to U32_MAX is equal to S32 -1 value I have rest this value for non-ellipses mode.
+ // Not sure if it is really needed. Probably S32_MAX should be always passed as max_chars.
mGLFont->render(label, 0, (F32)x, (F32)(LLBUTTON_V_PAD + y_offset),
label_color,
mHAlign, LLFontGL::BOTTOM,
LLFontGL::NORMAL,
mDropShadowedText ? LLFontGL::DROP_SHADOW_SOFT : LLFontGL::NO_SHADOW,
- U32_MAX, text_width,
- NULL, FALSE, FALSE);
+ S32_MAX, text_width,
+ NULL, FALSE, mUseEllipses);
}
- LLView::draw();
+ LLUICtrl::draw();
}
-void LLButton::drawBorder(const LLColor4& color, S32 size)
+void LLButton::drawBorder(LLUIImage* imagep, const LLColor4& color, S32 size)
{
- if (mImagep.isNull()) return;
+ if (imagep == NULL) return;
if (mScaleImage)
{
- mImagep->drawBorder(getLocalRect(), color, size);
+ imagep->drawBorder(getLocalRect(), color, size);
}
else
{
- mImagep->drawBorder(0, 0, color, size);
+ imagep->drawBorder(0, 0, color, size);
}
}
@@ -851,16 +865,6 @@ void LLButton::setLabelSelected( const LLStringExplicit& label )
mSelectedLabel = label;
}
-void LLButton::setDisabledLabel( const LLStringExplicit& label )
-{
- mDisabledLabel = label;
-}
-
-void LLButton::setDisabledSelectedLabel( const LLStringExplicit& label )
-{
- mDisabledSelectedLabel = label;
-}
-
void LLButton::setImageUnselected(LLPointer<LLUIImage> image)
{
mImageUnselected = image;
@@ -875,25 +879,11 @@ void LLButton::autoResize()
LLUIString label;
if(getToggleState())
{
- if( getEnabled() || mDisabledSelectedLabel.empty() )
- {
- label = mSelectedLabel;
- }
- else
- {
- label = mDisabledSelectedLabel;
- }
+ label = mSelectedLabel;
}
else
{
- if( getEnabled() || mDisabledLabel.empty() )
- {
- label = mUnselectedLabel;
- }
- else
- {
- label = mDisabledLabel;
- }
+ label = mUnselectedLabel;
}
resize(label);
}
@@ -915,9 +905,8 @@ void LLButton::resize(LLUIString label)
}
void LLButton::setImages( const std::string &image_name, const std::string &selected_name )
{
- setImageUnselected(image_name);
- setImageSelected(selected_name);
-
+ setImageUnselected(LLUI::getUIImage(image_name));
+ setImageSelected(LLUI::getUIImage(selected_name));
}
void LLButton::setImageSelected(LLPointer<LLUIImage> image)
@@ -950,19 +939,6 @@ void LLButton::setImageDisabledSelected(LLPointer<LLUIImage> image)
mFadeWhenDisabled = TRUE;
}
-void LLButton::setDisabledImages( const std::string &image_name, const std::string &selected_name)
-{
- setDisabledImages( image_name, selected_name, mImageColor.get());
- mFadeWhenDisabled = TRUE;
-}
-
-void LLButton::setDisabledImages( const std::string &image_name, const std::string &selected_name, const LLColor4& c )
-{
- setImageDisabled(image_name);
- setImageDisabledSelected(selected_name);
- mDisabledImageColor = c;
-}
-
void LLButton::setImageHoverSelected(LLPointer<LLUIImage> image)
{
mImageHoverSelected = image;
@@ -973,12 +949,6 @@ void LLButton::setImageHoverUnselected(LLPointer<LLUIImage> image)
mImageHoverUnselected = image;
}
-void LLButton::setHoverImages( const std::string& image_name, const std::string& selected_name )
-{
- setImageHoverUnselected(image_name);
- setImageHoverSelected(selected_name);
-}
-
void LLButton::setImageOverlay(const std::string& image_name, LLFontGL::HAlign alignment, const LLColor4& color)
{
if (image_name.empty())
@@ -1016,42 +986,6 @@ S32 round_up(S32 grid, S32 value)
}
}
-void LLButton::setImageUnselected(const std::string &image_name)
-{
- setImageUnselected(LLUI::getUIImage(image_name));
- mImageUnselectedName = image_name;
-}
-
-void LLButton::setImageSelected(const std::string &image_name)
-{
- setImageSelected(LLUI::getUIImage(image_name));
- mImageSelectedName = image_name;
-}
-
-void LLButton::setImageHoverSelected(const std::string &image_name)
-{
- setImageHoverSelected(LLUI::getUIImage(image_name));
- mImageHoverSelectedName = image_name;
-}
-
-void LLButton::setImageHoverUnselected(const std::string &image_name)
-{
- setImageHoverUnselected(LLUI::getUIImage(image_name));
- mImageHoverUnselectedName = image_name;
-}
-
-void LLButton::setImageDisabled(const std::string &image_name)
-{
- setImageDisabled(LLUI::getUIImage(image_name));
- mImageDisabledName = image_name;
-}
-
-void LLButton::setImageDisabledSelected(const std::string &image_name)
-{
- setImageDisabledSelected(LLUI::getUIImage(image_name));
- mImageDisabledSelectedName = image_name;
-}
-
void LLButton::addImageAttributeToXML(LLXMLNodePtr node,
const std::string& image_name,
const LLUUID& image_id,
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index e387c91a17..249882013a 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -76,6 +76,7 @@ public:
Optional<std::string> label_selected;
Optional<bool> label_shadow;
Optional<bool> auto_resize;
+ Optional<bool> use_ellipses;
// images
Optional<LLUIImage*> image_unselected,
@@ -84,6 +85,8 @@ public:
image_hover_unselected,
image_disabled_selected,
image_disabled,
+ image_pressed,
+ image_pressed_selected,
image_overlay;
Optional<std::string> image_overlay_alignment;
@@ -150,14 +153,14 @@ public:
void setUnselectedLabelColor( const LLColor4& c ) { mUnselectedLabelColor = c; }
void setSelectedLabelColor( const LLColor4& c ) { mSelectedLabelColor = c; }
+ void setUseEllipses( BOOL use_ellipses ) { mUseEllipses = use_ellipses; }
+
boost::signals2::connection setClickedCallback( const commit_signal_t::slot_type& cb ); // mouse down and up within button
boost::signals2::connection setMouseDownCallback( const commit_signal_t::slot_type& cb );
boost::signals2::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ); // mouse up, EVEN IF NOT IN BUTTON
// Passes a 'count' parameter in the commit param payload, i.e. param["count"])
boost::signals2::connection setHeldDownCallback( const commit_signal_t::slot_type& cb ); // Mouse button held down and in button
- boost::signals2::connection setRightClickedCallback( const commit_signal_t::slot_type& cb ); // right mouse down and up within button
-
// *TODO: Deprecate (for backwards compatability only)
@@ -190,11 +193,7 @@ public:
virtual void setColor(const LLColor4& c);
void setImages(const std::string &image_name, const std::string &selected_name);
- void setDisabledImages(const std::string &image_name, const std::string &selected_name);
- void setDisabledImages(const std::string &image_name, const std::string &selected_name, const LLColor4& c);
- void setHoverImages(const std::string &image_name, const std::string &selected_name);
-
void setDisabledImageColor(const LLColor4& c) { mDisabledImageColor = c; }
void setDisabledSelectedLabelColor( const LLColor4& c ) { mDisabledSelectedLabelColor = c; }
@@ -208,8 +207,6 @@ public:
virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text );
void setLabelUnselected(const LLStringExplicit& label);
void setLabelSelected(const LLStringExplicit& label);
- void setDisabledLabel(const LLStringExplicit& disabled_label);
- void setDisabledSelectedLabel(const LLStringExplicit& disabled_label);
void setDisabledLabelColor( const LLColor4& c ) { mDisabledLabelColor = c; }
void setFont(const LLFontGL *font)
@@ -223,15 +220,6 @@ public:
void setHoverGlowStrength(F32 strength) { mHoverGlowStrength = strength; }
- void setImageUnselected(const std::string &image_name);
- const std::string& getImageUnselectedName() const { return mImageUnselectedName; }
- void setImageSelected(const std::string &image_name);
- const std::string& getImageSelectedName() const { return mImageSelectedName; }
- void setImageHoverSelected(const std::string &image_name);
- void setImageHoverUnselected(const std::string &image_name);
- void setImageDisabled(const std::string &image_name);
- void setImageDisabledSelected(const std::string &image_name);
-
void setImageUnselected(LLPointer<LLUIImage> image);
void setImageSelected(LLPointer<LLUIImage> image);
void setImageHoverSelected(LLPointer<LLUIImage> image);
@@ -250,106 +238,85 @@ public:
static void setFloaterToggle(LLUICtrl* ctrl, const LLSD& sdname);
protected:
-
- virtual void drawBorder(const LLColor4& color, S32 size);
-
- void setImageUnselectedID(const LLUUID &image_id);
- const LLUUID& getImageUnselectedID() const { return mImageUnselectedID; }
- void setImageSelectedID(const LLUUID &image_id);
- const LLUUID& getImageSelectedID() const { return mImageSelectedID; }
- void setImageHoverSelectedID(const LLUUID &image_id);
- void setImageHoverUnselectedID(const LLUUID &image_id);
- void setImageDisabledID(const LLUUID &image_id);
- void setImageDisabledSelectedID(const LLUUID &image_id);
const LLPointer<LLUIImage>& getImageUnselected() const { return mImageUnselected; }
const LLPointer<LLUIImage>& getImageSelected() const { return mImageSelected; }
- void resetMouseDownTimer();
LLFrameTimer mMouseDownTimer;
// If the label is empty, set the picture_style attribute
static void setupParamsForExport(Params& p, LLView* parent);
+private:
+ void drawBorder(LLUIImage* imagep, const LLColor4& color, S32 size);
+ void resetMouseDownTimer();
private:
- commit_signal_t mMouseDownSignal;
- commit_signal_t mMouseUpSignal;
- commit_signal_t mHeldDownSignal;
+ commit_signal_t mMouseDownSignal;
+ commit_signal_t mMouseUpSignal;
+ commit_signal_t mHeldDownSignal;
- const LLFontGL *mGLFont;
+ const LLFontGL* mGLFont;
- S32 mMouseDownFrame;
- S32 mMouseHeldDownCount; // Counter for parameter passed to held-down callback
- F32 mHeldDownDelay; // seconds, after which held-down callbacks get called
- S32 mHeldDownFrameDelay; // frames, after which held-down callbacks get called
+ S32 mMouseDownFrame;
+ S32 mMouseHeldDownCount; // Counter for parameter passed to held-down callback
+ F32 mHeldDownDelay; // seconds, after which held-down callbacks get called
+ S32 mHeldDownFrameDelay; // frames, after which held-down callbacks get called
LLPointer<LLUIImage> mImageOverlay;
LLFontGL::HAlign mImageOverlayAlignment;
- LLUIColor mImageOverlayColor;
+ LLUIColor mImageOverlayColor;
LLPointer<LLUIImage> mImageUnselected;
LLUIString mUnselectedLabel;
- LLUIColor mUnselectedLabelColor;
+ LLUIColor mUnselectedLabelColor;
LLPointer<LLUIImage> mImageSelected;
LLUIString mSelectedLabel;
- LLUIColor mSelectedLabelColor;
+ LLUIColor mSelectedLabelColor;
LLPointer<LLUIImage> mImageHoverSelected;
LLPointer<LLUIImage> mImageHoverUnselected;
LLPointer<LLUIImage> mImageDisabled;
- LLUIString mDisabledLabel;
- LLUIColor mDisabledLabelColor;
+ LLUIColor mDisabledLabelColor;
LLPointer<LLUIImage> mImageDisabledSelected;
LLUIString mDisabledSelectedLabel;
- LLUIColor mDisabledSelectedLabelColor;
-
- LLUUID mImageUnselectedID;
- LLUUID mImageSelectedID;
- LLUUID mImageHoverSelectedID;
- LLUUID mImageHoverUnselectedID;
- LLUUID mImageDisabledID;
- LLUUID mImageDisabledSelectedID;
- std::string mImageUnselectedName;
- std::string mImageSelectedName;
- std::string mImageHoverSelectedName;
- std::string mImageHoverUnselectedName;
- std::string mImageDisabledName;
- std::string mImageDisabledSelectedName;
+ LLUIColor mDisabledSelectedLabelColor;
- LLUIColor mHighlightColor;
- LLUIColor mFlashBgColor;
+ LLPointer<LLUIImage> mImagePressed;
+ LLPointer<LLUIImage> mImagePressedSelected;
- LLUIColor mImageColor;
- LLUIColor mDisabledImageColor;
+ LLUIColor mHighlightColor;
+ LLUIColor mFlashBgColor;
- BOOL mIsToggle;
- BOOL mScaleImage;
+ LLUIColor mImageColor;
+ LLUIColor mDisabledImageColor;
- BOOL mDropShadowedText;
- BOOL mAutoResize;
- BOOL mBorderEnabled;
+ BOOL mIsToggle;
+ BOOL mScaleImage;
- BOOL mFlashing;
+ BOOL mDropShadowedText;
+ BOOL mAutoResize;
+ BOOL mUseEllipses;
+ BOOL mBorderEnabled;
- LLFontGL::HAlign mHAlign;
- S32 mLeftHPad;
- S32 mRightHPad;
+ BOOL mFlashing;
- F32 mHoverGlowStrength;
- F32 mCurGlowStrength;
+ LLFontGL::HAlign mHAlign;
+ S32 mLeftHPad;
+ S32 mRightHPad;
- BOOL mNeedsHighlight;
- BOOL mCommitOnReturn;
- BOOL mFadeWhenDisabled;
+ F32 mHoverGlowStrength;
+ F32 mCurGlowStrength;
- std::string mHelpURL;
+ BOOL mNeedsHighlight;
+ BOOL mCommitOnReturn;
+ BOOL mFadeWhenDisabled;
- LLPointer<LLUIImage> mImagep;
+ std::string mHelpURL;
- LLFrameTimer mFlashingTimer;
+ LLFrameTimer mFlashingTimer;
};
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp
index b43f91e766..455b17ffc7 100644
--- a/indra/llui/llcheckboxctrl.cpp
+++ b/indra/llui/llcheckboxctrl.cpp
@@ -161,7 +161,6 @@ void LLCheckBoxCtrl::onCommit()
void LLCheckBoxCtrl::setEnabled(BOOL b)
{
LLView::setEnabled(b);
- mButton->setEnabled(b);
if (b)
{
diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp
index 2cb8197a67..cbd4cb380f 100644
--- a/indra/llui/llclipboard.cpp
+++ b/indra/llui/llclipboard.cpp
@@ -61,6 +61,12 @@ void LLClipboard::copyFromSubstring(const LLWString &src, S32 pos, S32 len, cons
LLView::getWindow()->copyTextToClipboard( mString );
}
+void LLClipboard::copyFromString(const LLWString &src, const LLUUID& source_id )
+{
+ mSourceID = source_id;
+ mString = src;
+ LLView::getWindow()->copyTextToClipboard( mString );
+}
const LLWString& LLClipboard::getPasteWString( LLUUID* source_id )
{
diff --git a/indra/llui/llclipboard.h b/indra/llui/llclipboard.h
index 034a7a6aeb..d7ffeb33e0 100644
--- a/indra/llui/llclipboard.h
+++ b/indra/llui/llclipboard.h
@@ -50,6 +50,7 @@ public:
(i.e. X11/Linux). */
void copyFromSubstring(const LLWString &copy_from, S32 pos, S32 len, const LLUUID& source_id = LLUUID::null );
+ void copyFromString(const LLWString &copy_from, const LLUUID& source_id = LLUUID::null );
BOOL canPasteString() const;
const LLWString& getPasteWString(LLUUID* source_id = NULL);
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index f8c6204afb..93d2b83c9f 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -182,12 +182,6 @@ LLComboBox::~LLComboBox()
}
-void LLComboBox::setEnabled(BOOL enabled)
-{
- LLView::setEnabled(enabled);
- mButton->setEnabled(enabled);
-}
-
void LLComboBox::clear()
{
if (mTextEntry)
@@ -196,8 +190,6 @@ void LLComboBox::clear()
}
mButton->setLabelSelected(LLStringUtil::null);
mButton->setLabelUnselected(LLStringUtil::null);
- mButton->setDisabledLabel(LLStringUtil::null);
- mButton->setDisabledSelectedLabel(LLStringUtil::null);
mList->deselectAllItems();
}
@@ -376,10 +368,7 @@ void LLComboBox::setLabel(const LLStringExplicit& name)
if (!mAllowTextEntry)
{
- mButton->setLabelUnselected(name);
- mButton->setLabelSelected(name);
- mButton->setDisabledLabel(name);
- mButton->setDisabledSelectedLabel(name);
+ mButton->setLabel(name);
}
}
@@ -441,14 +430,6 @@ void LLComboBox::setButtonVisible(BOOL visible)
}
}
-void LLComboBox::draw()
-{
- mButton->setEnabled(getEnabled() /*&& !mList->isEmpty()*/);
-
- // Draw children normally
- LLUICtrl::draw();
-}
-
BOOL LLComboBox::setCurrentByIndex( S32 index )
{
BOOL found = mList->selectNthItem( index );
diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h
index db97b0df75..4becda195f 100644
--- a/indra/llui/llcombobox.h
+++ b/indra/llui/llcombobox.h
@@ -110,11 +110,8 @@ protected:
public:
// LLView interface
- virtual void draw();
virtual void onFocusLost();
- virtual void setEnabled(BOOL enabled);
-
virtual BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect);
virtual BOOL handleKeyHere(KEY key, MASK mask);
virtual BOOL handleUnicodeCharHere(llwchar uni_char);
diff --git a/indra/llui/llfiltereditor.cpp b/indra/llui/llfiltereditor.cpp
index 0f36483fc2..7d6a4007a2 100644
--- a/indra/llui/llfiltereditor.cpp
+++ b/indra/llui/llfiltereditor.cpp
@@ -87,6 +87,12 @@ BOOL LLFilterEditor::setLabelArg( const std::string& key, const LLStringExplicit
}
//virtual
+void LLFilterEditor::setLabel( const LLStringExplicit &new_label )
+{
+ mFilterEditor->setLabel(new_label);
+}
+
+//virtual
void LLFilterEditor::clear()
{
if (mFilterEditor)
diff --git a/indra/llui/llfiltereditor.h b/indra/llui/llfiltereditor.h
index 4240fd770c..fceb82af8d 100644
--- a/indra/llui/llfiltereditor.h
+++ b/indra/llui/llfiltereditor.h
@@ -74,6 +74,7 @@ public:
virtual LLSD getValue() const;
virtual BOOL setTextArg( const std::string& key, const LLStringExplicit& text );
virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text );
+ virtual void setLabel( const LLStringExplicit &new_label );
virtual void clear();
private:
diff --git a/indra/llui/llflyoutbutton.cpp b/indra/llui/llflyoutbutton.cpp
index 536919c072..3483bac782 100644
--- a/indra/llui/llflyoutbutton.cpp
+++ b/indra/llui/llflyoutbutton.cpp
@@ -74,13 +74,6 @@ void LLFlyoutButton::draw()
LLComboBox::draw();
}
-void LLFlyoutButton::setEnabled(BOOL enabled)
-{
- mActionButton->setEnabled(enabled);
- LLComboBox::setEnabled(enabled);
-}
-
-
void LLFlyoutButton::setToggleState(BOOL state)
{
mToggleState = state;
diff --git a/indra/llui/llflyoutbutton.h b/indra/llui/llflyoutbutton.h
index 1f1716593a..d8c0f1a50d 100644
--- a/indra/llui/llflyoutbutton.h
+++ b/indra/llui/llflyoutbutton.h
@@ -61,7 +61,6 @@ protected:
friend class LLUICtrlFactory;
public:
virtual void draw();
- virtual void setEnabled(BOOL enabled);
void setToggleState(BOOL state);
diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp
index a66f147dcc..3899897c5f 100644
--- a/indra/llui/llfocusmgr.cpp
+++ b/indra/llui/llfocusmgr.cpp
@@ -49,7 +49,6 @@ LLFocusMgr::LLFocusMgr()
mDefaultKeyboardFocus( NULL ),
mKeystrokesOnly(FALSE),
mTopCtrl( NULL ),
- mFocusWeight(0.f),
mAppHasFocus(TRUE) // Macs don't seem to notify us that we've gotten focus, so default to true
#ifdef _DEBUG
, mMouseCaptorName("none")
@@ -98,8 +97,6 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystroke
return;
}
- //llinfos << "Keyboard focus handled by " << (new_focus ? new_focus->getName() : "nothing") << llendl;
-
mKeystrokesOnly = keystrokes_only;
if( new_focus != mKeyboardFocus )
@@ -107,18 +104,48 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystroke
mLastKeyboardFocus = mKeyboardFocus;
mKeyboardFocus = new_focus;
- if( mLastKeyboardFocus )
+ view_handle_list_t new_focus_list;
+
+ // walk up the tree to root and add all views to the new_focus_list
+ for (LLView* ctrl = mKeyboardFocus; ctrl && ctrl != LLUI::getRootView(); ctrl = ctrl->getParent())
{
- mLastKeyboardFocus->onFocusLost();
+ if (ctrl)
+ {
+ new_focus_list.push_front(ctrl->getHandle());
+ }
}
- // clear out any existing flash
- if (new_focus)
+ view_handle_list_t::iterator new_focus_iter = new_focus_list.begin();
+ view_handle_list_t::iterator old_focus_iter = mCachedKeyboardFocusList.begin();
+
+ // compare the new focus sub-tree to the old focus sub-tree
+ // iterate through the lists in lockstep until we get to a non-common ancestor
+ while ((new_focus_iter != new_focus_list.end()) &&
+ (old_focus_iter != mCachedKeyboardFocusList.end()) &&
+ ((*new_focus_iter) == (*old_focus_iter)))
{
- mFocusWeight = 0.f;
- new_focus->onFocusReceived();
+ new_focus_iter++;
+ old_focus_iter++;
}
- mFocusTimer.reset();
+
+ // call onFocusLost on all remaining in the old focus list
+ while (old_focus_iter != mCachedKeyboardFocusList.end())
+ {
+ if (old_focus_iter->get() != NULL) {
+ old_focus_iter->get()->onFocusLost();
+ }
+ old_focus_iter++;
+ }
+
+ // call onFocusReceived on all remaining in the new focus list
+ while (new_focus_iter != new_focus_list.end())
+ {
+ new_focus_iter->get()->onFocusReceived();
+ new_focus_iter++;
+ }
+
+ // cache the new focus list for next time
+ swap(mCachedKeyboardFocusList, new_focus_list);
#ifdef _DEBUG
mKeyboardFocusName = new_focus ? new_focus->getName() : std::string("none");
@@ -318,7 +345,7 @@ void LLFocusMgr::unlockFocus()
F32 LLFocusMgr::getFocusFlashAmt() const
{
- return clamp_rescale(getFocusTime(), 0.f, FOCUS_FADE_TIME, mFocusWeight, 0.f);
+ return clamp_rescale(mFocusFlashTimer.getElapsedTimeF32(), 0.f, FOCUS_FADE_TIME, 1.f, 0.f);
}
LLColor4 LLFocusMgr::getFocusColor() const
@@ -335,8 +362,7 @@ LLColor4 LLFocusMgr::getFocusColor() const
void LLFocusMgr::triggerFocusFlash()
{
- mFocusTimer.reset();
- mFocusWeight = 1.f;
+ mFocusFlashTimer.reset();
}
void LLFocusMgr::setAppHasFocus(BOOL focus)
diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h
index aaeb25a870..fbe0d22084 100644
--- a/indra/llui/llfocusmgr.h
+++ b/indra/llui/llfocusmgr.h
@@ -63,7 +63,6 @@ public:
BOOL getKeystrokesOnly() { return mKeystrokesOnly; }
void setKeystrokesOnly(BOOL keystrokes_only) { mKeystrokesOnly = keystrokes_only; }
- F32 getFocusTime() const { return mFocusTimer.getElapsedTimeF32(); }
F32 getFocusFlashAmt() const;
S32 getFocusFlashWidth() const { return llround(lerp(1.f, 3.f, getFocusFlashAmt())); }
LLColor4 getFocusColor() const;
@@ -102,12 +101,15 @@ private:
LLUICtrl* mLastKeyboardFocus; // who last had focus
LLUICtrl* mDefaultKeyboardFocus;
BOOL mKeystrokesOnly;
+
+ // caching list of keyboard focus ancestors for calling onFocusReceived and onFocusLost
+ typedef std::list<LLHandle<LLView> > view_handle_list_t;
+ view_handle_list_t mCachedKeyboardFocusList;
// Top View
LLUICtrl* mTopCtrl;
- LLFrameTimer mFocusTimer;
- F32 mFocusWeight;
+ LLFrameTimer mFocusFlashTimer;
BOOL mAppHasFocus;
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index f94eb7fcc3..20957499bc 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -318,10 +318,8 @@ void LLLineEditor::setMaxTextLength(S32 max_text_length)
void LLLineEditor::updateTextPadding()
{
static LLUICachedControl<S32> line_editor_hpad ("UILineEditorHPad", 0);
- mTextPadLeft = llclamp(mTextPadLeft, 0, getRect().getWidth());
- mTextPadRight = llclamp(mTextPadRight, 0, getRect().getWidth());
- mMinHPixels = line_editor_hpad + mTextPadLeft;
- mMaxHPixels = getRect().getWidth() - mMinHPixels - mTextPadRight;
+ mMinHPixels = line_editor_hpad + llclamp(mTextPadLeft, 0, getRect().getWidth());;
+ mMaxHPixels = getRect().getWidth() - mMinHPixels - llclamp(mTextPadRight, 0, getRect().getWidth());
}
@@ -625,6 +623,8 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask)
// delay cursor flashing
mKeystrokeTimer.reset();
+
+ LLUICtrl::handleMouseDown(x,y,mask);
return TRUE;
}
@@ -738,7 +738,9 @@ BOOL LLLineEditor::handleMouseUp(S32 x, S32 y, MASK mask)
// take selection to 'primary' clipboard
updatePrimary();
}
-
+
+ // We won't call LLUICtrl::handleMouseUp to avoid double calls of childrenHandleMouseUp().Just invoke the signal manually.
+ mMouseUpSignal(this,x,y, mask);
return handled;
}
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index e355cfda8b..e5c32846a0 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -176,6 +176,12 @@ LLMenuItemGL::LLMenuItemGL(const LLMenuItemGL::Params& p)
std::string key_str = shortcut.substr(pipe_pos+1);
LLKeyboard::keyFromString(key_str, &mAcceleratorKey);
+
+ LL_DEBUGS("HotKeys") << "Process short cut key: shortcut: " << shortcut
+ << ", key str: " << key_str
+ << ", accelerator mask: " << mAcceleratorMask
+ << ", accelerator key: " << mAcceleratorKey
+ << LL_ENDL;
}
BOOL LLMenuItemGL::handleAcceleratorKey(KEY key, MASK mask)
@@ -285,6 +291,7 @@ void LLMenuItemGL::appendAcceleratorString( std::string& st ) const
st.append( " " );
}
st.append( keystr );
+ LL_DEBUGS("HotKeys") << "appendAcceleratorString: " << st << LL_ENDL;
}
void LLMenuItemGL::setJumpKey(KEY key)
@@ -797,7 +804,7 @@ BOOL LLMenuItemCallGL::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
if (pointInView(x, y))
{
- mRightClickSignal(this, getValue());
+ mRightClickSignal(this,x,y, mask);
}
return TRUE;
@@ -2996,6 +3003,7 @@ BOOL LLMenuBarGL::handleMouseDown(S32 x, S32 y, MASK mask)
return LLMenuGL::handleMouseDown(x, y, mask);
}
+/*
BOOL LLMenuBarGL::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
// clicks on menu bar closes existing menus from other contexts but leave
@@ -3007,6 +3015,7 @@ BOOL LLMenuBarGL::handleRightMouseDown(S32 x, S32 y, MASK mask)
return LLMenuGL::handleMouseDown(x, y, mask);
}
+*/
void LLMenuBarGL::draw()
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index 828956a217..930276f7bc 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -297,10 +297,6 @@ public:
return mEnableSignal.connect(cb);
}
- boost::signals2::connection setRightClickedCallback( const commit_signal_t::slot_type& cb )
- {
- return mRightClickSignal.connect(cb);
- }
private:
enable_signal_t mEnableSignal;
@@ -492,9 +488,6 @@ public:
void buildDrawLabels();
void createJumpKeys();
- // Show popup in global screen space based on last mouse location.
- static void showPopup(LLMenuGL* menu);
-
// Show popup at a specific location.
static void showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y);
@@ -716,7 +709,9 @@ public:
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
/*virtual*/ BOOL handleJumpKey(KEY key);
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+// /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+
+
/*virtual*/ void draw();
/*virtual*/ BOOL jumpKeysActive();
diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h
index 89d44eaa87..da633cc1cd 100644
--- a/indra/llui/llmultislider.h
+++ b/indra/llui/llmultislider.h
@@ -120,4 +120,4 @@ protected:
commit_signal_t mMouseUpSignal;
};
-#endif // LL_LLSLIDER_H
+#endif // LL_MULTI_SLIDER_H
diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp
index bc489592d4..566825ff3b 100644
--- a/indra/llui/llscrollbar.cpp
+++ b/indra/llui/llscrollbar.cpp
@@ -497,8 +497,8 @@ void LLScrollbar::draw()
}
// Draw background and thumb.
- if ( ( mOrientation == VERTICAL&&(mThumbImageV.isNull() || mThumbImageV.isNull()) )
- || (mOrientation == HORIZONTAL&&(mTrackImageH.isNull() || mThumbImageH.isNull()) ))
+ if ( ( mOrientation == VERTICAL&&(mThumbImageV.isNull() || mThumbImageH.isNull()) )
+ || (mOrientation == HORIZONTAL&&(mTrackImageH.isNull() || mTrackImageV.isNull()) ))
{
gl_rect_2d(mOrientation == HORIZONTAL ? mThickness : 0,
mOrientation == VERTICAL ? getRect().getHeight() - 2 * mThickness : getRect().getHeight(),
@@ -513,7 +513,6 @@ void LLScrollbar::draw()
// Thumb
LLRect outline_rect = mThumbRect;
outline_rect.stretch(2);
- S32 rect_fix = 0;
// Background
if(mOrientation == HORIZONTAL)
@@ -521,7 +520,7 @@ void LLScrollbar::draw()
mTrackImageH->drawSolid(mThickness //S32 x
, 0 //S32 y
, getRect().getWidth() - 2 * mThickness //S32 width
- , getRect().getHeight()- rect_fix //S32 height
+ , getRect().getHeight() //S32 height
, mTrackColor.get()); //const LLColor4& color
if (gFocusMgr.getKeyboardFocus() == this)
@@ -540,7 +539,7 @@ void LLScrollbar::draw()
}
else if(mOrientation == VERTICAL)
{
- mTrackImageV->drawSolid( 0+rect_fix //S32 x
+ mTrackImageV->drawSolid( 0 //S32 x
, mThickness //S32 y
, getRect().getWidth() //S32 width
, getRect().getHeight() - 2 * mThickness //S32 height
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 79f0f9d71b..3041773fb2 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1684,7 +1684,8 @@ BOOL LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
// so the scroll bars will work.
if (NULL == LLView::childrenHandleDoubleClick(x, y, mask))
{
- if( mCanSelect && mOnDoubleClickCallback )
+ // Run the callback only if an item is being double-clicked.
+ if( mCanSelect && hitItem(x, y) && mOnDoubleClickCallback )
{
mOnDoubleClickCallback();
}
diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp
index 9483cca104..840dd9b089 100644
--- a/indra/llui/llslider.cpp
+++ b/indra/llui/llslider.cpp
@@ -51,6 +51,8 @@ LLSlider::Params::Params()
thumb_outline_color("thumb_outline_color"),
thumb_center_color("thumb_center_color"),
thumb_image("thumb_image"),
+ thumb_image_pressed("thumb_image_pressed"),
+ thumb_image_disabled("thumb_image_disabled"),
track_image("track_image"),
track_highlight_image("track_highlight_image"),
mouse_down_callback("mouse_down_callback"),
@@ -66,6 +68,8 @@ LLSlider::LLSlider(const LLSlider::Params& p)
mThumbOutlineColor(p.thumb_outline_color()),
mThumbCenterColor(p.thumb_center_color()),
mThumbImage(p.thumb_image),
+ mThumbImagePressed(p.thumb_image_pressed),
+ mThumbImageDisabled(p.thumb_image_disabled),
mTrackImage(p.track_image),
mTrackHighlightImage(p.track_highlight_image)
{
@@ -245,10 +249,6 @@ void LLSlider::draw()
// drawing solids requires texturing be disabled
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- F32 opacity = getEnabled() ? 1.f : 0.3f;
- LLColor4 center_color = (mThumbCenterColor.get() % opacity);
- LLColor4 track_color = (mTrackColor.get() % opacity);
-
// Track
LLRect track_rect(mThumbImage->getWidth() / 2,
getLocalRect().getCenterY() + (mTrackImage->getHeight() / 2),
@@ -259,18 +259,38 @@ void LLSlider::draw()
mTrackHighlightImage->draw(highlight_rect);
// Thumb
- if( hasMouseCapture() )
- {
- // Show ghost where thumb was before dragging began.
- mThumbImage->draw(mDragStartThumbRect, mThumbCenterColor.get() % 0.3f);
- }
if (hasFocus())
{
// Draw focus highlighting.
mThumbImage->drawBorder(mThumbRect, gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth());
}
- // Fill in the thumb.
- mThumbImage->draw(mThumbRect, hasMouseCapture() ? mThumbOutlineColor.get() : center_color);
+ if( hasMouseCapture() ) // currently clicking on slider
+ {
+ // Show ghost where thumb was before dragging began.
+ if (mThumbImage.notNull())
+ {
+ mThumbImage->draw(mDragStartThumbRect, mThumbCenterColor.get() % 0.3f);
+ }
+ if (mThumbImagePressed.notNull())
+ {
+ mThumbImagePressed->draw(mThumbRect, mThumbOutlineColor);
+ }
+ }
+ else if (!isInEnabledChain())
+ {
+ if (mThumbImageDisabled.notNull())
+ {
+ mThumbImageDisabled->draw(mThumbRect, mThumbCenterColor);
+ }
+ }
+ else
+ {
+ if (mThumbImage.notNull())
+ {
+ mThumbImage->draw(mThumbRect, mThumbCenterColor);
+ }
+ }
+
LLUICtrl::draw();
}
diff --git a/indra/llui/llslider.h b/indra/llui/llslider.h
index 088fd20d94..e2a94e4d8c 100644
--- a/indra/llui/llslider.h
+++ b/indra/llui/llslider.h
@@ -46,6 +46,8 @@ public:
thumb_center_color;
Optional<LLUIImage*> thumb_image,
+ thumb_image_pressed,
+ thumb_image_disabled,
track_image,
track_highlight_image;
@@ -85,9 +87,11 @@ private:
S32 mMouseOffset;
LLRect mDragStartThumbRect;
- LLUIImage* mThumbImage;
- LLUIImage* mTrackImage;
- LLUIImage* mTrackHighlightImage;
+ LLPointer<LLUIImage> mThumbImage;
+ LLPointer<LLUIImage> mThumbImagePressed;
+ LLPointer<LLUIImage> mThumbImageDisabled;
+ LLPointer<LLUIImage> mTrackImage;
+ LLPointer<LLUIImage> mTrackHighlightImage;
LLRect mThumbRect;
LLUIColor mTrackColor;
diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp
index 3dd8d21f6b..f9bcb685b8 100644
--- a/indra/llui/lltextbox.cpp
+++ b/indra/llui/lltextbox.cpp
@@ -32,12 +32,18 @@
#include "linden_common.h"
#include "lltextbox.h"
+#include "lllink.h"
#include "lluictrlfactory.h"
#include "llfocusmgr.h"
#include "llwindow.h"
static LLDefaultChildRegistry::Register<LLTextBox> r("text");
+//*NOTE
+// LLLink is not used in code for now, therefor Visual Studio doesn't build it.
+// "link" is registered here to force Visual Studio to build LLLink class.
+static LLDefaultChildRegistry::Register<LLLink> register_link("link");
+
LLTextBox::Params::Params()
: text_color("text_color"),
length("length"),
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 19d1d4040c..8aa7540446 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -47,7 +47,6 @@ LLUICtrl::Params::Params()
init_callback("init_callback"),
commit_callback("commit_callback"),
validate_callback("validate_callback"),
- rightclick_callback("rightclick_callback"),
mouseenter_callback("mouseenter_callback"),
mouseleave_callback("mouseleave_callback"),
control_name("control_name")
@@ -199,9 +198,6 @@ void LLUICtrl::initFromParams(const Params& p)
}
}
- if(p.rightclick_callback.isProvided())
- initCommitCallback(p.rightclick_callback, mRightClickSignal);
-
if(p.mouseenter_callback.isProvided())
initCommitCallback(p.mouseenter_callback, mMouseEnterSignal);
@@ -282,7 +278,24 @@ void LLUICtrl::onMouseLeave(S32 x, S32 y, MASK mask)
{
mMouseLeaveSignal(this, getValue());
}
-
+//virtual
+BOOL LLUICtrl::handleMouseDown(S32 x, S32 y, MASK mask){
+ BOOL handled = LLView::handleMouseDown(x,y,mask);
+ mMouseDownSignal(this,x,y,mask);
+ return handled;
+}
+//virtual
+BOOL LLUICtrl::handleMouseUp(S32 x, S32 y, MASK mask){
+ BOOL handled = LLView::handleMouseUp(x,y,mask);
+ mMouseUpSignal(this,x,y,mask);
+ return handled;
+}
+//virtual
+BOOL LLUICtrl::handleRightMouseUp(S32 x, S32 y, MASK mask){
+ BOOL handled = LLView::handleRightMouseUp(x,y,mask);
+ mRightClickSignal(this,x,y,mask);
+ return handled;
+}
void LLUICtrl::onCommit()
{
mCommitSignal(this, getValue());
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index cf6634f370..6ba3b01fcb 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -81,6 +81,8 @@ public:
typedef boost::function<void (LLUICtrl* ctrl, const LLSD& param)> commit_callback_t;
typedef boost::signals2::signal<void (LLUICtrl* ctrl, const LLSD& param)> commit_signal_t;
+ // *TODO: add xml support for this type of signal in the future
+ typedef boost::signals2::signal<void (LLUICtrl* ctrl, S32 x, S32 y, MASK mask)> mouse_signal_t;
typedef boost::function<bool (LLUICtrl* ctrl, const LLSD& param)> enable_callback_t;
typedef boost::signals2::signal<bool (LLUICtrl* ctrl, const LLSD& param), boost_boolean_combiner> enable_signal_t;
@@ -144,8 +146,6 @@ public:
commit_callback;
Optional<EnableCallbackParam> validate_callback;
- Optional<CommitCallbackParam> rightclick_callback;
-
Optional<CommitCallbackParam> mouseenter_callback;
Optional<CommitCallbackParam> mouseleave_callback;
@@ -186,6 +186,9 @@ public:
/*virtual*/ BOOL getTentative() const;
/*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask);
/*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask);
+ /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
// From LLFocusableElement
/*virtual*/ void setFocus( BOOL b );
@@ -253,6 +256,10 @@ public:
boost::signals2::connection setMouseEnterCallback( const commit_signal_t::slot_type& cb ) { return mMouseEnterSignal.connect(cb); }
boost::signals2::connection setMouseLeaveCallback( const commit_signal_t::slot_type& cb ) { return mMouseLeaveSignal.connect(cb); }
+ boost::signals2::connection setMouseDownCallback( const mouse_signal_t::slot_type& cb ) { return mMouseDownSignal.connect(cb); }
+ boost::signals2::connection setMouseUpCallback( const mouse_signal_t::slot_type& cb ) { return mMouseUpSignal.connect(cb); }
+ boost::signals2::connection setRightClickedCallback( const mouse_signal_t::slot_type& cb ) { return mRightClickSignal.connect(cb); }
+
// *TODO: Deprecate; for backwards compatability only:
boost::signals2::connection setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data);
boost::signals2::connection setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb );
@@ -279,11 +286,14 @@ protected:
commit_signal_t mCommitSignal;
enable_signal_t mValidateSignal;
- commit_signal_t mRightClickSignal;
commit_signal_t mMouseEnterSignal;
commit_signal_t mMouseLeaveSignal;
-
+
+ mouse_signal_t mMouseDownSignal;
+ mouse_signal_t mMouseUpSignal;
+ mouse_signal_t mRightClickSignal;
+
LLViewModelPtr mViewModel;
LLControlVariable* mControlVariable;
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 9dbe458bae..b82feb3f58 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -459,6 +459,14 @@ LLChildRegistry<DERIVED>::Register<T>::Register(const char* tag, LLWidgetCreator
{
const std::type_info* widget_type_infop = &typeid(T);
// associate parameter block type with template .xml file
+ std::string* existing_tag = LLWidgetNameRegistry ::instance().getValue(&typeid(typename T::Params));
+ if (existing_tag != NULL && *existing_tag != tag)
+ {
+ // duplicate entry for T::Params
+ // try creating empty param block in derived classes that inherit T::Params
+ int* crash = 0;
+ *crash = 0;
+ }
LLWidgetNameRegistry ::instance().defaultRegistrar().add(&typeid(typename T::Params), tag);
// associate widget type with factory function
LLDefaultWidgetRegistry::instance().defaultRegistrar().add(widget_type_infop, &LLUICtrlFactory::createDefaultWidget<T>);
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index d94472a8e5..e3b61dfaa2 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -75,6 +75,8 @@ S32 LLView::sLastBottomXML = S32_MIN;
BOOL LLView::sIsDrawing = FALSE;
#endif
+static LLDefaultChildRegistry::Register<LLView> r("view");
+
LLView::Params::Params()
: name("name", std::string("unnamed")),
enabled("enabled", true),
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 4a9a715b34..8451bc1223 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -135,7 +135,6 @@ set(viewer_SOURCE_FILES
llflexibleobject.cpp
llfloaterabout.cpp
llfloateractivespeakers.cpp
- llfloateraddlandmark.cpp
llfloateranimpreview.cpp
llfloaterauction.cpp
llfloateravatarpicker.cpp
@@ -162,7 +161,6 @@ set(viewer_SOURCE_FILES
llfloaterfonttest.cpp
llfloatergesture.cpp
llfloatergodtools.cpp
- llfloatergroupinfo.cpp
llfloatergroupinvite.cpp
llfloatergroups.cpp
llfloaterhandler.cpp
@@ -249,6 +247,7 @@ set(viewer_SOURCE_FILES
lllocaltextureobject.cpp
lllocationhistory.cpp
lllocationinputctrl.cpp
+ llurllineeditorctrl.cpp
lllogchat.cpp
llloginhandler.cpp
lllogininstance.cpp
@@ -280,11 +279,12 @@ set(viewer_SOURCE_FILES
llnotify.cpp
lloutputmonitorctrl.cpp
lloverlaybar.cpp
+ llpanelappearance.cpp
+ llpanelappearancetab.cpp
llpanelavatar.cpp
llpanelavatarrow.cpp
llpanelavatartag.cpp
llpanelclassified.cpp
- llsidetraypanelcontainer.cpp
llpanelcontents.cpp
llpaneldirbrowser.cpp
llpaneldirclassified.cpp
@@ -308,6 +308,8 @@ set(viewer_SOURCE_FILES
llpanellandmarks.cpp
llpanellandmedia.cpp
llpanellogin.cpp
+ llpanellookinfo.cpp
+ llpanellooks.cpp
llpanelmedia.cpp
llpanelmeprofile.cpp
llpanelmovetip.cpp
@@ -332,7 +334,6 @@ set(viewer_SOURCE_FILES
llpreviewanim.cpp
llpreview.cpp
llpreviewgesture.cpp
- llpreviewlandmark.cpp
llpreviewnotecard.cpp
llpreviewscript.cpp
llpreviewsound.cpp
@@ -346,6 +347,7 @@ set(viewer_SOURCE_FILES
llscreenchannel.cpp
llselectmgr.cpp
llsidetray.cpp
+ llsidetraypanelcontainer.cpp
llsky.cpp
llslurl.cpp
llspatialpartition.cpp
@@ -356,6 +358,8 @@ set(viewer_SOURCE_FILES
llstylemap.cpp
llsurface.cpp
llsurfacepatch.cpp
+ llsyswellitem.cpp
+ llsyswellwindow.cpp
llteleporthistory.cpp
lltexglobalcolor.cpp
lltexlayer.cpp
@@ -582,7 +586,6 @@ set(viewer_HEADER_FILES
llflexibleobject.h
llfloaterabout.h
llfloateractivespeakers.h
- llfloateraddlandmark.h
llfloateranimpreview.h
llfloaterauction.h
llfloateravatarpicker.h
@@ -609,7 +612,6 @@ set(viewer_HEADER_FILES
llfloaterfriends.h
llfloatergesture.h
llfloatergodtools.h
- llfloatergroupinfo.h
llfloatergroupinvite.h
llfloatergroups.h
llfloaterhandler.h
@@ -697,6 +699,7 @@ set(viewer_HEADER_FILES
lllocaltextureobject.h
lllocationhistory.h
lllocationinputctrl.h
+ llurllineeditorctrl.h
lllogchat.h
llloginhandler.h
lllogininstance.h
@@ -726,11 +729,12 @@ set(viewer_HEADER_FILES
llnotify.h
lloutputmonitorctrl.h
lloverlaybar.h
+ llpanelappearance.h
+ llpanelappearancetab.h
llpanelavatar.h
llpanelavatarrow.h
llpanelavatartag.h
llpanelclassified.h
- llsidetraypanelcontainer.h
llpanelcontents.h
llpaneldirbrowser.h
llpaneldirclassified.h
@@ -754,6 +758,8 @@ set(viewer_HEADER_FILES
llpanellandmarks.h
llpanellandmedia.h
llpanellogin.h
+ llpanellookinfo.h
+ llpanellooks.h
llpanelmedia.h
llpanelmeprofile.h
llpanelmovetip.h
@@ -778,7 +784,6 @@ set(viewer_HEADER_FILES
llpreview.h
llpreviewanim.h
llpreviewgesture.h
- llpreviewlandmark.h
llpreviewnotecard.h
llpreviewscript.h
llpreviewsound.h
@@ -794,6 +799,7 @@ set(viewer_HEADER_FILES
llsavedsettingsglue.h
llselectmgr.h
llsidetray.h
+ llsidetraypanelcontainer.h
llsky.h
llslurl.h
llspatialpartition.h
@@ -804,6 +810,8 @@ set(viewer_HEADER_FILES
llstylemap.h
llsurface.h
llsurfacepatch.h
+ llsyswellitem.h
+ llsyswellwindow.h
lltable.h
llteleporthistory.h
lltexglobalcolor.h
@@ -1324,9 +1332,27 @@ if (WINDOWS)
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
COMMENT "Copying staged dlls."
)
- endif(WINDOWS)
-
-
+
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config
+ COMMAND ${PYTHON_EXECUTABLE}
+ ARGS
+ ${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
+ ${CMAKE_CFG_INTDIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ ${VIEWER_BINARY_NAME}.exe.config
+ COMMENT "Creating app.config file"
+ )
+
+ add_custom_target(create_app_config_file ALL
+ DEPENDS
+ ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${VIEWER_BINARY_NAME}.exe.config
+ )
+
+ add_dependencies(${VIEWER_BINARY_NAME} create_app_config_file)
+
+ endif(WINDOWS)
if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts)
diff --git a/indra/newview/app_settings/foldertypes.xml b/indra/newview/app_settings/foldertypes.xml
index 4d4d479bdd..698158308e 100644
--- a/indra/newview/app_settings/foldertypes.xml
+++ b/indra/newview/app_settings/foldertypes.xml
@@ -9,50 +9,66 @@
asset_num="27"
xui_name="head"
icon_name="inv_folder_outfit_head.tga"
+ allowed="hair,eyes"
/>
<ensemble
asset_num="28"
xui_name="gloves"
icon_name="inv_folder_outfit_gloves.tga"
+ allowed="gloves"
/>
<ensemble
asset_num="29"
xui_name="jacket"
icon_name="inv_folder_outfit_jacket.tga"
+ allowed="jacket"
/>
<ensemble
asset_num="30"
xui_name="pants"
icon_name="inv_folder_outfit_pants.tga"
+ allowed="pants,underpants"
/>
<ensemble
asset_num="31"
xui_name="shape"
icon_name="inv_folder_outfit_shape.tga"
+ allowed="shape,skin,hair,eyes"
/>
<ensemble
asset_num="32"
xui_name="shoes"
icon_name="inv_folder_outfit_shoes.tga"
+ allowed="shoes,socks"
/>
<ensemble
asset_num="33"
xui_name="shirt"
icon_name="inv_folder_outfit_shirt.tga"
+ allowed="shirt,undershirt"
/>
<ensemble
asset_num="34"
xui_name="skirt"
icon_name="inv_folder_outfit_skirt.tga"
+ allowed=""
/>
<ensemble
asset_num="35"
xui_name="underpants"
icon_name="inv_folder_outfit_underpants.tga"
+ allowed="underpants"
/>
<ensemble
asset_num="36"
xui_name="undershirt"
icon_name="inv_folder_outfit_undershirt.tga"
+ allowed="undershirt"
+ />
+ <ensemble
+ asset_num="47"
+ xui_name="outfit"
+ icon_name="inv_folder_outfit.tga"
+ allowed="outfit"
/>
</ensemble_defs>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 1432365d38..702839869a 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1193,10 +1193,10 @@
<real>6.0</real>
</array>
</map>
- <key>CameraOffsetDefault</key>
+ <key>CameraOffsetRearView</key>
<map>
<key>Comment</key>
- <string>Default camera offset from avatar</string>
+ <string>Initial camera offset from avatar in Rear View</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -1208,6 +1208,36 @@
<real>0.75</real>
</array>
</map>
+ <key>CameraOffsetFrontView</key>
+ <map>
+ <key>Comment</key>
+ <string>Initial camera offset from avatar in Front View</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Vector3</string>
+ <key>Value</key>
+ <array>
+ <real>2.2</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ </array>
+ </map>
+ <key>CameraOffsetGroupView</key>
+ <map>
+ <key>Comment</key>
+ <string>Initial camera offset from avatar in Group View</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Vector3</string>
+ <key>Value</key>
+ <array>
+ <real>-1.0</real>
+ <real>0.7</real>
+ <real>0.5</real>
+ </array>
+ </map>
<key>CameraOffsetScale</key>
<map>
<key>Comment</key>
@@ -1245,6 +1275,17 @@
<key>Value</key>
<real>1.0</real>
</map>
+ <key>CameraPreset</key>
+ <map>
+ <key>Comment</key>
+ <string>Preset camera position - view (0 - rear, 1 - front, 2 - group)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>ChatBarStealsFocus</key>
<map>
<key>Comment</key>
@@ -3134,14 +3175,14 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>FocusOffsetDefault</key>
+ <key>FocusOffsetRearView</key>
<map>
<key>Comment</key>
- <string>Default focus point offset relative to avatar (x-axis is forward)</string>
+ <string>Initial focus point offset relative to avatar for the camera preset Rear View (x-axis is forward)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>Vector3</string>
+ <string>Vector3D</string>
<key>Value</key>
<array>
<real>1.0</real>
@@ -3149,6 +3190,36 @@
<real>1.0</real>
</array>
</map>
+ <key>FocusOffsetFrontView</key>
+ <map>
+ <key>Comment</key>
+ <string>Initial focus point offset relative to avatar for the camera preset Front View</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Vector3D</string>
+ <key>Value</key>
+ <array>
+ <real>0.0</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ </array>
+ </map>
+ <key>FocusOffsetGroupView</key>
+ <map>
+ <key>Comment</key>
+ <string>Initial focus point offset relative to avatar for the camera preset Group View</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Vector3D</string>
+ <key>Value</key>
+ <array>
+ <real>1.5</real>
+ <real>0.5</real>
+ <real>1.0</real>
+ </array>
+ </map>
<key>FocusPosOnLogout</key>
<map>
<key>Comment</key>
@@ -4593,7 +4664,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <integer>20</integer>
+ <integer>130</integer>
</map>
<key>NextOwnerCopy</key>
<map>
@@ -6838,8 +6909,30 @@
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
+ </map>
+ <key>ShowPGSearchAll</key>
+ <map>
+ <key>Comment</key>
+ <string>Show/Hide Navigation Bar Favorites Panel</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>ShowNavbarFavoritesPanel</key>
+ <map>
+ <key>Comment</key>
+ <string>Show/Hide Navigation Bar Navigation Panel</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
</map>
- <key>ShowPGSearchAll</key>
+ <key>ShowNavbarNavigationPanel</key>
<map>
<key>Comment</key>
<string>Display results of search All that are flagged as PG</string>
diff --git a/indra/newview/build_win32_appConfig.py b/indra/newview/build_win32_appConfig.py
new file mode 100644
index 0000000000..06312bea26
--- /dev/null
+++ b/indra/newview/build_win32_appConfig.py
@@ -0,0 +1,73 @@
+# @file build_win32_appConfig.py
+# @brief Create the windows app.config file to redirect crt linkage.
+#
+# $LicenseInfo:firstyear=2009&license=viewergpl$
+#
+# Copyright (c) 2009, Linden Research, Inc.
+#
+# Second Life Viewer Source Code
+# The source code in this file ("Source Code") is provided by Linden Lab
+# to you under the terms of the GNU General Public License, version 2.0
+# ("GPL"), unless you have obtained a separate licensing agreement
+# ("Other License"), formally executed by you and Linden Lab. Terms of
+# the GPL can be found in doc/GPL-license.txt in this distribution, or
+# online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+#
+# There are special exceptions to the terms and conditions of the GPL as
+# it is applied to this Source Code. View the full text of the exception
+# in the file doc/FLOSS-exception.txt in this software distribution, or
+# online at
+# http://secondlifegrid.net/programs/open_source/licensing/flossexception
+#
+# By copying, modifying or distributing this software, you acknowledge
+# that you have read and understood your obligations described above,
+# and agree to abide by those obligations.
+#
+# ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+# WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+# COMPLETENESS OR PERFORMANCE.
+# $/LicenseInfo$
+
+import sys, os
+from xml.dom.minidom import parse
+
+def munge_binding_redirect_version(src_manifest_name, src_config_name, dst_config_name):
+ manifest_dom = parse(src_manifest_name)
+ node = manifest_dom.getElementsByTagName('assemblyIdentity')[0]
+ manifest_assm_ver = node.getAttribute('version')
+
+ config_dom = parse(src_config_name)
+ node = config_dom.getElementsByTagName('bindingRedirect')[0]
+ node.setAttribute('newVersion', manifest_assm_ver)
+ node.setAttribute('oldVersion', node.getAttribute('oldVersion') + manifest_assm_ver)
+ comment = config_dom.createComment("This file is automatically generated by the build. see indra/newview/build_win32_appConfig.py")
+ config_dom.insertBefore(comment, config_dom.childNodes[0])
+
+ print "Writing: " + dst_config_name
+ f = open(dst_config_name, 'w')
+ config_dom.writexml(f)
+ f.close()
+
+
+
+def main():
+ config = sys.argv[1]
+ src_dir = sys.argv[2]
+ dst_dir = sys.argv[3]
+ dst_name = sys.argv[4]
+
+ if config.lower() == 'debug':
+ src_manifest_name = dst_dir + '/Microsoft.VC80.DebugCRT.manifest'
+ src_config_name = src_dir + '/SecondLifeDebug.exe.config'
+ else:
+ src_manifest_name = dst_dir + '/Microsoft.VC80.CRT.manifest'
+ src_config_name = src_dir + '/SecondLife.exe.config'
+
+ dst_config_name = dst_dir + '/' + dst_name
+
+ munge_binding_redirect_version(src_manifest_name, src_config_name, dst_config_name)
+
+ return 0
+
+if __name__ == "__main__":
+ main()
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index e3d3d66d87..366c337269 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -46,13 +46,15 @@
#include "llfloatercamera.h"
#include "llfloatercustomize.h"
#include "llfloaterdirectory.h"
-#include "llfloatergroupinfo.h"
+
#include "llfloaterland.h"
#include "llfloatermute.h"
#include "llfloatersnapshot.h"
#include "llfloatertools.h"
#include "llfloaterworldmap.h"
+#include "llgroupactions.h"
+
#include "llfocusmgr.h"
#include "llgroupmgr.h"
#include "llhomelocationresponder.h"
@@ -282,6 +284,8 @@ LLAgent::LLAgent() :
mLastCameraMode( CAMERA_MODE_THIRD_PERSON ),
mViewsPushed(FALSE),
+ mCameraPreset(CAMERA_PRESET_REAR_VIEW),
+
mCustomAnim(FALSE),
mShowAvatar(TRUE),
mCameraAnimating( FALSE ),
@@ -295,7 +299,6 @@ LLAgent::LLAgent() :
mCameraFocusOffset(),
mCameraFOVDefault(DEFAULT_FIELD_OF_VIEW),
- mCameraOffsetDefault(),
mCameraCollidePlane(),
mCurrentCameraDistance(2.f), // meters, set in init()
@@ -409,9 +412,19 @@ void LLAgent::init()
setFlying( gSavedSettings.getBOOL("FlyingAtExit") );
mCameraFocusOffsetTarget = LLVector4(gSavedSettings.getVector3("CameraOffsetBuild"));
- mCameraOffsetDefault = gSavedSettings.getVector3("CameraOffsetDefault");
+
+ mCameraPreset = (ECameraPreset) gSavedSettings.getU32("CameraPreset");
+
+ mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getVector3("CameraOffsetRearView");
+ mCameraOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getVector3("CameraOffsetFrontView");
+ mCameraOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getVector3("CameraOffsetGroupView");
+
+ mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getVector3d("FocusOffsetRearView");
+ mFocusOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getVector3d("FocusOffsetFrontView");
+ mFocusOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getVector3d("FocusOffsetGroupView");
+
mCameraCollidePlane.clearVec();
- mCurrentCameraDistance = mCameraOffsetDefault.magVec() * gSavedSettings.getF32("CameraOffsetScale");
+ mCurrentCameraDistance = getCameraOffsetInitial().magVec() * gSavedSettings.getF32("CameraOffsetScale");
mTargetCameraDistance = mCurrentCameraDistance;
mCameraZoomFraction = 1.f;
mTrackFocusObject = gSavedSettings.getBOOL("TrackFocusObject");
@@ -933,6 +946,20 @@ LLHost LLAgent::getRegionHost() const
//-----------------------------------------------------------------------------
std::string LLAgent::getSLURL() const
{
+ return buildSLURL(true);
+}
+
+//-----------------------------------------------------------------------------
+// getUnescapedSLURL()
+// returns empty() if getRegion() == NULL
+//-----------------------------------------------------------------------------
+std::string LLAgent::getUnescapedSLURL() const
+{
+ return buildSLURL(false);
+}
+
+std::string LLAgent::buildSLURL(const bool escape) const
+{
std::string slurl;
LLViewerRegion *regionp = getRegion();
if (regionp)
@@ -941,7 +968,10 @@ std::string LLAgent::getSLURL() const
S32 x = llround( (F32)fmod( agentPos.mdV[VX], (F64)REGION_WIDTH_METERS ) );
S32 y = llround( (F32)fmod( agentPos.mdV[VY], (F64)REGION_WIDTH_METERS ) );
S32 z = llround( (F32)agentPos.mdV[VZ] );
- slurl = LLSLURL::buildSLURL(regionp->getName(), x, y, z);
+ if (escape)
+ slurl = LLSLURL::buildSLURL(regionp->getName(), x, y, z);
+ else
+ slurl = LLSLURL::buildUnescapedSLURL(regionp->getName(), x, y, z);
}
return slurl;
}
@@ -1889,7 +1919,7 @@ void LLAgent::cameraOrbitIn(const F32 meters)
{
if (mFocusOnAvatar && mCameraMode == CAMERA_MODE_THIRD_PERSON)
{
- F32 camera_offset_dist = llmax(0.001f, mCameraOffsetDefault.magVec() * gSavedSettings.getF32("CameraOffsetScale"));
+ F32 camera_offset_dist = llmax(0.001f, getCameraOffsetInitial().magVec() * gSavedSettings.getF32("CameraOffsetScale"));
mCameraZoomFraction = (mTargetCameraDistance - meters) / camera_offset_dist;
@@ -3544,7 +3574,6 @@ LLVector3d LLAgent::calcThirdPersonFocusOffset()
{
// ...offset from avatar
LLVector3d focus_offset;
- focus_offset.setVec(gSavedSettings.getVector3("FocusOffsetDefault"));
LLQuaternion agent_rot = mFrameAgent.getQuaternion();
if (!mAvatarObject.isNull() && mAvatarObject->getParent())
@@ -3552,7 +3581,7 @@ LLVector3d LLAgent::calcThirdPersonFocusOffset()
agent_rot *= ((LLViewerObject*)(mAvatarObject->getParent()))->getRenderRotation();
}
- focus_offset = focus_offset * agent_rot;
+ focus_offset = mFocusOffsetInitial[mCameraPreset] * agent_rot;
return focus_offset;
}
@@ -3629,7 +3658,6 @@ LLVector3d LLAgent::calcCameraPositionTargetGlobal(BOOL *hit_limit)
LLVector3d frame_center_global = mAvatarObject.isNull() ? getPositionGlobal()
: getPosGlobalFromAgent(mAvatarObject->mRoot.getWorldPosition());
- LLVector3 upAxis = getUpAxis();
BOOL isConstrained = FALSE;
LLVector3d head_offset;
head_offset.setVec(mThirdPersonHeadOffset);
@@ -3692,7 +3720,7 @@ LLVector3d LLAgent::calcCameraPositionTargetGlobal(BOOL *hit_limit)
}
else
{
- local_camera_offset = mCameraZoomFraction * mCameraOffsetDefault * gSavedSettings.getF32("CameraOffsetScale");
+ local_camera_offset = mCameraZoomFraction * getCameraOffsetInitial() * gSavedSettings.getF32("CameraOffsetScale");
// are we sitting down?
if (mAvatarObject.notNull() && mAvatarObject->getParent())
@@ -3889,6 +3917,12 @@ LLVector3d LLAgent::calcCameraPositionTargetGlobal(BOOL *hit_limit)
}
+LLVector3 LLAgent::getCameraOffsetInitial()
+{
+ return mCameraOffsetInitial[mCameraPreset];
+}
+
+
//-----------------------------------------------------------------------------
// handleScrollWheel()
//-----------------------------------------------------------------------------
@@ -3923,10 +3957,12 @@ void LLAgent::handleScrollWheel(S32 clicks)
}
else if (mFocusOnAvatar && mCameraMode == CAMERA_MODE_THIRD_PERSON)
{
- F32 current_zoom_fraction = mTargetCameraDistance / (mCameraOffsetDefault.magVec() * gSavedSettings.getF32("CameraOffsetScale"));
+ F32 camera_offset_initial_mag = getCameraOffsetInitial().magVec();
+
+ F32 current_zoom_fraction = mTargetCameraDistance / (camera_offset_initial_mag * gSavedSettings.getF32("CameraOffsetScale"));
current_zoom_fraction *= 1.f - pow(ROOT_ROOT_TWO, clicks);
- cameraOrbitIn(current_zoom_fraction * mCameraOffsetDefault.magVec() * gSavedSettings.getF32("CameraOffsetScale"));
+ cameraOrbitIn(current_zoom_fraction * camera_offset_initial_mag * gSavedSettings.getF32("CameraOffsetScale"));
}
else
{
@@ -4299,6 +4335,20 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL camera_ani
}
+void LLAgent::switchCameraPreset(ECameraPreset preset)
+{
+ //zoom is supposed to be reset for the front and group views
+ mCameraZoomFraction = 1.f;
+
+ //focusing on avatar in that case means following him on movements
+ mFocusOnAvatar = TRUE;
+
+ mCameraPreset = preset;
+
+ gSavedSettings.setU32("CameraPreset", mCameraPreset);
+}
+
+
//
// Focus point management
//
@@ -5497,8 +5547,8 @@ BOOL LLAgent::downGrabbed() const
void update_group_floaters(const LLUUID& group_id)
{
- LLFloaterGroupInfo::refreshGroup(group_id);
-
+
+ LLGroupActions::refresh(group_id);
//*TODO Implement group update for Profile View
// still actual as of July 31, 2009 (DZ)
@@ -5546,7 +5596,7 @@ void LLAgent::processAgentDropGroup(LLMessageSystem *msg, void **)
LLGroupMgr::getInstance()->clearGroupData(group_id);
// close the floater for this group, if any.
- LLFloaterGroupInfo::closeGroup(group_id);
+ LLGroupActions::closeGroup(group_id);
// refresh the group panel of the search window, if necessary.
LLFloaterDirectory::refreshGroup(group_id);
}
@@ -5625,7 +5675,7 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode
LLGroupMgr::getInstance()->clearGroupData(group_id);
// close the floater for this group, if any.
- LLFloaterGroupInfo::closeGroup(group_id);
+ LLGroupActions::closeGroup(group_id);
// refresh the group panel of the search window,
//if necessary.
LLFloaterDirectory::refreshGroup(group_id);
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 35ebc41909..090f165576 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -75,6 +75,19 @@ enum ECameraMode
CAMERA_MODE_FOLLOW
};
+/** Camera Presets for CAMERA_MODE_THIRD_PERSON */
+enum ECameraPreset
+{
+ /** Default preset, what the Third Person Mode actually was */
+ CAMERA_PRESET_REAR_VIEW,
+
+ /** "Looking at the Avatar from the front" */
+ CAMERA_PRESET_FRONT_VIEW,
+
+ /** "Above and to the left, over the shoulder, pulled back a little on the zoom" */
+ CAMERA_PRESET_GROUP_VIEW
+};
+
enum EAnimRequest
{
ANIM_REQUEST_START,
@@ -265,10 +278,12 @@ public:
LLViewerRegion *getRegion() const;
LLHost getRegionHost() const;
std::string getSLURL() const;
+ std::string getUnescapedSLURL() const;
BOOL inPrelude();
BOOL buildLocationString(std::string& str, ELocationFormat fmt = LOCATION_FORMAT_LANDMARK); // Utility to build a location string
private:
LLViewerRegion *mRegionp;
+ std::string buildSLURL(const bool escape) const;
//--------------------------------------------------------------------
// History
@@ -661,6 +676,27 @@ private:
ECameraMode mLastCameraMode;
//--------------------------------------------------------------------
+ // Preset
+ //--------------------------------------------------------------------
+public:
+ void switchCameraPreset(ECameraPreset preset);
+
+private:
+
+ /** Determines default camera offset depending on the current camera preset */
+ LLVector3 getCameraOffsetInitial();
+
+ /** Camera preset in Third Person Mode */
+ ECameraPreset mCameraPreset;
+
+ /** Initial camera offsets */
+ std::map<ECameraPreset, LLVector3> mCameraOffsetInitial;
+
+ /** Initial focus offsets */
+ std::map<ECameraPreset, LLVector3d> mFocusOffsetInitial;
+
+
+ //--------------------------------------------------------------------
// Position
//--------------------------------------------------------------------
public:
@@ -678,7 +714,6 @@ private:
F32 mCameraFOVZoomFactor; // Amount of fov zoom applied to camera when zeroing in on an object
F32 mCameraCurrentFOVZoomFactor; // Interpolated fov zoom
F32 mCameraFOVDefault; // Default field of view that is basis for FOV zoom effect
- LLVector3 mCameraOffsetDefault; // Default third-person camera offset
LLVector4 mCameraCollidePlane; // Colliding plane for camera
F32 mCameraZoomFraction; // Mousewheel driven fraction of zoom
LLVector3 mCameraPositionAgent; // Camera position in agent coordinates
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 22875cbca2..4834b31bc7 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -37,6 +37,7 @@
#include "llfloatercustomize.h"
#include "llfloaterinventory.h"
+#include "llinventorybridge.h"
#include "llinventorymodel.h"
#include "llnotify.h"
#include "llviewerregion.h"
@@ -46,6 +47,9 @@
#include <boost/scoped_ptr.hpp>
+// For viewer2.0 internal demo, don't use current outfit folder contents at all during initial startup. Will reenable
+// this once we're sure this works completely.
+// #define USE_CURRENT_OUTFIT_FOLDER
LLAgentWearables gAgentWearables;
@@ -662,13 +666,6 @@ BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id, BOOL include_linked_
return FALSE;
}
-struct InitialWearableData
-{
- S32 mType;
- U32 mIndex;
- LLUUID mItemID;
-};
-
// MULTI-WEARABLE: update for multiple
// static
void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data)
@@ -696,14 +693,18 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
return;
}
+ // Get the UUID of the current outfit folder (will be created if it doesn't exist)
+ LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT);
+
+ LLOutfitFolderFetch* outfit = new LLOutfitFolderFetch();
+
//lldebugs << "processAgentInitialWearablesUpdate()" << llendl;
// Add wearables
- LLUUID asset_id_array[WT_COUNT];
- LLUUID item_id_array[WT_COUNT];
// MULTI-WEARABLE: TODO: update once messages change. Currently use results to populate the zeroth element.
gAgentWearables.mItemsAwaitingWearableUpdate.clear();
for (S32 i=0; i < num_wearables; i++)
{
+ // Parse initial werables data from message system
U8 type_u8 = 0;
gMessageSystem->getU8Fast(_PREHASH_WearableData, _PREHASH_WearableType, type_u8, i);
if (type_u8 >= WT_COUNT)
@@ -711,10 +712,10 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
continue;
}
const EWearableType type = (EWearableType) type_u8;
-
+
LLUUID item_id;
gMessageSystem->getUUIDFast(_PREHASH_WearableData, _PREHASH_ItemID, item_id, i);
-
+
LLUUID asset_id;
gMessageSystem->getUUIDFast(_PREHASH_WearableData, _PREHASH_AssetID, asset_id, i);
if (asset_id.isNull())
@@ -728,34 +729,77 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
{
continue;
}
-
- // MULTI-WEARABLE: extend arrays to index by type + index.
- gAgentWearables.mItemsAwaitingWearableUpdate.insert(item_id);
- item_id_array[type] = item_id;
- asset_id_array[type] = asset_id;
+
+ // MULTI-WEARABLE: TODO: update once messages change. Currently use results to populate the zeroth element.
+
+ // Store initial wearables data until we know whether we have the current outfit folder or need to use the data.
+ InitialWearableData * temp_wearable_data = new InitialWearableData(type, 0, item_id, asset_id); // MULTI-WEARABLE: update
+ outfit->mAgentInitialWearables.push_back(temp_wearable_data);
+
}
lldebugs << " " << LLWearableDictionary::getTypeLabel(type) << llendl;
}
+
+ // What we do here is get the complete information on the items in
+ // the inventory, and set up an observer that will wait for that to
+ // happen.
+ LLInventoryFetchDescendentsObserver::folder_ref_t folders;
+ folders.push_back(current_outfit_id);
+ outfit->fetchDescendents(folders);
+ if(outfit->isEverythingComplete())
+ {
+ // everything is already here - call done.
+ outfit->done();
+ }
+ else
+ {
+ // it's all on it's way - add an observer, and the inventory
+ // will call done for us when everything is here.
+ gInventory.addObserver(outfit);
+ }
+ }
+}
- // now that we have the asset ids...request the wearable assets
- for (S32 i = 0; i < WT_COUNT; i++)
+// static
+void LLAgentWearables::fetchInitialWearables(initial_wearable_data_vec_t & current_outfit_links, initial_wearable_data_vec_t & message_wearables)
+{
+#ifdef USE_CURRENT_OUTFIT_FOLDER
+ if (!current_outfit_links.empty())
+ {
+ for (U8 i = 0; i < current_outfit_links.size(); ++i)
{
- // MULTI-WEARABLE: TODO: update once messages change.
- // Currently use results to populate the zeroth element.
- if (!item_id_array[i].isNull())
- {
- InitialWearableData *wear_data = new InitialWearableData;
- wear_data->mType = i;
- wear_data->mIndex = 0; // MULTI-WEARABLE: update
- wear_data->mItemID = item_id_array[i];
- LLWearableList::instance().getAsset(asset_id_array[i],
- LLStringUtil::null,
- LLWearableDictionary::getAssetType((EWearableType) i),
- onInitialWearableAssetArrived, (void*)wear_data);
- }
+ // Fetch the wearables in the current outfit folder
+ LLWearableList::instance().getAsset(current_outfit_links[i]->mAssetID,
+ LLStringUtil::null,
+ LLWearableDictionary::getAssetType(current_outfit_links[i]->mType),
+ onInitialWearableAssetArrived, (void*)(current_outfit_links[i]));
+ }
+ }
+ else
+#endif
+ if (!message_wearables.empty()) // We have an empty current outfit folder, use the message data instead.
+ {
+ LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT);
+ for (U8 i = 0; i < message_wearables.size(); ++i)
+ {
+ // Populate the current outfit folder with links to the wearables passed in the message
+#ifdef USE_CURRENT_OUTFIT_FOLDER
+ std::string link_name = "WearableLink";
+ link_inventory_item(gAgent.getID(), message_wearables[i]->mItemID, current_outfit_id, link_name,
+ LLAssetType::AT_LINK, LLPointer<LLInventoryCallback>(NULL));
+#endif
+ // Fetch the wearables
+ LLWearableList::instance().getAsset(message_wearables[i]->mAssetID,
+ LLStringUtil::null,
+ LLWearableDictionary::getAssetType(message_wearables[i]->mType),
+ onInitialWearableAssetArrived, (void*)(message_wearables[i]));
}
}
+ else
+ {
+ LL_WARNS("Wearables") << "No current outfit folder iterms found and no initial wearables fallback message received." << LL_ENDL;
+ }
}
// A single wearable that the avatar was wearing on start-up has arrived from the database.
@@ -763,7 +807,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void* userdata)
{
boost::scoped_ptr<InitialWearableData> wear_data((InitialWearableData*)userdata);
- const EWearableType type = (EWearableType)wear_data->mType;
+ const EWearableType type = wear_data->mType;
const U32 index = wear_data->mIndex;
LLVOAvatarSelf* avatar = gAgent.getAvatarObject();
@@ -775,10 +819,11 @@ void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void*
if (wearable)
{
llassert(type == wearable->getType());
+ // MULTI-WEARABLE: is this always zeroth element? Change sometime.
wearable->setItemID(wear_data->mItemID);
- gAgentWearables.setWearable(type,index,wearable);
+ gAgentWearables.setWearable(type, index, wearable);
gAgentWearables.mItemsAwaitingWearableUpdate.erase(wear_data->mItemID);
-
+
// disable composites if initial textures are baked
avatar->setupComposites();
@@ -954,6 +999,8 @@ void LLAgentWearables::createStandardWearablesAllDone()
mAvatarObject->onFirstTEMessageReceived();
}
+// Note: wearables_to_include should be a list of EWearableType types
+// attachments_to_include should be a list of attachment points
void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name,
const LLDynamicArray<S32>& wearables_to_include,
const LLDynamicArray<S32>& attachments_to_include,
@@ -1087,6 +1134,97 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name,
}
}
+// Note: wearables_to_include should be a list of EWearableType types
+// attachments_to_include should be a list of attachment points
+void LLAgentWearables::makeNewOutfitLinks(const std::string& new_folder_name,
+ const LLDynamicArray<S32>& wearables_to_include,
+ const LLDynamicArray<S32>& attachments_to_include,
+ BOOL rename_clothing)
+{
+ if (mAvatarObject.isNull())
+ {
+ return;
+ }
+
+ // First, make a folder in the Clothes directory.
+ LLUUID folder_id = gInventory.createNewCategory(
+ gInventory.findCategoryUUIDForType(LLAssetType::AT_MY_OUTFITS),
+ LLAssetType::AT_OUTFIT,
+ new_folder_name);
+
+// bool found_first_item = false;
+
+ ///////////////////
+ // Wearables
+
+ if (wearables_to_include.count())
+ {
+ // Then, iterate though each of the wearables and save links to them in the folder.
+ S32 i;
+ S32 count = wearables_to_include.count();
+ LLDynamicArray<LLUUID> delete_items;
+ LLPointer<LLRefCount> cbdone = NULL;
+ for (i = 0; i < count; ++i)
+ {
+ const S32 type = wearables_to_include[i];
+ for (U32 j=0; j<getWearableCount((EWearableType)i); j++)
+ {
+ LLWearable* old_wearable = getWearable((EWearableType)type,j);
+ if (old_wearable)
+ {
+ std::string new_name;
+ if (rename_clothing)
+ {
+ new_name = new_folder_name;
+ new_name.append(" ");
+ new_name.append(old_wearable->getTypeLabel());
+ LLStringUtil::truncate(new_name, DB_INV_ITEM_NAME_STR_LEN);
+ }
+
+ LLViewerInventoryItem* item = gInventory.getItem(getWearableItemID((EWearableType) type, j));
+ if (!item) continue;
+ LLPointer<LLInventoryCallback> cb = NULL;
+ link_inventory_item(gAgent.getID(),
+ item->getUUID(),
+ folder_id,
+ new_name,
+ LLAssetType::AT_LINK,
+ cb);
+ }
+ }
+ }
+ gInventory.notifyObservers();
+ }
+
+
+ ///////////////////
+ // Attachments
+
+ if (attachments_to_include.count())
+ {
+ for (S32 i = 0; i < attachments_to_include.count(); i++)
+ {
+ S32 attachment_pt = attachments_to_include[i];
+ LLViewerJointAttachment* attachment = get_if_there(mAvatarObject->mAttachmentPoints, attachment_pt, (LLViewerJointAttachment*)NULL);
+ if (!attachment) continue;
+ LLViewerObject* attached_object = attachment->getObject();
+ if (!attached_object) continue;
+ const LLUUID& item_id = attachment->getItemID();
+ if (item_id.isNull()) continue;
+ LLInventoryItem* item = gInventory.getItem(item_id);
+ if (!item) continue;
+
+ LLPointer<LLInventoryCallback> cb = NULL;
+ link_inventory_item(gAgent.getID(),
+ item->getUUID(),
+ folder_id,
+ item->getName(),
+ LLAssetType::AT_LINK,
+ cb);
+ }
+ }
+}
+
void LLAgentWearables::makeNewOutfitDone(S32 type, U32 index)
{
LLUUID first_item_id = getWearableItemID((EWearableType)type, index);
@@ -1635,3 +1773,56 @@ void LLAgentWearables::updateServer()
sendAgentWearablesUpdate();
gAgent.sendAgentSetAppearance();
}
+
+void LLAgentWearables::LLOutfitFolderFetch::done()
+{
+ // What we do here is get the complete information on the items in
+ // the library, and set up an observer that will wait for that to
+ // happen.
+ LLInventoryModel::cat_array_t cat_array;
+ LLInventoryModel::item_array_t item_array;
+ gInventory.collectDescendents(mCompleteFolders.front(),
+ cat_array,
+ item_array,
+ LLInventoryModel::EXCLUDE_TRASH);
+ S32 count = item_array.count();
+ LLAgentWearables::initial_wearable_data_vec_t current_outfit_links;
+ current_outfit_links.reserve(count);
+
+ for(S32 i = 0; i < count; ++i)
+ {
+ // A bit of a hack since wearables database doesn't contain asset types...
+ // Perform indirection in case this assetID is in fact a link. This only works
+ // because of the assumption that all assetIDs and itemIDs are unique (i.e.
+ // no assetID is also used as an itemID elsewhere); therefore if the assetID
+ // exists as an itemID in the user's inventory, then this must be a link.
+ const LLInventoryItem *linked_item = gInventory.getItem(item_array.get(i)->getUUID());
+ LLAssetType::EType asset_type = (LLAssetType::EType) 0;
+ if (linked_item)
+ {
+ asset_type = linked_item->getType();
+ LLInventoryItem * base_item = gInventory.getItem(linked_item->getLinkedUUID());
+ if (base_item)
+ {
+ EWearableType type = (EWearableType) (base_item->getFlags() & LLInventoryItem::II_FLAGS_WEARABLES_MASK);
+ // MULTI-WEARABLE: update
+ InitialWearableData * temp_wearable_data = new InitialWearableData(type, 0, linked_item->getLinkedUUID(), base_item->getAssetUUID());
+ current_outfit_links.push_back(temp_wearable_data);
+ }
+ else
+ {
+ llwarns << "Null base_item in LLOutfitFolderFetch::done, linkedUUID is " << linked_item->getLinkedUUID().asString() << llendl;
+ }
+ }
+ else
+ {
+ llwarns << "Null linked_item in LLOutfitFolderFetch::done, UUID is " << item_array.get(i)->getUUID().asString() << llendl;
+ }
+ }
+
+ gInventory.removeObserver(this);
+ LLAgentWearables::fetchInitialWearables(current_outfit_links, mAgentInitialWearables);
+ mAgentInitialWearables.clear();
+ delete this;
+}
+
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 977efd71b4..971fd9ee37 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -36,15 +36,34 @@
#include "llmemory.h"
#include "lluuid.h"
#include "llinventory.h"
+#include "llinventorymodel.h"
#include "llviewerinventory.h"
+#include "llvoavatardefines.h"
class LLInventoryItem;
class LLVOAvatarSelf;
class LLWearable;
+// Forward Declaration
+class LLInventoryFetchDescendentsObserver;
+
class LLAgentWearables
{
//--------------------------------------------------------------------
+ // Data Types
+ //--------------------------------------------------------------------
+ typedef struct _InitialWearableData
+ {
+ EWearableType mType;
+ U32 mIndex;
+ LLUUID mItemID;
+ LLUUID mAssetID;
+ _InitialWearableData(EWearableType type, U32 index, LLUUID itemID, LLUUID assetID) :
+ mType(type), mIndex(index), mItemID(itemID), mAssetID(assetID) { }
+ } InitialWearableData;
+ typedef std::vector<InitialWearableData *> initial_wearable_data_vec_t;
+
+ //--------------------------------------------------------------------
// Constructors / destructors / Initializers
//--------------------------------------------------------------------
public:
@@ -85,13 +104,14 @@ public:
U32 getWearableCount(const EWearableType type) const;
+ //--------------------------------------------------------------------
+ // Setters
+ //--------------------------------------------------------------------
+
private:
// Low-level data structure setter - public access is via setWearableItem, etc.
void setWearable(const EWearableType type, U32 index, LLWearable *wearable);
- //--------------------------------------------------------------------
- // Setters
- //--------------------------------------------------------------------
public:
void setWearableItem(LLInventoryItem* new_item, LLWearable* wearable, bool do_append = false);
void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLWearable* >& wearables, BOOL remove);
@@ -127,7 +147,9 @@ protected:
// Server Communication
//--------------------------------------------------------------------
public:
+ // Processes the initial wearables update message (if necessary, since the outfit folder makes it redundant)
static void processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data);
+ static void fetchInitialWearables(initial_wearable_data_vec_t & current_outfit_links, initial_wearable_data_vec_t & message_wearables);
protected:
void sendAgentWearablesUpdate();
void sendAgentWearablesRequest();
@@ -139,10 +161,19 @@ protected:
// Outfits
//--------------------------------------------------------------------
public:
+ // Note: wearables_to_include should be a list of EWearableType types
+ // attachments_to_include should be a list of attachment points
void makeNewOutfit(const std::string& new_folder_name,
const LLDynamicArray<S32>& wearables_to_include,
const LLDynamicArray<S32>& attachments_to_include,
- BOOL rename_clothing);protected:
+ BOOL rename_clothing);
+
+ // Note: wearables_to_include should be a list of EWearableType types
+ // attachments_to_include should be a list of attachment points
+ void makeNewOutfitLinks(const std::string& new_folder_name,
+ const LLDynamicArray<S32>& wearables_to_include,
+ const LLDynamicArray<S32>& attachments_to_include,
+ BOOL rename_clothing);
private:
void makeNewOutfitDone(S32 type, U32 index);
@@ -223,6 +254,17 @@ private:
U32 mTodo;
LLPointer<LLRefCount> mCB;
};
+
+ // Outfit folder fetching callback structure.
+ class LLOutfitFolderFetch : public LLInventoryFetchDescendentsObserver
+ {
+ public:
+ LLOutfitFolderFetch() {}
+ ~LLOutfitFolderFetch() {}
+ virtual void done();
+
+ LLAgentWearables::initial_wearable_data_vec_t mAgentInitialWearables;
+ };
}; // LLAgentWearables
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 281d73b18b..4e289efd1b 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -48,6 +48,7 @@
#include "llviewermessage.h" // for handle_lure
#include "llviewerregion.h"
+
// static
void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name)
{
@@ -79,6 +80,19 @@ void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::strin
}
// static
+void LLAvatarActions::requestFriendshipDialog(const LLUUID& id)
+{
+ if(id.isNull())
+ {
+ return;
+ }
+
+ std::string full_name;
+ gCacheName->getFullName(id, full_name);
+ requestFriendshipDialog(id, full_name);
+}
+
+// static
void LLAvatarActions::removeFriendDialog(const LLUUID& id)
{
if (id.isNull())
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
index 73325d21f1..f3c411e033 100644
--- a/indra/newview/llavataractions.h
+++ b/indra/newview/llavataractions.h
@@ -45,6 +45,11 @@ public:
static void requestFriendshipDialog(const LLUUID& id, const std::string& name);
/**
+ * Show a dialog explaining what friendship entails, then request friendship.
+ */
+ static void requestFriendshipDialog(const LLUUID& id);
+
+ /**
* Show a friend removal dialog.
*/
static void removeFriendDialog(const LLUUID& id);
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 40dd20dfa4..a85f8710c7 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -117,24 +117,6 @@ void LLAvatarList::draw()
}
}
-//virtual
-BOOL LLAvatarList::handleMouseDown(S32 x, S32 y, MASK mask)
-{
- LLScrollListItem* hit_item = hitItem(x, y);
- if (NULL == hit_item)
- {
- std::vector<LLScrollListItem*> selectedItems = getAllSelected();
- std::vector<LLScrollListItem*>::const_iterator it = selectedItems.begin();
-
- for (; it != selectedItems.end(); ++it)
- {
- (*it)->setSelected(FALSE);
- }
- return TRUE;
- }
- return LLScrollListCtrl::handleMouseDown(x, y, mask);
-}
-
std::vector<LLUUID> LLAvatarList::getSelectedIDs()
{
LLUUID selected_id;
diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h
index 991e9fa145..8b419dbb57 100644
--- a/indra/newview/llavatarlist.h
+++ b/indra/newview/llavatarlist.h
@@ -59,14 +59,6 @@ public:
virtual ~LLAvatarList() {}
/*virtual*/ void draw();
- /**
- * Overrides base-class behavior of Mouse Down Event.
- *
- * LLScrollListCtrl::handleMouseDown version calls setFocus which select the first item if nothing selected.
- * We need to deselect all items if perform click not over the any item. Otherwise calls base method.
- * See EXT-246
- */
- /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
BOOL update(const std::vector<LLUUID>& all_buddies,
const std::string& name_filter = LLStringUtil::null);
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 9eb8369c4c..bfb2d26870 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -1,34 +1,34 @@
/**
-* @file llbottomtray.cpp
-* @brief LLBottomTray class implementation
-*
-* $LicenseInfo:firstyear=2009&license=viewergpl$
-*
-* Copyright (c) 2009, Linden Research, Inc.
-*
-* Second Life Viewer Source Code
-* The source code in this file ("Source Code") is provided by Linden Lab
-* to you under the terms of the GNU General Public License, version 2.0
-* ("GPL"), unless you have obtained a separate licensing agreement
-* ("Other License"), formally executed by you and Linden Lab. Terms of
-* the GPL can be found in doc/GPL-license.txt in this distribution, or
-* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
-*
-* There are special exceptions to the terms and conditions of the GPL as
-* it is applied to this Source Code. View the full text of the exception
-* in the file doc/FLOSS-exception.txt in this software distribution, or
-* online at
-* http://secondlifegrid.net/programs/open_source/licensing/flossexception
-*
-* By copying, modifying or distributing this software, you acknowledge
-* that you have read and understood your obligations described above,
-* and agree to abide by those obligations.
-*
-* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
-* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
-* COMPLETENESS OR PERFORMANCE.
-* $/LicenseInfo$
-*/
+ * @file llbottomtray.cpp
+ * @brief LLBottomTray class implementation
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
#include "llviewerprecompiledheaders.h" // must be first include
#include "llbottomtray.h"
@@ -37,6 +37,7 @@
#include "llchiclet.h"
#include "llfloaterreg.h"
#include "llflyoutbutton.h"
+#include "lllayoutstack.h"
#include "llnearbychatbar.h"
#include "llsplitbutton.h"
#include "llfloatercamera.h"
@@ -47,20 +48,23 @@ LLBottomTray::LLBottomTray(const LLSD&)
mIMWell(NULL),
mSysWell(NULL),
mTalkBtn(NULL),
- mNearbyChatBar(NULL)
+ mNearbyChatBar(NULL),
+ mToolbarStack(NULL)
+
{
mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
LLUICtrlFactory::getInstance()->buildPanel(this,"panel_bottomtray.xml");
- mChicletPanel = getChild<LLChicletPanel>("chiclet_list",TRUE,FALSE);
- mIMWell = getChild<LLNotificationChiclet>("im_well",TRUE,FALSE);
- mSysWell = getChild<LLNotificationChiclet>("sys_well",TRUE,FALSE);
+ mChicletPanel = getChild<LLChicletPanel>("chiclet_list");
+ mIMWell = getChild<LLNotificationChiclet>("im_well");
+ mSysWell = getChild<LLNotificationChiclet>("sys_well");
+ mSysWell->setNotificationChicletWindow(LLFloaterReg::getInstance("syswell_window"));
mChicletPanel->setChicletClickedCallback(boost::bind(&LLBottomTray::onChicletClick,this,_1));
- LLSplitButton* presets = getChild<LLSplitButton>("presets", TRUE, FALSE);
- if (presets) presets->setSelectionCallback(LLFloaterCamera::onClickCameraPresets);
+ LLSplitButton* presets = getChild<LLSplitButton>("presets");
+ presets->setSelectionCallback(LLFloaterCamera::onClickCameraPresets);
LLIMMgr::getInstance()->addSessionObserver(this);
@@ -75,9 +79,10 @@ LLBottomTray::LLBottomTray(const LLSD&)
BOOL LLBottomTray::postBuild()
{
- mNearbyChatBar = getChild<LLNearbyChatBar>("chat_bar");
+ mNearbyChatBar = getChild<LLNearbyChatBar>("chat_bar");
+ mToolbarStack = getChild<LLLayoutStack>("toolbar_stack");
- return TRUE;
+ return TRUE;
}
LLBottomTray::~LLBottomTray()
@@ -152,13 +157,14 @@ void LLBottomTray::setVisible(BOOL visible)
{
LLPanel::setVisible(visible);
- LLView* stack = getChild<LLView>("toolbar_stack",TRUE,FALSE);
-
- if (stack)
+ // *NOTE: we must check mToolbarStack against NULL because sewtVisible is called from the
+ // LLPanel::initFromParams BEFORE postBuild is called and child controls are not exist yet
+ if (NULL != mToolbarStack)
{
BOOL visibility = gAgent.cameraMouselook() ? false : true;
- for ( child_list_const_iter_t child_it = stack->getChildList()->begin(); child_it != stack->getChildList()->end(); child_it++)
+ for ( child_list_const_iter_t child_it = mToolbarStack->getChildList()->begin();
+ child_it != mToolbarStack->getChildList()->end(); child_it++)
{
LLView* viewp = *child_it;
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index ffb0f9ae4f..fec533f9f3 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -38,6 +38,7 @@
class LLChicletPanel;
class LLLineEditor;
+class LLLayoutStack;
class LLNotificationChiclet;
class LLTalkButton;
class LLNearbyChatBar;
@@ -80,6 +81,8 @@ protected:
LLNotificationChiclet* mSysWell;
LLTalkButton* mTalkBtn;
LLNearbyChatBar* mNearbyChatBar;
+ LLLayoutStack* mToolbarStack;
+
};
#endif // LL_LLBOTTOMPANEL_H
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index 118385ab58..91945038aa 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -58,15 +58,14 @@ LLChannelManager::~LLChannelManager()
//--------------------------------------------------------------------------
void LLChannelManager::onLoginCompleted()
{
- S32 hidden_notifications = 0;
+ S32 away_notifications = 0;
for(std::vector<ChannelElem>::iterator it = mChannelList.begin(); it != mChannelList.end(); ++it)
{
- //(*it).channel->showToasts();
- hidden_notifications +=(*it).channel->getNumberOfHiddenToasts();
+ away_notifications +=(*it).channel->getNumberOfHiddenToasts();
}
- if(!hidden_notifications)
+ if(!away_notifications)
{
LLScreenChannel::setStartUpToastShown();
return;
@@ -81,15 +80,19 @@ void LLChannelManager::onLoginCompleted()
if(!mStartUpChannel)
return;
- static_cast<LLUICtrl*>(mStartUpChannel)->setCommitCallback(boost::bind(&LLChannelManager::enableShowToasts, this));
- mStartUpChannel->setNumberOfHiddenToasts(hidden_notifications);
- mStartUpChannel->createOverflowToast(gSavedSettings.getS32("ChannelBottomPanelMargin"), gSavedSettings.getS32("StartUpToastTime"));
+ static_cast<LLUICtrl*>(mStartUpChannel)->setCommitCallback(boost::bind(&LLChannelManager::removeStartUpChannel, this));
+ mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("ChannelBottomPanelMargin"), gSavedSettings.getS32("StartUpToastTime"));
}
//--------------------------------------------------------------------------
-void LLChannelManager::enableShowToasts()
+void LLChannelManager::removeStartUpChannel()
{
- LLScreenChannel::setStartUpToastShown();
+ if(!mStartUpChannel)
+ return;
+
+ mStartUpChannel->setVisible(FALSE);
+ mStartUpChannel->closeStartUpToast();
+ getRootView()->removeChild(mStartUpChannel);
delete mStartUpChannel;
mStartUpChannel = NULL;
}
diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h
index ac8e81d7ef..6adc79713a 100644
--- a/indra/newview/llchannelmanager.h
+++ b/indra/newview/llchannelmanager.h
@@ -102,7 +102,7 @@ public:
// On LoginCompleted - show StartUp toast
void onLoginCompleted();
- void enableShowToasts();
+ void removeStartUpChannel();
//TODO: make protected? in order to be shure that channels are created only by notification handlers
LLScreenChannel* createChannel(LLChannelManager::Params& p);
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index 46a2179e8d..7a118deb8a 100644
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -122,6 +122,8 @@ BOOL LLChatBar::postBuild()
{
getChild<LLUICtrl>("Say")->setCommitCallback(boost::bind(&LLChatBar::onClickSay, this, _1));
+ // * NOTE: mantipov: getChild with default parameters returns dummy widget.
+ // Seems this class will be completle removed
// attempt to bind to an existing combo box named gesture
setGestureCombo(getChild<LLComboBox>( "Gesture", TRUE, FALSE));
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 2b455485ca..a63477a442 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -82,8 +82,10 @@ void LLChatItemCtrl::reshape (S32 width, S32 height, BOOL called_from_parent )
{
LLPanel::reshape(width, height,called_from_parent);
- LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
- LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text",false,false);
+ // *NOTE: we must check if child items exist because reshape is called from the
+ // LLView::initFromParams BEFORE postBuild is called and child controls are not exist yet
+ LLPanel* caption = findChild<LLPanel>("msg_caption", false);
+ LLChatMsgBox* msg_text = findChild<LLChatMsgBox>("msg_text" ,false);
if(caption && msg_text)
{
LLRect caption_rect = caption->getRect();
@@ -125,17 +127,14 @@ std::string LLChatItemCtrl::appendTime()
void LLChatItemCtrl::addText (const std::string& message)
{
- LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text",false,false);
- if(msg_text)
- msg_text->addText(message);
+ LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text", false);
+ msg_text->addText(message);
mMessages.push_back(message);
}
void LLChatItemCtrl::setMessage (const LLChat& msg)
{
- LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
- if(!caption)
- return;
+ LLPanel* caption = getChild<LLPanel>("msg_caption", false);
std::string str_sender;
@@ -145,20 +144,19 @@ void LLChatItemCtrl::setMessage (const LLChat& msg)
else
str_sender = LLTrans::getString("You");;
- caption->getChild<LLTextBox>("sender_name",false,false)->setText(str_sender);
+ caption->getChild<LLTextBox>("sender_name", false)->setText(str_sender);
std::string tt = appendTime();
- caption->getChild<LLTextBox>("msg_time",false,false)->setText(tt);
+ caption->getChild<LLTextBox>("msg_time", false)->setText(tt);
- caption->getChild<LLAvatarIconCtrl>("avatar_icon",false,false)->setValue(msg.mFromID);
+ caption->getChild<LLAvatarIconCtrl>("avatar_icon", false)->setValue(msg.mFromID);
mOriginalMessage = msg;
- LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text",false,false);
- if(msg_text)
- msg_text->setText(msg.mText);
+ LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text", false);
+ msg_text->setText(msg.mText);
LLUICtrl* msg_inspector = caption->getChild<LLUICtrl>("msg_inspector");
if(mOriginalMessage.mSourceType != CHAT_SOURCE_AGENT)
@@ -170,17 +168,13 @@ void LLChatItemCtrl::setMessage (const LLChat& msg)
void LLChatItemCtrl::snapToMessageHeight ()
{
- LLChatMsgBox* text_box = getChild<LLChatMsgBox>("msg_text",false,false);
- if(!text_box)
- return;///actually assert fits better
+ LLChatMsgBox* text_box = getChild<LLChatMsgBox>("msg_text", false);
S32 new_height = text_box->getTextPixelHeight();
LLRect panel_rect = getRect();
S32 caption_height = 0;
- LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
- if(caption)
- caption_height = caption->getRect().getHeight();
-
+ LLPanel* caption = getChild<LLPanel>("msg_caption", false);
+ caption_height = caption->getRect().getHeight();
panel_rect.setLeftTopAndSize( panel_rect.mLeft, panel_rect.mTop, panel_rect.getWidth() , caption_height + new_height);
@@ -193,14 +187,11 @@ void LLChatItemCtrl::snapToMessageHeight ()
void LLChatItemCtrl::setWidth(S32 width)
{
- LLChatMsgBox* text_box = getChild<LLChatMsgBox>("msg_text",false,false);
- if(!text_box)
- return;///actually assert fits better
-
+ LLChatMsgBox* text_box = getChild<LLChatMsgBox>("msg_text", false);
text_box->reshape(width - msg_left_offset - msg_right_offset,100/*its not magic number, we just need any number*/);
- LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text",false,false);
- if(msg_text && mOriginalMessage.mText.length())
+ LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text", false);
+ if(mOriginalMessage.mText.length())
msg_text->setText(mOriginalMessage.mText);
for(size_t i=0;i<mMessages.size();++i)
@@ -212,58 +203,41 @@ void LLChatItemCtrl::setWidth(S32 width)
void LLChatItemCtrl::onMouseLeave (S32 x, S32 y, MASK mask)
{
- LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
- if(!caption)
- return;
+ LLPanel* caption = getChild<LLPanel>("msg_caption", false);
LLUICtrl* msg_inspector = caption->getChild<LLUICtrl>("msg_inspector");
- if(msg_inspector)
- msg_inspector->setVisible(false);
+ msg_inspector->setVisible(false);
}
void LLChatItemCtrl::onMouseEnter (S32 x, S32 y, MASK mask)
{
if(mOriginalMessage.mSourceType != CHAT_SOURCE_AGENT)
return;
- LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
- if(!caption)
- return;
+ LLPanel* caption = getChild<LLPanel>("msg_caption", false);
LLUICtrl* msg_inspector = caption->getChild<LLUICtrl>("msg_inspector");
- if(msg_inspector)
- msg_inspector->setVisible(true);
+ msg_inspector->setVisible(true);
}
BOOL LLChatItemCtrl::handleMouseDown (S32 x, S32 y, MASK mask)
{
if(mOriginalMessage.mSourceType != CHAT_SOURCE_AGENT)
return LLPanel::handleMouseDown(x,y,mask);
- LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
- if(caption)
+ LLPanel* caption = getChild<LLPanel>("msg_caption", false);
+ LLUICtrl* msg_inspector = caption->getChild<LLUICtrl>("msg_inspector");
+ S32 local_x = x - msg_inspector->getRect().mLeft - caption->getRect().mLeft;
+ S32 local_y = y - msg_inspector->getRect().mBottom - caption->getRect().mBottom;
+ if(msg_inspector->pointInView(local_x, local_y))
{
- LLUICtrl* msg_inspector = caption->getChild<LLUICtrl>("msg_inspector");
- if(msg_inspector)
- {
- S32 local_x = x - msg_inspector->getRect().mLeft - caption->getRect().mLeft;
- S32 local_y = y - msg_inspector->getRect().mBottom - caption->getRect().mBottom;
- if(msg_inspector->pointInView(local_x, local_y))
- {
- LLFloaterReg::showInstance("mini_inspector", mOriginalMessage.mFromID);
- }
- }
+ LLFloaterReg::showInstance("mini_inspector", mOriginalMessage.mFromID);
}
return LLPanel::handleMouseDown(x,y,mask);
}
void LLChatItemCtrl::setHeaderVisibility(EShowItemHeader e)
{
- LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
- if(!caption)
- return;
+ LLPanel* caption = getChild<LLPanel>("msg_caption", false);
- LLUICtrl* icon = caption->getChild<LLUICtrl>("avatar_icon",false,false);
- LLUICtrl* name = caption->getChild<LLUICtrl>("sender_name",false,false);
-
- if(icon == 0 || name == 0)
- return;
+ LLUICtrl* icon = caption->getChild<LLUICtrl>("avatar_icon", false);
+ LLUICtrl* name = caption->getChild<LLUICtrl>("sender_name", false);
icon->setVisible(e == CHATITEMHEADER_SHOW_ONLY_ICON || e==CHATITEMHEADER_SHOW_BOTH);
name->setVisible(e == CHATITEMHEADER_SHOW_ONLY_NAME || e==CHATITEMHEADER_SHOW_BOTH);
@@ -272,20 +246,15 @@ void LLChatItemCtrl::setHeaderVisibility(EShowItemHeader e)
bool LLChatItemCtrl::canAddText ()
{
- LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text",false,false);
- if(!msg_text )
- return false;
+ LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text", false);
return msg_text->getTextLinesNum()<10;
}
BOOL LLChatItemCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
- if(!caption)
- return LLPanel::handleRightMouseDown(x,y,mask);
- LLUICtrl* avatar_icon = caption->getChild<LLUICtrl>("avatar_icon",false,false);
- if(!avatar_icon)
- return LLPanel::handleRightMouseDown(x,y,mask);
+ LLPanel* caption = getChild<LLPanel>("msg_caption", false);
+ LLUICtrl* avatar_icon = caption->getChild<LLUICtrl>("avatar_icon", false);
+
S32 local_x = x - avatar_icon->getRect().mLeft - caption->getRect().mLeft;
S32 local_y = y - avatar_icon->getRect().mBottom - caption->getRect().mBottom;
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 3b88bcfe20..80e27bd366 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -39,7 +39,6 @@
#include "lliconctrl.h"
#include "llimpanel.h" // LLFloaterIMPanel
#include "llimview.h"
-#include "llfloatergroupinfo.h"
#include "llfloaterreg.h"
#include "llmenugl.h"
#include "lloutputmonitorctrl.h"
@@ -78,6 +77,7 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p)
: LLChiclet(p)
, mButton(NULL)
, mCounterCtrl(NULL)
+, mNotificationChicletWindow(NULL)
{
LLButton::Params button_params = p.button;
button_params.rect(p.rect());
@@ -403,9 +403,7 @@ void LLIMChiclet::onMenuItemClicked(const LLSD& user_data)
}
else if("add" == level)
{
- std::string name;
- gCacheName->getFullName(other_participant_id,name);
- LLAvatarActions::requestFriendshipDialog(other_participant_id,name);
+ LLAvatarActions::requestFriendshipDialog(other_participant_id);
}
else if("remove" == level)
{
@@ -417,7 +415,7 @@ void LLIMChiclet::onMenuItemClicked(const LLSD& user_data)
}
else if("info" == level)
{
- LLFloaterGroupInfo::showFromUUID(other_participant_id);
+ LLGroupActions::show(other_participant_id);
}
}
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index a748141a14..103443ccd8 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -363,10 +363,15 @@ public:
/*virtual*/ ~ LLNotificationChiclet();
+ // Notification Chiclet Window
+ void setNotificationChicletWindow(LLFloater* wnd) { mNotificationChicletWindow = wnd; }
+
protected:
LLNotificationChiclet(const Params& p);
friend class LLUICtrlFactory;
+ LLFloater* mNotificationChicletWindow;
+
protected:
LLButton* mButton;
LLChicletNotificationCounterCtrl* mCounterCtrl;
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 3964fbfa74..9cb3ea127f 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -168,6 +168,18 @@ void LLFavoritesBarCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
LLUICtrl::reshape(width, height, called_from_parent);
}
+LLXMLNodePtr LLFavoritesBarCtrl::getButtonXMLNode()
+{
+ LLXMLNodePtr buttonXMLNode = NULL;
+ bool success = LLUICtrlFactory::getLayeredXMLNode("favorites_bar_button.xml", buttonXMLNode);
+ if (!success)
+ {
+ llwarns << "Unable to read xml file with button for Favorites Bar: favorites_bar_button.xml" << llendl;
+ buttonXMLNode = NULL;
+ }
+ return buttonXMLNode;
+}
+
void LLFavoritesBarCtrl::updateButtons(U32 bar_width)
{
LLInventoryModel::item_array_t items;
@@ -177,21 +189,25 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width)
return;
}
- const S32 buttonHPad = LLUI::sSettingGroups["config"]->getS32("ButtonHPad");
- const S32 buttonHGap = 2;
+ static LLXMLNodePtr buttonXMLNode = getButtonXMLNode();
+ if (buttonXMLNode.isNull())
+ {
+ return;
+ }
+
+ S32 buttonWidth = 120; //default value
+ buttonXMLNode->getAttributeS32("width", buttonWidth);
+ S32 buttonHGap = 2; // default value
+ buttonXMLNode->getAttributeS32("left", buttonHGap);
+
const S32 buttonVGap = 2;
- static LLButton::Params default_button_params(LLUICtrlFactory::getDefaultParams<LLButton>());
- std::string flat_icon = "transparent.j2c";
- std::string hover_icon = default_button_params.image_unselected.name;
- std::string hover_icon_selected = default_button_params.image_selected.name;
- S32 curr_x = buttonHGap;
-
S32 count = items.count();
+ const S32 buttonHPad = LLUI::sSettingGroups["config"]->getS32("ButtonHPad");
const S32 chevron_button_width = mFont->getWidth(">>") + buttonHPad * 2;
- S32 buttons_space = bar_width - curr_x;
+ S32 buttons_space = bar_width - buttonHGap;
S32 first_drop_down_item = count;
@@ -199,7 +215,7 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width)
S32 buttons_width = 0;
for (S32 i = 0; i < count; ++i)
{
- buttons_width += mFont->getWidth(items.get(i)->getName()) + buttonHPad * 2 + buttonHGap;
+ buttons_width += buttonWidth + buttonHGap;
if (buttons_width > buttons_space)
{
// There is no space for all buttons.
@@ -207,7 +223,7 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width)
buttons_space -= chevron_button_width + buttonHGap;
while (i >= 0 && buttons_width > buttons_space)
{
- buttons_width -= mFont->getWidth(items.get(i)->getName()) + buttonHPad * 2 + buttonHGap;
+ buttons_width -= buttonWidth + buttonHGap;
i--;
}
first_drop_down_item = i + 1; // First item behind visible items
@@ -259,37 +275,7 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width)
}
}
- // Adding buttons
- for(S32 i = mFirstDropDownItem -1; i >= 0; i--)
- {
-
- LLInventoryItem* item = items.get(i);
-
- S32 buttonWidth = mFont->getWidth(item->getName()) + buttonHPad * 2;
-
- LLRect rect;
- rect.setOriginAndSize(curr_x, buttonVGap, buttonWidth, getRect().getHeight()-buttonVGap);
-
- LLButton::Params bparams;
- bparams.image_unselected.name(flat_icon);
- bparams.image_disabled.name(flat_icon);
- bparams.image_selected.name(hover_icon_selected);
- bparams.image_hover_selected.name(hover_icon_selected);
- bparams.image_disabled_selected.name(hover_icon_selected);
- bparams.image_hover_unselected.name(hover_icon);
- bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_BOTTOM);
- bparams.rect (rect);
- bparams.tab_stop(false);
- bparams.font(mFont);
- bparams.name(item->getName());
- bparams.tool_tip(item->getName());
- bparams.click_callback.function(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID()));
- bparams.rightclick_callback.function(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID()));
-
- addChildInBack(LLUICtrlFactory::create<LLButton> (bparams));
-
- curr_x += buttonWidth + buttonHGap;
- }
+ createButtons(items, buttonXMLNode, buttonWidth, buttonHGap);
}
// Chevron button
@@ -307,6 +293,11 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width)
}
else
{
+ static LLButton::Params default_button_params(LLUICtrlFactory::getDefaultParams<LLButton>());
+ std::string flat_icon = "transparent.j2c";
+ std::string hover_icon = default_button_params.image_unselected.name;
+ std::string hover_icon_selected = default_button_params.image_selected.name;
+
LLButton::Params bparams;
LLRect rect;
@@ -341,6 +332,37 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width)
}
}
+
+void LLFavoritesBarCtrl::createButtons(const LLInventoryModel::item_array_t &items, const LLXMLNodePtr &buttonXMLNode, S32 buttonWidth, S32 buttonHGap)
+{
+ S32 curr_x = buttonHGap;
+ // Adding buttons
+ for(S32 i = mFirstDropDownItem -1; i >= 0; i--)
+ {
+ LLInventoryItem* item = items.get(i);
+
+ LLButton* fav_btn = LLUICtrlFactory::defaultBuilder<LLButton>(buttonXMLNode, this, NULL);
+ if (NULL == fav_btn)
+ {
+ llwarns << "Unable to create button for landmark: " << item->getName() << llendl;
+ continue;
+ }
+
+ // change only left and save bottom
+ fav_btn->setOrigin(curr_x, fav_btn->getRect().mBottom);
+ fav_btn->setFont(mFont);
+ fav_btn->setName(item->getName());
+ fav_btn->setLabel(item->getName());
+ fav_btn->setToolTip(item->getName());
+ fav_btn->setCommitCallback(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID()));
+ fav_btn->setRightClickedCallback(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID(), _1, _2, _3,_4 ));
+ sendChildToBack(fav_btn);
+
+ curr_x += buttonWidth + buttonHGap;
+ }
+}
+
+
BOOL LLFavoritesBarCtrl::postBuild()
{
// make the popup menu available
@@ -462,10 +484,8 @@ void LLFavoritesBarCtrl::showDropDownMenu()
item_params.label(item_name);
item_params.on_click.function(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID()));
- item_params.rightclick_callback.function(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID()));
-
LLMenuItemCallGL *menu_item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
-
+ menu_item->setRightClickedCallback(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this,item->getUUID(),_1,_2,_3,_4));
// Check whether item name wider than menu
if ((S32) menu_item->getNominalWidth() > bar_width)
{
@@ -514,7 +534,7 @@ void LLFavoritesBarCtrl::onButtonClick(LLUUID item_id)
LLInvFVBridgeAction::doAction(item_id,&gInventory);
}
-void LLFavoritesBarCtrl::onButtonRightClick(LLUUID item_id)
+void LLFavoritesBarCtrl::onButtonRightClick( LLUUID item_id,LLView* fav_button,S32 x,S32 y,MASK mask)
{
mSelectedItemID = item_id;
@@ -525,10 +545,7 @@ void LLFavoritesBarCtrl::onButtonRightClick(LLUUID item_id)
}
menu->updateParent(LLMenuGL::sMenuContainer);
-
- S32 x,y;
- LLUI::getCursorPositionLocal(this, &x, &y);
- LLMenuGL::showPopup(this, menu, x, y);
+ LLMenuGL::showPopup(fav_button, menu, x, y);
}
void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index a559692331..7da33e2f6e 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -61,10 +61,12 @@ public:
protected:
void updateButtons(U32 bar_width);
+ void createButtons(const LLInventoryModel::item_array_t &items, const LLXMLNodePtr &root, S32 buttonWidth, S32 buttonHGap);
+ LLXMLNodePtr getButtonXMLNode();
BOOL collectFavoriteItems(LLInventoryModel::item_array_t &items);
void onButtonClick(LLUUID id);
- void onButtonRightClick(LLUUID id);
+ void onButtonRightClick(LLUUID id,LLView* button,S32 x,S32 y,MASK mask);
void doToSelected(const LLSD& userdata);
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 81f1beb40d..94ea20893a 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -53,6 +53,11 @@ const F32 CAMERA_BUTTON_DELAY = 0.0f;
#define PAN "cam_track_stick"
#define CONTROLS "controls"
+
+void show_tip(LLFirstTimeTipsManager::EFirstTimeTipType tipType, LLView* anchorView)
+{
+ LLFirstTimeTipsManager::showTipsFor(tipType, anchorView, LLFirstTimeTipsManager::TPA_POS_RIGHT_ALIGN_TOP);
+}
//
// Member functions
//
@@ -93,7 +98,8 @@ void LLFloaterCamera::update()
{
ECameraControlMode mode = determineMode();
if (mode != mCurrMode) setMode(mode);
- LLFirstTimeTipsManager::showTipsFor(mMode2TipType[mode], this);
+ updatePosition();
+ show_tip(mMode2TipType[mode], this);
}
@@ -134,17 +140,17 @@ void LLFloaterCamera::onClickCameraPresets(LLUICtrl* ctrl, const LLSD& param)
if ("rear_view" == name)
{
LLFirstTimeTipsManager::showTipsFor(LLFirstTimeTipsManager::FTT_CAMERA_PRESET_REAR, ctrl);
- gAgent.resetView(TRUE, TRUE);
+ gAgent.switchCameraPreset(CAMERA_PRESET_REAR_VIEW);
}
- else if ("3/4_view" == name)
+ else if ("group_view" == name)
{
LLFirstTimeTipsManager::showTipsFor(LLFirstTimeTipsManager::FTT_CAMERA_PRESET_GROUP);
- //*TODO implement 3/4 view
+ gAgent.switchCameraPreset(CAMERA_PRESET_GROUP_VIEW);
}
else if ("front_view" == name)
{
LLFirstTimeTipsManager::showTipsFor(LLFirstTimeTipsManager::FTT_CAMERA_PRESET_FRONT);
- //*TODO implement front view
+ gAgent.switchCameraPreset(CAMERA_PRESET_FRONT_VIEW);
}
}
@@ -159,8 +165,7 @@ void LLFloaterCamera::updatePosition()
LLBottomTray* tray = LLBottomTray::getInstance();
if (!tray) return;
- LLButton* camera_button = tray->getChild<LLButton>("camera_btn", TRUE, FALSE);
- if (!camera_button) return;
+ LLButton* camera_button = tray->getChild<LLButton>("camera_btn");
//align centers of a button and a floater
S32 x = camera_button->calcScreenRect().getCenterX() - getRect().getWidth()/2;
@@ -270,19 +275,15 @@ void LLFloaterCamera::onClickBtn(ECameraControlMode mode)
switchMode(mode);
- LLFirstTimeTipsManager::showTipsFor(mMode2TipType[mode], mMode2Button[mode]);
+ show_tip(mMode2TipType[mode], this);
}
void LLFloaterCamera::assignButton2Mode(ECameraControlMode mode, const std::string& button_name)
{
- LLButton* button = getChild<LLButton>(button_name, TRUE, FALSE);
- llassert_always(button);
+ LLButton* button = getChild<LLButton>(button_name);
- if (button)
- {
- button->setClickedCallback(boost::bind(&LLFloaterCamera::onClickBtn, this, mode));
- mMode2Button[mode] = button;
- }
+ button->setClickedCallback(boost::bind(&LLFloaterCamera::onClickBtn, this, mode));
+ mMode2Button[mode] = button;
}
void LLFloaterCamera::initMode2TipTypeMap()
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
index 8fcb7b985f..742cc5c5de 100644
--- a/indra/newview/llfloaterchat.cpp
+++ b/indra/newview/llfloaterchat.cpp
@@ -339,11 +339,14 @@ void LLFloaterChat::addChat(const LLChat& chat,
text_color = LLUIColorTable::instance().getColor("IMChatColor");
size = INSTANT_MSG_SIZE;
}
+ // Disabling the console for 2.0 - SJB
+#if 0
// We display anything if it's not an IM. If it's an IM, check pref...
if ( !from_instant_message || gSavedSettings.getBOOL("IMInChatConsole") )
{
gConsole->addLine(chat.mText, size, text_color);
}
+#endif
}
if(from_instant_message && (gSavedPerAccountSettings.getS32("IMLogOptions")== LOG_BOTH_TOGETHER))
diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp
index 7f03d63b3e..f49f854620 100644
--- a/indra/newview/llfloatergroups.cpp
+++ b/indra/newview/llfloatergroups.cpp
@@ -273,7 +273,7 @@ void LLPanelGroups::onBtnSearch(void* userdata)
void LLPanelGroups::create()
{
- LLGroupActions::create();
+ LLGroupActions::createGroup();
}
void LLPanelGroups::activate()
@@ -293,7 +293,7 @@ void LLPanelGroups::info()
LLUUID group_id;
if (group_list && (group_id = group_list->getCurrentID()).notNull())
{
- LLGroupActions::info(group_id);
+ LLGroupActions::show(group_id);
}
}
diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp
index a486ef565a..718719fe57 100644
--- a/indra/newview/llfloaterinventory.cpp
+++ b/indra/newview/llfloaterinventory.cpp
@@ -64,7 +64,6 @@
#include "llmenugl.h"
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
-#include "llpreviewlandmark.h"
#include "llpreviewnotecard.h"
#include "llpreviewscript.h"
#include "llpreviewsound.h"
@@ -1275,9 +1274,9 @@ void LLInventoryPanel::draw()
LLPanel::draw();
}
-void LLInventoryPanel::setFilterTypes(U32 filter_types)
+void LLInventoryPanel::setFilterTypes(U64 filter_types, BOOL filter_for_categories)
{
- mFolders->getFilter()->setFilterTypes(filter_types);
+ mFolders->getFilter()->setFilterTypes(filter_types, filter_for_categories);
}
void LLInventoryPanel::setFilterPermMask(PermissionMask filter_perm_mask)
diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h
index 734ab5032e..fd61e121ea 100644
--- a/indra/newview/llfloaterinventory.h
+++ b/indra/newview/llfloaterinventory.h
@@ -133,7 +133,7 @@ public:
void setSelectCallback(const LLFolderView::signal_t::slot_type& cb) { if (mFolders) mFolders->setSelectCallback(cb); }
void clearSelection();
LLInventoryFilter* getFilter() { return mFolders->getFilter(); }
- void setFilterTypes(U32 filter);
+ void setFilterTypes(U64 filter, BOOL filter_for_categories = FALSE); // if filter_for_categories is true, operate on folder preferred asset type
U32 getFilterTypes() const { return mFolders->getFilterTypes(); }
void setFilterPermMask(PermissionMask filter_perm_mask);
U32 getFilterPermMask() const { return mFolders->getFilterPermissions(); }
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
index da6dceb149..3753dcaaa8 100644
--- a/indra/newview/llfloaterlagmeter.cpp
+++ b/indra/newview/llfloaterlagmeter.cpp
@@ -152,25 +152,25 @@ void LLFloaterLagMeter::determineClient()
if (!gFocusMgr.getAppHasFocus())
{
- mClientButton->setImageUnselected(LAG_GOOD_IMAGE_NAME);
+ mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
mClientText->setText( getString("client_frame_time_window_bg_msg", mStringArgs) );
mClientCause->setText( LLStringUtil::null );
}
else if(client_frame_time >= mClientFrameTimeCritical)
{
- mClientButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME);
+ mClientButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
mClientText->setText( getString("client_frame_time_critical_msg", mStringArgs) );
find_cause = true;
}
else if(client_frame_time >= mClientFrameTimeWarning)
{
- mClientButton->setImageUnselected(LAG_WARNING_IMAGE_NAME);
+ mClientButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
mClientText->setText( getString("client_frame_time_warning_msg", mStringArgs) );
find_cause = true;
}
else
{
- mClientButton->setImageUnselected(LAG_GOOD_IMAGE_NAME);
+ mClientButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
mClientText->setText( getString("client_frame_time_normal_msg", mStringArgs) );
mClientCause->setText( LLStringUtil::null );
}
@@ -211,13 +211,13 @@ void LLFloaterLagMeter::determineNetwork()
if(packet_loss >= mNetworkPacketLossCritical)
{
- mNetworkButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME);
+ mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
mNetworkText->setText( getString("network_packet_loss_critical_msg", mStringArgs) );
find_cause_loss = true;
}
else if(ping_time >= mNetworkPingCritical)
{
- mNetworkButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME);
+ mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
if (client_frame_time_ms < mNetworkPingCritical)
{
mNetworkText->setText( getString("network_ping_critical_msg", mStringArgs) );
@@ -226,13 +226,13 @@ void LLFloaterLagMeter::determineNetwork()
}
else if(packet_loss >= mNetworkPacketLossWarning)
{
- mNetworkButton->setImageUnselected(LAG_WARNING_IMAGE_NAME);
+ mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
mNetworkText->setText( getString("network_packet_loss_warning_msg", mStringArgs) );
find_cause_loss = true;
}
else if(ping_time >= mNetworkPingWarning)
{
- mNetworkButton->setImageUnselected(LAG_WARNING_IMAGE_NAME);
+ mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
if (client_frame_time_ms < mNetworkPingWarning)
{
mNetworkText->setText( getString("network_ping_warning_msg", mStringArgs) );
@@ -241,7 +241,7 @@ void LLFloaterLagMeter::determineNetwork()
}
else
{
- mNetworkButton->setImageUnselected(LAG_GOOD_IMAGE_NAME);
+ mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
mNetworkText->setText( getString("network_performance_normal_msg", mStringArgs) );
}
@@ -266,19 +266,19 @@ void LLFloaterLagMeter::determineServer()
if(sim_frame_time >= mServerFrameTimeCritical)
{
- mServerButton->setImageUnselected(LAG_CRITICAL_IMAGE_NAME);
+ mServerButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
mServerText->setText( getString("server_frame_time_critical_msg", mStringArgs) );
find_cause = true;
}
else if(sim_frame_time >= mServerFrameTimeWarning)
{
- mServerButton->setImageUnselected(LAG_WARNING_IMAGE_NAME);
+ mServerButton->setImageUnselected(LLUI::getUIImage(LAG_WARNING_IMAGE_NAME));
mServerText->setText( getString("server_frame_time_warning_msg", mStringArgs) );
find_cause = true;
}
else
{
- mServerButton->setImageUnselected(LAG_GOOD_IMAGE_NAME);
+ mServerButton->setImageUnselected(LLUI::getUIImage(LAG_GOOD_IMAGE_NAME));
mServerText->setText( getString("server_frame_time_normal_msg", mStringArgs) );
mServerCause->setText( LLStringUtil::null );
}
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 63ac44da4f..c5e07c6596 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -51,7 +51,6 @@
#include "llfloateravatarpicker.h"
#include "llfloaterauction.h"
#include "llfloatergroups.h"
-#include "llfloatergroupinfo.h"
#include "llavataractions.h"
#include "lllineeditor.h"
#include "llnamelistctrl.h"
@@ -79,6 +78,8 @@
#include "roles_constants.h"
#include "lltrans.h"
+#include "llgroupactions.h"
+
static std::string OWNER_ONLINE = "0";
static std::string OWNER_OFFLINE = "1";
static std::string OWNER_GROUP = "2";
@@ -806,7 +807,7 @@ void LLPanelLandGeneral::onClickProfile(void* data)
if (parcel->getIsGroupOwned())
{
const LLUUID& group_id = parcel->getGroupID();
- LLFloaterGroupInfo::showFromUUID(group_id);
+ LLGroupActions::show(group_id);
}
else
{
@@ -1080,7 +1081,7 @@ void LLPanelLandObjects::onDoubleClickOwner(void *userdata)
BOOL is_group = cell->getValue().asString() == OWNER_GROUP;
if (is_group)
{
- LLFloaterGroupInfo::showFromUUID(owner_id);
+ LLGroupActions::show(owner_id);
}
else
{
diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp
index de3cd5d4e3..19552ca9c9 100644
--- a/indra/newview/llfloaterlandholdings.cpp
+++ b/indra/newview/llfloaterlandholdings.cpp
@@ -42,7 +42,6 @@
#include "llagent.h"
#include "llfloaterreg.h"
-#include "llfloatergroupinfo.h"
#include "llfloaterworldmap.h"
#include "llproductinforequest.h"
#include "llscrolllistctrl.h"
@@ -56,6 +55,8 @@
#include "llviewermessage.h"
#include "lluictrlfactory.h"
+#include "llgroupactions.h"
+
// protected
LLFloaterLandHoldings::LLFloaterLandHoldings(const LLSD& key)
: LLFloater(key),
@@ -323,7 +324,7 @@ void LLFloaterLandHoldings::onGrantList(void* data)
LLUUID group_id = list->getCurrentID();
if (group_id.notNull())
{
- LLFloaterGroupInfo::showFromUUID(group_id);
+ LLGroupActions::show(group_id);
}
}
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index 7042882084..0a3d97245b 100644
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -212,12 +212,9 @@ void LLFloaterNotificationConsole::addChannel(const std::string& name, bool open
void LLFloaterNotificationConsole::removeChannel(const std::string& name)
{
- LLPanel* panelp = getChild<LLPanel>(name, TRUE, FALSE);
- if (panelp)
- {
- getChildRef<LLLayoutStack>("notification_channels").removePanel(panelp);
- delete panelp;
- }
+ LLPanel* panelp = getChild<LLPanel>(name);
+ getChildRef<LLLayoutStack>("notification_channels").removePanel(panelp);
+ delete panelp;
updateResizeLimits();
}
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 8a7b2d84c0..6050fbfa5d 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -361,7 +361,9 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.AutoDetectAspect", boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this));
mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this));
mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
-
+
+ sSkin = gSavedSettings.getString("SkinCurrent");
+
gSavedSettings.getControl("AvatarNameTagMode")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
}
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index 7312808bd6..8ac00832c9 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -43,7 +43,6 @@
#include "llagent.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
-#include "llfloatergroupinfo.h"
#include "llavataractions.h"
#include "llinventorymodel.h"
#include "lllineeditor.h"
@@ -59,6 +58,7 @@
#include "llviewerregion.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"
+#include "llgroupactions.h"
#include "lluictrlfactory.h"
@@ -244,7 +244,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
const BOOL can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm,
GP_OBJECT_SET_SALE) &&
!cannot_restrict_permissions;
- const BOOL is_link = LLAssetType::lookupIsLinkType(i->getActualType());
+ const BOOL is_link = i->getIsLinkType();
// You need permission to modify the object to modify an inventory
// item in it.
@@ -554,7 +554,7 @@ void LLFloaterProperties::onClickOwner()
if(!item) return;
if(item->getPermissions().isGroupOwned())
{
- LLFloaterGroupInfo::showFromUUID(item->getPermissions().getGroup());
+ LLGroupActions::show(item->getPermissions().getGroup());
}
else
{
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 57acbb147d..098a5197df 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -51,12 +51,13 @@
#include "llfocusmgr.h"
#include "lllandmarklist.h"
#include "lllineeditor.h"
-#include "llpreviewlandmark.h"
#include "llregionhandle.h"
#include "llscrolllistctrl.h"
#include "llslurl.h"
+#include "lltabcontainer.h"
#include "lltextbox.h"
#include "lltracker.h"
+#include "llinventorymodel.h"
#include "llviewerinventory.h" // LLViewerInventoryItem
#include "llviewermenu.h"
#include "llviewerregion.h"
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index c54eafb67a..4a5a775a05 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -1103,26 +1103,7 @@ void LLFolderView::changeType(LLInventoryModel *model, LLAssetType::EType new_fo
if (!folder_bridge) return;
LLViewerInventoryCategory *cat = folder_bridge->getCategory();
if (!cat) return;
-
- const LLUUID &folder_id = cat->getUUID();
- const LLUUID &parent_id = cat->getParentUUID();
- const std::string &name = cat->getName();
-
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessageFast(_PREHASH_UpdateInventoryFolder);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->nextBlockFast(_PREHASH_FolderData);
- msg->addUUIDFast(_PREHASH_FolderID, folder_id);
- msg->addUUIDFast(_PREHASH_ParentID, parent_id);
- msg->addS8Fast(_PREHASH_Type, new_folder_type);
- msg->addStringFast(_PREHASH_Name, name);
- gAgent.sendReliableMessage();
-
- cat->setPreferredType(new_folder_type);
- gInventory.addChangedMask(LLInventoryObserver::LABEL, folder_id);
- gInventory.updateLinkedObjects(folder_id);
+ cat->changeType(new_folder_type);
}
void LLFolderView::autoOpenItem( LLFolderViewFolder* item )
diff --git a/indra/newview/llfoldervieweventlistener.h b/indra/newview/llfoldervieweventlistener.h
index eb06123b46..254ce4062a 100644
--- a/indra/newview/llfoldervieweventlistener.h
+++ b/indra/newview/llfoldervieweventlistener.h
@@ -62,6 +62,7 @@ public:
virtual LLFontGL::StyleFlags getLabelStyle() const = 0;
virtual std::string getLabelSuffix() const = 0;
virtual void openItem( void ) = 0;
+ virtual void closeItem( void ) = 0;
virtual void previewItem( void ) = 0;
virtual void selectItem(void) = 0;
virtual void showProperties(void) = 0;
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index a6a8da2a76..69ce2f0e0e 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -1912,12 +1912,16 @@ void LLFolderViewFolder::setOpenArrangeRecursively(BOOL openitem, ERecurseType r
{
BOOL was_open = mIsOpen;
mIsOpen = openitem;
- if(!was_open && openitem)
+ if (mListener)
{
- if(mListener)
+ if(!was_open && openitem)
{
mListener->openItem();
}
+ else if(was_open && !openitem)
+ {
+ mListener->closeItem();
+ }
}
if (recurse == RECURSE_DOWN || recurse == RECURSE_UP_DOWN)
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 69498d3099..59274c8638 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -1151,7 +1151,7 @@ void LLGestureManager::done()
{
for(item_map_t::iterator it = mActive.begin(); it != mActive.end(); ++it)
{
- if(it->second->mName.empty())
+ if(it->second && it->second->mName.empty())
{
LLViewerInventoryItem* item = gInventory.getItem(it->first);
if(item)
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 30f4447283..b14f23f9cf 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -36,12 +36,74 @@
#include "llgroupactions.h"
#include "llagent.h"
-#include "llfloatergroupinfo.h"
#include "llfloaterreg.h"
#include "llimview.h" // for gIMMgr
#include "llgroupmgr.h"
#include "llavataractions.h"
#include "llviewercontrol.h"
+#include "llsidetray.h"
+
+#include "llcommandhandler.h"
+
+//
+// Globals
+//
+
+class LLGroupHandler : public LLCommandHandler
+{
+public:
+ // requires trusted browser to trigger
+ LLGroupHandler() : LLCommandHandler("group", true) { }
+ bool handle(const LLSD& tokens, const LLSD& query_map,
+ LLWebBrowserCtrl* web)
+ {
+ if (tokens.size() < 1)
+ {
+ return false;
+ }
+
+ if (tokens[0].asString() == "create")
+ {
+ LLGroupActions::createGroup();
+ return true;
+ }
+
+ if (tokens.size() < 2)
+ {
+ return false;
+ }
+
+ if (tokens[0].asString() == "list")
+ {
+ if (tokens[1].asString() == "show")
+ {
+ LLFloaterReg::showInstance("contacts", "groups");
+ return true;
+ }
+ return false;
+ }
+
+ LLUUID group_id;
+ if (!group_id.set(tokens[0], FALSE))
+ {
+ return false;
+ }
+
+ if (tokens[1].asString() == "about")
+ {
+ if (group_id.isNull())
+ return true;
+
+ LLGroupActions::show(group_id);
+
+ return true;
+ }
+ return false;
+ }
+};
+LLGroupHandler gGroupHandler;
+
+
// LLGroupActions::teleport helper
//
@@ -168,12 +230,6 @@ void LLGroupActions::search()
}
// static
-void LLGroupActions::create()
-{
- LLFloaterGroupInfo::showCreateGroup(NULL);
-}
-
-// static
void LLGroupActions::leave(const LLUUID& group_id)
{
if (group_id.isNull())
@@ -208,14 +264,66 @@ void LLGroupActions::activate(const LLUUID& group_id)
gAgent.sendReliableMessage();
}
+bool isGroupUIVisible()
+{
+ LLPanel* panel = LLSideTray::getInstance()->findChild<LLPanel>("panel_group_info_sidetray");
+ if(!panel)
+ return false;
+ return panel->getVisible();
+}
+
// static
-void LLGroupActions::info(const LLUUID& group_id)
+void LLGroupActions::show(const LLUUID& group_id)
{
if (group_id.isNull())
return;
- LLFloaterGroupInfo::showFromUUID(group_id);
+ LLSD params;
+ params["group_id"] = group_id;
+ params["open_tab_name"] = "panel_group_info_sidetray";
+
+ LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+}
+
+//static
+void LLGroupActions::refresh(const LLUUID& group_id)
+{
+ if(!isGroupUIVisible())
+ return;
+
+ LLSD params;
+ params["group_id"] = group_id;
+ params["open_tab_name"] = "panel_group_info_sidetray";
+ params["action"] = "refresh";
+
+ LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+}
+
+//static
+void LLGroupActions::createGroup()
+{
+ LLSD params;
+ params["group_id"] = LLUUID::null;
+ params["open_tab_name"] = "panel_group_info_sidetray";
+ params["action"] = "create";
+
+ LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+
}
+//static
+void LLGroupActions::closeGroup(const LLUUID& group_id)
+{
+ if(!isGroupUIVisible())
+ return;
+
+ LLSD params;
+ params["group_id"] = group_id;
+ params["open_tab_name"] = "panel_group_info_sidetray";
+ params["action"] = "close";
+
+ LLSideTray::getInstance()->showPanel("panel_group_info_sidetray", params);
+}
+
// static
void LLGroupActions::startChat(const LLUUID& group_id)
diff --git a/indra/newview/llgroupactions.h b/indra/newview/llgroupactions.h
index b6ddb4511a..70170d3cfe 100644
--- a/indra/newview/llgroupactions.h
+++ b/indra/newview/llgroupactions.h
@@ -48,11 +48,6 @@ public:
static void search();
/**
- * Invokes group creation floater.
- */
- static void create();
-
- /**
* Invokes "Leave Group" floater.
*/
static void leave(const LLUUID& group_id);
@@ -63,9 +58,24 @@ public:
static void activate(const LLUUID& group_id);
/**
- * Show group information dialog.
+ * Show group information panel.
+ */
+ static void show(const LLUUID& group_id);
+
+ /**
+ * Refresh group information panel.
+ */
+ static void refresh(const LLUUID& group_id);
+
+ /**
+ * Refresh group information panel.
+ */
+ static void createGroup();
+
+ /**
+ * Close group information panel.
*/
- static void info(const LLUUID& group_id);
+ static void closeGroup (const LLUUID& group_id);
/**
* Start group instant messaging session.
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index a8d97c6afb..0ba1019765 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -51,7 +51,8 @@
#include "lleconomy.h"
#include "llviewerwindow.h"
#include "llfloaterdirectory.h"
-#include "llfloatergroupinfo.h"
+#include "llpanelgroup.h"
+#include "llgroupactions.h"
#include "lluictrlfactory.h"
#include <boost/regex.hpp>
@@ -1210,7 +1211,7 @@ void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data
// If we had a failure, the group panel needs to be updated.
if (!success)
{
- LLFloaterGroupInfo::refreshGroup(group_id);
+ LLGroupActions::refresh(group_id);
}
}
@@ -1230,7 +1231,7 @@ void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data)
LLGroupMgr::getInstance()->clearGroupData(group_id);
// refresh the floater for this group, if any.
- LLFloaterGroupInfo::refreshGroup(group_id);
+ LLGroupActions::refresh(group_id);
// refresh the group panel of the search window, if necessary.
LLFloaterDirectory::refreshGroup(group_id);
}
@@ -1252,7 +1253,7 @@ void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data)
LLGroupMgr::getInstance()->clearGroupData(group_id);
// close the floater for this group, if any.
- LLFloaterGroupInfo::closeGroup(group_id);
+ LLGroupActions::closeGroup(group_id);
// refresh the group panel of the search window, if necessary.
LLFloaterDirectory::refreshGroup(group_id);
}
@@ -1288,8 +1289,10 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
gAgent.mGroups.push_back(gd);
- LLFloaterGroupInfo::closeCreateGroup();
- LLFloaterGroupInfo::showFromUUID(group_id,"roles_tab");
+ LLPanelGroup::refreshCreatedGroup(group_id);
+ //FIXME
+ //LLFloaterGroupInfo::closeCreateGroup();
+ //LLFloaterGroupInfo::showFromUUID(group_id,"roles_tab");
}
else
{
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 4ae188977e..eeb127c878 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -51,9 +51,9 @@
#include "llchat.h"
#include "llchiclet.h"
#include "llconsole.h"
+#include "llgroupactions.h"
#include "llfloater.h"
#include "llfloatercall.h"
-#include "llfloatergroupinfo.h"
#include "llavataractions.h"
#include "llimview.h"
#include "llinventory.h"
@@ -1581,7 +1581,8 @@ void LLFloaterIMPanel::onClickGroupInfo( void* userdata )
// Bring up the Profile window
LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
- LLFloaterGroupInfo::showFromUUID(self->mSessionUUID);
+ LLGroupActions::show(self->mSessionUUID);
+
}
// static
@@ -1713,35 +1714,6 @@ void LLFloaterIMPanel::sendMsg()
mOtherParticipantUUID,
mDialog);
- // local echo
- if((mDialog == IM_NOTHING_SPECIAL) &&
- (mOtherParticipantUUID.notNull()))
- {
- std::string history_echo;
- gAgent.buildFullname(history_echo);
-
- // Look for IRC-style emotes here.
- std::string prefix = utf8_text.substr(0, 4);
- if (prefix == "/me " || prefix == "/me'")
- {
- utf8_text.replace(0,3,"");
- }
- else
- {
- history_echo += ": ";
- }
- history_echo += utf8_text;
-
- BOOL other_was_typing = mOtherTyping;
-
- addHistoryLine(history_echo, LLUIColorTable::instance().getColor("IMChatColor"), true, gAgent.getID());
-
- if (other_was_typing)
- {
- addTypingIndicator(mOtherTypingName);
- }
-
- }
}
else
{
@@ -2149,7 +2121,7 @@ BOOL LLIMFloater::postBuild()
childSetCommitCallback("chat_editor", onSendMsg, this);
- mHistoryEditor = getChild<LLViewerTextEditor>("im_text", true, false);
+ mHistoryEditor = getChild<LLViewerTextEditor>("im_text");
setTitle(LLIMModel::instance().getName(mSessionID));
setDocked(true);
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 66165090ef..b45d36e7ac 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -380,6 +380,28 @@ void LLIMModel::sendMessage(const std::string& utf8_text,
std::string from;
gAgent.buildFullname(from);
LLIMModel::instance().addToHistory(im_session_id, from, utf8_text);
+
+ //local echo for the legacy communicate panel
+ std::string history_echo;
+ std::string utf8_copy = utf8_text;
+ gAgent.buildFullname(history_echo);
+
+ // Look for IRC-style emotes here.
+
+ std::string prefix = utf8_copy.substr(0, 4);
+ if (prefix == "/me " || prefix == "/me'")
+ {
+ utf8_copy.replace(0,3,"");
+ }
+ else
+ {
+ history_echo += ": ";
+ }
+ history_echo += utf8_copy;
+
+ LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(im_session_id);
+ if (floater) floater->addHistoryLine(history_echo, LLUIColorTable::instance().getColor("IMChatColor"), true, gAgent.getID());
+
}
// Add the recipient to the recent people list.
@@ -1362,7 +1384,7 @@ LLUUID LLIMMgr::addSession(
{
// *TODO: Remove this? Otherwise old communicate window opens on
// second initiation of IM session from People panel?
- floater->openFloater();
+ // floater->openFloater();
}
//mTabContainer->selectTabPanel(panel);
floater->setInputFocus(TRUE);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 5877a0b19c..5f634496d3 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -67,7 +67,6 @@
#include "llmenugl.h"
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
-#include "llpreviewlandmark.h"
#include "llpreviewnotecard.h"
#include "llpreviewscript.h"
#include "llpreviewsound.h"
@@ -114,7 +113,7 @@ void dec_busy_count()
struct LLWearableHoldingPattern;
void wear_add_inventory_item_on_avatar(LLInventoryItem* item);
void wear_inventory_category_on_avatar(LLInventoryCategory* category, BOOL append);
-void wear_inventory_category_on_avatar_step2( BOOL proceed, LLUUID category, BOOL append);
+void wear_inventory_category_on_avatar_step2( BOOL proceed, LLUUID category, BOOL append, BOOL follow_folder_links);
void wear_inventory_category_on_avatar_loop(LLWearable* wearable, void*);
void wear_inventory_category_on_avatar_step3(LLWearableHoldingPattern* holder, BOOL append);
void remove_inventory_category_from_avatar(LLInventoryCategory* category);
@@ -220,7 +219,7 @@ void LLInvFVBridge::renameLinkedItems(const LLUUID &item_id, const std::string&
LLInventoryItem* itemp = model->getItem(mUUID);
if (!itemp) return;
- if (LLAssetType::lookupIsLinkType(itemp->getActualType()))
+ if (itemp->getIsLinkType())
{
return;
}
@@ -655,7 +654,7 @@ BOOL LLInvFVBridge::isLinkedObjectInTrash() const
if (isInTrash()) return TRUE;
LLInventoryObject *obj = getInventoryObject();
- if (obj && LLAssetType::lookupIsLinkType(obj->getActualType()))
+ if (obj && obj->getIsLinkType())
{
LLInventoryModel* model = getInventoryModel();
if(!model) return FALSE;
@@ -1024,7 +1023,7 @@ void LLItemBridge::restoreToWorld()
void LLItemBridge::gotoItem(LLFolderView *folder)
{
LLInventoryObject *obj = getInventoryObject();
- if (obj && LLAssetType::lookupIsLinkType(obj->getActualType()))
+ if (obj && obj->getIsLinkType())
{
LLInventoryPanel* active_panel = LLFloaterInventory::getActiveInventory()->getPanel();
if (active_panel)
@@ -1090,7 +1089,7 @@ LLFontGL::StyleFlags LLItemBridge::getLabelStyle() const
}
const LLViewerInventoryItem* item = getItem();
- if (LLAssetType::lookupIsLinkType(item->getActualType()))
+ if (item && item->getIsLinkType())
{
font |= LLFontGL::ITALIC;
}
@@ -1117,7 +1116,7 @@ std::string LLItemBridge::getLabelSuffix() const
BOOL broken_link = LLAssetType::lookupIsLinkType(item->getType());
if (broken_link) return BROKEN_LINK;
- BOOL link = LLAssetType::lookupIsLinkType(item->getActualType());
+ BOOL link = item->getIsLinkType();
if (link) return LINK;
BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
@@ -1242,7 +1241,7 @@ BOOL LLItemBridge::isItemCopyable() const
// All items can be copied, not all can be pasted.
// The only time an item can't be copied is if it's a link
// return (item->getPermissions().allowCopyBy(gAgent.getID()));
- if (LLAssetType::lookupIsLinkType(item->getActualType()))
+ if (item->getIsLinkType())
{
return FALSE;
}
@@ -1442,6 +1441,13 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
BOOL move_is_into_trash = (mUUID == trash_id)
|| model->isObjectDescendentOf(mUUID, trash_id);
BOOL is_movable = (!LLAssetType::lookupIsProtectedCategoryType(inv_cat->getPreferredType()));
+ LLUUID current_outfit_id = model->findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT);
+ BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
+ if (move_is_into_current_outfit)
+ {
+ // BAP - restrictions?
+ is_movable = true;
+ }
if( is_movable )
{
gInventory.collectDescendents( cat_id, descendent_categories, descendent_items, FALSE );
@@ -1508,13 +1514,27 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
}
}
- // Reparent the folder and restamp children if it's moving
- // into trash.
- LLInvFVBridge::changeCategoryParent(
- model,
- (LLViewerInventoryCategory*)inv_cat,
- mUUID,
- move_is_into_trash);
+ if (current_outfit_id == mUUID) // if target is current outfit folder we use link
+ {
+ link_inventory_item(
+ gAgent.getID(),
+ inv_cat->getUUID(),
+ mUUID,
+ inv_cat->getName(),
+ LLAssetType::AT_LINK_FOLDER,
+ LLPointer<LLInventoryCallback>(NULL));
+ }
+ else
+ {
+
+ // Reparent the folder and restamp children if it's moving
+ // into trash.
+ LLInvFVBridge::changeCategoryParent(
+ model,
+ (LLViewerInventoryCategory*)inv_cat,
+ mUUID,
+ move_is_into_trash);
+ }
}
}
else if(LLToolDragAndDrop::SOURCE_WORLD == source)
@@ -1900,7 +1920,29 @@ void LLFolderBridge::openItem()
lldebugs << "LLFolderBridge::openItem()" << llendl;
LLInventoryModel* model = getInventoryModel();
if(!model) return;
- model->fetchDescendentsOf(mUUID);
+ bool fetching_inventory = model->fetchDescendentsOf(mUUID);
+ // Only change folder type if we have the folder contents.
+ if (!fetching_inventory)
+ {
+ // Disabling this for now, it's causing crash when new items are added to folders
+ // since folder type may change before new item item has finished processing.
+ // determineFolderType();
+ }
+}
+
+void LLFolderBridge::closeItem()
+{
+ determineFolderType();
+}
+
+void LLFolderBridge::determineFolderType()
+{
+ if (isUpToDate())
+ {
+ LLInventoryModel* model = getInventoryModel();
+ LLViewerInventoryCategory* category = model->getCategory(mUUID);
+ category->determineFolderType();
+ }
}
BOOL LLFolderBridge::isItemRenameable() const
@@ -2014,6 +2056,15 @@ LLUIImagePtr LLFolderBridge::getIcon(LLAssetType::EType preferred_type)
//TODO - need icon
control = "inv_folder_plain_closed.tga";
break;
+ case LLAssetType::AT_OUTFIT:
+ control = "inv_folder_outfit.tga";
+ break;
+ case LLAssetType::AT_CURRENT_OUTFIT:
+ control = "inv_folder_current_outfit.tga";
+ break;
+ case LLAssetType::AT_MY_OUTFITS:
+ control = "inv_folder_my_outfits.tga";
+ break;
default:
control = "inv_folder_plain_closed.tga";
break;
@@ -2200,6 +2251,10 @@ void LLFolderBridge::folderOptionsMenu()
}
mItems.push_back(std::string("Take Off Items"));
}
+ if (LLAssetType::AT_CURRENT_OUTFIT == category->getPreferredType())
+ {
+ mItems.push_back(std::string("Replace Outfit"));
+ }
hideContextEntries(*mMenu, mItems, disabled_items);
}
@@ -2254,6 +2309,8 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
else if(isAgentInventory()) // do not allow creating in library
{
mItems.push_back(std::string("New Folder"));
+ mItems.push_back(std::string("New Outfit"));
+ mItems.push_back(std::string("New My Outfits"));
mItems.push_back(std::string("New Script"));
mItems.push_back(std::string("New Note"));
mItems.push_back(std::string("New Gesture"));
@@ -2493,7 +2550,9 @@ void LLFolderBridge::modifyOutfit(BOOL append)
LLViewerInventoryCategory* cat = getCategory();
if(!cat) return;
- wear_inventory_category_on_avatar( cat, append );
+ // BAP - was:
+ // wear_inventory_category_on_avatar( cat, append );
+ wear_inventory_category( cat, FALSE, append );
}
// helper stuff
@@ -2899,10 +2958,6 @@ void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
key["id"] = item->getUUID();
LLSideTray::getInstance()->showPanel("panel_places", key);
-
- // Floater preview_landmark disabled,
- // its functionality moved to Side Tray Places Panel
- //LLFloaterReg::showInstance("preview_landmark", LLSD(item->getUUID()), TAKE_FOCUS_YES);
}
}
else
@@ -3505,7 +3560,7 @@ LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const
}
LLInventoryItem* item = getItem();
- if (LLAssetType::lookupIsLinkType(item->getActualType()))
+ if (item && item->getIsLinkType())
{
font |= LLFontGL::ITALIC;
}
@@ -3604,7 +3659,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
else
{
LLInventoryItem* item = getItem();
- if (item && LLAssetType::lookupIsLinkType(item->getActualType()))
+ if (item && item->getIsLinkType())
{
items.push_back(std::string("Goto Link"));
}
@@ -4091,17 +4146,18 @@ void wear_inventory_category_on_avatar( LLInventoryCategory* category, BOOL appe
lldebugs << "wear_inventory_category_on_avatar( " << category->getName()
<< " )" << llendl;
+ BOOL follow_folder_links = (category->getPreferredType() == LLAssetType::AT_CURRENT_OUTFIT || category->getPreferredType() == LLAssetType::AT_OUTFIT );
if( gFloaterCustomize )
{
- gFloaterCustomize->askToSaveIfDirty(boost::bind(wear_inventory_category_on_avatar_step2, _1, category->getUUID(), append));
+ gFloaterCustomize->askToSaveIfDirty(boost::bind(wear_inventory_category_on_avatar_step2, _1, category->getUUID(), append, follow_folder_links));
}
else
{
- wear_inventory_category_on_avatar_step2(TRUE, category->getUUID(), append );
+ wear_inventory_category_on_avatar_step2(TRUE, category->getUUID(), append, follow_folder_links );
}
}
-void wear_inventory_category_on_avatar_step2( BOOL proceed, LLUUID category, BOOL append )
+void wear_inventory_category_on_avatar_step2( BOOL proceed, LLUUID category, BOOL append, BOOL follow_folder_links )
{
// Find all the wearables that are in the category's subtree.
lldebugs << "wear_inventory_category_on_avatar_step2()" << llendl;
@@ -4114,7 +4170,8 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, LLUUID category, BOO
cat_array,
item_array,
LLInventoryModel::EXCLUDE_TRASH,
- is_wearable);
+ is_wearable,
+ follow_folder_links);
S32 i;
S32 wearable_count = item_array.count();
@@ -4125,7 +4182,8 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, LLUUID category, BOO
obj_cat_array,
obj_item_array,
LLInventoryModel::EXCLUDE_TRASH,
- is_object);
+ is_object,
+ follow_folder_links);
S32 obj_count = obj_item_array.count();
// Find all gestures in this folder
@@ -4136,7 +4194,8 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, LLUUID category, BOO
gest_cat_array,
gest_item_array,
LLInventoryModel::EXCLUDE_TRASH,
- is_gesture);
+ is_gesture,
+ follow_folder_links);
S32 gest_count = gest_item_array.count();
if( !wearable_count && !obj_count && !gest_count)
@@ -4144,11 +4203,26 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, LLUUID category, BOO
LLNotifications::instance().add("CouldNotPutOnOutfit");
return;
}
+
+ const LLUUID &current_outfit_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT);
- // Processes that take time should show the busy cursor
if (wearable_count > 0 || obj_count > 0)
{
+ // Processes that take time should show the busy cursor
inc_busy_count();
+
+ // Remove all current outfit folder links if we're now replacing the contents.
+ if (!append)
+ {
+ LLInventoryModel::cat_array_t cat_array;
+ LLInventoryModel::item_array_t item_array;
+ gInventory.collectDescendents(current_outfit_id, cat_array, item_array,
+ LLInventoryModel::EXCLUDE_TRASH);
+ for (i = 0; i < item_array.count(); ++i)
+ {
+ gInventory.purgeObject(item_array.get(i)->getUUID());
+ }
+ }
}
// Activate all gestures in this folder
@@ -4189,8 +4263,14 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, LLUUID category, BOO
for(i = 0; i < wearable_count; ++i)
{
gAddToOutfit = append;
-
found = found_container.get(i);
+
+ // Populate the current outfit folder with links to the newly added wearables
+ std::string link_name = "WearableLink";
+ link_inventory_item(gAgent.getID(), found->mItemID, current_outfit_id, link_name,
+ LLAssetType::AT_LINK, LLPointer<LLInventoryCallback>(NULL));
+
+ // Fetch the wearables about to be worn.
LLWearableList::instance().getAsset(found->mAssetID,
found->mName,
found->mAssetType,
@@ -4245,9 +4325,9 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, LLUUID category, BOO
msg->addBOOLFast(_PREHASH_FirstDetachAll, !append );
}
- LLInventoryItem* item = obj_item_array.get(i);
+ const LLInventoryItem* item = obj_item_array.get(i).get();
msg->nextBlockFast(_PREHASH_ObjectData );
- msg->addUUIDFast(_PREHASH_ItemID, item->getUUID() );
+ msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID());
msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner());
msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point
pack_permissions_slam(msg, item->getFlags(), item->getPermissions());
@@ -4259,9 +4339,26 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, LLUUID category, BOO
// End of message chunk
msg->sendReliable( gAgent.getRegion()->getHost() );
}
+
+ }
+
+ for(i = 0; i < obj_count; ++i)
+ {
+ const std::string link_name = "AttachmentLink";
+ const LLInventoryItem* item = obj_item_array.get(i).get();
+ link_inventory_item(gAgent.getID(), item->getLinkedUUID(), current_outfit_id, link_name,
+ LLAssetType::AT_LINK, LLPointer<LLInventoryCallback>(NULL));
}
}
}
+
+ // Create a link to the folder that we wore.
+ LLViewerInventoryCategory* catp = gInventory.getCategory(category);
+ if (catp)
+ {
+ link_inventory_item(gAgent.getID(), category, current_outfit_id, catp->getName(),
+ LLAssetType::AT_LINK_FOLDER, LLPointer<LLInventoryCallback>(NULL));
+ }
}
}
@@ -4588,7 +4685,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Open"));
}
- if (item && LLAssetType::lookupIsLinkType(item->getActualType()))
+ if (item && item->getIsLinkType())
{
items.push_back(std::string("Goto Link"));
}
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 915dfec629..5cfebe6c15 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -157,6 +157,7 @@ public:
}
virtual std::string getLabelSuffix() const { return LLStringUtil::null; }
virtual void openItem() {}
+ virtual void closeItem() {}
virtual void gotoItem(LLFolderView *folder) {} // for links
virtual void previewItem() {openItem();}
virtual void showProperties();
@@ -271,6 +272,7 @@ public:
BOOL drop);
virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action);
virtual void openItem();
+ virtual void closeItem();
virtual BOOL isItemRenameable() const;
virtual void selectItem();
virtual void restoreItem();
@@ -325,6 +327,8 @@ protected:
BOOL checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck);
void modifyOutfit(BOOL append);
+ void determineFolderType();
+
public:
static LLFolderBridge* sSelf;
static void staticFolderOptionsMenu();
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 9cbe11f5c9..596211f16c 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -39,6 +39,7 @@
#include "llfolderviewitem.h"
#include "llinventorymodel.h" // gInventory.backgroundFetchActive()
#include "llviewercontrol.h"
+#include "llviewerinventory.h"
// linden library includes
#include "lltrans.h"
@@ -51,12 +52,13 @@ LLInventoryFilter::LLInventoryFilter(const std::string& name)
mModified(FALSE),
mNeedTextRebuild(TRUE)
{
- mFilterOps.mFilterTypes = 0xffffffff;
+ mFilterOps.mFilterTypes = 0xffffffffffffffffULL;
mFilterOps.mMinDate = time_min();
mFilterOps.mMaxDate = time_max();
mFilterOps.mHoursAgo = 0;
mFilterOps.mShowFolderState = SHOW_NON_EMPTY_FOLDERS;
mFilterOps.mPermissions = PERM_NONE;
+ mFilterOps.mFilterForCategories = FALSE;
mOrder = SO_FOLDERS_BY_NAME; // This gets overridden by a pref immediately
@@ -94,7 +96,25 @@ BOOL LLInventoryFilter::check(LLFolderViewItem* item)
}
LLFolderViewEventListener* listener = item->getListener();
mSubStringMatchOffset = mFilterSubString.size() ? item->getSearchableLabel().find(mFilterSubString) : std::string::npos;
- BOOL passed = (0x1 << listener->getInventoryType() & mFilterOps.mFilterTypes || listener->getInventoryType() == LLInventoryType::IT_NONE)
+
+ bool passed_type = false;
+ if (mFilterOps.mFilterForCategories)
+ {
+ if (listener->getInventoryType() == LLInventoryType::IT_CATEGORY)
+ {
+ LLViewerInventoryCategory *cat = gInventory.getCategory(listener->getUUID());
+ if (cat)
+ {
+ passed_type |= ((1LL << cat->getPreferredType() & mFilterOps.mFilterTypes) != U64(0));
+ }
+ }
+ }
+ else
+ {
+ passed_type |= ((1LL << listener->getInventoryType() & mFilterOps.mFilterTypes) != U64(0)) || listener->getInventoryType() == LLInventoryType::IT_NONE;
+ }
+
+ BOOL passed = passed_type
&& (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos)
&& ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions)
&& (listener->getCreationDate() >= earliest && listener->getCreationDate() <= mFilterOps.mMaxDate);
@@ -124,7 +144,7 @@ BOOL LLInventoryFilter::isNotDefault()
BOOL LLInventoryFilter::isActive()
{
- return mFilterOps.mFilterTypes != 0xffffffff
+ return mFilterOps.mFilterTypes != 0xffffffffffffffffULL
|| mFilterSubString.size()
|| mFilterOps.mPermissions != PERM_NONE
|| mFilterOps.mMinDate != time_min()
@@ -144,7 +164,7 @@ BOOL LLInventoryFilter::isModifiedAndClear()
return ret;
}
-void LLInventoryFilter::setFilterTypes(U32 types)
+void LLInventoryFilter::setFilterTypes(U64 types, BOOL filter_for_categories)
{
if (mFilterOps.mFilterTypes != types)
{
@@ -168,8 +188,8 @@ void LLInventoryFilter::setFilterTypes(U32 types)
{
setModified(FILTER_MORE_RESTRICTIVE);
}
-
}
+ mFilterOps.mFilterForCategories = filter_for_categories;
}
void LLInventoryFilter::setFilterSubString(const std::string& string)
@@ -374,7 +394,7 @@ void LLInventoryFilter::setModified(EFilterBehavior behavior)
BOOL LLInventoryFilter::isFilterWith(LLInventoryType::EType t)
{
- return mFilterOps.mFilterTypes & (0x01 << t);
+ return mFilterOps.mFilterTypes & (1LL << t);
}
std::string LLInventoryFilter::getFilterText()
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index 7c5f6681cf..670b1f000b 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -64,7 +64,7 @@ public:
LLInventoryFilter(const std::string& name);
virtual ~LLInventoryFilter();
- void setFilterTypes(U32 types);
+ void setFilterTypes(U64 types, BOOL filter_for_categories = FALSE); // if filter_for_categories is true, operate on folder preferred asset type
U32 getFilterTypes() const { return mFilterOps.mFilterTypes; }
void setFilterSubString(const std::string& string);
@@ -120,7 +120,8 @@ public:
protected:
struct filter_ops
{
- U32 mFilterTypes;
+ U64 mFilterTypes;
+ BOOL mFilterForCategories;
time_t mMinDate;
time_t mMaxDate;
U32 mHoursAgo;
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 9d3d383d1c..6e89fd75e9 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -434,7 +434,8 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
cat_array_t& cats,
item_array_t& items,
BOOL include_trash,
- LLInventoryCollectFunctor& add)
+ LLInventoryCollectFunctor& add,
+ BOOL follow_folder_links)
{
// Start with categories
if(!include_trash)
@@ -458,9 +459,38 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
}
}
- // Move onto items
LLViewerInventoryItem* item = NULL;
item_array_t* item_array = get_ptr_in_map(mParentChildItemTree, id);
+
+ // Follow folder links recursively. Currently never goes more
+ // than one level deep (for current outfit support)
+ // Note: if making it fully recursive, need more checking against infinite loops.
+ if (follow_folder_links && item_array)
+ {
+ S32 count = item_array->count();
+ for(S32 i = 0; i < count; ++i)
+ {
+ item = item_array->get(i);
+ if (item->getActualType() == LLAssetType::AT_LINK_FOLDER)
+ {
+ // BAP either getLinkedCategory() should return non-const, or the functor should take const.
+ LLViewerInventoryCategory *linked_cat = const_cast<LLViewerInventoryCategory*>(item->getLinkedCategory());
+ if (linked_cat)
+ {
+ if(add(linked_cat,NULL))
+ {
+ // BAP should this be added here? May not
+ // matter if it's only being used in current
+ // outfit traversal.
+ cats.put(LLPointer<LLViewerInventoryCategory>(linked_cat));
+ }
+ collectDescendentsIf(linked_cat->getUUID(), cats, items, include_trash, add, FALSE);
+ }
+ }
+ }
+ }
+
+ // Move onto items
if(item_array)
{
S32 count = item_array->count();
@@ -565,9 +595,11 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
}
LLViewerInventoryItem* old_item = getItem(item->getUUID());
+ LLPointer<LLViewerInventoryItem> new_item;
if(old_item)
{
// We already have an old item, modify its values
+ new_item = old_item;
LLUUID old_parent_id = old_item->getParentUUID();
LLUUID new_parent_id = item->getParentUUID();
if(old_parent_id != new_parent_id)
@@ -596,7 +628,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
else
{
// Simply add this item
- LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
+ new_item = new LLViewerInventoryItem(item);
addItem(new_item);
if(item->getParentUUID().isNull())
@@ -656,11 +688,24 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
}
mask |= LLInventoryObserver::ADD;
}
- if(item->getType() == LLAssetType::AT_CALLINGCARD)
+ if(new_item->getType() == LLAssetType::AT_CALLINGCARD)
{
mask |= LLInventoryObserver::CALLING_CARD;
+ // Handle user created calling cards.
+ // Target ID is stored in the description field of the card.
+ LLUUID id;
+ std::string desc = new_item->getDescription();
+ BOOL isId = desc.empty() ? FALSE : id.set(desc, FALSE);
+ if (isId)
+ {
+ // Valid UUID; set the item UUID and rename it
+ new_item->setCreator(id);
+ std::string avatar_name;
+ // Fetch the currect name
+ gCacheName->get(id, FALSE, boost::bind(&LLViewerInventoryItem::onCallingCardNameLookup, new_item.get(), _1, _2, _3));
+ }
}
- addChangedMask(mask, item->getUUID());
+ addChangedMask(mask, new_item->getUUID());
return mask;
}
@@ -857,7 +902,7 @@ void LLInventoryModel::purgeLinkedObjects(const LLUUID &id)
LLInventoryObject* objectp = getObject(id);
if (!objectp) return;
- if (LLAssetType::lookupIsLinkType(objectp->getActualType()))
+ if (objectp->getIsLinkType())
{
return;
}
@@ -1181,14 +1226,14 @@ void LLInventoryModel::fetchInventoryResponder::error(U32 status, const std::str
gInventory.notifyObservers("fetchinventory");
}
-void LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id)
+bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id)
{
LLViewerInventoryCategory* cat = getCategory(folder_id);
if(!cat)
{
llwarns << "Asked to fetch descendents of non-existent folder: "
<< folder_id << llendl;
- return;
+ return false;
}
//S32 known_descendents = 0;
///cat_array_t* categories = get_ptr_in_map(mParentChildCategoryTree, folder_id);
@@ -1201,10 +1246,7 @@ void LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id)
//{
// known_descendents += items->count();
//}
- if(!cat->fetchDescendents())
- {
- //llinfos << "Not fetching descendents" << llendl;
- }
+ return cat->fetchDescendents();
}
//Initialize statics.
@@ -1322,6 +1364,7 @@ void fetchDescendentsResponder::result(const LLSD& content)
{
cat->setVersion(version);
cat->setDescendentCount(descendents);
+ cat->determineFolderType();
}
}
@@ -4036,7 +4079,7 @@ bool LLAssetIDMatches::operator()(LLInventoryCategory* cat, LLInventoryItem* ite
bool LLLinkedItemIDMatches::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
{
return (item &&
- (LLAssetType::lookupIsLinkType(item->getActualType())) &&
+ (item->getIsLinkType()) &&
(item->getLinkedUUID() == mBaseItemID)); // A linked item's assetID will be the compared-to item's itemID.
}
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index da10528c9d..bd0aaa3678 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -185,7 +185,8 @@ public:
cat_array_t& categories,
item_array_t& items,
BOOL include_trash,
- LLInventoryCollectFunctor& add);
+ LLInventoryCollectFunctor& add,
+ BOOL follow_folder_links = FALSE);
// Collect all items in inventory that are linked to item_id.
// Assumes item_id is itself not a linked item.
@@ -296,8 +297,9 @@ public:
// minimal functionality before the actual arrival of inventory.
//void mock(const LLUUID& root_id);
- // make sure we have the descendents in the structure.
- void fetchDescendentsOf(const LLUUID& folder_id);
+ // Make sure we have the descendents in the structure. Returns true
+ // if a fetch was performed.
+ bool fetchDescendentsOf(const LLUUID& folder_id);
// Add categories to a list to be fetched in bulk.
static void bulkFetch(std::string url);
diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp
index 68143fd1e3..03d6953521 100644
--- a/indra/newview/lllocationhistory.cpp
+++ b/indra/newview/lllocationhistory.cpp
@@ -38,33 +38,58 @@
#include "llui.h"
+const char LLLocationHistory::delimiter = '\t';
+
LLLocationHistory::LLLocationHistory() :
mFilename("typed_locations.txt")
{
}
-void LLLocationHistory::addItem(std::string item)
-{
+void LLLocationHistory::addItem(const std::string & item, const std::string & tooltip) {
static LLUICachedControl<S32> max_items("LocationHistoryMaxSize", 100);
-
- std::vector<std::string>::iterator item_iter = std::find(mItems.begin(), mItems.end(), item);
- if (item_iter != mItems.end()) {
- mItems.erase(item_iter);
+ // check if this item doesn't duplicate any existing one
+ if (touchItem(item)) {
+ return;
}
mItems.push_back(item);
+ mToolTips[item] = tooltip;
// If the vector size exceeds the maximum, purge the oldest items.
- if ((S32)mItems.size() > max_items)
- mItems.erase(mItems.begin(), mItems.end()-max_items);
+ if ((S32)mItems.size() > max_items) {
+ for(std::vector<std::string>::iterator i = mItems.begin(); i != mItems.end()-max_items; ++i) {
+ mToolTips.erase(*i);
+ mItems.erase(i);
+ }
+ }
+}
+
+bool LLLocationHistory::touchItem(const std::string & item) {
+ bool result = false;
+ std::vector<std::string>::iterator item_iter = std::find(mItems.begin(), mItems.end(), item);
+
+ // the last used item should be the first in the history
+ if (item_iter != mItems.end()) {
+ mItems.erase(item_iter);
+ mItems.push_back(item);
+ result = true;
+ }
+
+ return result;
}
void LLLocationHistory::removeItems()
{
mItems.clear();
+ mToolTips.clear();
}
+std::string LLLocationHistory::getToolTip(const std::string & item) const {
+ std::map<std::string, std::string>::const_iterator i = mToolTips.find(item);
+
+ return i != mToolTips.end() ? i->second : "";
+}
bool LLLocationHistory::getMatchingItems(std::string substring, location_list_t& result) const
{
@@ -110,7 +135,7 @@ void LLLocationHistory::save() const
}
for (location_list_t::const_iterator it = mItems.begin(); it != mItems.end(); ++it)
- file << (*it) << std::endl;
+ file << (*it) << delimiter << mToolTips.find(*it)->second << std::endl;
file.close();
}
@@ -129,13 +154,21 @@ void LLLocationHistory::load()
return;
}
- // remove current entries before we load over them
- mItems.clear();
+ removeItems();
// add each line in the file to the list
std::string line;
- while (std::getline(file, line))
- addItem(line);
+
+ while (std::getline(file, line)) {
+ size_t dp = line.find(delimiter);
+
+ if (dp != std::string::npos) {
+ const std::string reg_name = line.substr(0, dp);
+ const std::string tooltip = line.substr(dp + 1, std::string::npos);
+
+ addItem(reg_name, tooltip);
+ }
+ }
file.close();
diff --git a/indra/newview/lllocationhistory.h b/indra/newview/lllocationhistory.h
index 19032686c1..67eabcdaca 100644
--- a/indra/newview/lllocationhistory.h
+++ b/indra/newview/lllocationhistory.h
@@ -37,6 +37,7 @@
#include <vector>
#include <string>
+#include <map>
#include <boost/function.hpp>
class LLLocationHistory: public LLSingleton<LLLocationHistory>
@@ -50,8 +51,10 @@ public:
LLLocationHistory();
- void addItem(std::string item);
+ void addItem(const std::string & item, const std::string & tooltip);
+ bool touchItem(const std::string & item);
void removeItems();
+ std::string getToolTip(const std::string & item) const;
size_t getItemCount() const { return mItems.size(); }
const location_list_t& getItems() const { return mItems; }
bool getMatchingItems(std::string substring, location_list_t& result) const;
@@ -62,9 +65,11 @@ public:
void dump() const;
private:
- std::vector<std::string> mItems;
- std::string mFilename; /// File to store the history to.
- loaded_signal_t mLoadedSignal;
+ const static char delimiter;
+ std::vector<std::string> mItems;
+ std::map<std::string, std::string> mToolTips;
+ std::string mFilename; /// File to store the history to.
+ loaded_signal_t mLoadedSignal;
};
#endif
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 3880ea91eb..e2dc7d69a1 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -55,7 +55,7 @@
#include "llviewerinventory.h"
#include "llviewerparcelmgr.h"
#include "llviewercontrol.h"
-
+#include "llurllineeditorctrl.h"
//============================================================================
/*
* "ADD LANDMARK" BUTTON UPDATING LOGIC
@@ -163,12 +163,38 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
mInfoBtn(NULL),
mAddLandmarkBtn(NULL)
{
+ // Lets replace default LLLineEditor with LLLocationLineEditor
+ // to make needed escaping while copying and cutting url
+ this->removeChild(mTextEntry);
+ delete mTextEntry;
+
+ // Can't access old mTextEntry fields as they are protected, so lets build new params
+ // That is C&P from LLComboBox::createLineEditor function
+ static LLUICachedControl<S32> drop_shadow_button ("DropShadowButton", 0);
+ S32 arrow_width = mArrowImage ? mArrowImage->getWidth() : 0;
+ LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
+ text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * drop_shadow_button;
+
+ LLLineEditor::Params params = p.combo_editor;
+ params.rect(text_entry_rect);
+ params.default_text(LLStringUtil::null);
+ params.max_length_bytes(p.max_chars);
+ params.commit_callback.function(boost::bind(&LLComboBox::onTextCommit, this, _2));
+ params.keystroke_callback(boost::bind(&LLComboBox::onTextEntry, this, _1));
+ params.focus_lost_callback(NULL);
+ params.handle_edit_keys_directly(true);
+ params.commit_on_focus_lost(false);
+ params.follows.flags(FOLLOWS_ALL);
+ mTextEntry = LLUICtrlFactory::create<LLURLLineEditor>(params);
+ this->addChild(mTextEntry);
+ // LLLineEditor is replaced with LLLocationLineEditor
+
// "Place information" button.
LLButton::Params info_params = p.info_button;
mInfoBtn = LLUICtrlFactory::create<LLButton>(info_params);
mInfoBtn->setClickedCallback(boost::bind(&LLLocationInputCtrl::onInfoButtonClicked, this));
addChild(mInfoBtn);
-
+
// "Add landmark" button.
LLButton::Params al_params = p.add_landmark_button;
if (p.add_landmark_image_enabled())
@@ -187,6 +213,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
addChild(mAddLandmarkBtn);
setPrearrangeCallback(boost::bind(&LLLocationInputCtrl::onLocationPrearrange, this, _2));
+ getTextEntry()->setMouseUpCallback(boost::bind(&LLLocationInputCtrl::onTextEditorMouseUp, this, _2,_3,_4));
updateWidgetlayout();
@@ -234,17 +261,20 @@ BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, std::string& msg, LLRect*
// Let the buttons show their tooltips.
if (LLUICtrl::handleToolTip(x, y, msg, sticky_rect_screen) && !msg.empty())
{
- return TRUE;
- }
+ if (mList->getRect().pointInRect(x, y)) {
+ LLLocationHistory* lh = LLLocationHistory::getInstance();
+ const std::string tooltip = lh->getToolTip(msg);
- // Cursor is above the text entry.
- msg = LLUI::sShowXUINames ? getShowNamesToolTip() : gAgent.getSLURL();
- if (mTextEntry && sticky_rect_screen)
- {
- *sticky_rect_screen = mTextEntry->calcScreenRect();
+ if (!tooltip.empty()) {
+ msg = tooltip;
+ }
+ }
+
+ return TRUE;
}
- return TRUE;
+ msg = LLUI::sShowXUINames ? getShowNamesToolTip() : "";
+ return mTextEntry->getRect().pointInRect(x, y);
}
BOOL LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask)
@@ -321,19 +351,19 @@ void LLLocationInputCtrl::handleLoginComplete()
void LLLocationInputCtrl::onFocusReceived()
{
prearrangeList();
- setText(gAgent.getSLURL());
- if (mTextEntry)
- mTextEntry->endSelection(); // we don't want handleMouseUp() to "finish" the selection
}
void LLLocationInputCtrl::onFocusLost()
{
LLUICtrl::onFocusLost();
refreshLocation();
+ if(mTextEntry->hasSelection()){
+ mTextEntry->deselect();
+ }
}
void LLLocationInputCtrl::draw(){
- if(!hasFocus()){
+ if(!hasFocus() && gSavedSettings.getBOOL("ShowCoordinatesOption")){
refreshLocation();
}
LLComboBox::draw();
@@ -347,9 +377,6 @@ void LLLocationInputCtrl::onInfoButtonClicked()
void LLLocationInputCtrl::onAddLandmarkButtonClicked()
{
LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark"));
-
- // Floater "Add Landmark" functionality moved to Side Tray
- //LLFloaterReg::showInstance("add_landmark");
}
void LLLocationInputCtrl::onAgentParcelChange()
@@ -374,6 +401,13 @@ void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data)
rebuildLocationHistory(filter);
mList->mouseOverHighlightNthItem(-1); // Clear highlight on the last selected item.
}
+void LLLocationInputCtrl::onTextEditorMouseUp(S32 x, S32 y, MASK mask)
+{
+ if (!mTextEntry->hasSelection()) {
+ setText(gAgent.getUnescapedSLURL());
+ mTextEntry->selectAll();
+ }
+}
void LLLocationInputCtrl::refresh()
{
diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h
index bda67fd313..0196aae4e7 100644
--- a/indra/newview/lllocationinputctrl.h
+++ b/indra/newview/lllocationinputctrl.h
@@ -103,6 +103,7 @@ private:
void onInfoButtonClicked();
void onLocationHistoryLoaded();
void onLocationPrearrange(const LLSD& data);
+ void onTextEditorMouseUp(S32 x, S32 y, MASK mask);
void onLandmarkLoaded(LLLandmark* lm);
void onAddLandmarkButtonClicked();
void onAgentParcelChange();
diff --git a/indra/newview/lllookshistorypanel.h b/indra/newview/lllookshistorypanel.h
new file mode 100644
index 0000000000..986c9a1c4d
--- /dev/null
+++ b/indra/newview/lllookshistorypanel.h
@@ -0,0 +1,72 @@
+/**
+ * @file llpanelteleporthistory.h
+ * @brief Teleport history represented by a scrolling list
+ * class definition
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELLOOKSHISTORY_H
+#define LL_LLPANELLOOKSHISTORY_H
+
+#include "lluictrlfactory.h"
+#include "llscrolllistctrl.h"
+
+#include "llpanelappearancetab.h"
+#include "lllookshistory.h"
+
+class LLLooksHistoryPanel : public LLPanelAppearanceTab
+{
+public:
+ LLLooksHistoryPanel();
+ virtual ~LLLooksHistoryPanel();
+
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onSearchEdit(const std::string& string);
+ /*virtual*/ void onShowOnMap();
+ /*virtual*/ void onLooks();
+ ///*virtual*/ void onCopySLURL();
+
+ void showLooksHistory();
+ void handleItemSelect(const LLSD& data);
+
+ static void onDoubleClickItem(void* user_data);
+
+private:
+ enum LOOKS_HISTORY_COLUMN_ORDER
+ {
+ LIST_ICON,
+ LIST_ITEM_TITLE,
+ LIST_INDEX
+ };
+
+ LLLooksHistory* mLooksHistory;
+ LLScrollListCtrl* mHistoryItems;
+ std::string mFilterSubString;
+};
+
+#endif //LL_LLPANELLOOKSHISTORY_H
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 124a2def7f..fc425d1b33 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -373,8 +373,7 @@ void LLFloaterMove::updatePosition()
LLBottomTray* tray = LLBottomTray::getInstance();
if (!tray) return;
- LLButton* movement_btn = tray->getChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME, TRUE, FALSE);
- if (!movement_btn) return;
+ LLButton* movement_btn = tray->getChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
//align centers of a button and a floater
S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
@@ -435,7 +434,7 @@ void LLFloaterMove::showQuickTips(const EMovementMode mode)
default: llwarns << "Quick Tip type was not detected, FTT_MOVE_WALK will be used" << llendl;
}
- LLFirstTimeTipsManager::showTipsFor(tipType, this);
+ LLFirstTimeTipsManager::showTipsFor(tipType, this, LLFirstTimeTipsManager::TPA_POS_LEFT_ALIGN_TOP);
}
void LLFloaterMove::setModeButtonToggleState(const EMovementMode mode)
@@ -569,8 +568,7 @@ void LLPanelStandStopFlying::updatePosition()
LLBottomTray* tray = LLBottomTray::getInstance();
if (!tray) return;
- LLButton* movement_btn = tray->getChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME, TRUE, FALSE);
- if (!movement_btn) return;
+ LLButton* movement_btn = tray->getChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
//align centers of a button and a floater
S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index 06cab9afb0..0f719f29e9 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -56,6 +56,7 @@
#include "llworldmap.h"
#include "llappviewer.h"
#include "llviewercontrol.h"
+#include "llfavoritesbar.h"
//-- LLTeleportHistoryMenuItem -----------------------------------------------
@@ -181,10 +182,14 @@ LLNavigationBar::LLNavigationBar()
mBtnHome(NULL),
mCmbLocation(NULL),
mLeSearch(NULL),
- mPurgeTPHistoryItems(false)
+ mPurgeTPHistoryItems(false),
+ mUpdateTypedLocationHistory(false)
{
setIsChrome(TRUE);
+ mParcelMgrConnection = LLViewerParcelMgr::getInstance()->setAgentParcelChangedCallback(
+ boost::bind(&LLNavigationBar::onTeleportFinished, this));
+
// Register callbacks and load the location field context menu (NB: the order matters).
mCommitCallbackRegistrar.add("Navbar.Action", boost::bind(&LLNavigationBar::onLocationContextMenuItemClicked, this, _2));
mEnableCallbackRegistrar.add("Navbar.EnableMenuItem", boost::bind(&LLNavigationBar::onLocationContextMenuItemEnabled, this, _2));
@@ -196,10 +201,14 @@ LLNavigationBar::LLNavigationBar()
// set a listener function for LoginComplete event
LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLNavigationBar::handleLoginComplete, this));
+
+ // Necessary for focus movement among child controls
+ setFocusRoot(TRUE);
}
LLNavigationBar::~LLNavigationBar()
{
+ mParcelMgrConnection.disconnect();
sInstance = 0;
}
@@ -241,6 +250,9 @@ BOOL LLNavigationBar::postBuild()
return FALSE;
}
+ mDefaultNbRect = getRect();
+ mDefaultFpRect = getChild<LLFavoritesBarCtrl>("favorite")->getRect();
+
// we'll be notified on teleport history changes
LLTeleportHistory::getInstance()->setHistoryChangedCallback(
boost::bind(&LLNavigationBar::onTeleportHistoryChanged, this));
@@ -273,6 +285,11 @@ BOOL LLNavigationBar::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
mLocationContextMenu->buildDrawLabels();
mLocationContextMenu->updateParent(LLMenuGL::sMenuContainer);
+ LLLineEditor* textEntry =mCmbLocation->getTextEntry();
+ if(textEntry && !textEntry->hasSelection() ){
+ textEntry->setText(gAgent.getUnescapedSLURL());
+ textEntry->selectAll();
+ }
LLMenuGL::showPopup(this, mLocationContextMenu, x, y);
}
return TRUE;
@@ -324,12 +341,12 @@ void LLNavigationBar::onLocationSelection()
std::string region_name;
LLVector3 local_coords(128, 128, 0);
+ S32 x = 0, y = 0, z = 0;
// Is the typed location a SLURL?
if (LLSLURL::isSLURL(typed_location))
{
// Yes. Extract region name and local coordinates from it.
- S32 x = 0, y = 0, z = 0;
if (LLURLSimString::parse(LLSLURL::stripProtocol(typed_location), &region_name, &x, &y, &z))
local_coords.set(x, y, z);
else
@@ -337,8 +354,13 @@ void LLNavigationBar::onLocationSelection()
}
else
{
+ region_name = extractLocalCoordsFromRegName(typed_location, &x, &y, &z);
+
+ if (region_name != typed_location) {
+ local_coords.set(x, y, z);
+ }
// Treat it as region name.
- region_name = typed_location;
+ // region_name = typed_location;
}
// Resolve the region name to its global coordinates.
@@ -349,6 +371,32 @@ void LLNavigationBar::onLocationSelection()
LLWorldMap::getInstance()->sendNamedRegionRequest(region_name, cb, std::string("unused"), false);
}
+void LLNavigationBar::onTeleportFinished() {
+
+ if (mUpdateTypedLocationHistory) {
+ LLLocationHistory* lh = LLLocationHistory::getInstance();
+
+ // Location is valid. Add it to the typed locations history.
+ // If user has typed text this variable will contain -1.
+ if (mCmbLocation->getCurrentIndex() != -1) {
+ lh->touchItem(mCmbLocation->getSelectedItemLabel());
+ } else {
+ std::string region_name;
+ std::string url = gAgent.getSLURL();
+ S32 x = 0, y = 0, z = 0;
+
+ if (LLSLURL::isSLURL(url)) {
+ LLURLSimString::parse(LLSLURL::stripProtocol(url), &region_name, &x, &y, &z);
+ appendLocalCoordsToRegName(&region_name, x, y, z);
+ lh->addItem(region_name, url);
+ }
+ }
+
+ lh->save();
+ mUpdateTypedLocationHistory = false;
+ }
+}
+
void LLNavigationBar::onTeleportHistoryChanged()
{
// Update navigation controls.
@@ -415,27 +463,13 @@ void LLNavigationBar::onRegionNameResponse(
return;
}
- // Location is valid. Add it to the typed locations history.
- // If user has typed text this variable will contain -1.
- S32 selected_item = mCmbLocation->getCurrentIndex();
-
- /*
- LLLocationHistory* lh = LLLocationHistory::getInstance();
- lh->addItem(selected_item == -1 ? typed_location : mCmbLocation->getSelectedItemLabel());
- lh->save();
- */
-
// Teleport to the location.
LLVector3d region_pos = from_region_handle(region_handle);
LLVector3d global_pos = region_pos + (LLVector3d) local_coords;
-
+ mUpdateTypedLocationHistory = true;
llinfos << "Teleporting to: " << global_pos << llendl;
gAgent.teleportViaLocation(global_pos);
-
- LLLocationHistory* lh = LLLocationHistory::getInstance();
- lh->addItem(selected_item == -1 ? typed_location : mCmbLocation->getSelectedItemLabel());
- lh->save();
}
void LLNavigationBar::showTeleportHistoryMenu()
@@ -474,9 +508,6 @@ void LLNavigationBar::onLocationContextMenuItemClicked(const LLSD& userdata)
else if (item == std::string("landmark"))
{
LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark"));
-
- // Floater "Add Landmark" functionality moved to Side Tray
- //LLFloaterReg::showInstance("add_landmark");
}
else if (item == std::string("cut"))
{
@@ -546,6 +577,38 @@ void LLNavigationBar::invokeSearch(std::string search_text)
LLFloaterReg::showInstance("search", LLSD().insert("panel", "all").insert("id", LLSD(search_text)));
}
+void LLNavigationBar::appendLocalCoordsToRegName(std::string* reg_name, S32 x, S32 y, S32 z) {
+ std::string fmt = *reg_name + " (%d, %d, %d)";
+ *reg_name = llformat(fmt.c_str(), x, y, z);
+}
+
+std::string LLNavigationBar::extractLocalCoordsFromRegName(const std::string & reg_name, S32* x, S32* y, S32* z) {
+ /*
+ * This regular expression extracts numbers from the following string
+ * construct: "(num1, num2, num3)", where num1, num2 and num3 are decimal
+ * numbers. Leading and trailing spaces are also caught by the expression.
+ */
+ const boost::regex re("\\s*\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)\\s*");
+
+ boost::smatch m;
+ if (boost::regex_search(reg_name, m, re)) {
+ // string representations of parsed by regex++ numbers
+ std::string xstr(m[1].first, m[1].second);
+ std::string ystr(m[2].first, m[2].second);
+ std::string zstr(m[3].first, m[3].second);
+
+ *x = atoi(xstr.c_str());
+ *y = atoi(ystr.c_str());
+ *z = atoi(zstr.c_str());
+
+ return boost::regex_replace(reg_name, re, "");
+ }
+
+ *x = *y = *z = 0;
+
+ return reg_name;
+}
+
void LLNavigationBar::clearHistoryCache()
{
mCmbLocation->removeall();
@@ -554,3 +617,131 @@ void LLNavigationBar::clearHistoryCache()
lh->save();
mPurgeTPHistoryItems= true;
}
+
+void LLNavigationBar::showNavigationPanel(BOOL visible)
+{
+ bool fpVisible = gSavedSettings.getBOOL("ShowNavbarFavoritesPanel");
+
+ LLFavoritesBarCtrl* fb = getChild<LLFavoritesBarCtrl>("favorite");
+ LLPanel* navPanel = getChild<LLPanel>("navigation_panel");
+
+ LLRect nbRect(getRect());
+ LLRect fbRect(fb->getRect());
+
+ navPanel->setVisible(visible);
+
+ if (visible)
+ {
+ if (fpVisible)
+ {
+ // Navigation Panel must be shown. Favorites Panel is visible.
+
+ nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), mDefaultNbRect.getHeight());
+ fbRect.setLeftTopAndSize(fbRect.mLeft, mDefaultFpRect.mTop, fbRect.getWidth(), fbRect.getHeight());
+
+ // this is duplicated in 'else' section because it should be called BEFORE fb->reshape
+ reshape(nbRect.getWidth(), nbRect.getHeight());
+ setRect(nbRect);
+
+ fb->reshape(fbRect.getWidth(), fbRect.getHeight());
+ fb->setRect(fbRect);
+ }
+ else
+ {
+ // Navigation Panel must be shown. Favorites Panel is hidden.
+
+ S32 height = mDefaultNbRect.getHeight() - mDefaultFpRect.getHeight();
+ nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), height);
+
+ reshape(nbRect.getWidth(), nbRect.getHeight());
+ setRect(nbRect);
+ }
+ }
+ else
+ {
+ if (fpVisible)
+ {
+ // Navigation Panel must be hidden. Favorites Panel is visible.
+
+ nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), fbRect.getHeight());
+ fbRect.setLeftTopAndSize(fbRect.mLeft, fbRect.getHeight(), fbRect.getWidth(), fbRect.getHeight());
+
+ // this is duplicated in 'else' section because it should be called BEFORE fb->reshape
+ reshape(nbRect.getWidth(), nbRect.getHeight());
+ setRect(nbRect);
+
+ fb->reshape(fbRect.getWidth(), fbRect.getHeight());
+ fb->setRect(fbRect);
+ }
+ else
+ {
+ // Navigation Panel must be hidden. Favorites Panel is hidden.
+
+ nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), 0);
+
+ reshape(nbRect.getWidth(), nbRect.getHeight());
+ setRect(nbRect);
+ }
+ }
+}
+
+void LLNavigationBar::showFavoritesPanel(BOOL visible)
+{
+ bool npVisible = gSavedSettings.getBOOL("ShowNavbarNavigationPanel");
+
+ LLFavoritesBarCtrl* fb = getChild<LLFavoritesBarCtrl>("favorite");
+
+ LLRect nbRect(getRect());
+ LLRect fbRect(fb->getRect());
+
+ if (visible)
+ {
+ if (npVisible)
+ {
+ // Favorites Panel must be shown. Navigation Panel is visible.
+
+ S32 fbHeight = fbRect.getHeight();
+ S32 newHeight = nbRect.getHeight() + fbHeight;
+
+ nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), newHeight);
+ fbRect.setLeftTopAndSize(mDefaultFpRect.mLeft, mDefaultFpRect.mTop, fbRect.getWidth(), fbRect.getHeight());
+ }
+ else
+ {
+ // Favorites Panel must be shown. Navigation Panel is hidden.
+
+ S32 fpHeight = mDefaultFpRect.getHeight();
+ nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), fpHeight);
+ fbRect.setLeftTopAndSize(fbRect.mLeft, fpHeight, fbRect.getWidth(), fpHeight);
+ }
+
+ reshape(nbRect.getWidth(), nbRect.getHeight());
+ setRect(nbRect);
+
+ fb->reshape(fbRect.getWidth(), fbRect.getHeight());
+ fb->setRect(fbRect);
+ }
+ else
+ {
+ if (npVisible)
+ {
+ // Favorites Panel must be hidden. Navigation Panel is visible.
+
+ S32 fbHeight = fbRect.getHeight();
+ S32 newHeight = nbRect.getHeight() - fbHeight;
+
+ nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), newHeight);
+ }
+ else
+ {
+ // Favorites Panel must be hidden. Navigation Panel is hidden.
+
+ nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), 0);
+ }
+
+ reshape(nbRect.getWidth(), nbRect.getHeight());
+ setRect(nbRect);
+ }
+
+ fb->setVisible(visible);
+}
diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h
index 17a1438912..c533953a02 100644
--- a/indra/newview/llnavigationbar.h
+++ b/indra/newview/llnavigationbar.h
@@ -60,6 +60,9 @@ public:
void handleLoginComplete();
void clearHistoryCache();
+
+ void showNavigationPanel(BOOL visible);
+ void showFavoritesPanel(BOOL visible);
private:
LLNavigationBar();
@@ -68,6 +71,9 @@ private:
void showTeleportHistoryMenu();
void invokeSearch(std::string search_text);
+ static void appendLocalCoordsToRegName(std::string* reg_name, S32 x, S32 y, S32 z);
+ static std::string extractLocalCoordsFromRegName(const std::string & reg_name, S32* x, S32* y, S32* z);
+
// callbacks
bool onLocationContextMenuItemEnabled(const LLSD& userdata);
void onLocationContextMenuItemClicked(const LLSD& userdata);
@@ -81,6 +87,7 @@ private:
void onLocationSelection();
void onLocationPrearrange(const LLSD& data);
void onSearchCommit();
+ void onTeleportFinished();
void onRegionNameResponse(
std::string typed_location,
std::string region_name,
@@ -90,14 +97,18 @@ private:
static LLNavigationBar *sInstance;
- LLMenuGL* mLocationContextMenu;
- LLMenuGL* mTeleportHistoryMenu;
- LLButton* mBtnBack;
- LLButton* mBtnForward;
- LLButton* mBtnHome;
- LLSearchEditor* mLeSearch;
- LLLocationInputCtrl* mCmbLocation;
- bool mPurgeTPHistoryItems;
+ LLMenuGL* mLocationContextMenu;
+ LLMenuGL* mTeleportHistoryMenu;
+ LLButton* mBtnBack;
+ LLButton* mBtnForward;
+ LLButton* mBtnHome;
+ LLSearchEditor* mLeSearch;
+ LLLocationInputCtrl* mCmbLocation;
+ LLRect mDefaultNbRect;
+ LLRect mDefaultFpRect;
+ boost::signals2::connection mParcelMgrConnection;
+ bool mPurgeTPHistoryItems;
+ bool mUpdateTypedLocationHistory;
};
#endif
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 1fa1e2a09d..c89715e815 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -48,11 +48,20 @@
#include "llnearbychathandler.h"
#include "llchannelmanager.h"
+//for LLViewerTextEditor support
+#include "llagent.h" // gAgent
+#include "llfloaterscriptdebug.h"
+#include "llviewertexteditor.h"
+#include "llstylemap.h"
+
+
static const S32 RESIZE_BAR_THICKNESS = 3;
LLNearbyChat::LLNearbyChat(const LLSD& key) :
LLFloater(key),
- mEChatTearofState(CHAT_PINNED)
+ mEChatTearofState(CHAT_PINNED),
+ mChatCaptionPanel(NULL),
+ mChatHistoryEditor(NULL)
{
}
@@ -94,23 +103,14 @@ BOOL LLNearbyChat::postBuild()
gSavedSettings.declareS32("nearbychat_showicons_and_names",2,"NearByChat header settings",true);
- /*
- LLChatItemsContainerCtrl* panel = getChild<LLChatItemsContainerCtrl>("chat_history",false,false);
- if(panel)
- {
- panel->setHeaderVisibility((EShowItemHeader)gSavedSettings.getS32("nearbychat_showicons_and_names"));
- }
- */
-
+ mChatCaptionPanel = getChild<LLPanel>("chat_caption", false);
+ mChatHistoryEditor = getChild<LLViewerTextEditor>("Chat History Editor");
+
reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
return LLFloater::postBuild();
}
-#include "llagent.h" // gAgent
-#include "llfloaterscriptdebug.h"
-#include "llviewertexteditor.h"
-#include "llstylemap.h"
LLColor4 nearbychat_get_text_color(const LLChat& chat)
{
@@ -215,15 +215,6 @@ void nearbychat_add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, cons
void LLNearbyChat::addMessage(const LLChat& chat)
{
- /*
- LLChatItemsContainerCtrl* panel = getChild<LLChatItemsContainerCtrl>("chat_history",false,false);
- if(!panel)
- return;
- panel->addMessage(message);
- */
-
- //"Chat History Editor" !!!!!
-
LLColor4 color = nearbychat_get_text_color(chat);
@@ -241,13 +232,12 @@ void LLNearbyChat::addMessage(const LLChat& chat)
// could flash the chat button in the status bar here. JC
- LLViewerTextEditor* history_editor = getChild<LLViewerTextEditor>("Chat History Editor");
- history_editor->setParseHTML(TRUE);
- history_editor->setParseHighlights(TRUE);
+ mChatHistoryEditor->setParseHTML(TRUE);
+ mChatHistoryEditor->setParseHighlights(TRUE);
if (!chat.mMuted)
- nearbychat_add_timestamped_line(history_editor, chat, color);
+ nearbychat_add_timestamped_line(mChatHistoryEditor, chat, color);
}
void LLNearbyChat::onNearbySpeakers()
@@ -270,8 +260,6 @@ void LLNearbyChat::reshape(S32 width, S32 height, BOOL called_from_parent)
LLFloater::reshape(width, height, called_from_parent);
- LLPanel* caption = getChild<LLPanel>("chat_caption",false,false);
-
LLRect resize_rect;
resize_rect.setLeftTopAndSize( 0, height, width, RESIZE_BAR_THICKNESS);
if (mResizeBar[LLResizeBar::TOP])
@@ -301,25 +289,23 @@ void LLNearbyChat::reshape(S32 width, S32 height, BOOL called_from_parent)
mResizeBar[LLResizeBar::RIGHT]->setRect(resize_rect);
}
-
+ // *NOTE: we must check mChatCaptionPanel and mChatHistoryEditor against NULL because reshape is called from the
+ // LLView::initFromParams BEFORE postBuild is called and child controls are not exist yet
LLRect caption_rect;
- if (caption)
+ if (NULL != mChatCaptionPanel)
{
- caption_rect = caption->getRect();
+ caption_rect = mChatCaptionPanel->getRect();
caption_rect.setLeftTopAndSize( 2, height - RESIZE_BAR_THICKNESS, width - 4, caption_rect.getHeight());
- caption->reshape( width - 4, caption_rect.getHeight(), 1);
- caption->setRect(caption_rect);
+ mChatCaptionPanel->reshape( width - 4, caption_rect.getHeight(), 1);
+ mChatCaptionPanel->setRect(caption_rect);
}
- //LLPanel* scroll_panel = getChild<LLPanel>("chat_history",false,false);
- LLViewerTextEditor* scroll_panel = getChild<LLViewerTextEditor>("Chat History Editor");
-
- if (scroll_panel)
+ if (NULL != mChatHistoryEditor)
{
- LLRect scroll_rect = scroll_panel->getRect();
+ LLRect scroll_rect = mChatHistoryEditor->getRect();
scroll_rect.setLeftTopAndSize( 2, height - caption_rect.getHeight() - RESIZE_BAR_THICKNESS, width - 4, height - caption_rect.getHeight() - RESIZE_BAR_THICKNESS*2);
- scroll_panel->reshape( width - 4, height - caption_rect.getHeight() - RESIZE_BAR_THICKNESS*2, 1);
- scroll_panel->setRect(scroll_rect);
+ mChatHistoryEditor->reshape( width - 4, height - caption_rect.getHeight() - RESIZE_BAR_THICKNESS*2, 1);
+ mChatHistoryEditor->setRect(scroll_rect);
}
//
@@ -342,57 +328,47 @@ void LLNearbyChat::reshape(S32 width, S32 height, BOOL called_from_parent)
BOOL LLNearbyChat::handleMouseDown (S32 x, S32 y, MASK mask)
{
- LLPanel* caption = getChild<LLPanel>("chat_caption",false,false);
- if(caption)
+ LLUICtrl* nearby_speakers_btn = mChatCaptionPanel->getChild<LLUICtrl>("nearby_speakers_btn");
+ LLUICtrl* tearoff_btn = mChatCaptionPanel->getChild<LLUICtrl>("tearoff_btn");
+ LLUICtrl* close_btn = mChatCaptionPanel->getChild<LLUICtrl>("close_btn");
+
+ S32 caption_local_x = x - mChatCaptionPanel->getRect().mLeft;
+ S32 caption_local_y = y - mChatCaptionPanel->getRect().mBottom;
+
+ S32 local_x = caption_local_x - nearby_speakers_btn->getRect().mLeft;
+ S32 local_y = caption_local_y - nearby_speakers_btn->getRect().mBottom;
+ if(nearby_speakers_btn->pointInView(local_x, local_y))
{
- LLUICtrl* nearby_speakers_btn = caption->getChild<LLUICtrl>("nearby_speakers_btn");
- LLUICtrl* tearoff_btn = caption->getChild<LLUICtrl>("tearoff_btn");
- LLUICtrl* close_btn = caption->getChild<LLUICtrl>("close_btn");
-
- S32 caption_local_x = x - caption->getRect().mLeft;
- S32 caption_local_y = y - caption->getRect().mBottom;
-
- if(nearby_speakers_btn && tearoff_btn)
- {
- S32 local_x = caption_local_x - nearby_speakers_btn->getRect().mLeft;
- S32 local_y = caption_local_y - nearby_speakers_btn->getRect().mBottom;
- if(nearby_speakers_btn->pointInView(local_x, local_y))
- {
- onNearbySpeakers();
- bringToFront( x, y );
- return true;
- }
- local_x = caption_local_x - tearoff_btn->getRect().mLeft;
- local_y = caption_local_y- tearoff_btn->getRect().mBottom;
- if(tearoff_btn->pointInView(local_x, local_y))
- {
- onTearOff();
- bringToFront( x, y );
- return true;
- }
+ onNearbySpeakers();
+ bringToFront( x, y );
+ return true;
+ }
+ local_x = caption_local_x - tearoff_btn->getRect().mLeft;
+ local_y = caption_local_y- tearoff_btn->getRect().mBottom;
+ if(tearoff_btn->pointInView(local_x, local_y))
+ {
+ onTearOff();
+ bringToFront( x, y );
+ return true;
+ }
- if(close_btn)
- {
- local_x = caption_local_x - close_btn->getRect().mLeft;
- local_y = caption_local_y - close_btn->getRect().mBottom;
- if(close_btn->pointInView(local_x, local_y))
- {
- setVisible(false);
- bringToFront( x, y );
- return true;
- }
- }
- }
+ local_x = caption_local_x - close_btn->getRect().mLeft;
+ local_y = caption_local_y - close_btn->getRect().mBottom;
+ if(close_btn->pointInView(local_x, local_y))
+ {
+ setVisible(false);
+ bringToFront( x, y );
+ return true;
+ }
- if(mEChatTearofState == CHAT_UNPINNED && caption->pointInView(caption_local_x, caption_local_y) )
- {
- //start draggind
- gFocusMgr.setMouseCapture(this);
- mStart_Y = y;
- mStart_X = x;
- bringToFront( x, y );
- return true;
- }
+ if(mEChatTearofState == CHAT_UNPINNED && mChatCaptionPanel->pointInView(caption_local_x, caption_local_y) )
+ {
+ //start draggind
+ gFocusMgr.setMouseCapture(this);
+ mStart_Y = y;
+ mStart_X = x;
+ bringToFront( x, y );
+ return true;
}
return LLFloater::handleMouseDown(x,y,mask);
@@ -425,8 +401,7 @@ BOOL LLNearbyChat::handleHover(S32 x, S32 y, MASK mask)
void LLNearbyChat::pinn_panel()
{
mEChatTearofState = CHAT_PINNED;
- LLPanel* caption = getChild<LLPanel>("chat_caption",false,false);
- LLIconCtrl* tearoff_btn = caption->getChild<LLIconCtrl>("tearoff_btn",false,false);
+ LLIconCtrl* tearoff_btn = mChatCaptionPanel->getChild<LLIconCtrl>("tearoff_btn",false);
tearoff_btn->setValue("inv_item_landmark_visited.tga");
@@ -445,8 +420,7 @@ void LLNearbyChat::pinn_panel()
void LLNearbyChat::float_panel()
{
mEChatTearofState = CHAT_UNPINNED;
- LLPanel* caption = getChild<LLPanel>("chat_caption",false,false);
- LLIconCtrl* tearoff_btn = caption->getChild<LLIconCtrl>("tearoff_btn",false,false);
+ LLIconCtrl* tearoff_btn = mChatCaptionPanel->getChild<LLIconCtrl>("tearoff_btn", false);
tearoff_btn->setValue("inv_item_landmark.tga");
mResizeBar[LLResizeBar::BOTTOM]->setVisible(true);
@@ -456,50 +430,20 @@ void LLNearbyChat::float_panel()
translate(4,4);
}
-void LLNearbyChat::onNearbyChatContextMenuItemClicked(const LLSD& userdata)
+void LLNearbyChat::onNearbyChatContextMenuItemClicked(const LLSD& userdata)
{
- /*
- LLChatItemsContainerCtrl* panel = getChild<LLChatItemsContainerCtrl>("chat_history",false,false);
- if(!panel)
- return;
-
- std::string str = userdata.asString();
- if(str == "show_buddy_icons")
- panel->setHeaderVisibility(CHATITEMHEADER_SHOW_ONLY_ICON);
- else if(str == "show_names")
- panel->setHeaderVisibility(CHATITEMHEADER_SHOW_ONLY_NAME);
- else if(str == "show_icons_and_names")
- panel->setHeaderVisibility(CHATITEMHEADER_SHOW_BOTH);
-
- gSavedSettings.setS32("nearbychat_showicons_and_names", (S32)panel->getHeaderVisibility());
- */
}
bool LLNearbyChat::onNearbyChatCheckContextMenuItem(const LLSD& userdata)
{
std::string str = userdata.asString();
if(str == "nearby_people")
onNearbySpeakers();
- /*
- LLChatItemsContainerCtrl* panel = getChild<LLChatItemsContainerCtrl>("chat_history",false,false);
- if(!panel)
- return false;
-
- if(str == "show_buddy_icons")
- return panel->getHeaderVisibility() == CHATITEMHEADER_SHOW_ONLY_ICON;
- else if(str == "show_names")
- return panel->getHeaderVisibility() == CHATITEMHEADER_SHOW_ONLY_NAME;
- else if(str == "show_icons_and_names")
- return panel->getHeaderVisibility() == CHATITEMHEADER_SHOW_BOTH;
- else if(str == "nearby_people")
- onNearbySpeakers();
- */
return false;
}
BOOL LLNearbyChat::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- LLPanel* caption = getChild<LLPanel>("chat_caption",false,false);
- if(caption && caption->pointInView(x - caption->getRect().mLeft, y - caption->getRect().mBottom) )
+ if(mChatCaptionPanel->pointInView(x - mChatCaptionPanel->getRect().mLeft, y - mChatCaptionPanel->getRect().mBottom) )
{
LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h
index 670a394c95..efa2e479e6 100644
--- a/indra/newview/llnearbychat.h
+++ b/indra/newview/llnearbychat.h
@@ -38,6 +38,7 @@
#include "llchat.h"
class LLResizeBar;
+class LLViewerTextEditor;
class LLNearbyChat: public LLFloater
{
@@ -87,6 +88,8 @@ private:
//LLResizeBar* mResizeBar[RESIZE_BAR_COUNT];
LLHandle<LLView> mPopupMenuHandle;
+ LLPanel* mChatCaptionPanel;
+ LLViewerTextEditor* mChatHistoryEditor;
};
#endif
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 83f8d14b5f..50e31e85e4 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -179,25 +179,29 @@ LLNearbyChatBar::LLNearbyChatBar()
//virtual
BOOL LLNearbyChatBar::postBuild()
{
- mChatBox = getChild<LLLineEditor>("chat_box",TRUE,FALSE);
+ mChatBox = getChild<LLLineEditor>("chat_box");
- if (mChatBox)
- {
- mChatBox->setCommitCallback(boost::bind(&LLNearbyChatBar::onChatBoxCommit, this));
- mChatBox->setKeystrokeCallback(&onChatBoxKeystroke, this);
- mChatBox->setFocusLostCallback(&onChatBoxFocusLost, this);
-
- mChatBox->setIgnoreArrowKeys(TRUE);
- mChatBox->setCommitOnFocusLost( FALSE );
- mChatBox->setRevertOnEsc( FALSE );
- mChatBox->setIgnoreTab(TRUE);
- mChatBox->setPassDelete(TRUE);
- mChatBox->setReplaceNewlinesWithSpaces(FALSE);
- mChatBox->setMaxTextLength(1023);
- mChatBox->setEnableLineHistory(TRUE);
- }
+ mChatBox->setCommitCallback(boost::bind(&LLNearbyChatBar::onChatBoxCommit, this));
+ mChatBox->setKeystrokeCallback(&onChatBoxKeystroke, this);
+ mChatBox->setFocusLostCallback(&onChatBoxFocusLost, this);
+
+ mChatBox->setIgnoreArrowKeys(TRUE);
+ mChatBox->setCommitOnFocusLost( FALSE );
+ mChatBox->setRevertOnEsc( FALSE );
+ mChatBox->setIgnoreTab(TRUE);
+ mChatBox->setPassDelete(TRUE);
+ mChatBox->setReplaceNewlinesWithSpaces(FALSE);
+ mChatBox->setMaxTextLength(1023);
+ mChatBox->setEnableLineHistory(TRUE);
+
+ mTalkBtn = getChild<LLTalkButton>("talk");
- mTalkBtn = getChild<LLTalkButton>("talk",TRUE,FALSE);
+ // Speak button should be initially disabled because
+ // it takes some time between logging in to world and connecting to voice channel.
+ mTalkBtn->setEnabled(FALSE);
+
+ // Registering Chat Bar to receive Voice client status change notifications.
+ gVoiceClient->addObserver(this);
return TRUE;
}
@@ -208,6 +212,12 @@ LLNearbyChatBar* LLNearbyChatBar::getInstance()
return LLBottomTray::getInstance() ? LLBottomTray::getInstance()->getNearbyChatBar() : NULL;
}
+//static
+bool LLNearbyChatBar::instanceExists()
+{
+ return LLBottomTray::instanceExists() && LLBottomTray::getInstance()->getNearbyChatBar() != NULL;
+}
+
std::string LLNearbyChatBar::getCurrentChat()
{
return mChatBox ? mChatBox->getText() : LLStringUtil::null;
@@ -616,6 +626,27 @@ public:
}
};
+void LLNearbyChatBar::onChange(EStatusType status, const std::string &channelURI, bool proximal)
+{
+ // Time it takes to connect to voice channel might be pretty long,
+ // so don't expect user login or STATUS_VOICE_ENABLED to be followed by STATUS_JOINED.
+ BOOL enable = FALSE;
+
+ switch (status)
+ {
+ // Do not add STATUS_VOICE_ENABLED because voice chat is
+ // inactive until STATUS_JOINED
+ case STATUS_JOINED:
+ enable = TRUE;
+ break;
+ default:
+ enable = FALSE;
+ break;
+ }
+
+ mTalkBtn->setEnabled(enable);
+}
+
// Creating the object registers with the dispatcher.
LLChatHandler gChatHandler;
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index b640aedf7a..4b0c42c3c0 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -38,6 +38,7 @@
#include "llgesturemgr.h"
#include "llchat.h"
#include "llchiclet.h"
+#include "llvoiceclient.h"
class LLGestureComboBox
: public LLComboBox
@@ -65,6 +66,7 @@ protected:
class LLNearbyChatBar
: public LLPanel
+, public LLVoiceClientStatusObserver
{
public:
// constructor for inline chat-bars (e.g. hosted in chat history window)
@@ -75,6 +77,8 @@ public:
static LLNearbyChatBar* getInstance();
+ static bool instanceExists();
+
LLLineEditor* getChatBox() { return mChatBox; }
std::string getCurrentChat();
@@ -87,6 +91,11 @@ public:
static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate);
static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
+ /**
+ * Implements LLVoiceClientStatusObserver::onChange()
+ */
+ /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
+
protected:
static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str);
static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata);
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index cb1b65a604..837f924c44 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -62,7 +62,7 @@ LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& i
mChannel = LLChannelManager::getInstance()->createChannel(p);
mChannel->setFollows(FOLLOWS_LEFT | FOLLOWS_BOTTOM | FOLLOWS_TOP);
mChannel->setOverflowFormatString("You have %d unread nearby chat messages");
- mChannel->setStoreToasts(false);
+ mChannel->setCanStoreToasts(false);
}
LLNearbyChatHandler::~LLNearbyChatHandler()
{
@@ -93,11 +93,11 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
item->setVisible(true);
-
- LLToast* toast = mChannel->addToast(id, item);
-
- toast->setOnMouseEnterCallback(boost::bind(&LLNearbyChatHandler::onToastDestroy, this, toast));
- toast->setAndStartTimer(gSavedSettings.getS32("NotificationToastTime"));
+ LLToast::Params p;
+ p.id = id;
+ p.panel = item;
+ p.on_mouse_enter = boost::bind(&LLNearbyChatHandler::onToastDestroy, this, _1);
+ mChannel->addToast(p);
}
void LLNearbyChatHandler::onToastDestroy(LLToast* toast)
diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp
index 06826998bf..7003879dbf 100644
--- a/indra/newview/llnotificationalerthandler.cpp
+++ b/indra/newview/llnotificationalerthandler.cpp
@@ -67,21 +67,20 @@ LLAlertHandler::~LLAlertHandler()
//--------------------------------------------------------------------------
void LLAlertHandler::processNotification(const LLSD& notify)
{
- LLToast* toast = NULL;
-
LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
if (notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "load")
{
LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal);
-
- toast = mChannel->addToast(notification->getID(), (LLToastPanel*)alert_dialog);
- if(!toast)
- return;
- toast->setHideButtonEnabled(false);
- toast->setOnToastDestroyCallback((boost::bind(&LLAlertHandler::onToastDestroy, this, toast)));
- toast->setCanFade(false);
- toast->setModal(mIsModal);
+ LLToast::Params p;
+ p.id = notification->getID();
+ p.notification = notification;
+ p.panel = dynamic_cast<LLToastPanel*>(alert_dialog);
+ p.enable_hide_btn = false;
+ p.can_fade = false;
+ p.is_modal = mIsModal;
+ p.on_toast_destroy = boost::bind(&LLAlertHandler::onToastDestroy, this, _1);
+ mChannel->addToast(p);
}
else if (notify["sigtype"].asString() == "change")
{
diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp
index ad09f43c10..9a6a041c35 100644
--- a/indra/newview/llnotificationgrouphandler.cpp
+++ b/indra/newview/llnotificationgrouphandler.cpp
@@ -37,6 +37,8 @@
#include "llagent.h"
#include "llbottomtray.h"
#include "llviewercontrol.h"
+#include "llfloaterreg.h"
+#include "llsyswellwindow.h"
using namespace LLNotificationsUI;
@@ -65,18 +67,17 @@ LLGroupHandler::~LLGroupHandler()
//--------------------------------------------------------------------------
void LLGroupHandler::processNotification(const LLSD& notify)
{
- LLToast* toast = NULL;
-
LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change")
{
- LLPanel* notify_box = new LLToastGroupNotifyPanel(notification);
- toast = mChannel->addToast(notification->getID(), notify_box);
- if(!toast)
- return;
- toast->setAndStartTimer(gSavedSettings.getS32("NotificationToastTime"));
- toast->setOnToastDestroyCallback((boost::bind(&LLGroupHandler::onToastDestroy, this, toast)));
- mChiclet->setCounter(mChiclet->getCounter() + 1);
+ LLPanel* notify_box = new LLToastGroupNotifyPanel(notification);
+ LLToast::Params p;
+ p.id = notification->getID();
+ p.notification = notification;
+ p.panel = notify_box;
+ p.on_toast_destroy = boost::bind(&LLGroupHandler::onToastDestroy, this, _1);
+ mChannel->addToast(p);
+ mChiclet->setCounter(mChiclet->getCounter() + 1);
}
else if (notify["sigtype"].asString() == "delete")
{
@@ -88,6 +89,14 @@ void LLGroupHandler::processNotification(const LLSD& notify)
void LLGroupHandler::onToastDestroy(LLToast* toast)
{
mChiclet->setCounter(mChiclet->getCounter() - 1);
+
+ LLToastPanel* panel = dynamic_cast<LLToastPanel*>(toast->getPanel());
+ LLFloaterReg::getTypedInstance<LLSysWellWindow>("syswell_window")->removeItemByID(panel->getID());
+
+ // turning hovering off mannualy because onMouseLeave won't happen if a toast was closed using a keyboard
+ if(toast->hasFocus())
+ mChannel->setHovering(false);
+
toast->close();
}
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
index 9037fc82ab..2e5fdd9ed5 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -127,12 +127,14 @@ public:
LLInfoHandler(e_notification_type type, const LLSD& id);
virtual ~LLInfoHandler();
-
+ // base interface functions
virtual void processNotification(const LLSD& notify);
virtual void onToastDestroy(LLToast* toast);
virtual void onChicletClick(void);
virtual void onChicletClose(void);
+ // own handlers
+ void onStoreToast(LLPanel* info_panel, LLUUID id);
protected:
};
diff --git a/indra/newview/llpanelappearancetab.h b/indra/newview/llpanelappearancetab.h
new file mode 100644
index 0000000000..8a9ba66ec0
--- /dev/null
+++ b/indra/newview/llpanelappearancetab.h
@@ -0,0 +1,65 @@
+/**
+ * @file llpanelplacestab.h
+ * @brief Tabs interface for Side Bar "Places" panel
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2004-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELAPPEARANCETAB_H
+#define LL_LLPANELAPPEARANCETAB_H
+
+#include "llpanel.h"
+
+#include "llpanelappearance.h"
+
+class LLPanelAppearanceTab : public LLPanel
+{
+public:
+ LLPanelAppearanceTab(LLPanelAppearance *parent) :
+ LLPanel(),
+ mParent(parent)
+ {}
+ virtual ~LLPanelAppearanceTab() {}
+
+ virtual void onSearchEdit(const std::string& string) = 0;
+ virtual void updateVerbs() = 0; // Updates buttons at the bottom of Appearance panel
+ virtual void onWear() = 0;
+ virtual void onEdit() = 0;
+ virtual void onNew() = 0;
+
+ bool isTabVisible(); // Check if parent TabContainer is visible.
+
+ void setPanelAppearanceButtons(LLPanelAppearance* panel);
+
+
+protected:
+ LLButton* mWearBtn;
+ LLButton* mEditBtn;
+ LLPanelAppearance* mParent;
+};
+
+#endif //LL_LLPANELAPPEARANCETAB_H
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 91156ae542..6c7fb8a0be 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -31,14 +31,13 @@
*/
#include "llviewerprecompiledheaders.h"
-
#include "llpanelavatar.h"
#include "llagent.h"
+#include "llavataractions.h"
#include "llavatarconstants.h"
#include "llcallingcard.h"
#include "llcombobox.h"
-#include "llavataractions.h"
#include "llimview.h"
#include "lltexteditor.h"
#include "lltexturectrl.h"
@@ -117,136 +116,240 @@ BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
static LLDefaultChildRegistry::Register<LLDropTarget> r("drop_target");
-//////////////////////////////////////////////////////////////////////////
+static LLRegisterPanelClassWrapper<LLPanelAvatarProfile> t_panel_profile("panel_profile");
+static LLRegisterPanelClassWrapper<LLPanelAvatarMeProfile> t_panel_me_profile("panel_me_profile");
+static LLRegisterPanelClassWrapper<LLPanelAvatarNotes> t_panel_notes("panel_notes");
+
//-----------------------------------------------------------------------------
-// LLPanelProfileTab()
+// LLPanelAvatarNotes()
//-----------------------------------------------------------------------------
-//////////////////////////////////////////////////////////////////////////
-LLPanelProfileTab::LLPanelProfileTab(const LLUUID& avatar_id)
- : LLPanel()
- , mAvatarId(LLUUID::null)
- , mProfileType(PT_UNKNOWN)
+LLPanelAvatarNotes::LLPanelAvatarNotes()
+: LLPanelProfileTab()
+{
+
+}
+
+void LLPanelAvatarNotes::updateData()
{
- setAvatarId(avatar_id);
+ LLAvatarPropertiesProcessor::getInstance()->sendDataRequest(getAvatarId(),APT_NOTES);
}
-LLPanelProfileTab::LLPanelProfileTab(const Params& params )
- : LLPanel()
- , mAvatarId(LLUUID::null)
- , mProfileType(PT_UNKNOWN)
+BOOL LLPanelAvatarNotes::postBuild()
{
+ childSetCommitCallback("status_check", boost::bind(&LLPanelAvatarNotes::onCommitRights, this), NULL);
+ childSetCommitCallback("map_check", boost::bind(&LLPanelAvatarNotes::onCommitRights, this), NULL);
+ childSetCommitCallback("objects_check", boost::bind(&LLPanelAvatarNotes::onCommitRights, this), NULL);
+
+ childSetCommitCallback("add_friend", boost::bind(&LLPanelAvatarNotes::onAddFriendButtonClick, this),NULL);
+ childSetCommitCallback("im", boost::bind(&LLPanelAvatarNotes::onIMButtonClick, this), NULL);
+ childSetCommitCallback("call", boost::bind(&LLPanelAvatarNotes::onCallButtonClick, this), NULL);
+ childSetCommitCallback("teleport", boost::bind(&LLPanelAvatarNotes::onTeleportButtonClick, this), NULL);
+ childSetCommitCallback("share", boost::bind(&LLPanelAvatarNotes::onShareButtonClick, this), NULL);
+ LLTextEditor* te = getChild<LLTextEditor>("notes_edit");
+ te->setCommitCallback(boost::bind(&LLPanelAvatarNotes::onCommitNotes,this));
+ te->setCommitOnFocusLost(TRUE);
+
+ resetControls();
+ resetData();
+
+ return TRUE;
}
-LLPanelProfileTab::~LLPanelProfileTab()
+void LLPanelAvatarNotes::onOpen(const LLSD& key)
+{
+ LLPanelProfileTab::onOpen(key);
+
+ fillRightsData();
+
+ //Disable "Add Friend" button for friends.
+ childSetEnabled("add_friend", !LLAvatarActions::isFriend(getAvatarId()));
+}
+
+void LLPanelAvatarNotes::fillRightsData()
{
- if(mAvatarId.notNull())
+ const LLRelationship* relation = LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
+ // If true - we are viewing friend's profile, enable check boxes and set values.
+ if(relation)
{
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
+ S32 rights = relation->getRightsGrantedTo();
+
+ childSetValue("status_check",LLRelationship::GRANT_ONLINE_STATUS & rights ? TRUE : FALSE);
+ childSetValue("map_check",LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE);
+ childSetValue("objects_check",LLRelationship::GRANT_MODIFY_OBJECTS & rights ? TRUE : FALSE);
+
+ childSetEnabled("status_check",TRUE);
+ childSetEnabled("map_check",TRUE);
+ childSetEnabled("objects_check",TRUE);
}
}
-void LLPanelProfileTab::setAvatarId(const LLUUID& avatar_id)
+void LLPanelAvatarNotes::onCommitNotes()
+{
+ std::string notes = childGetValue("notes_edit").asString();
+ LLAvatarPropertiesProcessor::getInstance()-> sendNotes(getAvatarId(),notes);
+}
+
+void LLPanelAvatarNotes::onCommitRights()
+{
+ S32 rights = 0;
+
+ if(childGetValue("status_check").asBoolean())
+ rights |= LLRelationship::GRANT_ONLINE_STATUS;
+ if(childGetValue("map_check").asBoolean())
+ rights |= LLRelationship::GRANT_MAP_LOCATION;
+ if(childGetValue("objects_check").asBoolean())
+ rights |= LLRelationship::GRANT_MODIFY_OBJECTS;
+
+ LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(getAvatarId(),rights);
+}
+
+void LLPanelAvatarNotes::processProperties(void* data, EAvatarProcessorType type)
{
- if(avatar_id.notNull())
+ if(APT_NOTES == type)
{
- if(mAvatarId.notNull())
+ LLAvatarNotes* avatar_notes = static_cast<LLAvatarNotes*>(data);
+ if(avatar_notes && getAvatarId() == avatar_notes->target_id)
{
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarId,this);
+ childSetValue("notes_edit",avatar_notes->notes);
+ childSetEnabled("notes edit", true);
+
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
}
- mAvatarId = avatar_id;
- LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(),this);
- setProfileType();
}
}
-void LLPanelProfileTab::setProfileType()
+void LLPanelAvatarNotes::resetData()
{
- mProfileType = (gAgentID == mAvatarId) ? PT_OWN : PT_OTHER;
+ childSetValue("notes_edit",LLStringUtil::null);
+ // Default value is TRUE
+ childSetValue("status_check", TRUE);
}
-void LLPanelProfileTab::onOpen(const LLSD& key)
+void LLPanelAvatarNotes::resetControls()
+{
+ //Disable "Add Friend" button for friends.
+ childSetEnabled("add_friend", TRUE);
+
+ childSetEnabled("status_check",FALSE);
+ childSetEnabled("map_check",FALSE);
+ childSetEnabled("objects_check",FALSE);
+}
+
+void LLPanelAvatarNotes::onAddFriendButtonClick()
{
- onActivate(key);
+ LLAvatarActions::requestFriendshipDialog(getAvatarId());
}
-void LLPanelProfileTab::onActivate(const LLUUID& id)
+void LLPanelAvatarNotes::onIMButtonClick()
{
- setAvatarId(id);
- scrollToTop();
- updateData();
+ LLAvatarActions::startIM(getAvatarId());
}
-void LLPanelProfileTab::onAddFriend()
+void LLPanelAvatarNotes::onTeleportButtonClick()
{
- if (getAvatarId().notNull())
+ LLAvatarActions::offerTeleport(getAvatarId());
+}
+
+void LLPanelAvatarNotes::onCallButtonClick()
+{
+ //*TODO not implemented.
+}
+
+void LLPanelAvatarNotes::onShareButtonClick()
+{
+ //*TODO not implemented.
+}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+LLPanelProfileTab::LLPanelProfileTab()
+: LLPanel()
+, mAvatarId(LLUUID::null)
+{
+}
+
+LLPanelProfileTab::~LLPanelProfileTab()
+{
+ if(getAvatarId().notNull())
{
- std::string name;
- gCacheName->getFullName(getAvatarId(),name);
- LLAvatarActions::requestFriendshipDialog(getAvatarId(), name);
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
}
}
-void LLPanelProfileTab::onIM()
+void LLPanelProfileTab::setAvatarId(const LLUUID& id)
{
- if (getAvatarId().notNull())
+ if(id.notNull())
{
- std::string name;
- gCacheName->getFullName(getAvatarId(), name);
- gIMMgr->addSession(name, IM_NOTHING_SPECIAL, getAvatarId());
+ if(getAvatarId().notNull())
+ {
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarId,this);
+ }
+ mAvatarId = id;
+ LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(),this);
}
}
-void LLPanelProfileTab::onTeleport()
+void LLPanelProfileTab::onOpen(const LLSD& key)
{
- if(getAvatarId().notNull())
+ // Don't reset panel if we are opening it for same avatar.
+ if(getAvatarId() != key.asUUID())
{
- LLAvatarActions::offerTeleport(getAvatarId());
+ resetControls();
+ resetData();
+
+ scrollToTop();
}
+
+ // Update data even if we are viewing same avatar profile as some data might been changed.
+ setAvatarId(key.asUUID());
+ updateData();
}
void LLPanelProfileTab::scrollToTop()
{
- LLScrollContainer* scrollContainer = getChild<LLScrollContainer>("profile_scroll", FALSE, FALSE);
- if (NULL != scrollContainer)
- {
- scrollContainer->goToTop();
- }
+ LLScrollContainer* scrollContainer = getChild<LLScrollContainer>("profile_scroll");
+ scrollContainer->goToTop();
}
//////////////////////////////////////////////////////////////////////////
-//-----------------------------------------------------------------------------
-// LLPanelAvatarProfile()
-//-----------------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////////
-LLPanelAvatarProfile::LLPanelAvatarProfile(const LLUUID& avatar_id /* = LLUUID::null */)
- : LLPanelProfileTab(avatar_id), mUpdated(false), mEditMode(false), mStatusCombobox(NULL), mStatusMessage(NULL)
-{
- updateData();
-}
+//////////////////////////////////////////////////////////////////////////
-LLPanelAvatarProfile::LLPanelAvatarProfile(const Params& params )
- : LLPanelProfileTab(params), mUpdated(false), mEditMode(false), mStatusCombobox(NULL), mStatusMessage(NULL)
+LLPanelAvatarProfile::LLPanelAvatarProfile()
+: LLPanelProfileTab()
{
}
-LLPanelAvatarProfile::~LLPanelAvatarProfile()
+BOOL LLPanelAvatarProfile::postBuild()
{
- if(getAvatarId().notNull())
- {
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
- }
+ childSetActionTextbox("homepage_edit", boost::bind(&LLPanelAvatarProfile::onHomepageTextboxClicked, this));
+ childSetCommitCallback("add_friend",(boost::bind(&LLPanelAvatarProfile::onAddFriendButtonClick,this)),NULL);
+ childSetCommitCallback("im",(boost::bind(&LLPanelAvatarProfile::onIMButtonClick,this)),NULL);
+ childSetCommitCallback("call",(boost::bind(&LLPanelAvatarProfile::onCallButtonClick,this)),NULL);
+ childSetCommitCallback("teleport",(boost::bind(&LLPanelAvatarProfile::onTeleportButtonClick,this)),NULL);
+ childSetCommitCallback("share",(boost::bind(&LLPanelAvatarProfile::onShareButtonClick,this)),NULL);
+
+ LLTextureCtrl* pic = getChild<LLTextureCtrl>("2nd_life_pic");
+ pic->setFallbackImageName("default_land_picture.j2c");
+
+ pic = getChild<LLTextureCtrl>("real_world_pic");
+ pic->setFallbackImageName("default_land_picture.j2c");
+
+ resetControls();
+ resetData();
+
+ return TRUE;
}
-void* LLPanelAvatarProfile::create(void* data /* = NULL */)
+void LLPanelAvatarProfile::onOpen(const LLSD& key)
{
- LLSD* id = NULL;
- if(data)
- {
- id = static_cast<LLSD*>(data);
- return new LLPanelAvatarProfile(LLUUID(id->asUUID()));
- }
- return new LLPanelAvatarProfile();
+ LLPanelProfileTab::onOpen(key);
+
+ //Disable "Add Friend" button for friends.
+ childSetEnabled("add_friend", !LLAvatarActions::isFriend(getAvatarId()));
}
void LLPanelAvatarProfile::updateData()
@@ -258,6 +361,37 @@ void LLPanelAvatarProfile::updateData()
}
}
+void LLPanelAvatarProfile::resetControls()
+{
+ childSetVisible("status_panel", true);
+ childSetVisible("profile_buttons_panel", true);
+ childSetVisible("title_groups_text", true);
+ childSetVisible("sl_groups", true);
+ childSetEnabled("add_friend", true);
+
+ childSetVisible("user_name", false);
+ childSetVisible("status_me_panel", false);
+ childSetVisible("profile_me_buttons_panel", false);
+ childSetVisible("account_actions_panel", false);
+ childSetVisible("partner_edit_link", false);
+}
+
+void LLPanelAvatarProfile::resetData()
+{
+ childSetValue("2nd_life_pic",LLUUID::null);
+ childSetValue("real_world_pic",LLUUID::null);
+ childSetValue("online_status",LLStringUtil::null);
+ childSetValue("status_message",LLStringUtil::null);
+ childSetValue("sl_description_edit",LLStringUtil::null);
+ childSetValue("fl_description_edit",LLStringUtil::null);
+ childSetValue("sl_groups",LLStringUtil::null);
+ childSetValue("homepage_edit",LLStringUtil::null);
+ childSetValue("register_date",LLStringUtil::null);
+ childSetValue("acc_status_text",LLStringUtil::null);
+ childSetTextArg("partner_text", "[FIRST]", LLStringUtil::null);
+ childSetTextArg("partner_text", "[LAST]", LLStringUtil::null);
+}
+
void LLPanelAvatarProfile::processProperties(void* data, EAvatarProcessorType type)
{
if(APT_PROPERTIES == type)
@@ -265,120 +399,94 @@ void LLPanelAvatarProfile::processProperties(void* data, EAvatarProcessorType ty
const LLAvatarData* avatar_data = static_cast<const LLAvatarData*>(data);
if(avatar_data && getAvatarId() == avatar_data->avatar_id)
{
- childSetValue("register_date", avatar_data->born_on);
- childSetValue("sl_description_edit", avatar_data->about_text);
- childSetValue("fl_description_edit",avatar_data->fl_about_text);
- childSetValue("2nd_life_pic", avatar_data->image_id);
- childSetValue("real_world_pic", avatar_data->fl_image_id);
- childSetValue("homepage_edit", avatar_data->profile_url);
-
- if (!isEditMode())
- {
- setCaptionText(avatar_data);
- if (avatar_data->partner_id.notNull())
- {
- std::string first, last;
- BOOL found = gCacheName->getName(avatar_data->partner_id, first, last);
- if (found)
- {
- childSetTextArg("partner_text", "[FIRST]", first);
- childSetTextArg("partner_text", "[LAST]", last);
- }
- }
- else
- {
- childSetTextArg("partner_text", "[FIRST]", getString("no_partner_text"));
- }
- }
- else
- {
- childSetValue("show_in_search_checkbox", (BOOL)(avatar_data->flags & AVATAR_ALLOW_PUBLISH));
- }
-
-
- bool online = avatar_data->flags & AVATAR_ONLINE;
- if(LLAvatarActions::isFriend(avatar_data->avatar_id))
- {
- // Online status NO could be because they are hidden
- // If they are a friend, we may know the truth!
- online = LLAvatarTracker::instance().isBuddyOnline(avatar_data->avatar_id);
- }
- childSetValue("online_status", online ?
- "Online" : "Offline");
- childSetColor("online_status", online ?
- LLColor4::green : LLColor4::red);
-
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
- }
- if (isOwnProfile() && NULL != mStatusCombobox)
- {
- std::string status;
- if (gAgent.getAFK())
- {
- status = "away";
- }
- else if (gAgent.getBusy())
- {
- status = "busy";
- }
- else
- {
- status = "online";
- }
- mStatusCombobox->setValue(status);
- }
- if (isOwnProfile())
- {
- std::string full_name;
- gCacheName->getFullName(mAvatarId, full_name);
- childSetValue("user_name", full_name);
+ processProfileProperties(avatar_data);
}
}
else if(APT_GROUPS == type)
{
LLAvatarGroups* avatar_groups = static_cast<LLAvatarGroups*>(data);
- if(avatar_groups)
+ if(avatar_groups && getAvatarId() == avatar_groups->avatar_id)
{
- std::string groups;
- if (!avatar_groups->group_list.empty()) {
- LLAvatarGroups::group_list_t::const_iterator it = avatar_groups->group_list.begin();
- LLAvatarGroups::LLGroupData group_data = *it;
- groups+= group_data.group_name;
- while (++it != avatar_groups->group_list.end())
- {
- group_data = *it;
- groups += ", ";
- groups += group_data.group_name;
-
- }
- }
- childSetValue("sl_groups",groups);
+ processGroupProperties(avatar_groups);
}
}
}
-void LLPanelAvatarProfile::clear()
+void LLPanelAvatarProfile::processProfileProperties(const LLAvatarData* avatar_data)
{
- clearControls();
+ fillCommonData(avatar_data);
+
+ fillPartnerData(avatar_data);
+
+ fillOnlineStatus(avatar_data);
+
+ fillAccountStatus(avatar_data);
}
-void LLPanelAvatarProfile::clearControls()
+void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_groups)
{
- childSetValue("2nd_life_pic",LLUUID::null);
- childSetValue("real_world_pic",LLUUID::null);
- childSetValue("online_status",LLStringUtil::null);
- childSetValue("status_message",LLStringUtil::null);
- childSetValue("sl_description_edit",LLStringUtil::null);
- childSetValue("fl_description_edit",LLStringUtil::null);
- childSetValue("sl_groups",LLStringUtil::null);
- childSetValue("homepage_edit",LLStringUtil::null);
- childSetValue("register_date",LLStringUtil::null);
- childSetValue("acc_status_text",LLStringUtil::null);
- childSetTextArg("partner_text", "[FIRST]", LLStringUtil::null);
- childSetTextArg("partner_text", "[LAST]", LLStringUtil::null);
+ std::string groups;
+ LLAvatarGroups::group_list_t::const_iterator it = avatar_groups->group_list.begin();
+ const LLAvatarGroups::group_list_t::const_iterator it_end = avatar_groups->group_list.end();
+
+ if(it_end != it)
+ {
+ groups = (*it).group_name;
+ ++it;
+ }
+ for(; it_end != it; ++it)
+ {
+ LLAvatarGroups::LLGroupData group_data = *it;
+ groups += ", ";
+ groups += group_data.group_name;
+ }
+ childSetValue("sl_groups",groups);
+}
+
+void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data)
+{
+ childSetValue("register_date", avatar_data->born_on);
+ childSetValue("sl_description_edit", avatar_data->about_text);
+ childSetValue("fl_description_edit",avatar_data->fl_about_text);
+ childSetValue("2nd_life_pic", avatar_data->image_id);
+ childSetValue("real_world_pic", avatar_data->fl_image_id);
+ childSetValue("homepage_edit", avatar_data->profile_url);
+}
+
+void LLPanelAvatarProfile::fillPartnerData(const LLAvatarData* avatar_data)
+{
+ if (avatar_data->partner_id.notNull())
+ {
+ std::string first, last;
+ BOOL found = gCacheName->getName(avatar_data->partner_id, first, last);
+ if (found)
+ {
+ childSetTextArg("partner_text", "[FIRST]", first);
+ childSetTextArg("partner_text", "[LAST]", last);
+ }
+ }
+ else
+ {
+ childSetTextArg("partner_text", "[FIRST]", getString("no_partner_text"));
+ }
+}
+
+void LLPanelAvatarProfile::fillOnlineStatus(const LLAvatarData* avatar_data)
+{
+ bool online = avatar_data->flags & AVATAR_ONLINE;
+ if(LLAvatarActions::isFriend(avatar_data->avatar_id))
+ {
+ // Online status NO could be because they are hidden
+ // If they are a friend, we may know the truth!
+ online = LLAvatarTracker::instance().isBuddyOnline(avatar_data->avatar_id);
+ }
+ childSetValue("online_status", online ?
+ "Online" : "Offline");
+ childSetColor("online_status", online ?
+ LLColor4::green : LLColor4::red);
}
-void LLPanelAvatarProfile::setCaptionText(const LLAvatarData* avatar_data)
+void LLPanelAvatarProfile::fillAccountStatus(const LLAvatarData* avatar_data)
{
std::string caption_text = avatar_data->caption_text;
if(caption_text.empty())
@@ -432,130 +540,126 @@ void LLPanelAvatarProfile::setCaptionText(const LLAvatarData* avatar_data)
childSetValue("acc_status_text", caption_text);
}
+void LLPanelAvatarProfile::onUrlTextboxClicked(std::string url)
+{
+ LLWeb::loadURL(url);
+}
+
+void LLPanelAvatarProfile::onHomepageTextboxClicked()
+{
+ std::string url = childGetValue("homepage_edit").asString();
+ if(!url.empty())
+ {
+ onUrlTextboxClicked(url);
+ }
+}
+
void LLPanelAvatarProfile::onAddFriendButtonClick()
{
- onAddFriend();
+ LLAvatarActions::requestFriendshipDialog(getAvatarId());
}
void LLPanelAvatarProfile::onIMButtonClick()
{
- onIM();
+ LLAvatarActions::startIM(getAvatarId());
}
void LLPanelAvatarProfile::onTeleportButtonClick()
{
- onTeleport();
+ LLAvatarActions::offerTeleport(getAvatarId());
}
void LLPanelAvatarProfile::onCallButtonClick()
{
-
+ //*TODO not implemented
}
void LLPanelAvatarProfile::onShareButtonClick()
{
-
+ //*TODO not implemented
}
-/*virtual*/ BOOL LLPanelAvatarProfile::postBuild(void)
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+LLPanelAvatarMeProfile::LLPanelAvatarMeProfile()
+: LLPanelAvatarProfile()
{
- mStatusCombobox = getChild<LLComboBox>("status_combo", TRUE, FALSE);
- if (NULL != mStatusCombobox)
- {
- mStatusCombobox->setCommitCallback(boost::bind(&LLPanelAvatarProfile::onStatusChanged, this));
- }
- mStatusMessage = getChild<LLLineEditor>("status_me_message_edit", TRUE, FALSE);
- if (NULL != mStatusMessage)
- {
- mStatusMessage->setCommitCallback(boost::bind(&LLPanelAvatarProfile::onStatusMessageChanged, this));
- }
+}
- if (!isEditMode())
- {
- childSetActionTextbox("homepage_edit", boost::bind(&LLPanelAvatarProfile::onHomepageTextboxClicked, this));
- childSetActionTextbox("payment_update_link", boost::bind(&LLPanelAvatarProfile::onUpdateAccountTextboxClicked, this));
- childSetActionTextbox("my_account_link", boost::bind(&LLPanelAvatarProfile::onMyAccountTextboxClicked, this));
- childSetActionTextbox("partner_edit_link", boost::bind(&LLPanelAvatarProfile::onPartnerEditTextboxClicked, this));
- }
+BOOL LLPanelAvatarMeProfile::postBuild()
+{
+ LLPanelAvatarProfile::postBuild();
- childSetCommitCallback("add_friend",(boost::bind(&LLPanelAvatarProfile::onAddFriendButtonClick,this)),NULL);
- childSetCommitCallback("im",(boost::bind(&LLPanelAvatarProfile::onIMButtonClick,this)),NULL);
- childSetCommitCallback("call",(boost::bind(&LLPanelAvatarProfile::onCallButtonClick,this)),NULL);
- childSetCommitCallback("teleport",(boost::bind(&LLPanelAvatarProfile::onTeleportButtonClick,this)),NULL);
- childSetCommitCallback("share",(boost::bind(&LLPanelAvatarProfile::onShareButtonClick,this)),NULL);
+ mStatusCombobox = getChild<LLComboBox>("status_combo");
- LLTextureCtrl* pic = getChild<LLTextureCtrl>("2nd_life_pic",TRUE,FALSE);
- if(pic)
- {
- pic->setFallbackImageName("default_land_picture.j2c");
- }
- pic = getChild<LLTextureCtrl>("real_world_pic",TRUE,FALSE);
- if(pic)
- {
- pic->setFallbackImageName("default_land_picture.j2c");
- }
+ childSetCommitCallback("status_combo", boost::bind(&LLPanelAvatarMeProfile::onStatusChanged, this), NULL);
+ childSetCommitCallback("status_me_message_text", boost::bind(&LLPanelAvatarMeProfile::onStatusMessageChanged, this), NULL);
+ childSetActionTextbox("payment_update_link", boost::bind(&LLPanelAvatarMeProfile::onUpdateAccountTextboxClicked, this));
+ childSetActionTextbox("my_account_link", boost::bind(&LLPanelAvatarMeProfile::onMyAccountTextboxClicked, this));
+ childSetActionTextbox("partner_edit_link", boost::bind(&LLPanelAvatarMeProfile::onPartnerEditTextboxClicked, this));
- clearControls();
- updateChildrenList();
+ resetControls();
+ resetData();
return TRUE;
}
-void LLPanelAvatarProfile::onOpen(const LLSD& key)
+void LLPanelAvatarMeProfile::onOpen(const LLSD& key)
{
- onActivate(key);
- updateChildrenList();
+ LLPanelProfileTab::onOpen(key);
+
+ std::string full_name;
+ gCacheName->getFullName(getAvatarId(), full_name);
+ childSetValue("user_name", full_name);
}
+void LLPanelAvatarMeProfile::processProfileProperties(const LLAvatarData* avatar_data)
+{
+ fillCommonData(avatar_data);
+
+ fillPartnerData(avatar_data);
-void LLPanelAvatarProfile::updateChildrenList()
+ fillStatusData(avatar_data);
+
+ fillAccountStatus(avatar_data);
+}
+
+void LLPanelAvatarMeProfile::fillStatusData(const LLAvatarData* avatar_data)
{
- switch (mProfileType)
+ std::string status;
+ if (gAgent.getAFK())
{
- case PT_OWN:
- if (mUpdated || isEditMode())
- {
- return;
- }
- childSetVisible("user_name", true);
- childSetVisible("status_panel", false);
- childSetVisible("profile_buttons_panel", false);
- childSetVisible("title_groups_text", false);
- childSetVisible("sl_groups", false);
- mUpdated = true;
- childSetVisible("status_me_panel", true);
- childSetVisible("profile_me_buttons_panel", true);
-
- break;
- case PT_OTHER:
- childSetVisible("user_name", false);
- childSetVisible("status_me_panel", false);
- childSetVisible("profile_me_buttons_panel", false);
-
- childSetVisible("status_panel", true);
- childSetVisible("profile_buttons_panel", true);
- childSetVisible("title_groups_text", true);
- childSetVisible("sl_groups", true);
-
- // account actions
- childSetVisible("account_actions_panel", false);
- childSetVisible("partner_edit_link", false);
-
- //hide for friends
- childSetEnabled("add_friend", !LLAvatarActions::isFriend(getAvatarId()));
-
- //need to update profile view on every activate
- mUpdated = false;
- break;
- case PT_UNKNOWN: break;//do nothing
- default:
- llassert(false);
+ status = "away";
+ }
+ else if (gAgent.getBusy())
+ {
+ status = "busy";
+ }
+ else
+ {
+ status = "online";
}
+
+ mStatusCombobox->setValue(status);
+}
+
+void LLPanelAvatarMeProfile::resetControls()
+{
+ childSetVisible("user_name", true);
+ childSetVisible("status_panel", false);
+ childSetVisible("profile_buttons_panel", false);
+ childSetVisible("title_groups_text", false);
+ childSetVisible("sl_groups", false);
+ childSetVisible("status_me_panel", true);
+ childSetVisible("profile_me_buttons_panel", true);
}
-void LLPanelAvatarProfile::onStatusChanged()
+
+void LLPanelAvatarMeProfile::onStatusChanged()
{
LLSD::String status = mStatusCombobox->getValue().asString();
-
+
if ("online" == status)
{
gAgent.clearAFK();
@@ -572,169 +676,24 @@ void LLPanelAvatarProfile::onStatusChanged()
gAgent.setBusy();
LLNotifications::instance().add("BusyModeSet");
}
- else
- {
- }
-
}
-void LLPanelAvatarProfile::onStatusMessageChanged()
+void LLPanelAvatarMeProfile::onStatusMessageChanged()
{
updateData();
}
-//static
-void LLPanelAvatarProfile::onUrlTextboxClicked(std::string url)
-{
- LLWeb::loadURL(url);
-}
-
-void LLPanelAvatarProfile::onHomepageTextboxClicked()
-{
- onUrlTextboxClicked(childGetValue("homepage_edit").asString());
-}
-
-void LLPanelAvatarProfile::onUpdateAccountTextboxClicked()
+void LLPanelAvatarMeProfile::onUpdateAccountTextboxClicked()
{
onUrlTextboxClicked(getString("payment_update_link_url"));
}
-void LLPanelAvatarProfile::onMyAccountTextboxClicked()
+void LLPanelAvatarMeProfile::onMyAccountTextboxClicked()
{
onUrlTextboxClicked(getString("my_account_link_url"));
}
-void LLPanelAvatarProfile::onPartnerEditTextboxClicked()
+void LLPanelAvatarMeProfile::onPartnerEditTextboxClicked()
{
onUrlTextboxClicked(getString("partner_edit_link_url"));
}
-
-//-----------------------------------------------------------------------------
-// LLPanelAvatarNotes()
-//-----------------------------------------------------------------------------
-LLPanelAvatarNotes::LLPanelAvatarNotes(const LLUUID& id /* = LLUUID::null */)
-:LLPanelProfileTab(id)
-{
- updateData();
-}
-
-LLPanelAvatarNotes::LLPanelAvatarNotes(const Params& params)
-: LLPanelProfileTab(params)
-{
-
-}
-
-LLPanelAvatarNotes::~LLPanelAvatarNotes()
-{
- if(getAvatarId().notNull())
- {
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
- }
-}
-
-void* LLPanelAvatarNotes::create(void* data)
-{
- if(data)
- {
- LLSD* id = static_cast<LLSD*>(data);
- return new LLPanelAvatarNotes(LLUUID(id->asUUID()));
- }
- return new LLPanelAvatarNotes();
-}
-
-void LLPanelAvatarNotes::updateData()
-{
- LLAvatarPropertiesProcessor::getInstance()->sendDataRequest(getAvatarId(),APT_NOTES);
-
- const LLRelationship* relation = LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
- if(relation)
- {
- childSetEnabled("status_check",TRUE);
- childSetEnabled("map_check",TRUE);
- childSetEnabled("objects_check",TRUE);
-
- S32 rights = relation->getRightsGrantedTo();
-
- childSetValue("status_check",LLRelationship::GRANT_ONLINE_STATUS & rights ? TRUE : FALSE);
- childSetValue("map_check",LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE);
- childSetValue("objects_check",LLRelationship::GRANT_MODIFY_OBJECTS & rights ? TRUE : FALSE);
- }
-}
-
-BOOL LLPanelAvatarNotes::postBuild()
-{
- childSetCommitCallback("status_check",boost::bind(&LLPanelAvatarNotes::onCommitRights,this),NULL);
- childSetCommitCallback("map_check",boost::bind(&LLPanelAvatarNotes::onCommitRights,this),NULL);
- childSetCommitCallback("objects_check",boost::bind(&LLPanelAvatarNotes::onCommitRights,this),NULL);
-
- childSetCommitCallback("add_friend",(boost::bind(&LLPanelAvatarProfile::onAddFriend,this)),NULL);
- childSetCommitCallback("im",(boost::bind(&LLPanelAvatarProfile::onIM,this)),NULL);
-// childSetCommitCallback("call",(boost::bind(&LLPanelAvatarProfile::onCallButtonClick,this)));
- childSetCommitCallback("teleport",(boost::bind(&LLPanelAvatarProfile::onTeleport,this)),NULL);
-// childSetCommitCallback("share",(boost::bind(&LLPanelAvatarProfile::onShareButtonClick,this)));
-
- LLTextEditor* te = getChild<LLTextEditor>("notes_edit",TRUE,FALSE);
- if(te)
- {
- te->setCommitCallback(boost::bind(&LLPanelAvatarNotes::onCommitNotes,this));
- te->setCommitOnFocusLost(TRUE);
- }
-
- return TRUE;
-}
-
-void LLPanelAvatarNotes::onCommitNotes()
-{
- std::string notes = childGetValue("notes_edit").asString();
- LLAvatarPropertiesProcessor::getInstance()-> sendNotes(getAvatarId(),notes);
-}
-
-void LLPanelAvatarNotes::onCommitRights()
-{
- S32 rights = 0;
-
- if(childGetValue("status_check").asBoolean())
- rights |= LLRelationship::GRANT_ONLINE_STATUS;
- if(childGetValue("map_check").asBoolean())
- rights |= LLRelationship::GRANT_MAP_LOCATION;
- if(childGetValue("objects_check").asBoolean())
- rights |= LLRelationship::GRANT_MODIFY_OBJECTS;
-
- LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(getAvatarId(),rights);
-}
-
-void LLPanelAvatarNotes::clear()
-{
- childSetValue("notes_edit",LLStringUtil::null);
-
- childSetEnabled("status_check",FALSE);
- childSetEnabled("map_check",FALSE);
- childSetEnabled("objects_check",FALSE);
-}
-
-void LLPanelAvatarNotes::processProperties(void* data, EAvatarProcessorType type)
-{
- if(APT_NOTES == type)
- {
- LLAvatarNotes* avatar_notes = static_cast<LLAvatarNotes*>(data);
- if(avatar_notes && getAvatarId() == avatar_notes->target_id)
- {
- childSetValue("notes_edit",avatar_notes->notes);
- childSetEnabled("notes edit", true);
-
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
- }
- }
-}
-
-void LLPanelAvatarNotes::onActivate(const LLUUID& id)
-{
- LLPanelProfileTab::onActivate(id);
- updateChildrenList();
-}
-
-void LLPanelAvatarNotes::updateChildrenList()
-{
- //hide for friends
- childSetEnabled("add_friend", !LLAvatarActions::isFriend(getAvatarId()));
-}
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index 2b0fbaf193..a6cf2a2d27 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -45,137 +45,199 @@ enum EOnlineStatus
ONLINE_STATUS_YES = 1
};
-
-class LLPanelProfileTab
+/**
+* Base class for any Profile View or Me Profile Panel.
+*/
+class LLPanelProfileTab
: public LLPanel
, public LLAvatarPropertiesObserver
{
public:
-
- LLPanelProfileTab(const LLUUID& avatar_id);
- LLPanelProfileTab(const Params& params );
- void setAvatarId(const LLUUID& avatar_id);
+ /**
+ * Sets avatar ID, sets panel as observer of avatar related info replies from server.
+ */
+ virtual void setAvatarId(const LLUUID& id);
- const LLUUID& getAvatarId(){return mAvatarId;}
+ /**
+ * Returns avatar ID.
+ */
+ virtual const LLUUID& getAvatarId() { return mAvatarId; }
+ /**
+ * Sends update data request to server.
+ */
virtual void updateData() = 0;
+ /**
+ * Clears panel data if viewing avatar info for first time and sends update data request.
+ */
virtual void onOpen(const LLSD& key);
- virtual void onActivate(const LLUUID& id);
+ /**
+ * Resets controls visibility, state, etc.
+ */
+ virtual void resetControls(){};
- typedef enum e_profile_type
- {
- PT_UNKNOWN,
- PT_OWN,
- PT_OTHER
- } EProfileType;
+ /**
+ * Clears all data received from server.
+ */
+ virtual void resetData(){};
- virtual void onAddFriend();
+ /*virtual*/ ~LLPanelProfileTab();
- virtual void onIM();
-
- virtual void onTeleport();
+protected:
- virtual void clear(){};
+ LLPanelProfileTab();
-protected:
- virtual ~LLPanelProfileTab();
- void setProfileType();
+ /**
+ * Scrolls panel to top when viewing avatar info for first time.
+ */
+ void scrollToTop();
private:
- void scrollToTop();
-protected:
- e_profile_type mProfileType;
LLUUID mAvatarId;
};
-class LLPanelAvatarProfile
+/**
+* Panel for displaying Avatar's first and second life related info.
+*/
+class LLPanelAvatarProfile
: public LLPanelProfileTab
{
public:
- LLPanelAvatarProfile(const LLUUID& avatar_id = LLUUID::null);
- LLPanelAvatarProfile(const Params& params );
- ~LLPanelAvatarProfile();
-
- static void* create(void* data);
+ LLPanelAvatarProfile();
+
+ /*virtual*/ void onOpen(const LLSD& key);
+ /**
+ * Processes data received from server.
+ */
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
- void updateData();
+ /*virtual*/ BOOL postBuild();
- void clear();
+ /*virtual*/ void updateData();
- virtual void clearControls();
+ /*virtual*/ void resetControls();
- /*virtual*/ BOOL postBuild(void);
- /*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ void resetData();
-private:
- bool isOwnProfile(){return PT_OWN == mProfileType;}
- bool isEditMode(){return mEditMode;}
- void updateChildrenList();
- void onStatusChanged();
- void onStatusMessageChanged();
- void setCaptionText(const LLAvatarData* avatar_data);
+protected:
- static void onUrlTextboxClicked(std::string url);
- void onHomepageTextboxClicked();
- void onUpdateAccountTextboxClicked();
- void onMyAccountTextboxClicked();
- void onPartnerEditTextboxClicked();
+ /**
+ * Process profile related data received from server.
+ */
+ virtual void processProfileProperties(const LLAvatarData* avatar_data);
+
+ /**
+ * Processes group related data received from server.
+ */
+ virtual void processGroupProperties(const LLAvatarGroups* avatar_groups);
+
+ /**
+ * Fills common for Avatar profile and Me Profile fields.
+ */
+ virtual void fillCommonData(const LLAvatarData* avatar_data);
+
+ /**
+ * Fills partner data.
+ */
+ virtual void fillPartnerData(const LLAvatarData* avatar_data);
+
+ /**
+ * Fills Avatar's online status.
+ */
+ virtual void fillOnlineStatus(const LLAvatarData* avatar_data);
+
+ /**
+ * Fills account status.
+ */
+ virtual void fillAccountStatus(const LLAvatarData* avatar_data);
+ void onUrlTextboxClicked(std::string url);
+ void onHomepageTextboxClicked();
void onAddFriendButtonClick();
void onIMButtonClick();
void onCallButtonClick();
void onTeleportButtonClick();
void onShareButtonClick();
+};
+
+/**
+ * Panel for displaying own first and second life related info.
+ */
+class LLPanelAvatarMeProfile
+ : public LLPanelAvatarProfile
+{
+public:
+ LLPanelAvatarMeProfile();
+
+ /*virtual*/ BOOL postBuild();
+
+protected:
+
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ /*virtual*/ void processProfileProperties(const LLAvatarData* avatar_data);
+ /**
+ * Fills Avatar status data.
+ */
+ virtual void fillStatusData(const LLAvatarData* avatar_data);
+
+ /*virtual*/ void resetControls();
protected:
- bool mEditMode;
+
+ void onStatusChanged();
+ void onStatusMessageChanged();
+ void onUpdateAccountTextboxClicked();
+ void onMyAccountTextboxClicked();
+ void onPartnerEditTextboxClicked();
private:
- bool mUpdated;
- LLComboBox * mStatusCombobox;
- LLLineEditor * mStatusMessage;
-};
+ LLComboBox* mStatusCombobox;
+};
+/**
+* Panel for displaying Avatar's notes and modifying friend's rights.
+*/
class LLPanelAvatarNotes
: public LLPanelProfileTab
{
public:
- LLPanelAvatarNotes(const LLUUID& id = LLUUID::null);
- LLPanelAvatarNotes(const Params& params );
- ~LLPanelAvatarNotes();
+ LLPanelAvatarNotes();
- static void* create(void* data);
+ /*virtual*/ void onOpen(const LLSD& key);
- void onActivate(const LLUUID& id);
+ /*virtual*/ BOOL postBuild();
- BOOL postBuild(void);
+ /*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
- void onCommitRights();
+ /*virtual*/ void updateData();
- void onCommitNotes();
+protected:
- void clear();
+ /*virtual*/ void resetControls();
- void processProperties(void* data, EAvatarProcessorType type);
+ /*virtual*/ void resetData();
- void updateData();
+ /**
+ * Fills rights data for friends.
+ */
+ void fillRightsData();
-protected:
+ void onCommitRights();
+ void onCommitNotes();
- void updateChildrenList();
+ void onAddFriendButtonClick();
+ void onIMButtonClick();
+ void onCallButtonClick();
+ void onTeleportButtonClick();
+ void onShareButtonClick();
};
-
-
-// helper funcs
-void add_left_label(LLPanel *panel, const std::string& name, S32 y);
-
#endif // LL_LLPANELAVATAR_H
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 3acaa6b68e..086b06c1a3 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -35,10 +35,6 @@
#include "llagent.h"
#include "llbutton.h"
-#include "llpanelgroupgeneral.h"
-#include "llpanelgrouproles.h"
-#include "llpanelgrouplandmoney.h"
-#include "llpanelgroupnotices.h"
#include "lltabcontainer.h"
#include "lltextbox.h"
#include "llviewermessage.h"
@@ -46,26 +42,31 @@
#include "llviewerwindow.h"
#include "llappviewer.h"
#include "llnotifications.h"
+#include "llfloaterreg.h"
#include "llfloater.h"
-// static
-void* LLPanelGroupTab::createTab(void* data)
-{
- LLUUID* group_id = static_cast<LLUUID*>(data);
- return new LLPanelGroupTab(*group_id);
-}
+#include "llsidetraypanelcontainer.h"
+
+#include "llpanelgroupnotices.h"
+#include "llpanelgroupgeneral.h"
+
+#include "llsidetray.h"
+#include "llaccordionctrltab.h"
+
+static LLRegisterPanelClassWrapper<LLPanelGroup> t_panel_group("panel_group_info_sidetray");
-LLPanelGroupTab::LLPanelGroupTab(const LLUUID& group_id)
+
+
+LLPanelGroupTab::LLPanelGroupTab()
: LLPanel(),
- mGroupID(group_id),
mAllowEdit(TRUE),
mHasModal(FALSE)
{
+ mGroupID = LLUUID::null;
}
LLPanelGroupTab::~LLPanelGroupTab()
{
- mObservers.clear();
}
BOOL LLPanelGroupTab::isVisibleByAgent(LLAgent* agentp)
@@ -76,39 +77,10 @@ BOOL LLPanelGroupTab::isVisibleByAgent(LLAgent* agentp)
BOOL LLPanelGroupTab::postBuild()
{
- // Hook up the help button callback.
- LLButton* button = findChild<LLButton>("help_button");
- if (button)
- {
- button->setCommitCallback(boost::bind(&LLPanelGroupTab::handleClickHelp, this));
- }
- mHelpText = getString("help_text");
return TRUE;
}
-void LLPanelGroupTab::addObserver(LLPanelGroupTabObserver *obs)
-{
- mObservers.insert(obs);
-}
-
-void LLPanelGroupTab::removeObserver(LLPanelGroupTabObserver *obs)
-{
- mObservers.erase(obs);
-}
-
-void LLPanelGroupTab::notifyObservers()
-{
-
- for (observer_list_t::iterator iter = mObservers.begin();
- iter != mObservers.end(); )
- {
- LLPanelGroupTabObserver* observer = *iter;
- observer->tabChanged();
- // safe way to incrament since changed may delete entries! (@!##%@!@&*!)
- iter = mObservers.upper_bound(observer);
- }
-}
void LLPanelGroupTab::handleClickHelp()
{
@@ -125,384 +97,240 @@ void LLPanelGroupTab::handleClickHelp()
}
}
-LLPanelGroup::LLPanelGroup(const LLUUID& group_id)
-: LLPanel(),
- LLGroupMgrObserver( group_id ),
- mCurrentTab( NULL ),
- mRequestedTab( NULL ),
- mTabContainer( NULL ),
- mIgnoreTransition( FALSE ),
- mApplyBtn( NULL ),
- mForceClose( FALSE ),
- mAllowEdit( TRUE ),
- mShowingNotifyDialog( FALSE )
+LLPanelGroup::LLPanelGroup()
+: LLPanel()
+ ,LLGroupMgrObserver( LLUUID() )
+ ,mAllowEdit(TRUE)
{
// Set up the factory callbacks.
- mFactoryMap["general_tab"] = LLCallbackMap(LLPanelGroupGeneral::createTab, &mID);
- mFactoryMap["roles_tab"] = LLCallbackMap(LLPanelGroupRoles::createTab, &mID);
- mFactoryMap["notices_tab"] = LLCallbackMap(LLPanelGroupNotices::createTab, &mID);
- mFactoryMap["land_money_tab"]= LLCallbackMap(LLPanelGroupLandMoney::createTab, &mID);
// Roles sub tabs
- mFactoryMap["members_sub_tab"] = LLCallbackMap(LLPanelGroupMembersSubTab::createTab, &mID);
- mFactoryMap["roles_sub_tab"] = LLCallbackMap(LLPanelGroupRolesSubTab::createTab, &mID);
- mFactoryMap["actions_sub_tab"] = LLCallbackMap(LLPanelGroupActionsSubTab::createTab, &mID);
-
LLGroupMgr::getInstance()->addObserver(this);
+
}
+
LLPanelGroup::~LLPanelGroup()
{
LLGroupMgr::getInstance()->removeObserver(this);
-
- for (S32 i=mTabContainer->getTabCount() - 1; i >=0; --i)
- {
- LLPanelGroupTab* panelp = (LLPanelGroupTab*) mTabContainer->getPanelByIndex(i);
- if ( panelp )
- panelp->removeObserver(this);
- }
}
-void LLPanelGroup::updateTabVisibility()
+void LLPanelGroup::onOpen(const LLSD& key)
{
- for (S32 i = mTabContainer->getTabCount() - 1; i >=0; --i)
+ LLUUID group_id = key["group_id"];
+ if(!key.has("action"))
{
- LLPanelGroupTab* panelp = (LLPanelGroupTab*) mTabContainer->getPanelByIndex(i);
+ setGroupID(group_id);
+ return;
+ }
- BOOL visible = panelp->isVisibleByAgent(&gAgent) || gAgent.isGodlike();
- mTabContainer->enableTabButton(i, visible);
+ std::string str_action = key["action"];
- if ( !visible && mCurrentTab == panelp )
- {
- //we are disabling the currently selected tab
- //select the previous one
- mTabContainer->selectPrevTab();
- mCurrentTab = (LLPanelGroupTab*) mTabContainer->getCurrentPanel();
- }
+ if(str_action == "refresh")
+ {
+ if(mID == group_id)
+ refreshData();
+ }
+ else if(str_action == "close")
+ {
+ onBackBtnClick();
+ }
+ else if(str_action == "create")
+ {
+ setGroupID(LLUUID::null);
}
-}
-
+}
BOOL LLPanelGroup::postBuild()
{
- mTabContainer = getChild<LLTabContainer>("group_tab_container");
-
- if (mTabContainer)
- {
- mCurrentTab = dynamic_cast<LLPanelGroupTab*>(mTabContainer->getCurrentPanel());
- llassert_always(mCurrentTab);
-
- // Add click callback.
- mTabContainer->setCommitCallback(boost::bind(&LLPanelGroup::handleClickTab, this));
-
- // Setup pabels
- for (S32 i = mTabContainer->getTabCount() - 1; i >=0; --i)
- {
- LLPanel* tab_panel = mTabContainer->getPanelByIndex(i);
- LLPanelGroupTab* panelp = dynamic_cast<LLPanelGroupTab*>(tab_panel);
- if (panelp)
- {
- // Pass on whether or not to allow edit to tabs.
- panelp->setAllowEdit(mAllowEdit);
- panelp->addObserver(this);
- }
- }
- updateTabVisibility();
-
- // Act as though this tab was just activated.
- mCurrentTab->activate();
- }
-
mDefaultNeedsApplyMesg = getString("default_needs_apply_text");
mWantApplyMesg = getString("want_apply_text");
- LLButton* button = getChild<LLButton>("btn_ok");
- button->setClickedCallback(onBtnOK, this);
- button->setVisible(mAllowEdit);
-
- button = getChild<LLButton>("btn_cancel");
- button->setClickedCallback(onBtnCancel, this);
- button->setVisible(mAllowEdit);
+ LLButton* button;
button = getChild<LLButton>("btn_apply");
button->setClickedCallback(onBtnApply, this);
- button->setVisible(mAllowEdit);
- button->setEnabled(FALSE);
- mApplyBtn = button;
+ button->setVisible(true);
+ button->setEnabled(false);
+
button = getChild<LLButton>("btn_refresh");
button->setClickedCallback(onBtnRefresh, this);
button->setVisible(mAllowEdit);
+ getChild<LLButton>("btn_create")->setVisible(false);
+
+ childSetCommitCallback("btn_create",boost::bind(&LLPanelGroup::onBtnCreate,this),NULL);
+ childSetCommitCallback("back",boost::bind(&LLPanelGroup::onBackBtnClick,this),NULL);
+
+ LLPanelGroupTab* panel_general = findChild<LLPanelGroupTab>("group_general_tab_panel");
+ LLPanelGroupTab* panel_roles = findChild<LLPanelGroupTab>("group_roles_tab_panel");
+ LLPanelGroupTab* panel_notices = findChild<LLPanelGroupTab>("group_notices_tab_panel");
+ LLPanelGroupTab* panel_land = findChild<LLPanelGroupTab>("group_land_tab_panel");
+
+ if(panel_general) mTabs.push_back(panel_general);
+ if(panel_roles) mTabs.push_back(panel_roles);
+ if(panel_notices) mTabs.push_back(panel_notices);
+ if(panel_land) mTabs.push_back(panel_land);
+
return TRUE;
}
-void LLPanelGroup::changed(LLGroupChange gc)
+void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent )
{
- updateTabVisibility();
- // Notify the currently active panel that group manager information has changed.
- LLPanelGroupTab* panelp = (LLPanelGroupTab*) mTabContainer->getCurrentPanel();
+ LLPanel::reshape(width, height, called_from_parent );
- if (panelp)
- {
- panelp->update(gc);
- }
+ LLButton* button = getChild<LLButton>("btn_apply");
+ LLRect btn_rect = button->getRect();
+ btn_rect.setLeftTopAndSize( btn_rect.mLeft, 28, btn_rect.getWidth(), btn_rect.getHeight());
+ button->setRect(btn_rect);
+
+ button = getChild<LLButton>("btn_create");
+ btn_rect = button->getRect();
+ btn_rect.setLeftTopAndSize( btn_rect.mLeft, 28, btn_rect.getWidth(), btn_rect.getHeight());
+ button->setRect(btn_rect);
+
+
+ button = getChild<LLButton>("btn_refresh");
+ btn_rect = button->getRect();
+ btn_rect.setLeftTopAndSize( btn_rect.mLeft, 28, btn_rect.getWidth(), btn_rect.getHeight());
+ button->setRect(btn_rect);
}
-// PanelGroupTab observer trigger
-void LLPanelGroup::tabChanged()
+void LLPanelGroup::onBackBtnClick()
{
- //some tab information has changed,....enable/disable the apply button
- //based on if they need an apply
- if ( mApplyBtn )
+ LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
+ if(parent)
{
- std::string mesg;
- mApplyBtn->setEnabled(mCurrentTab->needsApply(mesg));
+ parent->openPreviousPanel();
}
}
-void LLPanelGroup::handleClickTab()
+void LLPanelGroup::onBtnCreate()
{
- // If we are already handling a transition,
- // ignore this.
- if (mIgnoreTransition)
- {
+ LLPanelGroupGeneral* panel_general = findChild<LLPanelGroupGeneral>("group_general_tab_panel");
+ if(!panel_general)
return;
- }
-
- mRequestedTab = (LLPanelGroupTab*) mTabContainer->getCurrentPanel();
-
- // Make sure they aren't just clicking the same tab...
- if (mRequestedTab == mCurrentTab)
- {
- return;
- }
+ std::string apply_mesg;
+ panel_general->apply(apply_mesg);//yes yes you need to call apply to create...
+}
- // Try to switch from the current panel to the panel the user selected.
- attemptTransition();
+void LLPanelGroup::onBtnRefresh(void* user_data)
+{
+ LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
+ self->refreshData();
}
-void LLPanelGroup::setGroupID(const LLUUID& group_id)
+void LLPanelGroup::onBtnApply(void* user_data)
{
- LLRect rect(getRect());
+ LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
+ self->apply();
+}
- LLGroupMgr::getInstance()->removeObserver(this);
- mID = group_id;
- LLGroupMgr::getInstance()->addObserver(this);
- //*TODO: this is really bad, we should add a method
- // where the panels can just update themselves
- // on a group id change. Similar to update() but with a group
- // id change.
+void LLPanelGroup::changed(LLGroupChange gc)
+{
+ for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it)
+ (*it)->update(gc);
- // For now, rebuild panel
- //delete children and rebuild panel
- deleteAllChildren();
- LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group.xml");
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mID);
+ if(gdatap)
+ childSetValue("group_name", gdatap->mName);
}
-void LLPanelGroup::selectTab(std::string tab_name)
+void LLPanelGroup::notifyObservers()
{
- const BOOL recurse = TRUE;
+ for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it)
+ (*it)->update(GC_ALL);
- LLPanelGroupTab* tabp = findChild<LLPanelGroupTab>(tab_name, recurse);
-
- if ( tabp && mTabContainer )
- {
- mTabContainer->selectTabPanel(tabp);
- handleClickTab();
- }
+ LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mID);
+ if(gdatap)
+ childSetValue("group_name", gdatap->mName);
}
-BOOL LLPanelGroup::canClose()
-{
- if (mShowingNotifyDialog) return FALSE;
- if (mCurrentTab && mCurrentTab->hasModal()) return FALSE;
- if (mForceClose || !mAllowEdit) return TRUE;
- // Try to switch from the current panel to nothing, indicating a close action.
- mRequestedTab = NULL;
- return attemptTransition();
-}
-BOOL LLPanelGroup::attemptTransition()
+void LLPanelGroup::setGroupID(const LLUUID& group_id)
{
- // Check if the current tab needs to be applied.
- std::string mesg;
- if (mCurrentTab && mCurrentTab->needsApply(mesg))
- {
- // If no message was provided, give a generic one.
- if (mesg.empty())
- {
- mesg = mDefaultNeedsApplyMesg;
- }
- // Create a notify box, telling the user about the unapplied tab.
- LLSD args;
- args["NEEDS_APPLY_MESSAGE"] = mesg;
- args["WANT_APPLY_MESSAGE"] = mWantApplyMesg;
- LLNotifications::instance().add("PanelGroupApply", args, LLSD(),
- boost::bind(&LLPanelGroup::handleNotifyCallback, this, _1, _2));
- mShowingNotifyDialog = TRUE;
-
- // We need to reselect the current tab, since it isn't finished.
- if (mTabContainer)
- {
- // selectTabPanel is going to trigger another
- // click event. We want to ignore it so that
- // mRequestedTab is not updated.
- mIgnoreTransition = TRUE;
- mTabContainer->selectTabPanel( mCurrentTab );
- mIgnoreTransition = FALSE;
- }
- // Returning FALSE will block a close action from finishing until
- // we get a response back from the user.
- return FALSE;
- }
- else
- {
- // The current panel didn't have anything it needed to apply.
- if ( mRequestedTab )
- {
- transitionToTab();
- }
- // Returning TRUE will allow any close action to proceed.
- return TRUE;
- }
-}
+ LLGroupMgr::getInstance()->removeObserver(this);
+ mID = group_id;
+ LLGroupMgr::getInstance()->addObserver(this);
-void LLPanelGroup::transitionToTab()
-{
- // Tell the current panel that it is being deactivated.
- if (mCurrentTab)
- {
- mCurrentTab->deactivate();
- }
+ for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it)
+ (*it)->setGroupID(group_id);
+
+ LLButton* button_apply = getChild<LLButton>("btn_apply");
+ LLButton* button_refresh = getChild<LLButton>("btn_refresh");
+ LLButton* button_create = getChild<LLButton>("btn_create");
+
+
+ bool is_null_group_id = group_id == LLUUID::null;
- // If the requested panel exists, activate it.
- if (mRequestedTab)
- {
- // This is now the current tab;
- mCurrentTab = mRequestedTab;
- mCurrentTab->activate();
- }
- else // NULL requested indicates a close action.
- {
- closePanel();
- }
-}
+ button_apply->setVisible(!is_null_group_id);
+ button_refresh->setVisible(!is_null_group_id);
+ button_create->setVisible(is_null_group_id);
-bool LLPanelGroup::handleNotifyCallback(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotification::getSelectedOption(notification, response);
- mShowingNotifyDialog = FALSE;
- switch (option)
- {
- case 0: // "Apply Changes"
- // Try to apply changes, and switch to the requested tab.
- if ( !apply() )
- {
- // There was a problem doing the apply.
- // Skip switching tabs.
- break;
- }
+ LLAccordionCtrlTab* tab_general = findChild<LLAccordionCtrlTab>("group_general_tab");
+ LLAccordionCtrlTab* tab_roles = findChild<LLAccordionCtrlTab>("group_roles_tab");
+ LLAccordionCtrlTab* tab_notices = findChild<LLAccordionCtrlTab>("group_notices_tab");
+ LLAccordionCtrlTab* tab_land = findChild<LLAccordionCtrlTab>("group_land_tab");
- // This panel's info successfully applied.
- // Switch to the next panel.
- mIgnoreTransition = TRUE;
- mTabContainer->selectTabPanel( mRequestedTab );
- mIgnoreTransition = FALSE;
- transitionToTab();
- break;
- case 1: // "Ignore Changes"
- // Switch to the requested panel without applying changes
- // (Changes may already have been applied in the previous block)
- mCurrentTab->cancel();
- mIgnoreTransition = TRUE;
- mTabContainer->selectTabPanel( mRequestedTab );
- mIgnoreTransition = FALSE;
- transitionToTab();
- break;
- case 2: // "Cancel"
- default:
- // Do nothing. The user is canceling the action.
- // If we were quitting, we didn't really mean it.
- LLAppViewer::instance()->abortQuit();
- break;
+ if(is_null_group_id)//creating new group
+ {
+ if(!tab_general->getDisplayChildren())
+ tab_general->changeOpenClose(tab_general->getDisplayChildren());
+
+ if(tab_roles->getDisplayChildren())
+ tab_roles->changeOpenClose(tab_roles->getDisplayChildren());
+ if(tab_notices->getDisplayChildren())
+ tab_notices->changeOpenClose(tab_notices->getDisplayChildren());
+ if(tab_land->getDisplayChildren())
+ tab_land->changeOpenClose(tab_land->getDisplayChildren());
+
+ tab_roles->canOpenClose(false);
+ tab_notices->canOpenClose(false);
+ tab_land->canOpenClose(false);
}
- return false;
-}
-
-// static
-void LLPanelGroup::onBtnOK(void* user_data)
-{
- LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
- // If we are able to apply changes, then close.
- if(self->apply())
+ else
{
- self->closePanel();
+ tab_roles->canOpenClose(true);
+ tab_notices->canOpenClose(true);
+ tab_land->canOpenClose(true);
}
}
-// static
-void LLPanelGroup::onBtnCancel(void* user_data)
-{
- LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
- self->closePanel();
-}
-
-// static
-void LLPanelGroup::onBtnApply(void* user_data)
-{
- LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
- self->apply();
-}
-
-bool LLPanelGroup::apply()
+bool LLPanelGroup::apply(LLPanelGroupTab* tab)
{
- // Pass this along to the currently visible tab.
- if (!mTabContainer)
+ if(!tab)
return false;
- LLPanelGroupTab* panelp = dynamic_cast<LLPanelGroupTab*>(mTabContainer->getCurrentPanel());
- if (!panelp)
- return false;
-
std::string mesg;
- if ( !panelp->needsApply(mesg) )
- {
- // We don't need to apply anything.
- // We're done.
+ if ( !tab->needsApply(mesg) )
return true;
- }
-
- // Ignore the needs apply message.
- // Try to do the actual apply.
+
std::string apply_mesg;
- if ( panelp->apply( apply_mesg ) )
- {
- // Everything worked. We're done.
+ if(tab->apply( apply_mesg ) )
return true;
- }
-
- // There was a problem doing the actual apply.
- // Inform the user.
+
if ( !apply_mesg.empty() )
{
LLSD args;
args["MESSAGE"] = apply_mesg;
LLNotifications::instance().add("GenericAlert", args);
}
-
return false;
}
-// static
-void LLPanelGroup::onBtnRefresh(void* user_data)
+bool LLPanelGroup::apply()
{
- LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data);
- self->refreshData();
+ return apply(findChild<LLPanelGroupTab>("group_general_tab_panel"))
+ && apply(findChild<LLPanelGroupTab>("group_roles_tab_panel"))
+ && apply(findChild<LLPanelGroupTab>("group_notices_tab_panel"))
+ && apply(findChild<LLPanelGroupTab>("group_land_tab_panel"))
+ ;
}
+
// virtual
void LLPanelGroup::draw()
{
@@ -513,18 +341,22 @@ void LLPanelGroup::draw()
mRefreshTimer.stop();
childEnable("btn_refresh");
}
- if (mCurrentTab)
- {
- std::string mesg;
- childSetEnabled("btn_apply", mCurrentTab->needsApply(mesg));
- }
+ bool enable = false;
+ std::string mesg;
+ for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it)
+ enable = enable || (*it)->needsApply(mesg);
+
+ childSetEnabled("btn_apply", enable);
}
void LLPanelGroup::refreshData()
{
LLGroupMgr::getInstance()->clearGroupData(getID());
- mCurrentTab->activate();
+
+ for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it)
+ (*it)->activate();
+
// 5 second timeout
childDisable("btn_refresh");
@@ -532,20 +364,6 @@ void LLPanelGroup::refreshData()
mRefreshTimer.setTimerExpirySec(5);
}
-void LLPanelGroup::closePanel()
-{
- // Pass this to the parent, if it is a floater.
- LLView* viewp = getParent();
- LLFloater* floaterp = dynamic_cast<LLFloater*>(viewp);
- if (floaterp)
- {
- // First, set the force close flag, since the floater
- // will be asking us whether it can close.
- mForceClose = TRUE;
- // Tell the parent floater to close.
- floaterp->closeFloater();
- }
-}
void LLPanelGroup::showNotice(const std::string& subject,
const std::string& message,
@@ -553,7 +371,8 @@ void LLPanelGroup::showNotice(const std::string& subject,
const std::string& inventory_name,
LLOfferInfo* inventory_offer)
{
- if (mCurrentTab->getName() != "notices_tab")
+ LLPanelGroupNotices* panel_notices = findChild<LLPanelGroupNotices>("group_notices_tab_panel");
+ if(!panel_notices)
{
// We need to clean up that inventory offer.
if (inventory_offer)
@@ -562,8 +381,37 @@ void LLPanelGroup::showNotice(const std::string& subject,
}
return;
}
+ panel_notices->showNotice(subject,message,has_inventory,inventory_name,inventory_offer);
+}
- LLPanelGroupNotices* notices = static_cast<LLPanelGroupNotices*>(mCurrentTab);
- notices->showNotice(subject,message,has_inventory,inventory_name,inventory_offer);
+
+
+//static
+void LLPanelGroup::refreshCreatedGroup(const LLUUID& group_id)
+{
+ LLPanelGroup* panel = LLSideTray::getInstance()->findChild<LLPanelGroup>("panel_group_info_sidetray");
+ if(!panel)
+ return;
+ panel->setGroupID(group_id);
}
+
+//static
+
+void LLPanelGroup::showNotice(const std::string& subject,
+ const std::string& message,
+ const LLUUID& group_id,
+ const bool& has_inventory,
+ const std::string& inventory_name,
+ LLOfferInfo* inventory_offer)
+{
+ LLPanelGroup* panel = LLSideTray::getInstance()->findChild<LLPanelGroup>("panel_group_info_sidetray");
+ if(!panel)
+ return;
+
+ if(panel->getID() != group_id)//???? only for current group_id or switch panels? FIXME
+ return;
+ panel->showNotice(subject,message,has_inventory,inventory_name,inventory_offer);
+
+}
+
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index 55c7494a44..e5e1d1b6ad 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -45,93 +45,79 @@ class LLPanelGroupTab;
class LLTabContainer;
class LLAgent;
-class LLPanelGroupTabObserver
-{
-public:
- LLPanelGroupTabObserver() {};
- virtual ~LLPanelGroupTabObserver(){};
- virtual void tabChanged() = 0;
-};
class LLPanelGroup : public LLPanel,
- public LLGroupMgrObserver,
- public LLPanelGroupTabObserver
+ public LLGroupMgrObserver
{
public:
- LLPanelGroup(const LLUUID& group_id);
+ LLPanelGroup();
virtual ~LLPanelGroup();
virtual BOOL postBuild();
- static void onBtnOK(void*);
- static void onBtnCancel(void*);
- static void onBtnApply(void*);
- static void onBtnRefresh(void*);
- void handleClickTab();
-
void setGroupID(const LLUUID& group_id);
- void selectTab(std::string tab_name);
-
- // Called when embedded in a floater during a close attempt.
- BOOL canClose();
-
- // Checks if the current tab needs to be applied, and tries to switch to the requested tab.
- BOOL attemptTransition();
-
- // Switches to the requested tab (will close() if requested is NULL)
- void transitionToTab();
-
- void updateTabVisibility();
-
- // Used by attemptTransition to query the user's response to a tab that needs to apply.
- bool handleNotifyCallback(const LLSD& notification, const LLSD& response);
- bool apply();
- void refreshData();
- void closePanel();
void draw();
+ void onOpen(const LLSD& key);
+
// Group manager observer trigger.
virtual void changed(LLGroupChange gc);
- // PanelGroupTab observer trigger
- virtual void tabChanged();
-
- void setAllowEdit(BOOL v) { mAllowEdit = v; }
-
void showNotice(const std::string& subject,
const std::string& message,
const bool& has_inventory,
const std::string& inventory_name,
LLOfferInfo* inventory_offer);
+
+ void notifyObservers();
+
+ bool apply();
+ void refreshData();
+
+ virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+
+ void setAllowEdit(BOOL v) { mAllowEdit = v; }
+
+
+ static void refreshCreatedGroup(const LLUUID& group_id);
+
+ static void showNotice(const std::string& subject,
+ const std::string& message,
+ const LLUUID& group_id,
+ const bool& has_inventory,
+ const std::string& inventory_name,
+ LLOfferInfo* inventory_offer);
+
+
protected:
- LLPanelGroupTab* mCurrentTab;
- LLPanelGroupTab* mRequestedTab;
- LLTabContainer* mTabContainer;
- BOOL mIgnoreTransition;
+ void onBtnCreate();
+ void onBackBtnClick();
- LLButton* mApplyBtn;
+ static void onBtnApply(void*);
+ static void onBtnRefresh(void*);
+
+
+protected:
+ bool apply(LLPanelGroupTab* tab);
LLTimer mRefreshTimer;
- BOOL mForceClose;
+ BOOL mAllowEdit;
std::string mDefaultNeedsApplyMesg;
std::string mWantApplyMesg;
- BOOL mAllowEdit;
- BOOL mShowingNotifyDialog;
+ std::vector<LLPanelGroupTab* > mTabs;
+
};
class LLPanelGroupTab : public LLPanel
{
public:
- LLPanelGroupTab(const LLUUID& group_id);
+ LLPanelGroupTab();
virtual ~LLPanelGroupTab();
- // Factory that returns a new LLPanelGroupFoo tab.
- static void* createTab(void* data);
-
// Triggered when the tab becomes active.
virtual void activate() { }
@@ -168,20 +154,19 @@ public:
void setAllowEdit(BOOL v) { mAllowEdit = v; }
- void addObserver(LLPanelGroupTabObserver *obs);
- void removeObserver(LLPanelGroupTabObserver *obs);
- void notifyObservers();
+ virtual void setGroupID(const LLUUID& id) {mGroupID = id;};
+
+ void notifyObservers() {};
+
+ const LLUUID& getGroupID() const { return mGroupID;}
protected:
LLUUID mGroupID;
- LLTabContainer* mTabContainer;
std::string mHelpText;
BOOL mAllowEdit;
BOOL mHasModal;
- typedef std::set<LLPanelGroupTabObserver*> observer_list_t;
- observer_list_t mObservers;
};
#endif // LL_LLPANELGROUP_H
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index b1b464b4e4..d63e112357 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -37,7 +37,6 @@
#include "lluictrlfactory.h"
#include "llagent.h"
#include "roles_constants.h"
-#include "llfloatergroupinfo.h"
// UI elements
#include "llbutton.h"
@@ -45,6 +44,7 @@
#include "llcombobox.h"
#include "lldbstrings.h"
#include "llavataractions.h"
+#include "llgroupactions.h"
#include "lllineeditor.h"
#include "llnamebox.h"
#include "llnamelistctrl.h"
@@ -57,21 +57,16 @@
#include "lltrans.h"
#include "llviewerwindow.h"
+static LLRegisterPanelClassWrapper<LLPanelGroupGeneral> t_panel_group_general("panel_group_general");
+
// consts
const S32 MATURE_CONTENT = 1;
const S32 NON_MATURE_CONTENT = 2;
const S32 DECLINE_TO_STATE = 0;
-// static
-void* LLPanelGroupGeneral::createTab(void* data)
-{
- LLUUID* group_id = static_cast<LLUUID*>(data);
- return new LLPanelGroupGeneral(*group_id);
-}
-
-LLPanelGroupGeneral::LLPanelGroupGeneral(const LLUUID& group_id)
-: LLPanelGroupTab(group_id),
+LLPanelGroupGeneral::LLPanelGroupGeneral()
+: LLPanelGroupTab(),
mPendingMemberUpdate(FALSE),
mChanged(FALSE),
mFirstUse(TRUE),
@@ -311,7 +306,8 @@ void LLPanelGroupGeneral::onClickInfo(void *userdata)
lldebugs << "open group info: " << self->mGroupID << llendl;
- LLFloaterGroupInfo::showFromUUID(self->mGroupID);
+ LLGroupActions::show(self->mGroupID);
+
}
// static
@@ -888,3 +884,150 @@ void LLPanelGroupGeneral::updateChanged()
}
}
}
+
+void LLPanelGroupGeneral::reset()
+{
+ mCtrlReceiveNotices->set(false);
+
+
+ mCtrlListGroup->set(true);
+
+ mCtrlReceiveNotices->setEnabled(true);
+ mCtrlReceiveNotices->setVisible(true);
+
+ mCtrlListGroup->setEnabled(true);
+
+ mGroupNameEditor->setEnabled(TRUE);
+ mEditCharter->setEnabled(TRUE);
+
+ mCtrlShowInGroupList->setEnabled(TRUE);
+ mComboMature->setEnabled(TRUE);
+
+ mCtrlOpenEnrollment->setEnabled(TRUE);
+
+ mCtrlEnrollmentFee->setEnabled(TRUE);
+
+ mSpinEnrollmentFee->setEnabled(TRUE);
+ mSpinEnrollmentFee->set((F32)0);
+
+ mBtnJoinGroup->setVisible(FALSE);
+ mBtnInfo->setVisible(FALSE);
+ mGroupName->setVisible(FALSE);
+
+ mGroupNameEditor->setVisible(true);
+
+ mComboActiveTitle->setVisible(false);
+ mInsignia->setImageAssetID(mDefaultIconID);
+
+ {
+ std::string empty_str = "";
+ mEditCharter->setText(empty_str);
+ }
+
+ {
+ LLSD row;
+ row["columns"][0]["value"] = "no members yet";
+
+ mListVisibleMembers->deleteAllItems();
+ mListVisibleMembers->setEnabled(FALSE);
+ mListVisibleMembers->addElement(row);
+ }
+
+ mBtnJoinGroup->setVisible(false);
+
+ {
+ mComboMature->setEnabled(true);
+ mComboMature->setVisible( !gAgent.isTeen() );
+ }
+
+
+ resetDirty();
+}
+
+void LLPanelGroupGeneral::resetDirty()
+{
+ // List all the controls we want to check for changes...
+ LLUICtrl *check_list[] =
+ {
+ mGroupNameEditor,
+ mGroupName,
+ mFounderName,
+ mInsignia,
+ mEditCharter,
+ mCtrlShowInGroupList,
+ mComboMature,
+ mCtrlOpenEnrollment,
+ mCtrlEnrollmentFee,
+ mSpinEnrollmentFee,
+ mCtrlReceiveNotices,
+ mCtrlListGroup,
+ mActiveTitleLabel,
+ mComboActiveTitle
+ };
+
+ for( size_t i=0; i<LL_ARRAY_SIZE(check_list); i++ )
+ {
+ if( check_list[i] )
+ check_list[i]->resetDirty() ;
+ }
+
+
+}
+
+void LLPanelGroupGeneral::setGroupID(const LLUUID& id)
+{
+ LLPanelGroupTab::setGroupID(id);
+
+ if(id == LLUUID::null)
+ {
+ reset();
+ return;
+ }
+
+ BOOL accept_notices = FALSE;
+ BOOL list_in_profile = FALSE;
+ LLGroupData data;
+ if(gAgent.getGroupData(mGroupID,data))
+ {
+ accept_notices = data.mAcceptNotices;
+ list_in_profile = data.mListInProfile;
+ }
+ mCtrlReceiveNotices = getChild<LLCheckBoxCtrl>("receive_notices");
+ if (mCtrlReceiveNotices)
+ {
+ mCtrlReceiveNotices->set(accept_notices);
+ mCtrlReceiveNotices->setEnabled(data.mID.notNull());
+ }
+
+ mCtrlListGroup = getChild<LLCheckBoxCtrl>("list_groups_in_profile");
+ if (mCtrlListGroup)
+ {
+ mCtrlListGroup->set(list_in_profile);
+ mCtrlListGroup->setEnabled(data.mID.notNull());
+ }
+
+ mActiveTitleLabel = getChild<LLTextBox>("active_title_label");
+
+ mComboActiveTitle = getChild<LLComboBox>("active_title");
+
+ if (mGroupID.isNull())
+ {
+ mGroupNameEditor->setEnabled(TRUE);
+ mEditCharter->setEnabled(TRUE);
+
+ mCtrlShowInGroupList->setEnabled(TRUE);
+ mComboMature->setEnabled(TRUE);
+ mCtrlOpenEnrollment->setEnabled(TRUE);
+ mCtrlEnrollmentFee->setEnabled(TRUE);
+ mSpinEnrollmentFee->setEnabled(TRUE);
+
+ mBtnJoinGroup->setVisible(FALSE);
+ mBtnInfo->setVisible(FALSE);
+ mGroupName->setVisible(FALSE);
+ }
+
+ resetDirty();
+
+ activate();
+}
+
diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h
index c04b40819d..e7028228b0 100644
--- a/indra/newview/llpanelgroupgeneral.h
+++ b/indra/newview/llpanelgroupgeneral.h
@@ -49,11 +49,10 @@ class LLSpinCtrl;
class LLPanelGroupGeneral : public LLPanelGroupTab
{
public:
- LLPanelGroupGeneral(const LLUUID& group_id);
+ LLPanelGroupGeneral();
virtual ~LLPanelGroupGeneral();
// LLPanelGroupTab
- static void* createTab(void* data);
virtual void activate();
virtual bool needsApply(std::string& mesg);
virtual bool apply(std::string& mesg);
@@ -66,7 +65,13 @@ public:
virtual void draw();
+ virtual void setGroupID(const LLUUID& id);
+
private:
+ void reset();
+
+ void resetDirty();
+
static void onFocusEdit(LLFocusableElement* ctrl, void* data);
static void onCommitAny(LLUICtrl* ctrl, void* data);
static void onCommitUserOnly(LLUICtrl* ctrl, void* data);
diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp
index 39a9f231b2..d95240e30c 100644
--- a/indra/newview/llpanelgrouplandmoney.cpp
+++ b/indra/newview/llpanelgrouplandmoney.cpp
@@ -59,7 +59,54 @@
#include "llfloaterworldmap.h"
#include "llviewermessage.h"
+static LLRegisterPanelClassWrapper<LLPanelGroupLandMoney> t_panel_group_money("panel_group_land_money");
+
+
+
////////////////////////////////////////////////////////////////////////////
+//*************************************************
+//** LLGroupMoneyTabEventHandler::impl Functions **
+//*************************************************
+
+class LLGroupMoneyTabEventHandlerImpl
+{
+public:
+ LLGroupMoneyTabEventHandlerImpl(LLButton* earlier_buttonp,
+ LLButton* later_buttonp,
+ LLTextEditor* text_editorp,
+ LLPanel* tabpanelp,
+ const std::string& loading_text,
+ S32 interval_length_days,
+ S32 max_interval_days);
+ ~LLGroupMoneyTabEventHandlerImpl();
+
+ bool getCanClickLater();
+ bool getCanClickEarlier();
+
+ void updateButtons();
+
+ void setGroupID(const LLUUID& group_id) { mGroupID = group_id; } ;
+ const LLUUID& getGroupID() const { return mGroupID;}
+
+
+//member variables
+public:
+ LLUUID mPanelID;
+ LLUUID mGroupID;
+
+ LLPanel* mTabPanelp;
+
+ int mIntervalLength;
+ int mMaxInterval;
+ int mCurrentInterval;
+
+ LLTextEditor* mTextEditorp;
+ LLButton* mEarlierButtonp;
+ LLButton* mLaterButtonp;
+
+ std::string mLoadingText;
+};
+
class LLGroupMoneyTabEventHandler
{
@@ -70,7 +117,6 @@ public:
LLTabContainer* tab_containerp,
LLPanel* panelp,
const std::string& loading_text,
- const LLUUID& group_id,
S32 interval_length_days,
S32 max_interval_days);
virtual ~LLGroupMoneyTabEventHandler();
@@ -82,14 +128,17 @@ public:
virtual void onClickLater();
virtual void onClickTab();
+ void setGroupID(const LLUUID& group_id) { if(mImplementationp) mImplementationp->setGroupID(group_id); } ;
+
static void clickEarlierCallback(void* data);
static void clickLaterCallback(void* data);
+
+
static LLMap<LLUUID, LLGroupMoneyTabEventHandler*> sInstanceIDs;
static std::map<LLPanel*, LLGroupMoneyTabEventHandler*> sTabsToHandlers;
protected:
- class impl;
- impl* mImplementationp;
+ LLGroupMoneyTabEventHandlerImpl* mImplementationp;
};
class LLGroupMoneyDetailsTabEventHandler : public LLGroupMoneyTabEventHandler
@@ -100,8 +149,8 @@ public:
LLTextEditor* text_editorp,
LLTabContainer* tab_containerp,
LLPanel* panelp,
- const std::string& loading_text,
- const LLUUID& group_id);
+ const std::string& loading_text
+ );
virtual ~LLGroupMoneyDetailsTabEventHandler();
virtual void requestData(LLMessageSystem* msg);
@@ -117,8 +166,8 @@ public:
LLTextEditor* text_editorp,
LLTabContainer* tab_containerp,
LLPanel* panelp,
- const std::string& loading_text,
- const LLUUID& group_id);
+ const std::string& loading_text
+ );
virtual ~LLGroupMoneySalesTabEventHandler();
virtual void requestData(LLMessageSystem* msg);
@@ -131,8 +180,8 @@ public:
LLGroupMoneyPlanningTabEventHandler(LLTextEditor* text_editor,
LLTabContainer* tab_containerp,
LLPanel* panelp,
- const std::string& loading_text,
- const LLUUID& group_id);
+ const std::string& loading_text
+ );
virtual ~LLGroupMoneyPlanningTabEventHandler();
virtual void requestData(LLMessageSystem* msg);
@@ -144,7 +193,7 @@ public:
class LLPanelGroupLandMoney::impl
{
public:
- impl(LLPanelGroupLandMoney& panel, const LLUUID& group_id); //constructor
+ impl(LLPanelGroupLandMoney& panel); //constructor
virtual ~impl();
void requestGroupLandInfo();
@@ -178,7 +227,6 @@ public:
LLScrollListCtrl* mGroupParcelsp;
- LLUUID mGroupID;
LLUUID mTransID;
bool mBeenActivated;
@@ -192,9 +240,8 @@ public:
//*******************************************
//** LLPanelGroupLandMoney::impl Functions **
//*******************************************
-LLPanelGroupLandMoney::impl::impl(LLPanelGroupLandMoney& panel, const LLUUID& group_id)
- : mPanel(panel),
- mGroupID(group_id)
+LLPanelGroupLandMoney::impl::impl(LLPanelGroupLandMoney& panel)
+ : mPanel(panel)
{
mTransID = LLUUID::null;
@@ -227,7 +274,7 @@ void LLPanelGroupLandMoney::impl::requestGroupLandInfo()
mTransID.generate();
mGroupParcelsp->deleteAllItems();
- send_places_query(mGroupID, mTransID, "", query_flags, LLParcel::C_ANY, "");
+ send_places_query(mPanel.mGroupID, mTransID, "", query_flags, LLParcel::C_ANY, "");
}
void LLPanelGroupLandMoney::impl::onMapButton()
@@ -277,7 +324,7 @@ bool LLPanelGroupLandMoney::impl::applyContribution()
new_contribution <= sqm_avail )
{
// update group info and server
- if(!gAgent.setGroupContribution(mGroupID, new_contribution))
+ if(!gAgent.setGroupContribution(mPanel.mGroupID, new_contribution))
{
// should never happen...
llwarns << "Unable to set contribution." << llendl;
@@ -304,7 +351,7 @@ int LLPanelGroupLandMoney::impl::getStoredContribution()
LLGroupData group_data;
group_data.mContribution = 0;
- gAgent.getGroupData(mGroupID, group_data);
+ gAgent.getGroupData(mPanel.mGroupID, group_data);
return group_data.mContribution;
}
@@ -403,7 +450,7 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
if ( trans_id != mTransID ) return;
// This power was removed to make group roles simpler
//if ( !gAgent.hasPowerInGroup(mGroupID, GP_LAND_VIEW_OWNED) ) return;
- if (!gAgent.isInGroup(mGroupID)) return;
+ if (!gAgent.isInGroup(mPanel.mGroupID)) return;
std::string name;
std::string desc;
@@ -487,25 +534,22 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
//** LLPanelGroupLandMoney Functions **
//*************************************
-//static
-void* LLPanelGroupLandMoney::createTab(void* data)
-{
- LLUUID* group_id = static_cast<LLUUID*>(data);
- return new LLPanelGroupLandMoney(*group_id);
-}
//static
LLMap<LLUUID, LLPanelGroupLandMoney*> LLPanelGroupLandMoney::sGroupIDs;
-LLPanelGroupLandMoney::LLPanelGroupLandMoney(const LLUUID& group_id) :
- LLPanelGroupTab(group_id)
+LLPanelGroupLandMoney::LLPanelGroupLandMoney() :
+ LLPanelGroupTab()
{
- mImplementationp = new impl(*this, group_id);
+ //FIXME - add setGroupID();
+ mImplementationp = new impl(*this);
//problem what if someone has both the group floater open and the finder
//open to the same group? Some maps that map group ids to panels
//will then only be working for the last panel for a given group id :(
- LLPanelGroupLandMoney::sGroupIDs.addData(group_id, this);
+
+ //FIXME - add to setGroupID()
+ //LLPanelGroupLandMoney::sGroupIDs.addData(group_id, this);
}
LLPanelGroupLandMoney::~LLPanelGroupLandMoney()
@@ -719,8 +763,7 @@ BOOL LLPanelGroupLandMoney::postBuild()
textp,
tabcp,
panelp,
- loading_text,
- mGroupID);
+ loading_text);
}
textp = getChild<LLTextEditor>("group_money_planning_text", true);
@@ -737,8 +780,7 @@ BOOL LLPanelGroupLandMoney::postBuild()
new LLGroupMoneyPlanningTabEventHandler(textp,
tabcp,
panelp,
- loading_text,
- mGroupID);
+ loading_text);
}
//pull out the widgets for the L$ sales tab
@@ -759,8 +801,7 @@ BOOL LLPanelGroupLandMoney::postBuild()
textp,
tabcp,
panelp,
- loading_text,
- mGroupID);
+ loading_text);
}
return LLPanelGroupTab::postBuild();
@@ -787,56 +828,15 @@ void LLPanelGroupLandMoney::processPlacesReply(LLMessageSystem* msg, void**)
selfp->mImplementationp->processGroupLand(msg);
}
-//*************************************************
-//** LLGroupMoneyTabEventHandler::impl Functions **
-//*************************************************
-
-class LLGroupMoneyTabEventHandler::impl
-{
-public:
- impl(LLButton* earlier_buttonp,
- LLButton* later_buttonp,
- LLTextEditor* text_editorp,
- LLPanel* tabpanelp,
- const std::string& loading_text,
- const LLUUID& group_id,
- S32 interval_length_days,
- S32 max_interval_days);
- ~impl();
-
- bool getCanClickLater();
- bool getCanClickEarlier();
-
- void updateButtons();
-
-//member variables
-public:
- LLUUID mGroupID;
- LLUUID mPanelID;
-
- LLPanel* mTabPanelp;
-
- int mIntervalLength;
- int mMaxInterval;
- int mCurrentInterval;
-
- LLTextEditor* mTextEditorp;
- LLButton* mEarlierButtonp;
- LLButton* mLaterButtonp;
- std::string mLoadingText;
-};
-
-LLGroupMoneyTabEventHandler::impl::impl(LLButton* earlier_buttonp,
+LLGroupMoneyTabEventHandlerImpl::LLGroupMoneyTabEventHandlerImpl(LLButton* earlier_buttonp,
LLButton* later_buttonp,
LLTextEditor* text_editorp,
LLPanel* tabpanelp,
const std::string& loading_text,
- const LLUUID& group_id,
S32 interval_length_days,
S32 max_interval_days)
{
- mGroupID = group_id;
mPanelID.generate();
mIntervalLength = interval_length_days;
@@ -851,21 +851,21 @@ LLGroupMoneyTabEventHandler::impl::impl(LLButton* earlier_buttonp,
mLoadingText = loading_text;
}
-LLGroupMoneyTabEventHandler::impl::~impl()
+LLGroupMoneyTabEventHandlerImpl::~LLGroupMoneyTabEventHandlerImpl()
{
}
-bool LLGroupMoneyTabEventHandler::impl::getCanClickEarlier()
+bool LLGroupMoneyTabEventHandlerImpl::getCanClickEarlier()
{
return (mCurrentInterval < mMaxInterval);
}
-bool LLGroupMoneyTabEventHandler::impl::getCanClickLater()
+bool LLGroupMoneyTabEventHandlerImpl::getCanClickLater()
{
return ( mCurrentInterval > 0 );
}
-void LLGroupMoneyTabEventHandler::impl::updateButtons()
+void LLGroupMoneyTabEventHandlerImpl::updateButtons()
{
if ( mEarlierButtonp )
{
@@ -890,16 +890,14 @@ LLGroupMoneyTabEventHandler::LLGroupMoneyTabEventHandler(LLButton* earlier_butto
LLTabContainer* tab_containerp,
LLPanel* panelp,
const std::string& loading_text,
- const LLUUID& group_id,
S32 interval_length_days,
S32 max_interval_days)
{
- mImplementationp = new impl(earlier_buttonp,
+ mImplementationp = new LLGroupMoneyTabEventHandlerImpl(earlier_buttonp,
later_buttonp,
text_editorp,
panelp,
loading_text,
- group_id,
interval_length_days,
max_interval_days);
@@ -998,15 +996,13 @@ LLGroupMoneyDetailsTabEventHandler::LLGroupMoneyDetailsTabEventHandler(LLButton*
LLTextEditor* text_editorp,
LLTabContainer* tab_containerp,
LLPanel* panelp,
- const std::string& loading_text,
- const LLUUID& group_id)
+ const std::string& loading_text)
: LLGroupMoneyTabEventHandler(earlier_buttonp,
later_buttonp,
text_editorp,
tab_containerp,
panelp,
loading_text,
- group_id,
SUMMARY_INTERVAL,
SUMMARY_MAX)
{
@@ -1022,7 +1018,7 @@ void LLGroupMoneyDetailsTabEventHandler::requestData(LLMessageSystem* msg)
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() );
- msg->addUUIDFast(_PREHASH_GroupID, mImplementationp->mGroupID );
+ msg->addUUIDFast(_PREHASH_GroupID, mImplementationp->getGroupID() );
msg->nextBlockFast(_PREHASH_MoneyData);
msg->addUUIDFast(_PREHASH_RequestID, mImplementationp->mPanelID );
msg->addS32Fast(_PREHASH_IntervalDays, mImplementationp->mIntervalLength );
@@ -1043,7 +1039,7 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg,
{
LLUUID group_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_GroupID, group_id );
- if (mImplementationp->mGroupID != group_id)
+ if (mImplementationp->getGroupID() != group_id)
{
llwarns << "Group Account details not for this group!" << llendl;
return;
@@ -1133,15 +1129,13 @@ LLGroupMoneySalesTabEventHandler::LLGroupMoneySalesTabEventHandler(LLButton* ear
LLTextEditor* text_editorp,
LLTabContainer* tab_containerp,
LLPanel* panelp,
- const std::string& loading_text,
- const LLUUID& group_id)
+ const std::string& loading_text)
: LLGroupMoneyTabEventHandler(earlier_buttonp,
later_buttonp,
text_editorp,
tab_containerp,
panelp,
loading_text,
- group_id,
SUMMARY_INTERVAL,
SUMMARY_MAX)
{
@@ -1157,7 +1151,7 @@ void LLGroupMoneySalesTabEventHandler::requestData(LLMessageSystem* msg)
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() );
- msg->addUUIDFast(_PREHASH_GroupID, mImplementationp->mGroupID );
+ msg->addUUIDFast(_PREHASH_GroupID, mImplementationp->getGroupID() );
msg->nextBlockFast(_PREHASH_MoneyData);
msg->addUUIDFast(_PREHASH_RequestID, mImplementationp->mPanelID );
msg->addS32Fast(_PREHASH_IntervalDays, mImplementationp->mIntervalLength );
@@ -1178,7 +1172,7 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg,
{
LLUUID group_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_GroupID, group_id );
- if (mImplementationp->mGroupID != group_id)
+ if (mImplementationp->getGroupID() != group_id)
{
llwarns << "Group Account Transactions not for this group!" << llendl;
return;
@@ -1305,15 +1299,13 @@ void LLPanelGroupLandMoney::processGroupAccountTransactionsReply(LLMessageSystem
LLGroupMoneyPlanningTabEventHandler::LLGroupMoneyPlanningTabEventHandler(LLTextEditor* text_editorp,
LLTabContainer* tab_containerp,
LLPanel* panelp,
- const std::string& loading_text,
- const LLUUID& group_id)
+ const std::string& loading_text)
: LLGroupMoneyTabEventHandler(NULL,
NULL,
text_editorp,
tab_containerp,
panelp,
loading_text,
- group_id,
SUMMARY_INTERVAL,
SUMMARY_MAX)
{
@@ -1329,7 +1321,7 @@ void LLGroupMoneyPlanningTabEventHandler::requestData(LLMessageSystem* msg)
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() );
- msg->addUUIDFast(_PREHASH_GroupID, mImplementationp->mGroupID );
+ msg->addUUIDFast(_PREHASH_GroupID, mImplementationp->getGroupID() );
msg->nextBlockFast(_PREHASH_MoneyData);
msg->addUUIDFast(_PREHASH_RequestID, mImplementationp->mPanelID );
msg->addS32Fast(_PREHASH_IntervalDays, mImplementationp->mIntervalLength);
@@ -1350,7 +1342,7 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg,
{
LLUUID group_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_GroupID, group_id );
- if (mImplementationp->mGroupID != group_id)
+ if (mImplementationp->getGroupID() != group_id)
{
llwarns << "Group Account Summary received not for this group!" << llendl;
return;
@@ -1468,3 +1460,141 @@ void LLPanelGroupLandMoney::processGroupAccountSummaryReply(LLMessageSystem* msg
self->processReply(msg, data);
}
+
+void LLPanelGroupLandMoney::setGroupID(const LLUUID& id)
+{
+ LLPanelGroupLandMoney::sGroupIDs.removeData(mGroupID);
+ LLPanelGroupTab::setGroupID(id);
+ LLPanelGroupLandMoney::sGroupIDs.addData(mGroupID, this);
+
+
+ bool can_view = gAgent.isInGroup(mGroupID);
+
+ mImplementationp->mGroupOverLimitIconp =
+ getChild<LLIconCtrl>("group_over_limit_icon");
+ mImplementationp->mGroupOverLimitTextp =
+ getChild<LLTextBox>("group_over_limit_text");
+
+ mImplementationp->mYourContributionEditorp
+ = getChild<LLLineEditor>("your_contribution_line_editor");
+ if ( mImplementationp->mYourContributionEditorp )
+ {
+ LLLineEditor* editor = mImplementationp->mYourContributionEditorp;
+
+ editor->setCommitCallback(mImplementationp->contributionCommitCallback, this);
+ editor->setKeystrokeCallback(mImplementationp->contributionKeystrokeCallback, this);
+ }
+
+ mImplementationp->mMapButtonp = getChild<LLButton>("map_button");
+
+ mImplementationp->mGroupParcelsp =
+ getChild<LLScrollListCtrl>("group_parcel_list");
+
+ if ( mImplementationp->mGroupParcelsp )
+ {
+ mImplementationp->mGroupParcelsp->setCommitCallback(boost::bind(&LLButton::setEnabled, mImplementationp->mMapButtonp, true));
+ mImplementationp->mGroupParcelsp->setCommitOnSelectionChange(true);
+ }
+
+ mImplementationp->mCantViewParcelsText = getString("cant_view_group_land_text");
+ mImplementationp->mCantViewAccountsText = getString("cant_view_group_accounting_text");
+
+ if ( mImplementationp->mMapButtonp )
+ {
+ mImplementationp->mMapButtonp->setClickedCallback(LLPanelGroupLandMoney::impl::mapCallback, mImplementationp);
+ }
+
+ if ( mImplementationp->mGroupOverLimitTextp )
+ {
+ mImplementationp->mGroupOverLimitTextp->setVisible(FALSE);
+ }
+
+ if ( mImplementationp->mGroupOverLimitIconp )
+ {
+ mImplementationp->mGroupOverLimitIconp->setVisible(FALSE);
+ }
+
+ if ( !can_view )
+ {
+ if ( mImplementationp->mGroupParcelsp )
+ {
+ mImplementationp->mGroupParcelsp->setCommentText(
+ mImplementationp->mCantViewParcelsText);
+ mImplementationp->mGroupParcelsp->setEnabled(FALSE);
+ }
+ }
+
+
+
+ LLButton* earlierp, *laterp;
+ LLTextEditor* textp;
+ LLPanel* panelp;
+
+ LLTabContainer* tabcp = getChild<LLTabContainer>("group_money_tab_container");
+
+ if ( tabcp )
+ {
+ S32 i;
+ S32 tab_count = tabcp->getTabCount();
+
+ for (i = tab_count - 1; i >=0; --i)
+ {
+ tabcp->enableTabButton(i, can_view );
+ }
+ }
+
+ std::string loading_text = getString("loading_txt");
+
+ //pull out the widgets for the L$ details tab
+ earlierp = getChild<LLButton>("earlier_details_button", true);
+ laterp = getChild<LLButton>("later_details_button", true);
+ textp = getChild<LLTextEditor>("group_money_details_text", true);
+ panelp = getChild<LLPanel>("group_money_details_tab", true);
+
+ if ( !can_view )
+ {
+ textp->setText(mImplementationp->mCantViewAccountsText);
+ }
+ else
+ {
+ if(mImplementationp->mMoneyDetailsTabEHp == 0)
+ mImplementationp->mMoneyDetailsTabEHp = new LLGroupMoneyDetailsTabEventHandler(earlierp,laterp,textp,tabcp,panelp,loading_text);
+ mImplementationp->mMoneyDetailsTabEHp->setGroupID(mGroupID);
+ }
+
+ textp = getChild<LLTextEditor>("group_money_planning_text", true);
+
+
+ if ( !can_view )
+ {
+ textp->setText(mImplementationp->mCantViewAccountsText);
+ }
+ else
+ {
+ panelp = getChild<LLPanel>("group_money_planning_tab", true);
+ if(mImplementationp->mMoneyPlanningTabEHp == 0)
+ mImplementationp->mMoneyPlanningTabEHp = new LLGroupMoneyPlanningTabEventHandler(textp,tabcp,panelp,loading_text);
+ mImplementationp->mMoneyPlanningTabEHp->setGroupID(mGroupID);
+ }
+
+ //pull out the widgets for the L$ sales tab
+ textp = getChild<LLTextEditor>("group_money_sales_text", true);
+
+
+ if ( !can_view )
+ {
+ textp->setText(mImplementationp->mCantViewAccountsText);
+ }
+ else
+ {
+ earlierp = getChild<LLButton>("earlier_sales_button", true);
+ laterp = getChild<LLButton>("later_sales_button", true);
+ panelp = getChild<LLPanel>("group_money_sales_tab", true);
+ if(mImplementationp->mMoneySalesTabEHp == NULL)
+ mImplementationp->mMoneySalesTabEHp = new LLGroupMoneySalesTabEventHandler(earlierp,laterp,textp,tabcp,panelp,loading_text);
+ mImplementationp->mMoneySalesTabEHp->setGroupID(mGroupID);
+ }
+
+ activate();
+}
+
diff --git a/indra/newview/llpanelgrouplandmoney.h b/indra/newview/llpanelgrouplandmoney.h
index 748485745b..73c52cdf2e 100644
--- a/indra/newview/llpanelgrouplandmoney.h
+++ b/indra/newview/llpanelgrouplandmoney.h
@@ -44,13 +44,11 @@
class LLPanelGroupLandMoney : public LLPanelGroupTab
{
public:
- LLPanelGroupLandMoney(const LLUUID& group_id);
+ LLPanelGroupLandMoney();
virtual ~LLPanelGroupLandMoney();
virtual BOOL postBuild();
virtual BOOL isVisibleByAgent(LLAgent* agentp);
- static void* createTab(void* data);
-
virtual void activate();
virtual bool needsApply(std::string& mesg);
virtual bool apply(std::string& mesg);
@@ -64,6 +62,8 @@ public:
static void processGroupAccountDetailsReply(LLMessageSystem* msg, void** data);
static void processGroupAccountTransactionsReply(LLMessageSystem* msg, void** data);
static void processGroupAccountSummaryReply(LLMessageSystem* msg, void** data);
+
+ virtual void setGroupID(const LLUUID& id);
protected:
class impl;
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 15ae374447..f06342ebfc 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -58,6 +58,9 @@
#include "llviewermessage.h"
#include "llnotifications.h"
+static LLRegisterPanelClassWrapper<LLPanelGroupNotices> t_panel_group_notices("panel_group_notices");
+
+
/////////////////////////
// LLPanelGroupNotices //
/////////////////////////
@@ -207,12 +210,13 @@ std::string build_notice_date(const U32& the_time)
return dateStr;
}
-LLPanelGroupNotices::LLPanelGroupNotices(const LLUUID& group_id) :
- LLPanelGroupTab(group_id),
+LLPanelGroupNotices::LLPanelGroupNotices() :
+ LLPanelGroupTab(),
mInventoryItem(NULL),
mInventoryOffer(NULL)
{
- sInstances[group_id] = this;
+
+
}
LLPanelGroupNotices::~LLPanelGroupNotices()
@@ -228,12 +232,6 @@ LLPanelGroupNotices::~LLPanelGroupNotices()
}
}
-// static
-void* LLPanelGroupNotices::createTab(void* data)
-{
- LLUUID* group_id = static_cast<LLUUID*>(data);
- return new LLPanelGroupNotices(*group_id);
-}
BOOL LLPanelGroupNotices::isVisibleByAgent(LLAgent* agentp)
{
@@ -590,3 +588,17 @@ void LLPanelGroupNotices::arrangeNoticeView(ENoticeView view_type)
mBtnOpenAttachment->setEnabled(FALSE);
}
}
+void LLPanelGroupNotices::setGroupID(const LLUUID& id)
+{
+ sInstances.erase(mGroupID);
+ LLPanelGroupTab::setGroupID(id);
+ sInstances[mGroupID] = this;
+
+ mBtnNewMessage->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_NOTICES_SEND));
+
+ LLGroupDropTarget* target = getChild<LLGroupDropTarget> ("drop_target");
+ target->setPanel (this);
+ target->setGroup (mGroupID);
+
+ activate();
+}
diff --git a/indra/newview/llpanelgroupnotices.h b/indra/newview/llpanelgroupnotices.h
index a0712f1770..c41a5f501b 100644
--- a/indra/newview/llpanelgroupnotices.h
+++ b/indra/newview/llpanelgroupnotices.h
@@ -47,11 +47,10 @@ class LLScrollListCtrl;
class LLPanelGroupNotices : public LLPanelGroupTab
{
public:
- LLPanelGroupNotices(const LLUUID& group_id);
+ LLPanelGroupNotices();
virtual ~LLPanelGroupNotices();
// LLPanelGroupTab
- static void* createTab(void* data);
virtual void activate();
//virtual bool needsApply(std::string& mesg);
//virtual bool apply(std::string& mesg);
@@ -70,6 +69,8 @@ public:
const std::string& inventory_name,
LLOfferInfo* inventory_offer);
+ virtual void setGroupID(const LLUUID& id);
+
private:
static void onClickRemoveAttachment(void* data);
static void onClickOpenAttachment(void* data);
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 50e1f84cad..ab614fea53 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -55,6 +55,8 @@
#include "roles_constants.h"
+static LLRegisterPanelClassWrapper<LLPanelGroupRoles> t_panel_group_roles("panel_group_roles");
+
bool agentCanRemoveFromRole(const LLUUID& group_id,
const LLUUID& role_id)
{
@@ -108,14 +110,9 @@ bool agentCanAddToRole(const LLUUID& group_id,
}
// static
-void* LLPanelGroupRoles::createTab(void* data)
-{
- LLUUID* group_id = static_cast<LLUUID*>(data);
- return new LLPanelGroupRoles(*group_id);
-}
-LLPanelGroupRoles::LLPanelGroupRoles(const LLUUID& group_id)
-: LLPanelGroupTab(group_id),
+LLPanelGroupRoles::LLPanelGroupRoles()
+: LLPanelGroupTab(),
mCurrentTab(NULL),
mRequestedTab( NULL ),
mSubTabContainer( NULL ),
@@ -126,13 +123,6 @@ LLPanelGroupRoles::LLPanelGroupRoles(const LLUUID& group_id)
LLPanelGroupRoles::~LLPanelGroupRoles()
{
- int i;
- for (i = 0; i < mSubTabContainer->getTabCount(); ++i)
- {
- LLPanelGroupSubTab* subtabp = (LLPanelGroupSubTab*) mSubTabContainer->getPanelByIndex(i);
-
- subtabp->removeObserver(this);
- }
}
BOOL LLPanelGroupRoles::postBuild()
@@ -161,7 +151,7 @@ BOOL LLPanelGroupRoles::postBuild()
if (!subtabp->postBuildSubTab(this))
return FALSE;
- subtabp->addObserver(this);
+ //subtabp->addObserver(this);
}
// Set the current tab to whatever is currently being shown.
@@ -387,7 +377,8 @@ std::string LLPanelGroupRoles::getHelpText() const
void LLPanelGroupRoles::update(LLGroupChange gc)
{
if (mGroupID.isNull()) return;
-
+
+
LLPanelGroupTab* panelp = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel();
if (panelp)
{
@@ -397,6 +388,7 @@ void LLPanelGroupRoles::update(LLGroupChange gc)
{
llwarns << "LLPanelGroupRoles::update() -- No subtab to update!" << llendl;
}
+
}
void LLPanelGroupRoles::activate()
@@ -464,17 +456,12 @@ BOOL LLPanelGroupRoles::hasModal()
return panelp->hasModal();
}
-// PanelGroupTab observer trigger
-void LLPanelGroupRoles::tabChanged()
-{
- notifyObservers();
-}
////////////////////////////
// LLPanelGroupSubTab
////////////////////////////
-LLPanelGroupSubTab::LLPanelGroupSubTab(const LLUUID& group_id)
-: LLPanelGroupTab(group_id),
+LLPanelGroupSubTab::LLPanelGroupSubTab()
+: LLPanelGroupTab(),
mHeader(NULL),
mFooter(NULL),
mSearchLineEditor(NULL),
@@ -847,15 +834,11 @@ void LLPanelGroupSubTab::setFooterEnabled(BOOL enable)
// LLPanelGroupMembersSubTab
////////////////////////////
-// static
-void* LLPanelGroupMembersSubTab::createTab(void* data)
-{
- LLUUID* group_id = static_cast<LLUUID*>(data);
- return new LLPanelGroupMembersSubTab(*group_id);
-}
-LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab(const LLUUID& group_id)
-: LLPanelGroupSubTab(group_id),
+static LLRegisterPanelClassWrapper<LLPanelGroupMembersSubTab> t_panel_group_members_subtab("panel_group_members_subtab");
+
+LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab()
+: LLPanelGroupSubTab(),
mMembersList(NULL),
mAssignedRolesList(NULL),
mAllowedActionsList(NULL),
@@ -1708,15 +1691,10 @@ void LLPanelGroupMembersSubTab::updateMembers()
// LLPanelGroupRolesSubTab
////////////////////////////
-// static
-void* LLPanelGroupRolesSubTab::createTab(void* data)
-{
- LLUUID* group_id = static_cast<LLUUID*>(data);
- return new LLPanelGroupRolesSubTab(*group_id);
-}
+static LLRegisterPanelClassWrapper<LLPanelGroupRolesSubTab> t_panel_group_roles_subtab("panel_group_roles_subtab");
-LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab(const LLUUID& group_id)
- : LLPanelGroupSubTab(group_id),
+LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab()
+ : LLPanelGroupSubTab(),
mRolesList(NULL),
mAssignedMembersList(NULL),
mAllowedActionsList(NULL),
@@ -2418,15 +2396,11 @@ void LLPanelGroupRolesSubTab::saveRoleChanges()
// LLPanelGroupActionsSubTab
////////////////////////////
-// static
-void* LLPanelGroupActionsSubTab::createTab(void* data)
-{
- LLUUID* group_id = static_cast<LLUUID*>(data);
- return new LLPanelGroupActionsSubTab(*group_id);
-}
+static LLRegisterPanelClassWrapper<LLPanelGroupActionsSubTab> t_panel_group_actions_subtab("panel_group_actions_subtab");
-LLPanelGroupActionsSubTab::LLPanelGroupActionsSubTab(const LLUUID& group_id)
-: LLPanelGroupSubTab(group_id)
+
+LLPanelGroupActionsSubTab::LLPanelGroupActionsSubTab()
+: LLPanelGroupSubTab()
{
}
@@ -2598,3 +2572,30 @@ void LLPanelGroupActionsSubTab::handleActionSelect()
LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mGroupID);
}
}
+void LLPanelGroupRoles::setGroupID(const LLUUID& id)
+{
+ LLPanelGroupTab::setGroupID(id);
+
+ LLPanelGroupMembersSubTab* group_members_tab = findChild<LLPanelGroupMembersSubTab>("members_sub_tab");
+ LLPanelGroupRolesSubTab* group_roles_tab = findChild<LLPanelGroupRolesSubTab>("roles_sub_tab");
+ LLPanelGroupActionsSubTab* group_actions_tab = findChild<LLPanelGroupActionsSubTab>("actions_sub_tab");
+
+ if(group_members_tab) group_members_tab->setGroupID(id);
+ if(group_roles_tab) group_roles_tab->setGroupID(id);
+ if(group_actions_tab) group_actions_tab->setGroupID(id);
+
+ activate();
+
+ if (!mSubTabContainer) return ;
+
+ // Hook up each sub-tabs callback and widgets.
+ for (S32 i = 0; i < mSubTabContainer->getTabCount(); ++i)
+ {
+ LLPanel* panel = mSubTabContainer->getPanelByIndex(i);
+ LLPanelGroupSubTab* subtabp = dynamic_cast<LLPanelGroupSubTab*>(panel);
+ if (subtabp)
+ subtabp->postBuildSubTab(this);
+ }
+}
+
+
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index 3ceaae1313..9519263bba 100644
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -49,11 +49,10 @@ class LLTextEditor;
typedef std::map<std::string,std::string> icon_map_t;
-class LLPanelGroupRoles : public LLPanelGroupTab,
- public LLPanelGroupTabObserver
+class LLPanelGroupRoles : public LLPanelGroupTab
{
public:
- LLPanelGroupRoles(const LLUUID& group_id);
+ LLPanelGroupRoles();
virtual ~LLPanelGroupRoles();
// Allow sub tabs to ask for sibling controls.
@@ -64,7 +63,7 @@ public:
virtual BOOL postBuild();
virtual BOOL isVisibleByAgent(LLAgent* agentp);
- static void* createTab(void* data);
+
void handleClickSubTab();
// Checks if the current tab needs to be applied, and tries to switch to the requested tab.
@@ -87,8 +86,7 @@ public:
virtual void cancel();
virtual void update(LLGroupChange gc);
- // PanelGroupTab observer trigger
- virtual void tabChanged();
+ virtual void setGroupID(const LLUUID& id);
protected:
LLPanelGroupTab* mCurrentTab;
@@ -104,7 +102,7 @@ protected:
class LLPanelGroupSubTab : public LLPanelGroupTab
{
public:
- LLPanelGroupSubTab(const LLUUID& group_id);
+ LLPanelGroupSubTab();
virtual ~LLPanelGroupSubTab();
virtual BOOL postBuild();
@@ -164,13 +162,11 @@ protected:
class LLPanelGroupMembersSubTab : public LLPanelGroupSubTab
{
public:
- LLPanelGroupMembersSubTab(const LLUUID& group_id);
+ LLPanelGroupMembersSubTab();
virtual ~LLPanelGroupMembersSubTab();
virtual BOOL postBuildSubTab(LLView* root);
- static void* createTab(void* data);
-
static void onMemberSelect(LLUICtrl*, void*);
void handleMemberSelect();
@@ -229,13 +225,11 @@ protected:
class LLPanelGroupRolesSubTab : public LLPanelGroupSubTab
{
public:
- LLPanelGroupRolesSubTab(const LLUUID& group_id);
+ LLPanelGroupRolesSubTab();
virtual ~LLPanelGroupRolesSubTab();
virtual BOOL postBuildSubTab(LLView* root);
- static void* createTab(void* data);
-
virtual void activate();
virtual void deactivate();
virtual bool needsApply(std::string& mesg);
@@ -290,12 +284,11 @@ protected:
class LLPanelGroupActionsSubTab : public LLPanelGroupSubTab
{
public:
- LLPanelGroupActionsSubTab(const LLUUID& group_id);
+ LLPanelGroupActionsSubTab();
virtual ~LLPanelGroupActionsSubTab();
virtual BOOL postBuildSubTab(LLView* root);
- static void* createTab(void* data);
virtual void activate();
virtual void deactivate();
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 9be2fb12d2..a8e3fd3195 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -638,6 +638,11 @@ void LLPanelPeople::onTabSelected(const LLSD& param)
std::string tab_name = getChild<LLPanel>(param.asString())->getName();
mNearbyListUpdater->setActive(tab_name == NEARBY_TAB_NAME);
updateButtons();
+
+ if (GROUP_TAB_NAME == tab_name)
+ mFilterEditor->setLabel(getString("groups_filter_label"));
+ else
+ mFilterEditor->setLabel(getString("people_filter_label"));
}
void LLPanelPeople::onAvatarListDoubleClicked(LLAvatarList* list)
@@ -669,9 +674,7 @@ void LLPanelPeople::onAddFriendButtonClicked()
LLUUID id = getCurrentItemID();
if (id.notNull())
{
- std::string name;
- gCacheName->getFullName(id, name);
- LLAvatarActions::requestFriendshipDialog(id, name);
+ LLAvatarActions::requestFriendshipDialog(id);
}
}
@@ -693,9 +696,7 @@ void LLPanelPeople::onDeleteFriendButtonClicked()
void LLPanelPeople::onGroupInfoButtonClicked()
{
- LLUUID group_id = getCurrentItemID();
- if (group_id.notNull())
- LLGroupActions::info(group_id);
+ LLGroupActions::show(getCurrentItemID());
}
void LLPanelPeople::onChatButtonClicked()
@@ -763,7 +764,7 @@ void LLPanelPeople::onGroupPlusMenuItemClicked(const LLSD& userdata)
if (chosen_item == "join_group")
LLGroupActions::search();
else if (chosen_item == "new_group")
- LLGroupActions::create();
+ LLGroupActions::createGroup();
}
void LLPanelPeople::onCallButtonClicked()
@@ -798,6 +799,9 @@ void LLPanelPeople::onMoreButtonClicked()
void LLPanelPeople::onOpen(const LLSD& key)
{
std::string tab_name = key["people_panel_tab_name"];
+ mFilterEditor -> clear();
+ onFilterEdit("");
+
if (!tab_name.empty())
mTabContainer->selectTabByName(tab_name);
else
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 19aef93d7e..d515b03ea9 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -56,7 +56,6 @@
#include "llcombobox.h"
#include "lluiconstants.h"
#include "lldbstrings.h"
-#include "llfloatergroupinfo.h"
#include "llfloatergroups.h"
#include "llfloaterreg.h"
#include "llavataractions.h"
@@ -65,6 +64,7 @@
#include "lluictrlfactory.h"
#include "llspinctrl.h"
#include "roles_constants.h"
+#include "llgroupactions.h"
///----------------------------------------------------------------------------
/// Class llpanelpermissions
@@ -820,7 +820,7 @@ void LLPanelPermissions::onClickOwner(void *data)
{
LLUUID group_id;
LLSelectMgr::getInstance()->selectGetGroup(group_id);
- LLFloaterGroupInfo::showFromUUID(group_id);
+ LLGroupActions::show(group_id);
}
else
{
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index e8d6ff9ec9..afcd8c735c 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -57,12 +57,13 @@ static const std::string XML_PICKS_LIST = "back_panel";
#define PICK_ITEMS_BETWEEN 5
+static LLRegisterPanelClassWrapper<LLPanelPicks> t_panel_picks("panel_picks");
//-----------------------------------------------------------------------------
// LLPanelPicks
//-----------------------------------------------------------------------------
LLPanelPicks::LLPanelPicks()
-: LLPanelProfileTab(LLUUID::null),
+: LLPanelProfileTab(),
mPopupMenu(NULL),
mSelectedPickItem(NULL),
mProfilePanel(NULL),
@@ -100,7 +101,6 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
childSetTextArg("pick_title", "[NAME]",name);
LLView* picks_list = getPicksList();
- if(!picks_list) return;
// to restore selection of the same item later
LLUUID pick_id_selected(LLUUID::null);
@@ -131,7 +131,7 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
picture->setPickId(pick_id);
picture->setCreatorId(getAvatarId());
- LLAvatarPropertiesProcessor::instance().addObserver(mAvatarId, picture);
+ LLAvatarPropertiesProcessor::instance().addObserver(getAvatarId(), picture);
picture->update();
mPickItemList.push_back(picture);
if (pick_id_selected != LLUUID::null &&
@@ -152,14 +152,11 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
void LLPanelPicks::clear()
{
LLView* scroll = getPicksList();
- if(scroll)
+ picture_list_t::const_iterator it = mPickItemList.begin();
+ for(; mPickItemList.end() != it; ++it)
{
- picture_list_t::const_iterator it = mPickItemList.begin();
- for(; mPickItemList.end() != it; ++it)
- {
- scroll->removeChild(*it);
- delete *it;
- }
+ scroll->removeChild(*it);
+ delete *it;
}
mPickItemList.clear();
mSelectedPickItem = NULL;
@@ -225,7 +222,7 @@ void LLPanelPicks::reshapePickItem(LLView* const pick_item, const S32 last_botto
LLView* LLPanelPicks::getPicksList() const
{
- return getChild<LLView>(XML_PICKS_LIST, TRUE, FALSE);
+ return getChild<LLView>(XML_PICKS_LIST);
}
BOOL LLPanelPicks::postBuild()
@@ -261,6 +258,8 @@ void LLPanelPicks::onOpen(const LLSD& key)
// Disable buttons when viewing profile for first time
if(getAvatarId() != id)
{
+ clear();
+
childSetEnabled(XML_BTN_INFO,FALSE);
childSetEnabled(XML_BTN_TELEPORT,FALSE);
childSetEnabled(XML_BTN_SHOW_ON_MAP,FALSE);
@@ -373,7 +372,7 @@ void LLPanelPicks::updateButtons()
int picks_num = mPickItemList.size();
childSetEnabled(XML_BTN_INFO, picks_num > 0);
- if (mAvatarId == gAgentID)
+ if (getAvatarId() == gAgentID)
{
childSetEnabled(XML_BTN_NEW, picks_num < MAX_AVATAR_PICKS);
childSetEnabled(XML_BTN_DELETE, picks_num > 0);
@@ -403,12 +402,14 @@ void LLPanelPicks::setSelectedPickItem(LLPickItem* item)
BOOL LLPanelPicks::isMouseInPick( S32 x, S32 y )
{
- LLScrollContainer* scroll = getChild<LLScrollContainer>("profile_scroll");
- if (!scroll->parentPointInView(x, y)) return FALSE;
-
S32 x_l = x;
S32 y_l = y;
+ if(!getChild<LLUICtrl>("profile_scroll")->getRect().pointInRect(x, y))
+ {
+ return FALSE;
+ }
+
picture_list_t::const_iterator it = mPickItemList.begin();
for(; mPickItemList.end() != it; ++it)
{
@@ -516,11 +517,8 @@ void LLPickItem::init(LLPickData* pick_data)
mPosGlobal = pick_data->pos_global;
mLocation = pick_data->location_text;
- LLTextureCtrl* picture = getChild<LLTextureCtrl>("picture", TRUE, FALSE);
- if (picture)
- {
- picture->setImageAssetID(pick_data->snapshot_id);
- }
+ LLTextureCtrl* picture = getChild<LLTextureCtrl>("picture");
+ picture->setImageAssetID(pick_data->snapshot_id);
}
void LLPickItem::setPickName(const std::string& name)
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index 31d76ca4e2..d6d827356b 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -68,7 +68,10 @@ LLPanelPlaceInfo::LLPanelPlaceInfo()
mRequestedID(),
mPosRegion(),
mLandmarkID(),
- mMinHeight(0)
+ mMinHeight(0),
+ mScrollingPanel(NULL),
+ mInfoPanel(NULL),
+ mMediaPanel(NULL)
{}
LLPanelPlaceInfo::~LLPanelPlaceInfo()
@@ -111,9 +114,10 @@ BOOL LLPanelPlaceInfo::postBuild()
mMinHeight = scroll_container->getScrolledViewRect().getHeight();
mScrollingPanel = getChild<LLPanel>("scrolling_panel");
-
- mInfoPanel = getChild<LLPanel>("info_panel", TRUE, FALSE);
- mMediaPanel = getChild<LLMediaPanel>("media_panel", TRUE, FALSE);
+ mInfoPanel = getChild<LLPanel>("info_panel");
+ mMediaPanel = getChild<LLMediaPanel>("media_panel");
+ if (!mMediaPanel)
+ return FALSE;
return TRUE;
}
@@ -238,15 +242,20 @@ void LLPanelPlaceInfo::setParcelID(const LLUUID& parcel_id)
void LLPanelPlaceInfo::setInfoType(INFO_TYPE type)
{
- if (!mInfoPanel)
- return;
+ if (type != PLACE)
+ toggleMediaPanel(FALSE);
+
+ bool is_landmark_info_type = type == LANDMARK;
+ LLPanel* landmark_info_panel = getChild<LLPanel>("landmark_info_panel");
+ if (landmark_info_panel)
+ {
+ landmark_info_panel->setVisible(is_landmark_info_type);
+ }
switch(type)
{
case CREATE_LANDMARK:
mCurrentTitle = getString("title_create_landmark");
-
- toggleMediaPanel(FALSE);
break;
case PLACE:
@@ -262,14 +271,10 @@ void LLPanelPlaceInfo::setInfoType(INFO_TYPE type)
// a landmark or a teleport history item
case LANDMARK:
mCurrentTitle = getString("title_landmark");
-
- toggleMediaPanel(FALSE);
break;
-
+
case TELEPORT_HISTORY:
mCurrentTitle = getString("title_place");
-
- toggleMediaPanel(FALSE);
break;
}
}
@@ -284,7 +289,7 @@ BOOL LLPanelPlaceInfo::isMediaPanelVisible()
void LLPanelPlaceInfo::toggleMediaPanel(BOOL visible)
{
- if (!(mMediaPanel && mInfoPanel))
+ if (!mMediaPanel)
return;
if (visible)
@@ -384,7 +389,7 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
if (mCurrentTitle != getString("title_landmark"))
{
- mTitleEditor->setText(parcel_data.name + "; " + name);
+ mTitleEditor->setText(parcel_data.name);
mNotesEditor->setText(LLStringUtil::null);
}
}
@@ -432,7 +437,7 @@ void LLPanelPlaceInfo::displayAgentParcelInfo()
LLParcelData parcel_data;
parcel_data.desc = parcel->getDesc();
- parcel_data.flags = parcel->getParcelFlags();
+ parcel_data.flags = region->getSimAccess();
parcel_data.name = parcel->getName();
parcel_data.sim_name = gAgent.getRegion()->getName();
parcel_data.snapshot_id = parcel->getSnapshotID();
@@ -500,7 +505,7 @@ void LLPanelPlaceInfo::createLandmark(const LLUUID& folder_id)
// If typed name is empty use the parcel name instead.
if (name.empty())
{
- name = mParcelName->getText() + "; " + mRegionName->getText();
+ name = mParcelName->getText();
}
LLStringUtil::replaceChar(desc, '\n', ' ');
@@ -511,7 +516,7 @@ void LLPanelPlaceInfo::createLandmark(const LLUUID& folder_id)
void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent)
{
- if (mMinHeight > 0)
+ if (mMinHeight > 0 && mScrollingPanel != NULL)
{
mScrollingPanel->reshape(mScrollingPanel->getRect().getWidth(), mMinHeight);
}
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 31b2d01dcf..7461d150c8 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -106,6 +106,9 @@ BOOL LLPanelPlaces::postBuild()
mOverflowBtn = getChild<LLButton>("overflow_btn");
+ // *TODO: Assign the action to an appropriate event.
+ mOverflowBtn->setClickedCallback(boost::bind(&LLPanelPlaces::toggleMediaPanel, this));
+
mTabContainer = getChild<LLTabContainer>("Places Tabs");
if (mTabContainer)
{
@@ -118,17 +121,14 @@ BOOL LLPanelPlaces::postBuild()
mFilterEditor->setCommitCallback(boost::bind(&LLPanelPlaces::onFilterEdit, this, _2));
}
- mPlaceInfo = getChild<LLPanelPlaceInfo>("panel_place_info", TRUE, FALSE);
- if (mPlaceInfo)
+ mPlaceInfo = getChild<LLPanelPlaceInfo>("panel_place_info");
+ if (!mPlaceInfo)
+ return FALSE;
+
+ LLButton* back_btn = mPlaceInfo->getChild<LLButton>("back_btn");
+ if (back_btn)
{
- LLButton* back_btn = mPlaceInfo->getChild<LLButton>("back_btn");
- if (back_btn)
- {
- back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
- }
-
- // *TODO: Assign the action to an appropriate event.
- mOverflowBtn->setClickedCallback(boost::bind(&LLPanelPlaces::toggleMediaPanel, this));
+ back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
}
return TRUE;
@@ -136,7 +136,10 @@ BOOL LLPanelPlaces::postBuild()
void LLPanelPlaces::onOpen(const LLSD& key)
{
- if(key.size() == 0)
+ mFilterEditor->clear();
+ onFilterEdit("");
+
+ if(mPlaceInfo == NULL || key.size() == 0)
return;
mPlaceInfoType = key["type"].asString();
@@ -197,10 +200,15 @@ void LLPanelPlaces::onOpen(const LLSD& key)
hist_items[index].mRegionID,
pos_global);
}
+
+
}
void LLPanelPlaces::setItem(LLInventoryItem* item)
{
+ if (!mPlaceInfo)
+ return;
+
mItem = item;
// If the item is a link get a linked item
@@ -224,6 +232,9 @@ void LLPanelPlaces::setItem(LLInventoryItem* item)
void LLPanelPlaces::onLandmarkLoaded(LLLandmark* landmark)
{
+ if (!mPlaceInfo)
+ return;
+
LLUUID region_id;
landmark->getRegionID(region_id);
LLVector3d pos_global;
@@ -263,11 +274,6 @@ void LLPanelPlaces::onShareButtonClicked()
// TODO: Launch the "Things" Share wizard
}
-void LLPanelPlaces::onAddLandmarkButtonClicked()
-{
- LLFloaterReg::showInstance("add_landmark");
-}
-
void LLPanelPlaces::onCopySLURLButtonClicked()
{
mActivePanel->onCopySLURL();
@@ -276,6 +282,9 @@ void LLPanelPlaces::onCopySLURLButtonClicked()
void LLPanelPlaces::onTeleportButtonClicked()
{
+ if (!mPlaceInfo)
+ return;
+
if (mPlaceInfo->getVisible())
{
if (mPlaceInfoType == "landmark")
@@ -284,7 +293,7 @@ void LLPanelPlaces::onTeleportButtonClicked()
payload["asset_id"] = mItem->getAssetUUID();
LLNotifications::instance().add("TeleportFromLandmark", LLSD(), payload);
}
- else if (mPlaceInfoType == "remote_place")
+ else if (mPlaceInfoType == "remote_place" || mPlaceInfoType == "agent")
{
LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
if (!mPosGlobal.isExactlyZero() && worldmap_instance)
@@ -302,6 +311,9 @@ void LLPanelPlaces::onTeleportButtonClicked()
void LLPanelPlaces::onShowOnMapButtonClicked()
{
+ if (!mPlaceInfo)
+ return;
+
if (mPlaceInfo->getVisible())
{
LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
@@ -368,6 +380,11 @@ void LLPanelPlaces::toggleMediaPanel()
return;
mPlaceInfo->toggleMediaPanel(!mPlaceInfo->isMediaPanelVisible());
+
+ // Refresh the current place info because
+ // the media panel controls can't refer to
+ // the remote parcel media.
+ onOpen(LLSD().insert("type", "agent"));
}
void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
@@ -430,10 +447,17 @@ void LLPanelPlaces::changed(U32 mask)
void LLPanelPlaces::onAgentParcelChange()
{
- if (mPlaceInfo->getVisible() && (mPlaceInfoType == "agent" || mPlaceInfoType == "create_landmark"))
+ if (!mPlaceInfo)
+ return;
+
+ if (mPlaceInfo->getVisible() && mPlaceInfoType == "create_landmark")
{
onOpen(LLSD().insert("type", mPlaceInfoType));
}
+ else if (mPlaceInfo->isMediaPanelVisible())
+ {
+ onOpen(LLSD().insert("type", "agent"));
+ }
else
{
updateVerbs();
@@ -442,9 +466,13 @@ void LLPanelPlaces::onAgentParcelChange()
void LLPanelPlaces::updateVerbs()
{
+ if (!mPlaceInfo)
+ return;
+
bool is_place_info_visible = mPlaceInfo->getVisible();
bool is_agent_place_info_visible = mPlaceInfoType == "agent";
bool is_create_landmark_visible = mPlaceInfoType == "create_landmark";
+ bool is_media_panel_visible = mPlaceInfo->isMediaPanelVisible();
mTeleportBtn->setVisible(!is_create_landmark_visible);
mShareBtn->setVisible(!is_create_landmark_visible);
@@ -459,15 +487,18 @@ void LLPanelPlaces::updateVerbs()
{
if (is_agent_place_info_visible)
{
- // We don't need to teleport to the current location so disable the button
- mTeleportBtn->setEnabled(FALSE);
+ // We don't need to teleport to the current location
+ // so check if the location is not within the current parcel.
+ mTeleportBtn->setEnabled(!is_media_panel_visible &&
+ !mPosGlobal.isExactlyZero() &&
+ !LLViewerParcelMgr::getInstance()->inAgentParcel(mPosGlobal));
}
else if (mPlaceInfoType == "landmark" || mPlaceInfoType == "remote_place")
{
mTeleportBtn->setEnabled(TRUE);
}
- mShowOnMapBtn->setEnabled(TRUE);
+ mShowOnMapBtn->setEnabled(!is_media_panel_visible);
}
else
{
diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h
index 695c78cfba..431c8168d9 100644
--- a/indra/newview/llpanelplaces.h
+++ b/indra/newview/llpanelplaces.h
@@ -66,7 +66,6 @@ private:
void onFilterEdit(const std::string& search_string);
void onTabSelected();
- //void onAddLandmarkButtonClicked();
//void onCopySLURLButtonClicked();
//void onShareButtonClicked();
void onTeleportButtonClicked();
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index f97105caa8..017a7312a1 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -32,20 +32,16 @@
#include "llviewerprecompiledheaders.h"
#include "llpanelprofile.h"
-#include "lltabcontainer.h"
-#include "llpanelpicks.h"
+
#include "llagent.h"
-#include "llcommandhandler.h"
#include "llavataractions.h"
+#include "llcommandhandler.h"
+#include "llpanelpicks.h"
+#include "lltabcontainer.h"
static const std::string PANEL_PICKS = "panel_picks";
-static const std::string PANEL_NOTES = "panel_notes";
static const std::string PANEL_PROFILE = "panel_profile";
-static LLRegisterPanelClassWrapper<LLPanelAvatarProfile> t_panel_profile(PANEL_PROFILE);
-static LLRegisterPanelClassWrapper<LLPanelPicks> t_panel_picks(PANEL_PICKS);
-
-
class LLAgentHandler : public LLCommandHandler
{
public:
@@ -74,34 +70,45 @@ LLAgentHandler gAgentHandler;
LLPanelProfile::LLPanelProfile()
-: LLPanel(),
- mTabContainer(NULL)
-{
-}
-
-LLPanelProfile::~LLPanelProfile()
+ : LLPanel()
+ , mTabCtrl(NULL)
+ , mAvatarId(LLUUID::null)
{
}
BOOL LLPanelProfile::postBuild()
{
- mTabContainer = getChild<LLTabContainer>("tabs");
- mTabContainer->setCommitCallback(boost::bind(&LLPanelProfile::onTabSelected, this, _2));
+ mTabCtrl = getChild<LLTabContainer>("tabs");
+
+ getTabCtrl()->setCommitCallback(boost::bind(&LLPanelProfile::onTabSelected, this, _2));
LLPanelPicks* panel_picks = getChild<LLPanelPicks>(PANEL_PICKS);
panel_picks->setProfilePanel(this);
- mTabs[PANEL_PICKS] = panel_picks;
- mTabs[PANEL_PROFILE] = getChild<LLPanelAvatarProfile>(PANEL_PROFILE);
+ getTabContainer()[PANEL_PICKS] = panel_picks;
+ getTabContainer()[PANEL_PROFILE] = getChild<LLPanelAvatarProfile>(PANEL_PROFILE);
return TRUE;
}
+void LLPanelProfile::onOpen(const LLSD& key)
+{
+ if (key.has("open_tab_name"))
+ {
+ // onOpen from selected panel will be called from onTabSelected callback
+ getTabCtrl()->selectTabByName(key["open_tab_name"]);
+ }
+ else
+ {
+ getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId());
+ }
+}
+
//*TODO redo panel toggling
void LLPanelProfile::togglePanel(LLPanel* panel)
{
// TRUE - we need to open/expand "panel"
- BOOL expand = this->getChildList()->back() != panel; // mTabContainer->getVisible();
+ bool expand = getChildList()->back() != panel; // mTabCtrl->getVisible();
if (expand)
{
@@ -128,29 +135,31 @@ void LLPanelProfile::togglePanel(LLPanel* panel)
else
{
this->setAllChildrenVisible(TRUE);
- if (panel->getParent() == this) removeChild(panel);
- sendChildToBack(mTabContainer);
- mTabContainer->getCurrentPanel()->onOpen(mAvatarId);
+ if (panel->getParent() == this)
+ {
+ removeChild(panel);
+ }
+ sendChildToBack(getTabCtrl());
+ getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId());
}
}
-
void LLPanelProfile::onTabSelected(const LLSD& param)
{
std::string tab_name = param.asString();
- if (NULL != mTabs[tab_name])
+ if (NULL != getTabContainer()[tab_name])
{
- mTabs[tab_name]->onOpen(mAvatarId);
+ getTabContainer()[tab_name]->onOpen(getAvatarId());
}
}
void LLPanelProfile::setAllChildrenVisible(BOOL visible)
{
const child_list_t* child_list = getChildList();
- for (child_list_const_iter_t child_it = child_list->begin(); child_it != child_list->end(); ++child_it)
+ child_list_const_iter_t child_it = child_list->begin();
+ for (; child_it != child_list->end(); ++child_it)
{
LLView* viewp = *child_it;
viewp->setVisible(visible);
}
}
-
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index 2f6d53a859..b55963ec4a 100644
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -39,34 +39,42 @@
class LLTabContainer;
+/**
+* Base class for Profile View and Me Profile.
+*/
class LLPanelProfile : public LLPanel
{
LOG_CLASS(LLPanelProfile);
public:
- virtual BOOL postBuild();
+ /*virtual*/ BOOL postBuild();
- virtual void onOpen(const LLSD& key) {};
+ /*virtual*/ void onOpen(const LLSD& key);
virtual void togglePanel(LLPanel*);
protected:
+
LLPanelProfile();
- ~LLPanelProfile();
- void onTabSelected(const LLSD& param);
+ virtual void onTabSelected(const LLSD& param);
+
+ virtual void setAllChildrenVisible(BOOL visible);
+
+ LLTabContainer* getTabCtrl() { return mTabCtrl; }
- void setAllChildrenVisible(BOOL visible);
+ const LLUUID& getAvatarId() { return mAvatarId; }
+ void setAvatarId(const LLUUID& avatar_id) { mAvatarId = avatar_id; }
- LLTabContainer* mTabContainer;
-
typedef std::map<std::string, LLPanelProfileTab*> profile_tabs_t;
- profile_tabs_t mTabs;
+ profile_tabs_t& getTabContainer() { return mTabContainer; }
+
+private:
+ LLTabContainer* mTabCtrl;
+ profile_tabs_t mTabContainer;
LLUUID mAvatarId;
};
-
-
#endif //LL_LLPANELPROFILE_H
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp
index 00254ee8ee..cd18dc4462 100644
--- a/indra/newview/llpanelprofileview.cpp
+++ b/indra/newview/llpanelprofileview.cpp
@@ -39,14 +39,12 @@
#include "llpanelprofile.h"
static LLRegisterPanelClassWrapper<LLPanelProfileView> t_panel_target_profile("panel_profile_view");
-static LLRegisterPanelClassWrapper<LLPanelAvatarNotes> t_panel_notes("panel_notes");
-static std::string PANEL_PROFILE = "panel_profile";
-static std::string PANEL_PICKS = "panel_picks";
static std::string PANEL_NOTES = "panel_notes";
LLPanelProfileView::LLPanelProfileView()
: LLPanelProfile()
+, mCacheNameCallbackConnected(false)
{
}
@@ -57,32 +55,39 @@ LLPanelProfileView::~LLPanelProfileView(void)
/*virtual*/
void LLPanelProfileView::onOpen(const LLSD& key)
{
- LLUUID id = key["id"];
- if (key.has("open_tab_name"))
- mTabContainer->selectTabByName(key["open_tab_name"]);
-
- if(id.notNull() && mAvatarId != id)
+ LLUUID id;
+ if(key.has("id"))
{
- mAvatarId = id;
-
- mTabs[PANEL_PROFILE]->clear();
- mTabs[PANEL_PICKS]->clear();
- mTabs[PANEL_NOTES]->clear();
+ id = key["id"];
+ }
+ if(id.notNull() && getAvatarId() != id)
+ {
+ setAvatarId(id);
}
- mTabContainer->getCurrentPanel()->onOpen(mAvatarId);
+ LLPanelProfile::onOpen(key);
+
+ // *HACK Profile View is created before gCacheName, as a result we can't call addObserver()
+ // in postBuild() and have to connect callback here.
+ // This will call addObserver() once per LLPanelProfileView instance.
+ if(!mCacheNameCallbackConnected)
+ {
+ gCacheName->addObserver(boost::bind(&LLPanelProfileView::cacheNameCallback, this, _1, _2, _3, _4));
+ mCacheNameCallbackConnected = true;
+ }
+ // getFullName() will return "(Loading...)" for non cached names,
+ // in this case cacheNameCallback() will resolve the name.
std::string full_name;
- gCacheName->getFullName(mAvatarId,full_name);
+ gCacheName->getFullName(getAvatarId(),full_name);
childSetValue("user_name",full_name);
}
-
BOOL LLPanelProfileView::postBuild()
{
LLPanelProfile::postBuild();
- mTabs[PANEL_NOTES] = (getChild<LLPanelAvatarNotes>(PANEL_NOTES));
+ getTabContainer()[PANEL_NOTES] = getChild<LLPanelAvatarNotes>(PANEL_NOTES);
childSetCommitCallback("back",boost::bind(&LLPanelProfileView::onBackBtnClick,this),NULL);
@@ -100,3 +105,11 @@ void LLPanelProfileView::onBackBtnClick()
parent->openPreviousPanel();
}
}
+
+void LLPanelProfileView::cacheNameCallback(const LLUUID& id, const std::string& first_name, const std::string& last_name, BOOL is_group)
+{
+ if(getAvatarId() == id)
+ {
+ childSetValue("user_name", first_name + " " + last_name);
+ }
+}
diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h
index 6c5fc77951..4d5e2997c1 100644
--- a/indra/newview/llpanelprofileview.h
+++ b/indra/newview/llpanelprofileview.h
@@ -35,24 +35,46 @@
#include "llpanel.h"
#include "llpanelprofile.h"
+#include "llavatarpropertiesprocessor.h"
class LLPanelProfile;
class LLPanelProfileTab;
+
+/**
+* Panel for displaying Avatar's profile. It consists of three sub panels - Profile,
+* Picks and Notes.
+*/
class LLPanelProfileView : public LLPanelProfile
{
LOG_CLASS(LLPanelProfileView);
friend class LLUICtrlFactory;
public:
+
LLPanelProfileView();
- ~LLPanelProfileView(void);
+ /*virtual*/ ~LLPanelProfileView();
- void onOpen(const LLSD& key);
+ /*virtual*/ void onOpen(const LLSD& key);
- BOOL postBuild();
+ /*virtual*/ BOOL postBuild();
+
+ // LLCacheName will call this function when avatar name is loaded from server.
+ // This is required to display names that have not been cached yet.
+ void cacheNameCallback(
+ const LLUUID& id,
+ const std::string& first_name,
+ const std::string& last_name,
+ BOOL is_group);
+
+protected:
+
void onBackBtnClick();
+
+private:
+
+ bool mCacheNameCallbackConnected;
};
#endif //LL_LLPANELPROFILEVIEW_H
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index f3d0dc538d..ce9fcd9da2 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -73,10 +73,9 @@ LLPreviewNotecard::LLPreviewNotecard(const LLSD& key) //const LLUUID& item_id,
const LLInventoryItem *item = getItem();
if (item)
{
- mShowKeepDiscard = item->getPermissions().getCreator() != gAgent.getID();
- //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_notecard.xml", FALSE);
mAssetID = item->getAssetUUID();
}
+ //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_notecard.xml", FALSE);
}
LLPreviewNotecard::~LLPreviewNotecard()
@@ -91,18 +90,8 @@ BOOL LLPreviewNotecard::postBuild()
ed->setNotecardInfo(mItemUUID, mObjectID, getKey());
ed->makePristine();
}
- if (mShowKeepDiscard)
- {
- childSetAction("Keep",onKeepBtn,this);
- childSetAction("Discard",onDiscardBtn,this);
- }
- else
- {
- getChild<LLButton>("Keep")->setLabel(getString("Save"));
- childSetAction("Keep",onClickSave,this);
- childSetVisible("Discard", false);
- }
+ childSetAction("Save", onClickSave, this);
childSetVisible("lock", FALSE);
const LLInventoryItem* item = getItem();
@@ -137,18 +126,16 @@ void LLPreviewNotecard::setEnabled( BOOL enabled )
childSetEnabled("Notecard Editor", enabled);
childSetVisible("lock", !enabled);
childSetEnabled("desc", enabled);
- childSetEnabled("Keep", enabled && editor && (!editor->isPristine()));
-
+ childSetEnabled("Save", enabled && editor && (!editor->isPristine()));
}
void LLPreviewNotecard::draw()
{
-
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
- BOOL script_changed = !editor->isPristine();
+ BOOL changed = !editor->isPristine();
- childSetEnabled("Keep", script_changed && getEnabled());
+ childSetEnabled("Save", changed && getEnabled());
LLPreview::draw();
}
@@ -293,7 +280,9 @@ void LLPreviewNotecard::loadAsset()
editor->setText(LLStringUtil::null);
editor->makePristine();
editor->setEnabled(TRUE);
- mAssetStatus = PREVIEW_ASSET_LOADED;
+ // Don't set asset status here; we may not have set the item id yet
+ // (e.g. when this gets called initially)
+ //mAssetStatus = PREVIEW_ASSET_LOADED;
}
}
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index 2a008be1e6..5b8cf1c2f6 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -102,7 +102,6 @@ protected:
LLUUID mAssetID;
LLUUID mObjectID;
- BOOL mShowKeepDiscard;
};
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 5ae79f6c63..10561f5701 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -37,7 +37,10 @@
#include "lltextbox.h"
#include "llscreenchannel.h"
+#include "lltoastpanel.h"
#include "llviewercontrol.h"
+#include "llfloaterreg.h"
+#include "lltrans.h"
#include <algorithm>
@@ -46,9 +49,10 @@ using namespace LLNotificationsUI;
bool LLScreenChannel::mWasStartUpToastShown = false;
//--------------------------------------------------------------------------
-LLScreenChannel::LLScreenChannel(): mUnreadToastsPanel(NULL),
+LLScreenChannel::LLScreenChannel(): mOverflowToastPanel(NULL),
+ mStartUpToastPanel(NULL),
mToastAlignment(NA_BOTTOM),
- mStoreToasts(true),
+ mCanStoreToasts(true),
mHiddenToastsNum(0),
mOverflowToastHidden(false),
mIsHovering(false),
@@ -56,10 +60,8 @@ LLScreenChannel::LLScreenChannel(): mUnreadToastsPanel(NULL),
{
setFollows(FOLLOWS_RIGHT | FOLLOWS_BOTTOM | FOLLOWS_TOP);
- //TODO: load as a resource string
- mOverflowFormatString = "You have %d more notification";
+ mOverflowFormatString = LLTrans::getString("OverflowInfoChannelString");
- mToastList.clear();
setMouseOpaque( false );
}
@@ -85,44 +87,48 @@ void LLScreenChannel::reshape(S32 width, S32 height, BOOL called_from_parent)
}
//--------------------------------------------------------------------------
-LLToast* LLScreenChannel::addToast(LLUUID id, LLPanel* panel, bool is_not_tip)
-{
- ToastElem new_toast_elem(id, panel);
+void LLScreenChannel::addToast(LLToast::Params p)
+{
+ bool isSysWellWndShown = LLFloaterReg::getInstance("syswell_window")->getVisible();
+ // we show toast in the following cases:
+ // - the StartUp Toast is already hidden and the SysWell's window is hidden
+ // - the SysWell's window is shown, but notification is a tip. We can't store it, so we show it
+ // - the channel has a CENTRE allignment, so it is intended for alerts. We always show alerts
+ bool show_toast = (mWasStartUpToastShown && !isSysWellWndShown) || (isSysWellWndShown && p.is_tip) || mToastAlignment == NA_CENTRE;
+ bool store_toast = !show_toast && !p.is_tip && mCanStoreToasts;
+
+ // if we can't show or store a toast, then do nothing, just send ignore to a notification
+ if(!show_toast && !store_toast)
+ {
+ if(p.notification)
+ {
+ p.notification->setIgnored(TRUE);
+ p.notification->respond(p.notification->getResponseTemplate());
+ }
+ return;
+ }
+
+ ToastElem new_toast_elem(p);
mOverflowToastHidden = false;
- mToastList.push_back(new_toast_elem);
getRootView()->addChild(new_toast_elem.toast);
new_toast_elem.toast->setOnFadeCallback(boost::bind(&LLScreenChannel::onToastFade, this, new_toast_elem.toast));
if(mControlHovering)
{
new_toast_elem.toast->setOnToastHoverCallback(boost::bind(&LLScreenChannel::onToastHover, this, _1, _2));
}
-
- // don't show toasts until StartUp toast will fade, but show alerts
- if(!mWasStartUpToastShown && mToastAlignment != NA_CENTRE)
- {
- new_toast_elem.toast->stopTimer();
- // Count and store only non tip notifications
- if(is_not_tip)
- {
- mHiddenToastsNum++;
- storeToast(new_toast_elem);
- }
- else
- {
- // destroy tip toasts at once
- new_toast_elem.toast->close();
- }
- // remove toast from channel
- mToastList.pop_back();
- }
- else
+
+ if(show_toast)
{
+ mToastList.push_back(new_toast_elem);
showToasts();
+ }
+ else // store_toast
+ {
+ mHiddenToastsNum++;
+ storeToast(new_toast_elem);
}
-
- return new_toast_elem.toast;
}
//--------------------------------------------------------------------------
@@ -130,11 +136,12 @@ void LLScreenChannel::onToastFade(LLToast* toast)
{
std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), static_cast<LLPanel*>(toast));
- bool destroy_toast = toast->isViewed() || !mStoreToasts || !toast->getCanBeStored();
+ // *TODO: toast->isViewed() - seems unnecessary
+ bool destroy_toast = toast->isViewed() || !mCanStoreToasts || !toast->getCanBeStored();
if(destroy_toast)
{
mToastList.erase(it);
- toast->mOnToastDestroy(toast, LLSD());
+ toast->mOnToastDestroy(toast);
}
else
{
@@ -149,7 +156,14 @@ void LLScreenChannel::onToastFade(LLToast* toast)
void LLScreenChannel::storeToast(ToastElem& toast_elem)
{
+ // do not store clones
+ std::vector<ToastElem>::iterator it = find(mStoredToastList.begin(), mStoredToastList.end(), toast_elem.id);
+ if( it != mStoredToastList.end() )
+ return;
+
+ toast_elem.toast->stopTimer();
mStoredToastList.push_back(toast_elem);
+ mOnStoreToast(toast_elem.toast->getPanel(), toast_elem.id);
}
//--------------------------------------------------------------------------
@@ -173,16 +187,74 @@ void LLScreenChannel::loadStoredToastsToChannel()
}
//--------------------------------------------------------------------------
+void LLScreenChannel::loadStoredToastByIDToChannel(LLUUID id)
+{
+ std::vector<ToastElem>::iterator it = find(mStoredToastList.begin(), mStoredToastList.end(), id);
+
+ if( it == mStoredToastList.end() )
+ return;
+
+ mOverflowToastHidden = false;
+
+ LLToast* toast = (*it).toast;
+ toast->resetTimer();
+ mToastList.push_back((*it));
+ mStoredToastList.erase(it);
+
+ showToasts();
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::removeStoredToastByID(LLUUID id)
+{
+ // *TODO: may be remove this function
+ std::vector<ToastElem>::iterator it = find(mStoredToastList.begin(), mStoredToastList.end(), id);
+
+ if( it == mStoredToastList.end() )
+ return;
+
+ LLToast* toast = (*it).toast;
+ mStoredToastList.erase(it);
+ toast->discardNotification();
+}
+
+//--------------------------------------------------------------------------
void LLScreenChannel::killToastByNotificationID(LLUUID id)
{
+ // searching among toasts on a screen
std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), id);
if( it != mToastList.end())
{
LLToast* toast = (*it).toast;
- mToastList.erase(it);
- toast->mOnToastDestroy(toast, LLSD());
- showToasts();
+ // if it is a notification toast and notification is UnResponded - then respond on it
+ // else - simply destroy a toast
+ //
+ // NOTE: if a notification is unresponded this function will be called twice for the same toast.
+ // At first, the notification will be discarded, at second (it will be caused by discarding),
+ // the toast will be destroyed.
+ if(toast->getIsNotificationUnResponded())
+ {
+ toast->discardNotification();
+ }
+ else
+ {
+ mToastList.erase(it);
+ toast->mOnToastDestroy(toast);
+ showToasts();
+ }
+ return;
+ }
+
+ // searching among stored toasts
+ it = find(mStoredToastList.begin(), mStoredToastList.end(), id);
+
+ if( it != mStoredToastList.end() )
+ {
+ LLToast* toast = (*it).toast;
+ mStoredToastList.erase(it);
+ toast->discardNotification();
+ toast->mOnToastDestroy(toast);
}
}
@@ -197,7 +269,7 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
LLPanel* old_panel = toast->getPanel();
toast->removeChild(old_panel);
delete old_panel;
- toast->arrange(panel);
+ toast->insertPanel(panel);
toast->resetTimer();
showToasts();
}
@@ -297,15 +369,16 @@ void LLScreenChannel::showToastsTop()
void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer)
{
LLRect toast_rect;
- mUnreadToastsPanel = new LLToast(NULL);
+ LLToast::Params p; // *TODO: fill structure
+ mOverflowToastPanel = new LLToast(p);
- if(!mUnreadToastsPanel)
+ if(!mOverflowToastPanel)
return;
- mUnreadToastsPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onOverflowToastHide, this));
+ mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onOverflowToastHide, this));
- LLTextBox* text_box = mUnreadToastsPanel->getChild<LLTextBox>("toast_text");
- LLIconCtrl* icon = mUnreadToastsPanel->getChild<LLIconCtrl>("icon");
+ LLTextBox* text_box = mOverflowToastPanel->getChild<LLTextBox>("toast_text");
+ LLIconCtrl* icon = mOverflowToastPanel->getChild<LLIconCtrl>("icon");
std::string text = llformat(mOverflowFormatString.c_str(),mHiddenToastsNum);
if(mHiddenToastsNum == 1)
{
@@ -316,41 +389,107 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer)
text += "s.";
}
- toast_rect = mUnreadToastsPanel->getRect();
- mUnreadToastsPanel->reshape(getRect().getWidth(), toast_rect.getHeight(), true);
+ toast_rect = mOverflowToastPanel->getRect();
+ mOverflowToastPanel->reshape(getRect().getWidth(), toast_rect.getHeight(), true);
toast_rect.setLeftTopAndSize(getRect().mLeft, bottom + toast_rect.getHeight()+gSavedSettings.getS32("ToastMargin"), getRect().getWidth(), toast_rect.getHeight());
- mUnreadToastsPanel->setRect(toast_rect);
- mUnreadToastsPanel->setAndStartTimer(timer);
- getRootView()->addChild(mUnreadToastsPanel);
+ mOverflowToastPanel->setRect(toast_rect);
+ mOverflowToastPanel->setAndStartTimer(timer);
+ getRootView()->addChild(mOverflowToastPanel);
text_box->setValue(text);
text_box->setVisible(TRUE);
icon->setVisible(TRUE);
- mUnreadToastsPanel->setVisible(TRUE);
+ mOverflowToastPanel->setVisible(TRUE);
}
//--------------------------------------------------------------------------
void LLScreenChannel::onOverflowToastHide()
{
mOverflowToastHidden = true;
+ // *TODO: check whether it is needed: closeOverflowToastPanel();
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::closeOverflowToastPanel()
+{
+ if(mOverflowToastPanel != NULL)
+ {
+ mOverflowToastPanel->close();
+ mOverflowToastPanel = NULL;
+ }
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::createStartUpToast(S32 notif_num, S32 bottom, F32 timer)
+{
+ LLRect toast_rect;
+ LLToast::Params p; // *TODO: fill structure
+ mStartUpToastPanel = new LLToast(p);
+
+ if(!mStartUpToastPanel)
+ return;
+
+ mStartUpToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onStartUpToastHide, this));
+
+ LLTextBox* text_box = mStartUpToastPanel->getChild<LLTextBox>("toast_text");
+ LLIconCtrl* icon = mStartUpToastPanel->getChild<LLIconCtrl>("icon");
+
+ std::string mStartUpFormatString;
+
+ if(notif_num == 1)
+ {
+ mStartUpFormatString = LLTrans::getString("StartUpNotification");
+ }
+ else
+ {
+ mStartUpFormatString = LLTrans::getString("StartUpNotifications");
+ }
+
+
+ std::string text = llformat(mStartUpFormatString.c_str(), notif_num);
+
+ toast_rect = mStartUpToastPanel->getRect();
+ mStartUpToastPanel->reshape(getRect().getWidth(), toast_rect.getHeight(), true);
+ toast_rect.setLeftTopAndSize(getRect().mLeft, bottom + toast_rect.getHeight()+gSavedSettings.getS32("ToastMargin"), getRect().getWidth(), toast_rect.getHeight());
+ mStartUpToastPanel->setRect(toast_rect);
+ mStartUpToastPanel->setAndStartTimer(timer);
+ getRootView()->addChild(mStartUpToastPanel);
+
+ text_box->setValue(text);
+ text_box->setVisible(TRUE);
+ icon->setVisible(TRUE);
+
+ mStartUpToastPanel->setVisible(TRUE);
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::updateStartUpString(S32 num)
+{
+ // *TODO: update string if notifications are arriving while the StartUp toast is on a screen
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::onStartUpToastHide()
+{
onCommit();
}
//--------------------------------------------------------------------------
-void LLScreenChannel::closeUnreadToastsPanel()
+void LLScreenChannel::closeStartUpToast()
{
- if(mUnreadToastsPanel != NULL)
+ if(mStartUpToastPanel != NULL)
{
- mUnreadToastsPanel->close();
- mUnreadToastsPanel = NULL;
+ LLScreenChannel::setStartUpToastShown();
+ mStartUpToastPanel->close();
+ mStartUpToastPanel = NULL;
}
}
//--------------------------------------------------------------------------
void LLScreenChannel::hideToastsFromScreen()
{
- closeUnreadToastsPanel();
+ closeOverflowToastPanel();
for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end(); it++)
(*it).toast->setVisible(FALSE);
}
@@ -368,6 +507,24 @@ void LLScreenChannel::removeToastsFromChannel()
}
//--------------------------------------------------------------------------
+void LLScreenChannel::removeAndStoreAllVisibleToasts()
+{
+ if(mToastList.size() == 0)
+ return;
+
+ hideToastsFromScreen();
+ for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end(); it++)
+ {
+ mStoredToastList.push_back(*it);
+ mOnStoreToast((*it).toast->getPanel(), (*it).id);
+ (*it).toast->stopTimer();
+ (*it).toast->setVisible(FALSE);
+ }
+
+ mToastList.clear();
+}
+
+//--------------------------------------------------------------------------
void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter)
{
// because of LLViewerWindow::updateUI() that ALWAYS calls onMouseEnter BEFORE onMouseLeave
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index a205b913ab..1ca70c72d0 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -59,45 +59,76 @@ public:
LLScreenChannel();
virtual ~LLScreenChannel();
+ // Channel's outfit-functions
+ // classic reshape
void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
-
- LLToast* addToast(LLUUID id, LLPanel* panel, bool is_not_tip = true);
+ // initialization of channel's shape and position
void init(S32 channel_left, S32 channel_right);
+ // set allignment of toasts inside a channel
+ void setToastAlignment(e_notification_toast_alignment align) {mToastAlignment = align;}
+ // set a template for a string in the OverflowToast
+ void setOverflowFormatString ( std::string str) { mOverflowFormatString = str; }
+ // Operating with toasts
+ // add a toast to a channel
+ void addToast(LLToast::Params p);
+ // kill or modify a toast by its ID
void killToastByNotificationID(LLUUID id);
void modifyToastByNotificationID(LLUUID id, LLPanel* panel);
-
- void setToastAlignment(e_notification_toast_alignment align) {mToastAlignment = align;}
-
- void setControlHovering(bool control) { mControlHovering = control; }
- void setHovering(bool hovering) { mIsHovering = hovering; }
-
- void removeToastsFromChannel();
- void closeUnreadToastsPanel();
+ // hide all toasts from screen, but not remove them from a channel
void hideToastsFromScreen();
-
- void setStoreToasts(bool store) { mStoreToasts = store; }
- void loadStoredToastsToChannel();
-
+ // removes all toasts from a channel
+ void removeToastsFromChannel();
+ // show all toasts in a channel
void showToasts();
-
- S32 getNumberOfHiddenToasts() { return mHiddenToastsNum;}
- void setNumberOfHiddenToasts(S32 num) { mHiddenToastsNum = num;}
-
+ //
+ void loadStoredToastsToChannel();
+ // finds a toast among stored by its ID and throws it on a screen to a channel
+ void loadStoredToastByIDToChannel(LLUUID id);
+ // removes a toast from stored finding it by its ID
+ void removeStoredToastByID(LLUUID id);
+ // remove all toasts from screen and store them
+ void removeAndStoreAllVisibleToasts();
+ // close the Overflow Toast
+ void closeOverflowToastPanel();
+ // close the StartUp Toast
+ void closeStartUpToast();
+
+ // Channel's behavior-functions
+ // set whether a channel will control hovering inside itself or not
+ void setControlHovering(bool control) { mControlHovering = control; }
+ // set Hovering flag for a channel
+ void setHovering(bool hovering) { mIsHovering = hovering; }
+ // set whether a channel will store faded toasts or not
+ void setCanStoreToasts(bool store) { mCanStoreToasts = store; }
+ // tell all channels that the StartUp toast was shown and allow them showing of toasts
static void setStartUpToastShown() { mWasStartUpToastShown = true; }
-
+ //
+ static bool getStartUpToastShown() { return mWasStartUpToastShown; }
+
+ // Channel's other interface functions functions
+ // get number of hidden notifications from a channel
+ S32 getNumberOfHiddenToasts() { return mHiddenToastsNum;}
+ // update number of notifications in the StartUp Toast
+ void updateStartUpString(S32 num);
e_notification_toast_alignment getToastAlignment() {return mToastAlignment;}
- void setOverflowFormatString ( std::string str) { mOverflowFormatString = str; }
+ // Channel's callbacks
+ // callback for storing of faded toasts
+ typedef boost::function<void (LLPanel* info_panel, const LLUUID id)> store_tost_callback_t;
+ typedef boost::signals2::signal<void (LLPanel* info_panel, const LLUUID id)> store_tost_signal_t;
+ store_tost_signal_t mOnStoreToast;
+ boost::signals2::connection setOnStoreToastCallback(store_tost_callback_t cb) { return mOnStoreToast.connect(cb); }
private:
struct ToastElem
{
LLUUID id;
LLToast* toast;
- ToastElem(LLUUID lluuid, LLPanel* panel) : id(lluuid)
+
+ ToastElem(LLToast::Params p) : id(p.id)
{
- toast = new LLToast(panel);
+ toast = new LLToast(p);
}
ToastElem(const ToastElem& toast_elem)
@@ -117,31 +148,46 @@ private:
}
};
+ // Channel's handlers
void onToastHover(LLToast* toast, bool mouse_enter);
-
void onToastFade(LLToast* toast);
+ void onOverflowToastHide();
+ void onStartUpToastHide();
+
+ //
void storeToast(ToastElem& toast_elem);
+ // show-functions depending on allignment of toasts
void showToastsBottom();
void showToastsCentre();
void showToastsTop();
+ // create the Overflow Toast
void createOverflowToast(S32 bottom, F32 timer);
- void onOverflowToastHide();
+ // create the StartUp Toast
+ void createStartUpToast(S32 notif_num, S32 bottom, F32 timer);
+
+ // Channel's flags
static bool mWasStartUpToastShown;
bool mControlHovering;
bool mIsHovering;
- bool mStoreToasts;
+ bool mCanStoreToasts;
bool mOverflowToastHidden;
- S32 mHiddenToastsNum;
- LLToast* mUnreadToastsPanel;
- std::vector<ToastElem> mToastList;
- std::vector<ToastElem> mStoredToastList;
+ //
e_notification_toast_alignment mToastAlignment;
- std::map<LLToast*, bool> mToastEventStack;
+ // attributes for the Overflow Toast
+ S32 mHiddenToastsNum;
+ LLToast* mOverflowToastPanel;
std::string mOverflowFormatString;
+
+ // attributes for the StartUp Toast
+ LLToast* mStartUpToastPanel;
+
+ std::vector<ToastElem> mToastList;
+ std::vector<ToastElem> mStoredToastList;
+ std::map<LLToast*, bool> mToastEventStack;
};
}
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 5f0fbe6ee5..438b1b558f 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -281,7 +281,7 @@ bool LLSideTray::addTab ( const std::string& tab_name
LLSideTrayTab* LLSideTray::getTab(const std::string& name)
{
- return getChild<LLSideTrayTab>(name,false,false);
+ return getChild<LLSideTrayTab>(name,false);
}
@@ -311,7 +311,7 @@ bool LLSideTray::selectTabByName (const std::string& name)
{
LLSideTrayTab* side_bar = getTab(name);
- if(side_bar == NULL || side_bar == mActiveTab)
+ if(side_bar == mActiveTab)
return false;
//deselect old tab
toggleTabButton(mActiveTab);
@@ -508,6 +508,8 @@ void LLSideTray::expandSideBar ()
{
mCollapsed = false;
mCollapseButton->setLabel(EXPANDED_NAME);
+ LLSD key;//empty
+ mActiveTab->onOpen(key);
mActiveTab->setVisible(TRUE);
reflectCollapseChange();
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 1f8b6b402f..b691a42db1 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -89,10 +89,13 @@ private:
LLView* mMainPanel;
};
-
-class LLSideTray : public LLPanel
+// added inheritance from LLDestroyClass<LLSideTray> to enable Side Tray perform necessary actions
+// while disconnecting viewer in LLAppViewer::disconnectViewer().
+// LLDestroyClassList::instance().fireCallbacks() calls destroyClass method. See EXT-245.
+class LLSideTray : public LLPanel, private LLDestroyClass<LLSideTray>
{
friend class LLUICtrlFactory;
+ friend class LLDestroyClass<LLSideTray>;
public:
LOG_CLASS(LLSideTray);
@@ -216,6 +219,15 @@ protected:
void setPanelRect ();
+
+private:
+ // Implementation of LLDestroyClass<LLSideTray>
+ static void destroyClass()
+ {
+ // Disable SideTray to avoid crashes. EXT-245
+ if (LLSideTray::instanceCreated())
+ LLSideTray::getInstance()->setEnabled(FALSE);
+ }
private:
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp
index bd93f5dd28..ffadeeddf2 100644
--- a/indra/newview/llslurl.cpp
+++ b/indra/newview/llslurl.cpp
@@ -106,6 +106,13 @@ std::string LLSLURL::buildSLURL(const std::string& regionname, S32 x, S32 y, S32
}
// static
+std::string LLSLURL::buildUnescapedSLURL(const std::string& regionname, S32 x, S32 y, S32 z)
+{
+ std::string unescapedslurl = PREFIX_SLURL + regionname + llformat("/%d/%d/%d",x,y,z);
+ return unescapedslurl;
+}
+
+// static
bool LLSLURL::matchPrefix(const std::string& url, const std::string& prefix)
{
std::string test_prefix = url.substr(0, prefix.length());
diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h
index 05788623d9..5c9fea3e96 100644
--- a/indra/newview/llslurl.h
+++ b/indra/newview/llslurl.h
@@ -69,11 +69,16 @@ public:
static bool isSLURLHelp(const std::string& url);
/**
- * builds: http://slurl.com/secondlife/RegionName/x/y/z/
+ * builds: http://slurl.com/secondlife/Region%20Name/x/y/z/ escaping result url.
*/
static std::string buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z);
/**
+ * builds: http://slurl.com/secondlife/Region Name/x/y/z/ without escaping result url.
+ */
+ static std::string buildUnescapedSLURL(const std::string& regionname, S32 x, S32 y, S32 z);
+
+ /**
* Strip protocol part from the URL.
*/
static std::string stripProtocol(const std::string& url);
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index bc90fe7adc..569e7b3397 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -48,6 +48,7 @@
#include "llfloaterscriptdebug.h"
#include "llhudicon.h"
#include "llfloaterinventory.h"
+#include "llnavigationbar.h"
#include "llkeyboard.h"
#include "lllineeditor.h"
#include "llmenugl.h"
@@ -244,6 +245,30 @@ void LLStatusBar::draw()
LLPanel::draw();
}
+BOOL LLStatusBar::handleRightMouseUp(S32 x, S32 y, MASK mask)
+{
+ if (mHideNavbarContextMenu)
+ {
+ mHideNavbarContextMenu->buildDrawLabels();
+ mHideNavbarContextMenu->updateParent(LLMenuGL::sMenuContainer);
+ LLMenuGL::showPopup(this, mHideNavbarContextMenu, x, y);
+ }
+
+ return TRUE;
+}
+
+BOOL LLStatusBar::postBuild()
+{
+ mCommitCallbackRegistrar.add("HideNavbarMenu.Action", boost::bind(&LLStatusBar::onHideNavbarContextMenuItemClicked, this, _2));
+ mEnableCallbackRegistrar.add("HideNavbarMenu.EnableMenuItem", boost::bind(&LLStatusBar::onHideNavbarContextMenuItemEnabled, this, _2));
+
+ mHideNavbarContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_hide_navbar.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ gMenuHolder->addChild(mHideNavbarContextMenu);
+
+ gMenuBarView->setRightClickedCallback(boost::bind(&LLStatusBar::onMainMenuRightClicked, this, _1, _2, _3, _4));
+
+ return TRUE;
+}
// Per-frame updates of visibility
void LLStatusBar::refresh()
@@ -479,9 +504,11 @@ void LLStatusBar::creditBalance(S32 credit)
void LLStatusBar::setBalance(S32 balance)
{
std::string money_str = LLResMgr::getInstance()->getMonetaryString( balance );
- std::string balance_str = "L$";
- balance_str += money_str;
- mBtnBuyCurrency->setLabel( balance_str );
+
+ LLStringUtil::format_map_t string_args;
+ string_args["[AMT]"] = llformat("%s", money_str.c_str());
+ std::string labe_str = getString("buycurrencylabel", string_args);
+ mBtnBuyCurrency->setLabel(labe_str);
// Resize the balance button so that the label fits it, and the button expands to the left.
// *TODO: LLButton should have an option where to expand.
@@ -714,6 +741,48 @@ void LLStatusBar::setupDate()
}
}
+bool LLStatusBar::onHideNavbarContextMenuItemEnabled(const LLSD& userdata)
+{
+ std::string item = userdata.asString();
+
+ if (item == "show_navbar_navigation_panel")
+ {
+ return gSavedSettings.getBOOL("ShowNavbarNavigationPanel");
+ }
+ else if (item == "show_navbar_favorites_panel")
+ {
+ return gSavedSettings.getBOOL("ShowNavbarFavoritesPanel");
+ }
+
+ return FALSE;
+}
+
+void LLStatusBar::onHideNavbarContextMenuItemClicked(const LLSD& userdata)
+{
+ std::string item = userdata.asString();
+
+ if (item == "show_navbar_navigation_panel")
+ {
+ BOOL state = !gSavedSettings.getBOOL("ShowNavbarNavigationPanel");
+
+ LLNavigationBar::getInstance()->showNavigationPanel(state);
+ gSavedSettings.setBOOL("ShowNavbarNavigationPanel", state);
+ }
+ else if (item == "show_navbar_favorites_panel")
+ {
+ BOOL state = !gSavedSettings.getBOOL("ShowNavbarFavoritesPanel");
+
+ LLNavigationBar::getInstance()->showFavoritesPanel(state);
+ gSavedSettings.setBOOL("ShowNavbarFavoritesPanel", state);
+ }
+}
+
+
+void LLStatusBar::onMainMenuRightClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask)
+{
+ handleRightMouseUp(x, y, mask);
+}
+
// static
void LLStatusBar::onCommitSearch(LLUICtrl*, void* data)
{
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index 84dd761930..0cb3551768 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -34,6 +34,7 @@
#define LL_LLSTATUSBAR_H
#include "llpanel.h"
+#include <llmenugl.h>
// "Constants" loaded from settings.xml at start time
extern S32 STATUS_BAR_HEIGHT;
@@ -57,6 +58,9 @@ public:
/*virtual*/ void draw();
+ /*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ BOOL postBuild();
+
// MANIPULATORS
void setBalance(S32 balance);
void debitBalance(S32 debit);
@@ -87,6 +91,10 @@ private:
// simple method to setup the part that holds the date
void setupDate();
+ bool onHideNavbarContextMenuItemEnabled(const LLSD& userdata);
+ void onHideNavbarContextMenuItemClicked(const LLSD& userdata);
+
+ void onMainMenuRightClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask);
static void onCommitSearch(LLUICtrl*, void* data);
static void onClickSearch(void* data);
static void onClickStatGraph(void* data);
@@ -106,6 +114,7 @@ private:
S32 mSquareMetersCommitted;
LLFrameTimer* mBalanceTimer;
LLFrameTimer* mHealthTimer;
+ LLMenuGL* mHideNavbarContextMenu;
static std::vector<std::string> sDays;
static std::vector<std::string> sMonths;
diff --git a/indra/newview/llsyswellitem.cpp b/indra/newview/llsyswellitem.cpp
new file mode 100644
index 0000000000..5ed8a8b604
--- /dev/null
+++ b/indra/newview/llsyswellitem.cpp
@@ -0,0 +1,105 @@
+/**
+ * @file llsyswellitem.cpp
+ * @brief // TODO
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+
+#include "llviewerprecompiledheaders.h" // must be first include
+
+#include "llsyswellitem.h"
+
+#include "llwindow.h"
+#include "v4color.h"
+
+//---------------------------------------------------------------------------------
+LLSysWellItem::LLSysWellItem(const Params& p) : LLScrollingPanel(p),
+ mTitle(NULL),
+ mCloseBtn(NULL),
+ mIcon(NULL)
+{
+ LLUICtrlFactory::getInstance()->buildPanel(this, "panel_sys_well_item.xml");
+
+ mTitle = getChild<LLTextBox>("title");
+ mCloseBtn = getChild<LLButton>("close_btn");
+ mIcon = getChild<LLIconCtrl>("icon");
+
+ mTitle->setValue(p.title);
+ mCloseBtn->setClickedCallback(boost::bind(&LLSysWellItem::onClickCloseBtn,this));
+
+ mID = p.notification_id;
+}
+
+//---------------------------------------------------------------------------------
+LLSysWellItem::~LLSysWellItem()
+{
+}
+
+//---------------------------------------------------------------------------------
+void LLSysWellItem::setTitle( std::string title )
+{
+ mTitle->setValue(title);
+}
+
+//---------------------------------------------------------------------------------
+void LLSysWellItem::onClickCloseBtn()
+{
+ mOnItemClose(this);
+}
+
+//---------------------------------------------------------------------------------
+void LLSysWellItem::updatePanel(BOOL allow_modify)
+{
+ //nothing to do here
+}
+
+//---------------------------------------------------------------------------------
+BOOL LLSysWellItem::handleMouseDown(S32 x, S32 y, MASK mask)
+{
+ if(!mCloseBtn->getRect().pointInRect(x, y))
+ mOnItemClick(this);
+
+ return LLPanel::handleMouseDown(x, y, mask);
+}
+
+//---------------------------------------------------------------------------------
+void LLSysWellItem::onMouseEnter(S32 x, S32 y, MASK mask)
+{
+ setTransparentColor(LLColor4(0.3f, 0.3f, 0.3f, 1.0f));
+}
+
+//---------------------------------------------------------------------------------
+void LLSysWellItem::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+ setTransparentColor(LLColor4(0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+//---------------------------------------------------------------------------------
+
+
diff --git a/indra/newview/llsyswellitem.h b/indra/newview/llsyswellitem.h
new file mode 100644
index 0000000000..b0761f2790
--- /dev/null
+++ b/indra/newview/llsyswellitem.h
@@ -0,0 +1,90 @@
+/**
+ * @file llsyswellitem.h
+ * @brief // TODO
+ *
+ * $LicenseInfo:firstyear=2003&license=viewergpl$
+ *
+ * Copyright (c) 2003-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLSYSWELLITEM_H
+#define LL_LLSYSWELLITEM_H
+
+#include "llscrollingpanellist.h"
+#include "lltextbox.h"
+#include "llbutton.h"
+#include "lliconctrl.h"
+
+#include <string>
+
+class LLSysWellItem : public LLScrollingPanel
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLPanel::Params>
+ {
+ LLUUID notification_id;
+ std::string title;
+ Params() {};
+ };
+
+
+ LLSysWellItem(const Params& p);
+ virtual ~LLSysWellItem();
+
+ void updatePanel(BOOL allow_modify);
+
+ // title
+ void setTitle( std::string title );
+
+ // get item's ID
+ LLUUID getID() { return mID; }
+
+ // handlers
+ virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual void onMouseEnter(S32 x, S32 y, MASK mask);
+ virtual void onMouseLeave(S32 x, S32 y, MASK mask);
+
+ //callbacks
+ typedef boost::function<void (LLSysWellItem* item)> syswell_item_callback_t;
+ typedef boost::signals2::signal<void (LLSysWellItem* item)> syswell_item_signal_t;
+ syswell_item_signal_t mOnItemClose;
+ syswell_item_signal_t mOnItemClick;
+ boost::signals2::connection setOnItemCloseCallback(syswell_item_callback_t cb) { return mOnItemClose.connect(cb); }
+ boost::signals2::connection setOnItemClickCallback(syswell_item_callback_t cb) { return mOnItemClick.connect(cb); }
+
+private:
+
+ void onClickCloseBtn();
+
+ LLTextBox* mTitle;
+ LLButton* mCloseBtn;
+ LLIconCtrl* mIcon;
+ LLUUID mID;
+};
+
+#endif // LL_LLSYSWELLITEM_H
+
+
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
new file mode 100644
index 0000000000..c8eea5e7b4
--- /dev/null
+++ b/indra/newview/llsyswellwindow.cpp
@@ -0,0 +1,210 @@
+/**
+ * @file llsyswellwindow.cpp
+ * @brief // TODO
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+
+#include "llviewerprecompiledheaders.h" // must be first include
+
+#include "llsyswellwindow.h"
+
+#include "llbottomtray.h"
+#include "llviewercontrol.h"
+
+
+//---------------------------------------------------------------------------------
+LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLFloater(LLSD()),
+ mChannel(NULL),
+ mScrollContainer(NULL),
+ mNotificationList(NULL)
+{
+ // Ho to use:
+ // LLFloaterReg::showInstance("syswell_window");
+ LLUICtrlFactory::getInstance()->buildFloater(this, "floater_sys_well.xml", NULL);
+}
+
+//---------------------------------------------------------------------------------
+BOOL LLSysWellWindow::postBuild()
+{
+ mCloseBtn = getChild<LLButton>("close_btn");
+ mScrollContainer = getChild<LLScrollContainer>("notification_list_container");
+ mNotificationList = getChild<LLScrollingPanelList>("notification_list");
+
+ mCloseBtn->setClickedCallback(boost::bind(&LLSysWellWindow::onClickCloseBtn,this));
+
+ return TRUE;
+}
+
+//---------------------------------------------------------------------------------
+LLSysWellWindow::~LLSysWellWindow()
+{
+}
+
+//---------------------------------------------------------------------------------
+void LLSysWellWindow::addItem(LLSysWellItem::Params p)
+{
+ // do not add clones
+ if( findItemByID(p.notification_id) >= 0 )
+ return;
+
+ LLSysWellItem* new_item = new LLSysWellItem(p);
+ mNotificationList->addPanel(dynamic_cast<LLScrollingPanel*>(new_item));
+ reshapeWindow();
+ adjustWindowPosition();
+
+ new_item->setOnItemCloseCallback(boost::bind(&LLSysWellWindow::onItemClose, this, _1));
+ new_item->setOnItemClickCallback(boost::bind(&LLSysWellWindow::onItemClick, this, _1));
+}
+
+//---------------------------------------------------------------------------------
+void LLSysWellWindow::clear()
+{
+ // *TODO: fill later
+}
+
+//---------------------------------------------------------------------------------
+S32 LLSysWellWindow::findItemByID(const LLUUID& id)
+{
+ const LLScrollingPanelList::panel_list_t list = mNotificationList->getPanelList();
+ if(list.size() == 0)
+ return -1;
+
+ LLScrollingPanelList::panel_list_t::const_iterator it = list.begin();
+ S32 index = 0;
+ while(it != list.end())
+ {
+ if( dynamic_cast<LLSysWellItem*>(*it)->getID() == id )
+ break;
+ ++it;
+ ++index;
+ }
+
+ if(it == list.end())
+ return -1;
+ else
+ return index;
+
+}
+
+//---------------------------------------------------------------------------------
+void LLSysWellWindow::removeItemByID(const LLUUID& id)
+{
+ S32 index = findItemByID(id);
+
+ if(index >= 0)
+ mNotificationList->removePanel(index);
+ else
+ return;
+
+ reshapeWindow();
+ adjustWindowPosition();
+ // hide chiclet window if there are no items left
+ S32 items_left = mNotificationList->getPanelList().size();
+ if(items_left == 0)
+ setVisible(FALSE);
+}
+
+//---------------------------------------------------------------------------------
+void LLSysWellWindow::onItemClick(LLSysWellItem* item)
+{
+ LLUUID id = item->getID();
+ mChannel->loadStoredToastByIDToChannel(id);
+}
+
+//---------------------------------------------------------------------------------
+void LLSysWellWindow::onItemClose(LLSysWellItem* item)
+{
+ LLUUID id = item->getID();
+ removeItemByID(id);
+ mChannel->killToastByNotificationID(id);
+}
+
+//---------------------------------------------------------------------------------
+void LLSysWellWindow::onClickCloseBtn()
+{
+ setVisible(false);
+}
+
+//---------------------------------------------------------------------------------
+void LLSysWellWindow::setVisible(BOOL visible)
+{
+ // on Show adjust position of SysWell chiclet's window
+ if(visible)
+ {
+ mChannel->removeAndStoreAllVisibleToasts();
+ adjustWindowPosition();
+ }
+
+ LLFloater::setVisible(visible);
+}
+
+//---------------------------------------------------------------------------------
+void LLSysWellWindow::adjustWindowPosition()
+{
+ const S32 WINDOW_MARGIN = 5;
+
+ LLRect btm_rect = LLBottomTray::getInstance()->getRect();
+ LLRect this_rect = getRect();
+ setOrigin(btm_rect.mRight - this_rect.getWidth() - WINDOW_MARGIN, WINDOW_MARGIN);
+}
+//---------------------------------------------------------------------------------
+void LLSysWellWindow::reshapeWindow()
+{
+ // Get scrollbar size
+ const LLUICachedControl<S32> SCROLLBAR_SIZE("UIScrollbarSize", 0);
+
+ // Get item list
+ const LLScrollingPanelList::panel_list_t list = mNotificationList->getPanelList();
+
+ // window's size constants
+ const S32 WINDOW_HEADER_HEIGHT = 30;
+ const S32 MAX_WINDOW_HEIGHT = 200;
+ const S32 MIN_WINDOW_WIDTH = 320;
+
+ // Get height and border's width for a scrolling panel list
+ S32 list_height = mNotificationList->getRect().getHeight();
+ S32 list_border_width = mScrollContainer->getBorderWidth() * 2;
+
+ // Check that the floater doesn't exceed its parent view limits after reshape
+ S32 new_height = list_height + WINDOW_HEADER_HEIGHT + list_border_width;
+
+ if(new_height > MAX_WINDOW_HEIGHT)
+ {
+ reshape(MIN_WINDOW_WIDTH + SCROLLBAR_SIZE, MAX_WINDOW_HEIGHT, FALSE);
+ }
+ else
+ {
+ reshape(MIN_WINDOW_WIDTH, new_height, FALSE);
+ }
+}
+
+//---------------------------------------------------------------------------------
+
+
+
diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h
new file mode 100644
index 0000000000..9554f3cb82
--- /dev/null
+++ b/indra/newview/llsyswellwindow.h
@@ -0,0 +1,89 @@
+/**
+ * @file llsyswellwindow.h
+ * @brief // TODO
+ *
+ * $LicenseInfo:firstyear=2003&license=viewergpl$
+ *
+ * Copyright (c) 2003-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLSYSWELLWINDOW_H
+#define LL_LLSYSWELLWINDOW_H
+
+#include "llsyswellitem.h"
+
+#include "llfloater.h"
+#include "llbutton.h"
+#include "llscreenchannel.h"
+#include "llscrollcontainer.h"
+
+#include "boost/shared_ptr.hpp"
+
+
+
+class LLSysWellWindow : public LLFloater
+{
+ friend class LLFloaterReg;
+
+public:
+ LLSysWellWindow(const LLSD& key);
+ ~LLSysWellWindow();
+ BOOL postBuild();
+
+ // change attributes
+ void setChannel(LLNotificationsUI::LLScreenChannel* channel) {mChannel = channel;}
+
+ // Operating with items
+ void addItem(LLSysWellItem::Params p);
+ void clear( void );
+ void removeItemByID(const LLUUID& id);
+ S32 findItemByID(const LLUUID& id);
+
+ // Operating with outfit
+ virtual void setVisible(BOOL visible);
+ void adjustWindowPosition();
+
+ // Handlers
+ void onItemClick(LLSysWellItem* item);
+ void onItemClose(LLSysWellItem* item);
+
+private:
+
+ void onClickCloseBtn();
+ void reshapeWindow();
+
+ // pointer to a corresponding channel's instance
+ LLNotificationsUI::LLScreenChannel* mChannel;
+
+ LLButton* mCloseBtn;
+ LLScrollContainer* mScrollContainer;
+ LLScrollingPanelList* mNotificationList;
+};
+
+#endif // LL_LLSYSWELLWINDOW_H
+
+
+
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 8a7c7708b9..a67ef85f87 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -41,36 +41,61 @@
using namespace LLNotificationsUI;
//--------------------------------------------------------------------------
-LLToast::LLToast(LLPanel* panel) :
- LLFloater(LLSD()),
- mTimerValue(5),
- mIsViewed(false),
- mPanel(panel),
- mCanFade(true),
- mHideBtn(NULL),
- mIsModal(false),
- mCanBeStored(true),
- mHideBtnPressed(false)
+LLToast::LLToast(LLToast::Params p) : LLFloater(LLSD()),
+ mPanel(p.panel),
+ mTimerValue(p.timer_period),
+ mID(p.id),
+ mCanFade(p.can_fade),
+ mCanBeStored(p.can_be_stored),
+ mHideBtnEnabled(p.enable_hide_btn),
+ mIsModal(p.is_modal),
+ mIsTipNotification(p.is_tip),
+ mHideBtn(NULL),
+ mNotification(p.notification),
+ mIsViewed(false),
+ mHideBtnPressed(false)
{
- LLUICtrlFactory::getInstance()->buildPanel(this, "panel_toast.xml");
+ LLUICtrlFactory::getInstance()->buildFloater(this, "panel_toast.xml", NULL);
- mHideBtn = getChild<LLButton>("hide_btn");
- if(mHideBtn)
+ if(mPanel)
+ {
+ insertPanel(mPanel);
+ }
+
+ if(mHideBtnEnabled)
{
+ mHideBtn = getChild<LLButton>("hide_btn");
mHideBtn->setClickedCallback(boost::bind(&LLToast::hide,this));
}
- if(mPanel)
+
+ if(mIsModal)
{
- arrange(mPanel);
+ gFocusMgr.setMouseCapture( this );
+ gFocusMgr.setTopCtrl( this );
+ setFocus(TRUE);
}
- // disable unnecessary Floater's functionality
- setTitleVisible(FALSE);
- setCanMinimize(FALSE);
- setCanClose(FALSE);
- setCanTearOff(FALSE);
- setCanResize(FALSE);
- setCanDrag(FALSE);
+
+ if(!p.on_toast_destroy.empty())
+ mOnToastDestroy.connect(p.on_toast_destroy);
+
+ if(!p.on_mouse_enter.empty())
+ mOnMousEnter.connect(p.on_mouse_enter);
+}
+
+//--------------------------------------------------------------------------
+BOOL LLToast::postBuild()
+{
+ if(mCanFade)
+ {
+ mTimer.start();
+ }
+ else
+ {
+ mTimer.stop();
+ }
+
+ return TRUE;
}
//--------------------------------------------------------------------------
@@ -124,7 +149,7 @@ void LLToast::hide()
setVisible(FALSE);
mIsViewed = false;
mTimer.stop();
- mOnFade(this, LLSD());
+ mOnFade(this);
}
//--------------------------------------------------------------------------
@@ -142,12 +167,12 @@ void LLToast::tick()
{
setVisible(FALSE);
mTimer.stop();
- mOnFade(this, LLSD());
+ mOnFade(this);
}
}
//--------------------------------------------------------------------------
-void LLToast::arrange(LLPanel* panel)
+void LLToast::insertPanel(LLPanel* panel)
{
LLRect panel_rect, toast_rect;
@@ -213,13 +238,12 @@ void LLToast::onMouseEnter(S32 x, S32 y, MASK mask)
sendChildToFront(mHideBtn);
if(mHideBtn && mHideBtn->getEnabled())
mHideBtn->setVisible(TRUE);
- mOnMousEnter(this, LLSD());
+ mOnMousEnter(this);
}
//--------------------------------------------------------------------------
void LLToast::onMouseLeave(S32 x, S32 y, MASK mask)
{
- llinfos << "MOUSE LEAVE: x = " << x << "y = " << y << llendl;
mOnToastHover(this, MOUSE_LEAVE);
if(mCanFade && !mIsViewed)
@@ -249,5 +273,26 @@ BOOL LLToast::handleMouseDown(S32 x, S32 y, MASK mask)
return LLFloater::handleMouseDown(x, y, mask);
}
+//--------------------------------------------------------------------------
+void LLToast::discardNotification()
+{
+ if(mNotification)
+ {
+ mNotification->setIgnored(TRUE);
+ mNotification->respond(mNotification->getResponseTemplate());
+ }
+}
+
+//--------------------------------------------------------------------------
+bool LLToast::getIsNotificationUnResponded()
+{
+ if(mNotification)
+ {
+ return !mNotification->isRespondedTo();
+ }
+ return false;
+}
+
+//--------------------------------------------------------------------------
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index f998754585..a4dee1e386 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -37,7 +37,9 @@
#include "llpanel.h"
#include "llfloater.h"
#include "lltimer.h"
-#include "lldate.h"
+#include "llnotifications.h"
+
+#include "llviewercontrol.h"
#define MOUSE_LEAVE false
#define MOUSE_ENTER true
@@ -52,53 +54,108 @@ namespace LLNotificationsUI
class LLToast : public LLFloater
{
public:
- LLToast(LLPanel* panel);
+ typedef boost::function<void (LLToast* toast)> toast_callback_t;
+ typedef boost::signals2::signal<void (LLToast* toast)> toast_signal_t;
+
+ struct Params : public LLInitParam::Block<Params, LLFloater::Params>
+ {
+ LLPanel* panel;
+ LLUUID id; //notification or message ID
+ LLNotificationPtr notification;
+ F32 timer_period;
+ toast_callback_t on_toast_destroy;
+ toast_callback_t on_mouse_enter;
+ bool can_fade;
+ bool can_be_stored;
+ bool enable_hide_btn;
+ bool is_modal;
+ bool is_tip;
+
+ Params() : can_fade(true),
+ can_be_stored(true),
+ is_modal(false),
+ is_tip(false),
+ enable_hide_btn(true),
+ panel(NULL),
+ timer_period(gSavedSettings.getS32("NotificationToastTime"))
+
+ {};
+ };
+
+ LLToast(LLToast::Params p);
virtual ~LLToast();
+ BOOL postBuild();
+ // Toast handlers
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- //
- bool isViewed() { return mIsViewed; }
-
- void setCanFade(bool can_fade);
+ virtual void onMouseEnter(S32 x, S32 y, MASK mask);
+ virtual void onMouseLeave(S32 x, S32 y, MASK mask);
+ // Operating with toasts
+ // insert a panel to a toast
+ void insertPanel(LLPanel* panel);
+ // get toast's panel
+ LLPanel* getPanel() { return mPanel; }
+ // discard notification
+ void discardNotification();
+ // enable/disable Toast's Hide button
void setHideButtonEnabled(bool enabled);
-
- void setCanBeStored(bool can_be_stored) { mCanBeStored = can_be_stored; }
- bool getCanBeStored() { return mCanBeStored; }
- //
+ // initialize and start Toast's timer
void setAndStartTimer(F32 period);
- //
+ //
void resetTimer() { mTimer.start(); }
+ //
void stopTimer() { mTimer.stop(); }
+ //
void close() { die(); }
+ //
virtual void draw();
+ //
virtual void setVisible(BOOL show);
- virtual void onMouseEnter(S32 x, S32 y, MASK mask);
- virtual void onMouseLeave(S32 x, S32 y, MASK mask);
+ //
virtual void hide();
- LLPanel* getPanel() { return mPanel; }
- void arrange(LLPanel* panel);
+
+
+
+ // get/set Toast's flags or states
+ // get information whether the notification corresponding to the toast is responded or not
+ bool getIsNotificationUnResponded();
+ //
+ bool isViewed() { return mIsViewed; }
+ //
+ void setCanFade(bool can_fade);
+ //
+ void setCanBeStored(bool can_be_stored) { mCanBeStored = can_be_stored; }
+ //
+ bool getCanBeStored() { return mCanBeStored; }
+ //
void setModal(bool modal);
// Registers callbacks for events
- boost::signals2::connection setOnFadeCallback(commit_callback_t cb) { return mOnFade.connect(cb); }
- boost::signals2::connection setOnMouseEnterCallback(commit_callback_t cb) { return mOnMousEnter.connect(cb); }
- boost::signals2::connection setOnToastDestroyCallback(commit_callback_t cb) { return mOnToastDestroy.connect(cb); }
+ toast_signal_t mOnFade;
+ toast_signal_t mOnMousEnter;
+ toast_signal_t mOnToastDestroy;
+ boost::signals2::connection setOnFadeCallback(toast_callback_t cb) { return mOnFade.connect(cb); }
+ boost::signals2::connection setOnMouseEnterCallback(toast_callback_t cb) { return mOnMousEnter.connect(cb); }
+ boost::signals2::connection setOnToastDestroyCallback(toast_callback_t cb) { return mOnToastDestroy.connect(cb); }
+
typedef boost::function<void (LLToast* toast, bool mouse_enter)> toast_hover_check_callback_t;
typedef boost::signals2::signal<void (LLToast* toast, bool mouse_enter)> toast_hover_check_signal_t;
toast_hover_check_signal_t mOnToastHover;
boost::signals2::connection setOnToastHoverCallback(toast_hover_check_callback_t cb) { return mOnToastHover.connect(cb); }
- commit_signal_t mOnFade;
- commit_signal_t mOnMousEnter;
- commit_signal_t mOnToastDestroy;
private:
+ // check timer
bool timerHasExpired();
+ // on timer finished function
void tick();
+ LLUUID mID;
+ LLNotificationPtr mNotification;
+
LLTimer mTimer;
F32 mTimerValue;
@@ -107,9 +164,11 @@ private:
LLColor4 mBgColor;
bool mIsViewed;
+ bool mIsTipNotification;
bool mCanFade;
bool mIsModal;
bool mCanBeStored;
+ bool mHideBtnEnabled;
bool mHideBtnPressed;
};
diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp
index f5ed7f8710..8a61f6cfda 100644
--- a/indra/newview/lltoastgroupnotifypanel.cpp
+++ b/indra/newview/lltoastgroupnotifypanel.cpp
@@ -44,7 +44,6 @@
#include "lluiconstants.h"
#include "llui.h"
#include "llviewercontrol.h"
-#include "llfloatergroupinfo.h"
#include "lltrans.h"
#include "llinitparam.h"
@@ -76,14 +75,14 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification
const std::string& from_name = payload["sender_name"].asString();
std::stringstream from;
from << from_name << "/" << groupData.mName;
- LLTextBox* pTitleText = this->getChild<LLTextBox>("title", TRUE, FALSE);
+ LLTextBox* pTitleText = this->getChild<LLTextBox>("title");
pTitleText->setValue(from.str());
//message body
const std::string& subject = payload["subject"].asString();
const std::string& message = payload["message"].asString();
- LLTextEditor* pMessageText = getChild< LLTextEditor>("message", TRUE, FALSE);
+ LLTextEditor* pMessageText = getChild< LLTextEditor>("message");
pMessageText->setValue("");
pMessageText->setEnabled(FALSE);
pMessageText->setTakesFocus(FALSE);
@@ -113,7 +112,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification
//attachment
BOOL hasInventory = payload["inventory_offer"].isDefined();
- LLTextBox * pAttachLink = getChild<LLTextBox>("attachment", TRUE, FALSE);
+ LLTextBox * pAttachLink = getChild<LLTextBox>("attachment");
pAttachLink->setVisible(hasInventory);
if (hasInventory) {
pAttachLink->setValue(payload["inventory_name"]);
@@ -130,7 +129,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification
}
//ok button
- LLButton* pOkBtn = getChild<LLButton>("btn_ok", TRUE, FALSE);
+ LLButton* pOkBtn = getChild<LLButton>("btn_ok");
pOkBtn->setClickedCallback((boost::bind(&LLToastGroupNotifyPanel::onClickOk, this)));
setDefaultBtn(pOkBtn);
}
@@ -167,8 +166,7 @@ void LLToastGroupNotifyPanel::onClickAttachment()
if (mInventoryOffer != NULL) {
mInventoryOffer->forceResponse(IOR_ACCEPT);
- LLTextBox * pAttachLink = getChild<LLTextBox> ("attachment", TRUE,
- FALSE);
+ LLTextBox * pAttachLink = getChild<LLTextBox> ("attachment");
static const LLUIColor textColor = LLUIColorTable::instance().getColor(
"GroupNotifyDimmedTextColor");
pAttachLink->setColor(textColor);
diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp
index 79a7d45bbf..c39bac97a8 100644
--- a/indra/newview/lltoastpanel.cpp
+++ b/indra/newview/lltoastpanel.cpp
@@ -34,9 +34,28 @@
#include "lltoastpanel.h"
-LLToastPanel::LLToastPanel(LLNotificationPtr& notification) {
+LLToastPanel::LLToastPanel(LLNotificationPtr& notification)
+{
mNotification = notification;
}
-LLToastPanel::~LLToastPanel() {
+LLToastPanel::~LLToastPanel()
+{
}
+
+std::string LLToastPanel::getTitle()
+{
+// *TODO: localize header of Title
+/* std::string title;
+ std::string notification_type = mNotification->getType();
+
+ if( notification_type == "groupnotify" )
+ {
+ title = LLTrans::getString("TitleGroup");
+ }
+*/
+ return (mNotification->getName() + "\n" + mNotification->getMessage());
+}
+
+
+
diff --git a/indra/newview/lltoastpanel.h b/indra/newview/lltoastpanel.h
index 82e2a74672..2258eca273 100644
--- a/indra/newview/lltoastpanel.h
+++ b/indra/newview/lltoastpanel.h
@@ -36,6 +36,8 @@
#include "llpanel.h"
#include "llnotifications.h"
+#include <string>
+
/**
* Base class for all panels that can be added to the toast.
* All toast panels should contain necessary logic for representing certain notification
@@ -46,6 +48,9 @@ class LLToastPanel: public LLPanel {
public:
LLToastPanel(LLNotificationPtr&);
virtual ~LLToastPanel() = 0;
+
+ virtual std::string getTitle();
+ virtual const LLUUID& getID() { return mNotification->id();}
protected:
LLNotificationPtr mNotification;
};
diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp
new file mode 100644
index 0000000000..046b3e619b
--- /dev/null
+++ b/indra/newview/llurllineeditorctrl.cpp
@@ -0,0 +1,97 @@
+/**
+ * @file llurllineeditorctrl.cpp
+ * @brief LLURLLineEditor base class
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llclipboard.h"
+#include "lluictrlfactory.h"
+
+#include "llurllineeditorctrl.h"
+
+#include "llweb.h"
+
+//Constructor
+LLURLLineEditor::LLURLLineEditor(const LLLineEditor::Params& p)
+: LLLineEditor(p){
+
+}
+
+// copy selection to clipboard
+void LLURLLineEditor::copy()
+{
+ if( canCopy() )
+ {
+ copyEscapedURLToClipboard();
+ }
+}
+
+// cut selection to clipboard
+void LLURLLineEditor::cut()
+{
+ if( canCut() )
+ {
+ // Prepare for possible rollback
+ LLURLLineEditorRollback rollback( this );
+
+ copyEscapedURLToClipboard();
+
+ deleteSelection();
+
+ // Validate new string and rollback the if needed.
+ BOOL need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) );
+ if( need_to_rollback )
+ {
+ rollback.doRollback( this );
+ reportBadKeystroke();
+ }
+ else
+ if( mKeystrokeCallback )
+ {
+ mKeystrokeCallback( this );
+ }
+ }
+}
+// Copies escaped URL to clipboard
+void LLURLLineEditor::copyEscapedURLToClipboard()
+{
+ S32 left_pos = llmin( mSelectionStart, mSelectionEnd );
+ S32 length = llabs( mSelectionStart - mSelectionEnd );
+
+ const std::string unescaped_text = wstring_to_utf8str(mText.getWString().substr(left_pos, length));
+ LLWString selected_escaped_text = utf8str_to_wstring(LLWeb::escapeURL(unescaped_text));
+ gClipboard.copyFromString( selected_escaped_text );
+}
+// Makes UISndBadKeystroke sound
+void LLURLLineEditor::reportBadKeystroke()
+{
+ make_ui_sound("UISndBadKeystroke");
+}
diff --git a/indra/newview/llurllineeditorctrl.h b/indra/newview/llurllineeditorctrl.h
new file mode 100644
index 0000000000..618f29dfbf
--- /dev/null
+++ b/indra/newview/llurllineeditorctrl.h
@@ -0,0 +1,100 @@
+/**
+ * @file llurllineeditorctrl.h
+ * @brief Combobox-like location input control
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LLURLLINEEDITOR_H_
+#define LLURLLINEEDITOR_H_
+
+#include "linden_common.h"
+
+#include "lllineeditor.h"
+#include "lluictrl.h"
+
+// LLURLLineEditor class performing escaping of an URL while copying or cutting the target text
+class LLURLLineEditor: public LLLineEditor {
+ LOG_CLASS( LLURLLineEditor);
+
+public:
+ // LLLineEditor overrides to do necessary escaping
+ /*virtual*/ void copy();
+ /*virtual*/ void cut();
+
+protected:
+ LLURLLineEditor(const Params&);
+ friend class LLUICtrlFactory;
+ friend class LLFloaterEditUI;
+
+private:
+ // util function to escape selected text and copy it to clipboard
+ void copyEscapedURLToClipboard();
+ // send a beep signal if keystroke is bad. As it is private at LLLineEditor we need own function
+ void reportBadKeystroke();
+
+ // Helper class to do rollback if needed
+ class LLURLLineEditorRollback
+ {
+ public:
+ LLURLLineEditorRollback( LLURLLineEditor* ed )
+ :
+ mCursorPos( ed->mCursorPos ),
+ mScrollHPos( ed->mScrollHPos ),
+ mIsSelecting( ed->mIsSelecting ),
+ mSelectionStart( ed->mSelectionStart ),
+ mSelectionEnd( ed->mSelectionEnd )
+ {
+ mText = ed->getText();
+ }
+
+ void doRollback( LLURLLineEditor* ed )
+ {
+ ed->mCursorPos = mCursorPos;
+ ed->mScrollHPos = mScrollHPos;
+ ed->mIsSelecting = mIsSelecting;
+ ed->mSelectionStart = mSelectionStart;
+ ed->mSelectionEnd = mSelectionEnd;
+ ed->mText = mText;
+ ed->mPrevText = mText;
+ }
+
+ std::string getText() { return mText; }
+
+ private:
+ std::string mText;
+ S32 mCursorPos;
+ S32 mScrollHPos;
+ BOOL mIsSelecting;
+ S32 mSelectionStart;
+ S32 mSelectionEnd;
+ }; // end class LLURLLineEditorRollback
+
+};
+
+#endif /* LLURLLINEEDITOR_H_ */
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 30c97cdfa3..4640745e8c 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -49,6 +49,7 @@
#include "llsky.h"
#include "llvieweraudio.h"
+#include "llviewermenu.h"
#include "llviewertexturelist.h"
#include "llviewerthrottle.h"
#include "llviewerwindow.h"
@@ -599,6 +600,8 @@ void settings_setup_listeners()
gSavedSettings.getControl("AudioLevelMic")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
gSavedSettings.getControl("VelocityInterpolate")->getSignal()->connect(boost::bind(&handleVelocityInterpolate, _2));
+ gSavedSettings.getControl("QAMode")->getSignal()->connect(boost::bind(&show_debug_menus));
+ gSavedSettings.getControl("UseDebugMenus")->getSignal()->connect(boost::bind(&show_debug_menus));
}
#if TEST_CACHED_CONTROL
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 9c29131def..c1915d2ead 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -40,7 +40,6 @@
#include "llcompilequeue.h"
#include "llfloaterabout.h"
#include "llfloateractivespeakers.h"
-#include "llfloateraddlandmark.h"
#include "llfloateranimpreview.h"
#include "llfloaterauction.h"
#include "llfloateravatarpicker.h"
@@ -64,7 +63,6 @@
#include "llfloaterfonttest.h"
#include "llfloatergesture.h"
#include "llfloatergodtools.h"
-#include "llfloatergroupinfo.h"
#include "llfloatergroups.h"
#include "llfloaterhardwaresettings.h"
#include "llfloaterhtmlcurrency.h"
@@ -114,12 +112,12 @@
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
-#include "llpreviewlandmark.h"
#include "llpreviewnotecard.h"
#include "llpreviewscript.h"
#include "llpreviewsound.h"
#include "llpreviewtexture.h"
#include "llfloaterminiinspector.h"
+#include "llsyswellwindow.h"
//class LLLLFloaterObjectIMInfo;
@@ -129,7 +127,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>);
LLFloaterReg::add("active_speakers", "floater_active_speakers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterActiveSpeakers>);
- LLFloaterReg::add("add_landmark", "floater_add_landmark.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAddLandmark>);
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>);
LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>);
@@ -162,7 +159,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("gestures", "floater_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGesture>);
LLFloaterReg::add("god_tools", "floater_god_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGodTools>);
- LLFloaterReg::add("group_info", "floater_groupinfo.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGroupInfo>);
LLFloaterReg::add("group_picker", "floater_choose_group.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGroupPicker>);
LLFloaterReg::add("hud", "floater_hud.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHUD>);
@@ -184,6 +180,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("mute_object", "floater_mute_object.xml", &LLFloaterMute::buildFloaterMuteObjectUI);
LLFloaterReg::add("mini_map", "floater_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMap>);
LLFloaterReg::add("mini_inspector", "panel_mini_inspector.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMiniInspector>);
+ LLFloaterReg::add("syswell_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLSysWellWindow>);
LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>);
LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>);
@@ -203,7 +200,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("pref_voicedevicesettings", "floater_device_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceDeviceSettings>);
LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewAnim>, "preview");
LLFloaterReg::add("preview_gesture", "floater_preview_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewGesture>, "preview");
- LLFloaterReg::add("preview_landmark", "floater_preview_existing_landmark.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewLandmark>, "preview");
LLFloaterReg::add("preview_notecard", "floater_preview_notecard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewNotecard>, "preview");
LLFloaterReg::add("preview_script", "floater_script_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewLSL>, "preview");
LLFloaterReg::add("preview_scriptedit", "floater_live_lsleditor.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLLiveLSLEditor>, "preview");
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index bb14a619c5..78e8f084c7 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -37,6 +37,7 @@
#include "indra_constants.h"
#include "llagent.h"
+#include "llfoldertype.h"
#include "llviewercontrol.h"
#include "llconsole.h"
#include "llinventorymodel.h"
@@ -587,6 +588,79 @@ bool LLViewerInventoryCategory::exportFileLocal(LLFILE* fp) const
return true;
}
+void LLViewerInventoryCategory::determineFolderType()
+{
+ LLAssetType::EType original_type = getPreferredType();
+ if (LLAssetType::lookupIsProtectedCategoryType(original_type))
+ return;
+
+ U64 folder_valid = 0;
+ U64 folder_invalid = 0;
+ LLInventoryModel::cat_array_t category_array;
+ LLInventoryModel::item_array_t item_array;
+ gInventory.collectDescendents(getUUID(),category_array,item_array,FALSE);
+
+ // For ensembles
+ if (category_array.empty())
+ {
+ for (LLInventoryModel::item_array_t::iterator item_iter = item_array.begin();
+ item_iter != item_array.end();
+ item_iter++)
+ {
+ const LLViewerInventoryItem *item = (*item_iter);
+ if (item->getIsLinkType())
+ return;
+ if (item->getInventoryType() == LLInventoryType::IT_WEARABLE)
+ {
+ U32 flags = item->getFlags();
+ if (flags > WT_COUNT)
+ return;
+ const EWearableType wearable_type = EWearableType(flags);
+ const std::string& wearable_name = LLWearableDictionary::getTypeName(wearable_type);
+ U64 valid_folder_types = LLFolderType::lookupValidFolderTypes(wearable_name);
+ folder_valid |= valid_folder_types;
+ folder_invalid |= ~valid_folder_types;
+ }
+ }
+ for (U8 i = LLAssetType::AT_FOLDER_ENSEMBLE_START; i <= LLAssetType::AT_FOLDER_ENSEMBLE_END; i++)
+ {
+ if ((folder_valid & (1LL << i)) &&
+ !(folder_invalid & (1LL << i)))
+ {
+ changeType((LLAssetType::EType)i);
+ return;
+ }
+ }
+ }
+ if (LLAssetType::lookupIsEnsembleCategoryType(original_type))
+ {
+ changeType(LLAssetType::AT_NONE);
+ }
+}
+
+void LLViewerInventoryCategory::changeType(LLAssetType::EType new_folder_type)
+{
+ const LLUUID &folder_id = getUUID();
+ const LLUUID &parent_id = getParentUUID();
+ const std::string &name = getName();
+
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessageFast(_PREHASH_UpdateInventoryFolder);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->nextBlockFast(_PREHASH_FolderData);
+ msg->addUUIDFast(_PREHASH_FolderID, folder_id);
+ msg->addUUIDFast(_PREHASH_ParentID, parent_id);
+ msg->addS8Fast(_PREHASH_Type, new_folder_type);
+ msg->addStringFast(_PREHASH_Name, name);
+ gAgent.sendReliableMessage();
+
+ setPreferredType(new_folder_type);
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, folder_id);
+ gInventory.updateLinkedObjects(folder_id);
+}
+
///----------------------------------------------------------------------------
/// Local function definitions
///----------------------------------------------------------------------------
@@ -728,6 +802,16 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
gAgent.sendReliableMessage();
}
+void create_inventory_callingcard(const LLUUID& avatar_id)
+{
+ std::string item_desc = avatar_id.asString();
+ std::string item_name;
+ gCacheName->getFullName(avatar_id, item_name);
+ create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
+ LLUUID::null, LLTransactionID::tnull, item_name, item_desc, LLAssetType::AT_CALLINGCARD,
+ LLInventoryType::IT_CALLINGCARD, NOT_WEARABLE, PERM_MOVE | PERM_TRANSFER, NULL);
+}
+
void copy_inventory_item(
const LLUUID& agent_id,
const LLUUID& current_owner,
@@ -870,16 +954,23 @@ void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, co
{
std::string type = userdata.asString();
- if ("category" == type)
+ if (("category" == type) || ("current" == type) || ("outfit" == type) || ("my_otfts" == type) )
{
+ LLAssetType::EType a_type = LLAssetType::AT_NONE;
+ if ("current" == type)
+ a_type = LLAssetType::AT_CURRENT_OUTFIT;
+ if ("outfit" == type)
+ a_type = LLAssetType::AT_OUTFIT;
+ if ("my_otfts" == type)
+ a_type = LLAssetType::AT_MY_OUTFITS;
LLUUID category;
if (bridge)
{
- category = gInventory.createNewCategory(bridge->getUUID(), LLAssetType::AT_NONE, LLStringUtil::null);
+ category = gInventory.createNewCategory(bridge->getUUID(), a_type, LLStringUtil::null);
}
else
{
- category = gInventory.createNewCategory(gInventory.getRootFolderID(), LLAssetType::AT_NONE, LLStringUtil::null);
+ category = gInventory.createNewCategory(gInventory.getRootFolderID(), a_type, LLStringUtil::null);
}
gInventory.notifyObservers();
folder->setSelectionByID(category, TRUE);
@@ -1019,6 +1110,11 @@ const std::string& LLViewerInventoryItem::getName() const
const LLPermissions& LLViewerInventoryItem::getPermissions() const
{
+ if (const LLViewerInventoryItem *linked_item = getLinkedItem())
+ {
+ return linked_item->getPermissions();
+ }
+
// Use the actual permissions of the symlink, not its parent.
return LLInventoryItem::getPermissions();
}
@@ -1060,6 +1156,13 @@ LLInventoryType::EType LLViewerInventoryItem::getInventoryType() const
return linked_item->getInventoryType();
}
+ // Categories don't have types. If this item is an AT_FOLDER_LINK,
+ // treat it as a category.
+ if (getLinkedCategory())
+ {
+ return LLInventoryType::IT_CATEGORY;
+ }
+
return LLInventoryItem::getInventoryType();
}
@@ -1069,7 +1172,6 @@ U32 LLViewerInventoryItem::getFlags() const
{
return linked_item->getFlags();
}
-
return LLInventoryItem::getFlags();
}
@@ -1102,3 +1204,13 @@ const LLViewerInventoryCategory *LLViewerInventoryItem::getLinkedCategory() cons
}
return NULL;
}
+
+//----------
+
+void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name)
+{
+ rename(first_name + " " + last_name);
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, getUUID());
+ gInventory.notifyObservers();
+}
+
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 5198f5efc7..10309d023b 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -48,7 +48,7 @@ class LLViewerInventoryCategory;
// their inventory.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLViewerInventoryItem : public LLInventoryItem
+class LLViewerInventoryItem : public LLInventoryItem, public boost::signals2::trackable
{
public:
typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t;
@@ -144,6 +144,10 @@ public:
const LLViewerInventoryItem *getLinkedItem() const;
const LLViewerInventoryCategory *getLinkedCategory() const;
+ // callback
+ void onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name);
+
+public:
BOOL mIsComplete;
LLTransactionID mTransactionID;
};
@@ -202,7 +206,8 @@ public:
// other than cacheing.
bool exportFileLocal(LLFILE* fp) const;
bool importFileLocal(LLFILE* fp);
-
+ void determineFolderType();
+ void changeType(LLAssetType::EType new_folder_type);
protected:
LLUUID mOwnerID;
S32 mVersion;
@@ -271,6 +276,7 @@ extern LLInventoryCallbackManager gInventoryCallbacks;
#define NOT_WEARABLE (EWearableType)0
+// *TODO: Find a home for these
void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
const LLUUID& parent, const LLTransactionID& transaction_id,
const std::string& name,
@@ -279,6 +285,8 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id,
U32 next_owner_perm,
LLPointer<LLInventoryCallback> cb);
+void create_inventory_callingcard(const LLUUID& avatar_id);
+
/**
* @brief Securely create a new inventory item by copying from another.
*/
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index eb676d3188..a6157aa1e0 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -102,7 +102,6 @@
#include "llfloaterfonttest.h"
#include "llfloatergesture.h"
#include "llfloatergodtools.h"
-#include "llfloatergroupinfo.h"
#include "llfloatergroupinvite.h"
#include "llfloatergroups.h"
#include "llfloaterhtml.h"
@@ -5106,19 +5105,20 @@ void print_agent_nvpairs(void*)
void show_debug_menus()
{
- // this can get called at login screen where there is no menu so only toggle it if one exists
+ // this might get called at login screen where there is no menu so only toggle it if one exists
if ( gMenuBarView )
{
BOOL debug = gSavedSettings.getBOOL("UseDebugMenus");
+ BOOL qamode = gSavedSettings.getBOOL("QAMode");
gMenuBarView->setItemVisible("Advanced", debug);
- gMenuBarView->setItemEnabled("Advanced", debug);
+// gMenuBarView->setItemEnabled("Advanced", debug); // Don't disable Advanced keyboard shortcuts when hidden
- gMenuBarView->setItemVisible("Debug", debug);
- gMenuBarView->setItemEnabled("Debug", debug);
+ gMenuBarView->setItemVisible("Debug", qamode);
+ gMenuBarView->setItemEnabled("Debug", qamode);
- gMenuBarView->setItemVisible("Develop", debug);
- gMenuBarView->setItemEnabled("Develop", debug);
+ gMenuBarView->setItemVisible("Develop", qamode);
+ gMenuBarView->setItemEnabled("Develop", qamode);
// Server ('Admin') menu hidden when not in godmode.
const bool show_server_menu = debug && (gAgent.getGodLevel() > GOD_NOT);
@@ -5280,9 +5280,7 @@ class LLWorldCreateLandmark : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark"));
-
- // Floater "Add Landmark" functionality moved to Side Tray
- //LLFloaterReg::showInstance("add_landmark");
+
return true;
}
};
@@ -5373,6 +5371,19 @@ class LLAvatarAddFriend : public view_listener_t
}
};
+class LLAvatarAddContact : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
+ if(avatar)
+ {
+ create_inventory_callingcard(avatar->getID());
+ }
+ return true;
+ }
+};
+
bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle handle)
{
S32 option = LLNotification::getSelectedOption(notification, response);
@@ -7931,6 +7942,7 @@ void initialize_menus()
// Avatar pie menu
view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute");
view_listener_t::addMenu(new LLAvatarAddFriend(), "Avatar.AddFriend");
+ view_listener_t::addMenu(new LLAvatarAddContact(), "Avatar.AddContact");
view_listener_t::addMenu(new LLAvatarFreeze(), "Avatar.Freeze");
view_listener_t::addMenu(new LLAvatarDebug(), "Avatar.Debug");
view_listener_t::addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug");
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index e8d350b0b6..cf482266d6 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -49,6 +49,7 @@ void init_menus();
void cleanup_menus();
void show_debug_menus(); // checks for if menus should be shown first.
+void toggle_debug_menus(void*);
void show_context_menu( S32 x, S32 y, MASK mask );
void show_build_mode_context_menu(S32 x, S32 y, MASK mask);
BOOL enable_save_into_inventory(void*);
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index f8b6e0f687..5849a40726 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -78,7 +78,6 @@
#include "llfloaterbuycurrency.h"
#include "llfloaterbuyland.h"
#include "llfloaterchat.h"
-#include "llfloatergroupinfo.h"
#include "llfloaterimagepreview.h"
#include "llfloaterland.h"
#include "llfloaterregioninfo.h"
@@ -136,6 +135,7 @@
#include "llfloaterworldmap.h"
#include "llviewerdisplay.h"
#include "llkeythrottle.h"
+#include "llgroupactions.h"
#include <boost/tokenizer.hpp>
#include <boost/algorithm/string/split.hpp>
@@ -640,7 +640,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
if (option == 2 && !group_id.isNull())
{
- LLFloaterGroupInfo::showFromUUID(group_id);
+ LLGroupActions::show(group_id);
LLSD args;
args["MESSAGE"] = message;
LLNotifications::instance().add("JoinGroup", args, notification["payload"]);
@@ -1743,7 +1743,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// Also send down the old path for now.
if (IM_GROUP_NOTICE_REQUESTED == dialog)
{
- LLFloaterGroupInfo::showNotice(subj,mes,group_id,has_inventory,item_name,info);
+
+ LLPanelGroup::showNotice(subj,mes,group_id,has_inventory,item_name,info);
}
}
break;
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index ae3b50abe4..b7f6cacc0e 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -45,7 +45,6 @@
// Viewer includes
#include "llagent.h"
-#include "llfloatergroupinfo.h"
#include "llviewerwindow.h"
#include "llviewercontrol.h"
#include "llfirstuse.h"
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index afee30293a..9e0713b494 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -50,7 +50,6 @@
#include "llpreview.h"
#include "llpreviewtexture.h"
#include "llpreviewnotecard.h"
-#include "llpreviewlandmark.h"
#include "llscrollbar.h"
#include "llsidetray.h"
#include "lltooldraganddrop.h"
@@ -1377,12 +1376,6 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLInventoryItem* item, llwchar wc
{
panel->setItem(item);
}
-
-// LLPreviewLandmark* preview = LLFloaterReg::showTypedInstance<LLPreviewLandmark>("preview_landmark", LLSD(item->getUUID()), TAKE_FOCUS_YES);
-// if (preview)
-// {
-// preview->setItem( item );
-// }
}
void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, llwchar wc )
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index b4838db690..2aa8e4d314 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -45,6 +45,7 @@
#include "llfloaterreg.h"
#include "llpanellogin.h"
#include "llviewerkeyboard.h"
+#include "llviewermenu.h"
#include "llviewerwindow.h"
#include "llviewquery.h"
@@ -256,8 +257,6 @@ std::string LLViewerWindow::sSnapshotDir;
std::string LLViewerWindow::sMovieBaseName;
-extern void toggle_debug_menus(void*);
-
class RecordToChatConsole : public LLError::Recorder, public LLSingleton<RecordToChatConsole>
{
public:
@@ -1566,9 +1565,6 @@ void LLViewerWindow::initWorldUI()
getRootView()->sendChildToFront(gSnapshotFloaterView);
// new bottom panel
- getRootView()->addChild(LLBottomTray::getInstance());
- // Make sure Bottom Tray is behind Side Tray regardless "addChild" order.
- getRootView()->sendChildToBack(LLBottomTray::getInstance());
LLRect rc = LLBottomTray::getInstance()->getRect();
rc.mLeft = 0;
rc.mRight = mRootView->getRect().getWidth();
@@ -1641,6 +1637,16 @@ void LLViewerWindow::initWorldUI()
navbar->translate(0, root_rect.getHeight() - menu_bar_height - navbar->getRect().getHeight()); // FIXME
navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
+ if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
+ {
+ navbar->showNavigationPanel(FALSE);
+ }
+
+ if (!gSavedSettings.getBOOL("ShowNavbarFavoritesPanel"))
+ {
+ navbar->showFavoritesPanel(FALSE);
+ }
+
getRootView()->addChild(gStatusBar);
getRootView()->addChild(navbar);
@@ -2912,7 +2918,9 @@ void LLViewerWindow::updateKeyboardFocus()
{
if (!cur_focus->isInVisibleChain() || !cur_focus->isInEnabledChain())
{
- gFocusMgr.releaseFocusIfNeeded(cur_focus);
+ // don't release focus, just reassign so that if being given
+ // to a sibling won't call onFocusLost on all the ancestors
+ // gFocusMgr.releaseFocusIfNeeded(cur_focus);
LLUICtrl* parent = cur_focus->getParentUICtrl();
const LLUICtrl* focus_root = cur_focus->findRootMostFocusRoot();
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index f1d4520370..2304571cf1 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -1510,6 +1510,7 @@ std::string LLVoiceClientStatusObserver::status2string(LLVoiceClientStatusObserv
CASE(STATUS_JOINED);
CASE(STATUS_LEFT_CHANNEL);
CASE(STATUS_VOICE_DISABLED);
+ CASE(STATUS_VOICE_ENABLED);
CASE(BEGIN_ERROR_STATUS);
CASE(ERROR_CHANNEL_FULL);
CASE(ERROR_CHANNEL_LOCKED);
@@ -5786,7 +5787,7 @@ bool LLVoiceClient::getMuteMic() const
void LLVoiceClient::setUserPTTState(bool ptt)
{
mUserPTTState = ptt;
- LLNearbyChatBar::getInstance()->setPTTState(ptt);
+ if (LLNearbyChatBar::instanceExists()) LLNearbyChatBar::getInstance()->setPTTState(ptt);
}
bool LLVoiceClient::getUserPTTState()
@@ -5797,7 +5798,7 @@ bool LLVoiceClient::getUserPTTState()
void LLVoiceClient::toggleUserPTTState(void)
{
mUserPTTState = !mUserPTTState;
- LLNearbyChatBar::getInstance()->setPTTState(mUserPTTState);
+ if (LLNearbyChatBar::instanceExists()) LLNearbyChatBar::getInstance()->setPTTState(mUserPTTState);
}
void LLVoiceClient::setVoiceEnabled(bool enabled)
@@ -5805,15 +5806,21 @@ void LLVoiceClient::setVoiceEnabled(bool enabled)
if (enabled != mVoiceEnabled)
{
mVoiceEnabled = enabled;
+ LLVoiceClientStatusObserver::EStatusType status;
+
if (enabled)
{
LLVoiceChannel::getCurrentVoiceChannel()->activate();
+ status = LLVoiceClientStatusObserver::STATUS_VOICE_ENABLED;
}
else
{
// Turning voice off looses your current channel -- this makes sure the UI isn't out of sync when you re-enable it.
LLVoiceChannel::getCurrentVoiceChannel()->deactivate();
+ status = LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED;
}
+
+ notifyStatusObservers(status);
}
}
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index 8b3bbb68bb..fe99e787da 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -65,6 +65,11 @@ public:
STATUS_JOINED,
STATUS_LEFT_CHANNEL,
STATUS_VOICE_DISABLED,
+
+ // Adding STATUS_VOICE_ENABLED as pair status for STATUS_VOICE_DISABLED
+ // See LLVoiceClient::setVoiceEnabled()
+ STATUS_VOICE_ENABLED,
+
BEGIN_ERROR_STATUS,
ERROR_CHANNEL_FULL,
ERROR_CHANNEL_LOCKED,
diff --git a/indra/newview/skins/default/textures/icons/ForwardArrow_Off.png b/indra/newview/skins/default/textures/icons/ForwardArrow_Off.png
new file mode 100644
index 0000000000..e9b72b0401
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/ForwardArrow_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ForwardArrow_Press.png b/indra/newview/skins/default/textures/icons/ForwardArrow_Press.png
new file mode 100644
index 0000000000..c7b2c769ae
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/ForwardArrow_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Off.png
new file mode 100644
index 0000000000..2dc32a576b
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Selected.png
new file mode 100644
index 0000000000..bea218a2fb
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_Appearance_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 96d93e7081..1515a34eeb 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -15,6 +15,9 @@
<texture name="Arrow_Right_Off" file_name="navbar/Arrow_Right_Off.png" preload="true"/>
<texture name="Arrow_Right_Press" file_name="navbar/Arrow_Right_Press.png" preload="true"/>
+ <texture name="Arrow_Up" file_name="widgets/Arrow_Up.png" preload="true" />
+ <texture name="Arrow_Down" file_name="widgets/Arrow_Down.png" preload="true" />
+
<texture name="BackArrow_Off" file_name="icons/BackArrow_Off.png" preload="false" />
<texture name="BackArrow_Press" file_name="icons/BackArrow_Press.png" preload="false" />
@@ -56,9 +59,12 @@
<texture name="FileMenu_BarSelect" file_name="navbar/FileMenu_BarSelect.png" preload="false" />
<texture name="FileMenu_BG" file_name="navbar/FileMenu_BG.png" preload="false" />
+ <texture name="ForwardArrow_Off" file_name="icons/ForwardArrow_Off.png" preload="false" />
+ <texture name="ForwardArrow_Press" file_name="icons/ForwardArrow_Press.png" preload="false" />
+
<texture name="Help_Off" file_name="navbar/Help_Off.png" preload="false"/>
<texture name="Help_Press" file_name="navbar/Help_Press.png" preload="false"/>
-
+
<texture name="History_Arrow" file_name="navbar/History_Arrow.png" preload="true"/>
<texture name="Home_Off" file_name="navbar/Home_Off.png" preload="false"/>
@@ -110,7 +116,8 @@
<texture name="PushButton_Selected" file_name="widgets/PushButton_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
<texture name="PushButton_Selected_Press" file_name="widgets/PushButton_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
<texture name="PushButton_Selected_Disabled" file_name="widgets/PushButton_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
-
+
+ <texture name="RadioButton_Press" file_name="widgets/RadioButton_Press.png" preload="true" />
<texture name="RadioButton_On_Press" file_name="widgets/RadioButton_On_Press.png" preload="true" />
<texture name="RadioButton_Off" file_name="widgets/RadioButton_Off.png" preload="true" />
<texture name="RadioButton_On" file_name="widgets/RadioButton_On.png" preload="true" />
@@ -167,6 +174,9 @@
<texture name="Stepper_Up_Off" file_name="widgets/Stepper_Up_Off.png" preload="true"/>
<texture name="Stepper_Up_Press" file_name="widgets/Stepper_Up_Press.png" preload="true"/>
+ <texture name="TabIcon_Appearance_Off" file_name="taskpanel/TabIcon_Appearance_Off.png" preload="false" />
+ <texture name="TabIcon_Appearance_Over" file_name="taskpanel/TabIcon_Appearance_Over.png" preload="false"/>
+ <texture name="TabIcon_Appearance_Selected" file_name="taskpanel/TabIcon_Appearance_Selected.png" preload="false" />
<texture name="TabIcon_Close_Off" file_name="taskpanel/TabIcon_Close_Off.png" preload="false" />
<texture name="TabIcon_Close_Over" file_name="taskpanel/TabIcon_Close_Over.png" preload="false"/>
<texture name="TabIcon_Home_Off" file_name="taskpanel/TabIcon_Home_Off.png" preload="false" />
@@ -240,7 +250,7 @@
<texture name="Window_Background" file_name="windows/Window_Background.png" preload="true" />
<texture name="Window_Foreground" file_name="windows/Window_Foreground.png" preload="true" />
-
+
@@ -249,7 +259,7 @@
<texture name="btn_chatbar.tga" scale.left="20" scale.top="24" scale.right="44" scale.bottom="0"/>
<texture name="btn_chatbar_selected.tga" scale.left="20" scale.top="24" scale.right="44" scale.bottom="0"/>
-
+
<texture name="cam_rotate_out.tga" preload="false"/>
<texture name="cam_rotate_in.tga" preload="false"/>
<texture name="cam_zoom_out.tga" preload="false"/>
@@ -333,7 +343,7 @@
<texture name="minimize_pressed.tga" preload="true"/>
<texture name="sm_rounded_corners_simple.tga" scale.left="4" scale.top="4" scale.bottom="4" scale.right="4"/>
-
+
<texture name="rounded_square.tga" file_name="rounded_square.j2c" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16" />
<texture name="rounded_square_soft.tga" file_name="rounded_square_soft.j2c" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16"/>
@@ -378,11 +388,14 @@
<texture name="inv_folder_bodypart.tga"/>
<texture name="inv_folder_callingcard.tga"/>
<texture name="inv_folder_clothing.tga"/>
+ <texture name="inv_folder_current_outfit.tga"/>
<texture name="inv_folder_gesture.tga"/>
<texture name="inv_folder_landmark.tga"/>
<texture name="inv_folder_lostandfound.tga"/>
+ <texture name="inv_folder_my_outfits.tga"/>
<texture name="inv_folder_notecard.tga"/>
<texture name="inv_folder_object.tga"/>
+ <texture name="inv_folder_outfit.tga"/>
<texture name="inv_folder_plain_closed.tga"/>
<texture name="inv_folder_script.tga"/>
<texture name="inv_folder_snapshot.tga"/>
diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Down.png b/indra/newview/skins/default/textures/widgets/Arrow_Down.png
new file mode 100644
index 0000000000..e10f6472eb
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Arrow_Down.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Up.png b/indra/newview/skins/default/textures/widgets/Arrow_Up.png
new file mode 100644
index 0000000000..48df69d82e
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Arrow_Up.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/favorites_bar_button.xml b/indra/newview/skins/default/xui/en/favorites_bar_button.xml
new file mode 100644
index 0000000000..4525df31b6
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/favorites_bar_button.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- *NOTE: mantipov: to use the "use_ellipses" attribute label should be LEFT aligned
+untill LLFontGL::render() is fixed to avoid this requirement-->
+<!-- *NOTE: mantipov: top & height should be synchronized with <favorites_bar> in the panel_navigation_bar.xml-->
+<!-- All buttons in the Favorites bar will be created from this one -->
+<button
+ follows="left|bottom"
+ halign="left"
+ height="23"
+ image_disabled="transparent.j2c"
+ image_disabled_selected="PushButton_Selected"
+ image_hover_selected="PushButton_Selected"
+ image_hover_unselected="PushButton_Off"
+ image_selected="PushButton_Selected"
+ image_unselected="transparent.j2c"
+ layout="topleft"
+ left="2"
+ name="favorites_bar_btn"
+ tab_stop="false"
+ top="2"
+ use_ellipses="true"
+ width="120" />
diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
index 0012294160..b0472eb7e2 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml
@@ -157,7 +157,7 @@
label="Range"
layout="topleft"
left="10"
- max_val="40"
+ max_val="130"
min_val="5"
name="near_me_range"
top="32"
diff --git a/indra/newview/skins/default/xui/en/floater_buy_land.xml b/indra/newview/skins/default/xui/en/floater_buy_land.xml
index ec52c565ae..777236504d 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_land.xml
@@ -374,9 +374,11 @@ supports [AMOUNT2] objects
length="1"
bottom_delta="-119"
follows="top|left"
+ height="16"
layout="topleft"
left="204"
name="info_parcel_label"
+ top="30"
width="48">
Parcel:
</text>
@@ -389,7 +391,7 @@ supports [AMOUNT2] objects
layout="topleft"
left_delta="16"
name="info_parcel"
- top_delta="-1"
+ top_pad="1"
width="180">
Scotopteryx 138,204
</text>
@@ -397,9 +399,11 @@ supports [AMOUNT2] objects
type="string"
length="1"
follows="top|left"
+ height="16"
layout="topleft"
left="204"
name="info_size_label"
+ top_pad="1"
width="48">
Size:
</text>
@@ -412,7 +416,7 @@ supports [AMOUNT2] objects
layout="topleft"
left_delta="16"
name="info_size"
- top_delta="-1"
+ top_pad="1"
width="180">
1024 m²
</text>
@@ -420,9 +424,11 @@ supports [AMOUNT2] objects
type="string"
length="1"
follows="top|left"
+ height="16"
layout="topleft"
left="204"
name="info_price_label"
+ top_pad="1"
width="48">
Price:
</text>
@@ -435,7 +441,7 @@ supports [AMOUNT2] objects
layout="topleft"
left_delta="16"
name="info_price"
- top_delta="-1"
+ top_pad="1"
width="180">
L$ 1500
(L$ 1.1/m²)
@@ -450,7 +456,7 @@ sold with objects
layout="topleft"
left="16"
name="info_action"
- top="156"
+ top="166"
width="350">
Buying this land will:
</text>
@@ -485,7 +491,7 @@ sold with objects
layout="topleft"
left_delta="0"
name="error_web"
- top_delta="144"
+ top_delta="154"
width="120" />
<locate
height="-200"
@@ -508,7 +514,7 @@ sold with objects
left="72"
name="account_action"
right="438"
- top="190"
+ top="200"
width="218">
Upgrade you to premium membership.
</text>
@@ -562,7 +568,7 @@ sold with objects
left="72"
name="land_use_action"
right="438"
- top="274"
+ top="284"
width="218">
Increase your monthly land use fees to US$ 40/month.
</text>
@@ -638,7 +644,7 @@ sold with objects
layout="topleft"
left="170"
name="currency_amt"
- top="398"
+ top="408"
width="80">
1000
</line_editor>
@@ -654,7 +660,7 @@ sold with objects
layout="topleft"
left="260"
name="currency_est"
- top="399"
+ top="409"
width="178">
for approx. US$ [AMOUNT2]
</text>
diff --git a/indra/newview/skins/default/xui/en/floater_inventory.xml b/indra/newview/skins/default/xui/en/floater_inventory.xml
index 37c6cbf391..610c62a21a 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory.xml
@@ -207,6 +207,22 @@
parameter="category" />
</menu_item_call>
<menu_item_call
+ label="New Outfit"
+ layout="topleft"
+ name="New Outfit">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="outfit" />
+ </menu_item_call>
+ <menu_item_call
+ label="New My Outfits"
+ layout="topleft"
+ name="New My Outfits">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="my_otfts" />
+ </menu_item_call>
+ <menu_item_call
label="New Script"
layout="topleft"
name="New Script">
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
index 6cb044cda1..467168ebd8 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
auto_tile="true"
- height="320"
+ height="340"
layout="topleft"
name="item properties"
save_rect="true"
@@ -185,31 +185,71 @@
name="OwnerLabel"
top="125"
width="78">
- You can:
+ You:
</text>
<check_box
height="16"
- label="Modify"
+ label="Edit"
layout="topleft"
- left_delta="0"
+ left_pad="5"
name="CheckOwnerModify"
- top_pad="4"
+ top_delta="0"
width="78" />
<check_box
height="16"
label="Copy"
layout="topleft"
- left_delta="78"
+ left_delta="0"
name="CheckOwnerCopy"
- top_delta="0"
+ top_pad="5"
width="88" />
<check_box
height="16"
- label="Resell/Give away"
+ label="Resell"
layout="topleft"
- left_delta="88"
+ left_delta="0"
name="CheckOwnerTransfer"
+ top_pad="5"
+ width="106" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="10"
+ name="AnyoneLabel"
+ top_pad="5"
+ width="78">
+ Anyone:
+ </text>
+ <check_box
+ height="16"
+ label="Copy"
+ layout="topleft"
+ left_pad="5"
+ name="CheckEveryoneCopy"
top_delta="0"
+ width="130" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="10"
+ name="GroupLabel"
+ top_pad="5"
+ width="78">
+ Group:
+ </text>
+ <check_box
+ height="16"
+ label="Share"
+ layout="topleft"
+ left_pad="5"
+ name="CheckShareWithGroup"
+ top_delta="5"
width="106" />
<text
type="string"
@@ -218,6 +258,93 @@
height="10"
layout="topleft"
left="10"
+ name="NextOwnerLabel"
+ top_pad="5"
+ width="78">
+ Next owner:
+ </text>
+ <check_box
+ height="16"
+ label="Edit"
+ layout="topleft"
+ left_pad="5"
+ name="CheckNextOwnerModify"
+ top_delta="0"
+ width="78" />
+ <check_box
+ height="16"
+ label="Copy"
+ layout="topleft"
+ left_delta="0"
+ name="CheckNextOwnerCopy"
+ top_pad="5"
+ width="88" />
+ <check_box
+ height="16"
+ label="Resell"
+ layout="topleft"
+ left_delta="0"
+ name="CheckNextOwnerTransfer"
+ top_pad="5"
+ width="106" />
+ <check_box
+ height="16"
+ label="For Sale"
+ layout="topleft"
+ left="10"
+ name="CheckPurchase"
+ top_pad="5"
+ width="78" />
+ <combo_box
+ height="19"
+ left_pad="5"
+ layout="topleft"
+ follows="left|top"
+ name="combobox sale copy"
+ width="90">
+ <combo_box.item
+ label="Copy"
+ name="Copy"
+ value="Copy" />
+ <combo_box.item
+ label="Original"
+ name="Original"
+ value="Original" />
+ </combo_box>
+ <spinner
+ follows="left|top"
+ decimal_digits="0"
+ increment="1"
+ control_name="Edit Cost"
+ name="Edit Cost"
+ label="Price: L$"
+ label_width="60"
+ left="10"
+ width="180"
+ min_val="1"
+ height="19"
+ max_val="999999999"
+ top_pad="5"/>
+
+ <!--line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top|right"
+ height="16"
+ layout="topleft"
+ left_pad="5"
+ max_length="25"
+ name="EditPrice"
+ top_delta="0"
+ width="242" /-->
+
+ <!--text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="10"
name="BaseMaskDebug"
top="155"
width="330">
@@ -270,60 +397,8 @@
top_delta="0"
width="90">
N:
- </text>
- <check_box
- height="16"
- label="Share with group"
- layout="topleft"
- left="10"
- name="CheckShareWithGroup"
- top="171"
- width="106" />
- <check_box
- height="16"
- label="Allow anyone to copy"
- layout="topleft"
- left_delta="0"
- name="CheckEveryoneCopy"
- top_pad="16"
- width="130" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="0"
- name="NextOwnerLabel"
- top_pad="16"
- width="88">
- Next owner can:
- </text>
- <check_box
- height="16"
- label="Modify"
- layout="topleft"
- left_delta="0"
- name="CheckNextOwnerModify"
- top_pad="4"
- width="78" />
- <check_box
- height="16"
- label="Copy"
- layout="topleft"
- left_delta="78"
- name="CheckNextOwnerCopy"
- top_delta="0"
- width="88" />
- <check_box
- height="16"
- label="Resell/Give away"
- layout="topleft"
- left_delta="88"
- name="CheckNextOwnerTransfer"
- top_delta="0"
- width="106" />
- <text
+ </text-->
+ <!--text
type="string"
length="1"
follows="left|top"
@@ -331,19 +406,13 @@
layout="topleft"
left="10"
name="SaleLabel"
- top="265"
+ top_pad="5"
width="330">
Mark Item:
- </text>
- <check_box
- height="16"
- label="For Sale"
- layout="topleft"
- left_delta="0"
- name="CheckPurchase"
- top_pad="4"
- width="78" />
- <radio_group
+ </text-->
+
+
+ <!--radio_group
draw_border="false"
follows="left|top|right"
height="16"
@@ -368,28 +437,19 @@
name="radio2"
top_delta="0"
width="70" />
- </radio_group>
- <text
+ </radio_group-->
+
+ <!--text
type="string"
length="1"
follows="left|top"
height="16"
layout="topleft"
- left="42"
+ left="10"
name="TextPrice"
- top="299"
- width="56">
- Price: L$
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_delta="56"
- max_length="25"
- name="EditPrice"
- top_delta="0"
- width="242" />
+ top_pad="5"
+ width="78">
+ Price: L$
+ </text-->
+
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
index 3327dc8c8b..f8f1abd179 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
@@ -83,23 +83,11 @@
<button
follows="left|bottom"
height="20"
- label="Discard"
+ label="Save"
label_selected="Discard"
layout="topleft"
left="9"
- name="Discard"
+ name="Save"
top="332"
width="100" />
- <button
- enabled="false"
- follows="left|bottom"
- height="20"
- label="Keep"
- label_selected="Keep"
- layout="topleft"
- left_pad="5"
- mouse_opaque="false"
- name="Keep"
- top_delta="0"
- width="100" />
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_sys_well.xml b/indra/newview/skins/default/xui/en/floater_sys_well.xml
new file mode 100644
index 0000000000..468d41e2f0
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_sys_well.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater
+ background_opaque="false"
+ background_visible="true"
+ bevel_style="in"
+ bg_alpha_color="0.0 0.0 0.0 0.0"
+ height="60"
+ left="0"
+ top="0"
+ follows="right|bottom"
+ layout="topleft"
+ name="notification_chiclet"
+ save_rect="true"
+ title=""
+ width="320"
+ can_minimize="false"
+ can_tear_off="false"
+ can_resize="false"
+ can_drag_on_left="false"
+ can_close="false"
+ can_dock="false"
+>
+ <scroll_container
+ follows="top|bottom"
+ layout="topleft"
+ name="notification_list_container"
+ left="1"
+ top="30"
+ width="336"
+ height="30">
+ <scrolling_panel_list
+ follows="left|right"
+ layout="topleft"
+ name="notification_list"
+ left="0"
+ top="0"
+ height="20"
+ width="320" />
+ </scroll_container>
+
+ <panel
+ top="0"
+ width="320"
+ height="30"
+ layout="topleft"
+ follows="top|left|right"
+ background_visible="true"
+ background_opaque="false"
+ bg_alpha_color="0.0 0.0 0.0 1.0"
+ name="notification_caption"
+ >
+ <text
+ width="255"
+ left="25"
+ height="20"
+ layout="topleft"
+ follows="left|right|top"
+ font="SansSerifBoldBig"
+ text_color="white"
+ word_wrap="true"
+ mouse_opaque="true"
+ name="sender_name"
+ >
+ NOTIFICATIONS
+ </text>
+ <button
+ top="5"
+ left="270"
+ width="15"
+ height="15"
+ layout="topleft"
+ follows="right"
+ label=""
+ toggle="true"
+ image_unselected="arrow_up.tga"
+ image_disabled="arrow_up.tga"
+ image_selected="arrow_down.tga"
+ image_hover_selected="arrow_down.tga"
+ image_disabled_selected="arrow_down.tga"
+ name="tear_btn"
+ />
+ <button
+ top="5"
+ left="300"
+ width="15"
+ height="15"
+ layout="topleft"
+ follows="right"
+ label=""
+ image_unselected="closebox.tga"
+ image_disabled="closebox.tga"
+ image_selected="closebox.tga"
+ image_hover_selected="closebox.tga"
+ image_disabled_selected="closebox.tga"
+ name="close_btn"
+ />
+ </panel>
+
+</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index c788f8f095..dd8acea4ed 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -85,6 +85,22 @@
parameter="current" />
</menu_item_call>
<menu_item_call
+ label="New Outfit"
+ layout="topleft"
+ name="New Outfit">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="outfit" />
+ </menu_item_call>
+ <menu_item_call
+ label="New My Outfits"
+ layout="topleft"
+ name="New My Outfits">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="my_otfts" />
+ </menu_item_call>
+ <menu_item_call
label="New Script"
layout="topleft"
name="New Script">
@@ -322,6 +338,14 @@
function="Inventory.DoToSelected"
parameter="change_folder_type_undershirt" />
</menu_item_call>
+ <menu_item_call
+ label="Outfit"
+ layout="topleft"
+ name="Outfit">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="change_folder_type_outfit" />
+ </menu_item_call>
</menu>
<menu_item_call
label="Teleport"
diff --git a/indra/newview/skins/default/xui/en/menu_nearby_chat.xml b/indra/newview/skins/default/xui/en/menu_nearby_chat.xml
index 02a2f83d14..ff89e20ea5 100644
--- a/indra/newview/skins/default/xui/en/menu_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/en/menu_nearby_chat.xml
@@ -7,7 +7,7 @@
</menu_item_call>
<menu_item_separator />
- <menu_item_check bottom_delta="-18" height="18" label="Show Muted Text" left="0" mouse_opaque="true"
+ <menu_item_check bottom_delta="-18" height="18" label="Show Blocked Text" left="0" mouse_opaque="true"
name="muted_text" width="128">
<menu_item_check.on_click function="NearbyChat.Action" userdata="muted_text" />
<menu_item_check.on_check function="NearbyChat.Check" userdata="muted_text"/>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 44565333e5..40847b28fe 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -205,7 +205,7 @@
function="Floater.Toggle"
parameter="active_speakers" />
</menu_item_check>
- <menu_item_check
+ <!--menu_item_check
label="Block List"
layout="topleft"
name="Mute List">
@@ -215,7 +215,7 @@
<menu_item_check.on_click
function="Floater.Toggle"
parameter="mute" />
- </menu_item_check>
+ </menu_item_check-->
<menu_item_separator
layout="topleft" />
<menu_item_check
@@ -930,7 +930,7 @@
</menu>
</menu>
<menu
- label="Geek"
+ label="Advanced"
layout="topleft"
name="Advanced"
tear_off="true"
@@ -1824,6 +1824,18 @@
function="Advanced.ShowDebugSettings"
parameter="all" />
</menu_item_call>
+ <menu_item_check
+ label="Debug (QA) Mode"
+ layout="topleft"
+ name="Debug Mode"
+ shortcut="control|alt|Q">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="QAMode" />
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="QAMode" />
+ </menu_item_check>
</menu>
<menu
create_jump_keys="true"
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index 4c880f6dc0..91039539f9 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -127,8 +127,8 @@
<split_button.item
image_selected="camera_presets/camera_presets_34_view.png"
image_unselected="camera_presets/camera_presets_34_view.png"
- name="3/4_view"
- tool_tip="3/4 View"
+ name="group_view"
+ tool_tip="Group View"
/>
<split_button.item
image_selected="camera_presets/camera_presets_fron_view.png"
diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml
index 71b5f78d59..b9a384bf8f 100644
--- a/indra/newview/skins/default/xui/en/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_general.xml
@@ -4,6 +4,7 @@
follows="all"
height="514"
label="General"
+ class="panel_group_general"
layout="topleft"
left="1"
name="general_tab"
@@ -42,6 +43,7 @@ Hover your mouse over the options for more help.
<line_editor
follows="left|top"
font="SansSerifSmall"
+ prevalidate_callback="asci"
halign="left"
height="16"
label="Type your new group name here"
diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
new file mode 100644
index 0000000000..4f179d7a16
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+
+<panel
+ follows="left|top|right|bottom"
+ height="660"
+ label="Group Info"
+ layout="topleft"
+ name="panel_group_info"
+ border="false"
+ width="300">
+ <panel.string
+ name="default_needs_apply_text">
+ There are unapplied changes on the current tab.
+ </panel.string>
+ <panel.string
+ name="want_apply_text">
+ Do you want to apply these changes?
+ </panel.string>
+
+ <button
+ layout="topleft"
+ name="back"
+ left="5"
+ top="5"
+ width="20"
+ height="20"
+ label=""
+ follows="top|left"
+ image_selected="navbar_bg_button.tga"
+ image_unselected="navbar_bg_button.tga"
+ image_overlay="navbar_back.tga"/>
+ <text
+ layout="topleft"
+ top="5"
+ left_pad="15"
+ width="200"
+ height="20"
+ font="SansSerifBold"
+ text_color="white"
+ follows="top|left|right"
+ mouse_opaque="true"
+ name="group_name">(Loading...)</text>
+ <button
+ top="632"
+ height="20"
+ font="SansSerifSmall"
+ label="Apply"
+ label_selected="Apply"
+ name="btn_apply"
+ left="5"
+ width="65" />
+ <button
+ top="632"
+ left="75"
+ height="20"
+ ont="SansSerifSmall"
+ label="Refresh"
+ label_selected="Refresh"
+ name="btn_refresh"
+ follows="top|left"
+ width="65" />
+ <button
+ top="632"
+ height="20"
+ font="SansSerifSmall"
+ label="Create"
+ label_selected="Create"
+ name="btn_create"
+ left="5"
+ visible="false"
+ width="65" />
+ <accordion layout="topleft" left="2" width="296" top="28" height="600" follows="all" name="panel_me_profile">
+ <accordion_tab min_height="515" title="Group General" name="group_general_tab">
+ <panel class="panel_group_general" filename="panel_group_general.xml" name="group_general_tab_panel"/>
+ </accordion_tab>
+ <accordion_tab min_height="380" title="Group Roles" name="group_roles_tab" can_resize="false">
+ <panel class="panel_group_roles" filename="panel_group_roles.xml" name="group_roles_tab_panel"/>
+ </accordion_tab>
+ <accordion_tab min_height="530" title="Group Notices" name="group_notices_tab" can_resize="false">
+ <panel class="panel_group_notices" filename="panel_group_notices.xml" name="group_notices_tab_panel"/>
+ </accordion_tab>
+ <accordion_tab min_height="270" title="Group Land Money" name="group_land_tab" can_resize="false">
+ <panel class="panel_group_land_money" filename="panel_group_land_money.xml" name="group_land_tab_panel"/>
+ </accordion_tab>
+ </accordion>
+
+
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
index b96421ca2f..c52994b43d 100644
--- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
@@ -2,7 +2,7 @@
<panel
border="true"
follows="all"
- height="514"
+ height="420"
label="Land &amp; L$"
layout="topleft"
left="1"
@@ -281,7 +281,7 @@
bg_readonly_color="0.784314 0.819608 0.8 1"
follows="all"
font="Monospace"
- height="150"
+ height="180"
layout="topleft"
left="8"
max_length="4096"
diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml
index dd6cd8c95e..132c06d028 100644
--- a/indra/newview/skins/default/xui/en/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
border="true"
- height="530"
+ height="380"
label="Members &amp; Roles"
layout="topleft"
left="1"
name="roles_tab"
- top="530"
width="280">
<panel.string
name="default_needs_apply_text">
@@ -31,7 +30,7 @@
-->
<panel
follows="left|top"
- height="24"
+ height="80"
layout="topleft"
left="10"
name="members_header"
@@ -174,7 +173,7 @@
left_delta="0"
name="roles_tab_container"
tab_position="top"
- top="70"
+ top="80"
width="265">
<panel
border="true"
@@ -185,6 +184,7 @@
name="members_sub_tab"
tool_tip="Members"
top="16"
+ class="panel_group_members_subtab"
width="265">
<panel.string
name="help_text">
@@ -279,6 +279,7 @@ clicking on their names.
layout="topleft"
left_delta="0"
name="roles_sub_tab"
+ class="panel_group_roles_subtab"
top_delta="0"
width="265">
<panel.string
@@ -384,6 +385,7 @@ including the Everyone and Owner Roles.
layout="topleft"
left_delta="0"
name="actions_sub_tab"
+ class="panel_group_actions_subtab"
top_delta="0"
width="265">
<panel.string
diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index 4904a0d40a..8d90c6ebf0 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -8,118 +8,124 @@
layout="topleft"
name="navigation_bar"
width="600">
- <button
- follows="left|top"
- font="SansSerifSmall"
- height="23"
- image_disabled="PushButton_Disabled"
- image_disabled_selected="PushButton_Disabled"
- image_overlay="Arrow_Left_Off"
- image_selected="PushButton_Selected"
- image_unselected="PushButton_Off"
- hover_glow_amount="0.15"
- layout="topleft"
- left="10"
- name="back_btn"
- picture_style="true"
- tool_tip="Go back to previous location"
- top="8"
- width="31" />
-
- <button
- follows="left|top"
- font="SansSerifSmall"
- height="23"
- image_disabled="PushButton_Disabled"
- image_disabled_selected="PushButton_Disabled"
- image_overlay="Arrow_Right_Off"
- image_selected="PushButton_Selected"
- image_unselected="PushButton_Off"
- hover_glow_amount="0.15"
- layout="topleft"
- left_pad="0"
- name="forward_btn"
- picture_style="true"
- tool_tip="Go forward one location"
- top_delta="0"
- width="31" />
- <button
- follows="left|top"
- font="SansSerifSmall"
- height="23"
- image_disabled="PushButton_Disabled"
- image_disabled_selected="PushButton_Disabled"
- image_overlay="Home_Off"
- image_selected="PushButton_Selected"
- image_unselected="PushButton_Off"
- hover_glow_amount="0.15"
- layout="topleft"
- left_pad="7"
- name="home_btn"
- picture_style="true"
- tool_tip="Teleport to your home location"
- top_delta="0"
- width="32" />
- <location_input
- follows="left|right|top"
- halign="right"
- height="22"
- label="Location"
- layout="topleft"
- left_pad="7"
- max_chars="254"
- mouse_opaque="false"
- name="location_combo"
- top_delta="0"
- width="266">
- <!-- *TODO: Delete. Let the location_input use the correct art sizes.
- <location_input.add_landmark_button
- height="18"
- name="location_combo_add"
- width="20" />
- <location_input.info_button
- height="18"
- name="location_combo_info"
- width="20" />
- -->
- </location_input>
-
-<!-- <button -->
-<!-- follows="right|top" -->
-<!-- height="20" -->
-<!-- image_disabled="TextField_Search_Off" -->
-<!-- image_disabled_selected="TextField_Search_Off" -->
-<!-- image_hover_selected="TextField_Search_Off" -->
-<!-- image_hover_unselected="TextField_Search_Off" -->
-<!-- image_selected="TextField_Search_Off" -->
-<!-- image_unselected="TextField_Search_Off" -->
-<!-- layout="topleft" -->
-<!-- left_pad="5" -->
-<!-- mouse_opaque="false" -->
-<!-- name="search_bg" -->
-<!-- picture_style="true" -->
-<!-- top_delta="0" -->
-<!-- width="168" /> -->
-
- <search_editor
- bevel_style="none"
- border_style="line"
- border.border_thickness="0"
- commit_on_focus_lost="false"
- follows="right|top"
- halign="right"
- height="22"
- label="Search All"
- layout="topleft"
- left_pad="7"
- mouse_opaque="false"
- name="search_input"
- tool_tip="Search All"
- top_delta="0"
- width="200" />
-
-
-
+ <panel
+ background_visible="false"
+ follows="left|top|right"
+ height="60"
+ layout="topleft"
+ name="navigation_panel"
+ width="600">
+ <button
+ follows="left|top"
+ font="SansSerifSmall"
+ height="23"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_overlay="Arrow_Left_Off"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ hover_glow_amount="0.15"
+ layout="topleft"
+ left="10"
+ name="back_btn"
+ picture_style="true"
+ tool_tip="Go back to previous location"
+ top="3"
+ width="31" />
+
+ <button
+ follows="left|top"
+ font="SansSerifSmall"
+ height="23"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_overlay="Arrow_Right_Off"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ hover_glow_amount="0.15"
+ layout="topleft"
+ left_pad="0"
+ name="forward_btn"
+ picture_style="true"
+ tool_tip="Go forward one location"
+ top_delta="0"
+ width="31" />
+ <button
+ follows="left|top"
+ font="SansSerifSmall"
+ height="23"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_overlay="Home_Off"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ hover_glow_amount="0.15"
+ layout="topleft"
+ left_pad="7"
+ name="home_btn"
+ picture_style="true"
+ tool_tip="Teleport to your home location"
+ top_delta="0"
+ width="32" />
+ <location_input
+ follows="left|right|top"
+ halign="right"
+ height="22"
+ label="Location"
+ layout="topleft"
+ left_pad="7"
+ max_chars="254"
+ mouse_opaque="false"
+ name="location_combo"
+ top_delta="0"
+ width="266">
+ <!-- *TODO: Delete. Let the location_input use the correct art sizes.
+ <location_input.add_landmark_button
+ height="18"
+ name="location_combo_add"
+ width="20" />
+ <location_input.info_button
+ height="18"
+ name="location_combo_info"
+ width="20" />
+ -->
+ </location_input>
+
+ <!-- <button -->
+ <!-- follows="right|top" -->
+ <!-- height="20" -->
+ <!-- image_disabled="TextField_Search_Off" -->
+ <!-- image_disabled_selected="TextField_Search_Off" -->
+ <!-- image_hover_selected="TextField_Search_Off" -->
+ <!-- image_hover_unselected="TextField_Search_Off" -->
+ <!-- image_selected="TextField_Search_Off" -->
+ <!-- image_unselected="TextField_Search_Off" -->
+ <!-- layout="topleft" -->
+ <!-- left_pad="5" -->
+ <!-- mouse_opaque="false" -->
+ <!-- name="search_bg" -->
+ <!-- picture_style="true" -->
+ <!-- top_delta="0" -->
+ <!-- width="168" /> -->
+
+ <search_editor
+ bevel_style="none"
+ border_style="line"
+ border.border_thickness="0"
+ commit_on_focus_lost="false"
+ follows="right|top"
+ halign="right"
+ height="22"
+ label="Search All"
+ layout="topleft"
+ left_pad="7"
+ mouse_opaque="false"
+ name="search_input"
+ tool_tip="Search All"
+ top_delta="0"
+ width="200" />
+ </panel>
+
<favorites_bar
follows="left|right|top"
height="25"
diff --git a/indra/newview/skins/default/xui/en/panel_notes.xml b/indra/newview/skins/default/xui/en/panel_notes.xml
index a0ac9df8a5..e616389c36 100644
--- a/indra/newview/skins/default/xui/en/panel_notes.xml
+++ b/indra/newview/skins/default/xui/en/panel_notes.xml
@@ -1,205 +1,121 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- follows="top|left|right|bottom"
bevel_style="in"
- height="625"
- label="Notes and Privacy"
+ follows="left|top|right|bottom"
+ height="570"
+ width="295"
+ border="false"
layout="topleft"
- left="10"
- name="panel_notes"
- top="10"
- width="305">
+ left="0"
+ top="0"
+ label="Notes &amp; Privacy"
+ name="panel_notes">
<scroll_container
- left="8"
- width="260"
- height="570"
+ color="DkGray2"
follows="left|top|right|bottom"
+ height="570"
+ width="265"
layout="topleft"
- name="profile_scroll"
+ left="5"
+ top_pad="0"
+ bevel_style="in"
opaque="true"
- color="DkGray2"
+ name="profile_scroll"
reserve_scroll_corner="false">
- <panel
- layout="topleft"
- width="260"
- height="530"
- left="0"
- follows="left|right"
- top="0">
- <!-- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerifHugeBold"
- height="20"
- layout="topleft"
- left="10"
- name="pick_title"
- text_color="white"
- top="10"
- width="250"
- word_wrap="true">
- Private Notes
- </text>-->
<text
type="string"
length="1"
follows="left|top"
font="SansSerifBold"
- height="15"
- layout="topleft"
- left="10"
+ height="16"
+ width="225"
+ left="0"
name="status_message"
- text_color="White"
- top="20"
- width="260">
- Your private notes:
+ text_color="white"
+ top="">
+ My private notes:
</text>
<text_editor
- bg_focus_color="LtGray"
- bg_writeable_color="LtGray"
- follows="left|right"
- font="SansSerif"
height="200"
+ follows="left|top"
+ width="243"
hide_scrollbar="true"
- layout="topleft"
left="10"
max_length="1000"
name="notes_edit"
text_color="black"
top_pad="10"
- width="240"
word_wrap="true" />
- <!-- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerifHugeBold"
- height="20"
- layout="topleft"
- left="10"
- name="pick_title2"
- text_color="white"
- top_pad="10"
- width="250"
- word_wrap="true">
- Private Settings
- </text> -->
<text
type="string"
length="1"
follows="left|top"
font="SansSerifBold"
- height="15"
- layout="topleft"
+ height="16"
+ width="225"
left="10"
name="status_message2"
text_color="white"
- top_pad="30"
- width="260">
- Allow this user to:
+ top_pad="30">
+ Let this person:
</text>
<check_box
enabled="false"
follows="left|top"
- font="SansSerif"
+ width="230"
height="20"
label="See my online status"
- layout="topleft"
- left="10"
- name="status_check"
- text_disabled_color="0.1 0.1 0.1 1"
- text_enabled_color="white"
+ left="20"
top_pad="10"
- width="260" />
+ name="status_check" />
<check_box
enabled="false"
follows="left|top"
- font="SansSerif"
+ width="230"
height="20"
label="See me on the map"
- layout="topleft"
- left="10"
- name="map_check"
- text_disabled_color="0.1 0.1 0.1 1"
- text_enabled_color="white"
+ left="20"
top_pad="10"
- width="260" />
+ name="map_check"/>
<check_box
enabled="false"
follows="left|top"
- font="SansSerif"
+ width="230"
height="20"
label="Edit, delete or take my objects"
- layout="topleft"
- left="10"
- name="objects_check"
- text_disabled_color="0.1 0.1 0.1 1"
- text_enabled_color="white"
+ left="20"
top_pad="10"
- width="260" />
- </panel>
+ name="objects_check" />
</scroll_container>
<panel
- layout="topleft"
- follows="bottom"
+ follows="bottom|left"
height="30"
- left="8"
- name="notes_buttons_panel"
- bottom="625"
- width="280">
- <button
- follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
- label="Add Friend"
- layout="topleft"
- left="0"
- mouse_opaque="false"
- name="add_friend"
- top="0"
- width="90" />
- <button
- follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
- label="IM"
- layout="topleft"
- left_pad="0"
- name="im"
- top="0"
- width="40" />
- <button
- follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
- label="Call"
- layout="topleft"
- left_pad="0"
- name="call"
- top="0"
- width="50"
- enabled="false"/>
+ width="280"
+ layout="topleft"
+ left="10"
+ top_pad="5"
+ name="notes_buttons_panel">
<button
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
label="Teleport"
layout="topleft"
- left_pad="0"
- name="teleport"
+ left="0"
+ name="teleport_btn"
+ enabled="false"
top="0"
width="75" />
<button
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
- label="Share"
+ label="Show on Map"
layout="topleft"
left_pad="0"
- name="share"
+ name="show_on_map_btn"
+ enabled="false"
top="0"
- width="60"
- enabled="false"/>
+ width="105" />
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index 6b3f5eaee1..bccc04e30c 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -1,28 +1,30 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
layout="topleft"
+ font="SansSerifBigBold"
top="0"
left="0"
width="305"
height="465"
- follows="left|top|right|bottom"
- background_visible="true"
+ follows="left|top|right|bottom"
+ background_visible="true"
+ bg_alpha_color="DkGray2"
+ bevel_style="in"
label="People"
name="people_panel">
<filter_editor
layout="topleft"
top="3"
- left="15"
- width="270"
- height="20"
+ left="10"
+ width="256"
+ height="23"
follows="left|top|right"
max_length="270"
- label="Filter People"
name="filter_input"
font="SansSerif"
background_image="TextField_Search_Off"
text_pad_left="23"
- text_color="black"/>
+ text_color="black" />
<button
name="people_search"
layout="topleft"
@@ -39,8 +41,8 @@
<tab_container
layout="topleft"
top="30"
- left="10"
- width="280"
+ left="10"
+ width="295"
height="400"
follows="left|top|right|bottom"
name="tabs"
@@ -50,8 +52,8 @@
height="390"
width="280"
follows="left|top|right|bottom"
- background_visible="true"
- bevel_style="bright"
+ background_visible="false"
+ bevel_style="none"
label="Nearby"
name="nearby_panel">
<avatar_list
@@ -62,7 +64,7 @@
height="357"
follows="left|top|right|bottom"
name="avatar_list"
- volume_column_width="20"/>
+ volume_column_width="20"/>
<panel
layout="topleft"
bottom="390"
@@ -71,7 +73,7 @@
height="30"
follows="left|right|bottom"
background_visible="true"
- bevel_style="bright"
+ bevel_style="none"
label="bottom_panel"
name="bottom_panel">
<button
@@ -96,7 +98,7 @@
width="280"
follows="left|top|right|bottom"
background_visible="true"
- bevel_style="bright"
+ bevel_style="none"
label="Friends"
name="friends_panel">
<avatar_list
@@ -115,7 +117,7 @@
height="30"
follows="left|right|bottom"
background_visible="true"
- bevel_style="in"
+ bevel_style="none"
label="bottom_panel"
name="bottom_panel">
<button
@@ -163,10 +165,10 @@
<panel
layout="topleft"
height="390"
- width="280"
+ width="280"
follows="left|top|right|bottom"
background_visible="true"
- bevel_style="bright"
+ bevel_style="none"
label="Groups"
name="groups_panel">
<group_list
@@ -185,7 +187,7 @@
height="30"
follows="left|right|bottom"
background_visible="true"
- bevel_style="in"
+ bevel_style="none"
label="bottom_panel"
name="bottom_panel">
<button
@@ -240,7 +242,7 @@
hover_glow_amount="0.15"
image_selected="TrashItem_Press"
image_unselected="TrashItem_Off"
- picture_style="true"/>
+ picture_style="true"/>
</panel>
</panel>
<panel
@@ -249,8 +251,8 @@
width="280"
follows="left|top|right|bottom"
background_visible="true"
- bevel_style="bright"
- label="Recent"
+ bevel_style="none"
+ label="History"
name="recent_panel">
<avatar_list
layout="topleft"
@@ -268,7 +270,7 @@
height="30"
follows="left|right|bottom"
background_visible="true"
- bevel_style="in"
+ bevel_style="none"
label="bottom_panel"
name="bottom_panel">
<button
@@ -293,7 +295,7 @@
follows="left|right|bottom"
bottom="6"
left="6"
- width="280"
+ width="295"
height="27"
orientation="horizontal"
animate="false"
@@ -478,7 +480,7 @@
follows="top|right"
font="SansSerifSmallBold"/>
</layout_panel>
- </layout_stack>
+ </layout_stack>
<string name="no_people">
No people
</string>
@@ -491,4 +493,10 @@
<string name="no_groups">
No groups
</string>
+ <string name="people_filter_label">
+ Filter People
+ </string>
+ <string name="groups_filter_label">
+ Filter Groups
+ </string>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_pick_info.xml b/indra/newview/skins/default/xui/en/panel_pick_info.xml
index 393521f1d2..1425246540 100644
--- a/indra/newview/skins/default/xui/en/panel_pick_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_pick_info.xml
@@ -1,24 +1,13 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
+ follows="left|top|right|bottom"
bevel_style="in"
- height="660"
+ height="625"
+ width="280"
layout="topleft"
left="0"
name="panel_pick_info"
- top="0"
- width="305">
- <button
- follows="top|left"
- height="20"
- image_overlay="navbar_back.tga"
- image_selected="navbar_bg_button.tga"
- image_unselected="navbar_bg_button.tga"
- layout="topleft"
- left="10"
- name="back_btn"
- picture_style="true"
- top="5"
- width="20" />
+ top="0">
<text
type="string"
length="1"
@@ -33,15 +22,24 @@
width="150">
Pick Info
</text>
+ <button
+ follows="top|right"
+ right="-25"
+ top="10"
+ width="20"
+ height="20"
+ image_overlay="BackArrow_Off"
+ layout="topleft"
+ name="back_btn"
+ picture_style="true" />
<panel
follows="left|right|top|bottom"
- height="580"
+ min_height="300"
width="280"
layout="topleft"
background_visible="true"
bg_alpha_color="DkGray2"
left="10"
- right="-10"
top="30">
<texture_picker
enabled="false"
diff --git a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
index 1a06e2bb06..78bec6035f 100644
--- a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
@@ -1,63 +1,57 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- bg_alpha_color="0.4 0.4 0.4 1"
- bg_opaque_color="0.4 0.4 0.4 1"
- border="true"
- follows="top|left|right"
- height="80"
- layout="topleft"
+ border="false"
+ follows="top|left|right|bottom"
+ top="0"
left="0"
- name="picture_item"
- top="80"
- width="245">
+ height="100"
+ width="265"
+ name="picture_item">
<texture_picker
allow_no_texture="true"
default_image_name="None"
enabled="false"
follows="left|top"
- height="80"
+ height="100"
+ width="100"
layout="topleft"
- left="5"
+ left="10"
+ bottom_pad="10"
mouse_opaque="false"
name="picture"
tab_stop="false"
- top="7"
- width="70" />
+ top="10" />
<text
follows="top|left|right"
- font="SansSerif"
- height="20"
+ font="SansSerifTiny"
+ height="16"
layout="topleft"
- left="80"
+ left="120"
name="picture_name"
- text_color="black"
- top="5"
+ top="10"
+ text_color="white"
use_ellipses="true"
- width="150"/>
+ width="120" />
<text
follows="top|left|right"
- font="SansSerifSmall"
- height="40"
+ font="SansSerifTiny"
+ height="60"
+ width="140"
+ top_pad="0"
layout="topleft"
name="picture_descr"
- text_color="white"
- top="25"
use_ellipses="true"
- width="150"
word_wrap="true" />
<button
follows="top|right"
- height="20"
- image_disabled="navbar_bg_button.tga"
- image_disabled_selected="navbar_bg_button.tga"
- image_overlay="navbar_forward.tga"
- image_selected="navbar_bg_button.tga"
- image_unselected="navbar_bg_button.tga"
+ height="16"
+ image_selected="Info"
+ image_unselected="Info"
layout="topleft"
name="info_chevron"
picture_style="true"
- right="-5"
tab_stop="false"
- top="28"
- width="20" />
+ top="6"
+ left="233"
+ width="16" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml
index 5b66026f48..2be9f900da 100644
--- a/indra/newview/skins/default/xui/en/panel_picks.xml
+++ b/indra/newview/skins/default/xui/en/panel_picks.xml
@@ -2,78 +2,64 @@
<panel
bevel_style="in"
follows="left|top|right|bottom"
- height="625"
- label="Picks"
+ height="570"
+ width="295"
+ border="false"
layout="topleft"
left="0"
- name="panel_picks"
top="0"
- width="305">
- <!--<text
- type="string"
- length="1"
- follows="top|left|right"
- font="SansSerifHugeBold"
- height="50"
+ label="Picks"
+ name="panel_picks">
+ <scroll_container
+ color="DkGray2"
+ follows="left|top|right|bottom"
+ height="570"
+ width="265"
layout="topleft"
- left="10"
- name="pick_title"
- text_color="white"
- top="10"
- width="270"
- word_wrap="true">
- [NAME]&apos;s favorite places in Second Life...
- </text>-->
- <!-- below is a special title shown for the Agent on the "Picks" tab-->
+ left="5"
+ top_pad="0"
+ bevel_style="in"
+ opaque="true"
+ name="profile_scroll"
+ reserve_scroll_corner="false">
+<!-- below is a special title shown for the Agent on the "Picks" tab
<text
type="string"
length="1"
follows="top"
font="SansSerifBold"
height="35"
+ width="250"
layout="topleft"
left="10"
name="pick_title_agent"
text_color="white"
- top="10"
- visible="false"
- width="270"
+ top_pad="25"
+ visible="false"
word_wrap="true">
Tell everyone about your favorite Second Life places...
- </text>
- <scroll_container
- follows="left|top|right|bottom"
- height="495"
- layout="topleft"
- left="8"
- name="profile_scroll"
- opaque="true"
- color="DkGray2"
- reserve_scroll_corner="false"
- top_pad="0"
- width="260">
+ </text>-->
<panel
- bevel_style="in"
- height="40"
+ height="115"
+ width="265"
layout="topleft"
left="0"
name="back_panel"
- top="0"
- width="260" />
+ top="0" />
</scroll_container>
- <panel
+ <panel
background_visible="true"
- bevel_style="in"
+ bevel_style="none"
enabled="false"
follows="left|right|bottom"
- height="25"
+ height="30"
label="bottom_panel"
layout="topleft"
- left="8"
+ left="0"
name="edit_panel"
visible="false"
top_pad="0"
- width="260">
+ width="280">
<button
enabled="false"
follows="bottom|left"
@@ -123,29 +109,18 @@
<panel
follows="bottom|left"
height="30"
+ width="280"
layout="topleft"
- left="8"
- name="buttons_cucks"
- bottom="625"
- width="280">
- <button
- follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
- label="Info"
- layout="topleft"
- left="0"
- name="info_btn"
- enabled="false"
- top="0"
- width="60" />
+ left="10"
+ top_pad="5"
+ name="buttons_cucks">
<button
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
label="Teleport"
layout="topleft"
- left_pad="0"
+ left="0"
name="teleport_btn"
enabled="false"
top="0"
@@ -161,16 +136,5 @@
enabled="false"
top="0"
width="105" />
- <button
- enabled="false"
- follows="bottom|right"
- font="SansSerifSmallBold"
- height="25"
- label="Verb"
- layout="topleft"
- left_pad="0"
- name="verb_btn"
- top="0"
- width="60" />
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index 13efa7bcff..c154c5d21e 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -13,24 +13,15 @@
<!-- ADVANCED -->
- <check_box
- control_name="SmallAvatarNames"
- height="16"
- initial_value="true"
- label="Small Avatar Names"
- layout="topleft"
- left_delta="30"
- name="small_avatar_names_checkbox"
- top="20"
- width="200" />
+
<check_box
control_name="ArrowKeysMoveAvatar"
height="16"
label="Arrow keys always move avatar when chatting"
layout="topleft"
- left_delta="0"
+ left_delta="30"
name="arrow_keys_move_avatar_check"
- top_pad="10"
+ top="20"
width="237" />
<text
type="string"
@@ -253,6 +244,17 @@
name="first_person_avatar_visible"
top_delta="0"
width="256" />
+
+ <check_box
+ control_name="UseChatBubbles"
+ height="16"
+ label="Show chat bubbles"
+ layout="topleft"
+ left="30"
+ name="bubble_text_chat"
+ top_pad="5"
+ width="400" />
+
</panel> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index 89d96b015f..f4696152f9 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -278,15 +278,6 @@
top_pad="40"
width="400" />
<check_box
- control_name="UseChatBubbles"
- height="16"
- label="Show chat bubbles"
- layout="topleft"
- left_delta="0"
- name="bubble_text_chat"
- top_pad="5"
- width="400" />
- <check_box
enabled="false"
height="16"
label="Email me IMs when I'm offline"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
index 2d42757150..95d8d2ce2a 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
@@ -263,13 +263,23 @@
name="show_my_name_checkbox"
top_pad="5"
width="300" />
+ <check_box
+ control_name="SmallAvatarNames"
+ height="16"
+ initial_value="true"
+ label="Small name tags"
+ layout="topleft"
+ left_delta="175"
+ name="small_avatar_names_checkbox"
+ top_delta="0"
+ width="200" />
<check_box
enabled_control="AvatarNameTagMode"
control_name="RenderShowGroupTitleAll"
height="16"
label="Show group titles"
layout="topleft"
- left_delta="0"
+ left_delta="-175"
name="show_all_title_checkbox"
top_pad="5"
width="300" />
diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml
index 2b21c05283..2a49db8d4f 100644
--- a/indra/newview/skins/default/xui/en/panel_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile.xml
@@ -2,21 +2,22 @@
<panel
bevel_style="in"
follows="left|top|right|bottom"
- height="625"
- label="Profile"
+ height="570"
+ width="295"
+ border="false"
layout="topleft"
- left="10"
+ left="0"
+ top="0"
+ label="Profile"
mouse_opaque="false"
- name="panel_profile"
- top="10"
- width="305">
+ name="panel_profile">
<panel.string
name="CaptionTextAcctInfo">
[ACCTTYPE] [PAYMENTINFO] [AGEVERIFICATION]
</panel.string>
<panel.string
name="AcctTypeResident">
- Resident.
+ Resident
</panel.string>
<panel.string
name="AcctTypeTrial">
@@ -70,51 +71,41 @@
color="DkGray2"
follows="left|top|right|bottom"
height="570"
+ width="265"
layout="topleft"
- left="8"
- name="profile_scroll"
+ left="5"
+ top_pad="0"
+ border="false"
opaque="true"
- reserve_scroll_corner="false"
- width="260">
+ name="profile_scroll"
+ reserve_scroll_corner="false">
<panel
- height="680"
+ height="300"
layout="topleft"
left="0"
top="0"
- width="280">
- <text
- type="string"
- follows="top|left|right"
- font="SansSerifHugeBold"
- height="20"
- layout="topleft"
- left="9"
- name="user_name"
- text_color="white"
- top="0"
- mouse_opaque="true"
- width="250">
- (Loading...)
- </text>
+ bevel_style="in"
+ width="265">
<panel
follows="left|top"
height="100"
layout="topleft"
left="10"
+ bevel_style="in"
name="second_life_image_panel"
top="20"
- width="250">
+ width="230">
<texture_picker
allow_no_texture="true"
default_image_name="None"
enabled="false"
follows="top|left"
- height="100"
+ height="125"
layout="topleft"
left="0"
name="2nd_life_pic"
top="0"
- width="100" />
+ width="125" />
<text
type="string"
follows="left|top"
@@ -130,12 +121,12 @@
</text>
<text
type="string"
- top_pad="4"
+ left_pad="10"
+ top_pad="5"
follows="left|top|right"
font="SansSerifSmall"
- height="75"
+ height="125"
layout="topleft"
- left_delta="0"
name="sl_description_edit"
text_color="LtGray"
width="125"
@@ -147,7 +138,7 @@
follows="left|top"
height="100"
layout="topleft"
- left="10"
+ left="10"
name="first_life_image_panel"
top_pad="20"
width="125">
@@ -156,12 +147,12 @@
default_image_name="None"
enabled="false"
follows="top|left"
- height="100"
+ height="125"
layout="topleft"
left="0"
name="real_world_pic"
top_pad="0"
- width="100" />
+ width="125" />
<text
type="string"
follows="left|top"
@@ -179,9 +170,9 @@
type="string"
follows="left|top|right"
font="SansSerifSmall"
- height="45"
+ height="125"
layout="topleft"
- left_delta="0"
+ left_pad="10"
top_pad="10"
name="fl_description_edit"
text_color="LtGray"
@@ -190,63 +181,20 @@
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
</text>
</panel>
- <text
- type="string"
- follows="left|top"
- font="SansSerifBold"
- height="15"
- layout="topleft"
- halign="right"
- left="10"
- name="title_groups_text"
- text_color="white"
- top_pad="20"
- width="100">
- Groups:
- </text>
- <text
+ <link
type="string"
follows="left|top|right"
font="SansSerifSmall"
- height="45"
- layout="topleft"
- left_pad="10"
- top_delta="0"
- name="sl_groups"
- text_color="LtGray"
- width="125"
- word_wrap="true">
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
- </text>
- <text
- type="string"
- follows="left|top"
- font="SansSerifBold"
height="15"
- halign="right"
- layout="topleft"
- left="10"
- name="title_homepage_text"
- text_color="white"
top_pad="20"
- width="100">
- Homepage:
- </text>
- <text
- type="string"
- follows="left|top|right"
- font="SansSerifSmall"
- font.style="UNDERLINE"
- font_shadow="hard"
- height="15"
- top_delta="0"
layout="topleft"
- left_pad="10"
+ left="10"
name="homepage_edit"
- text_color="0.2 0.2 1 1"
- width="125">
+ text_color="HTMLLinkColor"
+ hover_color="0.5 0.4 1 1"
+ width="280">
TODO
- </text>
+ </link>
<text
type="string"
follows="left|top"
@@ -287,7 +235,7 @@
name="title_acc_status_text"
text_color="white"
width="100">
- Account status:
+ Status:
</text>
<text
type="string"
@@ -339,65 +287,88 @@
word_wrap="true">
[FIRST] [LAST]
</text>
- <text
+ <link
type="string"
follows="top|right"
font="SansSerifSmall"
- font.style="UNDERLINE"
- font_shadow="hard"
height="15"
layout="topleft"
left_delta="0"
name="partner_edit_link"
- text_color="0.2 0.2 1 1"
+ text_color="HTMLLinkColor"
+ hover_color="0.5 0.4 1 1"
top_delta="15"
width="40">
Edit
- </text>
+ </link>
</panel>
-
- <panel
+ <text
+ type="string"
+ follows="left|top"
+ font="SansSerifBold"
+ height="15"
+ layout="topleft"
+ halign="right"
+ left="10"
+ name="title_groups_text"
+ text_color="white"
+ top_pad="20"
+ width="100">
+ Groups:
+ </text>
+ <text
+ type="string"
+ follows="left|top|right|bottom"
+ font="SansSerifSmall"
+ height="120"
+ layout="topleft"
+ left_pad="10"
+ top_delta="0"
+ name="sl_groups"
+ text_color="LtGray"
+ width="125"
+ word_wrap="true">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
+ </text>
+ <!--panel
follows="left|top|right"
height="15"
layout="topleft"
left="50"
- top_pad="40"
+ top_pad="30"
name="account_actions_panel"
width="200">
- <text
+ <link
type="string"
follows="left|top"
font="SansSerif"
- font.style="UNDERLINE"
- font_shadow="hard"
height="15"
layout="topleft"
left="0"
name="payment_update_link"
- text_color="0.2 0.2 1 1"
+ text_color="HTMLLinkColor"
+ hover_color="0.5 0.4 1 1"
top="0"
width="100">
Update
- </text>
- <text
- type="string"
+ </link>
+ <link
follows="left|top"
font="SansSerif"
- font.style="UNDERLINE"
- font_shadow="hard"
height="15"
layout="topleft"
left="70"
name="my_account_link"
- text_color="0.2 0.2 1 1"
+ text_color="HTMLLinkColor"
+ hover_color="0.5 0.4 1 1"
top="0"
width="80">
My Account
- </text>
- </panel>
-
-
-
+ </link>
+ </panel-->
+
+
+
<!--
<panel
follows="left|top|right"
@@ -431,14 +402,14 @@
TBD
</text>
</panel> -->
- <panel
+ <!--panel
follows="left|top|right"
height="80"
layout="topleft"
left="0"
name="status_me_panel"
top_pad="20"
- width="250">
+ width="125">
<text
type="string"
follows="left|top"
@@ -499,25 +470,25 @@
name="status_me_message_edit"
select_on_focus="true"
text_color="0.5 0.5 0.5 1"
- width="250">
+ width="230">
Type a message about what you&apos;re doing in SL!
</line_editor>
+ </panel-->
+
+
+
+
</panel>
-
-
-
-
- </panel>
-
+
</scroll_container>
<panel
- bottom="625"
follows="bottom|left"
height="30"
+ width="280"
layout="topleft"
- left="8"
- name="profile_buttons_panel"
- width="280">
+ left="10"
+ top_pad="5"
+ name="profile_buttons_panel">
<button
follows="bottom|left"
font="SansSerifSmallBold"
@@ -560,7 +531,7 @@
name="teleport"
top="0"
width="75" />
- <button
+ <!-- <button
enabled="false"
follows="bottom|left"
font="SansSerifSmallBold"
@@ -570,17 +541,17 @@
left_pad="0"
name="share"
top="0"
- width="60" />
- </panel>
+ width="60" />-->
+ </panel>
<panel
- bottom="625"
follows="bottom|left"
height="30"
+ width="280"
layout="topleft"
- left="8"
- name="profile_me_buttons_panel"
+ left="10"
+ top_pad="5"
visible="false"
- width="345">
+ name="profile_me_buttons_panel">
<button
follows="bottom|left"
font="SansSerifSmallBold"
@@ -601,5 +572,5 @@
name="edit_appearance_btn"
top="0"
width="130" />
- </panel>
+ </panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml
index 2466480d16..a14d8bbc6b 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml
@@ -2,63 +2,76 @@
<panel
background_visible="true"
follows="left|top|right|bottom"
- height="660"
+ width="305"
+ height="650"
label="Profile"
+ bevel_style="in"
layout="topleft"
left="0"
name="panel_target_profile"
- top="0"
- width="250">
- <button
- layout="topleft"
- name="back"
- left="5"
- top="5"
- width="20"
- height="20"
- label=""
- tab_stop="false"
- follows="top|left"
- image_selected="navbar_bg_button.tga"
- image_unselected="navbar_bg_button.tga"
- image_overlay="navbar_back.tga"/>
- <text
- layout="topleft"
- top="0"
- left_pad="15"
- width="125"
- height="20"
- font="SansSerifHugeBold"
- text_color="white"
+ top="0">
+ <text
+ layout="topleft"
+ top="0"
+ left="10"
+ width="250"
+ height="20"
+ font="SansSerifHugeBold"
+ text_color="white"
follows="top|left|right"
- mouse_opaque="true"
+ mouse_opaque="true"
name="user_name">(Loading...)</text>
+ <text
+ layout="topleft"
+ width="100"
+ height="16"
+ left="10"
+ top_pad="5"
+ font="SansSerifTiny"
+ text_color="LtGray_50"
+ follows="top|left"
+ mouse_opaque="true"
+ name="status">Online</text>
+ <button
+ layout="topleft"
+ name="back"
+ right="-10"
+ top="0"
+ width="25"
+ height="25"
+ label=""
+ tab_stop="false"
+ follows="top|right"
+ image_selected=""
+ image_unselected=""
+ image_overlay="BackArrow_Off" />
<tab_container
follows="left|top|right|bottom"
- height="625"
+ height="550"
+ width="306"
+ tab_min_width="75"
layout="topleft"
- left="0"
+ left="10"
name="tabs"
tab_position="top"
- top="35"
- width="280">
+ top_pad="20">
<panel
class="panel_profile"
filename="panel_profile.xml"
label="Profile"
layout="topleft"
- name="panel_profile"/>
+ name="panel_profile" />
<panel
class="panel_picks"
filename="panel_picks.xml"
label="Picks"
layout="topleft"
- name="panel_picks"/>
+ name="panel_picks" />
<panel
class="panel_notes"
filename="panel_notes.xml"
- label="Notes"
+ label="Notes &amp; Privacy"
layout="topleft"
- name="panel_notes"/>
+ name="panel_notes" />
</tab_container>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_side_tray.xml b/indra/newview/skins/default/xui/en/panel_side_tray.xml
index 8953633276..58be74a598 100644
--- a/indra/newview/skins/default/xui/en/panel_side_tray.xml
+++ b/indra/newview/skins/default/xui/en/panel_side_tray.xml
@@ -50,9 +50,16 @@
filename="panel_profile_view.xml"
border="true"
/>
+ <panel
+ class="panel_group_info_sidetray"
+ name="panel_group_info_sidetray"
+ filename="panel_group_info_sidetray.xml"
+ label="Group Info"
+ border="true"
+ />
+
</panel_container>
</sidetray_tab>
- <!-- *TODO Vadim: isn't the sidetray_tab "label" attribute redundant since we have "tab_title" ? -->
<sidetray_tab
name="sidebar_places"
tab_title="Places"
@@ -67,7 +74,7 @@
class="panel_places"
name="panel_places"
filename="panel_places.xml"
- label="Places"
+ label="Places"
border="true"
/>
</sidetray_tab>
@@ -82,94 +89,14 @@
bg_opaque_color="0.5 0.5 0.5 1.0"
>
<panel
- class="panel_me_profile"
+ class="panel_me_profile_view"
name="panel_me_profile"
filename="panel_me_profile.xml"
label="Me"
border="true"
/>
</sidetray_tab>
-
<!--
- <sidetray_tab
- name="sidebar_group"
- mouse_opaque="false"
- background_visible="true"
- bg_opaque_color="0.5 0.5 0.5 1.0"
- image="icn_voice-groupfocus.tga"
- tab_title="Groups"
- description="Manage Groups."
- >
- <accordion_tab
- name="group_accordion"
- title="Group General"
- expanded="true"
- collapsible="true"
- min_width="200"
- min_height="200"
- header_visible="true"
- >
- <panel
- class="panel_group_general"
- name="panel_group_general"
- filename="panel_group_general.xml"
- label="Group"
- border="true"
- />
- </accordion_tab>
- <accordion_tab
- name="groupland_accordion"
- title="Group Land and Money"
- expanded="false"
- collapsible="true"
- min_width="200"
- min_height="200"
- header_visible="true"
- >
- <panel
- class="panel_group_land"
- name="panel_group_land"
- filename="panel_group_land_money.xml"
- label="Group"
- border="true"
- />
- </accordion_tab>
- <accordion_tab
- name="groupnotices_accordion"
- title="Group Notices"
- expanded="false"
- collapsible="true"
- min_width="200"
- min_height="200"
- header_visible="true"
- >
- <panel
- class="panel_group_roles"
- name="panel_group_roles"
- filename="panel_group_roles.xml"
- label="Group"
- border="true"
- />
- </accordion_tab>
- <accordion_tab
- name="grouproles_accordion"
- title="Group Roles"
- expanded="false"
- collapsible="true"
- min_width="200"
- min_height="200"
- header_visible="true"
- >
- <panel
- class="panel_group_roles"
- name="panel_group_roles"
- filename="panel_group_roles.xml"
- label="Group"
- border="true"
- />
- </accordion_tab>
- </sidetray_tab>
-
<sidetray_tab
name="sidebar_previews"
@@ -659,5 +586,25 @@
</sidetray_tab>
-->
+
+ <sidetray_tab
+ name="sidebar_appearance"
+ tab_title="Appearance"
+ description="Change your looks and appearance."
+ image="TabIcon_Appearance_Off"
+ mouse_opaque="false"
+ background_opaque="false"
+ background_visible="true"
+ bg_opaque_color="0.5 0.5 0.5 1.0"
+ >
+ <panel
+ class="panel_appearance"
+ name="panel_appearance"
+ filename="panel_appearance.xml"
+ border="true"
+ />
+ </sidetray_tab>
+
+
</side_tray>
diff --git a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
index a85662603d..f10161cecd 100644
--- a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
+++ b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
@@ -85,6 +85,31 @@
mouse_opaque="false" name="tab_description" >
Change your profile, your look and quick links to your outfits.
</text>
+ </panel>
+ <panel
+ left="10" width="280" height="130"
+ background_visible="true"
+ background_opaque="false"
+ bg_alpha_color="0.3 0.3 0.3 1.0"
+ name="sidebar_appearance"
+ follows="left|top|right"
+ class="panel_sidetray_home_info">
+ <text
+ top="-10" width="200" left="5" height="30" follows="left|right|top"
+ font="SansSerifHugeBold" text_color="white" word_wrap="true"
+ mouse_opaque="false" name="tab_name" >
+ Appearance
+ </text>
+ <icon
+ top="-10" right="-10" width="20" height="20" follows="top|right"
+ color="1 1 1 1" enabled="true" image_name="inv_item_shirt.tga"
+ mouse_opaque="false" name="tab_icon"/>
+ <text
+ top="-40" left="10" right="-10" height="120" follows="left|right|bottom"
+ font="SansSerifBig" text_color="white" word_wrap="true"
+ mouse_opaque="false" name="tab_description" >
+ Change your appearance.
+ </text>
</panel>
</panel>
\ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index 9bf401d817..82b7e02aeb 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -35,6 +35,10 @@
name="timeTooltip">
[weekday, datetime, slt], [day, datetime, slt] [month, datetime, slt] [year, datetime, slt]
</panel.string>
+ <panel.string
+ name="buycurrencylabel">
+ L$ [AMT]
+ </panel.string>
<button
auto_resize="true"
follows="right|bottom"
diff --git a/indra/newview/skins/default/xui/en/panel_sys_well_item.xml b/indra/newview/skins/default/xui/en/panel_sys_well_item.xml
new file mode 100644
index 0000000000..eccb919b04
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_sys_well_item.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<!-- All our XML is utf-8 encoded. -->
+
+<panel
+ name="sys_well_item"
+ title="sys_well_item"
+ visible="false"
+ top="0"
+ left="0"
+ width="318"
+ height="35"
+ layout="topleft"
+ follows="top"
+ background_opaque="false"
+ background_visible="true"
+ bg_alpha_color="0.0 0.0 0.0 0.0" >
+
+ <icon
+ top="8"
+ left="8"
+ width="20"
+ height="20"
+ layout="topleft"
+ follows="left"
+ name="icon"
+ label=""
+ mouse_opaque="false"
+ image_name="lag_status_warning.tga"
+ />
+
+ <text
+ top="2"
+ left_pad="8"
+ width="255"
+ height="28"
+ layout="topleft"
+ follows="right|left"
+ font="SansSerifBold"
+ text_color="white"
+ use_ellipses="true"
+ word_wrap="true"
+ mouse_opaque="false"
+ name="title" >
+ Select your streaming media preference. Select your streaming media preference.
+ </text>
+
+ <button
+ top="5"
+ left_pad="5"
+ width="15"
+ height="15"
+ layout="topleft"
+ follows="right"
+ name="close_btn"
+ mouse_opaque="true"
+ label=""
+ image_unselected="toast_hide_btn.tga"
+ image_disabled="toast_hide_btn.tga"
+ image_selected="toast_hide_btn.tga"
+ image_hover_selected="toast_hide_btn.tga"
+ image_disabled_selected="toast_hide_btn.tga"
+ />
+
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml
index ba4915e074..f7d8cf948e 100644
--- a/indra/newview/skins/default/xui/en/panel_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_toast.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!-- All our XML is utf-8 encoded. -->
-<panel
+<floater
name="toast"
- title="toast"
+ title=""
visible="false"
layout="topleft"
width="350"
@@ -14,6 +14,12 @@
background_opaque="true"
background_visible="true"
bevel_style="in"
+ can_minimize="false"
+ can_tear_off="false"
+ can_resize="false"
+ can_drag_on_left="false"
+ can_close="false"
+ can_dock="false"
bg_alpha_color="0.3 0.3 0.3 1.0">
<text
@@ -62,4 +68,4 @@
image_hover_selected="toast_hide_btn.tga"
image_disabled_selected="toast_hide_btn.tga"
/>
-</panel>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index bc364687e9..0ed473a01a 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -320,7 +320,14 @@
<string name="GroupNotifyViewPastNotices">View past notices or opt-out of receiving these messages here.</string>
<string name="GroupNotifyOpenAttachment">Open Attachment</string>
<string name="GroupNotifySaveAttachment">Save Attachment</string>
-
+ <string name="TeleportOffer">Teleport offering</string>
+ <!-- start-up toast's string-->
+ <string name="StartUpNotification">%d new notification arrived while you were away...</string>
+ <string name="StartUpNotifications">%d new notifications arrived while you were away...</string>
+ <!-- overflow toast's string-->
+ <string name="OverflowInfoChannelString">You have %d more notification</string>
+
+
<!-- body parts -->
<string name="BodyPartsRightArm">Right Arm</string>
<string name="BodyPartsHead">Head</string>
@@ -402,6 +409,8 @@ this texture in your inventory
<string name="InvFolder Animations">Animations</string>
<string name="InvFolder Gestures">Gestures</string>
<string name="InvFolder favorite">Favorites</string>
+ <string name="InvFolder Current Outfit">Current Outfit</string>
+ <string name="InvFolder My Outfits">My Outfits</string>
<!-- inventory FVBridge -->
<string name="Buy">Buy</string>
@@ -733,7 +742,195 @@ If you continue to receive this message, contact customer support.
If you continue to receive this message, contact customer support.
</string>
- <!-- Group Information -->
-
-
+ <!-- Avatar Shape Information -->
+ <string name="Attached Earlobes">Attached Earlobes</string>
+ <string name="Arm Length">Arm Length</string>
+ <string name="Back Bangs Down">Back Bangs Down</string>
+ <string name="Back Bangs Up">Back Bangs Up</string>
+ <string name="Back Hair Down">Back Hair Down</string>
+ <string name="Back Hair Up">Back Hair Up</string>
+ <string name="Belly Size">Belly Size</string>
+ <string name="Blonde Hair">Blonde Hair</string>
+ <string name="Big Eyeball">Big Eyeball</string>
+ <string name="Big Hair Back">Big Hair Back</string>
+ <string name="Big Hair Front">Big Hair Front</string>
+ <string name="Big Hair Top">Big Hair Top</string>
+ <string name="Body Fat">Body Fat</string>
+ <string name="Body Thickness">Body Thickness</string>
+ <string name="Breast Buoyancy">Breast Buoyancy</string>
+ <string name="Breast Cleavage">Breast Cleavage</string>
+ <string name="Breast Size">Breast Size</string>
+ <string name="Bridge Width">Bridge Width</string>
+ <string name="Brow Size">Brow Size</string>
+ <string name="Butt Size">Butt Size</string>
+ <string name="Cheek Bones">Cheek Bones</string>
+ <string name="Chest Size">Chest Size</string>
+ <string name="Chin Angle">Chin Angle</string>
+ <string name="Chin Cleft">Chin Cleft</string>
+ <string name="Chin Depth">Chin Depth</string>
+ <string name="Chin-Neck">Chin-Neck</string>
+ <string name="Collar Back">Collar Back</string>
+ <string name="Collar Front">Collar Front</string>
+ <string name="Crooked Nose">Crooked Nose</string>
+ <string name="Cuff Flare">Cuff Flare</string>
+ <string name="Ear Angle">Ear Angle</string>
+ <string name="Ear Size">Ear Size</string>
+ <string name="Ear Tips">Ear Tips</string>
+ <string name="Egg Head">Egg Head</string>
+ <string name="Eye Bags">Eye Bags</string>
+ <string name="Eye Color">Eye Color</string>
+ <string name="Eye Depth">Eye Depth</string>
+ <string name="Eye Lightness">Eye Lightness</string>
+ <string name="Eye Opening">Eye Opening</string>
+ <string name="Eye Pop">Eye Pop</string>
+ <string name="Eye Size">Eye Size</string>
+ <string name="Eye Spacing">Eye Spacing</string>
+ <string name="Eyeball Size">Eyeball Size</string>
+ <string name="Eyebrow Arc">Eyebrow Arc</string>
+ <string name="Eyebrow Height">Eyebrow Height</string>
+ <string name="Eyebrow Points">Eyebrow Points</string>
+ <string name="Eyelash Length">Eyelash Length</string>
+ <string name="Eyeliner">Eyeliner</string>
+ <string name="Eyeliner Color">Eyeliner Color</string>
+ <string name="Face Shear">Face Shear</string>
+ <string name="Facial Definitionr">Facial Definition</string>
+ <string name="Fat Head">Fat Head</string>
+ <string name="Fat Lower Lip">Fat Lower Lip</string>
+ <string name="Fat Torso">Fat Torso</string>
+ <string name="Fat Upper Lip">Fat Upper Lip</string>
+ <string name="Foot Size">Foot Size</string>
+ <string name="Freckles">Freckles</string>
+ <string name="Front Bangs Down">Front Bangs Down</string>
+ <string name="Front Bangs Up">Front Bangs Up</string>
+ <string name="Front Hair Down">Front Hair Down</string>
+ <string name="Front Hair Up">Front Hair Up</string>
+ <string name="Forehead Angle">Forehead Angle</string>
+ <string name="Full Hair Sides">Full Hair Sides</string>
+ <string name="Glove Fingers">Glove Fingers</string>
+ <string name="Glove Length">Glove Length</string>
+ <string name="Hair Thickess">Hair Thickess</string>
+ <string name="Hair Tilted Left">Hair Tilted Left</string>
+ <string name="Hair Tilted Right">Hair Tilted Right</string>
+ <string name="Hair Volume">Hair Volume</string>
+ <string name="Hand Size">Hand Size</string>
+ <string name="Head Length">Head Length</string>
+ <string name="Head Shape">Head Shape</string>
+ <string name="Head Size">Head Size</string>
+ <string name="Head Stretch">Head Stretch</string>
+ <string name="Heel Height">Heel Height</string>
+ <string name="Heel Shape">Heel Shape</string>
+ <string name="Height">Height</string>
+ <string name="Hip Width">Hip Width</string>
+ <string name="Hip Length">Hip Length</string>
+ <string name="Inner Eye Corner">Inner Eye Corner</string>
+ <string name="Jacket Length">Jacket Length</string>
+ <string name="Jacket Wrinkles">Jacket Wrinkles</string>
+ <string name="Jowls">Jowls</string>
+ <string name="Jaw Angle">Jaw Angle</string>
+ <string name="Jaw Jut">Jaw Jut</string>
+ <string name="Jaw Shape">Jaw Shape</string>
+ <string name="Knee Angle">Knee Angle</string>
+ <string name="Left Part">Left Part</string>
+ <string name="Leg Muscles">Leg Muscles</string>
+ <string name="Leg Length">Leg Length</string>
+ <string name="Lip Cleft">Lip Cleft</string>
+ <string name="Lip Cleft Depth">Lip Cleft Depth</string>
+ <string name="Lip Fullness">Lip Fullness</string>
+ <string name="Lip Pinkness">Lip Pinkness</string>
+ <string name="Lip Ratio">Lip Ratio</string>
+ <string name="Lip Thickness">Lip Thickness</string>
+ <string name="Lip Width">Lip Width</string>
+ <string name="Longcuffs">Longcuffs</string>
+ <string name="Love Handles">Love Handles</string>
+ <string name="Lower Bridge">Lower Bridge</string>
+ <string name="Lower Cheeks">Lower Cheeks</string>
+ <string name="Middle Part">Middle Part</string>
+ <string name="Mouth Corner">Mouth Corner</string>
+ <string name="Mouth Position">Mouth Position</string>
+ <string name="Nail Polish">Nail Polish</string>
+ <string name="Nail Polish Color">Nail Polish Color</string>
+ <string name="Neck Length">Neck Length</string>
+ <string name="Neck Thickness">Neck Thickness</string>
+ <string name="Nose Size">Nose Size</string>
+ <string name="Nose Thickness">Nose Thickness</string>
+ <string name="Nose Tip Angle">Nose Tip Angle</string>
+ <string name="Nose Tip Shape">Nose Tip Shape</string>
+ <string name="Nose Width">Nose Width</string>
+ <string name="Nostril Division">Nostril Division</string>
+ <string name="Nostril Width">Nostril Width</string>
+ <string name="Open Front">Open Front</string>
+ <string name="Outer Eye Corner">Outer Eye Corner</string>
+ <string name="Outer Shadow">Outer Shadow</string>
+ <string name="Out Shdw Opacity">Out Shdw Opacity</string>
+ <string name="Out Shdw Color">Out Shdw Color</string>
+ <string name="Package">Package</string>
+ <string name="Pants Crotch">Pants Crotch</string>
+ <string name="Pants Fit">Pants Fit</string>
+ <string name="Pants Length">Pants Length</string>
+ <string name="Pants Waist">Pants Waist</string>
+ <string name="Pants Wrinkles">Pants Wrinkles</string>
+ <string name="Part Bangs">Part Bangs</string>
+ <string name="Pectorals">Pectorals</string>
+ <string name="Platform Height">Platform Height</string>
+ <string name="Platform Width">Platform Width</string>
+ <string name="Pigment">Pigment</string>
+ <string name="Puffy Eyelids">Puffy Eyelids</string>
+ <string name="Rainbow Color">Rainbow Color</string>
+ <string name="Red Hair">Red Hair</string>
+ <string name="Right Part">Right Part</string>
+ <string name="Round Forehead">Round Forehead</string>
+ <string name="Rosy Complexion">Rosy Complexion</string>
+ <string name="Ruddiness">Ruddiness</string>
+ <string name="Rumpled Hair">Rumpled Hair</string>
+ <string name="Saddle Bags">Saddle Bags</string>
+ <string name="Scrawny Leg">Scrawny Leg</string>
+ <string name="Shear Back">Shear Back</string>
+ <string name="Shear Face">Shear Face</string>
+ <string name="Shear Front">Shear Front</string>
+ <string name="Shift Mouth">Shift Mouth</string>
+ <string name="Shirt Bottom">Shirt Bottom</string>
+ <string name="Shirt Fit">Shirt Fit</string>
+ <string name="Shirt Wrinkles">Shirt Wrinkles</string>
+ <string name="Shoe Height">Shoe Height</string>
+ <string name="Shoulders">Shoulders</string>
+ <string name="Side Bangs Down">Side Bangs Down</string>
+ <string name="Side Bangs Up">Side Bangs Up</string>
+ <string name="Sides Hair Down">Sides Hair Down</string>
+ <string name="Sides Hair Up">Sides Hair Up</string>
+ <string name="Skirt Fit">Skirt Fit</string>
+ <string name="Skirt Length">Skirt Length</string>
+ <string name="Slanted Forehead">Slanted Forehead</string>
+ <string name="Sleeve Length">Sleeve Length</string>
+ <string name="Sleeve Looseness">Sleeve Looseness</string>
+ <string name="Slit Back">Slit Back</string>
+ <string name="Slit Front">Slit Front</string>
+ <string name="Slit Left">Slit Left</string>
+ <string name="Slit Right">Slit Right</string>
+ <string name="Socks Length">Socks Length</string>
+ <string name="Spiked Hair">Spiked Hair</string>
+ <string name="Squash/Stretch Head">Squash/Stretch Head</string>
+ <string name="Swept Back Hair">Swept Back Hair</string>
+ <string name="Swept Forward Hair">Swept Forward Hair</string>
+ <string name="Taper Back">Taper Back</string>
+ <string name="Taper Front">Taper Front</string>
+ <string name="Toe Shape">Toe Shape</string>
+ <string name="Toe Thickness">Toe Thickness</string>
+ <string name="Toe Length">Toe Length</string>
+ <string name="Torso Length">Torso Length</string>
+ <string name="Torso Muscles">Torso Muscles</string>
+ <string name="Torso Scrawny">Torso Scrawny</string>
+ <string name="Upper Bridge">Upper Bridge</string>
+ <string name="Upper Cheeks">Upper Cheeks</string>
+ <string name="Upper Chin Cleft">Upper Chin Cleft</string>
+ <string name="Upper Eyelid Fold">Upper Eyelid Fold</string>
+ <string name="Waist Height">Waist Height</string>
+ <string name="White Hair">White Hair</string>
+ <string name="big belly skirt">big belly skirt</string>
+ <string name="bigbutt skirt">bigbutt skirt</string>
+ <string name="bustle skirt">bustle skirt</string>
+ <string name="legs skirt">legs skirt</string>
+ <string name="loose skirt">loose skirt</string>
+ <string name="poofy skirt">poofy skirt</string>
+ <string name="tight skirt">tight skirt</string>
+ <string name="wrinkles">wrinkles</string>
</strings>
diff --git a/indra/newview/skins/default/xui/en/widgets/check_box.xml b/indra/newview/skins/default/xui/en/widgets/check_box.xml
index 97060fb161..bbb5e9b56a 100644
--- a/indra/newview/skins/default/xui/en/widgets/check_box.xml
+++ b/indra/newview/skins/default/xui/en/widgets/check_box.xml
@@ -13,5 +13,7 @@
image_unselected="Checkbox_Off"
image_selected="Checkbox_On"
image_disabled="Checkbox_Off_Disabled"
- image_disabled_selected="Checkbox_On_Disabled" />
+ image_disabled_selected="Checkbox_On_Disabled"
+ image_pressed="Checkbox_Press"
+ image_pressed_selected="Checkbox_On_Press"/>
</check_box>
diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml
index eb9bb99b20..777651c452 100644
--- a/indra/newview/skins/default/xui/en/widgets/location_input.xml
+++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml
@@ -42,7 +42,7 @@
<combo_list bg_writeable_color="MenuDefaultBgColor"/>
<combo_editor name="Combo Text Entry"
text_pad_left="20"
- select_on_focus="true"
+ select_on_focus="false"
font="SansSerifSmall"
bevel_style="none"
border_style="line"
diff --git a/indra/newview/skins/default/xui/en/widgets/radio_item.xml b/indra/newview/skins/default/xui/en/widgets/radio_item.xml
index 281a55d5e2..dd848f3acd 100644
--- a/indra/newview/skins/default/xui/en/widgets/radio_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/radio_item.xml
@@ -5,6 +5,8 @@
image_unselected="RadioButton_Off"
image_selected="RadioButton_On"
image_disabled="RadioButton_Disabled"
- image_disabled_selected="RadioButton_On_Disabled"/>
+ image_disabled_selected="RadioButton_On_Disabled"
+ image_pressed="RadioButton_Press"
+ image_pressed_selected="RadioButton_On_Press"/>
</radio_item>
diff --git a/indra/newview/skins/default/xui/en/widgets/slider_bar.xml b/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
index b33acf81cc..bc1ca339a2 100644
--- a/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
@@ -3,5 +3,7 @@
thumb_outline_color="SliderThumbOutlineColor"
thumb_center_color="SliderThumbCenterColor"
thumb_image="SliderThumb_Off"
+ thumb_image_pressed="SliderThumb_Press"
+ thumb_image_disabled="SliderThumb_Disabled"
track_image="SliderTrack_Horiz"
track_highlight_image="SliderTrack_Horiz" />
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 432dafaf8f..d0d97b61ec 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -220,6 +220,9 @@ class WindowsManifest(ViewerManifest):
self.path("Microsoft.VC80.CRT.manifest")
self.end_prefix()
+ # The config file name needs to match the exe's name.
+ self.path(src="%s/secondlife-bin.exe.config" % self.args['configuration'], dst=self.final_exe() + ".config")
+
# Mozilla runtime DLLs (CP)
if self.prefix(src=self.args['configuration'], dst=""):
self.path("freebl3.dll")
@@ -248,9 +251,6 @@ class WindowsManifest(ViewerManifest):
# Mozilla hack to get it to accept newer versions of msvc*80.dll than are listed in manifest
# necessary as llmozlib2-vc80.lib refers to an old version of msvc*80.dll - can be removed when new version of llmozlib is built - Nyx
- # The config file name needs to match the exe's name.
- self.path("SecondLife.exe.config", dst=self.final_exe() + ".config")
-
# Vivox runtimes
if self.prefix(src=self.args['configuration'], dst=""):
self.path("SLVoice.exe")