summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hgignore1
-rw-r--r--indra/llcharacter/llcharacter.cpp21
-rw-r--r--indra/llcharacter/llcharacter.h20
-rw-r--r--indra/llcharacter/llvisualparam.cpp2
-rw-r--r--indra/llcommon/llstring.cpp107
-rw-r--r--indra/llcommon/llstring.h18
-rw-r--r--indra/llrender/llrendersphere.cpp86
-rw-r--r--indra/llrender/llrendersphere.h4
-rw-r--r--indra/llui/llaccordionctrl.cpp24
-rw-r--r--indra/llui/llaccordionctrl.h1
-rw-r--r--indra/llui/llaccordionctrltab.cpp29
-rw-r--r--indra/llui/llaccordionctrltab.h7
-rw-r--r--indra/llui/llbutton.cpp30
-rw-r--r--indra/llui/llbutton.h7
-rw-r--r--indra/llui/llfloater.cpp4
-rw-r--r--indra/llui/llscrolllistctrl.cpp4
-rw-r--r--indra/llui/lltabcontainer.cpp8
-rw-r--r--indra/llui/lltabcontainer.h5
-rw-r--r--indra/llui/lltextbase.cpp422
-rw-r--r--indra/llui/lltextbase.h34
-rw-r--r--indra/llui/lltexteditor.cpp49
-rw-r--r--indra/llui/lltexteditor.h1
-rw-r--r--indra/llui/lltextparser.cpp40
-rw-r--r--indra/llui/lltextparser.h15
-rw-r--r--indra/llui/llurlentry.h2
-rw-r--r--indra/llui/llurlmatch.cpp3
-rw-r--r--indra/llui/llurlmatch.h7
-rw-r--r--indra/llui/llurlregistry.cpp6
-rw-r--r--indra/llui/tests/llurlmatch_test.cpp30
-rw-r--r--indra/newview/CMakeLists.txt8
-rw-r--r--indra/newview/app_settings/settings.xml57
-rw-r--r--indra/newview/character/avatar_lad.xml2
-rw-r--r--indra/newview/featuretable.txt1
-rw-r--r--indra/newview/featuretable_linux.txt1
-rw-r--r--indra/newview/featuretable_mac.txt1
-rw-r--r--indra/newview/llagentwearables.cpp40
-rw-r--r--indra/newview/llagentwearables.h6
-rw-r--r--indra/newview/llagentwearablesfetch.cpp48
-rw-r--r--indra/newview/llappearancemgr.cpp100
-rw-r--r--indra/newview/llappearancemgr.h13
-rw-r--r--indra/newview/llappviewer.cpp15
-rw-r--r--indra/newview/llavataractions.cpp159
-rw-r--r--indra/newview/llbottomtray.cpp10
-rw-r--r--indra/newview/llbottomtray.h2
-rw-r--r--indra/newview/llchathistory.cpp9
-rw-r--r--indra/newview/llchathistory.h1
-rw-r--r--indra/newview/llcofwearables.cpp79
-rw-r--r--indra/newview/llcofwearables.h50
-rw-r--r--indra/newview/llcolorswatch.cpp2
-rw-r--r--indra/newview/llcolorswatch.h2
-rw-r--r--indra/newview/lldrawpoolavatar.cpp8
-rw-r--r--indra/newview/llfilteredwearablelist.cpp55
-rw-r--r--indra/newview/llfilteredwearablelist.h9
-rw-r--r--indra/newview/llfloateravatarpicker.cpp2
-rw-r--r--indra/newview/llfloateravatartextures.cpp3
-rw-r--r--indra/newview/llfloaterland.cpp2
-rw-r--r--indra/newview/llfloatermap.cpp13
-rw-r--r--indra/newview/llfloatermap.h2
-rw-r--r--indra/newview/llfloaterpreference.cpp2
-rw-r--r--indra/newview/llfloatersnapshot.cpp2
-rw-r--r--indra/newview/llgiveinventory.cpp44
-rw-r--r--indra/newview/llgiveinventory.h7
-rw-r--r--indra/newview/llinventorybridge.cpp190
-rw-r--r--indra/newview/llinventorybridge.h1
-rw-r--r--indra/newview/llinventoryfunctions.cpp186
-rw-r--r--indra/newview/llinventoryfunctions.h66
-rw-r--r--indra/newview/llinventoryitemslist.h3
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp2
-rw-r--r--indra/newview/llinventoryobserver.cpp2
-rw-r--r--indra/newview/llinventorypanel.cpp44
-rw-r--r--indra/newview/llmachineid.cpp269
-rw-r--r--indra/newview/llmachineid.h56
-rw-r--r--indra/newview/llnavigationbar.cpp1
-rw-r--r--indra/newview/llnearbychatbar.cpp7
-rw-r--r--indra/newview/llnearbychatbar.h1
-rw-r--r--indra/newview/lloutfitslist.cpp243
-rw-r--r--indra/newview/lloutfitslist.h27
-rw-r--r--indra/newview/llpanellandmarks.cpp18
-rw-r--r--indra/newview/llpanellandmarks.h1
-rw-r--r--indra/newview/llpanellogin.cpp13
-rw-r--r--indra/newview/llpaneloutfitedit.cpp197
-rw-r--r--indra/newview/llpaneloutfitedit.h17
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp152
-rw-r--r--indra/newview/llpaneloutfitsinventory.h10
-rw-r--r--indra/newview/llparticipantlist.cpp3
-rw-r--r--indra/newview/llsaveoutfitcombobtn.cpp97
-rw-r--r--indra/newview/llsaveoutfitcombobtn.h60
-rw-r--r--indra/newview/llsecapi.cpp10
-rw-r--r--indra/newview/llsecapi.h31
-rw-r--r--indra/newview/llsechandler_basic.cpp138
-rw-r--r--indra/newview/llsechandler_basic.h23
-rw-r--r--indra/newview/llsidepanelappearance.cpp23
-rw-r--r--indra/newview/llsidepanelappearance.h1
-rw-r--r--indra/newview/llsidetray.cpp55
-rw-r--r--indra/newview/llsidetray.h10
-rw-r--r--indra/newview/llstartup.cpp5
-rw-r--r--indra/newview/llteleporthistory.cpp22
-rw-r--r--indra/newview/llteleporthistory.h4
-rw-r--r--indra/newview/lltexlayer.cpp139
-rw-r--r--indra/newview/lltexlayer.h29
-rw-r--r--indra/newview/lltexturectrl.cpp4
-rw-r--r--indra/newview/lltexturefetch.cpp16
-rw-r--r--indra/newview/lltextureview.cpp113
-rw-r--r--indra/newview/lltextureview.h4
-rw-r--r--indra/newview/lltoast.cpp5
-rw-r--r--indra/newview/lltooldraganddrop.cpp50
-rw-r--r--indra/newview/lltooldraganddrop.h3
-rw-r--r--indra/newview/llurldispatcher.cpp3
-rw-r--r--indra/newview/llviewerattachmenu.cpp139
-rw-r--r--indra/newview/llviewerattachmenu.h43
-rw-r--r--indra/newview/llviewerinventory.cpp25
-rw-r--r--indra/newview/llviewermenu.cpp58
-rw-r--r--indra/newview/llviewermenu.h1
-rw-r--r--indra/newview/llviewernetwork.cpp211
-rw-r--r--indra/newview/llviewernetwork.h20
-rw-r--r--indra/newview/llviewertexture.h4
-rw-r--r--indra/newview/llviewertexturelist.cpp2
-rw-r--r--indra/newview/llvoavatar.cpp89
-rw-r--r--indra/newview/llvoavatar.h3
-rw-r--r--indra/newview/llvoavatarself.cpp125
-rw-r--r--indra/newview/llvoavatarself.h30
-rw-r--r--indra/newview/llwearableitemslist.cpp167
-rw-r--r--indra/newview/llwearableitemslist.h34
-rw-r--r--indra/newview/llwearabletype.cpp2
-rw-r--r--indra/newview/llxmlrpctransaction.cpp6
-rw-r--r--indra/newview/skins/default/textures/containers/Toolbar_Left_Flash.pngbin0 -> 356 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Toolbar_Middle_Flash.pngbin0 -> 316 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Toolbar_Right_Flash.pngbin0 -> 428 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Generic_Group_Large.pngbin7905 -> 7061 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_LostClosed.pngbin0 -> 3033 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_LostOpen.pngbin0 -> 3223 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_SysClosed.pngbin0 -> 3153 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_SysOpen.pngbin0 -> 3251 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_TrashClosed.pngbin0 -> 2978 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_TrashOpen.pngbin0 -> 2970 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/back_arrow_off.pngbin0 -> 3775 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/back_arrow_over.pngbin0 -> 3792 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/back_arrow_press.pngbin0 -> 3844 bytes
-rw-r--r--indra/newview/skins/default/textures/locked_image.j2cbin0 -> 6140 bytes
-rw-r--r--indra/newview/skins/default/textures/map_infohub.tgabin0 -> 1068 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml18
-rw-r--r--indra/newview/skins/default/xui/da/floater_world_map.xml2
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_setup.xml8
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_sound.xml4
-rw-r--r--indra/newview/skins/default/xui/de/floater_world_map.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_sound.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_container.xml9
-rw-r--r--indra/newview/skins/default/xui/en/floater_map.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_search.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_snapshot.xml1
-rw-r--r--indra/newview/skins/default/xui/en/main_view.xml10
-rw-r--r--indra/newview/skins/default/xui/en/menu_bottomtray.xml11
-rw-r--r--indra/newview/skins/default/xui/en/menu_cof_attachment.xml8
-rw-r--r--indra/newview/skins/default/xui/en/menu_cof_body_part.xml11
-rw-r--r--indra/newview/skins/default/xui/en/menu_cof_clothing.xml14
-rw-r--r--indra/newview/skins/default/xui/en/menu_cof_gear.xml17
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_gear.xml162
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_tab.xml27
-rw-r--r--indra/newview/skins/default/xui/en/menu_save_outfit.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_wearable_list_item.xml35
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml106
-rw-r--r--indra/newview/skins/default/xui/en/outfit_accordion_tab.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml12
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml32
-rw-r--r--indra/newview/skins/default/xui/en/panel_classified_info.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_cof_wearables.xml67
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_classified.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_eyes.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_gloves.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_hair.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_jacket.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_pants.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_pick.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_shirt.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_shoes.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_skin.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_skirt.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_socks.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_tattoo.xml33
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_underpants.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_undershirt.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_wearable.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmark_info.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_login.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_edit.xml491
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfits_inventory.xml33
-rw-r--r--indra/newview/skins/default/xui/en/panel_pick_info.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_place_profile.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_general.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_view.xml10
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_item_info.xml10
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_task_info.xml10
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml44
-rw-r--r--indra/newview/skins/default/xui/en/widgets/button.xml1
-rw-r--r--indra/newview/skins/default/xui/en/widgets/tab_container.xml6
-rw-r--r--indra/newview/skins/default/xui/en/widgets/text.xml2
-rw-r--r--indra/newview/skins/default/xui/es/floater_world_map.xml2
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_setup.xml8
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_sound.xml6
-rw-r--r--indra/newview/skins/default/xui/fr/floater_preview_gesture.xml12
-rw-r--r--indra/newview/skins/default/xui/fr/floater_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/notifications.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_bodyparts_list_button_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_clothing_list_button_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_edit_pick.xml4
-rw-r--r--indra/newview/skins/default/xui/fr/panel_group_control_panel.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_group_notices.xml6
-rw-r--r--indra/newview/skins/default/xui/fr/panel_notes.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_people.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml4
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_sound.xml4
-rw-r--r--indra/newview/skins/default/xui/fr/panel_profile.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_region_estate.xml4
-rw-r--r--indra/newview/skins/default/xui/fr/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/it/floater_world_map.xml2
-rw-r--r--indra/newview/skins/default/xui/it/panel_preferences_setup.xml8
-rw-r--r--indra/newview/skins/default/xui/it/panel_preferences_sound.xml4
-rw-r--r--indra/newview/skins/default/xui/ja/floater_avatar_textures.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/floater_god_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/floater_moveview.xml12
-rw-r--r--indra/newview/skins/default/xui/ja/menu_avatar_self.xml4
-rw-r--r--indra/newview/skins/default/xui/ja/notifications.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/panel_bodyparts_list_button_bar.xml4
-rw-r--r--indra/newview/skins/default/xui/ja/panel_clothing_list_button_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/panel_edit_shape.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/panel_region_general.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/panel_region_texture.xml4
-rw-r--r--indra/newview/skins/default/xui/ja/strings.xml20
-rw-r--r--indra/newview/skins/default/xui/pl/floater_about_land.xml4
-rw-r--r--indra/newview/skins/default/xui/pl/floater_world_map.xml2
-rw-r--r--indra/newview/skins/default/xui/pl/panel_preferences_setup.xml8
-rw-r--r--indra/newview/skins/default/xui/pl/panel_preferences_sound.xml6
-rw-r--r--indra/newview/skins/default/xui/pt/floater_world_map.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/panel_preferences_setup.xml6
-rw-r--r--indra/newview/skins/default/xui/pt/panel_preferences_sound.xml4
-rw-r--r--indra/newview/tests/llsechandler_basic_test.cpp76
-rw-r--r--indra/newview/tests/llviewernetwork_test.cpp220
-rw-r--r--install.xml12
243 files changed, 4920 insertions, 1925 deletions
diff --git a/.hgignore b/.hgignore
index 53ddf71bb7..1221b80357 100644
--- a/.hgignore
+++ b/.hgignore
@@ -60,3 +60,4 @@ glob:indra/newview/teleport_history.txt
glob:indra/newview/search_history.txt
glob:indra/newview/filters.xml
glob:indra/newview/avatar_icons_cache.txt
+glob:indra/newview/avatar_lad.log
diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp
index 40a9752268..27c0c0b640 100644
--- a/indra/llcharacter/llcharacter.cpp
+++ b/indra/llcharacter/llcharacter.cpp
@@ -389,27 +389,6 @@ void LLCharacter::clearVisualParamWeights()
}
//-----------------------------------------------------------------------------
-// BOOL visualParamWeightsAreDefault()
-//-----------------------------------------------------------------------------
-BOOL LLCharacter::visualParamWeightsAreDefault()
-{
- for (LLVisualParam *param = getFirstVisualParam();
- param;
- param = getNextVisualParam())
- {
- if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
- {
- if (param->getWeight() != param->getDefaultWeight())
- return false;
- }
- }
-
- return true;
-}
-
-
-
-//-----------------------------------------------------------------------------
// getVisualParam()
//-----------------------------------------------------------------------------
LLVisualParam* LLCharacter::getVisualParam(const char *param_name)
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index 27e2a51c62..cac73c01b9 100644
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -212,12 +212,9 @@ public:
F32 getVisualParamWeight(const char* param_name);
F32 getVisualParamWeight(S32 index);
- // set all morph weights to 0
+ // set all morph weights to defaults
void clearVisualParamWeights();
- // see if all the weights are default
- BOOL visualParamWeightsAreDefault();
-
// visual parameter accessors
LLVisualParam* getFirstVisualParam()
{
@@ -231,6 +228,21 @@ public:
return (mCurIterator++)->second;
}
+ S32 getVisualParamCountInGroup(const EVisualParamGroup group) const
+ {
+ S32 rtn = 0;
+ for (visual_param_index_map_t::const_iterator iter = mVisualParamIndexMap.begin();
+ iter != mVisualParamIndexMap.end();
+ /**/ )
+ {
+ if ((iter++)->second->getGroup() == group)
+ {
+ ++rtn;
+ }
+ }
+ return rtn;
+ }
+
LLVisualParam* getVisualParam(S32 id) const
{
visual_param_index_map_t::const_iterator iter = mVisualParamIndexMap.find(id);
diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp
index 297322fe58..703fe2f9cc 100644
--- a/indra/llcharacter/llvisualparam.cpp
+++ b/indra/llcharacter/llvisualparam.cpp
@@ -284,7 +284,7 @@ void LLVisualParam::setAnimationTarget(F32 target_value, BOOL upload_bake)
void LLVisualParam::setNextParam( LLVisualParam *next )
{
llassert(!mNext);
-
+ llassert(getWeight() == getDefaultWeight()); // need to establish mNext before we start changing values on this, else initial value won't get mirrored (we can fix that, but better to forbid this pattern)
mNext = next;
}
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index b5a73ec1d1..f14d947734 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -676,6 +676,17 @@ long LLStringOps::sLocalTimeOffset = 0;
bool LLStringOps::sPacificDaylightTime = 0;
std::map<std::string, std::string> LLStringOps::datetimeToCodes;
+std::vector<std::string> LLStringOps::sWeekDayList;
+std::vector<std::string> LLStringOps::sWeekDayShortList;
+std::vector<std::string> LLStringOps::sMonthList;
+std::vector<std::string> LLStringOps::sMonthShortList;
+
+
+std::string LLStringOps::sDayFormat;
+std::string LLStringOps::sAM;
+std::string LLStringOps::sPM;
+
+
S32 LLStringOps::collate(const llwchar* a, const llwchar* b)
{
#if LL_WINDOWS
@@ -724,6 +735,50 @@ void LLStringOps::setupDatetimeInfo (bool daylight)
datetimeToCodes["timezone"] = "%Z"; // PST
}
+void tokenizeStringToArray(const std::string& data, std::vector<std::string>& output)
+{
+ output.clear();
+ size_t length = data.size();
+
+ // tokenize it and put it in the array
+ std::string cur_word;
+ for(size_t i = 0; i < length; ++i)
+ {
+ if(data[i] == ':')
+ {
+ output.push_back(cur_word);
+ cur_word.clear();
+ }
+ else
+ {
+ cur_word.append(1, data[i]);
+ }
+ }
+ output.push_back(cur_word);
+}
+
+void LLStringOps::setupWeekDaysNames(const std::string& data)
+{
+ tokenizeStringToArray(data,sWeekDayList);
+}
+void LLStringOps::setupWeekDaysShortNames(const std::string& data)
+{
+ tokenizeStringToArray(data,sWeekDayShortList);
+}
+void LLStringOps::setupMonthNames(const std::string& data)
+{
+ tokenizeStringToArray(data,sMonthList);
+}
+void LLStringOps::setupMonthShortNames(const std::string& data)
+{
+ tokenizeStringToArray(data,sMonthShortList);
+}
+void LLStringOps::setupDayFormat(const std::string& data)
+{
+ sDayFormat = data;
+}
+
+
std::string LLStringOps::getDatetimeCode (std::string key)
{
std::map<std::string, std::string>::iterator iter;
@@ -819,6 +874,10 @@ namespace LLStringFn
////////////////////////////////////////////////////////////
+// Forward specialization of LLStringUtil::format before use in LLStringUtil::formatDatetime.
+template<>
+S32 LLStringUtil::format(std::string& s, const format_map_t& substitutions);
+
//static
template<>
void LLStringUtil::getTokens(const std::string& instr, std::vector<std::string >& tokens, const std::string& delims)
@@ -998,7 +1057,53 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token,
}
return true;
}
- replacement = datetime.toHTTPDateString(code);
+
+ //EXT-7013
+ //few codes are not suppotred by strtime function (example - weekdays for Japanise)
+ //so use predefined ones
+
+ //if sWeekDayList is not empty than current locale doesn't support
+ //weekday name.
+ time_t loc_seconds = (time_t) secFromEpoch;
+ if(LLStringOps::sWeekDayList.size() == 7 && code == "%A")
+ {
+ struct tm * gmt = gmtime (&loc_seconds);
+ replacement = LLStringOps::sWeekDayList[gmt->tm_wday];
+ }
+ else if(LLStringOps::sWeekDayShortList.size() == 7 && code == "%a")
+ {
+ struct tm * gmt = gmtime (&loc_seconds);
+ replacement = LLStringOps::sWeekDayShortList[gmt->tm_wday];
+ }
+ else if(LLStringOps::sMonthList.size() == 12 && code == "%B")
+ {
+ struct tm * gmt = gmtime (&loc_seconds);
+ replacement = LLStringOps::sWeekDayList[gmt->tm_mon];
+ }
+ else if( !LLStringOps::sDayFormat.empty() && code == "%d" )
+ {
+ struct tm * gmt = gmtime (&loc_seconds);
+ LLStringUtil::format_map_t args;
+ args["[MDAY]"] = llformat ("%d", gmt->tm_mday);
+ replacement = LLStringOps::sDayFormat;
+ LLStringUtil::format(replacement, args);
+ }
+ else if( !LLStringOps::sAM.empty() && !LLStringOps::sPM.empty() && code == "%p" )
+ {
+ struct tm * gmt = gmtime (&loc_seconds);
+ if(gmt->tm_hour<12)
+ {
+ replacement = LLStringOps::sAM;
+ }
+ else
+ {
+ replacement = LLStringOps::sPM;
+ }
+ }
+ else
+ {
+ replacement = datetime.toHTTPDateString(code);
+ }
// *HACK: delete leading zero from hour string in case 'hour12' (code = %I) time format
// to show time without leading zero, e.g. 08:16 -> 8:16 (EXT-2738).
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 96588b29b9..ad8f8632a2 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -154,9 +154,19 @@ private:
static long sPacificTimeOffset;
static long sLocalTimeOffset;
static bool sPacificDaylightTime;
+
static std::map<std::string, std::string> datetimeToCodes;
public:
+ static std::vector<std::string> sWeekDayList;
+ static std::vector<std::string> sWeekDayShortList;
+ static std::vector<std::string> sMonthList;
+ static std::vector<std::string> sMonthShortList;
+ static std::string sDayFormat;
+
+ static std::string sAM;
+ static std::string sPM;
+
static char toUpper(char elem) { return toupper((unsigned char)elem); }
static llwchar toUpper(llwchar elem) { return towupper(elem); }
@@ -185,6 +195,14 @@ public:
static S32 collate(const llwchar* a, const llwchar* b);
static void setupDatetimeInfo(bool pacific_daylight_time);
+
+ static void setupWeekDaysNames(const std::string& data);
+ static void setupWeekDaysShortNames(const std::string& data);
+ static void setupMonthNames(const std::string& data);
+ static void setupMonthShortNames(const std::string& data);
+ static void setupDayFormat(const std::string& data);
+
+
static long getPacificTimeOffset(void) { return sPacificTimeOffset;}
static long getLocalTimeOffset(void) { return sLocalTimeOffset;}
// Is the Pacific time zone (aka server time zone)
diff --git a/indra/llrender/llrendersphere.cpp b/indra/llrender/llrendersphere.cpp
index e22b753923..212963f270 100644
--- a/indra/llrender/llrendersphere.cpp
+++ b/indra/llrender/llrendersphere.cpp
@@ -68,45 +68,6 @@ void drawSolidSphere(GLdouble radius, GLint slices, GLint stacks)
}
-// lat = 0 is Z-axis
-// lon = 0, lat = 90 at X-axis
-void lat2xyz(LLVector3 * result, F32 lat, F32 lon)
-{
- // Convert a latitude and longitude to x,y,z on a normal sphere and return it in result
- F32 r;
- result->mV[VX] = (F32) (cos(lon * DEG_TO_RAD) * sin(lat * DEG_TO_RAD));
- result->mV[VY] = (F32) (sin(lon * DEG_TO_RAD) * sin(lat * DEG_TO_RAD));
- r = (F32) pow(result->mV[VX] * result->mV[VX] + result->mV[VY] * result->mV[VY], 0.5f);
- if (r == 1.0f)
- {
- result->mV[VZ] = 0.0f;
- }
- else
- {
- result->mV[VZ] = (F32) pow(1 - r*r, 0.5f);
- if (lat > 90.01)
- {
- result->mV[VZ] *= -1.0;
- }
- }
-}
-
-void lat2xyz_rad(LLVector3 * result, F32 lat, F32 lon)
-{
- // Convert a latitude and longitude to x,y,z on a normal sphere and return it in result
- F32 r;
- result->mV[VX] = (F32) (cos(lon) * sin(lat));
- result->mV[VY] = (F32) (sin(lon) * sin(lat));
- r = (F32) pow(result->mV[VX] * result->mV[VX] + result->mV[VY] * result->mV[VY], 0.5f);
- if (r == 1.0f)
- result->mV[VZ] = 0.0f;
- else
- {
- result->mV[VZ] = (F32) pow(1 - r*r, 0.5f);
- if (lat > F_PI_BY_TWO) result->mV[VZ] *= -1.0;
- }
-}
-
// A couple thoughts on sphere drawing:
// 1) You need more slices than stacks, but little less than 2:1
// 2) At low LOD, setting stacks to an odd number avoids a "band" around the equator, making things look smoother
@@ -181,3 +142,50 @@ void LLRenderSphere::render()
{
glCallList(mDList[0]);
}
+
+inline LLVector3 polar_to_cart(F32 latitude, F32 longitude)
+{
+ return LLVector3(sin(F_TWO_PI * latitude) * cos(F_TWO_PI * longitude),
+ sin(F_TWO_PI * latitude) * sin(F_TWO_PI * longitude),
+ cos(F_TWO_PI * latitude));
+}
+
+
+void LLRenderSphere::renderGGL()
+{
+ S32 const LATITUDE_SLICES = 20;
+ S32 const LONGITUDE_SLICES = 30;
+
+ if (mSpherePoints.empty())
+ {
+ mSpherePoints.resize(LATITUDE_SLICES + 1);
+ for (S32 lat_i = 0; lat_i < LATITUDE_SLICES + 1; lat_i++)
+ {
+ mSpherePoints[lat_i].resize(LONGITUDE_SLICES + 1);
+ for (S32 lon_i = 0; lon_i < LONGITUDE_SLICES + 1; lon_i++)
+ {
+ F32 lat = (F32)lat_i / LATITUDE_SLICES;
+ F32 lon = (F32)lon_i / LONGITUDE_SLICES;
+
+ mSpherePoints[lat_i][lon_i] = polar_to_cart(lat, lon);
+ }
+ }
+ }
+
+ gGL.begin(LLRender::TRIANGLES);
+
+ for (S32 lat_i = 0; lat_i < LATITUDE_SLICES; lat_i++)
+ {
+ for (S32 lon_i = 0; lon_i < LONGITUDE_SLICES; lon_i++)
+ {
+ gGL.vertex3fv(mSpherePoints[lat_i][lon_i].mV);
+ gGL.vertex3fv(mSpherePoints[lat_i][lon_i+1].mV);
+ gGL.vertex3fv(mSpherePoints[lat_i+1][lon_i].mV);
+
+ gGL.vertex3fv(mSpherePoints[lat_i+1][lon_i].mV);
+ gGL.vertex3fv(mSpherePoints[lat_i][lon_i+1].mV);
+ gGL.vertex3fv(mSpherePoints[lat_i+1][lon_i+1].mV);
+ }
+ }
+ gGL.end();
+}
diff --git a/indra/llrender/llrendersphere.h b/indra/llrender/llrendersphere.h
index 617ee3e12e..ebc71b6146 100644
--- a/indra/llrender/llrendersphere.h
+++ b/indra/llrender/llrendersphere.h
@@ -52,6 +52,10 @@ public:
void cleanupGL();
void render(F32 pixel_area); // of a box of size 1.0 at that position
void render(); // render at highest LOD
+ void renderGGL(); // render using LLRender
+
+private:
+ std::vector< std::vector<LLVector3> > mSpherePoints;
};
extern LLRenderSphere gSphere;
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 5d1d57cbb2..8e0245c451 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -65,6 +65,7 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params)
, mFitParent(params.fit_parent)
, mAutoScrolling( false )
, mAutoScrollRate( 0.f )
+ , mSelectedTab( NULL )
{
mSingleExpansion = params.single_expansion;
if(mFitParent && !mSingleExpansion)
@@ -76,6 +77,7 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params)
LLAccordionCtrl::LLAccordionCtrl() : LLPanel()
, mAutoScrolling( false )
, mAutoScrollRate( 0.f )
+ , mSelectedTab( NULL )
{
mSingleExpansion = false;
mFitParent = false;
@@ -689,6 +691,28 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info)
}
return 0;
}
+ else if(str_action == "select_current")
+ {
+ for(size_t i=0;i<mAccordionTabs.size();++i)
+ {
+ // Set selection to the currently focused tab.
+ if(mAccordionTabs[i]->hasFocus())
+ {
+ if (mAccordionTabs[i] != mSelectedTab)
+ {
+ if (mSelectedTab)
+ {
+ mSelectedTab->setSelected(false);
+ }
+ mSelectedTab = mAccordionTabs[i];
+ mSelectedTab->setSelected(true);
+ }
+
+ return 1;
+ }
+ }
+ return 0;
+ }
}
else if (info.has("scrollToShowRect"))
{
diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h
index ab7d6548ca..a029201c90 100644
--- a/indra/llui/llaccordionctrl.h
+++ b/indra/llui/llaccordionctrl.h
@@ -130,6 +130,7 @@ private:
bool mFitParent;
bool mAutoScrolling;
F32 mAutoScrollRate;
+ LLAccordionCtrlTab* mSelectedTab;
};
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index b09c108ec3..83e67980a3 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -76,6 +76,8 @@ public:
std::string getTitle();
void setTitle(const std::string& title, const std::string& hl);
+ void setSelected(bool is_selected) { mIsSelected = is_selected; }
+
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
@@ -103,6 +105,7 @@ private:
LLUIColor mHeaderBGColor;
bool mNeedsHighlight;
+ bool mIsSelected;
LLFrameTimer mAutoOpenTimer;
};
@@ -115,7 +118,8 @@ LLAccordionCtrlTab::LLAccordionCtrlTabHeader::LLAccordionCtrlTabHeader(
const LLAccordionCtrlTabHeader::Params& p)
: LLUICtrl(p)
, mHeaderBGColor(p.header_bg_color())
-,mNeedsHighlight(false),
+, mNeedsHighlight(false)
+, mIsSelected(false),
mImageCollapsed(p.header_collapse_img),
mImageCollapsedPressed(p.header_collapse_img_pressed),
mImageExpanded(p.header_expand_img),
@@ -187,7 +191,7 @@ void LLAccordionCtrlTab::LLAccordionCtrlTabHeader::draw()
// Only show green "focus" background image if the accordion is open,
// because the user's mental model of focus is that it goes away after
// the accordion is closed.
- if (getParent()->hasFocus()
+ if (getParent()->hasFocus() || mIsSelected
/*&& !(collapsible && !expanded)*/ // WHY??
)
{
@@ -301,6 +305,7 @@ LLAccordionCtrlTab::Params::Params()
,header_image_focused("header_image_focused")
,header_text_color("header_text_color")
,fit_panel("fit_panel",true)
+ ,selection_enabled("selection_enabled", false)
{
mouse_opaque(false);
}
@@ -331,6 +336,11 @@ LLAccordionCtrlTab::LLAccordionCtrlTab(const LLAccordionCtrlTab::Params&p)
mHeader = LLUICtrlFactory::create<LLAccordionCtrlTabHeader>(headerParams);
addChild(mHeader, 1);
+ if (p.selection_enabled)
+ {
+ LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLAccordionCtrlTab::selectOnFocusReceived, this));
+ }
+
reshape(100, 200,FALSE);
}
@@ -498,6 +508,15 @@ boost::signals2::connection LLAccordionCtrlTab::setFocusLostCallback(const focus
return boost::signals2::connection();
}
+void LLAccordionCtrlTab::setSelected(bool is_selected)
+{
+ LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME);
+ if (header)
+ {
+ header->setSelected(is_selected);
+ }
+}
+
LLView* LLAccordionCtrlTab::findContainerView()
{
for(child_list_const_iter_t it = getChildList()->begin();
@@ -513,6 +532,11 @@ LLView* LLAccordionCtrlTab::findContainerView()
return NULL;
}
+void LLAccordionCtrlTab::selectOnFocusReceived()
+{
+ if (getParent()) // A parent may not be set if tabs are added dynamically.
+ getParent()->notifyParent(LLSD().with("action", "select_current"));
+}
S32 LLAccordionCtrlTab::getHeaderHeight()
{
@@ -713,6 +737,7 @@ void LLAccordionCtrlTab::showAndFocusHeader()
{
LLAccordionCtrlTabHeader* header = getChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME);
header->setFocus(true);
+ header->setSelected(true);
LLRect screen_rc;
LLRect selected_rc = header->getRect();
diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h
index f5b7fd0af6..83a9024a74 100644
--- a/indra/llui/llaccordionctrltab.h
+++ b/indra/llui/llaccordionctrltab.h
@@ -88,6 +88,8 @@ public:
Optional<bool> fit_panel;
+ Optional<bool> selection_enabled;
+
Optional<S32> padding_left;
Optional<S32> padding_right;
Optional<S32> padding_top;
@@ -121,6 +123,8 @@ public:
boost::signals2::connection setFocusReceivedCallback(const focus_signal_t::slot_type& cb);
boost::signals2::connection setFocusLostCallback(const focus_signal_t::slot_type& cb);
+ void setSelected(bool is_selected);
+
bool getCollapsible() {return mCollapsible;};
void setCollapsible(bool collapsible) {mCollapsible = collapsible;};
@@ -199,6 +203,9 @@ protected:
void drawChild(const LLRect& root_rect,LLView* child);
LLView* findContainerView ();
+
+ void selectOnFocusReceived();
+
private:
class LLAccordionCtrlTabHeader;
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 0255061b12..34f3049f2e 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -128,6 +128,7 @@ LLButton::LLButton(const LLButton::Params& p)
mImageSelected(p.image_selected),
mImageDisabled(p.image_disabled),
mImageDisabledSelected(p.image_disabled_selected),
+ mImageFlash(p.image_flash),
mImagePressed(p.image_pressed),
mImagePressedSelected(p.image_pressed_selected),
mImageHoverSelected(p.image_hover_selected),
@@ -635,14 +636,24 @@ void LLButton::draw()
if (mFlashing)
{
- LLColor4 flash_color = mFlashBgColor.get();
- use_glow_effect = TRUE;
- glow_type = LLRender::BT_ALPHA; // blend the glow
-
- if (mNeedsHighlight) // highlighted AND flashing
- glow_color = (glow_color*0.5f + flash_color*0.5f) % 2.0f; // average between flash and highlight colour, with sum of the opacity
+ // if button should flash and we have icon for flashing, use it as image for button
+ if(flash && mImageFlash)
+ {
+ // setting flash to false to avoid its further influence on glow
+ flash = false;
+ imagep = mImageFlash;
+ }
+ // else use usual flashing via flash_color
else
- glow_color = flash_color;
+ {
+ LLColor4 flash_color = mFlashBgColor.get();
+ use_glow_effect = TRUE;
+ glow_type = LLRender::BT_ALPHA; // blend the glow
+ if (mNeedsHighlight) // highlighted AND flashing
+ glow_color = (glow_color*0.5f + flash_color*0.5f) % 2.0f; // average between flash and highlight colour, with sum of the opacity
+ else
+ glow_color = flash_color;
+ }
}
if (mNeedsHighlight && !imagep)
@@ -1018,6 +1029,11 @@ void LLButton::setImageHoverUnselected(LLPointer<LLUIImage> image)
mImageHoverUnselected = image;
}
+void LLButton::setImageFlash(LLPointer<LLUIImage> image)
+{
+ mImageFlash = image;
+}
+
void LLButton::setImageOverlay(const std::string& image_name, LLFontGL::HAlign alignment, const LLColor4& color)
{
if (image_name.empty())
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index a4d81ed6c3..9bd566d3c9 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -84,6 +84,7 @@ public:
image_hover_unselected,
image_disabled_selected,
image_disabled,
+ image_flash,
image_pressed,
image_pressed_selected,
image_overlay;
@@ -246,6 +247,7 @@ public:
void setImageHoverUnselected(LLPointer<LLUIImage> image);
void setImageDisabled(LLPointer<LLUIImage> image);
void setImageDisabledSelected(LLPointer<LLUIImage> image);
+ void setImageFlash(LLPointer<LLUIImage> image);
void setImagePressed(LLPointer<LLUIImage> image);
void setCommitOnReturn(BOOL commit) { mCommitOnReturn = commit; }
@@ -310,6 +312,11 @@ private:
LLPointer<LLUIImage> mImagePressed;
LLPointer<LLUIImage> mImagePressedSelected;
+ /* There are two ways an image can flash- by making changes in color according to flash_color attribute
+ or by changing icon from current to the one specified in image_flash. Second way is used only if
+ flash icon name is set in attributes(by default it isn't). First way is used otherwise. */
+ LLPointer<LLUIImage> mImageFlash;
+
LLUIColor mHighlightColor;
LLUIColor mFlashBgColor;
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 6babaf936b..fad98e553f 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -330,6 +330,7 @@ void LLFloater::addDragHandle()
addChild(mDragHandle);
}
layoutDragHandle();
+ applyTitle();
}
void LLFloater::layoutDragHandle()
@@ -348,7 +349,6 @@ void LLFloater::layoutDragHandle()
}
mDragHandle->setRect(rect);
updateTitleButtons();
- applyTitle();
}
void LLFloater::addResizeCtrls()
@@ -2519,7 +2519,7 @@ LLFloater *LLFloaterView::getBackmost() const
void LLFloaterView::syncFloaterTabOrder()
{
- // look for a visible modal dialog, starting from first (should be only one)
+ // look for a visible modal dialog, starting from first
LLModalDialog* modal_dialog = NULL;
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 94eade06ad..d4d161f2c9 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -2949,7 +2949,6 @@ BOOL LLScrollListCtrl::operateOnAll(EOperation op)
//virtual
void LLScrollListCtrl::setFocus(BOOL b)
{
- mSearchString.clear();
// for tabbing into pristine scroll lists (Finder)
if (!getFirstSelected())
{
@@ -2994,6 +2993,9 @@ void LLScrollListCtrl::onFocusLost()
{
gFocusMgr.setMouseCapture(NULL);
}
+
+ mSearchString.clear();
+
LLUICtrl::onFocusLost();
}
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 30fc7babae..986cfe75a1 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -197,10 +197,13 @@ static LLDefaultChildRegistry::Register<LLTabContainer> r2("tab_container");
LLTabContainer::TabParams::TabParams()
: tab_top_image_unselected("tab_top_image_unselected"),
tab_top_image_selected("tab_top_image_selected"),
+ tab_top_image_flash("tab_top_image_flash"),
tab_bottom_image_unselected("tab_bottom_image_unselected"),
tab_bottom_image_selected("tab_bottom_image_selected"),
+ tab_bottom_image_flash("tab_bottom_image_flash"),
tab_left_image_unselected("tab_left_image_unselected"),
- tab_left_image_selected("tab_left_image_selected")
+ tab_left_image_selected("tab_left_image_selected"),
+ tab_left_image_flash("tab_left_image_flash")
{}
LLTabContainer::Params::Params()
@@ -879,16 +882,19 @@ void LLTabContainer::update_images(LLTabTuple* tuple, TabParams params, LLTabCon
{
tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_top_image_unselected));
tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_top_image_selected));
+ tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_top_image_flash));
}
else if (pos == LLTabContainer::BOTTOM)
{
tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_bottom_image_unselected));
tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_bottom_image_selected));
+ tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_bottom_image_flash));
}
else if (pos == LLTabContainer::LEFT)
{
tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_left_image_unselected));
tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_left_image_selected));
+ tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_left_image_flash));
}
}
}
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index 50ec2679f6..a2dc15aaf9 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -67,10 +67,13 @@ public:
{
Optional<LLUIImage*> tab_top_image_unselected,
tab_top_image_selected,
+ tab_top_image_flash,
tab_bottom_image_unselected,
tab_bottom_image_selected,
+ tab_bottom_image_flash,
tab_left_image_unselected,
- tab_left_image_selected;
+ tab_left_image_selected,
+ tab_left_image_flash;
TabParams();
};
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 78a6ab1eaa..55dbf50fd7 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -962,18 +962,19 @@ void LLTextBase::reshape(S32 width, S32 height, BOOL called_from_parent)
{
if (width != getRect().getWidth() || height != getRect().getHeight())
{
- //EXT-4288
- //to keep consistance scrolling behaviour
- //when scrolling from top and from bottom...
- bool is_scrolled_to_end = (mScroller!=NULL) && scrolledToEnd();
-
+ bool scrolled_to_bottom = mScroller ? mScroller->isAtBottom() : false;
+
LLUICtrl::reshape( width, height, called_from_parent );
-
- if (is_scrolled_to_end)
+
+ if (mScroller && scrolled_to_bottom && mTrackEnd)
{
- deselect();
- endOfDoc();
- }
+ // keep bottom of text buffer visible
+ // do this here as well as in reflow to handle case
+ // where shrinking from top, which causes buffer to temporarily
+ // not be scrolled to the bottom, since the scroll index
+ // specified the _top_ of the visible document region
+ mScroller->goToBottom();
+ }
// do this first after reshape, because other things depend on
// up-to-date mVisibleTextRect
@@ -1116,6 +1117,34 @@ void LLTextBase::reflow()
updateSegments();
+ if (mReflowIndex == S32_MAX)
+ {
+ return;
+ }
+
+ bool scrolled_to_bottom = mScroller ? mScroller->isAtBottom() : false;
+
+ LLRect cursor_rect = getLocalRectFromDocIndex(mCursorPos);
+ bool follow_selection = getLocalRect().overlaps(cursor_rect); // cursor is (potentially) visible
+
+ // store in top-left relative coordinates to avoid issues with horizontal scrollbar appearing and disappearing
+ cursor_rect.mTop = mVisibleTextRect.mTop - cursor_rect.mTop;
+ cursor_rect.mBottom = mVisibleTextRect.mTop - cursor_rect.mBottom;
+
+ S32 first_line = getFirstVisibleLine();
+
+ // if scroll anchor not on first line, update it to first character of first line
+ if (!mLineInfoList.empty()
+ && (mScrollIndex < mLineInfoList[first_line].mDocIndexStart
+ || mScrollIndex >= mLineInfoList[first_line].mDocIndexEnd))
+ {
+ mScrollIndex = mLineInfoList[first_line].mDocIndexStart;
+ }
+ LLRect first_char_rect = getLocalRectFromDocIndex(mScrollIndex);
+ // store in top-left relative coordinates to avoid issues with horizontal scrollbar appearing and disappearing
+ first_char_rect.mTop = mVisibleTextRect.mTop - first_char_rect.mTop;
+ first_char_rect.mBottom = mVisibleTextRect.mTop - first_char_rect.mBottom;
+
S32 reflow_count = 0;
while(mReflowIndex < S32_MAX)
{
@@ -1129,6 +1158,7 @@ void LLTextBase::reflow()
lldebugs << "Breaking out of reflow due to possible infinite loop in " << getName() << llendl;
break;
}
+
S32 start_index = mReflowIndex;
mReflowIndex = S32_MAX;
@@ -1136,25 +1166,6 @@ void LLTextBase::reflow()
// to force inlined widgets with follows set to shrink
mDocumentView->reshape(mVisibleTextRect.getWidth(), mDocumentView->getRect().getHeight());
- bool scrolled_to_bottom = mScroller ? mScroller->isAtBottom() : false;
-
- LLRect old_cursor_rect = getLocalRectFromDocIndex(mCursorPos);
- bool follow_selection = mVisibleTextRect.overlaps(old_cursor_rect); // cursor is visible
- old_cursor_rect.translate(-mVisibleTextRect.mLeft, -mVisibleTextRect.mBottom);
-
- S32 first_line = getFirstVisibleLine();
-
- // if scroll anchor not on first line, update it to first character of first line
- if (!mLineInfoList.empty()
- && (mScrollIndex < mLineInfoList[first_line].mDocIndexStart
- || mScrollIndex >= mLineInfoList[first_line].mDocIndexEnd))
- {
- mScrollIndex = mLineInfoList[first_line].mDocIndexStart;
- }
- LLRect first_char_rect = getLocalRectFromDocIndex(mScrollIndex);
- // subtract off effect of horizontal scrollbar from local position of first char
- first_char_rect.translate(-mVisibleTextRect.mLeft, -mVisibleTextRect.mBottom);
-
S32 cur_top = 0;
segment_set_t::iterator seg_iter = mSegments.begin();
@@ -1275,32 +1286,42 @@ void LLTextBase::reflow()
segmentp->updateLayout(*this);
}
+ }
- // apply scroll constraints after reflowing text
- if (!hasMouseCapture() && mScroller)
+ // apply scroll constraints after reflowing text
+ if (!hasMouseCapture() && mScroller)
+ {
+ if (scrolled_to_bottom && mTrackEnd)
{
- if (scrolled_to_bottom && mTrackEnd)
- {
- // keep bottom of text buffer visible
- endOfDoc();
- }
- else if (hasSelection() && follow_selection)
- {
- // keep cursor in same vertical position on screen when selecting text
- LLRect new_cursor_rect_doc = getDocRectFromDocIndex(mCursorPos);
- mScroller->scrollToShowRect(new_cursor_rect_doc, old_cursor_rect);
- }
- else
- {
- // keep first line of text visible
- LLRect new_first_char_rect = getDocRectFromDocIndex(mScrollIndex);
- mScroller->scrollToShowRect(new_first_char_rect, first_char_rect);
- }
+ // keep bottom of text buffer visible
+ endOfDoc();
}
+ else if (hasSelection() && follow_selection)
+ {
+ // keep cursor in same vertical position on screen when selecting text
+ LLRect new_cursor_rect_doc = getDocRectFromDocIndex(mCursorPos);
+ LLRect old_cursor_rect = cursor_rect;
+ old_cursor_rect.mTop = mVisibleTextRect.mTop - cursor_rect.mTop;
+ old_cursor_rect.mBottom = mVisibleTextRect.mTop - cursor_rect.mBottom;
- // reset desired x cursor position
- updateCursorXPos();
+ mScroller->scrollToShowRect(new_cursor_rect_doc, old_cursor_rect);
+ }
+ else
+ {
+ // keep first line of text visible
+ LLRect new_first_char_rect = getDocRectFromDocIndex(mScrollIndex);
+
+ // pass in desired rect in the coordinate frame of the document viewport
+ LLRect old_first_char_rect = first_char_rect;
+ old_first_char_rect.mTop = mVisibleTextRect.mTop - first_char_rect.mTop;
+ old_first_char_rect.mBottom = mVisibleTextRect.mTop - first_char_rect.mBottom;
+
+ mScroller->scrollToShowRect(new_first_char_rect, old_first_char_rect);
+ }
}
+
+ // reset desired x cursor position
+ updateCursorXPos();
}
LLRect LLTextBase::getTextBoundingRect()
@@ -1562,7 +1583,7 @@ std::string LLTextBase::getText() const
return getViewModel()->getValue().asString();
}
-void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params)
+void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params)
{
LLStyle::Params style_params(input_params);
style_params.fillFrom(getDefaultStyleParams());
@@ -1598,8 +1619,7 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c
part = (S32)LLTextParser::MIDDLE;
}
std::string subtext=text.substr(0,start);
- appendAndHighlightText(subtext, prepend_newline, part, style_params);
- prepend_newline = false;
+ appendAndHighlightTextImpl(subtext, part, style_params);
}
// output an optional icon before the Url
@@ -1613,19 +1633,18 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c
// Text will be replaced during rendering with the icon,
// but string cannot be empty or the segment won't be
// added (or drawn).
- appendAndHighlightText(" ", prepend_newline, part, icon);
- prepend_newline = false;
+ appendImageSegment(part, icon);
}
}
// output the styled Url (unless we've been asked to suppress hyperlinking)
if (match.isLinkDisabled())
{
- appendAndHighlightText(match.getLabel(), prepend_newline, part, style_params);
+ appendAndHighlightTextImpl(match.getLabel(), part, style_params);
}
else
{
- appendAndHighlightText(match.getLabel(), prepend_newline, part, link_params);
+ appendAndHighlightTextImpl(match.getLabel(), part, link_params);
// set the tooltip for the Url label
if (! match.getTooltip().empty())
@@ -1638,8 +1657,6 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c
}
}
}
- prepend_newline = false;
-
// move on to the rest of the text after the Url
if (end < (S32)text.length())
{
@@ -1652,13 +1669,41 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c
break;
}
}
- if (part != (S32)LLTextParser::WHOLE) part=(S32)LLTextParser::END;
- if (end < (S32)text.length()) appendAndHighlightText(text, prepend_newline, part, style_params);
+ if (part != (S32)LLTextParser::WHOLE)
+ part=(S32)LLTextParser::END;
+ if (end < (S32)text.length())
+ appendAndHighlightTextImpl(text, part, style_params);
}
else
{
- appendAndHighlightText(new_text, prepend_newline, part, style_params);
+ appendAndHighlightTextImpl(new_text, part, style_params);
+ }
+}
+
+void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params)
+{
+ if (new_text.empty())
+ return;
+
+ if(prepend_newline)
+ appendLineBreakSegment(input_params);
+ std::string::size_type start = 0;
+ std::string::size_type pos = new_text.find("\n",start);
+
+ while(pos!=-1)
+ {
+ if(pos!=start)
+ {
+ std::string str = std::string(new_text,start,pos-start);
+ appendTextImpl(str,input_params);
+ }
+ appendLineBreakSegment(input_params);
+ start = pos+1;
+ pos = new_text.find("\n",start);
}
+
+ std::string str = std::string(new_text,start,new_text.length()-start);
+ appendTextImpl(str,input_params);
}
void LLTextBase::needsReflow(S32 index)
@@ -1667,10 +1712,28 @@ void LLTextBase::needsReflow(S32 index)
mReflowIndex = llmin(mReflowIndex, index);
}
-void LLTextBase::appendAndHighlightText(const std::string &new_text, bool prepend_newline, S32 highlight_part, const LLStyle::Params& style_params)
+void LLTextBase::appendLineBreakSegment(const LLStyle::Params& style_params)
+{
+ segment_vec_t segments;
+ LLStyleConstSP sp(new LLStyle(style_params));
+ segments.push_back(new LLLineBreakTextSegment(sp, getLength()));
+
+ insertStringNoUndo(getLength(), utf8str_to_wstring("\n"), &segments);
+}
+
+void LLTextBase::appendImageSegment(S32 highlight_part, const LLStyle::Params& style_params)
{
- if (new_text.empty()) return;
+ segment_vec_t segments;
+ LLStyleConstSP sp(new LLStyle(style_params));
+ segments.push_back(new LLImageTextSegment(sp, getLength(),*this));
+ insertStringNoUndo(getLength(), utf8str_to_wstring(" "), &segments);
+}
+
+
+
+void LLTextBase::appendAndHighlightTextImpl(const std::string &new_text, S32 highlight_part, const LLStyle::Params& style_params)
+{
// Save old state
S32 selection_start = mSelectionStart;
S32 selection_end = mSelectionEnd;
@@ -1683,13 +1746,11 @@ void LLTextBase::appendAndHighlightText(const std::string &new_text, bool prepen
setCursorPos(old_length);
- LLTextParser* highlight = LLTextParser::getInstance();
-
- if (mParseHighlights && highlight)
+ if (mParseHighlights)
{
LLStyle::Params highlight_params(style_params);
- LLSD pieces = highlight->parsePartialLineHighlights(new_text, highlight_params.color(), (LLTextParser::EHighlightPosition)highlight_part);
+ LLSD pieces = LLTextParser::instance().parsePartialLineHighlights(new_text, highlight_params.color(), (LLTextParser::EHighlightPosition)highlight_part);
for (S32 i = 0; i < pieces.size(); i++)
{
LLSD color_llsd = pieces[i]["color"];
@@ -1698,14 +1759,8 @@ void LLTextBase::appendAndHighlightText(const std::string &new_text, bool prepen
highlight_params.color = lcolor;
LLWString wide_text;
- if (prepend_newline && (i == 0 || pieces.size() <= 1 ))
- {
- wide_text = utf8str_to_wstring(std::string("\n") + pieces[i]["text"].asString());
- }
- else
- {
- wide_text = utf8str_to_wstring(pieces[i]["text"].asString());
- }
+ wide_text = utf8str_to_wstring(pieces[i]["text"].asString());
+
S32 cur_length = getLength();
LLStyleConstSP sp(new LLStyle(highlight_params));
LLTextSegmentPtr segmentp = new LLNormalTextSegment(sp, cur_length, cur_length + wide_text.size(), *this);
@@ -1717,17 +1772,7 @@ void LLTextBase::appendAndHighlightText(const std::string &new_text, bool prepen
else
{
LLWString wide_text;
-
- // Add carriage return if not first line
- if (getLength() != 0
- && prepend_newline)
- {
- wide_text = utf8str_to_wstring(std::string("\n") + new_text);
- }
- else
- {
- wide_text = utf8str_to_wstring(new_text);
- }
+ wide_text = utf8str_to_wstring(new_text);
segment_vec_t segments;
S32 segment_start = old_length;
@@ -1755,11 +1800,32 @@ void LLTextBase::appendAndHighlightText(const std::string &new_text, bool prepen
{
setCursorPos(cursor_pos);
}
+}
+
+void LLTextBase::appendAndHighlightText(const std::string &new_text, bool prepend_newline, S32 highlight_part, const LLStyle::Params& style_params)
+{
+ if (new_text.empty()) return;
+
+ if(prepend_newline)
+ appendLineBreakSegment(style_params);
+
+ std::string::size_type start = 0;
+ std::string::size_type pos = new_text.find("\n",start);
+
+ while(pos!=-1)
+ {
+ if(pos!=start)
+ {
+ std::string str = std::string(new_text,start,pos-start);
+ appendAndHighlightTextImpl(str,highlight_part, style_params);
+ }
+ appendLineBreakSegment(style_params);
+ start = pos+1;
+ pos = new_text.find("\n",start);
+ }
- //if( !allow_undo )
- //{
- // blockUndo();
- //}
+ std::string str = std::string(new_text,start,new_text.length()-start);
+ appendAndHighlightTextImpl(str,highlight_part, style_params);
}
@@ -1852,14 +1918,19 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round,
S32 text_width, text_height;
bool newline = segmentp->getDimensions(line_seg_offset, segment_line_length, text_width, text_height);
+ if(newline)
+ {
+ pos = segment_line_start + segmentp->getOffset(local_x - start_x, line_seg_offset, segment_line_length, round);
+ break;
+ }
+
// if we've reached a line of text *below* the mouse cursor, doc index is first character on that line
if (hit_past_end_of_line && local_y - mVisibleTextRect.mBottom + visible_region.mBottom > line_iter->mRect.mTop)
{
pos = segment_line_start;
break;
}
- if (local_x < start_x + text_width // cursor to left of right edge of text
- || newline) // or this line ends with a newline, set doc pos to newline char
+ if (local_x < start_x + text_width) // cursor to left of right edge of text
{
// Figure out which character we're nearest to.
S32 offset;
@@ -1883,13 +1954,13 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round,
pos = segment_line_start + offset;
break;
}
- else if (hit_past_end_of_line && segmentp->getEnd() >= line_iter->mDocIndexEnd - 1)
+ else if (hit_past_end_of_line && segmentp->getEnd() > line_iter->mDocIndexEnd - 1)
{
- // segment wraps to next line, so just set doc pos to start of next line (represented by mDocIndexEnd)
- pos = llmin(getLength(), line_iter->mDocIndexEnd);
+ // segment wraps to next line, so just set doc pos to the end of the line
+ // segment wraps to next line, so just set doc pos to start of next line (represented by mDocIndexEnd)
+ pos = llmin(getLength(), line_iter->mDocIndexEnd);
break;
}
-
start_x += text_width;
}
@@ -1958,11 +2029,18 @@ LLRect LLTextBase::getDocRectFromDocIndex(S32 pos) const
LLRect LLTextBase::getLocalRectFromDocIndex(S32 pos) const
{
+ LLRect content_window_rect = mScroller ? mScroller->getContentWindowRect() : getLocalRect();
+ if (mBorderVisible)
+ {
+ content_window_rect.stretch(-1);
+ }
+
LLRect local_rect;
+
if (mLineInfoList.empty())
{
// return default height rect in upper left
- local_rect = mVisibleTextRect;
+ local_rect = content_window_rect;
local_rect.mBottom = local_rect.mTop - (S32)(mDefaultFont->getLineHeight());
return local_rect;
}
@@ -1973,8 +2051,8 @@ LLRect LLTextBase::getLocalRectFromDocIndex(S32 pos) const
// compensate for scrolled, inset view of doc
LLRect scrolled_view_rect = getVisibleDocumentRect();
local_rect = doc_rect;
- local_rect.translate(mVisibleTextRect.mLeft - scrolled_view_rect.mLeft,
- mVisibleTextRect.mBottom - scrolled_view_rect.mBottom);
+ local_rect.translate(content_window_rect.mLeft - scrolled_view_rect.mLeft,
+ content_window_rect.mBottom - scrolled_view_rect.mBottom);
return local_rect;
}
@@ -2346,25 +2424,6 @@ F32 LLNormalTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selec
{
if( end - start > 0 )
{
- if ( mStyle->isImage() && (start >= 0) && (end <= mEnd - mStart))
- {
- // ...for images, only render the image, not the underlying text,
- // which is only a placeholder space
- LLColor4 color = LLColor4::white % mEditor.getDrawContext().mAlpha;
- LLUIImagePtr image = mStyle->getImage();
- S32 style_image_height = image->getHeight();
- S32 style_image_width = image->getWidth();
- // Text is drawn from the top of the draw_rect downward
- S32 text_center = draw_rect.mTop - (mFontHeight / 2);
- // Align image to center of text
- S32 image_bottom = text_center - (style_image_height / 2);
- image->draw(draw_rect.mLeft, image_bottom,
- style_image_width, style_image_height, color);
-
- const S32 IMAGE_HPAD = 3;
- return draw_rect.mLeft + style_image_width + IMAGE_HPAD;
- }
-
return drawClippedSegment( getStart() + start, getStart() + end, selection_start, selection_end, draw_rect);
}
return draw_rect.mLeft;
@@ -2377,11 +2436,6 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
const LLWString &text = mEditor.getWText();
- if ( text[seg_end-1] == '\n' )
- {
- --seg_end;
- }
-
F32 right_x = rect.mLeft;
if (!mStyle->isVisible())
{
@@ -2540,33 +2594,14 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt
{
height = 0;
width = 0;
- bool force_newline = false;
if (num_chars > 0)
{
height = mFontHeight;
const LLWString &text = mEditor.getWText();
// if last character is a newline, then return true, forcing line break
- llwchar last_char = text[mStart + first_char + num_chars - 1];
- if (last_char == '\n')
- {
- force_newline = true;
- // don't count newline in font width
- width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars - 1);
- }
- else
- {
- width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars);
- }
- }
-
- LLUIImagePtr image = mStyle->getImage();
- if( image.notNull())
- {
- width += image->getWidth();
- height = llmax(height, image->getHeight());
+ width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars);
}
-
- return force_newline;
+ return false;
}
S32 LLNormalTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const
@@ -2589,15 +2624,7 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin
num_pixels = llmax(0, num_pixels - image->getWidth());
}
- // search for newline and if found, truncate there
- S32 last_char = mStart + segment_offset;
- for (; last_char != mEnd; ++last_char)
- {
- if (text[last_char] == '\n')
- {
- break;
- }
- }
+ S32 last_char = mEnd;
// set max characters to length of segment, or to first newline
max_chars = llmin(max_chars, last_char - (mStart + segment_offset));
@@ -2625,8 +2652,7 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin
S32 last_char_in_run = mStart + segment_offset + num_chars;
// check length first to avoid indexing off end of string
if (last_char_in_run < mEnd
- && (last_char_in_run >= mEditor.getLength()
- || text[last_char_in_run] == '\n'))
+ && (last_char_in_run >= mEditor.getLength() ))
{
num_chars++;
}
@@ -2721,3 +2747,87 @@ void LLInlineViewSegment::linkToDocument(LLTextBase* editor)
{
editor->addDocumentChild(mView);
}
+
+LLLineBreakTextSegment::LLLineBreakTextSegment(LLStyleConstSP style,S32 pos):LLTextSegment(pos,pos+1)
+{
+ mFontHeight = llceil(style->getFont()->getLineHeight());
+}
+LLLineBreakTextSegment::~LLLineBreakTextSegment()
+{
+}
+bool LLLineBreakTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const
+{
+ width = 0;
+ height = mFontHeight;
+
+ return true;
+}
+S32 LLLineBreakTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const
+{
+ return 1;
+}
+F32 LLLineBreakTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
+{
+ return draw_rect.mLeft;
+}
+
+LLImageTextSegment::LLImageTextSegment(LLStyleConstSP style,S32 pos,class LLTextBase& editor)
+ :LLTextSegment(pos,pos+1)
+ ,mStyle( style )
+ ,mEditor(editor)
+{
+}
+
+LLImageTextSegment::~LLImageTextSegment()
+{
+}
+
+static const S32 IMAGE_HPAD = 3;
+
+bool LLImageTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const
+{
+ width = 0;
+ height = llceil(mStyle->getFont()->getLineHeight());;
+
+ LLUIImagePtr image = mStyle->getImage();
+ if( image.notNull())
+ {
+ width += image->getWidth() + IMAGE_HPAD;
+ height = llmax(height, image->getHeight() + IMAGE_HPAD );
+ }
+ return false;
+}
+
+S32 LLImageTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const
+{
+ LLUIImagePtr image = mStyle->getImage();
+ S32 image_width = image->getWidth();
+ if(num_pixels>image_width + IMAGE_HPAD)
+ {
+ return 1;
+ }
+
+ return 0;
+}
+F32 LLImageTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
+{
+ if ( (start >= 0) && (end <= mEnd - mStart))
+ {
+ LLColor4 color = LLColor4::white % mEditor.getDrawContext().mAlpha;
+ LLUIImagePtr image = mStyle->getImage();
+ S32 style_image_height = image->getHeight();
+ S32 style_image_width = image->getWidth();
+ // Text is drawn from the top of the draw_rect downward
+
+ S32 text_center = draw_rect.mTop - (draw_rect.getHeight() / 2);
+ // Align image to center of draw rect
+ S32 image_bottom = text_center - (style_image_height / 2);
+ image->draw(draw_rect.mLeft, image_bottom,
+ style_image_width, style_image_height, color);
+
+ const S32 IMAGE_HPAD = 3;
+ return draw_rect.mLeft + style_image_width + IMAGE_HPAD;
+ }
+ return 0.0;
+}
+
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 8ed0680df9..176308c61a 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -316,6 +316,13 @@ protected:
void needsScroll() { mScrollNeeded = TRUE; }
void replaceUrlLabel(const std::string &url, const std::string &label);
+ void appendLineBreakSegment(const LLStyle::Params& style_params);
+ void appendImageSegment(S32 highlight_part, const LLStyle::Params& style_params);
+
+ void appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params = LLStyle::Params());
+ void appendAndHighlightTextImpl(const std::string &new_text, S32 highlight_part, const LLStyle::Params& style_params);
+
+
protected:
// text segmentation and flow
segment_set_t mSegments;
@@ -507,5 +514,32 @@ private:
bool mForceNewLine;
};
+class LLLineBreakTextSegment : public LLTextSegment
+{
+public:
+
+ LLLineBreakTextSegment(LLStyleConstSP style,S32 pos);
+ ~LLLineBreakTextSegment();
+ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
+ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
+ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
+
+private:
+ S32 mFontHeight;
+};
+
+class LLImageTextSegment : public LLTextSegment
+{
+public:
+ LLImageTextSegment(LLStyleConstSP style,S32 pos,class LLTextBase& editor);
+ ~LLImageTextSegment();
+ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
+ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
+ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
+
+private:
+ class LLTextBase& mEditor;
+ LLStyleConstSP mStyle;
+};
#endif
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 4fd62045e8..c9474d66b7 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -1083,6 +1083,28 @@ void LLTextEditor::addChar(llwchar wc)
setCursorPos(mCursorPos + addChar( mCursorPos, wc ));
}
+void LLTextEditor::addLineBreakChar()
+{
+ if( !getEnabled() )
+ {
+ return;
+ }
+ if( hasSelection() )
+ {
+ deleteSelection(TRUE);
+ }
+ else if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode())
+ {
+ removeChar(mCursorPos);
+ }
+
+ LLStyleConstSP sp(new LLStyle(LLStyle::Params()));
+ LLTextSegmentPtr segment = new LLLineBreakTextSegment(sp, mCursorPos);
+
+ S32 pos = execute(new TextCmdAddChar(mCursorPos, FALSE, '\n', segment));
+
+ setCursorPos(mCursorPos + pos);
+}
BOOL LLTextEditor::handleSelectionKey(const KEY key, const MASK mask)
@@ -1404,7 +1426,27 @@ void LLTextEditor::pasteHelper(bool is_primary)
}
// Insert the new text into the existing text.
- setCursorPos(mCursorPos + insert(mCursorPos, clean_string, FALSE, LLTextSegmentPtr()));
+
+ //paste text with linebreaks.
+ std::basic_string<llwchar>::size_type start = 0;
+ std::basic_string<llwchar>::size_type pos = clean_string.find('\n',start);
+
+ while(pos!=-1)
+ {
+ if(pos!=start)
+ {
+ std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,pos-start);
+ setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr()));
+ }
+ addLineBreakChar();
+
+ start = pos+1;
+ pos = clean_string.find('\n',start);
+ }
+
+ std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,clean_string.length()-start);
+ setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr()));
+
deselect();
onKeyStroke();
@@ -2169,7 +2211,10 @@ void LLTextEditor::autoIndent()
}
// Insert that number of spaces on the new line
- addChar( '\n' );
+
+ //appendLineBreakSegment(LLStyle::Params());//addChar( '\n' );
+ addLineBreakChar();
+
for( i = 0; i < space_count; i++ )
{
addChar( ' ' );
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 9b3ab9414c..7b68974fd8 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -240,6 +240,7 @@ protected:
// Undoable operations
void addChar(llwchar c); // at mCursorPos
S32 addChar(S32 pos, llwchar wc);
+ void addLineBreakChar();
S32 overwriteChar(S32 pos, llwchar wc);
void removeChar();
S32 removeChar(S32 pos);
diff --git a/indra/llui/lltextparser.cpp b/indra/llui/lltextparser.cpp
index 76a39e3094..2493afcb5d 100644
--- a/indra/llui/lltextparser.cpp
+++ b/indra/llui/lltextparser.cpp
@@ -43,29 +43,14 @@
#include "v4color.h"
#include "lldir.h"
-// Routines used for parsing text for TextParsers and html
-
-LLTextParser* LLTextParser::sInstance = NULL;
-
//
// Member Functions
//
-LLTextParser::~LLTextParser()
-{
- sInstance=NULL;
-}
+LLTextParser::LLTextParser()
+: mLoaded(false)
+{}
-// static
-LLTextParser* LLTextParser::getInstance()
-{
- if (!sInstance)
- {
- sInstance = new LLTextParser();
- sInstance->loadFromDisk();
- }
- return sInstance;
-}
// Moved triggerAlerts() to llfloaterchat.cpp to break llui/llaudio library dependency.
@@ -105,6 +90,8 @@ S32 LLTextParser::findPattern(const std::string &text, LLSD highlight)
LLSD LLTextParser::parsePartialLineHighlights(const std::string &text, const LLColor4 &color, EHighlightPosition part, S32 index)
{
+ loadKeywords();
+
//evil recursive string atomizer.
LLSD ret_llsd, start_llsd, middle_llsd, end_llsd;
@@ -195,6 +182,8 @@ LLSD LLTextParser::parsePartialLineHighlights(const std::string &text, const LLC
bool LLTextParser::parseFullLineHighlights(const std::string &text, LLColor4 *color)
{
+ loadKeywords();
+
for (S32 i=0;i<mHighlights.size();i++)
{
if ((S32)mHighlights[i]["highlight"]==ALL || (S32)mHighlights[i]["condition"]==MATCHES)
@@ -221,14 +210,14 @@ std::string LLTextParser::getFileName()
return path;
}
-LLSD LLTextParser::loadFromDisk()
+void LLTextParser::loadKeywords()
{
- std::string filename=getFileName();
- if (filename.empty())
- {
- llwarns << "LLTextParser::loadFromDisk() no valid user directory." << llendl;
+ if (mLoaded)
+ {// keywords already loaded
+ return;
}
- else
+ std::string filename=getFileName();
+ if (!filename.empty())
{
llifstream file;
file.open(filename.c_str());
@@ -237,9 +226,8 @@ LLSD LLTextParser::loadFromDisk()
LLSDSerialize::fromXML(mHighlights, file);
}
file.close();
+ mLoaded = true;
}
-
- return mHighlights;
}
bool LLTextParser::saveToDisk(LLSD highlights)
diff --git a/indra/llui/lltextparser.h b/indra/llui/lltextparser.h
index 072ac0f300..3005822f43 100644
--- a/indra/llui/lltextparser.h
+++ b/indra/llui/lltextparser.h
@@ -35,12 +35,13 @@
#define LL_LLTEXTPARSER_H
#include "llsd.h"
+#include "llsingleton.h"
class LLUUID;
class LLVector3d;
class LLColor4;
-class LLTextParser
+class LLTextParser : public LLSingleton<LLTextParser>
{
public:
typedef enum e_condition_type { CONTAINS, MATCHES, STARTS_WITH, ENDS_WITH } EConditionType;
@@ -48,22 +49,20 @@ public:
typedef enum e_highlight_position { WHOLE, START, MIDDLE, END } EHighlightPosition;
typedef enum e_dialog_action { ACTION_NONE, ACTION_CLOSE, ACTION_ADD, ACTION_COPY, ACTION_UPDATE } EDialogAction;
- static LLTextParser* getInstance();
- LLTextParser(){};
- ~LLTextParser();
+ LLTextParser();
- S32 findPattern(const std::string &text, LLSD highlight);
LLSD parsePartialLineHighlights(const std::string &text,const LLColor4 &color, EHighlightPosition part=WHOLE, S32 index=0);
bool parseFullLineHighlights(const std::string &text, LLColor4 *color);
+private:
+ S32 findPattern(const std::string &text, LLSD highlight);
std::string getFileName();
- LLSD loadFromDisk();
+ void loadKeywords();
bool saveToDisk(LLSD highlights);
public:
LLSD mHighlights;
-private:
- static LLTextParser* sInstance;
+ bool mLoaded;
};
#endif
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index 71f030677a..3c21fe8d61 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -94,6 +94,8 @@ public:
/// is this a match for a URL that should not be hyperlinked?
bool isLinkDisabled() const { return mDisabledLink; }
+ virtual LLUUID getID(const std::string &string) const { return LLUUID::null; }
+
protected:
std::string getIDStringFromUrl(const std::string &url) const;
std::string escapeUrl(const std::string &url) const;
diff --git a/indra/llui/llurlmatch.cpp b/indra/llui/llurlmatch.cpp
index 72a199c220..7c96665ce4 100644
--- a/indra/llui/llurlmatch.cpp
+++ b/indra/llui/llurlmatch.cpp
@@ -51,7 +51,7 @@ void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url,
const std::string &label, const std::string &tooltip,
const std::string &icon, const LLUIColor& color,
const std::string &menu, const std::string &location,
- bool disabled_link)
+ bool disabled_link, const LLUUID& id)
{
mStart = start;
mEnd = end;
@@ -63,4 +63,5 @@ void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url,
mMenuName = menu;
mLocation = location;
mDisabledLink = disabled_link;
+ mID = id;
}
diff --git a/indra/llui/llurlmatch.h b/indra/llui/llurlmatch.h
index e86762548b..78dd2c528f 100644
--- a/indra/llui/llurlmatch.h
+++ b/indra/llui/llurlmatch.h
@@ -90,7 +90,10 @@ public:
void setValues(U32 start, U32 end, const std::string &url, const std::string &label,
const std::string &tooltip, const std::string &icon,
const LLUIColor& color, const std::string &menu,
- const std::string &location, bool disabled_link);
+ const std::string &location, bool disabled_link
+ , const LLUUID& id );
+
+ const LLUUID& getID() const { return mID;}
private:
U32 mStart;
@@ -101,6 +104,8 @@ private:
std::string mIcon;
std::string mMenuName;
std::string mLocation;
+
+ LLUUID mID;
LLUIColor mColor;
bool mDisabledLink;
};
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index 4341286eb4..1f86f72faa 100644
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -183,7 +183,8 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
match_entry->getColor(),
match_entry->getMenuName(),
match_entry->getLocation(url),
- match_entry->isLinkDisabled());
+ match_entry->isLinkDisabled(),
+ match_entry->getID(url));
return true;
}
@@ -217,7 +218,8 @@ bool LLUrlRegistry::findUrl(const LLWString &text, LLUrlMatch &match, const LLUr
match.getColor(),
match.getMenuName(),
match.getLocation(),
- match.isLinkDisabled());
+ match.isLinkDisabled(),
+ match.getID());
return true;
}
return false;
diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp
index 24a32de268..06b850d233 100644
--- a/indra/llui/tests/llurlmatch_test.cpp
+++ b/indra/llui/tests/llurlmatch_test.cpp
@@ -54,7 +54,7 @@ namespace tut
LLUrlMatch match;
ensure("empty()", match.empty());
- match.setValues(0, 1, "http://secondlife.com", "Second Life", "", "", LLUIColor(), "", "", false);
+ match.setValues(0, 1, "http://secondlife.com", "Second Life", "", "", LLUIColor(), "", "", false,LLUUID::null);
ensure("! empty()", ! match.empty());
}
@@ -67,7 +67,7 @@ namespace tut
LLUrlMatch match;
ensure_equals("getStart() == 0", match.getStart(), 0);
- match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false);
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false,LLUUID::null);
ensure_equals("getStart() == 10", match.getStart(), 10);
}
@@ -80,7 +80,7 @@ namespace tut
LLUrlMatch match;
ensure_equals("getEnd() == 0", match.getEnd(), 0);
- match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false);
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false,LLUUID::null);
ensure_equals("getEnd() == 20", match.getEnd(), 20);
}
@@ -93,10 +93,10 @@ namespace tut
LLUrlMatch match;
ensure_equals("getUrl() == ''", match.getUrl(), "");
- match.setValues(10, 20, "http://slurl.com/", "", "", "", LLUIColor(), "", "", false);
+ match.setValues(10, 20, "http://slurl.com/", "", "", "", LLUIColor(), "", "", false,LLUUID::null);
ensure_equals("getUrl() == 'http://slurl.com/'", match.getUrl(), "http://slurl.com/");
- match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false);
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false,LLUUID::null);
ensure_equals("getUrl() == '' (2)", match.getUrl(), "");
}
@@ -109,10 +109,10 @@ namespace tut
LLUrlMatch match;
ensure_equals("getLabel() == ''", match.getLabel(), "");
- match.setValues(10, 20, "", "Label", "", "", LLUIColor(), "", "", false);
+ match.setValues(10, 20, "", "Label", "", "", LLUIColor(), "", "", false,LLUUID::null);
ensure_equals("getLabel() == 'Label'", match.getLabel(), "Label");
- match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false);
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false,LLUUID::null);
ensure_equals("getLabel() == '' (2)", match.getLabel(), "");
}
@@ -125,10 +125,10 @@ namespace tut
LLUrlMatch match;
ensure_equals("getTooltip() == ''", match.getTooltip(), "");
- match.setValues(10, 20, "", "", "Info", "", LLUIColor(), "", "", false);
+ match.setValues(10, 20, "", "", "Info", "", LLUIColor(), "", "", false,LLUUID::null);
ensure_equals("getTooltip() == 'Info'", match.getTooltip(), "Info");
- match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false);
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false,LLUUID::null);
ensure_equals("getTooltip() == '' (2)", match.getTooltip(), "");
}
@@ -141,10 +141,10 @@ namespace tut
LLUrlMatch match;
ensure_equals("getIcon() == ''", match.getIcon(), "");
- match.setValues(10, 20, "", "", "", "Icon", LLUIColor(), "", "", false);
+ match.setValues(10, 20, "", "", "", "Icon", LLUIColor(), "", "", false,LLUUID::null);
ensure_equals("getIcon() == 'Icon'", match.getIcon(), "Icon");
- match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false);
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false,LLUUID::null);
ensure_equals("getIcon() == '' (2)", match.getIcon(), "");
}
@@ -157,10 +157,10 @@ namespace tut
LLUrlMatch match;
ensure("getMenuName() empty", match.getMenuName().empty());
- match.setValues(10, 20, "", "", "", "Icon", LLUIColor(), "xui_file.xml", "", false);
+ match.setValues(10, 20, "", "", "", "Icon", LLUIColor(), "xui_file.xml", "", false,LLUUID::null);
ensure_equals("getMenuName() == \"xui_file.xml\"", match.getMenuName(), "xui_file.xml");
- match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false);
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false,LLUUID::null);
ensure("getMenuName() empty (2)", match.getMenuName().empty());
}
@@ -173,10 +173,10 @@ namespace tut
LLUrlMatch match;
ensure("getLocation() empty", match.getLocation().empty());
- match.setValues(10, 20, "", "", "", "Icon", LLUIColor(), "xui_file.xml", "Paris", false);
+ match.setValues(10, 20, "", "", "", "Icon", LLUIColor(), "xui_file.xml", "Paris", false,LLUUID::null);
ensure_equals("getLocation() == \"Paris\"", match.getLocation(), "Paris");
- match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false);
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "", false,LLUUID::null);
ensure("getLocation() empty (2)", match.getLocation().empty());
}
}
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 128d67d73d..b00104c427 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -275,6 +275,7 @@ set(viewer_SOURCE_FILES
lllogchat.cpp
llloginhandler.cpp
lllogininstance.cpp
+ llmachineid.cpp
llmanip.cpp
llmaniprotate.cpp
llmanipscale.cpp
@@ -378,6 +379,7 @@ set(viewer_SOURCE_FILES
llregionposition.cpp
llremoteparcelrequest.cpp
llsavedsettingsglue.cpp
+ llsaveoutfitcombobtn.cpp
llscreenchannel.cpp
llscriptfloater.cpp
llscrollingpanelparam.cpp
@@ -464,6 +466,7 @@ set(viewer_SOURCE_FILES
llviewchildren.cpp
llviewerassetstorage.cpp
llviewerassettype.cpp
+ llviewerattachmenu.cpp
llvieweraudio.cpp
llviewercamera.cpp
llviewerchat.cpp
@@ -792,6 +795,7 @@ set(viewer_HEADER_FILES
lllogchat.h
llloginhandler.h
lllogininstance.h
+ llmachineid.h
llmanip.h
llmaniprotate.h
llmanipscale.h
@@ -892,6 +896,7 @@ set(viewer_HEADER_FILES
llresourcedata.h
llrootview.h
llsavedsettingsglue.h
+ llsaveoutfitcombobtn.h
llscreenchannel.h
llscriptfloater.h
llscrollingpanelparam.h
@@ -980,6 +985,7 @@ set(viewer_HEADER_FILES
llviewchildren.h
llviewerassetstorage.h
llviewerassettype.h
+ llviewerattachmenu.h
llvieweraudio.h
llviewercamera.h
llviewerchat.h
@@ -1841,7 +1847,7 @@ if (LL_TESTS)
)
LL_ADD_INTEGRATION_TEST(llsechandler_basic
- llsechandler_basic.cpp
+ llsechandler_basic.cpp
"${test_libs}"
)
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 717a477cdf..6204c8047a 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -574,6 +574,17 @@
<key>Value</key>
<integer>2</integer>
</map>
+ <key>AvatarBakedTextureTimeout</key>
+ <map>
+ <key>Comment</key>
+ <string>Specifes the maximum time in seconds to wait before sending your baked textures for avatar appearance. Set to 0 to disable and wait until all baked textures are at highest resolution.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>AvatarSex</key>
<map>
<key>Comment</key>
@@ -621,7 +632,18 @@
<key>BlockAvatarAppearanceMessages</key>
<map>
<key>Comment</key>
- <string>Ignore's appearance messages (for simulating Ruth)</string>
+ <string>Ignores appearance messages (for simulating Ruth)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>BlockSomeAvatarAppearanceVisualParams</key>
+ <map>
+ <key>Comment</key>
+ <string>Drop around 50% of VisualParam occurances in appearance messages (for simulating Ruth)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -8283,17 +8305,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowSidebarButton</key>
- <map>
- <key>Comment</key>
- <string>Shows/hides Sidebar button in the bottom tray.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ShowSnapshotButton</key>
<map>
<key>Comment</key>
@@ -8836,17 +8847,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>SidebarWithButtonsVisibility</key>
- <map>
- <key>Comment</key>
- <string>Sets visibility of sidebar with its tabs' buttons</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>SkinCurrent</key>
<map>
<key>Comment</key>
@@ -11373,5 +11373,16 @@
<string>mini_map</string>
</array>
</map>
+ <key>LandmarksSortedByDate</key>
+ <map>
+ <key>Comment</key>
+ <string>Reflects landmarks panel sorting order.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml
index 5efd997ab7..9564236ad2 100644
--- a/indra/newview/character/avatar_lad.xml
+++ b/indra/newview/character/avatar_lad.xml
@@ -4782,7 +4782,7 @@
group="1"
name="Saddlebags"
wearable="shape"
- edit_grouo="driven"
+ edit_group="driven"
value_min="-.5"
value_max="3">
<param_morph>
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index b4add267fe..de4d787d65 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -26,6 +26,7 @@ list all
RenderAnisotropic 1 0
RenderAvatarCloth 1 1
RenderAvatarLODFactor 1 1.0
+RenderAvatarMaxVisible 1 35
RenderAvatarVP 1 1
RenderCubeMap 1 1
RenderDelayVBUpdate 1 0
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 4fb529ab39..adda7cec4d 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -26,6 +26,7 @@ list all
RenderAnisotropic 1 0
RenderAvatarCloth 1 1
RenderAvatarLODFactor 1 1.0
+RenderAvatarMaxVisible 1 35
RenderAvatarVP 1 1
RenderCubeMap 1 1
RenderDelayVBUpdate 1 0
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index fbc589d3e7..82886d7e2c 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -26,6 +26,7 @@ list all
RenderAnisotropic 1 0
RenderAvatarCloth 0 0
RenderAvatarLODFactor 1 1.0
+RenderAvatarMaxVisible 1 35
RenderAvatarVP 1 0
RenderCubeMap 1 1
RenderDelayVBUpdate 1 0
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 066e082cae..aa3059fa26 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -718,16 +718,16 @@ U32 LLAgentWearables::pushWearable(const LLWearableType::EType type, LLWearable
{
// no null wearables please!
llwarns << "Null wearable sent for type " << type << llendl;
- return MAX_WEARABLES_PER_TYPE;
+ return MAX_CLOTHING_PER_TYPE;
}
- if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_WEARABLES_PER_TYPE)
+ if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_CLOTHING_PER_TYPE)
{
mWearableDatas[type].push_back(wearable);
wearableUpdated(wearable);
checkWearableAgainstInventory(wearable);
return mWearableDatas[type].size()-1;
}
- return MAX_WEARABLES_PER_TYPE;
+ return MAX_CLOTHING_PER_TYPE;
}
void LLAgentWearables::wearableUpdated(LLWearable *wearable)
@@ -764,7 +764,7 @@ void LLAgentWearables::popWearable(LLWearable *wearable)
U32 index = getWearableIndex(wearable);
LLWearableType::EType type = wearable->getType();
- if (index < MAX_WEARABLES_PER_TYPE && index < getWearableCount(type))
+ if (index < MAX_CLOTHING_PER_TYPE && index < getWearableCount(type))
{
popWearable(type, index);
}
@@ -785,7 +785,7 @@ U32 LLAgentWearables::getWearableIndex(LLWearable *wearable)
{
if (wearable == NULL)
{
- return MAX_WEARABLES_PER_TYPE;
+ return MAX_CLOTHING_PER_TYPE;
}
const LLWearableType::EType type = wearable->getType();
@@ -793,7 +793,7 @@ U32 LLAgentWearables::getWearableIndex(LLWearable *wearable)
if (wearable_iter == mWearableDatas.end())
{
llwarns << "tried to get wearable index with an invalid type!" << llendl;
- return MAX_WEARABLES_PER_TYPE;
+ return MAX_CLOTHING_PER_TYPE;
}
const wearableentry_vec_t& wearable_vec = wearable_iter->second;
for(U32 index = 0; index < wearable_vec.size(); index++)
@@ -804,7 +804,7 @@ U32 LLAgentWearables::getWearableIndex(LLWearable *wearable)
}
}
- return MAX_WEARABLES_PER_TYPE;
+ return MAX_CLOTHING_PER_TYPE;
}
const LLWearable* LLAgentWearables::getWearable(const LLWearableType::EType type, U32 index) const
@@ -1976,6 +1976,32 @@ bool LLAgentWearables::moveWearable(const LLViewerInventoryItem* item, bool clos
}
// static
+void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, const LLUUID& parent_id)
+{
+ LLWearable* wearable = LLWearableList::instance().createNewWearable(type);
+ LLAssetType::EType asset_type = wearable->getAssetType();
+ LLInventoryType::EType inv_type = LLInventoryType::IT_WEARABLE;
+ LLPointer<LLInventoryCallback> cb = wear ? new WearOnAvatarCallback : NULL;
+ LLUUID folder_id;
+
+ if (parent_id.notNull())
+ {
+ folder_id = parent_id;
+ }
+ else
+ {
+ LLFolderType::EType folder_type = LLFolderType::assetTypeToFolderType(asset_type);
+ folder_id = gInventory.findCategoryUUIDForType(folder_type);
+ }
+
+ create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
+ folder_id, wearable->getTransactionID(), wearable->getName(),
+ wearable->getDescription(), asset_type, inv_type, wearable->getType(),
+ wearable->getPermissions().getMaskNextOwner(),
+ cb);
+}
+
+// static
void LLAgentWearables::editWearable(const LLUUID& item_id)
{
LLViewerInventoryItem* item;
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index c53b1333fc..6d379746ba 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -102,6 +102,9 @@ public:
U32 getWearableCount(const LLWearableType::EType type) const;
U32 getWearableCount(const U32 tex_index) const;
+ static const U32 MAX_CLOTHING_PER_TYPE = 5;
+
+
//--------------------------------------------------------------------
// Setters
//--------------------------------------------------------------------
@@ -141,6 +144,7 @@ protected:
//--------------------------------------------------------------------
public:
+ static void createWearable(LLWearableType::EType type, bool wear = false, const LLUUID& parent_id = LLUUID::null);
static void editWearable(const LLUUID& item_id);
bool moveWearable(const LLViewerInventoryItem* item, bool closer_to_body);
@@ -274,8 +278,6 @@ private:
LLPointer<LLRefCount> mCB;
};
- static const U32 MAX_WEARABLES_PER_TYPE = 1;
-
}; // LLAgentWearables
extern LLAgentWearables gAgentWearables;
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index 43a0d48d8b..ef0b97d376 100644
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -40,6 +40,50 @@
#include "llstartup.h"
#include "llvoavatarself.h"
+
+class LLOrderMyOutfitsOnDestroy: public LLInventoryCallback
+{
+public:
+ LLOrderMyOutfitsOnDestroy() {};
+
+ virtual ~LLOrderMyOutfitsOnDestroy()
+ {
+ const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
+ if (my_outfits_id.isNull()) return;
+
+ LLInventoryModel::cat_array_t* cats;
+ LLInventoryModel::item_array_t* items;
+ gInventory.getDirectDescendentsOf(my_outfits_id, cats, items);
+ if (!cats) return;
+
+ //My Outfits should at least contain saved initial outfit and one another outfit
+ if (cats->size() < 2)
+ {
+ llwarning("My Outfits category was not populated properly", 0);
+ return;
+ }
+
+ llinfos << "Starting updating My Outfits with wearables ordering information" << llendl;
+
+ for (LLInventoryModel::cat_array_t::iterator outfit_iter = cats->begin();
+ outfit_iter != cats->end(); ++outfit_iter)
+ {
+ const LLUUID& cat_id = (*outfit_iter)->getUUID();
+ if (cat_id.isNull()) continue;
+
+ // saved initial outfit already contains wearables ordering information
+ if (cat_id == LLAppearanceMgr::getInstance()->getBaseOutfitUUID()) continue;
+
+ LLAppearanceMgr::getInstance()->updateClothingOrderingInfo(cat_id);
+ }
+
+ llinfos << "Finished updating My Outfits with wearables ordering information" << llendl;
+ }
+
+ /* virtual */ void fire(const LLUUID& inv_item) {};
+};
+
+
LLInitialWearablesFetch::LLInitialWearablesFetch(const LLUUID& cof_id) :
LLInventoryFetchDescendentsObserver(cof_id)
{
@@ -483,6 +527,8 @@ void LLLibraryOutfitsFetch::contentsDone()
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t wearable_array;
+ LLPointer<LLOrderMyOutfitsOnDestroy> order_myoutfits_on_destroy = new LLOrderMyOutfitsOnDestroy;
+
for (uuid_vec_t::const_iterator folder_iter = mImportedClothingFolders.begin();
folder_iter != mImportedClothingFolders.end();
++folder_iter)
@@ -518,7 +564,7 @@ void LLLibraryOutfitsFetch::contentsDone()
item->getName(),
item->getDescription(),
LLAssetType::AT_LINK,
- NULL);
+ order_myoutfits_on_destroy);
}
}
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 8cc4436188..e6f363028a 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -276,12 +276,14 @@ void LLWearableHoldingPattern::checkMissingWearables()
if (found_by_type[type] > 0)
continue;
if (
- // Need to recover if at least one wearable of that type
- // was requested but none was found (prevent missing
- // pants)
- (requested_by_type[type] > 0) ||
- // or if type is a body part and no wearables were found.
- ((type == LLWearableType::WT_SHAPE) || (type == LLWearableType::WT_SKIN) || (type == LLWearableType::WT_HAIR) || (type == LLWearableType::WT_EYES)))
+ // If at least one wearable of certain types (pants/shirt/skirt)
+ // was requested but none was found, create a default asset as a replacement.
+ // In all other cases, don't do anything.
+ // For critical types (shape/hair/skin/eyes), this will keep the avatar as a cloud
+ // due to logic in LLVOAvatarSelf::getIsCloud().
+ // For non-critical types (tatoo, socks, etc.) the wearable will just be missing.
+ (requested_by_type[type] > 0) &&
+ ((type == LLWearableType::WT_PANTS) || (type == LLWearableType::WT_SHIRT) || (type == LLWearableType::WT_SKIRT)))
{
mTypesToRecover.insert(type);
mTypesToLink.insert(type);
@@ -704,6 +706,40 @@ void LLAppearanceMgr::replaceCurrentOutfit(const LLUUID& new_outfit)
wearInventoryCategory(cat, false, false);
}
+// Open outfit renaming dialog.
+void LLAppearanceMgr::renameOutfit(const LLUUID& outfit_id)
+{
+ LLViewerInventoryCategory* cat = gInventory.getCategory(outfit_id);
+ if (!cat)
+ {
+ return;
+ }
+
+ LLSD args;
+ args["NAME"] = cat->getName();
+
+ LLSD payload;
+ payload["cat_id"] = outfit_id;
+
+ LLNotificationsUtil::add("RenameOutfit", args, payload, boost::bind(onOutfitRename, _1, _2));
+}
+
+// User typed new outfit name.
+// static
+void LLAppearanceMgr::onOutfitRename(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option != 0) return; // canceled
+
+ std::string outfit_name = response["new_name"].asString();
+ LLStringUtil::trim(outfit_name);
+ if (!outfit_name.empty())
+ {
+ LLUUID cat_id = notification["payload"]["cat_id"].asUUID();
+ rename_category(&gInventory, cat_id, outfit_name);
+ }
+}
+
void LLAppearanceMgr::addCategoryToCurrentOutfit(const LLUUID& cat_id)
{
LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
@@ -714,7 +750,7 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id)
{
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
- LLFindWearables collector;
+ LLFindWorn collector;
gInventory.collectDescendentsIf(cat_id, cats, items, FALSE, collector);
@@ -842,6 +878,41 @@ BOOL LLAppearanceMgr::getCanMakeFolderIntoOutfit(const LLUUID& folder_id)
return ((required_wearables & folder_wearables) == required_wearables);
}
+bool LLAppearanceMgr::getCanRemoveOutfit(const LLUUID& outfit_cat_id)
+{
+ // Disallow removing the base outfit.
+ if (outfit_cat_id == getBaseOutfitUUID())
+ {
+ return false;
+ }
+
+ // Check if the outfit folder itself is removable.
+ if (!get_is_category_removable(&gInventory, outfit_cat_id))
+ {
+ return false;
+ }
+
+ // Check if the folder contains worn items.
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ LLFindWorn filter_worn;
+ gInventory.collectDescendentsIf(outfit_cat_id, cats, items, false, filter_worn);
+ if (!items.empty())
+ {
+ return false;
+ }
+
+ // Check for the folder's non-removable descendants.
+ LLFindNonRemovableObjects filter_non_removable;
+ LLInventoryModel::item_array_t::const_iterator it;
+ gInventory.collectDescendentsIf(outfit_cat_id, cats, items, false, filter_non_removable);
+ if (!cats.empty() || !items.empty())
+ {
+ return false;
+ }
+
+ return true;
+}
void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category)
{
@@ -970,7 +1041,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
getDescendentsOfAssetType(category, wear_items, LLAssetType::AT_CLOTHING, false);
// Reduce wearables to max of one per type.
removeDuplicateItems(wear_items);
- filterWearableItems(wear_items, 5);
+ filterWearableItems(wear_items, LLAgentWearables::MAX_CLOTHING_PER_TYPE);
// - Attachments: include COF contents only if appending.
LLInventoryModel::item_array_t obj_items;
@@ -1525,11 +1596,12 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update
else
{
LLPointer<LLInventoryCallback> cb = do_update ? new ModifiedCOFCallback : 0;
+ const std::string description = vitem->getIsLinkType() ? vitem->getDescription() : "";
link_inventory_item( gAgent.getID(),
vitem->getLinkedUUID(),
getCOF(),
vitem->getName(),
- vitem->getDescription(),
+ description,
LLAssetType::AT_LINK,
cb);
}
@@ -1789,10 +1861,16 @@ struct WearablesOrderComparator
U32 mControlSize;
};
-void LLAppearanceMgr::updateClothingOrderingInfo()
+void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id)
{
+ if (cat_id.isNull())
+ {
+ cat_id = getCOF();
+ }
+
+ // COF is processed if cat_id is not specified
LLInventoryModel::item_array_t wear_items;
- getDescendentsOfAssetType(getCOF(), wear_items, LLAssetType::AT_CLOTHING, false);
+ getDescendentsOfAssetType(cat_id, wear_items, LLAssetType::AT_CLOTHING, false);
wearables_by_type_t items_by_type(LLWearableType::WT_COUNT);
divvyWearablesByType(wear_items, items_by_type);
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 96541beb7d..f1beef5857 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -59,6 +59,7 @@ public:
void wearOutfitByName(const std::string& name);
void changeOutfit(bool proceed, const LLUUID& category, bool append);
void replaceCurrentOutfit(const LLUUID& new_outfit);
+ void renameOutfit(const LLUUID& outfit_id);
void takeOffOutfit(const LLUUID& cat_id);
void addCategoryToCurrentOutfit(const LLUUID& cat_id);
@@ -69,6 +70,9 @@ public:
// Return whether this folder contains minimal contents suitable for making a full outfit.
BOOL getCanMakeFolderIntoOutfit(const LLUUID& folder_id);
+ // Determine whether a given outfit can be removed.
+ bool getCanRemoveOutfit(const LLUUID& outfit_cat_id);
+
// Copy all items in a category.
void shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id,
LLPointer<LLInventoryCallback> cb);
@@ -154,15 +158,16 @@ public:
//Divvy items into arrays by wearable type
static void divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type);
+ //Check ordering information on wearables stored in links' descriptions and update if it is invalid
+ // COF is processed if cat_id is not specified
+ void updateClothingOrderingInfo(LLUUID cat_id = LLUUID::null);
+
protected:
LLAppearanceMgr();
~LLAppearanceMgr();
private:
- //Check ordering information on wearables stored in links' descriptions and update if it is invalid
- void updateClothingOrderingInfo();
-
void filterWearableItems(LLInventoryModel::item_array_t& items, S32 max_per_type);
void getDescendentsOfAssetType(const LLUUID& category,
@@ -179,6 +184,8 @@ private:
void purgeCategory(const LLUUID& category, bool keep_outfit_links);
void purgeBaseOutfitLink(const LLUUID& category);
+ static void onOutfitRename(const LLSD& notification, const LLSD& response);
+
std::set<LLUUID> mRegisteredAttachments;
bool mAttachmentInvLinkEnabled;
bool mOutfitIsDirty;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 475a075d7e..f0b3740086 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -195,6 +195,7 @@
// Include for security api initialization
#include "llsecapi.h"
+#include "llmachineid.h"
// *FIX: These extern globals should be cleaned up.
// The globals either represent state/config/resource-storage of either
@@ -619,6 +620,7 @@ bool LLAppViewer::init()
// *NOTE:Mani - LLCurl::initClass is not thread safe.
// Called before threads are created.
LLCurl::initClass();
+ LLMachineID::init();
initThreads();
writeSystemInfo();
@@ -890,7 +892,16 @@ bool LLAppViewer::init()
}
LLViewerMedia::initClass();
-
+
+ LLStringOps::setupWeekDaysNames(LLTrans::getString("dateTimeWeekdaysNames"));
+ LLStringOps::setupWeekDaysShortNames(LLTrans::getString("dateTimeWeekdaysShortNames"));
+ LLStringOps::setupMonthNames(LLTrans::getString("dateTimeMonthNames"));
+ LLStringOps::setupMonthShortNames(LLTrans::getString("dateTimeMonthShortNames"));
+ LLStringOps::setupDayFormat(LLTrans::getString("dateTimeDayFormat"));
+
+ LLStringOps::sAM = LLTrans::getString("dateTimeAM");
+ LLStringOps::sPM = LLTrans::getString("dateTimePM");
+
return true;
}
@@ -1806,7 +1817,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
}
else
{
- llwarns << "Cannot load " << full_settings_path << " - No settings found." << llendl;
+ llinfos << "Cannot load " << full_settings_path << " - No settings found." << llendl;
}
}
else
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 875ed72a12..01d6c3a8d5 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -475,32 +475,83 @@ namespace action_give_inventory
return acceptable;
}
- /**
- * Performs "give inventory" operations for provided avatars.
- *
- * Sends one requests to give all selected inventory items for each passed avatar.
- * Avatars are represent by two vectors: names and UUIDs which must be sychronized with each other.
- *
- * @param avatar_names - avatar names request to be sent.
- * @param avatar_uuids - avatar names request to be sent.
- */
- static void give_inventory(const std::vector<std::string>& avatar_names, const uuid_vec_t& avatar_uuids)
+ static void build_residents_string(const std::vector<std::string>& avatar_names, std::string& residents_string)
{
- llassert(avatar_names.size() == avatar_uuids.size());
+ llassert(avatar_names.size() > 0);
+
+ const std::string& separator = LLTrans::getString("words_separator");
+ for (std::vector<std::string>::const_iterator it = avatar_names.begin(); ; )
+ {
+ residents_string.append(*it);
+ if (++it == avatar_names.end())
+ {
+ break;
+ }
+ residents_string.append(separator);
+ }
+ }
+
+ static void build_items_string(const uuid_set_t& inventory_selected_uuids , std::string& items_string)
+ {
+ llassert(inventory_selected_uuids.size() > 0);
+
+ const std::string& separator = LLTrans::getString("words_separator");
+ for (uuid_set_t::const_iterator it = inventory_selected_uuids.begin(); ; )
+ {
+ LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it);
+ if (NULL != inv_cat)
+ {
+ items_string = inv_cat->getName();
+ break;
+ }
+ LLViewerInventoryItem* inv_item = gInventory.getItem(*it);
+ if (NULL != inv_item)
+ {
+ items_string.append(inv_item->getName());
+ }
+ if(++it == inventory_selected_uuids.end())
+ {
+ break;
+ }
+ items_string.append(separator);
+ }
+ }
+
+ struct LLShareInfo : public LLSingleton<LLShareInfo>
+ {
+ std::vector<std::string> mAvatarNames;
+ uuid_vec_t mAvatarUuids;
+ };
+
+ static void give_inventory_cb(const LLSD& notification, const LLSD& response)
+ {
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ // if Cancel pressed
+ if (option == 1)
+ {
+ return;
+ }
LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
- if (NULL == active_panel) return;
+ if (NULL == active_panel)
+ {
+ return;
+ }
const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList();
- if (inventory_selected_uuids.empty()) return;
+ if (inventory_selected_uuids.empty())
+ {
+ return;
+ }
- S32 count = llmin(avatar_names.size(), avatar_uuids.size());
+ S32 count = LLShareInfo::instance().mAvatarNames.size();
+ bool shared = false;
// iterate through avatars
for(S32 i = 0; i < count; ++i)
{
- const std::string& avatar_name = avatar_names[i];
- const LLUUID& avatar_uuid = avatar_uuids[i];
+ const std::string& avatar_name = LLShareInfo::instance().mAvatarNames[i];
+ const LLUUID& avatar_uuid = LLShareInfo::instance().mAvatarUuids[i];
// Start up IM before give the item
const LLUUID session_id = gIMMgr->addSession(avatar_name, IM_NOTHING_SPECIAL, avatar_uuid);
@@ -508,6 +559,9 @@ namespace action_give_inventory
uuid_set_t::const_iterator it = inventory_selected_uuids.begin();
const uuid_set_t::const_iterator it_end = inventory_selected_uuids.end();
+ const std::string& separator = LLTrans::getString("words_separator");
+ std::string noncopy_item_names;
+ LLSD noncopy_items = LLSD::emptyArray();
// iterate through selected inventory objects
for (; it != it_end; ++it)
{
@@ -515,12 +569,82 @@ namespace action_give_inventory
if (inv_cat)
{
LLGiveInventory::doGiveInventoryCategory(avatar_uuid, inv_cat, session_id);
+ shared = true;
break;
}
LLViewerInventoryItem* inv_item = gInventory.getItem(*it);
- LLGiveInventory::doGiveInventoryItem(avatar_uuid, inv_item, session_id);
+ if (!inv_item->getPermissions().allowCopyBy(gAgentID))
+ {
+ if (!noncopy_item_names.empty())
+ {
+ noncopy_item_names.append(separator);
+ }
+ noncopy_item_names.append(inv_item->getName());
+ noncopy_items.append(*it);
+ }
+ else
+ {
+ LLGiveInventory::doGiveInventoryItem(avatar_uuid, inv_item, session_id);
+ shared = true;
+ }
+ }
+ if (noncopy_items.beginArray() != noncopy_items.endArray())
+ {
+ LLSD substitutions;
+ substitutions["ITEMS"] = noncopy_item_names;
+ LLSD payload;
+ payload["agent_id"] = avatar_uuid;
+ payload["items"] = noncopy_items;
+ LLNotificationsUtil::add("CannotCopyWarning", substitutions, payload,
+ &LLGiveInventory::handleCopyProtectedItem);
+ break;
}
}
+ if (shared)
+ {
+ LLFloaterReg::hideInstance("avatar_picker");
+ LLNotificationsUtil::add("ItemsShared");
+ }
+ }
+
+ /**
+ * Performs "give inventory" operations for provided avatars.
+ *
+ * Sends one requests to give all selected inventory items for each passed avatar.
+ * Avatars are represent by two vectors: names and UUIDs which must be sychronized with each other.
+ *
+ * @param avatar_names - avatar names request to be sent.
+ * @param avatar_uuids - avatar names request to be sent.
+ */
+ static void give_inventory(const std::vector<std::string>& avatar_names, const uuid_vec_t& avatar_uuids)
+ {
+ llassert(avatar_names.size() == avatar_uuids.size());
+
+
+ LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
+ if (NULL == active_panel)
+ {
+ return;
+ }
+
+ const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList();
+ if (inventory_selected_uuids.empty())
+ {
+ return;
+ }
+
+ std::string residents;
+ build_residents_string(avatar_names, residents);
+
+ std::string items;
+ build_items_string(inventory_selected_uuids, items);
+
+ LLSD substitutions;
+ substitutions["RESIDENTS"] = residents;
+ substitutions["ITEMS"] = items;
+ LLShareInfo::instance().mAvatarNames = avatar_names;
+ LLShareInfo::instance().mAvatarUuids = avatar_uuids;
+ LLNotificationsUtil::add("ShareItemsConfirmation", substitutions, LLSD(), &give_inventory_cb);
}
}
@@ -532,7 +656,6 @@ void LLAvatarActions::shareWithAvatars()
LLFloaterAvatarPicker* picker =
LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2), TRUE, FALSE);
picker->setOkBtnEnableCb(boost::bind(is_give_inventory_acceptable));
- LLNotificationsUtil::add("ShareNotification");
}
// static
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index a057421135..7a3eddf7a6 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -198,6 +198,12 @@ LLBottomTray::~LLBottomTray()
S32 custom_width = mNearbyChatBar->getRect().getWidth();
gSavedSettings.setS32("ChatBarCustomWidth", custom_width);
}
+
+ // emulate previous floater behavior to be hidden on startup.
+ // override effect of save_visibility=true.
+ // this attribute is necessary to button.initial_callback=Button.SetFloaterToggle works properly:
+ // i.g when floater changes its visibility - button changes its toggle state.
+ getChild<LLUICtrl>("search_btn")->setControlValue(false);
}
// *TODO Vadim: why void* ?
@@ -1164,7 +1170,6 @@ void LLBottomTray::initResizeStateContainers()
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild<LLPanel>("movement_panel")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild<LLPanel>("cam_panel")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, getChild<LLPanel>("snapshot_panel")));
- mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SIDEBAR, getChild<LLPanel>("sidebar_btn_panel")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_BUILD, getChild<LLPanel>("build_btn_panel")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SEARCH, getChild<LLPanel>("search_btn_panel")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_WORLD_MAP, getChild<LLPanel>("world_map_btn_panel")));
@@ -1175,7 +1180,6 @@ void LLBottomTray::initResizeStateContainers()
mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT);
mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA);
mButtonsProcessOrder.push_back(RS_BUTTON_SNAPSHOT);
- mButtonsProcessOrder.push_back(RS_BUTTON_SIDEBAR);
mButtonsProcessOrder.push_back(RS_BUTTON_BUILD);
mButtonsProcessOrder.push_back(RS_BUTTON_SEARCH);
mButtonsProcessOrder.push_back(RS_BUTTON_WORLD_MAP);
@@ -1211,7 +1215,6 @@ void LLBottomTray::initButtonsVisibility()
setVisibleAndFitWidths(RS_BUTTON_MOVEMENT, gSavedSettings.getBOOL("ShowMoveButton"));
setVisibleAndFitWidths(RS_BUTTON_CAMERA, gSavedSettings.getBOOL("ShowCameraButton"));
setVisibleAndFitWidths(RS_BUTTON_SNAPSHOT, gSavedSettings.getBOOL("ShowSnapshotButton"));
- setVisibleAndFitWidths(RS_BUTTON_SIDEBAR, gSavedSettings.getBOOL("ShowSidebarButton"));
setVisibleAndFitWidths(RS_BUTTON_BUILD, gSavedSettings.getBOOL("ShowBuildButton"));
setVisibleAndFitWidths(RS_BUTTON_SEARCH, gSavedSettings.getBOOL("ShowSearchButton"));
setVisibleAndFitWidths(RS_BUTTON_WORLD_MAP, gSavedSettings.getBOOL("ShowWorldMapButton"));
@@ -1224,7 +1227,6 @@ void LLBottomTray::setButtonsControlsAndListeners()
gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MOVEMENT, _2));
gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_CAMERA, _2));
gSavedSettings.getControl("ShowSnapshotButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SNAPSHOT, _2));
- gSavedSettings.getControl("ShowSidebarButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SIDEBAR, _2));
gSavedSettings.getControl("ShowBuildButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_BUILD, _2));
gSavedSettings.getControl("ShowSearchButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SEARCH, _2));
gSavedSettings.getControl("ShowWorldMapButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_WORLD_MAP, _2));
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index c0887df39a..05fed53936 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -124,7 +124,6 @@ private:
, RS_BUTTON_SEARCH = 0x0400
, RS_BUTTON_WORLD_MAP = 0x0800
, RS_BUTTON_MINI_MAP = 0x1000
- , RS_BUTTON_SIDEBAR = 0x2000
/*
Once new button that can be hidden on resize is added don't forget to update related places:
@@ -139,7 +138,6 @@ private:
*/
, RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES
| RS_BUTTON_BUILD | RS_BUTTON_SEARCH | RS_BUTTON_WORLD_MAP | RS_BUTTON_MINI_MAP
- | RS_BUTTON_SIDEBAR
}EResizeState;
/**
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index bd14732b4a..0bd03571da 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -846,12 +846,3 @@ void LLChatHistory::draw()
LLUICtrl::draw();
}
-
-void LLChatHistory::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
- bool is_scrolled_to_end = mEditor->scrolledToEnd();
- LLUICtrl::reshape( width, height, called_from_parent );
- // update scroll
- if (is_scrolled_to_end)
- mEditor->setCursorAndScrollToEnd();
-}
diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h
index 950b32861b..fa1f2e04a4 100644
--- a/indra/newview/llchathistory.h
+++ b/indra/newview/llchathistory.h
@@ -122,7 +122,6 @@ class LLChatHistory : public LLUICtrl
*/
void appendMessage(const LLChat& chat, const LLSD &args = LLSD(), const LLStyle::Params& input_append_params = LLStyle::Params());
/*virtual*/ void clear();
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
private:
std::string mLastFromName;
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp
index 0864d63919..79ce2f8f6b 100644
--- a/indra/newview/llcofwearables.cpp
+++ b/indra/newview/llcofwearables.cpp
@@ -43,8 +43,9 @@
#include "llmenugl.h"
#include "llviewermenu.h"
#include "llwearableitemslist.h"
-
-static LLRegisterPanelClassWrapper<LLCOFAccordionListAdaptor> t_cof_accodion_list_adaptor("accordion_list_adaptor");
+#include "llpaneloutfitedit.h"
+#include "llsidetray.h"
+#include "lltrans.h"
static LLRegisterPanelClassWrapper<LLCOFWearables> t_cof_wearables("cof_wearables");
@@ -52,6 +53,39 @@ const LLSD REARRANGE = LLSD().with("rearrange", LLSD());
static const LLWearableItemNameComparator WEARABLE_NAME_COMPARATOR;
+//////////////////////////////////////////////////////////////////////////
+
+class CofContextMenu : public LLListContextMenu
+{
+protected:
+ static void updateCreateWearableLabel(LLMenuGL* menu, const LLUUID& item_id)
+ {
+ LLMenuItemGL* menu_item = menu->getChild<LLMenuItemGL>("create_new");
+
+ // Hide the "Create new <WEARABLE_TYPE>" if it's irrelevant.
+ LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id);
+ if (!item || !item->isWearableType())
+ {
+ menu_item->setVisible(FALSE);
+ return;
+ }
+
+ // Set proper label for the "Create new <WEARABLE_TYPE>" menu item.
+ LLStringUtil::format_map_t args;
+ LLWearableType::EType w_type = item->getWearableType();
+ args["[WEARABLE_TYPE]"] = LLWearableType::getTypeDefaultNewName(w_type);
+ std::string new_label = LLTrans::getString("CreateNewWearable", args);
+ menu_item->setLabel(new_label);
+ }
+
+ static void createNew(const LLUUID& item_id)
+ {
+ LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id);
+ if (!item || !item->isWearableType()) return;
+
+ LLAgentWearables::createWearable(item->getWearableType(), true);
+ }
+};
//////////////////////////////////////////////////////////////////////////
@@ -72,7 +106,7 @@ protected:
//////////////////////////////////////////////////////////////////////////
-class CofClothingContextMenu : public LLListContextMenu
+class CofClothingContextMenu : public CofContextMenu
{
protected:
@@ -87,10 +121,17 @@ protected:
registrar.add("Clothing.MoveUp", boost::bind(moveWearable, selected_id, false));
registrar.add("Clothing.MoveDown", boost::bind(moveWearable, selected_id, true));
registrar.add("Clothing.Edit", boost::bind(LLAgentWearables::editWearable, selected_id));
+ registrar.add("Clothing.Create", boost::bind(createNew, selected_id));
enable_registrar.add("Clothing.OnEnable", boost::bind(&CofClothingContextMenu::onEnable, this, _2));
- return createFromFile("menu_cof_clothing.xml");
+ LLContextMenu* menu = createFromFile("menu_cof_clothing.xml");
+ llassert(menu);
+ if (menu)
+ {
+ updateCreateWearableLabel(menu, selected_id);
+ }
+ return menu;
}
bool onEnable(const LLSD& data)
@@ -106,6 +147,10 @@ protected:
{
return gAgentWearables.canMoveWearable(selected_id, true);
}
+ else if ("take_off" == param)
+ {
+ return get_is_item_worn(selected_id);
+ }
else if ("edit" == param)
{
return gAgentWearables.isWearableModifiable(selected_id);
@@ -120,12 +165,11 @@ protected:
LLViewerInventoryItem* item = gInventory.getItem(item_id);
return LLAppearanceMgr::instance().moveWearable(item, closer_to_body);
}
-
};
//////////////////////////////////////////////////////////////////////////
-class CofBodyPartContextMenu : public LLListContextMenu
+class CofBodyPartContextMenu : public CofContextMenu
{
protected:
@@ -135,13 +179,22 @@ protected:
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
LLUUID selected_id = mUUIDs.back();
- registrar.add("BodyPart.Replace", boost::bind(&LLAppearanceMgr::wearItemOnAvatar,
- LLAppearanceMgr::getInstance(), selected_id, true, true));
+ // *HACK* need to pass pointer to LLPanelOutfitEdit instead of LLSideTray::getInstance()->getPanel().
+ // LLSideTray::getInstance()->getPanel() is rather slow variant
+ LLPanelOutfitEdit* panel_oe = dynamic_cast<LLPanelOutfitEdit*>(LLSideTray::getInstance()->getPanel("panel_outfit_edit"));
+ registrar.add("BodyPart.Replace", boost::bind(&LLPanelOutfitEdit::onReplaceBodyPartMenuItemClicked, panel_oe, selected_id));
registrar.add("BodyPart.Edit", boost::bind(LLAgentWearables::editWearable, selected_id));
+ registrar.add("BodyPart.Create", boost::bind(createNew, selected_id));
enable_registrar.add("BodyPart.OnEnable", boost::bind(&CofBodyPartContextMenu::onEnable, this, _2));
- return createFromFile("menu_cof_body_part.xml");
+ LLContextMenu* menu = createFromFile("menu_cof_body_part.xml");
+ llassert(menu);
+ if (menu)
+ {
+ updateCreateWearableLabel(menu, selected_id);
+ }
+ return menu;
}
bool onEnable(const LLSD& data)
@@ -419,6 +472,7 @@ void LLCOFWearables::addClothingTypesDummies(const LLAppearanceMgr::wearables_by
LLWearableType::EType w_type = static_cast<LLWearableType::EType>(type);
LLPanelInventoryListItemBase* item_panel = LLPanelDummyClothingListItem::create(w_type);
if(!item_panel) continue;
+ item_panel->childSetAction("btn_add", mCOFCallbacks.mAddWearable);
mClothing->addItem(item_panel, LLUUID::null, ADD_BOTTOM, false);
}
}
@@ -438,6 +492,13 @@ bool LLCOFWearables::getSelectedUUIDs(uuid_vec_t& selected_ids)
return selected_ids.size() != 0;
}
+LLPanel* LLCOFWearables::getSelectedItem()
+{
+ if (!mLastSelectedList) return NULL;
+
+ return mLastSelectedList->getSelectedItem();
+}
+
void LLCOFWearables::clear()
{
mAttachments->clear();
diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h
index 590aa709dd..f99f2662e6 100644
--- a/indra/newview/llcofwearables.h
+++ b/indra/newview/llcofwearables.h
@@ -45,53 +45,6 @@ class LLPanelClothingListItem;
class LLPanelBodyPartsListItem;
class LLPanelDeletableWearableListItem;
-/**
- * Adaptor between LLAccordionCtrlTab and LLFlatListView to facilitate communication between them
- * (notify, notifyParent) regarding size changes of a list and selection changes across accordion tabs.
- * Besides that it acts as a container for the LLFlatListView and a button bar on top of it.
- */
-class LLCOFAccordionListAdaptor : public LLPanel
-{
-public:
- LLCOFAccordionListAdaptor() : LLPanel() {};
- ~LLCOFAccordionListAdaptor() {};
-
- S32 notifyParent(const LLSD& info)
- {
- LLView* parent = getParent();
- if (!parent) return -1;
-
- if (!(info.has("action") && "size_changes" == info["action"].asString()))
- {
- return parent->notifyParent(info);
- }
-
- LLRect rc;
- childGetRect("button_bar", rc);
-
- LLSD params;
- params["action"] = "size_changes";
- params["width"] = info["width"];
- params["height"] = info["height"].asInteger() + rc.getHeight();
-
- return parent->notifyParent(params);
- }
-
-
- S32 notify(const LLSD& info)
- {
- for (child_list_const_iter_t iter = beginChild(); iter != endChild(); iter++)
- {
- if (dynamic_cast<LLFlatListView*>(*iter))
- {
- return (*iter)->notify(info);
- }
- }
- return LLPanel::notify(info);
- };
-};
-
-
class LLCOFWearables : public LLPanel
{
public:
@@ -107,6 +60,7 @@ public:
typedef boost::function<void (void*)> cof_callback_t;
+ cof_callback_t mAddWearable;
cof_callback_t mMoveWearableCloser;
cof_callback_t mMoveWearableFurther;
cof_callback_t mEditWearable;
@@ -123,6 +77,8 @@ public:
LLUUID getSelectedUUID();
bool getSelectedUUIDs(uuid_vec_t& selected_ids);
+ LLPanel* getSelectedItem();
+
void refresh();
void clear();
diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp
index dc6847f236..d079da3b36 100644
--- a/indra/newview/llcolorswatch.cpp
+++ b/indra/newview/llcolorswatch.cpp
@@ -68,7 +68,7 @@ LLColorSwatchCtrl::Params::Params()
LLColorSwatchCtrl::LLColorSwatchCtrl(const Params& p)
: LLUICtrl(p),
mValid( TRUE ),
- mColor(p.color),
+ mColor(p.color()),
mCanApplyImmediately(p.can_apply_immediately),
mAlphaGradientImage(p.alpha_background_image),
mOnCancelCallback(p.cancel_callback()),
diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h
index 4bb7d837cb..09bb49cfbe 100644
--- a/indra/newview/llcolorswatch.h
+++ b/indra/newview/llcolorswatch.h
@@ -60,7 +60,7 @@ public:
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{
- Optional<LLColor4> color;
+ Optional<LLUIColor> color;
Optional<bool> can_apply_immediately;
Optional<LLUIImage*> alpha_background_image;
Optional<commit_callback_t> cancel_callback;
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 546b60f286..2d0859650a 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -634,7 +634,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
if (!single_avatar && !avatarp->isFullyLoaded() )
{
- if (pass==1 && (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES) || LLViewerPartSim::getMaxPartCount() <= 0))
+ if (pass==0 && (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES) || LLViewerPartSim::getMaxPartCount() <= 0))
{
// debug code to draw a sphere in place of avatar
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep);
@@ -646,8 +646,10 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
gGL.translatef((F32)(pos.mV[VX]),
(F32)(pos.mV[VY]),
(F32)(pos.mV[VZ]));
- gGL.scalef(0.15f, 0.15f, 0.3f);
- gSphere.render();
+ gGL.scalef(0.15f, 0.15f, 0.3f);
+
+ gSphere.renderGGL();
+
gGL.popMatrix();
gGL.setColorMask(true, false);
}
diff --git a/indra/newview/llfilteredwearablelist.cpp b/indra/newview/llfilteredwearablelist.cpp
index fd99f673e0..306fa5ad6d 100644
--- a/indra/newview/llfilteredwearablelist.cpp
+++ b/indra/newview/llfilteredwearablelist.cpp
@@ -37,32 +37,10 @@
#include "llinventoryitemslist.h"
#include "llinventorymodel.h"
-class LLFindNonLinksByMask : public LLInventoryCollectFunctor
-{
-public:
- LLFindNonLinksByMask(U64 mask)
- : mFilterMask(mask)
- {}
-
- virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item)
- {
- if(item && !item->getIsLinkType() && (mFilterMask & (1LL << item->getInventoryType())) )
- {
- return true;
- }
-
- return false;
- }
-
-private:
- U64 mFilterMask;
-};
-
-//////////////////////////////////////////////////////////////////////////
-LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, U64 filter_mask)
+LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, LLInventoryCollectFunctor* collector)
: mWearableList(list)
-, mFilterMask(filter_mask)
+, mCollector(collector)
{
llassert(mWearableList);
gInventory.addObserver(this);
@@ -76,6 +54,15 @@ LLFilteredWearableListManager::~LLFilteredWearableListManager()
void LLFilteredWearableListManager::changed(U32 mask)
{
+ if (LLInventoryObserver::CALLING_CARD == mask
+ || LLInventoryObserver::GESTURE == mask
+ || LLInventoryObserver::SORT == mask
+ )
+ {
+ // skip non-related changes
+ return;
+ }
+
if(!gInventory.isInventoryUsable())
{
return;
@@ -84,9 +71,9 @@ void LLFilteredWearableListManager::changed(U32 mask)
populateList();
}
-void LLFilteredWearableListManager::setFilterMask(U64 mask)
+void LLFilteredWearableListManager::setFilterCollector(LLInventoryCollectFunctor* collector)
{
- mFilterMask = mask;
+ mCollector = collector;
populateList();
}
@@ -94,14 +81,16 @@ void LLFilteredWearableListManager::populateList()
{
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
- LLFindNonLinksByMask collector(mFilterMask);
- gInventory.collectDescendentsIf(
- gInventory.getRootFolderID(),
- cat_array,
- item_array,
- LLInventoryModel::EXCLUDE_TRASH,
- collector);
+ if(mCollector)
+ {
+ gInventory.collectDescendentsIf(
+ gInventory.getRootFolderID(),
+ cat_array,
+ item_array,
+ LLInventoryModel::EXCLUDE_TRASH,
+ *mCollector);
+ }
// Probably will also need to get items from Library (waiting for reply in EXT-6724).
diff --git a/indra/newview/llfilteredwearablelist.h b/indra/newview/llfilteredwearablelist.h
index 0780c02442..b7825c07af 100644
--- a/indra/newview/llfilteredwearablelist.h
+++ b/indra/newview/llfilteredwearablelist.h
@@ -32,6 +32,7 @@
#ifndef LL_LLFILTEREDWEARABLELIST_H
#define LL_LLFILTEREDWEARABLELIST_H
+#include "llinventoryfunctions.h"
#include "llinventoryobserver.h"
class LLInventoryItemsList;
@@ -42,7 +43,7 @@ class LLFilteredWearableListManager : public LLInventoryObserver
LOG_CLASS(LLFilteredWearableListManager);
public:
- LLFilteredWearableListManager(LLInventoryItemsList* list, U64 filter_mask);
+ LLFilteredWearableListManager(LLInventoryItemsList* list, LLInventoryCollectFunctor* collector);
~LLFilteredWearableListManager();
/** LLInventoryObserver implementation
@@ -51,9 +52,9 @@ public:
/*virtual*/ void changed(U32 mask);
/**
- * Sets new filter and applies it immediately
+ * Sets new collector and applies it immediately
*/
- void setFilterMask(U64 mask);
+ void setFilterCollector(LLInventoryCollectFunctor* collector);
/**
* Populates wearable list with filtered data.
@@ -62,7 +63,7 @@ public:
private:
LLInventoryItemsList* mWearableList;
- U64 mFilterMask;
+ LLInventoryCollectFunctor* mCollector;
};
#endif //LL_LLFILTEREDWEARABLELIST_H
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index b40c19c2c6..96364f9418 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -437,7 +437,7 @@ BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask,
session_id = gIMMgr->addSession(avatar_name, IM_NOTHING_SPECIAL, dest_agent_id);
}
return LLToolDragAndDrop::handleGiveDragAndDrop(dest_agent_id, session_id, drop,
- cargo_type, cargo_data, accept);
+ cargo_type, cargo_data, accept, getName());
}
}
}
diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp
index fd392d949a..847462a6c3 100644
--- a/indra/newview/llfloateravatartextures.cpp
+++ b/indra/newview/llfloateravatartextures.cpp
@@ -160,8 +160,7 @@ void LLFloaterAvatarTextures::onClickDump(void* data)
{
if (gAgent.isGodlike())
{
- LLFloaterAvatarTextures* self = (LLFloaterAvatarTextures*)data;
- LLVOAvatar* avatarp = find_avatar(self->mID);
+ const LLVOAvatarSelf* avatarp = gAgentAvatarp;
if (!avatarp) return;
for (S32 i = 0; i < avatarp->getNumTEs(); i++)
{
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index abdb55ec17..7c5586ec96 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -572,7 +572,7 @@ void LLPanelLandGeneral::refresh()
if (regionp)
{
insert_maturity_into_textbox(mContentRating, gFloaterView->getParentFloater(this), MATURITY);
- mLandType->setText(regionp->getSimProductName());
+ mLandType->setText(LLTrans::getString(regionp->getSimProductName()));
}
// estate owner/manager cannot edit other parts of the parcel
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 725fc17136..c259659083 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -106,6 +106,8 @@ BOOL LLFloaterMap::postBuild()
mPopupMenu->setItemEnabled ("Stop Tracking", false);
}
+ stretchMiniMap(getRect().getWidth(),getRect().getHeight());
+
updateMinorDirections();
// Get the drag handle all the way in back
@@ -229,10 +231,8 @@ void LLFloaterMap::onFocusLost()
LLPanel::onFocusLost();
}
-void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLFloaterMap::stretchMiniMap(S32 width,S32 height)
{
- LLFloater::reshape(width, height, called_from_parent);
-
//fix for ext-7112
//by default ctrl can't overlap caption area
if(mMap)
@@ -242,6 +242,13 @@ void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent)
mMap->reshape( width, height, 1);
mMap->setRect(map_rect);
}
+}
+
+void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ LLFloater::reshape(width, height, called_from_parent);
+
+ stretchMiniMap(width, height);
updateMinorDirections();
}
diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h
index 9ff2f03180..3c063adfb8 100644
--- a/indra/newview/llfloatermap.h
+++ b/indra/newview/llfloatermap.h
@@ -61,6 +61,8 @@ private:
void handleStopTracking (const LLSD& userdata);
void setDirectionPos( LLTextBox* text_box, F32 rotation );
void updateMinorDirections();
+
+ void stretchMiniMap(S32 width,S32 height);
LLMenuGL* mPopupMenu;
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 0eeef0039c..593d5c267e 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -966,7 +966,7 @@ void LLFloaterPreference::cleanupBadSetting()
{
if (gSavedPerAccountSettings.getString("BusyModeResponse2") == "|TOKEN COPY BusyModeResponse|")
{
- llwarns << "cleaning old BusyModeResponse" << llendl;
+ llinfos << "cleaning old BusyModeResponse" << llendl;
//LLTrans::getString("BusyModeResponseDefault") is used here for localization (EXT-5885)
gSavedPerAccountSettings.setString("BusyModeResponse2", LLTrans::getString("BusyModeResponseDefault"));
}
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index b9008fa53b..5bea3325a8 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -2196,7 +2196,7 @@ bool LLFloaterSnapshot::updateButtons(ESnapshotMode mode)
childSetVisible("save", mode == SNAPSHOT_MAIN);
childSetVisible("set_profile_pic", mode == SNAPSHOT_MAIN);
- childSetVisible("share_to_web", mode == SNAPSHOT_SHARE);
+// childSetVisible("share_to_web", mode == SNAPSHOT_SHARE);
childSetVisible("share_to_email", mode == SNAPSHOT_SHARE);
childSetVisible("save_to_inventory", mode == SNAPSHOT_SAVE);
diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp
index d83d895dd0..aebf1b4c26 100644
--- a/indra/newview/llgiveinventory.cpp
+++ b/indra/newview/llgiveinventory.cpp
@@ -192,15 +192,16 @@ bool LLGiveInventory::isInventoryGroupGiveAcceptable(const LLInventoryItem* item
}
// static
-void LLGiveInventory::doGiveInventoryItem(const LLUUID& to_agent,
+bool LLGiveInventory::doGiveInventoryItem(const LLUUID& to_agent,
const LLInventoryItem* item,
const LLUUID& im_session_id/* = LLUUID::null*/)
{
+ bool res = true;
llinfos << "LLGiveInventory::giveInventory()" << llendl;
if (!isInventoryGiveAcceptable(item))
{
- return;
+ return false;
}
if (item->getPermissions().allowCopyBy(gAgentID))
{
@@ -210,12 +211,19 @@ void LLGiveInventory::doGiveInventoryItem(const LLUUID& to_agent,
else
{
// ask if the agent is sure.
+ LLSD substitutions;
+ substitutions["ITEMS"] = item->getName();
LLSD payload;
payload["agent_id"] = to_agent;
- payload["item_id"] = item->getUUID();
- LLNotificationsUtil::add("CannotCopyWarning", LLSD(), payload,
+ LLSD items = LLSD::emptyArray();
+ items.append(item->getUUID());
+ payload["items"] = items;
+ LLNotificationsUtil::add("CannotCopyWarning", substitutions, payload,
&LLGiveInventory::handleCopyProtectedItem);
+ res = false;
}
+
+ return res;
}
void LLGiveInventory::doGiveInventoryCategory(const LLUUID& to_agent,
@@ -318,23 +326,27 @@ void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im
bool LLGiveInventory::handleCopyProtectedItem(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ LLSD itmes = notification["payload"]["items"];
LLInventoryItem* item = NULL;
switch(option)
{
case 0: // "Yes"
- item = gInventory.getItem(notification["payload"]["item_id"].asUUID());
- if (item)
+ for (LLSD::array_iterator it = itmes.beginArray(); it != itmes.endArray(); it++)
{
- LLGiveInventory::commitGiveInventoryItem(notification["payload"]["agent_id"].asUUID(),
- item);
- // delete it for now - it will be deleted on the server
- // quickly enough.
- gInventory.deleteObject(notification["payload"]["item_id"].asUUID());
- gInventory.notifyObservers();
- }
- else
- {
- LLNotificationsUtil::add("CannotGiveItem");
+ item = gInventory.getItem((*it).asUUID());
+ if (item)
+ {
+ LLGiveInventory::commitGiveInventoryItem(notification["payload"]["agent_id"].asUUID(),
+ item);
+ // delete it for now - it will be deleted on the server
+ // quickly enough.
+ gInventory.deleteObject(item->getUUID());
+ gInventory.notifyObservers();
+ }
+ else
+ {
+ LLNotificationsUtil::add("CannotGiveItem");
+ }
}
break;
diff --git a/indra/newview/llgiveinventory.h b/indra/newview/llgiveinventory.h
index e589a0cc69..86f0f2fe86 100644
--- a/indra/newview/llgiveinventory.h
+++ b/indra/newview/llgiveinventory.h
@@ -61,7 +61,7 @@ public:
/**
* Gives passed inventory item to specified avatar in specified session.
*/
- static void doGiveInventoryItem(const LLUUID& to_agent,
+ static bool doGiveInventoryItem(const LLUUID& to_agent,
const LLInventoryItem* item,
const LLUUID& im_session_id = LLUUID::null);
@@ -72,6 +72,9 @@ public:
const LLInventoryCategory* item,
const LLUUID &session_id = LLUUID::null);
+ // give inventory item functionality
+ static bool handleCopyProtectedItem(const LLSD& notification, const LLSD& response);
+
private:
// this class is not intended to be instantiated.
LLGiveInventory();
@@ -82,8 +85,6 @@ private:
static void logInventoryOffer(const LLUUID& to_agent,
const LLUUID &im_session_id = LLUUID::null);
- // give inventory item functionality
- static bool handleCopyProtectedItem(const LLSD& notification, const LLSD& response);
static void commitGiveInventoryItem(const LLUUID& to_agent,
const LLInventoryItem* item,
const LLUUID &im_session_id = LLUUID::null);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 577652fc79..b7495f7dbe 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -164,38 +164,7 @@ time_t LLInvFVBridge::getCreationDate() const
// Can be destroyed (or moved to trash)
BOOL LLInvFVBridge::isItemRemovable() const
{
- const LLInventoryModel* model = getInventoryModel();
- if(!model)
- {
- return FALSE;
- }
-
- // Can't delete an item that's in the library.
- if(!model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID()))
- {
- return FALSE;
- }
-
- // Disable delete from COF folder; have users explicitly choose "detach/take off",
- // unless the item is not worn but in the COF (i.e. is bugged).
- if (LLAppearanceMgr::instance().getIsProtectedCOFItem(mUUID))
- {
- if (get_is_item_worn(mUUID))
- {
- return FALSE;
- }
- }
-
- const LLInventoryObject *obj = model->getItem(mUUID);
- if (obj && obj->getIsLinkType())
- {
- return TRUE;
- }
- if (get_is_item_worn(mUUID))
- {
- return FALSE;
- }
- return TRUE;
+ return get_is_item_removable(getInventoryModel(), mUUID);
}
// Can be moved to another folder
@@ -833,24 +802,7 @@ void LLInvFVBridge::changeCategoryParent(LLInventoryModel* model,
const LLUUID& new_parent_id,
BOOL restamp)
{
- // Can't move a folder into a child of itself.
- if (model->isObjectDescendentOf(new_parent_id, cat->getUUID()))
- {
- return;
- }
-
- LLInventoryModel::update_list_t update;
- LLInventoryModel::LLCategoryUpdate old_folder(cat->getParentUUID(), -1);
- update.push_back(old_folder);
- LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1);
- update.push_back(new_folder);
- model->accountForUpdate(update);
-
- LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat);
- new_cat->setParent(new_parent_id);
- new_cat->updateParentOnServer(restamp);
- model->updateCategory(new_cat);
- model->notifyObservers();
+ change_category_parent(model, cat, new_parent_id, restamp);
}
LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
@@ -1538,26 +1490,7 @@ public:
// Can be destroyed (or moved to trash)
BOOL LLFolderBridge::isItemRemovable() const
{
- LLInventoryModel* model = getInventoryModel();
- if(!model)
- {
- return FALSE;
- }
-
- if(!model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID()))
- {
- return FALSE;
- }
-
- if (!isAgentAvatarValid()) return FALSE;
-
- LLInventoryCategory* category = model->getCategory(mUUID);
- if(!category)
- {
- return FALSE;
- }
-
- if(LLFolderType::lookupIsProtectedType(category->getPreferredType()))
+ if (!get_is_category_removable(getInventoryModel(), mUUID))
{
return FALSE;
}
@@ -1573,6 +1506,7 @@ BOOL LLFolderBridge::isItemRemovable() const
return FALSE;
}
}
+
return TRUE;
}
@@ -2333,10 +2267,20 @@ LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type, BOOL is
else
return LLUI::getUIImage("Inv_FolderClosed_Link");
}
- if (preferred_type == LLFolderType::FT_OUTFIT)
+
+ switch (preferred_type)
+ {
+ case LLFolderType::FT_OUTFIT:
return LLUI::getUIImage("Inv_LookFolderClosed");
- else
+ case LLFolderType::FT_LOST_AND_FOUND:
+ return LLUI::getUIImage("Inv_LostClosed");
+ case LLFolderType::FT_TRASH:
+ return LLUI::getUIImage("Inv_TrashClosed");
+ case LLFolderType::FT_NONE:
return LLUI::getUIImage("Inv_FolderClosed");
+ default:
+ return LLUI::getUIImage("Inv_SysClosed");
+ }
}
LLUIImagePtr LLFolderBridge::getOpenIcon() const
@@ -2350,29 +2294,27 @@ LLUIImagePtr LLFolderBridge::getOpenIcon() const
else
return LLUI::getUIImage("Inv_FolderOpen_Link");
}
- if (getPreferredType() == LLFolderType::FT_OUTFIT)
+
+ switch (getPreferredType())
+ {
+ case LLFolderType::FT_OUTFIT:
return LLUI::getUIImage("Inv_LookFolderOpen");
- else
+ case LLFolderType::FT_LOST_AND_FOUND:
+ return LLUI::getUIImage("Inv_LostOpen");
+ case LLFolderType::FT_TRASH:
+ return LLUI::getUIImage("Inv_TrashOpen");
+ case LLFolderType::FT_NONE:
return LLUI::getUIImage("Inv_FolderOpen");
+ default:
+ return LLUI::getUIImage("Inv_SysOpen");
+ }
+
}
BOOL LLFolderBridge::renameItem(const std::string& new_name)
{
- if(!isItemRenameable())
- return FALSE;
- LLInventoryModel* model = getInventoryModel();
- if(!model)
- return FALSE;
- LLViewerInventoryCategory* cat = getCategory();
- if(cat && (cat->getName() != new_name))
- {
- LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat);
- new_cat->rename(new_name);
- new_cat->updateServer(FALSE);
- model->updateCategory(new_cat);
+ rename_category(getInventoryModel(), mUUID, new_name);
- model->notifyObservers();
- }
// return FALSE because we either notified observers (& therefore
// rebuilt) or we didn't update.
return FALSE;
@@ -2426,36 +2368,7 @@ bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& re
{
// move it to the trash
LLPreview::hide(mUUID);
- LLInventoryModel* model = getInventoryModel();
- if(!model) return FALSE;
-
- const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
-
- // Look for any gestures and deactivate them
- LLInventoryModel::cat_array_t descendent_categories;
- LLInventoryModel::item_array_t descendent_items;
- gInventory.collectDescendents( mUUID, descendent_categories, descendent_items, FALSE );
-
- for (LLInventoryModel::item_array_t::const_iterator iter = descendent_items.begin();
- iter != descendent_items.end();
- ++iter)
- {
- const LLViewerInventoryItem* item = (*iter);
- const LLUUID& item_id = item->getUUID();
- if (item->getType() == LLAssetType::AT_GESTURE
- && LLGestureMgr::instance().isGestureActive(item_id))
- {
- LLGestureMgr::instance().deactivateGesture(item_id);
- }
- }
-
- // go ahead and do the normal remove if no 'last calling
- // cards' are being removed.
- LLViewerInventoryCategory* cat = getCategory();
- if(cat)
- {
- LLInvFVBridge::changeCategoryParent(model, cat, trash_id, TRUE);
- }
+ remove_category(getInventoryModel(), mUUID);
return TRUE;
}
return FALSE;
@@ -2651,22 +2564,6 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv
return ((item_array.count() > 0) ? TRUE : FALSE );
}
-class LLFindWorn : public LLInventoryCollectFunctor
-{
-public:
- LLFindWorn() {}
- virtual ~LLFindWorn() {}
- virtual bool operator()(LLInventoryCategory* cat,
- LLInventoryItem* item)
- {
- if (item && get_is_item_worn(item->getUUID()))
- {
- return TRUE;
- }
- return FALSE;
- }
-};
-
BOOL LLFolderBridge::areAnyContentsWorn(LLInventoryModel* model) const
{
LLInventoryModel::cat_array_t cat_array;
@@ -2985,22 +2882,7 @@ void LLFolderBridge::createWearable(LLFolderBridge* bridge, LLWearableType::ETyp
{
if(!bridge) return;
LLUUID parent_id = bridge->getUUID();
- createWearable(parent_id, type);
-}
-
-// Separate function so can be called by global menu as well as right-click
-// menu.
-// static
-void LLFolderBridge::createWearable(const LLUUID &parent_id, LLWearableType::EType type)
-{
- LLWearable* wearable = LLWearableList::instance().createNewWearable(type);
- LLAssetType::EType asset_type = wearable->getAssetType();
- LLInventoryType::EType inv_type = LLInventoryType::IT_WEARABLE;
- create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
- parent_id, wearable->getTransactionID(), wearable->getName(),
- wearable->getDescription(), asset_type, inv_type, wearable->getType(),
- wearable->getPermissions().getMaskNextOwner(),
- LLPointer<LLInventoryCallback>(NULL));
+ LLAgentWearables::createWearable(type, false, parent_id);
}
void LLFolderBridge::modifyOutfit(BOOL append)
@@ -4877,13 +4759,7 @@ void LLWearableBridge::onEditOnAvatar(void* user_data)
void LLWearableBridge::editOnAvatar()
{
- LLWearable* wearable = gAgentWearables.getWearableFromItemID(mUUID);
- if( wearable )
- {
- LLPanel * panel = LLSideTray::getInstance()->getPanel("sidepanel_appearance");
-
- LLSidepanelAppearance::editWearable(wearable, panel);
- }
+ LLAgentWearables::editWearable(mUUID);
}
// static
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index c5efefac7e..59c1f3d6fb 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -270,7 +270,6 @@ public:
virtual BOOL copyToClipboard() const;
static void createWearable(LLFolderBridge* bridge, LLWearableType::EType type);
- static void createWearable(const LLUUID &parent_folder_id, LLWearableType::EType type);
LLViewerInventoryCategory* getCategory() const;
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index f67d91cfa5..817da34c61 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -130,6 +130,90 @@ void change_item_parent(LLInventoryModel* model,
}
}
+void change_category_parent(LLInventoryModel* model,
+ LLViewerInventoryCategory* cat,
+ const LLUUID& new_parent_id,
+ BOOL restamp)
+{
+ if (!model || !cat)
+ {
+ return;
+ }
+
+ // Can't move a folder into a child of itself.
+ if (model->isObjectDescendentOf(new_parent_id, cat->getUUID()))
+ {
+ return;
+ }
+
+ LLInventoryModel::update_list_t update;
+ LLInventoryModel::LLCategoryUpdate old_folder(cat->getParentUUID(), -1);
+ update.push_back(old_folder);
+ LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1);
+ update.push_back(new_folder);
+ model->accountForUpdate(update);
+
+ LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat);
+ new_cat->setParent(new_parent_id);
+ new_cat->updateParentOnServer(restamp);
+ model->updateCategory(new_cat);
+ model->notifyObservers();
+}
+
+void remove_category(LLInventoryModel* model, const LLUUID& cat_id)
+{
+ if (!model || !get_is_category_removable(model, cat_id))
+ {
+ return;
+ }
+
+ // Look for any gestures and deactivate them
+ LLInventoryModel::cat_array_t descendent_categories;
+ LLInventoryModel::item_array_t descendent_items;
+ gInventory.collectDescendents(cat_id, descendent_categories, descendent_items, FALSE);
+
+ for (LLInventoryModel::item_array_t::const_iterator iter = descendent_items.begin();
+ iter != descendent_items.end();
+ ++iter)
+ {
+ const LLViewerInventoryItem* item = (*iter);
+ const LLUUID& item_id = item->getUUID();
+ if (item->getType() == LLAssetType::AT_GESTURE
+ && LLGestureMgr::instance().isGestureActive(item_id))
+ {
+ LLGestureMgr::instance().deactivateGesture(item_id);
+ }
+ }
+
+ // go ahead and do the normal remove if no 'last calling
+ // cards' are being removed.
+ LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
+ if (cat)
+ {
+ const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
+ change_category_parent(model, cat, trash_id, TRUE);
+ }
+}
+
+void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::string& new_name)
+{
+ LLViewerInventoryCategory* cat;
+
+ if (!model ||
+ !get_is_category_renameable(model, cat_id) ||
+ (cat = model->getCategory(cat_id)) == NULL ||
+ cat->getName() == new_name)
+ {
+ return;
+ }
+
+ LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat);
+ new_cat->rename(new_name);
+ new_cat->updateServer(FALSE);
+ model->updateCategory(new_cat);
+
+ model->notifyObservers();
+}
BOOL get_is_item_worn(const LLUUID& id)
{
@@ -160,6 +244,83 @@ BOOL get_is_item_worn(const LLUUID& id)
return FALSE;
}
+BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id)
+{
+ if (!model)
+ {
+ return FALSE;
+ }
+
+ // Can't delete an item that's in the library.
+ if (!model->isObjectDescendentOf(id, gInventory.getRootFolderID()))
+ {
+ return FALSE;
+ }
+
+ // Disable delete from COF folder; have users explicitly choose "detach/take off",
+ // unless the item is not worn but in the COF (i.e. is bugged).
+ if (LLAppearanceMgr::instance().getIsProtectedCOFItem(id))
+ {
+ if (get_is_item_worn(id))
+ {
+ return FALSE;
+ }
+ }
+
+ const LLInventoryObject *obj = model->getItem(id);
+ if (obj && obj->getIsLinkType())
+ {
+ return TRUE;
+ }
+ if (get_is_item_worn(id))
+ {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id)
+{
+ // This function doesn't check the folder's children.
+
+ if (!model)
+ {
+ return FALSE;
+ }
+
+ if (!model->isObjectDescendentOf(id, gInventory.getRootFolderID()))
+ {
+ return FALSE;
+ }
+
+ if (!isAgentAvatarValid()) return FALSE;
+
+ LLInventoryCategory* category = model->getCategory(id);
+ if (!category)
+ {
+ return FALSE;
+ }
+
+ if (LLFolderType::lookupIsProtectedType(category->getPreferredType()))
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id)
+{
+ LLViewerInventoryCategory* cat = model->getCategory(id);
+
+ if (cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType()) &&
+ cat->getOwnerID() == gAgent.getID())
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
+
void show_item_profile(const LLUUID& item_uuid)
{
LLUUID linked_uuid = gInventory.getLinkedItemID(item_uuid);
@@ -371,6 +532,31 @@ bool LLFindWearablesOfType::operator()(LLInventoryCategory* cat, LLInventoryItem
return true;
}
+void LLFindWearablesOfType::setType(LLWearableType::EType type)
+{
+ mWearableType = type;
+}
+
+bool LLFindWorn::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+{
+ return item && get_is_item_worn(item->getUUID());
+}
+
+bool LLFindNonRemovableObjects::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+{
+ if (item)
+ {
+ return !get_is_item_removable(&gInventory, item->getUUID());
+ }
+ if (cat)
+ {
+ return !get_is_category_removable(&gInventory, cat->getUUID());
+ }
+
+ llwarns << "Not a category and not an item?" << llendl;
+ return false;
+}
+
///----------------------------------------------------------------------------
/// LLAssetIDMatches
///----------------------------------------------------------------------------
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 8b96ba29d9..33b52cfd5e 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -46,6 +46,12 @@
// Is this item or its baseitem is worn, attached, etc...
BOOL get_is_item_worn(const LLUUID& id);
+BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id);
+
+BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id);
+
+BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id);
+
void show_item_profile(const LLUUID& item_uuid);
void show_item_original(const LLUUID& item_uuid);
@@ -55,6 +61,15 @@ void change_item_parent(LLInventoryModel* model,
const LLUUID& new_parent_id,
BOOL restamp);
+void change_category_parent(LLInventoryModel* model,
+ LLViewerInventoryCategory* cat,
+ const LLUUID& new_parent_id,
+ BOOL restamp);
+
+void remove_category(LLInventoryModel* model, const LLUUID& cat_id);
+
+void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::string& new_name);
+
// Generates a string containing the path to the item specified by item_id.
void append_path(const LLUUID& id, std::string& path);
@@ -252,6 +267,37 @@ public:
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLFindNonLinksByMask
+//
+//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+class LLFindNonLinksByMask : public LLInventoryCollectFunctor
+{
+public:
+ LLFindNonLinksByMask(U64 mask)
+ : mFilterMask(mask)
+ {}
+
+ virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+ {
+ if(item && !item->getIsLinkType() && (mFilterMask & (1LL << item->getInventoryType())) )
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ void setFilterMask(U64 mask)
+ {
+ mFilterMask = mask;
+ }
+
+private:
+ U64 mFilterMask;
+};
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLFindWearables
//
// Collects wearables based on item type.
@@ -272,8 +318,26 @@ public:
LLFindWearablesOfType(LLWearableType::EType type) : mWearableType(type) {}
virtual ~LLFindWearablesOfType() {}
virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item);
+ void setType(LLWearableType::EType type);
+
+private:
+ LLWearableType::EType mWearableType;
+};
+
+// Find worn items.
+class LLFindWorn : public LLInventoryCollectFunctor
+{
+public:
+ LLFindWorn() {}
+ virtual ~LLFindWorn() {}
+ virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item);
+};
- const LLWearableType::EType mWearableType;
+// Collect non-removable folders and items.
+class LLFindNonRemovableObjects : public LLInventoryCollectFunctor
+{
+public:
+ virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item);
};
/** Inventory Collector Functions
diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h
index 807952948b..03ad7c2184 100644
--- a/indra/newview/llinventoryitemslist.h
+++ b/indra/newview/llinventoryitemslist.h
@@ -133,6 +133,9 @@ public:
/** Get the description of a corresponding inventory item */
const std::string& getDescription() const { return mItem->getDescription(); }
+ /** Get the associated inventory item */
+ LLViewerInventoryItem* getItem() const { return mItem; }
+
virtual ~LLPanelInventoryListItemBase(){}
protected:
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 0ff6ab2644..b4f0947b2c 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -112,6 +112,8 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id, BOOL recursive
{
if (!mAllFoldersFetched)
{
+ LL_DEBUGS("InventoryFetch") << "Start fetching category: " << cat_id << ", recursive: " << recursive << LL_ENDL;
+
mBackgroundFetchActive = TRUE;
if (cat_id.isNull())
{
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 8557548887..d2b402fe14 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -68,7 +68,7 @@
// you're fetching an item and a notification gets triggered because
// you renamed some other item). This counter is to specify how many
// notification to wait for before giving up.
-static const U32 MAX_NUM_NOTIFICATIONS_TO_PROCESS = 20;
+static const U32 MAX_NUM_NOTIFICATIONS_TO_PROCESS = 127;
LLInventoryObserver::LLInventoryObserver()
{
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 4766c1c227..bb3f34dde2 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -49,6 +49,7 @@
#include "llsidepanelinventory.h"
#include "llsidetray.h"
#include "llscrollcontainer.h"
+#include "llviewerattachmenu.h"
#include "llviewerfoldertype.h"
#include "llvoavatarself.h"
@@ -877,48 +878,19 @@ bool LLInventoryPanel::beginIMSession()
bool LLInventoryPanel::attachObject(const LLSD& userdata)
{
+ // Copy selected item UUIDs to a vector.
std::set<LLUUID> selected_items = mFolderRoot->getSelectionList();
-
- std::string joint_name = userdata.asString();
- LLViewerJointAttachment* attachmentp = NULL;
- for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin();
- iter != gAgentAvatarp->mAttachmentPoints.end(); )
- {
- LLVOAvatar::attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
- if (attachment->getName() == joint_name)
- {
- attachmentp = attachment;
- break;
- }
- }
- if (attachmentp == NULL)
- {
- return true;
- }
-
+ uuid_vec_t items;
for (std::set<LLUUID>::const_iterator set_iter = selected_items.begin();
set_iter != selected_items.end();
++set_iter)
{
- const LLUUID &id = *set_iter;
- LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(id);
- if(item && gInventory.isObjectDescendentOf(id, gInventory.getRootFolderID()))
- {
- rez_attachment(item, attachmentp);
- }
- else if(item && item->isFinished())
- {
- // must be in library. copy it to our inventory and put it on.
- LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(attachmentp);
- copy_inventory_item(gAgent.getID(),
- item->getPermissions().getOwner(),
- item->getUUID(),
- LLUUID::null,
- std::string(),
- cb);
- }
+ items.push_back(*set_iter);
}
+
+ // Attach selected items.
+ LLViewerAttachMenu::attachObjects(items, userdata.asString());
+
gFocusMgr.setKeyboardFocus(NULL);
return true;
diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp
new file mode 100644
index 0000000000..53243e9807
--- /dev/null
+++ b/indra/newview/llmachineid.cpp
@@ -0,0 +1,269 @@
+/**
+ * @file llmachineid.cpp
+ * @brief retrieves unique machine ids
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2010, 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 "lluuid.h"
+#include "llmachineid.h"
+#if LL_WINDOWS
+#define _WIN32_DCOM
+#include <iostream>
+using namespace std;
+#include <comdef.h>
+#include <Wbemidl.h>
+#endif
+unsigned char static_unique_id[] = {0,0,0,0,0,0};
+bool static has_static_unique_id = false;
+
+// get an unique machine id.
+// NOT THREAD SAFE - do before setting up threads.
+// MAC Address doesn't work for Windows 7 since the first returned hardware MAC address changes with each reboot, Go figure??
+
+S32 LLMachineID::init()
+{
+ memset(static_unique_id,0,sizeof(static_unique_id));
+ S32 ret_code = 0;
+#if LL_WINDOWS
+# pragma comment(lib, "wbemuuid.lib")
+ size_t len = sizeof(static_unique_id);
+
+ // algorithm to detect BIOS serial number found at:
+ // http://msdn.microsoft.com/en-us/library/aa394077%28VS.85%29.aspx
+ // we can't use the MAC address since on Windows 7, the first returned MAC address changes with every reboot.
+
+
+ HRESULT hres;
+
+ // Step 1: --------------------------------------------------
+ // Initialize COM. ------------------------------------------
+
+ hres = CoInitializeEx(0, COINIT_MULTITHREADED);
+ if (FAILED(hres))
+ {
+ LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hex << hres << LL_ENDL;
+ return 1; // Program has failed.
+ }
+
+ // Step 2: --------------------------------------------------
+ // Set general COM security levels --------------------------
+ // Note: If you are using Windows 2000, you need to specify -
+ // the default authentication credentials for a user by using
+ // a SOLE_AUTHENTICATION_LIST structure in the pAuthList ----
+ // parameter of CoInitializeSecurity ------------------------
+
+ hres = CoInitializeSecurity(
+ NULL,
+ -1, // COM authentication
+ NULL, // Authentication services
+ NULL, // Reserved
+ RPC_C_AUTHN_LEVEL_DEFAULT, // Default authentication
+ RPC_C_IMP_LEVEL_IMPERSONATE, // Default Impersonation
+ NULL, // Authentication info
+ EOAC_NONE, // Additional capabilities
+ NULL // Reserved
+ );
+
+
+ if (FAILED(hres))
+ {
+ LL_DEBUGS("AppInit") << "Failed to initialize security. Error code = 0x" << hex << hres << LL_ENDL;
+ CoUninitialize();
+ return 1; // Program has failed.
+ }
+
+ // Step 3: ---------------------------------------------------
+ // Obtain the initial locator to WMI -------------------------
+
+ IWbemLocator *pLoc = NULL;
+
+ hres = CoCreateInstance(
+ CLSID_WbemLocator,
+ 0,
+ CLSCTX_INPROC_SERVER,
+ IID_IWbemLocator, (LPVOID *) &pLoc);
+
+ if (FAILED(hres))
+ {
+ LL_DEBUGS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << hex << hres << LL_ENDL;
+ CoUninitialize();
+ return 1; // Program has failed.
+ }
+
+ // Step 4: -----------------------------------------------------
+ // Connect to WMI through the IWbemLocator::ConnectServer method
+
+ IWbemServices *pSvc = NULL;
+
+ // Connect to the root\cimv2 namespace with
+ // the current user and obtain pointer pSvc
+ // to make IWbemServices calls.
+ hres = pLoc->ConnectServer(
+ _bstr_t(L"ROOT\\CIMV2"), // Object path of WMI namespace
+ NULL, // User name. NULL = current user
+ NULL, // User password. NULL = current
+ 0, // Locale. NULL indicates current
+ NULL, // Security flags.
+ 0, // Authority (e.g. Kerberos)
+ 0, // Context object
+ &pSvc // pointer to IWbemServices proxy
+ );
+
+ if (FAILED(hres))
+ {
+ LL_DEBUGS("AppInit") << "Could not connect. Error code = 0x" << hex << hres << LL_ENDL;
+ pLoc->Release();
+ CoUninitialize();
+ return 1; // Program has failed.
+ }
+
+ LL_DEBUGS("AppInit") << "Connected to ROOT\\CIMV2 WMI namespace" << LL_ENDL;
+
+
+ // Step 5: --------------------------------------------------
+ // Set security levels on the proxy -------------------------
+
+ hres = CoSetProxyBlanket(
+ pSvc, // Indicates the proxy to set
+ RPC_C_AUTHN_WINNT, // RPC_C_AUTHN_xxx
+ RPC_C_AUTHZ_NONE, // RPC_C_AUTHZ_xxx
+ NULL, // Server principal name
+ RPC_C_AUTHN_LEVEL_CALL, // RPC_C_AUTHN_LEVEL_xxx
+ RPC_C_IMP_LEVEL_IMPERSONATE, // RPC_C_IMP_LEVEL_xxx
+ NULL, // client identity
+ EOAC_NONE // proxy capabilities
+ );
+
+ if (FAILED(hres))
+ {
+ LL_DEBUGS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hex << hres << LL_ENDL;
+ pSvc->Release();
+ pLoc->Release();
+ CoUninitialize();
+ return 1; // Program has failed.
+ }
+
+ // Step 6: --------------------------------------------------
+ // Use the IWbemServices pointer to make requests of WMI ----
+
+ // For example, get the name of the operating system
+ IEnumWbemClassObject* pEnumerator = NULL;
+ hres = pSvc->ExecQuery(
+ bstr_t("WQL"),
+ bstr_t("SELECT * FROM Win32_OperatingSystem"),
+ WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
+ NULL,
+ &pEnumerator);
+
+ if (FAILED(hres))
+ {
+ LL_DEBUGS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hex << hres << LL_ENDL;
+ pSvc->Release();
+ pLoc->Release();
+ CoUninitialize();
+ return 1; // Program has failed.
+ }
+
+ // Step 7: -------------------------------------------------
+ // Get the data from the query in step 6 -------------------
+
+ IWbemClassObject *pclsObj = NULL;
+ ULONG uReturn = 0;
+
+ while (pEnumerator)
+ {
+ HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1,
+ &pclsObj, &uReturn);
+
+ if(0 == uReturn)
+ {
+ break;
+ }
+
+ VARIANT vtProp;
+
+ // Get the value of the Name property
+ hr = pclsObj->Get(L"SerialNumber", 0, &vtProp, 0, 0);
+ LL_DEBUGS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL;
+ // use characters in the returned Serial Number to create a byte array of size len
+ BSTR serialNumber ( vtProp.bstrVal);
+ unsigned int j = 0;
+ while( vtProp.bstrVal[j] != 0)
+ {
+ for (unsigned int i = 0; i < len; i++)
+ {
+ if (vtProp.bstrVal[j] == 0)
+ break;
+
+ static_unique_id[i] = (unsigned int)(static_unique_id[i] + serialNumber[j]);
+ j++;
+ }
+ }
+ VariantClear(&vtProp);
+
+ pclsObj->Release();
+ pclsObj = NULL;
+ break;
+ }
+
+ // Cleanup
+ // ========
+
+ if (pSvc)
+ pSvc->Release();
+ if (pLoc)
+ pLoc->Release();
+ if (pEnumerator)
+ pEnumerator->Release();
+ CoUninitialize();
+ ret_code=0;
+#else
+ unsigned char * staticPtr = (unsigned char *)(&static_unique_id[0]);
+ ret_code = LLUUID::getNodeID(staticPtr);
+#endif
+ has_static_unique_id = true;
+ return ret_code;
+}
+
+
+S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len)
+{
+ if (has_static_unique_id)
+ {
+ memcpy ( unique_id, &static_unique_id, len);
+ LL_DEBUGS("AppInit") << "UniqueID: " << unique_id[0] << unique_id[1]<< unique_id[2] << unique_id[3] << unique_id[4] << unique_id [5] << LL_ENDL;
+ return 1;
+ }
+ return 0;
+}
+
+
+
+
diff --git a/indra/newview/llmachineid.h b/indra/newview/llmachineid.h
new file mode 100644
index 0000000000..8160309b47
--- /dev/null
+++ b/indra/newview/llmachineid.h
@@ -0,0 +1,56 @@
+/**
+ * @file llmachineid.h
+ * @brief retrieves unique machine ids
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, 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_LLMACHINEID_H
+#define LL_LLMACHINEID_H
+
+
+class LLMachineID
+{
+public:
+ LLMachineID();
+ virtual ~LLMachineID();
+ static S32 getUniqueID(unsigned char *unique_id, size_t len);
+ static S32 init();
+
+protected:
+
+private:
+
+
+};
+
+
+
+
+
+#endif // LL_LLMACHINEID_H
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index 251c60b5bf..e5548007bd 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -713,6 +713,7 @@ void LLNavigationBar::onNavigationButtonHeldUp(LLButton* nav_button)
void LLNavigationBar::handleLoginComplete()
{
+ LLTeleportHistory::getInstance()->handleLoginComplete();
mCmbLocation->handleLoginComplete();
}
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 680ed35fa2..46f531fdd9 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -34,6 +34,7 @@
#include "message.h"
+#include "llappviewer.h"
#include "llfloaterreg.h"
#include "lltrans.h"
@@ -388,6 +389,7 @@ BOOL LLNearbyChatBar::postBuild()
mChatBox->setCommitCallback(boost::bind(&LLNearbyChatBar::onChatBoxCommit, this));
mChatBox->setKeystrokeCallback(&onChatBoxKeystroke, this);
mChatBox->setFocusLostCallback(boost::bind(&onChatBoxFocusLost, _1, this));
+ mChatBox->setFocusReceivedCallback(boost::bind(&LLNearbyChatBar::onChatBoxFocusReceived, this));
mChatBox->setIgnoreArrowKeys( FALSE );
mChatBox->setCommitOnFocusLost( FALSE );
@@ -545,6 +547,11 @@ void LLNearbyChatBar::onChatBoxFocusLost(LLFocusableElement* caller, void* userd
gAgent.stopTyping();
}
+void LLNearbyChatBar::onChatBoxFocusReceived()
+{
+ mChatBox->setEnabled(!gDisconnected);
+}
+
EChatType LLNearbyChatBar::processChatTypeTriggers(EChatType type, std::string &str)
{
U32 length = str.length();
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index 5af3152662..83c174fd10 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -122,6 +122,7 @@ protected:
static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str);
static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata);
static void onChatBoxFocusLost(LLFocusableElement* caller, void* userdata);
+ void onChatBoxFocusReceived();
void sendChat( EChatType type );
void onChatBoxCommit();
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 17a2db7a43..77db280487 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -43,12 +43,16 @@
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "lllistcontextmenu.h"
+#include "llnotificationsutil.h"
+#include "llsidetray.h"
#include "lltransutil.h"
#include "llviewermenu.h"
#include "llvoavatar.h"
#include "llvoavatarself.h"
#include "llwearableitemslist.h"
+static bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y);
+
//////////////////////////////////////////////////////////////////////////
class OutfitContextMenu : public LLListContextMenu
@@ -66,12 +70,63 @@ protected:
boost::bind(&LLAppearanceMgr::addCategoryToCurrentOutfit, &LLAppearanceMgr::instance(), selected_id));
registrar.add("Outfit.TakeOff",
boost::bind(&LLAppearanceMgr::takeOffOutfit, &LLAppearanceMgr::instance(), selected_id));
- // *TODO: implement this
- // registrar.add("Outfit.Rename", boost::bind());
- // registrar.add("Outfit.Delete", boost::bind());
+ registrar.add("Outfit.Edit", boost::bind(editOutfit));
+ registrar.add("Outfit.Rename", boost::bind(renameOutfit, selected_id));
+ registrar.add("Outfit.Delete", boost::bind(deleteOutfit, selected_id));
+
+ enable_registrar.add("Outfit.OnEnable", boost::bind(&OutfitContextMenu::onEnable, this, _2));
return createFromFile("menu_outfit_tab.xml");
}
+
+ bool onEnable(const LLSD& data)
+ {
+ std::string param = data.asString();
+ LLUUID outfit_cat_id = mUUIDs.back();
+ bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == outfit_cat_id;
+
+ if ("wear_replace" == param)
+ {
+ return !is_worn;
+ }
+ else if ("wear_add" == param)
+ {
+ return !is_worn;
+ }
+ else if ("take_off" == param)
+ {
+ return is_worn;
+ }
+ else if ("edit" == param)
+ {
+ return is_worn;
+ }
+ else if ("rename" == param)
+ {
+ return get_is_category_renameable(&gInventory, outfit_cat_id);
+ }
+ else if ("delete" == param)
+ {
+ return LLAppearanceMgr::instance().getCanRemoveOutfit(outfit_cat_id);
+ }
+
+ return true;
+ }
+
+ static void editOutfit()
+ {
+ LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
+ }
+
+ static void renameOutfit(const LLUUID& outfit_cat_id)
+ {
+ LLAppearanceMgr::instance().renameOutfit(outfit_cat_id);
+ }
+
+ static void deleteOutfit(const LLUUID& outfit_cat_id)
+ {
+ remove_category(&gInventory, outfit_cat_id);
+ }
};
//////////////////////////////////////////////////////////////////////////
@@ -82,12 +137,9 @@ LLOutfitsList::LLOutfitsList()
: LLPanel()
, mAccordion(NULL)
, mListCommands(NULL)
- , mSelectedList(NULL)
+ , mIsInitialized(false)
{
mCategoriesObserver = new LLInventoryCategoriesObserver();
- gInventory.addObserver(mCategoriesObserver);
-
- gInventory.addObserver(this);
mOutfitMenu = new OutfitContextMenu();
}
@@ -101,11 +153,6 @@ LLOutfitsList::~LLOutfitsList()
gInventory.removeObserver(mCategoriesObserver);
delete mCategoriesObserver;
}
-
- if (gInventory.containsObserver(this))
- {
- gInventory.removeObserver(this);
- }
}
BOOL LLOutfitsList::postBuild()
@@ -116,32 +163,36 @@ BOOL LLOutfitsList::postBuild()
}
//virtual
-void LLOutfitsList::changed(U32 mask)
+void LLOutfitsList::onOpen(const LLSD& /*info*/)
{
- if (!gInventory.isInventoryUsable())
- return;
+ if (!mIsInitialized)
+ {
+ // *TODO: I'm not sure is this check necessary but it never match while developing.
+ if (!gInventory.isInventoryUsable())
+ return;
- const LLUUID outfits = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
- LLViewerInventoryCategory* category = gInventory.getCategory(outfits);
- if (!category)
- return;
+ const LLUUID outfits = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
+
+ // *TODO: I'm not sure is this check necessary but it never match while developing.
+ LLViewerInventoryCategory* category = gInventory.getCategory(outfits);
+ if (!category)
+ return;
+
+ gInventory.addObserver(mCategoriesObserver);
- // Start observing changes in "My Outfits" category.
- mCategoriesObserver->addCategory(outfits,
+ // Start observing changes in "My Outfits" category.
+ mCategoriesObserver->addCategory(outfits,
boost::bind(&LLOutfitsList::refreshList, this, outfits));
- // Fetch "My Outfits" contents and refresh the list to display
- // initially fetched items. If not all items are fetched now
- // the observer will refresh the list as soon as the new items
- // arrive.
- category->fetch();
- refreshList(outfits);
-
- // This observer is used to start the initial outfits fetch
- // when inventory becomes usable. It is no longer needed because
- // "My Outfits" category is now observed by
- // LLInventoryCategoriesObserver.
- gInventory.removeObserver(this);
+ // Fetch "My Outfits" contents and refresh the list to display
+ // initially fetched items. If not all items are fetched now
+ // the observer will refresh the list as soon as the new items
+ // arrive.
+ category->fetch();
+ refreshList(outfits);
+
+ mIsInitialized = true;
+ }
}
void LLOutfitsList::refreshList(const LLUUID& category_id)
@@ -177,8 +228,6 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
static LLXMLNodePtr accordionXmlNode = getAccordionTabXMLNode();
LLAccordionCtrlTab* tab = LLUICtrlFactory::defaultBuilder<LLAccordionCtrlTab>(accordionXmlNode, NULL, NULL);
- tab->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onAccordionTabRightClick, this,
- _1, _2, _3, cat_id));
tab->setName(name);
tab->setTitle(name);
@@ -199,6 +248,12 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
// Map the new tab with outfit category UUID.
mOutfitsMap.insert(LLOutfitsList::outfits_map_value_t(cat_id, tab));
+ tab->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onAccordionTabRightClick, this,
+ _1, _2, _3, cat_id));
+
+ tab->setDoubleClickCallback(boost::bind(&LLOutfitsList::onAccordionTabDoubleClick, this,
+ _1, _2, _3, cat_id));
+
// Setting tab focus callback to monitor currently selected outfit.
tab->setFocusReceivedCallback(boost::bind(&LLOutfitsList::changeOutfitSelection, this, list, cat_id));
@@ -208,6 +263,8 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
// Setting list refresh callback to apply filter on list change.
list->setRefreshCompleteCallback(boost::bind(&LLOutfitsList::onFilteredWearableItemsListRefresh, this, _1));
+ list->setRightMouseDownCallback(boost::bind(&LLOutfitsList::onWearableItemsListRightClick, this, _1, _2, _3));
+
// Fetch the new outfit contents.
cat->fetch();
@@ -237,23 +294,27 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
outfits_map_t::iterator outfits_iter = mOutfitsMap.find((*iter));
if (outfits_iter != mOutfitsMap.end())
{
- // An outfit is removed from the list. Do the following:
- // 1. Remove outfit accordion tab from accordion.
- mAccordion->removeCollapsibleCtrl(outfits_iter->second);
-
const LLUUID& outfit_id = outfits_iter->first;
+ LLAccordionCtrlTab* tab = outfits_iter->second;
- // 2. Remove outfit category from observer to stop monitoring its changes.
+ // An outfit is removed from the list. Do the following:
+ // 1. Remove outfit category from observer to stop monitoring its changes.
mCategoriesObserver->removeCategory(outfit_id);
- // 3. Reset selection if selected outfit is being removed.
- if (mSelectedOutfitUUID == outfit_id)
+ // 2. Remove selected lists map entry.
+ mSelectedListsMap.erase(outfit_id);
+
+ // 3. Reset currently selected outfit id if it is being removed.
+ if (outfit_id == mSelectedOutfitUUID)
{
- changeOutfitSelection(NULL, LLUUID());
+ mSelectedOutfitUUID = LLUUID();
}
// 4. Remove category UUID to accordion tab mapping.
mOutfitsMap.erase(outfits_iter);
+
+ // 5. Remove outfit tab from accordion.
+ mAccordion->removeCollapsibleCtrl(tab);
}
}
@@ -283,6 +344,8 @@ void LLOutfitsList::onSelectionChange(LLUICtrl* ctrl)
void LLOutfitsList::performAction(std::string action)
{
+ if (mSelectedOutfitUUID.isNull()) return;
+
LLViewerInventoryCategory* cat = gInventory.getCategory(mSelectedOutfitUUID);
if (!cat) return;
@@ -294,6 +357,10 @@ void LLOutfitsList::performAction(std::string action)
{
LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, TRUE );
}
+ else if ("rename_outfit" == action)
+ {
+ LLAppearanceMgr::instance().renameOutfit(mSelectedOutfitUUID);
+ }
}
void LLOutfitsList::setFilterSubString(const std::string& string)
@@ -367,14 +434,28 @@ void LLOutfitsList::updateOutfitTab(const LLUUID& category_id)
void LLOutfitsList::changeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id)
{
- // Reset selection in previously selected tab
- // if a new one is selected.
- if (list && mSelectedList && mSelectedList != list)
+ MASK mask = gKeyboard->currentMask(TRUE);
+
+ // Reset selection in all previously selected tabs except for the current
+ // if new selection is started.
+ if (list && !(mask & MASK_CONTROL))
{
- mSelectedList->resetSelection();
+ for (wearables_lists_map_t::iterator iter = mSelectedListsMap.begin();
+ iter != mSelectedListsMap.end();
+ ++iter)
+ {
+ LLWearableItemsList* selected_list = (*iter).second;
+ if (selected_list != list)
+ {
+ selected_list->resetSelection();
+ }
+ }
+
+ // Clear current selection.
+ mSelectedListsMap.clear();
}
- mSelectedList = list;
+ mSelectedListsMap.insert(wearables_lists_map_value_t(category_id, list));
mSelectedOutfitUUID = category_id;
}
@@ -405,6 +486,10 @@ void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl)
// hide tab if its title doesn't pass filter
// and it has no visible items
tab->setVisible(list->size() != 0);
+
+ // remove title highlighting because it might
+ // have been previously highlighted by less restrictive filter
+ tab->setTitle(tab->getTitle());
}
else
{
@@ -457,6 +542,10 @@ void LLOutfitsList::applyFilter(const std::string& new_filter_substring)
// hide tab if its title doesn't pass filter
// and it has no visible items
tab->setVisible(list->size() != 0);
+
+ // remove title highlighting because it might
+ // have been previously highlighted by less restrictive filter
+ tab->setTitle(tab->getTitle());
}
else
{
@@ -489,16 +578,62 @@ void LLOutfitsList::applyFilter(const std::string& new_filter_substring)
void LLOutfitsList::onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id)
{
LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl);
- if(mOutfitMenu && tab && tab->getHeaderVisible() && cat_id.notNull())
+ if(mOutfitMenu && is_tab_header_clicked(tab, y) && cat_id.notNull())
{
- S32 header_bottom = tab->getLocalRect().getHeight() - tab->getHeaderHeight();
- if(y >= header_bottom)
+ // Focus tab header to trigger tab selection change.
+ LLUICtrl* header = tab->findChild<LLUICtrl>("dd_header");
+ if (header)
{
- uuid_vec_t selected_uuids;
- selected_uuids.push_back(cat_id);
- mOutfitMenu->show(ctrl, selected_uuids, x, y);
+ header->setFocus(TRUE);
}
+
+ uuid_vec_t selected_uuids;
+ selected_uuids.push_back(cat_id);
+ mOutfitMenu->show(ctrl, selected_uuids, x, y);
}
}
+void LLOutfitsList::onAccordionTabDoubleClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id)
+{
+ LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl);
+ if(is_tab_header_clicked(tab, y) && cat_id.notNull())
+ {
+ LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
+ if (!cat) return;
+
+ LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, FALSE );
+ }
+}
+
+void LLOutfitsList::onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y)
+{
+ LLWearableItemsList* list = dynamic_cast<LLWearableItemsList*>(ctrl);
+ if (!list) return;
+
+ uuid_vec_t selected_uuids;
+
+ // Collect seleted items from all selected lists.
+ for (wearables_lists_map_t::iterator iter = mSelectedListsMap.begin();
+ iter != mSelectedListsMap.end();
+ ++iter)
+ {
+ uuid_vec_t uuids;
+ (*iter).second->getSelectedUUIDs(uuids);
+
+ S32 prev_size = selected_uuids.size();
+ selected_uuids.resize(prev_size + uuids.size());
+ std::copy(uuids.begin(), uuids.end(), selected_uuids.begin() + prev_size);
+ }
+
+ LLWearableItemsList::ContextMenu::instance().show(list, selected_uuids, x, y);
+}
+
+bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y)
+{
+ if(!tab || !tab->getHeaderVisible()) return false;
+
+ S32 header_bottom = tab->getLocalRect().getHeight() - tab->getHeaderHeight();
+ return y >= header_bottom;
+}
+
// EOF
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index b6b3d6ae46..44f6ec908b 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -49,12 +49,10 @@ class LLListContextMenu;
* A list of agents's outfits from "My Outfits" inventory category
* which displays each outfit in an accordion tab with a flat list
* of items inside it.
- * Uses LLInventoryCategoriesObserver to monitor changes to "My Outfits"
- * inventory category and refresh the outfits listed in it.
- * This class is derived from LLInventoryObserver to know when inventory
- * becomes usable and it is safe to request data from inventory model.
+ *
+ * Starts fetching nevessary inventory content on first openning.
*/
-class LLOutfitsList : public LLPanel, public LLInventoryObserver
+class LLOutfitsList : public LLPanel
{
public:
LLOutfitsList();
@@ -62,16 +60,16 @@ public:
/*virtual*/ BOOL postBuild();
- /*virtual*/ void changed(U32 mask);
+ /*virtual*/ void onOpen(const LLSD& info);
void refreshList(const LLUUID& category_id);
- void onSelectionChange(LLUICtrl* ctrl);
-
void performAction(std::string action);
void setFilterSubString(const std::string& string);
+ const LLUUID& getSelectedOutfitUUID() const { return mSelectedOutfitUUID; }
+
private:
/**
* Reads xml with accordion tab and Flat list from xml file.
@@ -107,13 +105,22 @@ private:
void applyFilter(const std::string& new_filter_substring);
void onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id);
+ void onAccordionTabDoubleClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id);
+ void onWearableItemsListRightClick(LLUICtrl* ctrl, S32 x, S32 y);
+
+ void onSelectionChange(LLUICtrl* ctrl);
+
+ static void onOutfitRename(const LLSD& notification, const LLSD& response);
LLInventoryCategoriesObserver* mCategoriesObserver;
LLAccordionCtrl* mAccordion;
LLPanel* mListCommands;
- LLWearableItemsList* mSelectedList;
+ typedef std::map<LLUUID, LLWearableItemsList*> wearables_lists_map_t;
+ typedef wearables_lists_map_t::value_type wearables_lists_map_value_t;
+ wearables_lists_map_t mSelectedListsMap;
+
LLUUID mSelectedOutfitUUID;
std::string mFilterSubString;
@@ -123,6 +130,8 @@ private:
outfits_map_t mOutfitsMap;
LLListContextMenu* mOutfitMenu;
+
+ bool mIsInitialized;
};
#endif //LL_LLOUTFITSLIST_H
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 4bf4f9eac1..7fb46fc84f 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -221,8 +221,6 @@ BOOL LLLandmarksPanel::postBuild()
// mast be called before any other initXXX methods to init Gear menu
initListCommandsHandlers();
- U32 sort_order = gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER);
- mSortByDate = sort_order & LLInventoryFilter::SO_DATE;
initFavoritesInventoryPanel();
initLandmarksInventoryPanel();
initMyInventoryPanel();
@@ -607,7 +605,8 @@ void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list
inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::onSelectionChange, this, inventory_list, _1, _2));
inventory_list->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
- updateSortOrder(inventory_list, mSortByDate);
+ bool sorting_order = gSavedSettings.getBOOL("LandmarksSortedByDate");
+ updateSortOrder(inventory_list, sorting_order);
LLPlacesFolderView* root_folder = dynamic_cast<LLPlacesFolderView*>(inventory_list->getRootFolder());
if (root_folder)
@@ -875,10 +874,12 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata)
}
else if ("sort_by_date" == command_name)
{
- mSortByDate = !mSortByDate;
- updateSortOrder(mLandmarksInventoryPanel, mSortByDate);
- updateSortOrder(mMyInventoryPanel, mSortByDate);
- updateSortOrder(mLibraryInventoryPanel, mSortByDate);
+ bool sorting_order = gSavedSettings.getBOOL("LandmarksSortedByDate");
+ sorting_order=!sorting_order;
+ gSavedSettings.setBOOL("LandmarksSortedByDate",sorting_order);
+ updateSortOrder(mLandmarksInventoryPanel, sorting_order);
+ updateSortOrder(mMyInventoryPanel, sorting_order);
+ updateSortOrder(mLibraryInventoryPanel, sorting_order);
}
else
{
@@ -895,7 +896,8 @@ bool LLLandmarksPanel::isActionChecked(const LLSD& userdata) const
if ( "sort_by_date" == command_name)
{
- return mSortByDate;
+ bool sorting_order = gSavedSettings.getBOOL("LandmarksSortedByDate");
+ return sorting_order;
}
return false;
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index 8f8d9c2708..0e70c72f11 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -167,7 +167,6 @@ private:
LLInventoryObserver* mInventoryObserver;
LLPanel* mListCommands;
- bool mSortByDate;
typedef std::vector<LLAccordionCtrlTab*> accordion_tabs_t;
accordion_tabs_t mAccordionTabs;
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 0009f7203a..1cb0f4601b 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -215,7 +215,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
getChild<LLLineEditor>("password_edit")->setKeystrokeCallback(onPassKey, this);
// change z sort of clickable text to be behind buttons
- sendChildToBack(getChildView("channel_text"));
+ //sendChildToBack(getChildView("channel_text"));
sendChildToBack(getChildView("forgot_password_text"));
LLLineEditor* edit = getChild<LLLineEditor>("password_edit");
@@ -241,10 +241,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
std::string version = llformat("%s (%d)",
LLVersionInfo::getShortVersion().c_str(),
LLVersionInfo::getBuild());
- LLTextBox* channel_text = getChild<LLTextBox>("channel_text");
- channel_text->setTextArg("[CHANNEL]", channel); // though not displayed
- channel_text->setTextArg("[VERSION]", version);
- channel_text->setClickedCallback(onClickVersion, this);
+ //LLTextBox* channel_text = getChild<LLTextBox>("channel_text");
+ //channel_text->setTextArg("[CHANNEL]", channel); // though not displayed
+ //channel_text->setTextArg("[VERSION]", version);
+ //channel_text->setClickedCallback(onClickVersion, this);
LLTextBox* forgot_password_text = getChild<LLTextBox>("forgot_password_text");
forgot_password_text->setClickedCallback(onClickForgotPassword, NULL);
@@ -1164,7 +1164,8 @@ void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe)
void LLPanelLogin::updateLoginPanelLinks()
{
- LLSD grid_data = LLGridManager::getInstance()->getGridInfo();
+ LLSD grid_data;
+ LLGridManager::getInstance()->getGridInfo(grid_data);
bool system_grid = grid_data.has(GRID_IS_SYSTEM_GRID_VALUE);
// need to call through sInstance, as it's called from onSelectServer, which
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index ae4b288588..4982e98f8e 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -36,6 +36,7 @@
// *TODO: reorder includes to match the coding standard
#include "llagent.h"
+#include "llagentcamera.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
#include "llcofwearables.h"
@@ -60,6 +61,7 @@
#include "llinventorymodelbackgroundfetch.h"
#include "llpaneloutfitsinventory.h"
#include "lluiconstants.h"
+#include "llsaveoutfitcombobtn.h"
#include "llscrolllistctrl.h"
#include "lltextbox.h"
#include "lluictrlfactory.h"
@@ -67,6 +69,7 @@
#include "llsidepanelappearance.h"
#include "lltoggleablemenu.h"
#include "llwearablelist.h"
+#include "llwearableitemslist.h"
static LLRegisterPanelClassWrapper<LLPanelOutfitEdit> t_outfit_edit("panel_outfit_edit");
@@ -74,9 +77,72 @@ const U64 WEARABLE_MASK = (1LL << LLInventoryType::IT_WEARABLE);
const U64 ATTACHMENT_MASK = (1LL << LLInventoryType::IT_ATTACHMENT) | (1LL << LLInventoryType::IT_OBJECT);
const U64 ALL_ITEMS_MASK = WEARABLE_MASK | ATTACHMENT_MASK;
-static const std::string SAVE_BTN("save_btn");
static const std::string REVERT_BTN("revert_btn");
+class LLPanelOutfitEditGearMenu
+{
+public:
+ static LLMenuGL* create()
+ {
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
+
+ registrar.add("Wearable.Create", boost::bind(onCreate, _2));
+
+ LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>(
+ "menu_cof_gear.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
+ llassert(menu);
+ if (menu)
+ {
+ populateCreateWearableSubmenus(menu);
+ menu->buildDrawLabels();
+ }
+
+ return menu;
+ }
+
+private:
+ static void onCreate(const LLSD& param)
+ {
+ LLWearableType::EType type = LLWearableType::typeNameToType(param.asString());
+ if (type == LLWearableType::WT_NONE)
+ {
+ llwarns << "Invalid wearable type" << llendl;
+ return;
+ }
+
+ LLAgentWearables::createWearable(type, true);
+ }
+
+ // Populate the menu with items like "New Skin", "New Pants", etc.
+ static void populateCreateWearableSubmenus(LLMenuGL* menu)
+ {
+ LLView* menu_clothes = gMenuHolder->findChildView("COF.Gear.New_Clothes", FALSE);
+ LLView* menu_bp = gMenuHolder->findChildView("COF.Geear.New_Body_Parts", FALSE);
+
+ if (!menu_clothes || !menu_bp)
+ {
+ llassert(menu_clothes && menu_bp);
+ return;
+ }
+
+ for (U8 i = LLWearableType::WT_SHAPE; i != (U8) LLWearableType::WT_COUNT; ++i)
+ {
+ LLWearableType::EType type = (LLWearableType::EType) i;
+ const std::string& type_name = LLWearableType::getTypeName(type);
+
+ LLMenuItemCallGL::Params p;
+ p.name = type_name;
+ p.label = LLWearableType::getTypeDefaultNewName(type);
+ p.on_click.function_name = "Wearable.Create";
+ p.on_click.parameter = LLSD(type_name);
+
+ LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ?
+ menu_clothes : menu_bp;
+ LLUICtrlFactory::create<LLMenuItemCallGL>(p, parent);
+ }
+ }
+};
+
class LLCOFObserver : public LLInventoryObserver
{
public:
@@ -214,7 +280,10 @@ LLPanelOutfitEdit::LLPanelOutfitEdit()
mCOFObserver(NULL),
mGearMenu(NULL),
mCOFDragAndDropObserver(NULL),
- mInitialized(false)
+ mInitialized(false),
+ mAddWearablesPanel(NULL),
+ mWearableListMaskCollector(NULL),
+ mWearableListTypeCollector(NULL)
{
mSavedFolderState = new LLSaveFolderState();
mSavedFolderState->setApply(FALSE);
@@ -236,6 +305,9 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit()
delete mCOFObserver;
delete mCOFDragAndDropObserver;
+
+ delete mWearableListMaskCollector;
+ delete mWearableListTypeCollector;
}
BOOL LLPanelOutfitEdit::postBuild()
@@ -255,19 +327,18 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL);
childSetCommitCallback("folder_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredFolderWearablesPanel, this), NULL);
childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredWearablesPanel, this), NULL);
- childSetCommitCallback("gear_menu_btn", boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1), NULL);
childSetCommitCallback("wearables_gear_menu_btn", boost::bind(&LLPanelOutfitEdit::onGearButtonClick, this, _1), NULL);
mCOFWearables = getChild<LLCOFWearables>("cof_wearables_list");
mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this));
+ mCOFWearables->getCOFCallbacks().mAddWearable = boost::bind(&LLPanelOutfitEdit::onAddWearableClicked, this);
mCOFWearables->getCOFCallbacks().mEditWearable = boost::bind(&LLPanelOutfitEdit::onEditWearableClicked, this);
mCOFWearables->getCOFCallbacks().mDeleteWearable = boost::bind(&LLPanelOutfitEdit::onRemoveFromOutfitClicked, this);
mCOFWearables->getCOFCallbacks().mMoveWearableCloser = boost::bind(&LLPanelOutfitEdit::moveWearable, this, true);
mCOFWearables->getCOFCallbacks().mMoveWearableFurther = boost::bind(&LLPanelOutfitEdit::moveWearable, this, false);
- mCOFWearables->childSetAction("add_btn", boost::bind(&LLPanelOutfitEdit::toggleAddWearablesPanel, this));
-
+ mAddWearablesPanel = getChild<LLPanel>("add_wearables_panel");
mInventoryItemsPanel = getChild<LLInventoryPanel>("inventory_items");
mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK);
@@ -288,7 +359,8 @@ BOOL LLPanelOutfitEdit::postBuild()
mSearchFilter = getChild<LLFilterEditor>("look_item_filter");
mSearchFilter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onSearchEdit, this, _2));
-
+
+ childSetAction("show_add_wearables_btn", boost::bind(&LLPanelOutfitEdit::toggleAddWearablesPanel, this));
childSetAction("add_to_outfit_btn", boost::bind(&LLPanelOutfitEdit::onAddToOutfitClicked, this));
mEditWearableBtn = getChild<LLButton>("edit_wearable_btn");
@@ -298,18 +370,13 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance()));
- childSetAction(SAVE_BTN, boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
- childSetAction("save_flyout_btn", boost::bind(&LLPanelOutfitEdit::showSaveMenu, this));
-
- LLUICtrl::CommitCallbackRegistry::ScopedRegistrar save_registar;
- save_registar.add("Outfit.Save.Action", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
- save_registar.add("Outfit.SaveAsNew.Action", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true));
- mSaveMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_save_outfit.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ mWearableListMaskCollector = new LLFindNonLinksByMask(ALL_ITEMS_MASK);
+ mWearableListTypeCollector = new LLFindWearablesOfType(LLWearableType::WT_NONE);
mWearableItemsPanel = getChild<LLPanel>("filtered_wearables_panel");
mWearableItemsList = getChild<LLInventoryItemsList>("filtered_wearables_list");
- mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, ALL_ITEMS_MASK);
+ mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this));
return TRUE;
}
@@ -318,6 +385,10 @@ void LLPanelOutfitEdit::onOpen(const LLSD& key)
{
if (!mInitialized)
{
+ // *TODO: this method is called even panel is not visible to user because its parent layout panel is hidden.
+ // So, we can defer initializing a bit.
+ mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, mWearableListMaskCollector);
+ mWearableListManager->populateList();
displayCurrentOutfit();
mInitialized = true;
}
@@ -334,7 +405,29 @@ void LLPanelOutfitEdit::moveWearable(bool closer_to_body)
void LLPanelOutfitEdit::toggleAddWearablesPanel()
{
- childSetVisible("add_wearables_panel", !childIsVisible("add_wearables_panel"));
+ BOOL current_visibility = mAddWearablesPanel->getVisible();
+ showAddWearablesPanel(!current_visibility);
+}
+
+void LLPanelOutfitEdit::showAddWearablesPanel(bool show_add_wearables)
+{
+ mAddWearablesPanel->setVisible(show_add_wearables);
+
+ childSetValue("show_add_wearables_btn", show_add_wearables);
+
+ childSetVisible("filter_wearables_combobox", show_add_wearables);
+ childSetVisible("filter_button", show_add_wearables);
+
+ //search filter should be disabled
+ if (!show_add_wearables)
+ {
+ childSetValue("filter_button", false);
+ showWearablesFilter();
+ }
+
+ //switching button bars
+ childSetVisible("no_add_wearables_button_bar", !show_add_wearables);
+ childSetVisible("add_wearables_button_bar", show_add_wearables);
}
void LLPanelOutfitEdit::showWearablesFilter()
@@ -372,33 +465,6 @@ void LLPanelOutfitEdit::showFilteredFolderWearablesPanel()
mFolderViewBtn->setToggleState(TRUE);
}
-void LLPanelOutfitEdit::saveOutfit(bool as_new)
-{
- if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit())
- {
- // we don't need to ask for an outfit name, and updateBaseOutfit() successfully saved.
- // If updateBaseOutfit fails, ask for an outfit name anyways
- return;
- }
-
- LLPanelOutfitsInventory* panel_outfits_inventory = LLPanelOutfitsInventory::findInstance();
- if (panel_outfits_inventory)
- {
- panel_outfits_inventory->onSave();
- }
-
- //*TODO how to get to know when base outfit is updated or new outfit is created?
-}
-
-void LLPanelOutfitEdit::showSaveMenu()
-{
- S32 x, y;
- LLUI::getMousePositionLocal(this, &x, &y);
-
- mSaveMenu->updateParent(LLMenuGL::sMenuContainer);
- LLMenuGL::showPopup(this, mSaveMenu, x, y);
-}
-
void LLPanelOutfitEdit::onTypeFilterChanged(LLUICtrl* ctrl)
{
LLComboBox* type_filter = dynamic_cast<LLComboBox*>(ctrl);
@@ -407,7 +473,9 @@ void LLPanelOutfitEdit::onTypeFilterChanged(LLUICtrl* ctrl)
{
U32 curr_filter_type = type_filter->getCurrentIndex();
mInventoryItemsPanel->setFilterTypes(mLookItemTypes[curr_filter_type].inventoryMask);
- mWearableListManager->setFilterMask(mLookItemTypes[curr_filter_type].inventoryMask);
+
+ mWearableListMaskCollector->setFilterMask(mLookItemTypes[curr_filter_type].inventoryMask);
+ mWearableListManager->setFilterCollector(mWearableListMaskCollector);
}
mSavedFolderState->setApply(TRUE);
@@ -487,6 +555,25 @@ void LLPanelOutfitEdit::onAddToOutfitClicked(void)
LLAppearanceMgr::getInstance()->wearItemOnAvatar(selected_id);
}
+void LLPanelOutfitEdit::onAddWearableClicked(void)
+{
+ LLPanelDummyClothingListItem* item = dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem());
+
+ if(item)
+ {
+ showFilteredWearableItemsList(item->getWearableType());
+ }
+}
+
+void LLPanelOutfitEdit::onReplaceBodyPartMenuItemClicked(LLUUID selected_item_id)
+{
+ LLViewerInventoryItem* item = gInventory.getLinkedItem(selected_item_id);
+
+ if (item && item->getType() == LLAssetType::AT_BODYPART)
+ {
+ showFilteredWearableItemsList(item->getWearableType());
+ }
+}
void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void)
{
@@ -675,10 +762,10 @@ void LLPanelOutfitEdit::updateVerbs()
bool outfit_is_dirty = LLAppearanceMgr::getInstance()->isOutfitDirty();
bool has_baseoutfit = LLAppearanceMgr::getInstance()->getBaseOutfitUUID().notNull();
- childSetEnabled(SAVE_BTN, outfit_is_dirty);
+ mSaveComboBtn->setSaveBtnEnabled(outfit_is_dirty);
childSetEnabled(REVERT_BTN, outfit_is_dirty && has_baseoutfit);
- mSaveMenu->setItemEnabled("save_outfit", outfit_is_dirty);
+ mSaveComboBtn->setMenuItemEnabled("save_outfit", outfit_is_dirty);
mStatus->setText(outfit_is_dirty ? getString("unsaved_changes") : getString("now_editing"));
@@ -699,27 +786,19 @@ void LLPanelOutfitEdit::onGearButtonClick(LLUICtrl* clicked_button)
{
if(!mGearMenu)
{
- LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
-
- registrar.add("Gear.OnClick", boost::bind(&LLPanelOutfitEdit::onGearMenuItemClick, this, _2));
-
- mGearMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>(
- "menu_cof_gear.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
- mGearMenu->buildDrawLabels();
- mGearMenu->updateParent(LLMenuGL::sMenuContainer);
+ mGearMenu = LLPanelOutfitEditGearMenu::create();
}
S32 menu_y = mGearMenu->getRect().getHeight() + clicked_button->getRect().getHeight();
LLMenuGL::showPopup(clicked_button, mGearMenu, 0, menu_y);
}
-void LLPanelOutfitEdit::onGearMenuItemClick(const LLSD& data)
+void LLPanelOutfitEdit::showFilteredWearableItemsList(LLWearableType::EType type)
{
- std::string param = data.asString();
- if("add" == param)
- {
- // TODO
- }
+ mWearableListTypeCollector->setType(type);
+ mWearableListManager->setFilterCollector(mWearableListTypeCollector);
+ showAddWearablesPanel(true);
+ showFilteredWearablesPanel();
}
// EOF
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 1bf69c5606..802386c573 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -59,6 +59,9 @@ class LLToggleableMenu;
class LLFilterEditor;
class LLFilteredWearableListManager;
class LLMenuGL;
+class LLFindNonLinksByMask;
+class LLFindWearablesOfType;
+class LLSaveOutfitComboBtn;
class LLPanelOutfitEdit : public LLPanel
{
@@ -90,11 +93,10 @@ public:
void moveWearable(bool closer_to_body);
void toggleAddWearablesPanel();
+ void showAddWearablesPanel(bool show__add_wearables);
void showWearablesFilter();
void showFilteredWearablesPanel();
void showFilteredFolderWearablesPanel();
- void saveOutfit(bool as_new = false);
- void showSaveMenu();
void onTypeFilterChanged(LLUICtrl* ctrl);
void onSearchEdit(const std::string& string);
@@ -103,6 +105,8 @@ public:
void onOutfitItemSelectionChange(void);
void onRemoveFromOutfitClicked(void);
void onEditWearableClicked(void);
+ void onAddWearableClicked(void);
+ void onReplaceBodyPartMenuItemClicked(LLUUID selected_item_id);
void displayCurrentOutfit();
void updateCurrentOutfitName();
@@ -128,7 +132,7 @@ public:
private:
void onGearButtonClick(LLUICtrl* clicked_button);
- void onGearMenuItemClick(const LLSD& data);
+ void showFilteredWearableItemsList(LLWearableType::EType type);
LLTextBox* mCurrentOutfitName;
@@ -140,7 +144,10 @@ private:
LLButton* mEditWearableBtn;
LLButton* mFolderViewBtn;
LLButton* mListViewBtn;
- LLToggleableMenu* mSaveMenu;
+ LLPanel* mAddWearablesPanel;
+
+ LLFindNonLinksByMask* mWearableListMaskCollector;
+ LLFindWearablesOfType* mWearableListTypeCollector;
LLFilteredWearableListManager* mWearableListManager;
LLInventoryItemsList* mWearableItemsList;
@@ -154,6 +161,8 @@ private:
LLCOFWearables* mCOFWearables;
LLMenuGL* mGearMenu;
bool mInitialized;
+ std::auto_ptr<LLSaveOutfitComboBtn> mSaveComboBtn;
+
};
#endif // LL_LLPANELOUTFITEDIT_H
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index a7e8f497d9..5f67f3d989 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -42,6 +42,7 @@
#include "llfloaterworldmap.h"
#include "llfloaterinventory.h"
#include "llfoldervieweventlistener.h"
+#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llinventorypanel.h"
@@ -50,6 +51,7 @@
#include "llmodaldialog.h"
#include "llnotificationsutil.h"
#include "lloutfitslist.h"
+#include "llsaveoutfitcombobtn.h"
#include "llsidepanelappearance.h"
#include "llsidetray.h"
#include "lltabcontainer.h"
@@ -69,11 +71,134 @@ static const std::string COF_TAB_NAME = "cof_tab";
static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory");
+class LLOutfitListGearMenu
+{
+public:
+ LLOutfitListGearMenu(LLOutfitsList* olist)
+ : mOutfitList(olist),
+ mMenu(NULL)
+ {
+ llassert_always(mOutfitList);
+
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
+ LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
+
+ registrar.add("Gear.Wear", boost::bind(&LLOutfitListGearMenu::onWear, this));
+ registrar.add("Gear.TakeOff", boost::bind(&LLOutfitListGearMenu::onTakeOff, this));
+ registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this));
+ registrar.add("Gear.Delete", boost::bind(&LLOutfitListGearMenu::onDelete, this));
+ registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2));
+
+ enable_registrar.add("Gear.OnEnable", boost::bind(&LLOutfitListGearMenu::onEnable, this, _2));
+
+ mMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>(
+ "menu_outfit_gear.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ llassert(mMenu);
+ }
+
+ LLMenuGL* getMenu() { return mMenu; }
+
+private:
+ const LLUUID& getSelectedOutfitID()
+ {
+ return mOutfitList->getSelectedOutfitUUID();
+ }
+
+ LLViewerInventoryCategory* getSelectedOutfit()
+ {
+ const LLUUID& selected_outfit_id = getSelectedOutfitID();
+ if (selected_outfit_id.isNull())
+ {
+ return NULL;
+ }
+
+ LLViewerInventoryCategory* cat = gInventory.getCategory(selected_outfit_id);
+ return cat;
+ }
+
+ void onWear()
+ {
+ LLViewerInventoryCategory* selected_outfit = getSelectedOutfit();
+ if (selected_outfit)
+ {
+ LLAppearanceMgr::instance().wearInventoryCategory(
+ selected_outfit, /*copy=*/ FALSE, /*append=*/ FALSE);
+ }
+ }
+
+ void onTakeOff()
+ {
+ const LLUUID& selected_outfit_id = getSelectedOutfitID();
+ if (selected_outfit_id.notNull())
+ {
+ LLAppearanceMgr::instance().takeOffOutfit(selected_outfit_id);
+ }
+ }
+
+ void onRename()
+ {
+ const LLUUID& selected_outfit_id = getSelectedOutfitID();
+ if (selected_outfit_id.notNull())
+ {
+ LLAppearanceMgr::instance().renameOutfit(selected_outfit_id);
+ }
+ }
+
+ void onDelete()
+ {
+ const LLUUID& selected_outfit_id = getSelectedOutfitID();
+ if (selected_outfit_id.notNull())
+ {
+ remove_category(&gInventory, selected_outfit_id);
+ }
+ }
+
+ void onCreate(const LLSD& data)
+ {
+ LLWearableType::EType type = LLWearableType::typeNameToType(data.asString());
+ if (type == LLWearableType::WT_NONE)
+ {
+ llwarns << "Invalid wearable type" << llendl;
+ return;
+ }
+
+ LLAgentWearables::createWearable(type, true);
+ }
+
+ bool onEnable(LLSD::String param)
+ {
+ const LLUUID& selected_outfit_id = getSelectedOutfitID();
+ bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == selected_outfit_id;
+
+ if ("wear" == param)
+ {
+ return !is_worn;
+ }
+ else if ("take_off" == param)
+ {
+ return is_worn;
+ }
+ else if ("rename" == param)
+ {
+ return get_is_category_renameable(&gInventory, selected_outfit_id);
+ }
+ else if ("delete" == param)
+ {
+ return LLAppearanceMgr::instance().getCanRemoveOutfit(selected_outfit_id);
+ }
+
+ return true;
+ }
+
+ LLOutfitsList* mOutfitList;
+ LLMenuGL* mMenu;
+};
LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
mMyOutfitsPanel(NULL),
mCurrentOutfitPanel(NULL),
mParent(NULL),
+ mGearMenu(NULL),
mInitialized(false)
{
mSavedFolderState = new LLSaveFolderState();
@@ -83,6 +208,7 @@ LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
LLPanelOutfitsInventory::~LLPanelOutfitsInventory()
{
+ delete mGearMenu;
delete mSavedFolderState;
}
@@ -101,6 +227,8 @@ BOOL LLPanelOutfitsInventory::postBuild()
LLInventoryModelBackgroundFetch::instance().start(outfits_cat);
}
+ mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this, true));
+
return TRUE;
}
@@ -371,9 +499,8 @@ void LLPanelOutfitsInventory::initListCommandsHandlers()
{
mListCommands = getChild<LLPanel>("bottom_panel");
- mListCommands->childSetAction("options_gear_btn", boost::bind(&LLPanelOutfitsInventory::onGearButtonClick, this));
+ mListCommands->childSetAction("options_gear_btn", boost::bind(&LLPanelOutfitsInventory::showGearMenu, this));
mListCommands->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this));
- mListCommands->childSetAction("make_outfit_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this));
mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this));
LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>("trash_btn");
@@ -383,8 +510,7 @@ void LLPanelOutfitsInventory::initListCommandsHandlers()
, _7 // EAcceptance* accept
));
- mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_outfit_gear.xml",
- gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ mGearMenu = new LLOutfitListGearMenu(mMyOutfitsPanel);
}
void LLPanelOutfitsInventory::updateListCommands()
@@ -396,26 +522,17 @@ void LLPanelOutfitsInventory::updateListCommands()
mListCommands->childSetEnabled("trash_btn", trash_enabled);
mListCommands->childSetEnabled("wear_btn", wear_enabled);
mListCommands->childSetVisible("wear_btn", wear_enabled);
- mListCommands->childSetEnabled("make_outfit_btn", make_outfit_enabled);
-}
-
-void LLPanelOutfitsInventory::onGearButtonClick()
-{
- showActionMenu(mMenuGearDefault,"options_gear_btn");
-}
-
-void LLPanelOutfitsInventory::onAddButtonClick()
-{
- onSave();
+ mSaveComboBtn->setSaveBtnEnabled(make_outfit_enabled);
}
-void LLPanelOutfitsInventory::showActionMenu(LLMenuGL* menu, std::string spawning_view_name)
+void LLPanelOutfitsInventory::showGearMenu()
{
+ LLMenuGL* menu = mGearMenu ? mGearMenu->getMenu() : NULL;
if (menu)
{
menu->buildDrawLabels();
menu->updateParent(LLMenuGL::sMenuContainer);
- LLView* spawning_view = getChild<LLView> (spawning_view_name);
+ LLView* spawning_view = getChild<LLView>("options_gear_btn");
S32 menu_x, menu_y;
//show menu in co-ordinates of panel
spawning_view->localPointToOtherView(0, spawning_view->getRect().getHeight(), &menu_x, &menu_y, this);
@@ -635,6 +752,7 @@ void LLPanelOutfitsInventory::onTabChange()
else
{
mMyOutfitsPanel->setFilterSubString(mFilterSubString);
+ mMyOutfitsPanel->onOpen(LLSD());
}
updateVerbs();
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index a0fe91cd80..aff7839bcc 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -46,6 +46,8 @@ class LLButton;
class LLMenuGL;
class LLSidepanelAppearance;
class LLTabContainer;
+class LLSaveOutfitComboBtn;
+class LLOutfitListGearMenu;
class LLPanelOutfitsInventory : public LLPanel
{
@@ -86,7 +88,7 @@ private:
LLSaveFolderState* mSavedFolderState;
LLTabContainer* mAppearanceTabs;
std::string mFilterSubString;
-
+ std::auto_ptr<LLSaveOutfitComboBtn> mSaveComboBtn;
public:
//////////////////////////////////////////////////////////////////////////////////
// tab panels
@@ -115,10 +117,8 @@ private:
protected:
void initListCommandsHandlers();
void updateListCommands();
- void onGearButtonClick();
void onWearButtonClick();
- void onAddButtonClick();
- void showActionMenu(LLMenuGL* menu, std::string spawning_view_name);
+ void showGearMenu();
void onTrashButtonClick();
void onClipboardAction(const LLSD& userdata);
BOOL isActionEnabled(const LLSD& command_name);
@@ -129,7 +129,7 @@ protected:
void onWearablesLoaded();
private:
LLPanel* mListCommands;
- LLMenuGL* mMenuGearDefault;
+ LLOutfitListGearMenu* mGearMenu;
LLMenuGL* mMenuAdd;
// List Commands //
////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 4f0946774a..f020ad9bc2 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -827,7 +827,8 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceAllParticipants(bool
void LLParticipantList::LLParticipantListMenu::confirmMuteAllCallback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if (option != 1)
+ // if Cancel pressed
+ if (option == 1)
{
return;
}
diff --git a/indra/newview/llsaveoutfitcombobtn.cpp b/indra/newview/llsaveoutfitcombobtn.cpp
new file mode 100644
index 0000000000..b9b577084b
--- /dev/null
+++ b/indra/newview/llsaveoutfitcombobtn.cpp
@@ -0,0 +1,97 @@
+/**
+ * @file llsaveoutfitcombobtn.cpp
+ * @brief Represents outfit save/save as combo button.
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, 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 "llappearancemgr.h"
+#include "llpaneloutfitsinventory.h"
+#include "llsaveoutfitcombobtn.h"
+#include "llviewermenu.h"
+
+static const std::string SAVE_BTN("save_btn");
+static const std::string SAVE_FLYOUT_BTN("save_flyout_btn");
+
+LLSaveOutfitComboBtn::LLSaveOutfitComboBtn(LLPanel* parent, bool saveAsDefaultAction):
+ mParent(parent), mSaveAsDefaultAction(saveAsDefaultAction)
+{
+ // register action mapping before creating menu
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar save_registar;
+ save_registar.add("Outfit.Save.Action", boost::bind(
+ &LLSaveOutfitComboBtn::saveOutfit, this, false));
+ save_registar.add("Outfit.SaveAs.Action", boost::bind(
+ &LLSaveOutfitComboBtn::saveOutfit, this, true));
+
+ mParent->childSetAction(SAVE_BTN, boost::bind(&LLSaveOutfitComboBtn::saveOutfit, this, mSaveAsDefaultAction));
+ mParent->childSetAction(SAVE_FLYOUT_BTN, boost::bind(&LLSaveOutfitComboBtn::showSaveMenu, this));
+
+ mSaveMenu = LLUICtrlFactory::getInstance()->createFromFile<
+ LLToggleableMenu> ("menu_save_outfit.xml", gMenuHolder,
+ LLViewerMenuHolderGL::child_registry_t::instance());
+}
+
+void LLSaveOutfitComboBtn::showSaveMenu()
+{
+ S32 x, y;
+ LLUI::getMousePositionLocal(mParent, &x, &y);
+
+ mSaveMenu->updateParent(LLMenuGL::sMenuContainer);
+ LLMenuGL::showPopup(mParent, mSaveMenu, x, y);
+}
+
+void LLSaveOutfitComboBtn::saveOutfit(bool as_new)
+{
+ if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit())
+ {
+ // we don't need to ask for an outfit name, and updateBaseOutfit() successfully saved.
+ // If updateBaseOutfit fails, ask for an outfit name anyways
+ return;
+ }
+
+ LLPanelOutfitsInventory* panel_outfits_inventory =
+ LLPanelOutfitsInventory::findInstance();
+ if (panel_outfits_inventory)
+ {
+ panel_outfits_inventory->onSave();
+ }
+
+ //*TODO how to get to know when base outfit is updated or new outfit is created?
+}
+
+void LLSaveOutfitComboBtn::setMenuItemEnabled(const std::string& item, bool enabled)
+{
+ mSaveMenu->setItemEnabled("save_outfit", enabled);
+}
+
+void LLSaveOutfitComboBtn::setSaveBtnEnabled(bool enabled)
+{
+ mParent->childSetEnabled(SAVE_BTN, enabled);
+}
diff --git a/indra/newview/llsaveoutfitcombobtn.h b/indra/newview/llsaveoutfitcombobtn.h
new file mode 100644
index 0000000000..fec7122194
--- /dev/null
+++ b/indra/newview/llsaveoutfitcombobtn.h
@@ -0,0 +1,60 @@
+/**
+ * @file llsaveoutfitcombobtn.h
+ * @brief Represents outfit save/save as combo button.
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, 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_LLSAVEOUTFITCOMBOBTN_H
+#define LL_LLSAVEOUTFITCOMBOBTN_H
+
+class LLButton;
+
+#include "lltoggleablemenu.h"
+
+/**
+ * Represents outfit Save/Save As combo button.
+ */
+class LLSaveOutfitComboBtn
+{
+ LOG_CLASS(LLSaveOutfitComboBtn);
+public:
+ LLSaveOutfitComboBtn(LLPanel* parent, bool saveAsDefaultAction = false);
+
+ void showSaveMenu();
+ void saveOutfit(bool as_new = false);
+ void setMenuItemEnabled(const std::string& item, bool enabled);
+ void setSaveBtnEnabled(bool enabled);
+
+private:
+ bool mSaveAsDefaultAction;
+ LLPanel* mParent;
+ LLToggleableMenu* mSaveMenu;
+};
+
+#endif // LL_LLSAVEOUTFITCOMBOBTN_H
diff --git a/indra/newview/llsecapi.cpp b/indra/newview/llsecapi.cpp
index 1caeec5b04..6389fd292c 100644
--- a/indra/newview/llsecapi.cpp
+++ b/indra/newview/llsecapi.cpp
@@ -59,7 +59,7 @@ void initializeSecHandler()
gSecAPIHandler = gHandlerMap[BASIC_SECHANDLER];
// initialize all SecAPIHandlers
- LLProtectedDataException ex = LLProtectedDataException("");
+ std::string exception_msg;
std::map<std::string, LLPointer<LLSecAPIHandler> >::const_iterator itr;
for(itr = gHandlerMap.begin(); itr != gHandlerMap.end(); ++itr)
{
@@ -70,12 +70,12 @@ void initializeSecHandler()
}
catch (LLProtectedDataException e)
{
- ex = e;
+ exception_msg = e.getMessage();
}
}
- if (ex.getMessage().length() > 0 ) // an exception was thrown.
+ if (!exception_msg.empty()) // an exception was thrown.
{
- throw ex;
+ throw LLProtectedDataException(exception_msg.c_str());
}
}
@@ -124,7 +124,7 @@ int secapiSSLCertVerifyCallback(X509_STORE_CTX *ctx, void *param)
// we rely on libcurl to validate the hostname, as libcurl does more extensive validation
// leaving our hostname validation call mechanism for future additions with respect to
// OS native (Mac keyring, windows CAPI) validation.
- chain->validate(VALIDATION_POLICY_SSL & (~VALIDATION_POLICY_HOSTNAME), store, validation_params);
+ store->validate(VALIDATION_POLICY_SSL & (~VALIDATION_POLICY_HOSTNAME), chain, validation_params);
}
catch (LLCertValidationTrustException& cert_exception)
{
diff --git a/indra/newview/llsecapi.h b/indra/newview/llsecapi.h
index 59a1e1eff0..5a1a3879d4 100644
--- a/indra/newview/llsecapi.h
+++ b/indra/newview/llsecapi.h
@@ -154,7 +154,7 @@ public:
// return an LLSD object containing information about the certificate
// such as its name, signature, expiry time, serial number
- virtual LLSD getLLSD() const=0;
+ virtual void getLLSD(LLSD& llsd)=0;
// return an openSSL X509 struct for the certificate
virtual X509* getOpenSSLX509() const=0;
@@ -231,6 +231,18 @@ public:
virtual LLPointer<LLCertificate> erase(iterator cert)=0;
};
+// class LLCertificateChain
+// Class representing a chain of certificates in order, with the
+// first element being the child cert.
+class LLCertificateChain : virtual public LLCertificateVector
+{
+
+public:
+ LLCertificateChain() {}
+
+ virtual ~LLCertificateChain() {}
+
+};
// class LLCertificateStore
// represents a store of certificates, typically a store of root CA
@@ -250,30 +262,17 @@ public:
// return the store id
virtual std::string storeId() const=0;
-};
-
-// class LLCertificateChain
-// Class representing a chain of certificates in order, with the
-// first element being the child cert.
-class LLCertificateChain : virtual public LLCertificateVector
-{
-
-public:
- LLCertificateChain() {}
- virtual ~LLCertificateChain() {}
-
// validate a certificate chain given the params.
// Will throw exceptions on error
virtual void validate(int validation_policy,
- LLPointer<LLCertificateStore> ca_store,
+ LLPointer<LLCertificateChain> cert_chain,
const LLSD& validation_params) =0;
+
};
-
-
inline
bool operator==(const LLCertificateVector::iterator& _lhs, const LLCertificateVector::iterator& _rhs)
{
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index c4c13ccdca..e191e50c4b 100644
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -52,6 +52,7 @@ LLS * By copying, modifying or distributing this software, you acknowledge
#include <iostream>
#include <iomanip>
#include <time.h>
+#include "llmachineid.h"
@@ -85,7 +86,6 @@ LLBasicCertificate::LLBasicCertificate(const std::string& pem_cert)
{
throw LLInvalidCertificate(this);
}
- _initLLSD();
}
@@ -96,7 +96,6 @@ LLBasicCertificate::LLBasicCertificate(X509* pCert)
throw LLInvalidCertificate(this);
}
mCert = X509_dup(pCert);
- _initLLSD();
}
LLBasicCertificate::~LLBasicCertificate()
@@ -150,9 +149,13 @@ std::vector<U8> LLBasicCertificate::getBinary() const
}
-LLSD LLBasicCertificate::getLLSD() const
+void LLBasicCertificate::getLLSD(LLSD &llsd)
{
- return mLLSDInfo;
+ if (mLLSDInfo.isUndefined())
+ {
+ _initLLSD();
+ }
+ llsd = mLLSDInfo;
}
// Initialize the LLSD info for the certificate
@@ -516,8 +519,9 @@ LLBasicCertificateVector::iterator LLBasicCertificateVector::find(const LLSD& pa
cert++)
{
- found= TRUE;
- LLSD cert_info = (*cert)->getLLSD();
+ found= TRUE;
+ LLSD cert_info;
+ (*cert)->getLLSD(cert_info);
for (LLSD::map_const_iterator param = params.beginMap();
param != params.endMap();
param++)
@@ -543,7 +547,8 @@ LLBasicCertificateVector::iterator LLBasicCertificateVector::find(const LLSD& pa
void LLBasicCertificateVector::insert(iterator _iter,
LLPointer<LLCertificate> cert)
{
- LLSD cert_info = cert->getLLSD();
+ LLSD cert_info;
+ cert->getLLSD(cert_info);
if (cert_info.isMap() && cert_info.has(CERT_SHA1_DIGEST))
{
LLSD existing_cert_info = LLSD::emptyMap();
@@ -695,7 +700,8 @@ LLBasicCertificateChain::LLBasicCertificateChain(const X509_STORE_CTX* store)
while(untrusted_certs.size() > 0)
{
LLSD find_data = LLSD::emptyMap();
- LLSD cert_data = current->getLLSD();
+ LLSD cert_data;
+ current->getLLSD(cert_data);
// we simply build the chain via subject/issuer name as the
// client should not have passed in multiple CA's with the same
// subject name. If they did, it'll come out in the wash during
@@ -854,12 +860,13 @@ bool _LLSDArrayIncludesValue(const LLSD& llsd_set, LLSD llsd_value)
}
void _validateCert(int validation_policy,
- const LLPointer<LLCertificate> cert,
+ LLPointer<LLCertificate> cert,
const LLSD& validation_params,
int depth)
{
- LLSD current_cert_info = cert->getLLSD();
+ LLSD current_cert_info;
+ cert->getLLSD(current_cert_info);
// check basic properties exist in the cert
if(!current_cert_info.has(CERT_SUBJECT_NAME) || !current_cert_info.has(CERT_SUBJECT_NAME_STRING))
{
@@ -947,8 +954,9 @@ bool _verify_signature(LLPointer<LLCertificate> parent,
LLPointer<LLCertificate> child)
{
bool verify_result = FALSE;
- LLSD cert1 = parent->getLLSD();
- LLSD cert2 = child->getLLSD();
+ LLSD cert1, cert2;
+ parent->getLLSD(cert1);
+ child->getLLSD(cert2);
X509 *signing_cert = parent->getOpenSSLX509();
X509 *child_cert = child->getOpenSSLX509();
if((signing_cert != NULL) && (child_cert != NULL))
@@ -983,6 +991,7 @@ bool _verify_signature(LLPointer<LLCertificate> parent,
return verify_result;
}
+
// validate the certificate chain against a store.
// There are many aspects of cert validatioin policy involved in
// trust validation. The policies in this validation algorithm include
@@ -997,17 +1006,17 @@ bool _verify_signature(LLPointer<LLCertificate> parent,
// and verify the last cert is in the certificate store, or points
// to a cert in the store. It validates whether any cert in the chain
// is trusted in the store, even if it's not the last one.
-void LLBasicCertificateChain::validate(int validation_policy,
- LLPointer<LLCertificateStore> ca_store,
+void LLBasicCertificateStore::validate(int validation_policy,
+ LLPointer<LLCertificateChain> cert_chain,
const LLSD& validation_params)
{
- if(size() < 1)
+ if(cert_chain->size() < 1)
{
throw LLCertException(NULL, "No certs in chain");
}
- iterator current_cert = begin();
- LLSD current_cert_info = (*current_cert)->getLLSD();
+ iterator current_cert = cert_chain->begin();
+ LLSD current_cert_info;
LLSD validation_date;
if (validation_params.has(CERT_VALIDATION_DATE))
{
@@ -1016,6 +1025,7 @@ void LLBasicCertificateChain::validate(int validation_policy,
if (validation_policy & VALIDATION_POLICY_HOSTNAME)
{
+ (*current_cert)->getLLSD(current_cert_info);
if(!validation_params.has(CERT_HOSTNAME))
{
throw LLCertException((*current_cert), "No hostname passed in for validation");
@@ -1025,7 +1035,7 @@ void LLBasicCertificateChain::validate(int validation_policy,
throw LLInvalidCertificate((*current_cert));
}
- LL_INFOS("SECAPI") << "Validating the hostname " << validation_params[CERT_HOSTNAME].asString() <<
+ LL_DEBUGS("SECAPI") << "Validating the hostname " << validation_params[CERT_HOSTNAME].asString() <<
"against the cert CN " << current_cert_info[CERT_SUBJECT_NAME][CERT_NAME_CN].asString() << LL_ENDL;
if(!_cert_hostname_wildcard_match(validation_params[CERT_HOSTNAME].asString(),
current_cert_info[CERT_SUBJECT_NAME][CERT_NAME_CN].asString()))
@@ -1034,16 +1044,50 @@ void LLBasicCertificateChain::validate(int validation_policy,
(*current_cert));
}
}
-
+ // check the cache of already validated certs
+ X509* cert_x509 = (*current_cert)->getOpenSSLX509();
+ if(!cert_x509)
+ {
+ throw LLInvalidCertificate((*current_cert));
+ }
+ std::string sha1_hash((const char *)cert_x509->sha1_hash, SHA_DIGEST_LENGTH);
+ t_cert_cache::iterator cache_entry = mTrustedCertCache.find(sha1_hash);
+ if(cache_entry != mTrustedCertCache.end())
+ {
+ LL_DEBUGS("SECAPI") << "Found cert in cache" << LL_ENDL;
+ // this cert is in the cache, so validate the time.
+ if (validation_policy & VALIDATION_POLICY_TIME)
+ {
+ LLDate validation_date(time(NULL));
+ if(validation_params.has(CERT_VALIDATION_DATE))
+ {
+ validation_date = validation_params[CERT_VALIDATION_DATE];
+ }
+
+ if((validation_date < cache_entry->second.first) ||
+ (validation_date > cache_entry->second.second))
+ {
+ throw LLCertValidationExpirationException((*current_cert), validation_date);
+ }
+ }
+ // successfully found in cache
+ return;
+ }
+ if(current_cert_info.isUndefined())
+ {
+ (*current_cert)->getLLSD(current_cert_info);
+ }
+ LLDate from_time = current_cert_info[CERT_VALID_FROM].asDate();
+ LLDate to_time = current_cert_info[CERT_VALID_TO].asDate();
int depth = 0;
LLPointer<LLCertificate> previous_cert;
// loop through the cert chain, validating the current cert against the next one.
- while(current_cert != end())
+ while(current_cert != cert_chain->end())
{
int local_validation_policy = validation_policy;
- if(current_cert == begin())
+ if(current_cert == cert_chain->begin())
{
// for the child cert, we don't validate CA stuff
local_validation_policy &= ~(VALIDATION_POLICY_CA_KU |
@@ -1065,23 +1109,23 @@ void LLBasicCertificateChain::validate(int validation_policy,
depth);
// look for a CA in the CA store that may belong to this chain.
- LLSD cert_llsd = (*current_cert)->getLLSD();
LLSD cert_search_params = LLSD::emptyMap();
// is the cert itself in the store?
- cert_search_params[CERT_SHA1_DIGEST] = cert_llsd[CERT_SHA1_DIGEST];
- LLCertificateStore::iterator found_store_cert = ca_store->find(cert_search_params);
- if(found_store_cert != ca_store->end())
+ cert_search_params[CERT_SHA1_DIGEST] = current_cert_info[CERT_SHA1_DIGEST];
+ LLCertificateStore::iterator found_store_cert = find(cert_search_params);
+ if(found_store_cert != end())
{
+ mTrustedCertCache[sha1_hash] = std::pair<LLDate, LLDate>(from_time, to_time);
return;
}
// is the parent in the cert store?
cert_search_params = LLSD::emptyMap();
- cert_search_params[CERT_SUBJECT_NAME_STRING] = cert_llsd[CERT_ISSUER_NAME_STRING];
- if (cert_llsd.has(CERT_AUTHORITY_KEY_IDENTIFIER))
+ cert_search_params[CERT_SUBJECT_NAME_STRING] = current_cert_info[CERT_ISSUER_NAME_STRING];
+ if (current_cert_info.has(CERT_AUTHORITY_KEY_IDENTIFIER))
{
- LLSD cert_aki = cert_llsd[CERT_AUTHORITY_KEY_IDENTIFIER];
+ LLSD cert_aki = current_cert_info[CERT_AUTHORITY_KEY_IDENTIFIER];
if(cert_aki.has(CERT_AUTHORITY_KEY_IDENTIFIER_ID))
{
cert_search_params[CERT_SUBJECT_KEY_IDENTFIER] = cert_aki[CERT_AUTHORITY_KEY_IDENTIFIER_ID];
@@ -1091,11 +1135,10 @@ void LLBasicCertificateChain::validate(int validation_policy,
cert_search_params[CERT_SERIAL_NUMBER] = cert_aki[CERT_AUTHORITY_KEY_IDENTIFIER_SERIAL];
}
}
- found_store_cert = ca_store->find(cert_search_params);
+ found_store_cert = find(cert_search_params);
- if(found_store_cert != ca_store->end())
+ if(found_store_cert != end())
{
- LLSD foo = (*found_store_cert)->getLLSD();
// validate the store cert against the depth
_validateCert(validation_policy & VALIDATION_POLICY_CA_BASIC_CONSTRAINTS,
(*found_store_cert),
@@ -1109,19 +1152,24 @@ void LLBasicCertificateChain::validate(int validation_policy,
throw LLCertValidationInvalidSignatureException(*current_cert);
}
// successfully validated.
+ mTrustedCertCache[sha1_hash] = std::pair<LLDate, LLDate>(from_time, to_time);
return;
}
previous_cert = (*current_cert);
current_cert++;
- depth++;
+ depth++;
+ if(current_cert != cert_chain->end())
+ {
+ (*current_cert)->getLLSD(current_cert_info);
+ }
}
if (validation_policy & VALIDATION_POLICY_TRUSTED)
{
- LLPointer<LLCertificate> untrusted_ca_cert = (*this)[size()-1];
// we reached the end without finding a trusted cert.
- throw LLCertValidationTrustException((*this)[size()-1]);
+ throw LLCertValidationTrustException((*cert_chain)[cert_chain->size()-1]);
}
+ mTrustedCertCache[sha1_hash] = std::pair<LLDate, LLDate>(from_time, to_time);
}
@@ -1159,7 +1207,7 @@ void LLSecAPIBasicHandler::init()
"CA.pem");
- LL_INFOS("SECAPI") << "Loading certificate store from " << store_file << LL_ENDL;
+ LL_DEBUGS("SECAPI") << "Loading certificate store from " << store_file << LL_ENDL;
mStore = new LLBasicCertificateStore(store_file);
// grab the application CA.pem file that contains the well-known certs shipped
@@ -1199,9 +1247,9 @@ void LLSecAPIBasicHandler::_readProtectedData()
U8 buffer[BUFFER_READ_SIZE];
U8 decrypted_buffer[BUFFER_READ_SIZE];
int decrypted_length;
- unsigned char MACAddress[MAC_ADDRESS_BYTES];
- LLUUID::getNodeID(MACAddress);
- LLXORCipher cipher(MACAddress, MAC_ADDRESS_BYTES);
+ unsigned char unique_id[MAC_ADDRESS_BYTES];
+ LLMachineID::getUniqueID(unique_id, sizeof(unique_id));
+ LLXORCipher cipher(unique_id, sizeof(unique_id));
// read in the salt and key
protected_data_stream.read((char *)salt, STORE_SALT_SIZE);
@@ -1285,9 +1333,9 @@ void LLSecAPIBasicHandler::_writeProtectedData()
EVP_CIPHER_CTX ctx;
EVP_CIPHER_CTX_init(&ctx);
EVP_EncryptInit(&ctx, EVP_rc4(), salt, NULL);
- unsigned char MACAddress[MAC_ADDRESS_BYTES];
- LLUUID::getNodeID(MACAddress);
- LLXORCipher cipher(MACAddress, MAC_ADDRESS_BYTES);
+ unsigned char unique_id[MAC_ADDRESS_BYTES];
+ LLMachineID::getUniqueID(unique_id, sizeof(unique_id));
+ LLXORCipher cipher(unique_id, sizeof(unique_id));
cipher.encrypt(salt, STORE_SALT_SIZE);
protected_data_stream.write((const char *)salt, STORE_SALT_SIZE);
@@ -1469,7 +1517,7 @@ void LLSecAPIBasicHandler::saveCredential(LLPointer<LLCredential> cred, bool sav
{
credential["authenticator"] = cred->getAuthenticator();
}
- LL_INFOS("SECAPI") << "Saving Credential " << cred->getGrid() << ":" << cred->userID() << " " << save_authenticator << LL_ENDL;
+ LL_DEBUGS("SECAPI") << "Saving Credential " << cred->getGrid() << ":" << cred->userID() << " " << save_authenticator << LL_ENDL;
setProtectedData("credential", cred->getGrid(), credential);
//*TODO: If we're saving Agni credentials, should we write the
// credentials to the legacy password.dat/etc?
@@ -1505,9 +1553,9 @@ std::string LLSecAPIBasicHandler::_legacyLoadPassword()
}
// Decipher with MAC address
- unsigned char MACAddress[MAC_ADDRESS_BYTES];
- LLUUID::getNodeID(MACAddress);
- LLXORCipher cipher(MACAddress, 6);
+ unsigned char unique_id[MAC_ADDRESS_BYTES];
+ LLMachineID::getUniqueID(unique_id, sizeof(unique_id));
+ LLXORCipher cipher(unique_id, sizeof(unique_id));
cipher.decrypt(&buffer[0], buffer.size());
return std::string((const char*)&buffer[0], buffer.size());
diff --git a/indra/newview/llsechandler_basic.h b/indra/newview/llsechandler_basic.h
index 407e74ad00..356ea7efcb 100644
--- a/indra/newview/llsechandler_basic.h
+++ b/indra/newview/llsechandler_basic.h
@@ -59,12 +59,13 @@ public:
virtual std::string getPem() const;
virtual std::vector<U8> getBinary() const;
- virtual LLSD getLLSD() const;
+ virtual void getLLSD(LLSD &llsd);
virtual X509* getOpenSSLX509() const;
// set llsd elements for testing
void setLLSD(const std::string name, const LLSD& value) { mLLSDInfo[name] = value; }
+
protected:
// certificates are stored as X509 objects, as validation and
@@ -175,8 +176,21 @@ public:
// return the store id
virtual std::string storeId() const;
+ // validate a certificate chain against a certificate store, using the
+ // given validation policy.
+ virtual void validate(int validation_policy,
+ LLPointer<LLCertificateChain> ca_chain,
+ const LLSD& validation_params);
+
protected:
- std::vector<LLPointer<LLCertificate> >mCerts;
+ std::vector<LLPointer<LLCertificate> > mCerts;
+
+ // cache of cert sha1 hashes to from/to date pairs, to improve
+ // performance of cert trust. Note, these are not the CA certs,
+ // but the certs that have been validated against this store.
+ typedef std::map<std::string, std::pair<LLDate, LLDate> > t_cert_cache;
+ t_cert_cache mTrustedCertCache;
+
std::string mFilename;
};
@@ -191,11 +205,6 @@ public:
virtual ~LLBasicCertificateChain() {}
- // validate a certificate chain against a certificate store, using the
- // given validation policy.
- virtual void validate(int validation_policy,
- LLPointer<LLCertificateStore> ca_store,
- const LLSD& validation_params);
};
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 3719313c14..b66789448f 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -163,6 +163,8 @@ BOOL LLSidepanelAppearance::postBuild()
mOutfitRenameWatcher = new LLWatchForOutfitRenameObserver(this);
gInventory.addObserver(mOutfitRenameWatcher);
+ setVisibleCallback(boost::bind(&LLSidepanelAppearance::onVisibilityChange,this,_2));
+
return TRUE;
}
@@ -201,6 +203,27 @@ void LLSidepanelAppearance::onOpen(const LLSD& key)
mOpened = true;
}
+void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility)
+{
+ if (new_visibility.asBoolean())
+ {
+ if ((mOutfitEdit && mOutfitEdit->getVisible()) || (mEditWearable && mEditWearable->getVisible()))
+ {
+ if (!gAgentCamera.cameraCustomizeAvatar())
+ {
+ gAgentCamera.changeCameraToCustomizeAvatar();
+ }
+ }
+ }
+ else
+ {
+ if (gAgentCamera.cameraCustomizeAvatar())
+ {
+ gAgentCamera.changeCameraToDefault();
+ }
+ }
+}
+
void LLSidepanelAppearance::onFilterEdit(const std::string& search_string)
{
if (mFilterSubString != search_string)
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index 5bde962c8d..30022ae375 100644
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -72,6 +72,7 @@ public:
private:
void onFilterEdit(const std::string& search_string);
+ void onVisibilityChange ( const LLSD& new_visibility );
void onOpenOutfitButtonClicked();
void onEditAppearanceButtonClicked();
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 9159f42968..3c97f01887 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -66,21 +66,6 @@ static const std::string TAB_PANEL_CAPTION_TITLE_BOX = "sidetray_tab_title";
LLSideTray* LLSideTray::sInstance = 0;
-/**
- * Updates visibility of sidetray tabs buttons according to "SidebarWithButtonsVisibility" setting
- *
- * @param force_set_visible if true method ignores setting value and set buttons visible.
- */
-static void update_tabs_buttons_visibility(bool force_set_visible = false)
-{
- LLView* side_bar_tabs = gViewerWindow->getRootView()->getChildView("side_bar_tabs");
- if (side_bar_tabs)
- {
- BOOL visible = LLUI::sSettingGroups["config"]->getBOOL("SidebarWithButtonsVisibility");
- side_bar_tabs->setVisible(force_set_visible || visible);
- }
-}
-
LLSideTray* LLSideTray::getInstance()
{
if (!sInstance)
@@ -273,8 +258,6 @@ LLSideTray::LLSideTray(Params& params)
p.name = "buttons_panel";
p.mouse_opaque = false;
mButtonsPanel = LLUICtrlFactory::create<LLPanel>(p);
-
- initControlSettings();
}
@@ -563,8 +546,6 @@ void LLSideTray::collapseSideBar()
//mActiveTab->setVisible(FALSE);
reflectCollapseChange();
setFocus( FALSE );
-
- update_tabs_buttons_visibility();
}
void LLSideTray::expandSideBar()
@@ -589,8 +570,6 @@ void LLSideTray::expandSideBar()
LLButton* btn = btn_it->second;
btn->setImageOverlay( mActiveTab->mImageSelected );
}
-
- update_tabs_buttons_visibility(true);
}
void LLSideTray::highlightFocused()
@@ -658,8 +637,6 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para
panel->onOpen(params);
}
- update_tabs_buttons_visibility(true);
-
return panel;
}
}
@@ -751,35 +728,3 @@ void LLSideTray::updateSidetrayVisibility()
}
}
-void LLSideTray::initControlSettings()
-{
- // set listeners to process runtime setting changes
- LLUI::sSettingGroups["config"]->getControl("SidebarWithButtonsVisibility")->getSignal()->connect(boost::bind(&LLSideTray::toggleSidetrayAndTabButtonsVisibility, this, _2));
-
- // update visibility according to current value
- toggleSidetrayAndTabButtonsVisibility(LLUI::sSettingGroups["config"]->getBOOL("SidebarWithButtonsVisibility"));
-}
-
-// sidebar visibility is implemented via its expanding/collapsing
-void LLSideTray::toggleSidetrayAndTabButtonsVisibility(const LLSD::Boolean& new_visibility)
-{
- // If new_visibility==FALSE it gets invisible but still can be expanded in other ways (Ctrl+I to see My Inventory)
-
- // store collapsed state to restore it properly on next call
- static bool was_collapsed = false;
-
- if (!new_visibility && !mCollapsed)
- {
- collapseSideBar();
- was_collapsed = true;
- }
- // should be visible: expand only if it was expanded when has been collapsed on previous call
- else if (new_visibility && was_collapsed)
- {
- if (mCollapsed) expandSideBar();
- was_collapsed = false;
- }
-
- update_tabs_buttons_visibility(new_visibility);
-}
-
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index ed6b376d5c..e8fdee9430 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -179,16 +179,6 @@ private:
LLSideTray::getInstance()->setEnabled(FALSE);
}
- /**
- * Initializes listener of SidebarWithButtonsVisibility setting and updates state according to it.
- */
- void initControlSettings();
-
- /**
- * Updates Sidebar and its Tab Buttons visibility according to passed value.
- */
- void toggleSidetrayAndTabButtonsVisibility(const LLSD::Boolean& new_visibility);
-
private:
LLPanel* mButtonsPanel;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index d8b5618d8f..e51e6363dd 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -736,6 +736,8 @@ bool idle_startup()
// Make sure the process dialog doesn't hide things
gViewerWindow->setShowProgress(FALSE);
+ initialize_edit_menu();
+
// Show the login dialog
login_show();
// connect dialog is already shown, so fill in the names
@@ -2732,7 +2734,8 @@ LLSD transform_cert_args(LLPointer<LLCertificate> cert)
{
LLSD args = LLSD::emptyMap();
std::string value;
- LLSD cert_info = cert->getLLSD();
+ LLSD cert_info;
+ cert->getLLSD(cert_info);
// convert all of the elements in the cert into
// args for the xml dialog, so we have flexability to
// display various parts of the cert by only modifying
diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp
index 15684337f4..cac3b58464 100644
--- a/indra/newview/llteleporthistory.cpp
+++ b/indra/newview/llteleporthistory.cpp
@@ -38,6 +38,7 @@
#include "llsdserialize.h"
#include "llagent.h"
+#include "llvoavatarself.h"
#include "llslurl.h"
#include "llviewercontrol.h" // for gSavedSettings
#include "llviewerparcelmgr.h"
@@ -108,6 +109,16 @@ void LLTeleportHistory::onTeleportFailed()
}
}
+void LLTeleportHistory::handleLoginComplete()
+{
+ if( mGotInitialUpdate )
+ {
+ return;
+ }
+ updateCurrentLocation(gAgent.getPositionGlobal());
+}
+
+
void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)
{
if (mRequestedItem != -1) // teleport within the history in progress?
@@ -117,6 +128,17 @@ void LLTeleportHistory::updateCurrentLocation(const LLVector3d& new_pos)
}
else
{
+ //EXT-7034
+ //skip initial update if agent avatar is no valid yet
+ //this may happen when updateCurrentLocation called while login process
+ //sometimes isAgentAvatarValid return false and in this case new_pos
+ //(which actually is gAgent.getPositionGlobal() ) is invalid
+ //if this position will be saved then teleport back will teleport user to wrong position
+ if ( !mGotInitialUpdate && !isAgentAvatarValid() )
+ {
+ return ;
+ }
+
// If we're getting the initial location update
// while we already have a (loaded) non-empty history,
// there's no need to purge forward items or add a new item.
diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h
index a82bec7c4f..e035451e71 100644
--- a/indra/newview/llteleporthistory.h
+++ b/indra/newview/llteleporthistory.h
@@ -136,6 +136,10 @@ public:
* @see load()
*/
void dump() const;
+ /**
+ * Process login complete event. Basically put current location into history
+ */
+ void handleLoginComplete();
private:
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 4be03596f8..b13f9e3898 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -37,6 +37,7 @@
#include "llagent.h"
#include "llimagej2c.h"
#include "llimagetga.h"
+#include "llnotificationsutil.h"
#include "llvfile.h"
#include "llvfs.h"
#include "llviewerstats.h"
@@ -49,6 +50,7 @@
#include "llui.h"
#include "llagentwearables.h"
#include "llwearable.h"
+#include "llviewercontrol.h"
#include "llviewervisualparam.h"
//#include "../tools/imdebug/imdebug.h"
@@ -60,10 +62,12 @@ using namespace LLVOAvatarDefines;
//-----------------------------------------------------------------------------
LLBakedUploadData::LLBakedUploadData(const LLVOAvatarSelf* avatar,
LLTexLayerSet* layerset,
- const LLUUID& id) :
+ const LLUUID& id,
+ BOOL highest_lod) :
mAvatar(avatar),
mTexLayerSet(layerset),
mID(id),
+ mHighestLOD(highest_lod),
mStartTime(LLFrameTimer::getTotalTime()) // Record starting time
{
}
@@ -80,12 +84,14 @@ LLTexLayerSetBuffer::LLTexLayerSetBuffer(LLTexLayerSet* const owner,
S32 width, S32 height) :
// ORDER_LAST => must render these after the hints are created.
LLViewerDynamicTexture( width, height, 4, LLViewerDynamicTexture::ORDER_LAST, TRUE ),
- mNeedsUpdate( TRUE ),
- mNeedsUpload( FALSE ),
- mUploadPending( FALSE ), // Not used for any logic here, just to sync sending of updates
+ mNeedsUpdate(TRUE),
+ mNeedsUpload(FALSE),
+ mUploadPending(FALSE), // Not used for any logic here, just to sync sending of updates
+ mDebugNumLowresUploads(0),
mTexLayerSet(owner)
{
LLTexLayerSetBuffer::sGLByteCount += getSize();
+ mNeedsUploadTimer.start();
}
LLTexLayerSetBuffer::~LLTexLayerSetBuffer()
@@ -125,7 +131,6 @@ void LLTexLayerSetBuffer::dumpTotalByteCount()
void LLTexLayerSetBuffer::requestUpdate()
{
mNeedsUpdate = TRUE;
-
// If we're in the middle of uploading a baked texture, we don't care about it any more.
// When it's downloaded, ignore it.
mUploadID.setNull();
@@ -133,20 +138,24 @@ void LLTexLayerSetBuffer::requestUpdate()
void LLTexLayerSetBuffer::requestUpload()
{
- if (!mNeedsUpload)
+ // If we requested a new upload but haven't even uploaded
+ // a low res version of our last upload request, then
+ // keep the timer ticking instead of resetting it.
+ if (mNeedsUpload && (mDebugNumLowresUploads == 0))
{
- mNeedsUpload = TRUE;
- mUploadPending = TRUE;
+ mNeedsUploadTimer.reset();
}
+ mNeedsUpload = TRUE;
+ mDebugNumLowresUploads = 0;
+ mUploadPending = TRUE;
+ mNeedsUploadTimer.unpause();
}
void LLTexLayerSetBuffer::cancelUpload()
{
- if (mNeedsUpload)
- {
- mNeedsUpload = FALSE;
- }
+ mNeedsUpload = FALSE;
mUploadPending = FALSE;
+ mNeedsUploadTimer.pause();
}
void LLTexLayerSetBuffer::pushProjection() const
@@ -174,7 +183,8 @@ BOOL LLTexLayerSetBuffer::needsRender()
{
llassert(mTexLayerSet->getAvatar() == gAgentAvatarp);
if (!isAgentAvatarValid()) return FALSE;
- BOOL upload_now = mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal() && gAgentQueryManager.hasNoPendingQueries();
+
+ const BOOL upload_now = isReadyToUpload();
BOOL needs_update = (mNeedsUpdate || upload_now) && !gAgentAvatarp->mAppearanceAnimating;
if (needs_update)
{
@@ -191,6 +201,7 @@ BOOL LLTexLayerSetBuffer::needsRender()
needs_update &= mTexLayerSet->isLocalTextureDataAvailable();
}
}
+
return needs_update;
}
@@ -217,7 +228,7 @@ BOOL LLTexLayerSetBuffer::render()
// do we need to upload, and do we have sufficient data to create an uploadable composite?
// When do we upload the texture if gAgent.mNumPendingQueries is non-zero?
- BOOL upload_now = (gAgentQueryManager.hasNoPendingQueries() && mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal());
+ const BOOL upload_now = isReadyToUpload();
BOOL success = TRUE;
@@ -226,11 +237,11 @@ BOOL LLTexLayerSetBuffer::render()
success &= mTexLayerSet->render( mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight );
gGL.flush();
- if( upload_now )
+ if(upload_now)
{
if (!success)
{
- llinfos << "Failed attempt to bake " << mTexLayerSet->getBodyRegion() << llendl;
+ llinfos << "Failed attempt to bake " << mTexLayerSet->getBodyRegionName() << llendl;
mUploadPending = FALSE;
}
else
@@ -244,6 +255,7 @@ BOOL LLTexLayerSetBuffer::render()
{
mUploadPending = FALSE;
mNeedsUpload = FALSE;
+ mNeedsUploadTimer.pause();
mTexLayerSet->getAvatar()->setNewBakedTexture(mTexLayerSet->getBakedTexIndex(),IMG_INVISIBLE);
}
}
@@ -265,6 +277,26 @@ bool LLTexLayerSetBuffer::isInitialized(void) const
return mGLTexturep.notNull() && mGLTexturep->isGLTextureCreated();
}
+BOOL LLTexLayerSetBuffer::isReadyToUpload() const
+{
+ if (!mNeedsUpload) return FALSE; // Don't need to upload if we haven't requested one.
+ if (!gAgentQueryManager.hasNoPendingQueries()) return FALSE; // Can't upload if there are pending queries.
+
+ // If we requested an upload and have the final LOD ready, then upload.
+ const BOOL can_highest_lod = mTexLayerSet->isLocalTextureDataFinal();
+ if (can_highest_lod) return TRUE;
+
+ const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureTimeout");
+ if (texture_timeout)
+ {
+ // If we hit our timeout and have textures available at even lower resolution, then upload.
+ const BOOL is_upload_textures_timeout = mNeedsUploadTimer.getElapsedTimeF32() >= texture_timeout;
+ const BOOL has_lower_lod = mTexLayerSet->isLocalTextureDataAvailable();
+ if (has_lower_lod && is_upload_textures_timeout) return TRUE;
+ }
+ return FALSE;
+}
+
BOOL LLTexLayerSetBuffer::updateImmediate()
{
mNeedsUpdate = TRUE;
@@ -288,7 +320,7 @@ void LLTexLayerSetBuffer::readBackAndUpload()
glReadPixels(mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, GL_RGBA, GL_UNSIGNED_BYTE, baked_color_data );
stop_glerror();
- llinfos << "Baked " << mTexLayerSet->getBodyRegion() << llendl;
+ llinfos << "Baked " << mTexLayerSet->getBodyRegionName() << llendl;
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_BAKES);
// We won't need our caches since we're baked now. (Techically, we won't
@@ -355,9 +387,12 @@ void LLTexLayerSetBuffer::readBackAndUpload()
if( valid )
{
+ const BOOL highest_lod = mTexLayerSet->isLocalTextureDataFinal();
// baked_upload_data is owned by the responder and deleted after the request completes
- LLBakedUploadData* baked_upload_data =
- new LLBakedUploadData(gAgentAvatarp, this->mTexLayerSet, asset_id);
+ LLBakedUploadData* baked_upload_data = new LLBakedUploadData(gAgentAvatarp,
+ this->mTexLayerSet,
+ asset_id,
+ highest_lod);
mUploadID = asset_id;
// upload the image
@@ -384,8 +419,34 @@ void LLTexLayerSetBuffer::readBackAndUpload()
TRUE, // is_priority
TRUE); // store_local
}
+
+ if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
+ {
+ std::string lod_str = highest_lod ? "HighRes" : "LowRes";
+ LLSD args;
+ args["EXISTENCE"] = llformat("%d",(U32)mTexLayerSet->getAvatar()->debugGetExistenceTimeElapsedF32());
+ args["TIME"] = llformat("%d",(U32)mNeedsUploadTimer.getElapsedTimeF32());
+ args["BODYREGION"] = mTexLayerSet->getBodyRegionName();
+ args["RESOLUTION"] = lod_str;
+ LLNotificationsUtil::add("AvatarRezSelfBakeNotification",args);
+ llinfos << "Uploading [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUploadTimer.getElapsedTimeF32() << " ]" << llendl;
+ }
- mNeedsUpload = FALSE;
+ if (highest_lod)
+ {
+ // Got the final LOD for the baked texture.
+ // All done, pause the upload timer so we know how long it took.
+ mNeedsUpload = FALSE;
+ mNeedsUploadTimer.pause();
+ }
+ else
+ {
+ // Got a lower level LOD for the baked texture.
+ // Restart the upload timer.
+ mDebugNumLowresUploads++;
+ mNeedsUploadTimer.unpause();
+ mNeedsUploadTimer.reset();
+ }
}
else
{
@@ -414,12 +475,11 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid,
{
LLBakedUploadData* baked_upload_data = (LLBakedUploadData*)userdata;
- if (0 == result &&
+ if ((result == 0) &&
isAgentAvatarValid() &&
!gAgentAvatarp->isDead() &&
- baked_upload_data->mAvatar == gAgentAvatarp && // Sanity check: only the user's avatar should be uploading textures.
- baked_upload_data->mTexLayerSet->hasComposite()
- )
+ (baked_upload_data->mAvatar == gAgentAvatarp) && // Sanity check: only the user's avatar should be uploading textures.
+ (baked_upload_data->mTexLayerSet->hasComposite()))
{
LLTexLayerSetBuffer* layerset_buffer = baked_upload_data->mTexLayerSet->getComposite();
@@ -438,10 +498,9 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid,
{
// This is the upload we're currently waiting for.
layerset_buffer->mUploadID.setNull();
- layerset_buffer->mUploadPending = FALSE;
-
if (result >= 0)
{
+ layerset_buffer->mUploadPending = FALSE;
LLVOAvatarDefines::ETextureIndex baked_te = gAgentAvatarp->getBakedTE(layerset_buffer->mTexLayerSet);
// Update baked texture info with the new UUID
U64 now = LLFrameTimer::getTotalTime(); // Record starting time
@@ -758,7 +817,7 @@ BOOL LLTexLayerSet::isBodyRegion(const std::string& region) const
return mInfo->mBodyRegion == region;
}
-const std::string LLTexLayerSet::getBodyRegion() const
+const std::string LLTexLayerSet::getBodyRegionName() const
{
return mInfo->mBodyRegion;
}
@@ -788,7 +847,7 @@ void LLTexLayerSet::cancelUpload()
void LLTexLayerSet::createComposite()
{
- if( !mComposite )
+ if(!mComposite)
{
S32 width = mInfo->mWidth;
S32 height = mInfo->mHeight;
@@ -823,7 +882,15 @@ void LLTexLayerSet::updateComposite()
LLTexLayerSetBuffer* LLTexLayerSet::getComposite()
{
- createComposite();
+ if (!mComposite)
+ {
+ createComposite();
+ }
+ return mComposite;
+}
+
+const LLTexLayerSetBuffer* LLTexLayerSet::getComposite() const
+{
return mComposite;
}
@@ -1031,7 +1098,7 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
}
if (mLocalTexture == TEX_NUM_INDICES)
{
- llwarns << "<texture> element has invalid local_texure attribute: " << mName << " " << local_texture_name << llendl;
+ llwarns << "<texture> element has invalid local_texture attribute: " << mName << " " << local_texture_name << llendl;
return FALSE;
}
}
@@ -2169,4 +2236,16 @@ BOOL LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLIma
return success;
}
+const std::string LLTexLayerSetBuffer::dumpTextureInfo() const
+{
+ if (!isAgentAvatarValid()) return "";
+ const BOOL is_high_res = !mNeedsUpload;
+ const U32 num_low_res = mDebugNumLowresUploads;
+ const U32 upload_time = (U32)mNeedsUploadTimer.getElapsedTimeF32();
+ const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(mTexLayerSet);
+ std::string text = llformat("[ HiRes:%d LoRes:%d Timer:%d ] %s",
+ is_high_res, num_low_res, upload_time,
+ local_texture_info.c_str());
+ return text;
+}
diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h
index ae280dd063..313c5f24e1 100644
--- a/indra/newview/lltexlayer.h
+++ b/indra/newview/lltexlayer.h
@@ -253,6 +253,7 @@ public:
BOOL isBodyRegion(const std::string& region) const;
LLTexLayerSetBuffer* getComposite();
+ const LLTexLayerSetBuffer* getComposite() const; // Do not create one if it doesn't exist.
void requestUpdate();
void requestUpload();
void cancelUpload();
@@ -272,7 +273,7 @@ public:
void cloneTemplates(LLLocalTextureObject *lto, LLVOAvatarDefines::ETextureIndex tex_index, LLWearable* wearable);
LLVOAvatarSelf* getAvatar() const { return mAvatar; }
- const std::string getBodyRegion() const;
+ const std::string getBodyRegionName() const;
BOOL hasComposite() const { return (mComposite.notNull()); }
LLVOAvatarDefines::EBakedTextureIndex getBakedTexIndex() { return mBakedTexIndex; }
void setBakedTexIndex( LLVOAvatarDefines::EBakedTextureIndex index) { mBakedTexIndex = index; }
@@ -344,22 +345,29 @@ public:
S32 result, LLExtStat ext_status);
static void dumpTotalByteCount();
+ const std::string dumpTextureInfo() const;
+
virtual void restoreGLTexture();
virtual void destroyGLTexture();
-private:
+protected:
void pushProjection() const;
void popProjection() const;
-
+ BOOL isReadyToUpload() const;
+
private:
LLTexLayerSet* const mTexLayerSet;
- BOOL mNeedsUpdate;
- BOOL mNeedsUpload;
- BOOL mUploadPending;
- LLUUID mUploadID; // Identifys the current upload process (null if none). Used to avoid overlaps (eg, when the user rapidly makes two changes outside of Face Edit)
+ BOOL mNeedsUpdate; // Whether we need to update our baked textures
+ BOOL mNeedsUpload; // Whether we need to send our baked textures to the server
+ U32 mDebugNumLowresUploads; // Number of times we've sent a lowres version of our baked textures to the server
+ BOOL mUploadPending; // Whether we have received back the new baked textures
+ LLUUID mUploadID; // Identifies the current upload process (null if none). Used to avoid overlaps (eg, when the user rapidly makes two changes outside of Face Edit)
static S32 sGLByteCount;
+
+ LLFrameTimer mNeedsUploadTimer; // Tracks time since upload was requested
+
};
//
@@ -404,13 +412,18 @@ private:
class LLBakedUploadData
{
public:
- LLBakedUploadData(const LLVOAvatarSelf* avatar, LLTexLayerSet* layerset, const LLUUID& id);
+ LLBakedUploadData(const LLVOAvatarSelf* avatar,
+ LLTexLayerSet* layerset,
+ const LLUUID& id,
+ BOOL highest_lod);
~LLBakedUploadData() {}
const LLUUID mID;
const LLVOAvatarSelf* mAvatar; // just backlink, don't LLPointer
LLTexLayerSet* mTexLayerSet;
const U64 mStartTime; // Used to measure time baked texture upload requires
+ BOOL mHighestLOD;
+
};
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index efdddd947b..a1ab051021 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -1286,8 +1286,8 @@ void LLTextureCtrl::draw()
LLFontGL::DROP_SHADOW);
}
- // Show more detailed information if this agent is god.
- if (gAgent.isGodlike())
+ // Optionally show more detailed information.
+ if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
{
LLFontGL* font = LLFontGL::getFontSansSerif();
std::string tdesc;
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 7fa04ce574..cf3bce2ec1 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -260,6 +260,7 @@ private:
BOOL mHaveAllData;
BOOL mInLocalCache;
bool mCanUseHTTP ;
+ bool mCanUseNET ; //can get from asset server.
S32 mHTTPFailCount;
S32 mRetryAttempt;
S32 mActiveCount;
@@ -426,6 +427,8 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
mTotalPackets(0),
mImageCodec(IMG_CODEC_INVALID)
{
+ mCanUseNET = mUrl.empty() ;
+
calcWorkPriority();
mType = host.isOk() ? LLImageBase::TYPE_AVATAR_BAKE : LLImageBase::TYPE_NORMAL;
// llinfos << "Create: " << mID << " mHost:" << host << " Discard=" << discard << llendl;
@@ -904,13 +907,16 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mGetStatus == HTTP_NOT_FOUND)
{
mHTTPFailCount = max_attempts = 1; // Don't retry
- //llinfos << "Texture missing from server (404): " << mUrl << llendl;
+ //llwarns << "Texture missing from server (404): " << mUrl << llendl;
//roll back to try UDP
- mState = INIT ;
- mCanUseHTTP = false ;
- setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
- return false ;
+ if(mCanUseNET)
+ {
+ mState = INIT ;
+ mCanUseHTTP = false ;
+ setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
+ return false ;
+ }
}
else if (mGetStatus == HTTP_SERVICE_UNAVAILABLE)
{
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 43913f3632..7a8b6557bb 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -54,6 +54,11 @@
#include "llviewertexture.h"
#include "llviewertexturelist.h"
#include "llvovolume.h"
+
+// For avatar texture view
+#include "llvoavatarself.h"
+#include "lltexlayer.h"
+
extern F32 texmem_lower_bound_scale;
LLTextureView *gTextureView = NULL;
@@ -375,6 +380,86 @@ LLRect LLTextureBar::getRequiredRect()
////////////////////////////////////////////////////////////////////////////
+class LLAvatarTexBar : public LLView
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLView::Params>
+ {
+ Mandatory<LLTextureView*> texture_view;
+ Params()
+ : texture_view("texture_view")
+ {
+ S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
+ rect(LLRect(0,0,100,line_height * 4));
+ }
+ };
+
+ LLAvatarTexBar(const Params& p)
+ : LLView(p),
+ mTextureView(p.texture_view)
+ {}
+
+ virtual void draw();
+ virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual LLRect getRequiredRect(); // Return the height of this object, given the set options.
+
+private:
+ LLTextureView* mTextureView;
+};
+
+void LLAvatarTexBar::draw()
+{
+ if (!gSavedSettings.getBOOL("DebugAvatarRezTime")) return;
+
+ LLVOAvatarSelf* avatarp = gAgentAvatarp;
+ if (!avatarp) return;
+
+ const S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
+ const S32 v_offset = (S32)((texture_bar_height + 2.5f) * mTextureView->mNumTextureBars + 2.5f);
+ //----------------------------------------------------------------------------
+ LLGLSUIDefault gls_ui;
+ LLColor4 text_color(1.f, 1.f, 1.f, 1.f);
+ LLColor4 color;
+
+ U32 line_num = 6;
+ for (LLVOAvatarDefines::LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDefines::LLVOAvatarDictionary::getInstance()->getBakedTextures().begin();
+ baked_iter != LLVOAvatarDefines::LLVOAvatarDictionary::getInstance()->getBakedTextures().end();
+ ++baked_iter)
+ {
+ const LLVOAvatarDefines::EBakedTextureIndex baked_index = baked_iter->first;
+ const LLTexLayerSet *layerset = avatarp->debugGetLayerSet(baked_index);
+ if (!layerset) continue;
+ const LLTexLayerSetBuffer *layerset_buffer = layerset->getComposite();
+ if (!layerset_buffer) continue;
+ std::string text = layerset_buffer->dumpTextureInfo();
+ LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*line_num,
+ text_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
+ line_num++;
+ }
+ const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureTimeout");
+ const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
+
+ const std::string texture_timeout_str = texture_timeout ? llformat("%d",texture_timeout) : "Disabled";
+ const std::string override_tex_discard_level_str = override_tex_discard_level ? llformat("%d",override_tex_discard_level) : "Disabled";
+ std::string header_text = llformat("[ Timeout('AvatarBakedTextureTimeout'):%s ] [ LOD_Override('TextureDiscardLevel'):%s ]", texture_timeout_str.c_str(), override_tex_discard_level_str.c_str());
+ LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, 0, v_offset + line_height*line_num,
+ text_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
+}
+
+BOOL LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask)
+{
+ return FALSE;
+}
+
+LLRect LLAvatarTexBar::getRequiredRect()
+{
+ LLRect rect;
+ rect.mTop = 8;
+ return rect;
+}
+
+////////////////////////////////////////////////////////////////////////////
+
class LLGLTexMemBar : public LLView
{
public:
@@ -412,13 +497,17 @@ void LLGLTexMemBar::draw()
F32 cache_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getUsage()) ;
F32 cache_max_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getMaxUsage()) ;
S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
- S32 v_offset = (S32)((texture_bar_height + 2.5f) * mTextureView->mNumTextureBars + 2.5f);
+ S32 v_offset = (S32)((texture_bar_height + 2.5f) * mTextureView->mNumTextureBars + 5.0f);
//----------------------------------------------------------------------------
LLGLSUIDefault gls_ui;
LLColor4 text_color(1.f, 1.f, 1.f, 0.75f);
LLColor4 color;
- std::string text;
+ std::string text = "";
+
+ LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*6,
+ text_color, LLFontGL::LEFT, LLFontGL::TOP);
+
text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB",
total_mem,
max_total_mem,
@@ -640,6 +729,7 @@ LLTextureView::LLTextureView(const LLTextureView::Params& p)
setDisplayChildren(TRUE);
mGLTexMemBar = 0;
+ mAvatarTexBar = 0;
}
LLTextureView::~LLTextureView()
@@ -647,6 +737,9 @@ LLTextureView::~LLTextureView()
// Children all cleaned up by default view destructor.
delete mGLTexMemBar;
mGLTexMemBar = 0;
+
+ delete mAvatarTexBar;
+ mAvatarTexBar = 0;
}
typedef std::pair<F32,LLViewerFetchedTexture*> decode_pair_t;
@@ -684,6 +777,13 @@ void LLTextureView::draw()
mGLTexMemBar = 0;
}
+ if (mAvatarTexBar)
+ {
+ removeChild(mAvatarTexBar);
+ mAvatarTexBar->die();
+ mAvatarTexBar = 0;
+ }
+
typedef std::multiset<decode_pair_t, compare_decode_pair > display_list_t;
display_list_t display_image_list;
@@ -851,7 +951,14 @@ void LLTextureView::draw()
tmbp.texture_view(this);
mGLTexMemBar = LLUICtrlFactory::create<LLGLTexMemBar>(tmbp);
addChild(mGLTexMemBar);
-
+
+ LLAvatarTexBar::Params atbp;
+ atbp.name("gl avatartex bar");
+ atbp.texture_view(this);
+ mAvatarTexBar = LLUICtrlFactory::create<LLAvatarTexBar>(atbp);
+ addChild(mAvatarTexBar);
+
+
reshape(getRect().getWidth(), getRect().getHeight(), TRUE);
/*
diff --git a/indra/newview/lltextureview.h b/indra/newview/lltextureview.h
index 435a55df83..dfd9c42c2c 100644
--- a/indra/newview/lltextureview.h
+++ b/indra/newview/lltextureview.h
@@ -38,11 +38,13 @@
class LLViewerFetchedTexture;
class LLTextureBar;
class LLGLTexMemBar;
+class LLAvatarTexBar;
class LLTextureView : public LLContainerView
{
friend class LLTextureBar;
friend class LLGLTexMemBar;
+ friend class LLAvatarTexBar;
protected:
LLTextureView(const Params&);
friend class LLUICtrlFactory;
@@ -73,7 +75,7 @@ private:
U32 mNumTextureBars;
LLGLTexMemBar* mGLTexMemBar;
-
+ LLAvatarTexBar* mAvatarTexBar;
public:
static std::set<LLViewerFetchedTexture*> sDebugImages;
};
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 568cd4cb19..9abfab300c 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -271,7 +271,10 @@ void LLToast::setVisible(BOOL show)
{
mTimer->start();
}
- LLModalDialog::setFrontmost(FALSE);
+ if (!getVisible())
+ {
+ LLModalDialog::setFrontmost(FALSE);
+ }
}
else
{
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 8a8bdd2dba..bc77ac5fd1 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -48,7 +48,7 @@
#include "llgiveinventory.h"
#include "llhudmanager.h"
#include "llhudeffecttrail.h"
-//#include "llimview.h"
+#include "llimview.h"
#include "llinventorybridge.h"
#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
@@ -1422,12 +1422,42 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
}
+static void give_inventory_cb(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ // if Cancel pressed
+ if (option == 1)
+ {
+ return;
+ }
+
+ LLSD payload = notification["payload"];
+ const LLUUID& session_id = payload["session_id"];
+ const LLUUID& agent_id = payload["agent_id"];
+ LLViewerInventoryItem * inv_item = gInventory.getItem(payload["item_id"]);
+ if (NULL == inv_item)
+ {
+ llassert(NULL != inv_item);
+ return;
+ }
+
+ if (LLGiveInventory::doGiveInventoryItem(agent_id, inv_item, session_id))
+ {
+ if ("avatarpicker" == payload["d&d_dest"].asString())
+ {
+ LLFloaterReg::hideInstance("avatar_picker");
+ }
+ LLNotificationsUtil::add("ItemsShared");
+ }
+}
+
// function used as drag-and-drop handler for simple agent give inventory requests
//static
bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_id, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data,
- EAcceptance* accept)
+ EAcceptance* accept,
+ const LLSD& dest)
{
// check the type
switch(cargo_type)
@@ -1452,7 +1482,21 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_
*accept = ACCEPT_YES_COPY_SINGLE;
if (drop)
{
- LLGiveInventory::doGiveInventoryItem(dest_agent, inv_item, session_id);
+ LLIMModel::LLIMSession * session = LLIMModel::instance().findIMSession(session_id);
+ if (NULL == session)
+ {
+ llassert(NULL != session);
+ return false;
+ }
+ LLSD substitutions;
+ substitutions["RESIDENTS"] = session->mName;
+ substitutions["ITEMS"] = inv_item->getName();
+ LLSD payload;
+ payload["agent_id"] = dest_agent;
+ payload["item_id"] = inv_item->getUUID();
+ payload["session_id"] = session_id;
+ payload["d&d_dest"] = dest.asString();
+ LLNotificationsUtil::add("ShareItemsConfirmation", substitutions, payload, &give_inventory_cb);
}
}
else
diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h
index 18334b5ee1..36e69c1db3 100644
--- a/indra/newview/lltooldraganddrop.h
+++ b/indra/newview/lltooldraganddrop.h
@@ -246,7 +246,8 @@ public:
static bool handleGiveDragAndDrop(LLUUID agent, LLUUID session, BOOL drop,
EDragAndDropType cargo_type,
void* cargo_data,
- EAcceptance* accept);
+ EAcceptance* accept,
+ const LLSD& dest = LLSD());
// Classes used for determining 3d drag and drop types.
private:
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index 9efa6c4108..cbaa7248a2 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -215,7 +215,8 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const LLSLURL&
LLSD args;
args["SLURL"] = slurl.getLocationString();
args["CURRENT_GRID"] = LLGridManager::getInstance()->getGridLabel();
- LLSD grid_info = LLGridManager::getInstance()->getGridInfo(slurl.getGrid());
+ LLSD grid_info;
+ LLGridManager::getInstance()->getGridInfo(slurl.getGrid(), grid_info);
if(grid_info.has(GRID_LABEL_VALUE))
{
diff --git a/indra/newview/llviewerattachmenu.cpp b/indra/newview/llviewerattachmenu.cpp
new file mode 100644
index 0000000000..f7f5ec72fd
--- /dev/null
+++ b/indra/newview/llviewerattachmenu.cpp
@@ -0,0 +1,139 @@
+/**
+ * @file llviewerattachmenu.cpp
+ * @brief "Attach to" / "Attach to HUD" submenus.
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, 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 "llviewerattachmenu.h"
+
+// project includes
+#include "llagent.h"
+#include "llinventorybridge.h" // for rez_attachment()
+#include "llinventorymodel.h"
+#include "llviewerinventory.h"
+#include "llviewermenu.h" // for gMenuHolder
+#include "llvoavatarself.h"
+
+// linden libraries
+#include "llmenugl.h"
+#include "lltrans.h"
+
+// static
+void LLViewerAttachMenu::populateMenus(const std::string& attach_to_menu_name, const std::string& attach_to_hud_menu_name)
+{
+ // *TODO: share this code with other similar menus
+ // (inventory panel context menu, in-world object menu).
+
+ if (attach_to_menu_name.empty() || attach_to_hud_menu_name.empty() || !isAgentAvatarValid()) return;
+
+ LLContextMenu* attach_menu = gMenuHolder->getChild<LLContextMenu>(attach_to_menu_name);
+ LLContextMenu* attach_hud_menu = gMenuHolder->getChild<LLContextMenu>(attach_to_hud_menu_name);
+
+ if (!attach_menu || attach_menu->getChildCount() != 0 ||
+ !attach_hud_menu || attach_hud_menu->getChildCount() != 0)
+ {
+ return;
+ }
+
+ // Populate "Attach to..." / "Attach to HUD..." submenus.
+ for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin();
+ iter != gAgentAvatarp->mAttachmentPoints.end(); )
+ {
+ LLVOAvatar::attachment_map_t::iterator curiter = iter++;
+ LLViewerJointAttachment* attachment = curiter->second;
+ LLMenuItemCallGL::Params p;
+ std::string submenu_name = attachment->getName();
+ std::string translated_submenu_name;
+
+ if (LLTrans::findString(translated_submenu_name, submenu_name))
+ {
+ p.name = (" ") + translated_submenu_name + " ";
+ }
+ else
+ {
+ p.name = submenu_name;
+ }
+
+ LLSD cbparams;
+ cbparams["index"] = curiter->first;
+ cbparams["label"] = attachment->getName();
+ p.on_click.function_name = "Object.Attach";
+ p.on_click.parameter = LLSD(attachment->getName());
+ p.on_enable.function_name = "Attachment.Label";
+ p.on_enable.parameter = cbparams;
+
+ LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(p);
+ LLView* parent_menu = attachment->getIsHUDAttachment() ? attach_hud_menu : attach_menu;
+ parent_menu->addChild(item);
+ }
+}
+
+// static
+void LLViewerAttachMenu::attachObjects(const uuid_vec_t& items, const std::string& joint_name)
+{
+ LLViewerJointAttachment* attachmentp = NULL;
+ for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin();
+ iter != gAgentAvatarp->mAttachmentPoints.end(); )
+ {
+ LLVOAvatar::attachment_map_t::iterator curiter = iter++;
+ LLViewerJointAttachment* attachment = curiter->second;
+ if (attachment->getName() == joint_name)
+ {
+ attachmentp = attachment;
+ break;
+ }
+ }
+ if (attachmentp == NULL)
+ {
+ return;
+ }
+
+ for (uuid_vec_t::const_iterator it = items.begin(); it != items.end(); ++it)
+ {
+ const LLUUID &id = *it;
+ LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getLinkedItem(id);
+ if(item && gInventory.isObjectDescendentOf(id, gInventory.getRootFolderID()))
+ {
+ rez_attachment(item, attachmentp);
+ }
+ else if(item && item->isFinished())
+ {
+ // must be in library. copy it to our inventory and put it on.
+ LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(attachmentp);
+ copy_inventory_item(gAgent.getID(),
+ item->getPermissions().getOwner(),
+ item->getUUID(),
+ LLUUID::null,
+ std::string(),
+ cb);
+ }
+ }
+}
diff --git a/indra/newview/llviewerattachmenu.h b/indra/newview/llviewerattachmenu.h
new file mode 100644
index 0000000000..d1db9914f3
--- /dev/null
+++ b/indra/newview/llviewerattachmenu.h
@@ -0,0 +1,43 @@
+/**
+ * @file llviewerattachmenu.h
+ * @brief "Attach to" / "Attach to HUD" submenus.
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, 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_LLVIEWERATTACHMENU_H
+#define LL_LLVIEWERATTACHMENU_H
+
+class LLViewerAttachMenu
+{
+public:
+ static void populateMenus(const std::string& attach_to_menu_name, const std::string& attach_to_hud_menu_name);
+ static void attachObjects(const uuid_vec_t& items, const std::string& joint_name);
+};
+
+#endif // LL_LLVIEWERATTACHMENU_H
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index f8b6435614..d745356dcd 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -39,6 +39,7 @@
#include "llagent.h"
#include "llagentcamera.h"
+#include "llagentwearables.h"
#include "llviewerfoldertype.h"
#include "llfolderview.h"
#include "llviewercontrol.h"
@@ -119,10 +120,10 @@ public:
mInventoryItemsDict["Male - Wow"] = LLTrans::getString("Male - Wow");
//female
- mInventoryItemsDict["FeMale - Excuse me"] = LLTrans::getString("FeMale - Excuse me");
- mInventoryItemsDict["FeMale - Get lost"] = LLTrans::getString("FeMale - Get lost");
- mInventoryItemsDict["FeMale - Blow kiss"] = LLTrans::getString("FeMale - Blow kiss");
- mInventoryItemsDict["FeMale - Boo"] = LLTrans::getString("FeMale - Boo");
+ mInventoryItemsDict["Female - Excuse me"] = LLTrans::getString("Female - Excuse me");
+ mInventoryItemsDict["Female - Get lost"] = LLTrans::getString("Female - Get lost");
+ mInventoryItemsDict["Female - Blow kiss"] = LLTrans::getString("Female - Blow kiss");
+ mInventoryItemsDict["Female - Boo"] = LLTrans::getString("Female - Boo");
mInventoryItemsDict["Female - Bored"] = LLTrans::getString("Female - Bored");
mInventoryItemsDict["Female - Hey"] = LLTrans::getString("Female - Hey");
mInventoryItemsDict["Female - Laugh"] = LLTrans::getString("Female - Laugh");
@@ -606,6 +607,7 @@ bool LLViewerInventoryCategory::fetch()
if((VERSION_UNKNOWN == mVersion)
&& mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads.
{
+ LL_DEBUGS("InventoryFetch") << "Fetching category children: " << mName << ", UUID: " << mUUID << LL_ENDL;
const F32 FETCH_TIMER_EXPIRY = 10.0f;
mDescendentsRequested.reset();
mDescendentsRequested.setTimerExpirySec(FETCH_TIMER_EXPIRY);
@@ -880,6 +882,14 @@ void WearOnAvatarCallback::fire(const LLUUID& inv_item)
void ModifiedCOFCallback::fire(const LLUUID& inv_item)
{
LLAppearanceMgr::instance().updateAppearanceFromCOF();
+
+ if (LLSideTray::getInstance()->isPanelActive("sidepanel_appearance"))
+ {
+ // *HACK: Edit the wearable that has just been worn
+ // only if the Appearance SP is currently opened.
+ LLAgentWearables::editWearable(inv_item);
+ }
+
// TODO: camera mode may not be changed if a debug setting is tweaked
if( gAgentCamera.cameraCustomizeAvatar() )
{
@@ -1240,10 +1250,8 @@ void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, cons
LLWearableType::EType wearable_type = LLWearableType::typeNameToType(type_name);
if (wearable_type >= LLWearableType::WT_SHAPE && wearable_type < LLWearableType::WT_COUNT)
{
- LLAssetType::EType asset_type = LLWearableType::getAssetType(wearable_type);
- LLFolderType::EType folder_type = LLFolderType::assetTypeToFolderType(asset_type);
- const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(folder_type);
- LLFolderBridge::createWearable(parent_id, wearable_type);
+ const LLUUID parent_id = bridge ? bridge->getUUID() : LLUUID::null;
+ LLAgentWearables::createWearable(wearable_type, false, parent_id);
}
else
{
@@ -1582,7 +1590,6 @@ LLWearableType::EType LLViewerInventoryItem::getWearableType() const
{
if (!isWearableType())
{
- llwarns << "item is not a wearable" << llendl;
return LLWearableType::WT_INVALID;
}
return LLWearableType::EType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 69352e6685..a1b909c609 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2403,18 +2403,14 @@ void handle_object_touch()
msg->sendMessage(object->getRegion()->getHost());
}
-bool enable_object_touch()
-{
- LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
- return obj && obj->flagHandleTouch();
-}
-
// One object must have touch sensor
class LLObjectEnableTouch : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool new_value = enable_object_touch();
+ LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
+
+ bool new_value = obj && obj->flagHandleTouch();
// Update label based on the node touch name if available.
std::string touch_text;
@@ -7705,6 +7701,30 @@ void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y)
LLMenuGL::showPopup(ctrl, show_navbar_context_menu, x, y);
}
+void initialize_edit_menu()
+{
+ view_listener_t::addMenu(new LLEditUndo(), "Edit.Undo");
+ view_listener_t::addMenu(new LLEditRedo(), "Edit.Redo");
+ view_listener_t::addMenu(new LLEditCut(), "Edit.Cut");
+ view_listener_t::addMenu(new LLEditCopy(), "Edit.Copy");
+ view_listener_t::addMenu(new LLEditPaste(), "Edit.Paste");
+ view_listener_t::addMenu(new LLEditDelete(), "Edit.Delete");
+ view_listener_t::addMenu(new LLEditSelectAll(), "Edit.SelectAll");
+ view_listener_t::addMenu(new LLEditDeselect(), "Edit.Deselect");
+ view_listener_t::addMenu(new LLEditDuplicate(), "Edit.Duplicate");
+ view_listener_t::addMenu(new LLEditTakeOff(), "Edit.TakeOff");
+ view_listener_t::addMenu(new LLEditEnableUndo(), "Edit.EnableUndo");
+ view_listener_t::addMenu(new LLEditEnableRedo(), "Edit.EnableRedo");
+ view_listener_t::addMenu(new LLEditEnableCut(), "Edit.EnableCut");
+ view_listener_t::addMenu(new LLEditEnableCopy(), "Edit.EnableCopy");
+ view_listener_t::addMenu(new LLEditEnablePaste(), "Edit.EnablePaste");
+ view_listener_t::addMenu(new LLEditEnableDelete(), "Edit.EnableDelete");
+ view_listener_t::addMenu(new LLEditEnableSelectAll(), "Edit.EnableSelectAll");
+ view_listener_t::addMenu(new LLEditEnableDeselect(), "Edit.EnableDeselect");
+ view_listener_t::addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate");
+
+}
+
void initialize_menus()
{
// A parameterized event handler used as ctrl-8/9/0 zoom controls below.
@@ -7731,7 +7751,6 @@ void initialize_menus()
// Generic enable and visible
// Don't prepend MenuName.Foo because these can be used in any menu.
enable.add("IsGodCustomerService", boost::bind(&is_god_customer_service));
- enable.add("IsGodCustomerService", boost::bind(&is_god_customer_service));
view_listener_t::addEnable(new LLUploadCostCalculator(), "Upload.CalculateCosts");
@@ -7742,27 +7761,6 @@ void initialize_menus()
// File menu
init_menu_file();
- // Edit menu
- view_listener_t::addMenu(new LLEditUndo(), "Edit.Undo");
- view_listener_t::addMenu(new LLEditRedo(), "Edit.Redo");
- view_listener_t::addMenu(new LLEditCut(), "Edit.Cut");
- view_listener_t::addMenu(new LLEditCopy(), "Edit.Copy");
- view_listener_t::addMenu(new LLEditPaste(), "Edit.Paste");
- view_listener_t::addMenu(new LLEditDelete(), "Edit.Delete");
- view_listener_t::addMenu(new LLEditSelectAll(), "Edit.SelectAll");
- view_listener_t::addMenu(new LLEditDeselect(), "Edit.Deselect");
- view_listener_t::addMenu(new LLEditDuplicate(), "Edit.Duplicate");
- view_listener_t::addMenu(new LLEditTakeOff(), "Edit.TakeOff");
-
- view_listener_t::addMenu(new LLEditEnableUndo(), "Edit.EnableUndo");
- view_listener_t::addMenu(new LLEditEnableRedo(), "Edit.EnableRedo");
- view_listener_t::addMenu(new LLEditEnableCut(), "Edit.EnableCut");
- view_listener_t::addMenu(new LLEditEnableCopy(), "Edit.EnableCopy");
- view_listener_t::addMenu(new LLEditEnablePaste(), "Edit.EnablePaste");
- view_listener_t::addMenu(new LLEditEnableDelete(), "Edit.EnableDelete");
- view_listener_t::addMenu(new LLEditEnableSelectAll(), "Edit.EnableSelectAll");
- view_listener_t::addMenu(new LLEditEnableDeselect(), "Edit.EnableDeselect");
- view_listener_t::addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate");
view_listener_t::addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff");
view_listener_t::addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar");
view_listener_t::addMenu(new LLEnableEditShape(), "Edit.EnableEditShape");
@@ -8048,7 +8046,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend");
enable.add("Avatar.EnableFreezeEject", boost::bind(&enable_freeze_eject, _2));
- enable.add("Avatar.EnableFreezeEject", boost::bind(&enable_freeze_eject, _2));
// Object pie menu
view_listener_t::addMenu(new LLObjectBuild(), "Object.Build");
@@ -8070,7 +8067,6 @@ void initialize_menus()
commit.add("Object.Open", boost::bind(&handle_object_open));
commit.add("Object.Take", boost::bind(&handle_take));
enable.add("Object.EnableOpen", boost::bind(&enable_object_open));
- enable.add("Object.EnableTouch", boost::bind(&enable_object_touch));
view_listener_t::addMenu(new LLObjectEnableTouch(), "Object.EnableTouch");
view_listener_t::addMenu(new LLObjectEnableSitOrStand(), "Object.EnableSitOrStand");
enable.add("Object.EnableDelete", boost::bind(&enable_object_delete));
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index d72ea00077..ad88fcea9a 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -44,6 +44,7 @@ class LLParcelSelection;
class LLObjectSelection;
class LLSelectNode;
+void initialize_edit_menu();
void init_menus();
void cleanup_menus();
diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp
index c76eee80f7..fec112b9e7 100644
--- a/indra/newview/llviewernetwork.cpp
+++ b/indra/newview/llviewernetwork.cpp
@@ -226,11 +226,11 @@ void LLGridManager::initialize(const std::string& grid_file)
LLSD grid = grid_itr->second;
// TODO: Make sure gridfile specified label is not
// a system grid label
- LL_INFOS("GridManager") << "reading: " << key_name << LL_ENDL;
+ LL_DEBUGS("GridManager") << "reading: " << key_name << LL_ENDL;
if (mGridList.has(key_name) &&
mGridList[key_name].has(GRID_IS_SYSTEM_GRID_VALUE))
{
- LL_INFOS("GridManager") << "Cannot override grid " << key_name << " as it's a system grid" << LL_ENDL;
+ LL_DEBUGS("GridManager") << "Cannot override grid " << key_name << " as it's a system grid" << LL_ENDL;
// If the system grid does exist in the grids file, and it's marked as a favorite, set it as a favorite.
if(grid_itr->second.has(GRID_IS_FAVORITE_VALUE) && grid_itr->second[GRID_IS_FAVORITE_VALUE].asBoolean() )
{
@@ -242,7 +242,7 @@ void LLGridManager::initialize(const std::string& grid_file)
try
{
addGrid(grid);
- LL_INFOS("GridManager") << "Added grid: " << key_name << LL_ENDL;
+ LL_DEBUGS("GridManager") << "Added grid: " << key_name << LL_ENDL;
}
catch (...)
{
@@ -260,84 +260,60 @@ void LLGridManager::initialize(const std::string& grid_file)
std::string cmd_line_grid = gSavedSettings.getString("CmdLineGridChoice");
if(!cmd_line_grid.empty())
{
+ // try to find the grid assuming the command line parameter is
+ // the case-insensitive 'label' of the grid. ie 'Agni'
mGrid = getGridByLabel(cmd_line_grid);
+ if(mGrid.empty())
+ {
+ // if we couldn't find it, assume the
+ // requested grid is the actual grid 'name' or index,
+ // which would be the dns name of the grid (for non
+ // linden hosted grids)
+ // If the grid isn't there, that's ok, as it will be
+ // automatically added later.
+ mGrid = cmd_line_grid;
+ }
+
+ }
+ else
+ {
+ // if a grid was not passed in via the command line, grab it from the CurrentGrid setting.
+ // if there's no current grid, that's ok as it'll be either set by the value passed
+ // in via the login uri if that's specified, or will default to maingrid
+ mGrid = gSavedSettings.getString("CurrentGrid");
}
- LL_INFOS("GridManager") << "Grid Name: " << mGrid << LL_ENDL;
- // If a command line login URI was passed in, so we should add the command
- // line grid to the list of grids
-
- LLSD cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI");
- if (cmd_line_login_uri.isString())
+ if(mGrid.empty())
{
- LL_INFOS("GridManager") << "adding cmd line login uri" << LL_ENDL;
- // grab the other related URI values
- std::string cmd_line_helper_uri = gSavedSettings.getString("CmdLineHelperURI");
- std::string cmd_line_login_page = gSavedSettings.getString("LoginPage");
+ // no grid was specified so default to maingrid
+ LL_DEBUGS("GridManager") << "Setting grid to MAINGRID as no grid has been specified " << LL_ENDL;
+ mGrid = MAINGRID;
- // we've a cmd line login, so add a grid for the command line,
- // overwriting any existing grids
- LLSD grid = LLSD::emptyMap();
- grid[GRID_LOGIN_URI_VALUE] = LLSD::emptyArray();
- grid[GRID_LOGIN_URI_VALUE].append(cmd_line_login_uri);
- LL_INFOS("GridManager") << "cmd line login uri: " << cmd_line_login_uri.asString() << LL_ENDL;
- LLURI uri(cmd_line_login_uri.asString());
- if (mGrid.empty())
- {
- // if a grid name was not passed in via the command line,
- // then set the grid name based on the hostname of the
- // login uri
- mGrid = uri.hostName();
- }
-
- grid[GRID_VALUE] = mGrid;
-
- if (mGridList.has(mGrid) && mGridList[mGrid].has(GRID_LABEL_VALUE))
- {
- grid[GRID_LABEL_VALUE] = mGridList[mGrid][GRID_LABEL_VALUE];
- }
- else
- {
- grid[GRID_LABEL_VALUE] = mGrid;
- }
- if(!cmd_line_helper_uri.empty())
- {
- grid[GRID_HELPER_URI_VALUE] = cmd_line_helper_uri;
- }
-
- if(!cmd_line_login_page.empty())
- {
- grid[GRID_LOGIN_PAGE_VALUE] = cmd_line_login_page;
- }
- // if the login page, helper URI value, and so on are not specified,
- // add grid will generate them.
-
- // Also, we will override a system grid if values are passed in via the command
- // line, for testing. These values will not be remembered though.
- if (mGridList.has(mGrid) && mGridList[mGrid].has(GRID_IS_SYSTEM_GRID_VALUE))
- {
- grid[GRID_IS_SYSTEM_GRID_VALUE] = TRUE;
- }
- addGrid(grid);
}
- // if a grid was not passed in via the command line, grab it from the CurrentGrid setting.
- if (mGrid.empty())
+ // generate a 'grid list' entry for any command line parameter overrides
+ // or setting overides that we'll add to the grid list or override
+ // any grid list entries with.
+ LLSD grid = LLSD::emptyMap();
+
+ if(mGridList.has(mGrid))
{
-
- mGrid = gSavedSettings.getString("CurrentGrid");
+ grid = mGridList[mGrid];
}
-
- if (mGrid.empty() || !mGridList.has(mGrid))
+ else
{
- // the grid name was empty, or the grid isn't actually in the list, then set it to the
- // appropriate default.
- LL_INFOS("GridManager") << "Resetting grid as grid name " << mGrid << " is not in the list" << LL_ENDL;
- mGrid = MAINGRID;
+ grid[GRID_VALUE] = mGrid;
+ // add the grid with the additional values, or update the
+ // existing grid if it exists with the given values
+ addGrid(grid);
}
- LL_INFOS("GridManager") << "Selected grid is " << mGrid << LL_ENDL;
- gSavedSettings.setString("CurrentGrid", mGrid);
+ LL_DEBUGS("GridManager") << "Selected grid is " << mGrid << LL_ENDL;
+ setGridChoice(mGrid);
+ if(mGridList[mGrid][GRID_LOGIN_URI_VALUE].isArray())
+ {
+ llinfos << "is array" << llendl;
+ }
}
LLGridManager::~LLGridManager()
@@ -345,6 +321,36 @@ LLGridManager::~LLGridManager()
saveFavorites();
}
+void LLGridManager::getGridInfo(const std::string &grid, LLSD& grid_info)
+{
+
+ grid_info = mGridList[grid];
+
+ // override any grid data with the command line info.
+
+ LLSD cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI");
+ if (cmd_line_login_uri.isString())
+ {
+ grid_info[GRID_LOGIN_URI_VALUE] = LLSD::emptyArray();
+ grid_info[GRID_LOGIN_URI_VALUE].append(cmd_line_login_uri);
+ }
+
+ // override the helper uri if it was passed in
+ std::string cmd_line_helper_uri = gSavedSettings.getString("CmdLineHelperURI");
+ if(!cmd_line_helper_uri.empty())
+ {
+ grid_info[GRID_HELPER_URI_VALUE] = cmd_line_helper_uri;
+ }
+
+ // override the login page if it was passed in
+ std::string cmd_line_login_page = gSavedSettings.getString("LoginPage");
+ if(!cmd_line_login_page.empty())
+ {
+ grid_info[GRID_LOGIN_PAGE_VALUE] = cmd_line_login_page;
+ }
+}
+
+
//
// LLGridManager::addGrid - add a grid to the grid list, populating the needed values
// if they're not populated yet.
@@ -401,7 +407,7 @@ void LLGridManager::addGrid(LLSD& grid_data)
grid_data[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_ACCOUNT);
}
- LL_INFOS("GridManager") << "ADDING: " << grid << LL_ENDL;
+ LL_DEBUGS("GridManager") << "ADDING: " << grid << LL_ENDL;
mGridList[grid] = grid_data;
}
}
@@ -467,6 +473,7 @@ std::map<std::string, std::string> LLGridManager::getKnownGrids(bool favorite_on
return result;
}
+
void LLGridManager::setGridChoice(const std::string& grid)
{
// Set the grid choice based on a string.
@@ -477,35 +484,37 @@ void LLGridManager::setGridChoice(const std::string& grid)
// loop through. We could do just a hash lookup but we also want to match
// on label
- for(LLSD::map_iterator grid_iter = mGridList.beginMap();
- grid_iter != mGridList.endMap();
- grid_iter++)
+ std::string grid_name = grid;
+ if(!mGridList.has(grid_name))
{
- if((grid == grid_iter->first) ||
- (grid == grid_iter->second[GRID_LABEL_VALUE].asString()))
- {
- mGrid = grid_iter->second[GRID_VALUE].asString();
- gSavedSettings.setString("CurrentGrid", grid_iter->second[GRID_VALUE]);
- return;
-
- }
+ // case insensitive
+ grid_name = getGridByLabel(grid);
+ }
+
+ if(grid_name.empty())
+ {
+ // the grid was not in the list of grids.
+ LLSD grid_data = LLSD::emptyMap();
+ grid_data[GRID_VALUE] = grid;
+ addGrid(grid_data);
}
- LLSD grid_data = LLSD::emptyMap();
- grid_data[GRID_VALUE] = grid;
- addGrid(grid_data);
mGrid = grid;
gSavedSettings.setString("CurrentGrid", grid);
}
-std::string LLGridManager::getGridByLabel( const std::string &grid_label)
+std::string LLGridManager::getGridByLabel( const std::string &grid_label, bool case_sensitive)
{
for(LLSD::map_iterator grid_iter = mGridList.beginMap();
grid_iter != mGridList.endMap();
grid_iter++)
{
- if (grid_iter->second.has(GRID_LABEL_VALUE) && (grid_iter->second[GRID_LABEL_VALUE].asString() == grid_label))
+ if (grid_iter->second.has(GRID_LABEL_VALUE))
{
- return grid_iter->first;
+ if (0 == (case_sensitive?LLStringUtil::compareStrings(grid_label, grid_iter->second[GRID_LABEL_VALUE].asString()):
+ LLStringUtil::compareInsensitive(grid_label, grid_iter->second[GRID_LABEL_VALUE].asString())))
+ {
+ return grid_iter->first;
+ }
}
}
return std::string();
@@ -514,6 +523,12 @@ std::string LLGridManager::getGridByLabel( const std::string &grid_label)
void LLGridManager::getLoginURIs(std::vector<std::string>& uris)
{
uris.clear();
+ LLSD cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI");
+ if (cmd_line_login_uri.isString())
+ {
+ uris.push_back(cmd_line_login_uri);
+ return;
+ }
for (LLSD::array_iterator llsd_uri = mGridList[mGrid][GRID_LOGIN_URI_VALUE].beginArray();
llsd_uri != mGridList[mGrid][GRID_LOGIN_URI_VALUE].endArray();
llsd_uri++)
@@ -522,6 +537,28 @@ void LLGridManager::getLoginURIs(std::vector<std::string>& uris)
}
}
+std::string LLGridManager::getHelperURI()
+{
+ std::string cmd_line_helper_uri = gSavedSettings.getString("CmdLineHelperURI");
+ if(!cmd_line_helper_uri.empty())
+ {
+ return cmd_line_helper_uri;
+ }
+ return mGridList[mGrid][GRID_HELPER_URI_VALUE];
+}
+
+std::string LLGridManager::getLoginPage()
+{
+ // override the login page if it was passed in
+ std::string cmd_line_login_page = gSavedSettings.getString("LoginPage");
+ if(!cmd_line_login_page.empty())
+ {
+ return cmd_line_login_page;
+ }
+
+ return mGridList[mGrid][GRID_LOGIN_PAGE_VALUE];
+}
+
bool LLGridManager::isInProductionGrid()
{
// *NOTE:Mani This used to compare GRID_INFO_AGNI to gGridChoice,
diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h
index 0271e7a7a5..8c3a15b7cf 100644
--- a/indra/newview/llviewernetwork.h
+++ b/indra/newview/llviewernetwork.h
@@ -89,17 +89,7 @@ public:
// by default only return the user visible grids
std::map<std::string, std::string> getKnownGrids(bool favorites_only=FALSE);
- LLSD getGridInfo(const std::string& grid)
- {
- if(mGridList.has(grid))
- {
- return mGridList[grid];
- }
- else
- {
- return LLSD();
- }
- }
+ void getGridInfo(const std::string& grid, LLSD &grid_info);
// current grid management
@@ -112,8 +102,8 @@ public:
std::string getGridLabel() { return mGridList[mGrid][GRID_LABEL_VALUE]; }
std::string getGrid() const { return mGrid; }
void getLoginURIs(std::vector<std::string>& uris);
- std::string getHelperURI() {return mGridList[mGrid][GRID_HELPER_URI_VALUE];}
- std::string getLoginPage() {return mGridList[mGrid][GRID_LOGIN_PAGE_VALUE];}
+ std::string getHelperURI();
+ std::string getLoginPage();
std::string getGridLoginID() { return mGridList[mGrid][GRID_ID_VALUE]; }
std::string getLoginPage(const std::string& grid) { return mGridList[grid][GRID_LOGIN_PAGE_VALUE]; }
void getLoginIdentifierTypes(LLSD& idTypes) { idTypes = mGridList[mGrid][GRID_LOGIN_IDENTIFIER_TYPES]; }
@@ -125,9 +115,9 @@ public:
std::string getAppSLURLBase(const std::string& grid);
std::string getAppSLURLBase() { return getAppSLURLBase(mGrid); }
- LLSD getGridInfo() { return mGridList[mGrid]; }
+ void getGridInfo(LLSD &grid_info) { getGridInfo(mGrid, grid_info); }
- std::string getGridByLabel( const std::string &grid_label);
+ std::string getGridByLabel( const std::string &grid_label, bool case_sensitive = false);
bool isSystemGrid(const std::string& grid)
{
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 74c46f3070..1bd4cc793d 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -293,8 +293,8 @@ protected:
INACTIVE, //not be used for the last certain period (i.e., 30 seconds).
ACTIVE, //just being used, can become inactive if not being used for a certain time (10 seconds).
NO_DELETE = 99 //stay in memory, can not be removed.
- } LLGLTexureState;
- LLGLTexureState mTextureState ;
+ } LLGLTextureState;
+ LLGLTextureState mTextureState ;
public:
static const U32 sCurrentFileVersion;
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index d8918bdb73..1e3311dafe 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -478,7 +478,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
}
else
{
- //by default, the texure can not be removed from memory even if it is not used.
+ //by default, the texture can not be removed from memory even if it is not used.
//here turn this off
//if this texture should be set to NO_DELETE, call setNoDelete() afterwards.
imagep->forceActive() ;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 84c420d183..1fa953f157 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -68,6 +68,7 @@
#include "llmoveview.h"
#include "llnotificationsutil.h"
#include "llquantize.h"
+#include "llrand.h"
#include "llregionhandle.h"
#include "llresmgr.h"
#include "llselectmgr.h"
@@ -6035,10 +6036,9 @@ void LLVOAvatar::updateRuthTimer(bool loading)
mRuthDebugTimer.reset();
}
- const F32 LOADING_TIMEOUT = 120.f;
- if (mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT)
+ const F32 LOADING_TIMEOUT__SECONDS = 120.f;
+ if (mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT__SECONDS)
{
-
llinfos << "Ruth Timer timeout: Missing texture data for '" << getFullname() << "' "
<< "( Params loaded : " << !visualParamWeightsAreDefault() << " ) "
<< "( Lower : " << isTextureDefined(TEX_LOWER_BAKED) << " ) "
@@ -6684,6 +6684,41 @@ void LLVOAvatar::onFirstTEMessageReceived()
}
//-----------------------------------------------------------------------------
+// bool visualParamWeightsAreDefault()
+//-----------------------------------------------------------------------------
+bool LLVOAvatar::visualParamWeightsAreDefault()
+{
+ bool rtn = true;
+
+ bool is_wearing_skirt = isWearingWearableType(LLWearableType::WT_SKIRT);
+ for (LLVisualParam *param = getFirstVisualParam();
+ param;
+ param = getNextVisualParam())
+ {
+ if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
+ {
+ LLViewerVisualParam* vparam = dynamic_cast<LLViewerVisualParam*>(param);
+ llassert(vparam);
+ bool is_skirt_param = vparam &&
+ LLWearableType::WT_SKIRT == vparam->getWearableType();
+ if (param->getWeight() != param->getDefaultWeight() &&
+ // we have to not care whether skirt weights are default, if we're not actually wearing a skirt
+ (is_wearing_skirt || !is_skirt_param))
+ {
+ //llinfos << "param '" << param->getName() << "'=" << param->getWeight() << " which differs from default=" << param->getDefaultWeight() << llendl;
+ rtn = false;
+ break;
+ }
+ }
+ }
+
+ //llinfos << "params are default ? " << int(rtn) << llendl;
+
+ return rtn;
+}
+
+
+//-----------------------------------------------------------------------------
// processAvatarAppearance()
//-----------------------------------------------------------------------------
void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
@@ -6751,16 +6786,17 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
{
releaseComponentTextures();
}
-
-
+
// parse visual params
S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam);
- if( num_blocks > 1 )
+ bool drop_visual_params_debug = gSavedSettings.getBOOL("BlockSomeAvatarAppearanceVisualParams") && (ll_rand(2) == 0); // pretend that ~12% of AvatarAppearance messages arrived without a VisualParam block, for testing
+ if( num_blocks > 1 && !drop_visual_params_debug)
{
BOOL params_changed = FALSE;
BOOL interp_params = FALSE;
LLVisualParam* param = getFirstVisualParam();
+ llassert(param); // if this ever fires, we should do the same as when num_blocks<=1
if (!param)
{
llwarns << "No visual params!" << llendl;
@@ -6776,8 +6812,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
if( !param )
{
- llwarns << "Number of params in AvatarAppearance msg does not match number of params in avatar xml file." << llendl;
- return;
+ // more visual params supplied than expected - just process what we know about
+ break;
}
U8 value;
@@ -6802,14 +6838,10 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
}
}
- while( param && (param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) )
+ const S32 expected_tweakable_count = getVisualParamCountInGroup(VISUAL_PARAM_GROUP_TWEAKABLE);
+ if (num_blocks != expected_tweakable_count)
{
- param = getNextVisualParam();
- }
- if( param )
- {
- llwarns << "Number of params in AvatarAppearance msg does not match number of params in avatar xml file." << llendl;
- return;
+ llinfos << "Number of params in AvatarAppearance msg (" << num_blocks << ") does not match number of tweakable params in avatar xml file (" << expected_tweakable_count << "). Processing what we can. object: " << getID() << llendl;
}
if (params_changed)
@@ -6826,16 +6858,37 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
updateSexDependentLayerSets( FALSE );
}
}
+
+ llassert( getSex() == ((getVisualParamWeight( "male" ) > 0.5f) ? SEX_MALE : SEX_FEMALE) );
}
else
{
- llwarns << "AvatarAppearance msg received without any parameters, object: " << getID() << llendl;
+ // AvatarAppearance message arrived without visual params
+ if (drop_visual_params_debug)
+ {
+ llinfos << "Debug-faked lack of parameters on AvatarAppearance for object: " << getID() << llendl;
+ }
+ else
+ {
+ llinfos << "AvatarAppearance msg received without any parameters, object: " << getID() << llendl;
+ }
+
+ // this isn't really a problem if we already have a non-default shape
+ if (visualParamWeightsAreDefault())
+ {
+ // re-request appearance, hoping that it comes back with a shape next time
+ llinfos << "Re-requesting AvatarAppearance for object: " << getID() << llendl;
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID());
+ }
+ else
+ {
+ llinfos << "That's okay, we already have a non-default shape for object: " << getID() << llendl;
+ // we don't really care.
+ }
}
setCompositeUpdatesEnabled( TRUE );
- llassert( getSex() == ((getVisualParamWeight( "male" ) > 0.5f) ? SEX_MALE : SEX_FEMALE) );
-
// If all of the avatars are completely baked, release the global image caches to conserve memory.
LLVOAvatar::cullAvatarsByPixelArea();
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 34791cf823..b30cce09f6 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -249,6 +249,7 @@ public:
//--------------------------------------------------------------------
public:
BOOL isFullyLoaded() const;
+ bool visualParamWeightsAreDefault();
protected:
virtual BOOL getIsCloud();
BOOL updateIsFullyLoaded();
@@ -922,6 +923,8 @@ private:
//--------------------------------------------------------------------
// Avatar Rez Metrics
//--------------------------------------------------------------------
+public:
+ F32 debugGetExistenceTimeElapsedF32() const { return mDebugExistenceTimer.getElapsedTimeF32(); }
protected:
LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez
LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory.
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 203ab45cf4..ce8f64404e 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -1302,6 +1302,32 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) cons
return FALSE;
}
+BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const
+{
+ const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
+
+ for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
+ {
+ const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)i);
+ for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin();
+ local_tex_iter != baked_dict->mLocalTextures.end();
+ ++local_tex_iter)
+ {
+ const ETextureIndex tex_index = *local_tex_iter;
+ const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index);
+ const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type);
+ for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++)
+ {
+ if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(override_tex_discard_level))
+ {
+ return FALSE;
+ }
+ }
+ }
+ }
+ return TRUE;
+}
+
BOOL LLVOAvatarSelf::isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index) const
{
LLUUID id;
@@ -1374,7 +1400,7 @@ void LLVOAvatarSelf::requestLayerSetUploads()
void LLVOAvatarSelf::requestLayerSetUpload(LLVOAvatarDefines::EBakedTextureIndex i)
{
ETextureIndex tex_index = mBakedTextureDatas[i].mTextureIndex;
- bool layer_baked = isTextureDefined(tex_index, gAgentWearables.getWearableCount(tex_index));
+ const BOOL layer_baked = isTextureDefined(tex_index, gAgentWearables.getWearableCount(tex_index));
if (!layer_baked && mBakedTextureDatas[i].mTexLayerSet)
{
mBakedTextureDatas[i].mTexLayerSet->requestUpload();
@@ -1391,8 +1417,8 @@ bool LLVOAvatarSelf::hasPendingBakedUploads() const
{
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
- BOOL upload_pending = (mBakedTextureDatas[i].mTexLayerSet && mBakedTextureDatas[i].mTexLayerSet->getComposite()->uploadPending());
- if (upload_pending)
+ LLTexLayerSet* layerset = mBakedTextureDatas[i].mTexLayerSet;
+ if (layerset && layerset->getComposite() && layerset->getComposite()->uploadPending())
{
return true;
}
@@ -1406,7 +1432,7 @@ void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_r
{
return;
}
- // llinfos << "LLVOAvatar::invalidComposite() " << layerset->getBodyRegion() << llendl;
+ // llinfos << "LLVOAvatar::invalidComposite() " << layerset->getBodyRegionName() << llendl;
layerset->requestUpdate();
layerset->invalidateMorphMasks();
@@ -1831,6 +1857,74 @@ void LLVOAvatarSelf::debugBakedTextureUpload(EBakedTextureIndex index, BOOL fini
mDebugBakedTextureTimes[index][done] = mDebugSelfLoadTimer.getElapsedTimeF32();
}
+const std::string LLVOAvatarSelf::debugDumpLocalTextureDataInfo(const LLTexLayerSet* layerset) const
+{
+ std::string text="";
+
+ text = llformat("[Final:%d Avail:%d] ",isLocalTextureDataFinal(layerset), isLocalTextureDataAvailable(layerset));
+
+ /* if (layerset == mBakedTextureDatas[BAKED_HEAD].mTexLayerSet)
+ return getLocalDiscardLevel(TEX_HEAD_BODYPAINT) >= 0; */
+ for (LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDictionary::getInstance()->getBakedTextures().begin();
+ baked_iter != LLVOAvatarDictionary::getInstance()->getBakedTextures().end();
+ ++baked_iter)
+ {
+ const EBakedTextureIndex baked_index = baked_iter->first;
+ if (layerset == mBakedTextureDatas[baked_index].mTexLayerSet)
+ {
+ const LLVOAvatarDictionary::BakedEntry *baked_dict = baked_iter->second;
+ text += llformat("[%d] '%s' ( ",baked_index, baked_dict->mName.c_str());
+ for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin();
+ local_tex_iter != baked_dict->mLocalTextures.end();
+ ++local_tex_iter)
+ {
+ const ETextureIndex tex_index = *local_tex_iter;
+ const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index);
+ const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type);
+ if (wearable_count > 0)
+ {
+ text += LLWearableType::getTypeName(wearable_type) + ":";
+ for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++)
+ {
+ const U32 discard_level = getLocalDiscardLevel(tex_index, wearable_index);
+ std::string discard_str = llformat("%d ",discard_level);
+ text += llformat("%d ",discard_level);
+ }
+ }
+ }
+ text += ")";
+ break;
+ }
+ }
+ return text;
+}
+
+const std::string LLVOAvatarSelf::debugDumpAllLocalTextureDataInfo() const
+{
+ std::string text;
+ const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
+
+ for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
+ {
+ const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)i);
+ BOOL is_texture_final = TRUE;
+ for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin();
+ local_tex_iter != baked_dict->mLocalTextures.end();
+ ++local_tex_iter)
+ {
+ const ETextureIndex tex_index = *local_tex_iter;
+ const LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index);
+ const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type);
+ for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++)
+ {
+ is_texture_final &= (getLocalDiscardLevel(*local_tex_iter, wearable_index) <= (S32)(override_tex_discard_level));
+ }
+ }
+ text += llformat("%s:%d ",baked_dict->mName.c_str(),is_texture_final);
+ }
+ return text;
+}
+
const LLUUID& LLVOAvatarSelf::grabBakedTexture(EBakedTextureIndex baked_index) const
{
if (canGrabBakedTexture(baked_index))
@@ -2012,7 +2106,15 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid )
LLSD args;
args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32());
args["TIME"] = llformat("%d",(U32)mDebugSelfLoadTimer.getElapsedTimeF32());
- LLNotificationsUtil::add("AvatarRezSelfNotification",args);
+ if (isAllLocalTextureDataFinal())
+ {
+ LLNotificationsUtil::add("AvatarRezSelfBakedDoneNotification",args);
+ }
+ else
+ {
+ args["STATUS"] = debugDumpAllLocalTextureDataInfo();
+ LLNotificationsUtil::add("AvatarRezSelfBakedUpdateNotification",args);
+ }
}
outputRezDiagnostics();
@@ -2057,6 +2159,18 @@ void LLVOAvatarSelf::outputRezDiagnostics() const
{
llinfos << "\t\t (" << i << ") \t" << (S32)mDebugBakedTextureTimes[i][0] << " / " << (S32)mDebugBakedTextureTimes[i][1] << llendl;
}
+
+ for (LLVOAvatarDefines::LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDefines::LLVOAvatarDictionary::getInstance()->getBakedTextures().begin();
+ baked_iter != LLVOAvatarDefines::LLVOAvatarDictionary::getInstance()->getBakedTextures().end();
+ ++baked_iter)
+ {
+ const LLVOAvatarDefines::EBakedTextureIndex baked_index = baked_iter->first;
+ const LLTexLayerSet *layerset = debugGetLayerSet(baked_index);
+ if (!layerset) continue;
+ const LLTexLayerSetBuffer *layerset_buffer = layerset->getComposite();
+ if (!layerset_buffer) continue;
+ llinfos << layerset_buffer->dumpTextureInfo() << llendl;
+ }
}
//-----------------------------------------------------------------------------
@@ -2155,7 +2269,6 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug)
// Don't know if this is needed
updateMeshTextures();
-
}
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 189c1ac808..e461dc07da 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -218,8 +218,6 @@ public:
static void processRebakeAvatarTextures(LLMessageSystem* msg, void**);
protected:
/*virtual*/ void removeMissingBakedTextures();
-private:
- LLFrameTimer mBakeTimeoutTimer;
//--------------------------------------------------------------------
// Layers
@@ -351,18 +349,24 @@ public:
LLUUID mAvatarID;
LLVOAvatarDefines::ETextureIndex mIndex;
};
- void debugWearablesLoaded() { mDebugTimeWearablesLoaded = mDebugSelfLoadTimer.getElapsedTimeF32(); }
- void debugAvatarVisible() { mDebugTimeAvatarVisible = mDebugSelfLoadTimer.getElapsedTimeF32(); }
- void outputRezDiagnostics() const;
- void debugBakedTextureUpload(LLVOAvatarDefines::EBakedTextureIndex index, BOOL finished);
- static void debugOnTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+ void debugWearablesLoaded() { mDebugTimeWearablesLoaded = mDebugSelfLoadTimer.getElapsedTimeF32(); }
+ void debugAvatarVisible() { mDebugTimeAvatarVisible = mDebugSelfLoadTimer.getElapsedTimeF32(); }
+ void outputRezDiagnostics() const;
+ void debugBakedTextureUpload(LLVOAvatarDefines::EBakedTextureIndex index, BOOL finished);
+ static void debugOnTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+
+ BOOL isAllLocalTextureDataFinal() const;
+
+ const LLTexLayerSet* debugGetLayerSet(LLVOAvatarDefines::EBakedTextureIndex index) const { return mBakedTextureDatas[index].mTexLayerSet; }
+ const std::string debugDumpLocalTextureDataInfo(const LLTexLayerSet* layerset) const; // Lists out state of this particular baked texture layer
+ const std::string debugDumpAllLocalTextureDataInfo() const; // Lists out which baked textures are at highest LOD
private:
- LLFrameTimer mDebugSelfLoadTimer;
- F32 mDebugTimeWearablesLoaded;
- F32 mDebugTimeAvatarVisible;
- F32 mDebugTextureLoadTimes[LLVOAvatarDefines::TEX_NUM_INDICES][MAX_DISCARD_LEVEL+1]; // load time for each texture at each discard level
- F32 mDebugBakedTextureTimes[LLVOAvatarDefines::BAKED_NUM_INDICES][2]; // time to start upload and finish upload of each baked texture
- void debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+ LLFrameTimer mDebugSelfLoadTimer;
+ F32 mDebugTimeWearablesLoaded;
+ F32 mDebugTimeAvatarVisible;
+ F32 mDebugTextureLoadTimes[LLVOAvatarDefines::TEX_NUM_INDICES][MAX_DISCARD_LEVEL+1]; // load time for each texture at each discard level
+ F32 mDebugBakedTextureTimes[LLVOAvatarDefines::BAKED_NUM_INDICES][2]; // time to start upload and finish upload of each baked texture
+ void debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
/** Diagnostics
** **
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index fb7577c008..c35b45d446 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -41,6 +41,7 @@
#include "llinventorymodel.h"
#include "llmenugl.h" // for LLContextMenu
#include "lltransutil.h"
+#include "llviewerattachmenu.h"
class LLFindOutfitItems : public LLInventoryCollectFunctor
{
@@ -94,6 +95,47 @@ LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item)
//////////////////////////////////////////////////////////////////////////
// static
+LLPanelWearableOutfitItem* LLPanelWearableOutfitItem::create(LLViewerInventoryItem* item)
+{
+ LLPanelWearableOutfitItem* list_item = NULL;
+ if (item)
+ {
+ list_item = new LLPanelWearableOutfitItem(item);
+ list_item->init();
+ }
+ return list_item;
+}
+
+BOOL LLPanelWearableOutfitItem::handleDoubleClick(S32 x, S32 y, MASK mask)
+{
+ LLViewerInventoryItem* item = getItem();
+ if (item)
+ {
+ LLUUID id = item->getUUID();
+
+ if (get_is_item_worn(id))
+ {
+ LLAppearanceMgr::getInstance()->removeItemFromAvatar(id);
+ }
+ else
+ {
+ LLAppearanceMgr::getInstance()->wearItemOnAvatar(id, true, false);
+ }
+ }
+
+ return LLUICtrl::handleDoubleClick(x, y, mask);
+}
+
+LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item)
+: LLPanelInventoryListItemBase(item)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+// static
LLPanelClothingListItem* LLPanelClothingListItem::create(LLViewerInventoryItem* item)
{
LLPanelClothingListItem* list_item = NULL;
@@ -251,6 +293,11 @@ BOOL LLPanelDummyClothingListItem::postBuild()
return TRUE;
}
+LLWearableType::EType LLPanelDummyClothingListItem::getWearableType() const
+{
+ return mWearableType;
+}
+
LLPanelDummyClothingListItem::LLPanelDummyClothingListItem(LLWearableType::EType w_type)
: LLPanelWearableListItem(NULL)
, mWearableType(w_type)
@@ -397,6 +444,27 @@ LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p)
LLWearableItemsList::~LLWearableItemsList()
{}
+// virtual
+void LLWearableItemsList::addNewItem(LLViewerInventoryItem* item, bool rearrange /*= true*/)
+{
+ if (!item)
+ {
+ llwarns << "No inventory item. Couldn't create flat list item." << llendl;
+ llassert(item != NULL);
+ }
+
+ LLPanelWearableOutfitItem *list_item = LLPanelWearableOutfitItem::create(item);
+ if (!list_item)
+ return;
+
+ bool is_item_added = addItem(list_item, item->getUUID(), ADD_BOTTOM, rearrange);
+ if (!is_item_added)
+ {
+ llwarns << "Couldn't add flat list item." << llendl;
+ llassert(is_item_added);
+ }
+}
+
void LLWearableItemsList::updateList(const LLUUID& category_id)
{
LLInventoryModel::cat_array_t cat_array;
@@ -444,7 +512,9 @@ LLContextMenu* LLWearableItemsList::ContextMenu::createMenu()
// Register handlers common for all wearable types.
registrar.add("Wearable.Wear", boost::bind(handleMultiple, wear, ids));
registrar.add("Wearable.Edit", boost::bind(handleMultiple, LLAgentWearables::editWearable, ids));
+ registrar.add("Wearable.CreateNew", boost::bind(createNewWearable, selected_id));
registrar.add("Wearable.ShowOriginal", boost::bind(show_item_original, selected_id));
+ registrar.add("Wearable.TakeOffDetach", boost::bind(handleMultiple, take_off, ids));
// Register handlers for clothing.
registrar.add("Clothing.TakeOff", boost::bind(handleMultiple, take_off, ids));
@@ -454,12 +524,16 @@ LLContextMenu* LLWearableItemsList::ContextMenu::createMenu()
// Register handlers for attachments.
registrar.add("Attachment.Detach", boost::bind(handleMultiple, take_off, ids));
registrar.add("Attachment.Profile", boost::bind(show_item_profile, selected_id));
+ registrar.add("Object.Attach", boost::bind(LLViewerAttachMenu::attachObjects, ids, _2));
// Create the menu.
LLContextMenu* menu = createFromFile("menu_wearable_list_item.xml");
// Determine which items should be visible/enabled.
updateItemsVisibility(menu);
+
+ // Update labels for the items requiring that.
+ updateItemsLabels(menu);
return menu;
}
@@ -473,10 +547,10 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu
const uuid_vec_t& ids = mUUIDs; // selected items IDs
U32 mask = 0; // mask of selected items' types
- U32 nitems = ids.size(); // number of selected items
- U32 nworn = 0; // number of worn items among the selected ones
- U32 nwornlinks = 0; // number of worn links among the selected items
- U32 neditable = 0; // number of editable items among the selected ones
+ U32 n_items = ids.size(); // number of selected items
+ U32 n_worn = 0; // number of worn items among the selected ones
+ U32 n_links = 0; // number of links among the selected items
+ U32 n_editable = 0; // number of editable items among the selected ones
for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
{
@@ -498,38 +572,82 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu
if (is_worn)
{
- ++nworn;
-
- if (is_link)
- {
- ++nwornlinks;
- }
+ ++n_worn;
}
if (is_editable)
{
- ++neditable;
+ ++n_editable;
+ }
+ if (is_link)
+ {
+ ++n_links;
}
} // for
// *TODO: eliminate multiple traversals over the menu items
- // *TODO: try disabling items rather than hiding them
- // *FIX: we may hide *all* items and thus get an ugly empty menu
- setMenuItemVisible(menu, "wear", nworn == 0);
- setMenuItemVisible(menu, "edit", mask & (MASK_CLOTHING|MASK_BODYPART) && nitems == 1 && neditable == 1);
- setMenuItemVisible(menu, "show_original", nitems == 1 && nwornlinks == nitems);
- setMenuItemVisible(menu, "take_off", mask == MASK_CLOTHING && nworn == nitems); // selected only worn clothes
- setMenuItemVisible(menu, "detach", mask == MASK_ATTACHMENT && nworn == nitems);
- setMenuItemVisible(menu, "object_profile", mask == MASK_ATTACHMENT && nitems == 1);
+ setMenuItemVisible(menu, "wear", n_worn == 0);
+ setMenuItemVisible(menu, "edit", mask & (MASK_CLOTHING|MASK_BODYPART) && n_items == 1);
+ setMenuItemEnabled(menu, "edit", n_editable == 1 && n_worn == 1);
+ setMenuItemVisible(menu, "create_new", mask & (MASK_CLOTHING|MASK_BODYPART) && n_items == 1);
+ setMenuItemEnabled(menu, "show_original", n_items == 1 && n_links == n_items);
+ setMenuItemVisible(menu, "take_off", mask == MASK_CLOTHING && n_worn == n_items);
+ setMenuItemVisible(menu, "detach", mask == MASK_ATTACHMENT && n_worn == n_items);
+ setMenuItemVisible(menu, "take_off_or_detach", mask == (MASK_ATTACHMENT|MASK_CLOTHING));
+ setMenuItemEnabled(menu, "take_off_or_detach", n_worn == n_items);
+ setMenuItemVisible(menu, "object_profile", mask & (MASK_ATTACHMENT|MASK_CLOTHING));
+ setMenuItemEnabled(menu, "object_profile", n_items == 1);
+
+ // Populate or hide the "Attach to..." / "Attach to HUD..." submenus.
+ if (mask == MASK_ATTACHMENT && n_worn == 0)
+ {
+ LLViewerAttachMenu::populateMenus("wearable_attach_to", "wearable_attach_to_hud");
+ }
+ else
+ {
+ setMenuItemVisible(menu, "wearable_attach_to", false);
+ setMenuItemVisible(menu, "wearable_attach_to_hud", false);
+ }
+
+ if (mask & MASK_UNKNOWN)
+ {
+ llwarns << "Non-wearable items passed." << llendl;
+ }
+}
+
+void LLWearableItemsList::ContextMenu::updateItemsLabels(LLContextMenu* menu)
+{
+ llassert(menu);
+ if (!menu) return;
+
+ // Set proper label for the "Create new <WEARABLE_TYPE>" menu item.
+ LLViewerInventoryItem* item = gInventory.getLinkedItem(mUUIDs.back());
+ if (!item || !item->isWearableType()) return;
+
+ LLStringUtil::format_map_t args;
+ LLWearableType::EType w_type = item->getWearableType();
+ args["[WEARABLE_TYPE]"] = LLWearableType::getTypeDefaultNewName(w_type);
+ std::string new_label = LLTrans::getString("CreateNewWearable", args);
+
+ LLMenuItemGL* menu_item = menu->getChild<LLMenuItemGL>("create_new");
+ menu_item->setLabel(new_label);
}
// We need this method to convert non-zero BOOL values to exactly 1 (TRUE).
// Otherwise code relying on a BOOL value being TRUE may fail
// (I experienced a weird assert in LLView::drawChildren() because of that.
+// static
void LLWearableItemsList::ContextMenu::setMenuItemVisible(LLContextMenu* menu, const std::string& name, bool val)
{
menu->setItemVisible(name, val);
}
+// static
+void LLWearableItemsList::ContextMenu::setMenuItemEnabled(LLContextMenu* menu, const std::string& name, bool val)
+{
+ menu->setItemEnabled(name, val);
+}
+
+// static
void LLWearableItemsList::ContextMenu::updateMask(U32& mask, LLAssetType::EType at)
{
if (at == LLAssetType::AT_CLOTHING)
@@ -546,8 +664,17 @@ void LLWearableItemsList::ContextMenu::updateMask(U32& mask, LLAssetType::EType
}
else
{
- llwarns << "Unsupported asset type: " << at << llendl;
+ mask |= MASK_UNKNOWN;
}
}
+// static
+void LLWearableItemsList::ContextMenu::createNewWearable(const LLUUID& item_id)
+{
+ LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id);
+ if (!item || !item->isWearableType()) return;
+
+ LLAgentWearables::createWearable(item->getWearableType(), true);
+}
+
// EOF
diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h
index 7ad1b5a3ad..0ed480a92a 100644
--- a/indra/newview/llwearableitemslist.h
+++ b/indra/newview/llwearableitemslist.h
@@ -70,6 +70,29 @@ protected:
LLPanelWearableListItem(LLViewerInventoryItem* item);
};
+/**
+ * @class LLPanelWearableOutfitItem
+ *
+ * Outfit item for "My Outfits" list.
+ * Extends LLPanelInventoryListItemBase with handling
+ * double click to wear the item.
+ */
+class LLPanelWearableOutfitItem : public LLPanelInventoryListItemBase
+{
+ LOG_CLASS(LLPanelWearableOutfitItem);
+public:
+ static LLPanelWearableOutfitItem* create(LLViewerInventoryItem* item);
+
+ /**
+ * Puts item on if it is not worn by agent
+ * otherwise takes it off on double click.
+ */
+ /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+
+protected:
+
+ LLPanelWearableOutfitItem(LLViewerInventoryItem* item);
+};
class LLPanelDeletableWearableListItem : public LLPanelWearableListItem
{
@@ -162,6 +185,7 @@ public:
/*virtual*/ void updateItem();
/*virtual*/ BOOL postBuild();
+ LLWearableType::EType getWearableType() const;
protected:
LLPanelDummyClothingListItem(LLWearableType::EType w_type);
@@ -291,12 +315,16 @@ public:
MASK_CLOTHING = 0x01,
MASK_BODYPART = 0x02,
MASK_ATTACHMENT = 0x04,
+ MASK_UNKNOWN = 0x08,
};
/* virtual */ LLContextMenu* createMenu();
void updateItemsVisibility(LLContextMenu* menu);
- void setMenuItemVisible(LLContextMenu* menu, const std::string& name, bool val);
- void updateMask(U32& mask, LLAssetType::EType at);
+ void updateItemsLabels(LLContextMenu* menu);
+ static void setMenuItemVisible(LLContextMenu* menu, const std::string& name, bool val);
+ static void setMenuItemEnabled(LLContextMenu* menu, const std::string& name, bool val);
+ static void updateMask(U32& mask, LLAssetType::EType at);
+ static void createNewWearable(const LLUUID& item_id);
};
struct Params : public LLInitParam::Block<Params, LLInventoryItemsList::Params>
@@ -308,6 +336,8 @@ public:
virtual ~LLWearableItemsList();
+ /*virtual*/ void addNewItem(LLViewerInventoryItem* item, bool rearrange = true);
+
void updateList(const LLUUID& category_id);
protected:
diff --git a/indra/newview/llwearabletype.cpp b/indra/newview/llwearabletype.cpp
index c692df06ad..2a14ace38c 100644
--- a/indra/newview/llwearabletype.cpp
+++ b/indra/newview/llwearabletype.cpp
@@ -85,7 +85,7 @@ LLWearableDictionary::LLWearableDictionary()
addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_TATTOO));
addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE));
addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE));
- addEntry(LLWearableType::WT_COUNT, NULL);
+ addEntry(LLWearableType::WT_COUNT, new WearableEntry("count", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE));
}
// static
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index bc7f8ec854..a8ac0c0c90 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -248,7 +248,8 @@ int LLXMLRPCTransaction::Impl::_sslCertVerifyCallback(X509_STORE_CTX *ctx, void
validation_params[CERT_HOSTNAME] = uri.hostName();
try
{
- chain->validate(VALIDATION_POLICY_SSL, store, validation_params);
+ // don't validate hostname. Let libcurl do it instead. That way, it'll handle redirects
+ store->validate(VALIDATION_POLICY_SSL & (~VALIDATION_POLICY_HOSTNAME), chain, validation_params);
}
catch (LLCertValidationTrustException& cert_exception)
{
@@ -512,7 +513,6 @@ void LLXMLRPCTransaction::Impl::setStatus(EStatus status,
// Usually this means that there's a problem with the login server,
// not with the client. Direct user to status page.
mStatusMessage = LLTrans::getString("server_is_down");
-
mStatusURI = "http://secondlife.com/status/";
}
}
@@ -547,7 +547,7 @@ void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code)
"Often this means that your computer\'s clock is set incorrectly.\n"
"Please go to Control Panels and make sure the time and date\n"
"are set correctly.\n"
- "\n"
+ "Also check that your network and firewall are set up correctly.\n"
"If you continue to receive this error, please go\n"
"to the Support section of the SecondLife.com web site\n"
"and report the problem.";
diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Flash.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Flash.png
new file mode 100644
index 0000000000..9f1e2a469d
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Toolbar_Left_Flash.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Flash.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Flash.png
new file mode 100644
index 0000000000..dd73d655e9
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Flash.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Flash.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Flash.png
new file mode 100644
index 0000000000..f6b775c2a0
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Toolbar_Right_Flash.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Generic_Group_Large.png b/indra/newview/skins/default/textures/icons/Generic_Group_Large.png
index c067646c65..de8a39fc8a 100644
--- a/indra/newview/skins/default/textures/icons/Generic_Group_Large.png
+++ b/indra/newview/skins/default/textures/icons/Generic_Group_Large.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_LostClosed.png b/indra/newview/skins/default/textures/icons/Inv_LostClosed.png
new file mode 100644
index 0000000000..a800217e0d
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_LostClosed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_LostOpen.png b/indra/newview/skins/default/textures/icons/Inv_LostOpen.png
new file mode 100644
index 0000000000..8c4a1a9ac0
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_LostOpen.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_SysClosed.png b/indra/newview/skins/default/textures/icons/Inv_SysClosed.png
new file mode 100644
index 0000000000..dcf998449f
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_SysClosed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_SysOpen.png b/indra/newview/skins/default/textures/icons/Inv_SysOpen.png
new file mode 100644
index 0000000000..0efd403c95
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_SysOpen.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_TrashClosed.png b/indra/newview/skins/default/textures/icons/Inv_TrashClosed.png
new file mode 100644
index 0000000000..c5201e6f9a
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_TrashClosed.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_TrashOpen.png b/indra/newview/skins/default/textures/icons/Inv_TrashOpen.png
new file mode 100644
index 0000000000..4a886a3f37
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_TrashOpen.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/back_arrow_off.png b/indra/newview/skins/default/textures/icons/back_arrow_off.png
new file mode 100644
index 0000000000..422f67cf83
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/back_arrow_off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/back_arrow_over.png b/indra/newview/skins/default/textures/icons/back_arrow_over.png
new file mode 100644
index 0000000000..b4cc170f37
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/back_arrow_over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/back_arrow_press.png b/indra/newview/skins/default/textures/icons/back_arrow_press.png
new file mode 100644
index 0000000000..a9e2f326a7
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/back_arrow_press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/locked_image.j2c b/indra/newview/skins/default/textures/locked_image.j2c
new file mode 100644
index 0000000000..9e8998d675
--- /dev/null
+++ b/indra/newview/skins/default/textures/locked_image.j2c
Binary files differ
diff --git a/indra/newview/skins/default/textures/map_infohub.tga b/indra/newview/skins/default/textures/map_infohub.tga
new file mode 100644
index 0000000000..545b8e532c
--- /dev/null
+++ b/indra/newview/skins/default/textures/map_infohub.tga
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 29c72a414b..93c805f724 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -68,6 +68,10 @@ with the same filename but different name
<texture name="BackArrow_Off" file_name="icons/BackArrow_Off.png" preload="false" />
+ <texture name="BackButton_Off" file_name="icons/back_arrow_off.png" preload="false" />
+ <texture name="BackButton_Over" file_name="icons/back_arrow_over.png" preload="false" />
+ <texture name="BackButton_Press" file_name="icons/back_arrow_press.png" preload="false" />
+
<texture name="Blank" file_name="Blank.png" preload="false" />
@@ -144,8 +148,6 @@ with the same filename but different name
<texture name="Generic_Person" file_name="icons/Generic_Person.png" preload="false" />
<texture name="Generic_Person_Large" file_name="icons/Generic_Person_Large.png" preload="false" />
- <texture name="Health" file_name="icons/Health.png" preload="false" />
-
<texture name="Help_Press" file_name="navbar/Help_Press.png" preload="false" />
<texture name="Hierarchy_View_Disabled" file_name="icons/Hierarchy_View_Disabled.png" preload="false" />
@@ -203,6 +205,8 @@ with the same filename but different name
<texture name="Inv_Jacket" file_name="icons/Inv_Jacket.png" preload="false" />
<texture name="Inv_LookFolderOpen" file_name="icons/Inv_LookFolderOpen.png" preload="false" />
<texture name="Inv_LookFolderClosed" file_name="icons/Inv_LookFolderClosed.png" preload="false" />
+ <texture name="Inv_LostClosed" file_name="icons/Inv_LostClosed.png" preload="false" />
+ <texture name="Inv_LostOpen" file_name="icons/Inv_LostOpen.png" preload="false" />
<texture name="Inv_Landmark" file_name="icons/Inv_Landmark.png" preload="false" />
<texture name="Inv_Notecard" file_name="icons/Inv_Notecard.png" preload="false" />
<texture name="Inv_Object" file_name="icons/Inv_Object.png" preload="false" />
@@ -216,8 +220,12 @@ with the same filename but different name
<texture name="Inv_Snapshot" file_name="icons/Inv_Snapshot.png" preload="false" />
<texture name="Inv_Socks" file_name="icons/Inv_Socks.png" preload="false" />
<texture name="Inv_Sound" file_name="icons/Inv_Sound.png" preload="false" />
+ <texture name="Inv_SysClosed" file_name="icons/Inv_SysClosed.png" preload="false" />
+ <texture name="Inv_SysOpen" file_name="icons/Inv_SysOpen.png" preload="false" />
<texture name="Inv_Tattoo" file_name="icons/Inv_Tattoo.png" preload="false" />
<texture name="Inv_Texture" file_name="icons/Inv_Texture.png" preload="false" />
+ <texture name="Inv_TrashClosed" file_name="icons/Inv_TrashClosed.png" preload="false" />
+ <texture name="Inv_TrashOpen" file_name="icons/Inv_TrashOpen.png" preload="false" />
<texture name="Inv_Underpants" file_name="icons/Inv_Underpants.png" preload="false" />
<texture name="Inv_Undershirt" file_name="icons/Inv_Undershirt.png" preload="false" />
@@ -232,7 +240,6 @@ with the same filename but different name
<texture name="Inv_Gesture_Link" file_name="icons/Inv_Gesture_Link.png" preload="false" />
<texture name="Inv_Gloves_Link" file_name="icons/Inv_Gloves_Link.png" preload="false" />
<texture name="Inv_Hair_Link" file_name="icons/Inv_Hair_Link.png" preload="false" />
- <texture name="Inv_LinkItem_Link" file_name="icons/Inv_LinkItem_Link.png" preload="false" />
<texture name="Inv_LinkFolder_Link" file_name="icons/Inv_LinkFolder_Link.png" preload="false" />
<texture name="Inv_Jacket_Link" file_name="icons/Inv_Jacket_Link.png" preload="false" />
<texture name="Inv_LookFolderOpen_Link" file_name="icons/Inv_LookFolderOpen_Link.png" preload="false" />
@@ -527,15 +534,18 @@ with the same filename but different name
<texture name="Tool_Grab" file_name="build/Tool_Grab.png" preload="false" />
<texture name="Tool_Zoom" file_name="build/Tool_Zoom.png" preload="false" />
+ <texture name="Toolbar_Left_Flash" file_name="containers/Toolbar_Left_Flash.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" />
<texture name="Toolbar_Left_Off" file_name="containers/Toolbar_Left_Off.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" />
<texture name="Toolbar_Left_Over" file_name="containers/Toolbar_Left_Over.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" />
<texture name="Toolbar_Left_Selected" file_name="containers/Toolbar_Left_Selected.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" />
<texture name="Toolbar_Middle_Off" file_name="containers/Toolbar_Middle_Off.png" preload="false" scale.left="1" scale.bottom="2" scale.top="24" scale.right="30" />
<texture name="Toolbar_Middle_Over" file_name="containers/Toolbar_Middle_Over.png" preload="false" scale.left="1" scale.bottom="2" scale.top="24" scale.right="30" />
<texture name="Toolbar_Middle_Selected" file_name="containers/Toolbar_Middle_Selected.png" preload="false" scale.left="1" scale.bottom="2" scale.top="24" scale.right="30" />
+ <texture name="Toolbar_Middle_Flash" file_name="containers/Toolbar_Middle_Flash.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" />
<texture name="Toolbar_Right_Off" file_name="containers/Toolbar_Right_Off.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" />
<texture name="Toolbar_Right_Over" file_name="containers/Toolbar_Right_Over.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" />
<texture name="Toolbar_Right_Selected" file_name="containers/Toolbar_Right_Selected.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" />
+ <texture name="Toolbar_Right_Flash" file_name="containers/Toolbar_Right_Flash.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" />
<texture name="Tooltip" file_name="widgets/Tooltip.png" preload="true" scale.left="2" scale.top="16" scale.right="100" scale.bottom="3" />
@@ -620,7 +630,7 @@ with the same filename but different name
<texture name="icon_avatar_online.tga" />
<texture name="icon_day_cycle.tga" />
<texture name="icon_diurnal.tga" />
- <texture name="icon_for_sale.tga" />
+ <texture name="icon_for_sale.tga" file_name="icons/Icon_For_Sale.png" />
<texture name="icon_top_pick.tga" />
<texture name="lag_status_critical.tga" />
diff --git a/indra/newview/skins/default/xui/da/floater_world_map.xml b/indra/newview/skins/default/xui/da/floater_world_map.xml
index 898d291f1c..4dec9a9ba7 100644
--- a/indra/newview/skins/default/xui/da/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/da/floater_world_map.xml
@@ -35,7 +35,7 @@
<text name="pg_label">
Generelt
</text>
- <check_box initial_value="sandt" name="event_mature_chk"/>
+ <check_box name="event_mature_chk"/>
<text name="mature_label">
Moderat
</text>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_setup.xml b/indra/newview/skins/default/xui/da/panel_preferences_setup.xml
index 8202c78947..38bc9c0a2a 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_setup.xml
@@ -37,10 +37,10 @@
<radio_item label="Benyt min browser(IE, Firefox, Safari)" name="external" tool_tip="Brug systemets standard web browser til hjælp, web links, m.v. Ikke anbefalet hvis du kører i fuld-skærm." value="1"/>
<radio_item label="Benyt den indbyggede browser" name="internal" tool_tip="Brug den indbyggede web browser til hjælp, web links m.v. Denne browser åbner et nyt vindue i [APP_NAME]." value=""/>
</radio_group>
- <check_box initial_value="sand" label="Aktivér plugins" name="browser_plugins_enabled"/>
- <check_box initial_value="sand" label="Acceptér cookies" name="cookies_enabled"/>
- <check_box initial_value="sand" label="Aktivér Javascript" name="browser_javascript_enabled"/>
- <check_box initial_value="false" label="Aktivér web proxy" name="web_proxy_enabled"/>
+ <check_box label="Aktivér plugins" name="browser_plugins_enabled"/>
+ <check_box label="Acceptér cookies" name="cookies_enabled"/>
+ <check_box label="Aktivér Javascript" name="browser_javascript_enabled"/>
+ <check_box label="Aktivér web proxy" name="web_proxy_enabled"/>
<text name="Proxy location">
Proxy placering:
</text>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml
index 856f978ebd..a1b47c3c1f 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml
@@ -11,8 +11,8 @@
<check_box label="Aktiveret" name="enable_media"/>
<slider label="Stemme chat" name="Voice Volume"/>
<check_box label="Aktiveret" name="enable_voice_check"/>
- <check_box label="Tillad media at afspilles automatisk" name="media_auto_play_btn" tool_tip="Vælg dette for at media afspille automatisk hvis det ønsker det" value="sandt"/>
- <check_box label="Afspil media vedhæftet andre avatarer" name="media_show_on_others_btn" tool_tip="Deaktiver dette for at skjule vedhæftet media for avatarer i nærheden" value="sandt"/>
+ <check_box label="Tillad media at afspilles automatisk" name="media_auto_play_btn" tool_tip="Vælg dette for at media afspille automatisk hvis det ønsker det" />
+ <check_box label="Afspil media vedhæftet andre avatarer" name="media_show_on_others_btn" tool_tip="Deaktiver dette for at skjule vedhæftet media for avatarer i nærheden" />
<text name="voice_chat_settings">
Stemme chat opsætning
</text>
diff --git a/indra/newview/skins/default/xui/de/floater_world_map.xml b/indra/newview/skins/default/xui/de/floater_world_map.xml
index a1f41f53ad..fb3a4ba9b5 100644
--- a/indra/newview/skins/default/xui/de/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/de/floater_world_map.xml
@@ -39,7 +39,7 @@
<text name="pg_label">
Generell
</text>
- <check_box initial_value="wahr" label="Mature" name="event_mature_chk"/>
+ <check_box label="Mature" name="event_mature_chk"/>
<text name="mature_label">
Moderat
</text>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml
index 96a86ed85d..44b2bd1f60 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml
@@ -11,8 +11,8 @@
<check_box label="Aktiviert" name="enable_media"/>
<slider label="Voice-Chat" name="Voice Volume"/>
<check_box label="Aktiviert" name="enable_voice_check"/>
- <check_box label="Automatische Wiedergabe zulassen" name="media_auto_play_btn" tool_tip="Hier aktivieren, um Medien automatisch wiederzugeben." value="wahr"/>
- <check_box label="Medien, die an andere Avatare angehängt sind, wiedergeben." name="media_show_on_others_btn" tool_tip="Diese Option deaktivieren, um Medien für andere Avataren, die sich in der Nähe befinden, auszublenden." value="wahr"/>
+ <check_box label="Automatische Wiedergabe zulassen" name="media_auto_play_btn" tool_tip="Hier aktivieren, um Medien automatisch wiederzugeben."/>
+ <check_box label="Medien, die an andere Avatare angehängt sind, wiedergeben." name="media_show_on_others_btn" tool_tip="Diese Option deaktivieren, um Medien für andere Avataren, die sich in der Nähe befinden, auszublenden."/>
<text name="voice_chat_settings">
Voice-Chat-Einstellungen
</text>
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 5f28fa6495..54ef6d65a7 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -756,7 +756,7 @@ Leyla Linden </text>
mouse_opaque="false"
name="resellable_clause"
word_wrap="true"
- width="330">
+ width="360">
Land in this region may not be resold.
</text>
<text
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index ced8c29199..e123de46c2 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -27,7 +27,14 @@
halign="left"
use_ellipses="true"
top="0"
- width="394" />
+ width="394">
+ <first_tab
+ tab_bottom_image_flash="Toolbar_Left_Flash"/>
+ <middle_tab
+ tab_bottom_image_flash="Toolbar_Middle_Flash"/>
+ <last_tab
+ tab_bottom_image_flash="Toolbar_Right_Flash"/>
+ </tab_container>
<icon
color="DefaultShadowLight"
enabled="false"
diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml
index 249b091800..a0e28f7a42 100644
--- a/indra/newview/skins/default/xui/en/floater_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_map.xml
@@ -5,7 +5,7 @@
can_minimize="true"
can_resize="true"
follows="top|right"
- height="218"
+ height="174"
layout="topleft"
min_height="174"
min_width="174"
diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml
index 9ca18d455b..49b3b58113 100644
--- a/indra/newview/skins/default/xui/en/floater_search.xml
+++ b/indra/newview/skins/default/xui/en/floater_search.xml
@@ -9,6 +9,7 @@
name="floater_search"
help_topic="floater_search"
save_rect="true"
+ save_visibility="true"
single_instance="true"
title="FIND"
width="650">
diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml
index 7dcf2aab99..f3d297c303 100644
--- a/indra/newview/skins/default/xui/en/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml
@@ -62,6 +62,7 @@
name="share_to_web"
top_delta="0"
left="10"
+ visible="false"
width="130"/>
<button
label="Save to My Inventory"
diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml
index b2e4a7ad95..d8410a26dd 100644
--- a/indra/newview/skins/default/xui/en/main_view.xml
+++ b/indra/newview/skins/default/xui/en/main_view.xml
@@ -64,8 +64,7 @@
left="0"
mouse_opaque="false"
name="world_stack"
- orientation="vertical"
- tab_stop="false">
+ orientation="vertical">
<panel auto_resize="true"
follows="all"
height="500"
@@ -156,13 +155,6 @@
top="0"
width="1024"
height="768"/>
- <notify_box_view top="0"
- follows="all"
- height="768"
- mouse_opaque="false"
- name="notify_container"
- tab_group="-2"
- width="1024"/>
<panel top="0"
follows="all"
mouse_opaque="false"
diff --git a/indra/newview/skins/default/xui/en/menu_bottomtray.xml b/indra/newview/skins/default/xui/en/menu_bottomtray.xml
index ccd5388621..5beafef4e4 100644
--- a/indra/newview/skins/default/xui/en/menu_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/menu_bottomtray.xml
@@ -53,17 +53,6 @@
parameter="ShowSnapshotButton" />
</menu_item_check>
<menu_item_check
- label="Sidebar button"
- layout="topleft"
- name="ShowSidebarButton">
- <menu_item_check.on_click
- function="ToggleControl"
- parameter="ShowSidebarButton" />
- <menu_item_check.on_check
- function="CheckControl"
- parameter="ShowSidebarButton" />
- </menu_item_check>
- <menu_item_check
label="Build button"
layout="topleft"
name="ShowBuildButton">
diff --git a/indra/newview/skins/default/xui/en/menu_cof_attachment.xml b/indra/newview/skins/default/xui/en/menu_cof_attachment.xml
index b422d87938..c402100fb1 100644
--- a/indra/newview/skins/default/xui/en/menu_cof_attachment.xml
+++ b/indra/newview/skins/default/xui/en/menu_cof_attachment.xml
@@ -10,12 +10,4 @@
function="Attachment.Detach"
parameter="detach"/>
</menu_item_call>
- <context_menu
- label="Attach to"
- layout="topleft"
- name="attach_to" />
- <context_menu
- label="Attach to HUD"
- layout="topleft"
- name="attach_to_hud" />
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_cof_body_part.xml b/indra/newview/skins/default/xui/en/menu_cof_body_part.xml
index 01008ef203..f0e8461360 100644
--- a/indra/newview/skins/default/xui/en/menu_cof_body_part.xml
+++ b/indra/newview/skins/default/xui/en/menu_cof_body_part.xml
@@ -19,4 +19,15 @@
function="BodyPart.OnEnable"
parameter="edit" />
</menu_item_call>
+ <menu_item_call
+ label="Create New"
+ layout="topleft"
+ name="create_new"
+ translate="false">
+ <on_click
+ function="BodyPart.Create"/>
+ <on_enable
+ function="BodyPart.OnEnable"
+ parameter="create" />
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_cof_clothing.xml b/indra/newview/skins/default/xui/en/menu_cof_clothing.xml
index f9cb29f0d7..12ee9b045b 100644
--- a/indra/newview/skins/default/xui/en/menu_cof_clothing.xml
+++ b/indra/newview/skins/default/xui/en/menu_cof_clothing.xml
@@ -8,6 +8,9 @@
name="take_off">
<on_click
function="Clothing.TakeOff" />
+ <on_enable
+ function="Clothing.OnEnable"
+ parameter="take_off" />
</menu_item_call>
<menu_item_call
label="Move Up a Layer"
@@ -39,4 +42,15 @@
function="Clothing.OnEnable"
parameter="edit" />
</menu_item_call>
+ <menu_item_call
+ label="Create New"
+ layout="topleft"
+ name="create_new"
+ translate="false">
+ <on_click
+ function="Clothing.Create"/>
+ <on_enable
+ function="Clothing.OnEnable"
+ parameter="create" />
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_cof_gear.xml b/indra/newview/skins/default/xui/en/menu_cof_gear.xml
index 982d4f2015..c2a11a64ec 100644
--- a/indra/newview/skins/default/xui/en/menu_cof_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_cof_gear.xml
@@ -2,15 +2,12 @@
<menu
layout="topleft"
name="Gear COF">
- <menu_item_call
- label="Add To Outfit"
+ <menu
+ label="New Clothes"
layout="topleft"
- name="add">
- <on_click
- function="Gear.OnClick"
- parameter="add"/>
- <on_enable
- function="Gear.OnEnable"
- parameter="add" />
- </menu_item_call>
+ name="COF.Gear.New_Clothes" />
+ <menu
+ label="New Body Parts"
+ layout="topleft"
+ name="COF.Geear.New_Body_Parts" />
</menu>
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
index dfc72b557c..b5eda8e999 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
@@ -7,31 +7,174 @@
layout="topleft"
name="wear">
<on_click
- function="Gear.OnClick"
- parameter="wear"/>
+ function="Gear.Wear" />
<on_enable
function="Gear.OnEnable"
parameter="wear" />
</menu_item_call>
<menu_item_call
- label="Take Off - Remove Current Outfit"
+ label="Take Off - Remove from Current Outfit"
layout="topleft"
name="take_off">
<on_click
- function="Gear.OnClick"
- parameter="take_off"/>
+ function="Gear.TakeOff" />
<on_enable
function="Gear.OnEnable"
parameter="take_off" />
</menu_item_call>
+
+ <menu_item_separator />
+ <!-- copied (with minor modifications) from menu_inventory_add.xml -->
+ <!-- *TODO: generate dynamically? -->
+ <menu
+ height="175"
+ label="New Clothes"
+ layout="topleft"
+ left_delta="0"
+ mouse_opaque="false"
+ name="New Clothes"
+ top_pad="514"
+ width="125">
+ <menu_item_call
+ label="New Shirt"
+ layout="topleft"
+ name="New Shirt">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="shirt" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Pants"
+ layout="topleft"
+ name="New Pants">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="pants" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Shoes"
+ layout="topleft"
+ name="New Shoes">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="shoes" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Socks"
+ layout="topleft"
+ name="New Socks">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="socks" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Jacket"
+ layout="topleft"
+ name="New Jacket">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="jacket" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Skirt"
+ layout="topleft"
+ name="New Skirt">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="skirt" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Gloves"
+ layout="topleft"
+ name="New Gloves">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="gloves" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Undershirt"
+ layout="topleft"
+ name="New Undershirt">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="undershirt" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Underpants"
+ layout="topleft"
+ name="New Underpants">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="underpants" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Alpha"
+ layout="topleft"
+ name="New Alpha">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="alpha" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Tattoo"
+ layout="topleft"
+ name="New Tattoo">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="tattoo" />
+ </menu_item_call>
+ </menu>
+ <menu
+ height="85"
+ label="New Body Parts"
+ layout="topleft"
+ left_delta="0"
+ mouse_opaque="false"
+ name="New Body Parts"
+ top_pad="514"
+ width="118">
+ <menu_item_call
+ label="New Shape"
+ layout="topleft"
+ name="New Shape">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="shape" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Skin"
+ layout="topleft"
+ name="New Skin">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="skin" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Hair"
+ layout="topleft"
+ name="New Hair">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="hair" />
+ </menu_item_call>
+ <menu_item_call
+ label="New Eyes"
+ layout="topleft"
+ name="New Eyes">
+ <menu_item_call.on_click
+ function="Gear.Create"
+ parameter="eyes" />
+ </menu_item_call>
+ </menu>
+ <!-- copied from menu_inventory_add.xml -->
+
<menu_item_separator />
<menu_item_call
label="Rename"
layout="topleft"
name="rename">
<on_click
- function="Gear.OnClick"
- parameter="rename"/>
+ function="Gear.Rename" />
<on_enable
function="Gear.OnEnable"
parameter="rename" />
@@ -41,10 +184,9 @@
layout="topleft"
name="delete_outfit">
<on_click
- function="Gear.OnClick"
- parameter="delete_outfit"/>
+ function="Gear.Delete" />
<on_enable
function="Gear.OnEnable"
- parameter="delete_outfit" />
+ parameter="delete" />
</menu_item_call>
</menu>
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
index 8f3e62157a..67559638d9 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
@@ -8,6 +8,9 @@
name="wear_replace">
<on_click
function="Outfit.WearReplace" />
+ <on_enable
+ function="Outfit.OnEnable"
+ parameter="wear_replace" />
</menu_item_call>
<menu_item_call
label="Wear - Add to Current Outfit"
@@ -15,13 +18,29 @@
name="wear_add">
<on_click
function="Outfit.WearAdd" />
+ <on_enable
+ function="Outfit.OnEnable"
+ parameter="wear_add" />
</menu_item_call>
<menu_item_call
- label="Take Off - Remove Current Outfit"
+ label="Take Off - Remove from Current Outfit"
layout="topleft"
name="take_off">
<on_click
function="Outfit.TakeOff" />
+ <on_enable
+ function="Outfit.OnEnable"
+ parameter="take_off" />
+ </menu_item_call>
+ <menu_item_call
+ label="Edit Outfit"
+ layout="topleft"
+ name="edit">
+ <on_click
+ function="Outfit.Edit" />
+ <on_enable
+ function="Outfit.OnEnable"
+ parameter="edit" />
</menu_item_call>
<menu_item_separator />
<menu_item_call
@@ -30,6 +49,9 @@
name="rename">
<on_click
function="Outfit.Rename" />
+ <on_enable
+ function="Outfit.OnEnable"
+ parameter="rename" />
</menu_item_call>
<menu_item_call
label="Delete Outfit"
@@ -37,5 +59,8 @@
name="delete">
<on_click
function="Outfit.Delete" />
+ <on_enable
+ function="Outfit.OnEnable"
+ parameter="delete" />
</menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_save_outfit.xml b/indra/newview/skins/default/xui/en/menu_save_outfit.xml
index a8778df7f6..6285bf7417 100644
--- a/indra/newview/skins/default/xui/en/menu_save_outfit.xml
+++ b/indra/newview/skins/default/xui/en/menu_save_outfit.xml
@@ -14,9 +14,9 @@
</menu_item_call>
<menu_item_call
name="save_as_new_outfit"
- label="Save As New">
+ label="Save As">
<menu_item_call.on_click
- function="Outfit.SaveAsNew.Action"
+ function="Outfit.SaveAs.Action"
userdata="" />
</menu_item_call>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
index 7ea7eaade5..e645702f93 100644
--- a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
+++ b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
@@ -9,22 +9,27 @@
function="Wearable.Wear" />
</menu_item_call>
<menu_item_call
+ label="Take Off / Detach"
+ layout="topleft"
+ name="take_off_or_detach">
+ <on_click
+ function="Wearable.TakeOffDetach" />
+ </menu_item_call>
+ <menu_item_call
label="Detach"
layout="topleft"
name="detach">
<on_click
function="Attachment.Detach" />
</menu_item_call>
-<!-- *TODO: implement the submenus
- <menu
- label="Attach to"
+ <context_menu
+ label="Attach to ▶"
layout="topleft"
- name="attach_to" />
- <menu
- label="Attach to HUD"
+ name="wearable_attach_to" />
+ <context_menu
+ label="Attach to HUD ▶"
layout="topleft"
- name="attach_to_hud" />
--->
+ name="wearable_attach_to_hud" />
<menu_item_call
label="Object Profile"
layout="topleft"
@@ -37,16 +42,14 @@
layout="topleft"
name="take_off">
<on_click
- function="Clothing.TakeOff"
- parameter="take_off"/>
+ function="Clothing.TakeOff" />
</menu_item_call>
<menu_item_call
label="Edit"
layout="topleft"
name="edit">
<on_click
- function="Wearable.Edit"
- parameter="edit"/>
+ function="Wearable.Edit" />
</menu_item_call>
<menu_item_call
label="Show Original"
@@ -55,4 +58,12 @@
<on_click
function="Wearable.ShowOriginal" />
</menu_item_call>
+ <menu_item_call
+ label="Create New"
+ layout="topleft"
+ name="create_new"
+ translate="false">
+ <on_click
+ function="Wearable.CreateNew" />
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 0bf71844bf..5ead756d20 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -1090,7 +1090,9 @@ The region [REGION] does not allow terraforming.
icon="alertmodal.tga"
name="CannotCopyWarning"
type="alertmodal">
-You do not have permission to copy this item and will lose it from your inventory if you give it away. Do you really want to offer this item?
+You do not have permission to copy the following items:
+[ITEMS]
+and will lose it from your inventory if you give it away. Do you really want to offer these items?
<usetemplate
name="okcancelbuttons"
notext="No"
@@ -2068,6 +2070,28 @@ Would you be my friend?
<notification
icon="alertmodal.tga"
+ label="Rename Outfit"
+ name="RenameOutfit"
+ type="alertmodal">
+ New outfit name:
+ <form name="form">
+ <input name="new_name" type="text">
+ [NAME]
+ </input>
+ <button
+ default="true"
+ index="0"
+ name="Offer"
+ text="OK"/>
+ <button
+ index="1"
+ name="Cancel"
+ text="Cancel"/>
+ </form>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="RemoveFromFriends"
type="alertmodal">
Do you want to remove [FIRST_NAME] [LAST_NAME] from your Friends List?
@@ -6120,6 +6144,28 @@ Drag items from inventory onto a person in the resident picker
</notification>
<notification
icon="notifytip.tga"
+ name="ShareItemsConfirmation"
+ type="alertmodal">
+Are you sure you want to share the following items:
+
+[ITEMS]
+
+With the following Residents:
+
+[RESIDENTS]
+ <usetemplate
+ name="okcancelbuttons"
+ notext="Cancel"
+ yestext="Ok"/>
+ </notification>
+ <notification
+ icon="notifytip.tga"
+ name="ItemsShared"
+ type="notifytip">
+Items are successfully shared.
+ </notification>
+ <notification
+ icon="notifytip.tga"
name="DeedToGroupFail"
type="notifytip">
Deed to group failed.
@@ -6130,15 +6176,24 @@ Deed to group failed.
name="AvatarRezNotification"
type="notifytip">
( [EXISTENCE] seconds alive )
-Avatar '[NAME]' declouded in [TIME] seconds.
+Avatar '[NAME]' declouded after [TIME] seconds.
</notification>
<notification
icon="notifytip.tga"
- name="AvatarRezSelfNotification"
+ name="AvatarRezSelfBakedDoneNotification"
type="notifytip">
( [EXISTENCE] seconds alive )
-You finished baking your outfit in [TIME] seconds.
+You finished baking your outfit after [TIME] seconds.
+ </notification>
+
+ <notification
+ icon="notifytip.tga"
+ name="AvatarRezSelfBakedUpdateNotification"
+ type="notifytip">
+( [EXISTENCE] seconds alive )
+You sent out an update of your appearance after [TIME] seconds.
+[STATUS]
</notification>
@@ -6182,6 +6237,37 @@ Avatar '[NAME]' entered appearance mode.
Avatar '[NAME]' left appearance mode.
</notification>
+ <notification
+ icon="alertmodal.tga"
+ name="NoConnect"
+ type="alertmodal">
+ We're having trouble connecting using [PROTOCOL] [HOSTID].
+ Please check your network and firewall setup.
+ <form name="form">
+ <button
+ default="true"
+ index="0"
+ name="OK"
+ text="OK"/>
+ </form>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="NoVoiceConnect"
+ type="alertmodal">
+ We're having trouble connecting your voiceserver using [HOSTID].
+ Voice communications will not be available.
+ Please check your network and firewall setup.
+ <form name="form">
+ <button
+ default="true"
+ index="0"
+ name="OK"
+ text="OK"/>
+ </form>
+ </notification>
+
<notification
icon="notifytip.tga"
name="AvatarRezLeftNotification"
@@ -6191,6 +6277,14 @@ Avatar '[NAME]' left as fully loaded.
</notification>
<notification
+ icon="notifytip.tga"
+ name="AvatarRezSelfBakeNotification"
+ type="notifytip">
+( [EXISTENCE] seconds alive )
+You uploaded a [RESOLUTION] baked texture for '[BODYREGION]' after [TIME] seconds.
+ </notification>
+
+ <notification
icon="alertmodal.tga"
name="ConfirmLeaveCall"
type="alert">
@@ -6215,8 +6309,8 @@ Mute everyone?
<usetemplate
ignoretext="Confirm before I mute all participants in a group call"
name="okcancelignore"
- notext="Ok"
- yestext="Cancel"/>
+ yestext="Ok"
+ notext="Cancel"/>
<unique/>
</notification>
diff --git a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
index 066992b25d..44437d01eb 100644
--- a/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
+++ b/indra/newview/skins/default/xui/en/outfit_accordion_tab.xml
@@ -8,6 +8,7 @@
height="45"
layout="topleft"
name="Mockup Tab"
+ selection_enabled="true"
title="Mockup Tab"
translate="false"
width="0">
@@ -18,5 +19,6 @@
multi_select="true"
name="wearable_items_list"
translate="false"
+ use_internal_context_menu="false"
/>
</accordion_tab>
diff --git a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
index d3f6695375..1e6a31d388 100644
--- a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
@@ -11,14 +11,16 @@
width="280">
<button
follows="top|left"
- height="25"
- image_overlay="BackArrow_Off"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
layout="topleft"
name="back"
- left="10"
+ left="4"
tab_stop="false"
- top="0"
- width="25"/>
+ top="1"
+ width="30"/>
<text
follows="top|left|right"
font="SansSerifLargeBold"
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index ac61c7da5d..82b2405ec9 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -222,38 +222,6 @@
min_height="28"
min_width="52"
mouse_opaque="false"
- name="sidebar_btn_panel"
- user_resize="false"
- width="83">
-<!--*TODO: Implement toggle of sidebar with buttons
-Disabled for now.
--->
- <button
- control_name="SidebarWithButtonsVisibility"
- follows="left|right"
- height="23"
- image_pressed="PushButton_Press"
- image_pressed_selected="PushButton_Selected_Press"
- image_selected="PushButton_Selected_Press"
- is_toggle="true"
- label="Sidebar"
- layout="topleft"
- left="0"
- name="sidebar_btn"
- tool_tip="Shows/hides Sidebar"
- top="5"
- use_ellipses="true"
- width="80">
- </button>
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="left|right"
- height="28"
- layout="topleft"
- min_height="28"
- min_width="52"
- mouse_opaque="false"
name="build_btn_panel"
user_resize="false"
width="83">
diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml
index e3b331799c..859cc82e81 100644
--- a/indra/newview/skins/default/xui/en/panel_classified_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml
@@ -40,15 +40,17 @@
</panel.string>
<button
follows="top|right"
- height="23"
- image_overlay="BackArrow_Off"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
layout="topleft"
name="back_btn"
picture_style="true"
- left="11"
+ left="9"
tab_stop="false"
top="2"
- width="23" />
+ width="30" />
<text
follows="top|left|right"
font="SansSerifHugeBold"
diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
index cf84c31078..5f34c24bca 100644
--- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
+++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml
@@ -9,6 +9,7 @@
name="cof_wearables"
width="311">
<accordion
+ fit_parent="true"
follows="all"
height="200"
layout="topleft"
@@ -38,73 +39,31 @@
layout="topleft"
name="tab_clothing"
title="Clothing">
-
- <!-- *NOTE there should be no any gaps between the button bar and the list -
- accordiong-list adaptor won't employ them while calculating new height when the size of the list changes -->
- <panel
- background_visible="false"
- class="accordion_list_adaptor"
+ <flat_list_view
+ allow_select="true"
follows="all"
- height="45"
+ height="10"
layout="topleft"
left="0"
- name="button_bar_adaptor"
+ multi_select="true"
+ name="list_clothing"
top="0"
- width="311">
- <panel
- bevel="none"
- filename="panel_clothing_list_button_bar.xml"
- height="35"
- name="button_bar"
- top="0"
- width="311" />
- <flat_list_view
- allow_select="true"
- follows="all"
- height="10"
- layout="topleft"
- left="0"
- multi_select="true"
- name="list_clothing"
- top_pad="0"
- width="311" />
- </panel>
+ width="311" />
</accordion_tab>
<accordion_tab
layout="topleft"
name="tab_body_parts"
title="Body Parts">
-
- <!-- *NOTE there should be no any gaps between the button bar and the list -
- accordiong-list adaptor won't employ them while calculating new height when the size of the list changes -->
- <panel
- background_visible="false"
- class="accordion_list_adaptor"
+ <flat_list_view
+ allow_select="true"
follows="all"
- height="45"
+ height="10"
layout="topleft"
left="0"
- name="button_bar_adaptor"
+ multi_select="true"
+ name="list_body_parts"
top="0"
- width="311">
- <panel
- bevel="none"
- filename="panel_bodyparts_list_button_bar.xml"
- height="35"
- name="button_bar"
- top="0"
- width="311"/>
- <flat_list_view
- allow_select="true"
- follows="all"
- height="10"
- layout="topleft"
- left="0"
- multi_select="true"
- name="list_body_parts"
- top_pad="0"
- width="311" />
- </panel>
+ width="311" />
</accordion_tab>
</accordion>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_edit_classified.xml b/indra/newview/skins/default/xui/en/panel_edit_classified.xml
index 7383edf63d..1b4f547f9d 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_classified.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_classified.xml
@@ -24,15 +24,17 @@
</string>
<button
follows="top|right"
- height="23"
- image_overlay="BackArrow_Off"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
layout="topleft"
name="back_btn"
picture_style="true"
- left="12"
+ left="7"
tab_stop="false"
top="2"
- width="23" />
+ width="30" />
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
index 4149a0b06f..f173a2f3cb 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
@@ -51,6 +51,7 @@
top_pad="10"
width="313">
<accordion
+ fit_parent="true"
follows="all"
height ="300"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
index 94fd2f9080..a490f27b9f 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
@@ -65,6 +65,7 @@
top_pad="10"
width="313">
<accordion
+ fit_parent="true"
follows="all"
height ="300"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_hair.xml b/indra/newview/skins/default/xui/en/panel_edit_hair.xml
index 9b60e83387..6bb5d2fa9b 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_hair.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_hair.xml
@@ -51,6 +51,7 @@
top_pad="10"
width="313">
<accordion
+ fit_parent="true"
follows="all"
height ="300"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
index 248ae9fe04..929cdffb3d 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
@@ -80,6 +80,7 @@
top_pad="10"
width="313">
<accordion
+ fit_parent="true"
follows="all"
height ="300"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_pants.xml b/indra/newview/skins/default/xui/en/panel_edit_pants.xml
index 3ed1df2399..f22cf983aa 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_pants.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_pants.xml
@@ -65,6 +65,7 @@
top_pad="10"
width="313">
<accordion
+ fit_parent="true"
follows="all"
height ="300"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_pick.xml b/indra/newview/skins/default/xui/en/panel_edit_pick.xml
index 08ee0306dd..589ea10e8d 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml
@@ -18,14 +18,16 @@
</panel.string>
<button
follows="top|right"
- height="23"
- image_overlay="BackArrow_Off"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
layout="topleft"
name="back_btn"
- left="12"
+ left="7"
tab_stop="false"
top="2"
- width="23" />
+ width="30" />
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
index e088aa05ac..85823073b5 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
@@ -65,6 +65,7 @@
top_pad="10"
width="313">
<accordion
+ fit_parent="true"
follows="all"
height ="300"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
index e079047a86..b26fde68f1 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
@@ -65,6 +65,7 @@
top_pad="10"
width="313">
<accordion
+ fit_parent="true"
follows="all"
height ="300"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_skin.xml b/indra/newview/skins/default/xui/en/panel_edit_skin.xml
index 9158685c40..45591ba2ad 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_skin.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_skin.xml
@@ -85,6 +85,7 @@
width="313">
<accordion
layout="topleft"
+ fit_parent="true"
follows="all"
height ="300"
left="0"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
index 87f3270b31..bb8e0dca07 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
@@ -65,6 +65,7 @@
top_pad="10"
width="313">
<accordion
+ fit_parent="true"
follows="all"
height ="300"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_socks.xml b/indra/newview/skins/default/xui/en/panel_edit_socks.xml
index 5bd99969a2..d813d94d93 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_socks.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_socks.xml
@@ -65,6 +65,7 @@
top_pad="10"
width="313">
<accordion
+ fit_parent="true"
follows="all"
height ="300"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
index 6d02dd41de..23a08344ea 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
@@ -25,49 +25,58 @@
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
- height="100"
+ height="115"
label="Head Tattoo"
layout="topleft"
- left="30"
+ left="20"
name="Head Tattoo"
tool_tip="Click to choose a picture"
top="10"
- width="94" />
+ width="115" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
- height="100"
+ height="115"
label="Upper Tattoo"
layout="topleft"
left_pad="30"
name="Upper Tattoo"
tool_tip="Click to choose a picture"
top="10"
- width="94" />
+ width="115" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<texture_picker
can_apply_immediately="true"
default_image_name="Default"
follows="left|top"
- height="100"
+ height="115"
label="Lower Tattoo"
layout="topleft"
- left="30"
+ left="20"
name="Lower Tattoo"
tool_tip="Click to choose a picture"
top_pad="10"
- width="94" />
+ width="115" >
+ <texture_picker.commit_callback
+ function="TexturePicker.Commit" />
+ </texture_picker>
<color_swatch
can_apply_immediately="true"
follows="left|top"
- height="80"
+ height="115"
label="Color/Tint"
layout="topleft"
- left_pad="20"
+ left_pad="30"
name="Color/Tint"
tool_tip="Click to open color picker"
- top="10"
- width="64" >
+ top_delta="0"
+ width="115" >
<color_swatch.commit_callback
function="ColorSwatch.Commit" />
</color_swatch>
diff --git a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
index bbe5230341..19225e9757 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
@@ -65,6 +65,7 @@
top_pad="10"
width="313">
<accordion
+ fit_parent="true"
follows="all"
height ="300"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
index a79c1b9eaa..720a55dcc2 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
@@ -65,6 +65,7 @@
top_pad="10"
width="313">
<accordion
+ fit_parent="true"
follows="all"
height ="300"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
index 0455086ef3..67ff71cef1 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
@@ -132,12 +132,14 @@ left="0"
</string>
<button
follows="top|left"
- height="25"
- width="25"
- image_overlay="BackArrow_Off"
+ height="24"
+ width="30"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
layout="topleft"
name="back_btn"
- left="10"
+ left="11"
top="7" />
<text
follows="top|left"
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
index 789d69bc68..58b78cfa02 100644
--- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
@@ -36,14 +36,16 @@ background_visible="true"
layout="topleft">
<button
follows="top|right"
- height="23"
- image_overlay="BackArrow_Off"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
layout="topleft"
name="back"
- left="8"
+ left="7"
tab_stop="false"
top="2"
- width="23" />
+ width="30" />
<text_editor
allow_scroll="false"
bg_visible="false"
diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
index 31ba539c44..25674a1a39 100644
--- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
@@ -55,15 +55,17 @@
value="Parcel_R_Dark" />
<button
follows="top|right"
- height="23"
- image_overlay="BackArrow_Off"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
layout="topleft"
- left="11"
+ left="8"
name="back_btn"
tool_tip="Back"
tab_stop="false"
top="4"
- width="23" />
+ width="30" />
<text
follows="top|left|right"
font="SansSerifHugeBold"
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index a86762f53d..185e458a85 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -85,7 +85,6 @@ top="20"
</text>
<line_editor
follows="left|bottom"
-handle_edit_keys_directly="true"
height="22"
max_length="16"
name="password_edit"
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index bc984ccc44..2ff46637f1 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -52,30 +52,19 @@
<string name="Filter.Clothes/Body" value="Clothes/Body"/>
<string name="Filter.Objects" value="Objects"/>
- <!--
- TODO remove this button. Added it temporary for QA to be able to test new edit wearable
- panel (see EXT-6564)
- -->
- <button
- follows="left|top|right"
- height="20"
- label="edit"
- left="0"
- top="0"
- layout="topleft"
- name="edit_wearable_btn"
- width="40" />
-
+
<button
follows="top|left"
- height="23"
- image_overlay="BackArrow_Off"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
layout="topleft"
name="back_btn"
left="5"
tab_stop="false"
top="2"
- width="23" />
+ width="30" />
<text
follows="top|right"
font="SansSerifHugeBold"
@@ -150,8 +139,8 @@
<!-- LIST OF WEARABLES (CURRENT OUTFIT/ WEARABLES TO ADD) -->
-<!-- *NOTE: border_size is used to calculate space between layout panel and for resize bar height
-required height for dragbar is 10, so resizebar height should be 10 px.
+<!-- *NOTE: border_size is used to calculate space between layout panels and also to calculate resize bar's height.
+Required height for dragbar (icon in spec) is 10, so resizebar height should be 10 px.
It is calculated as border_size + 2*UIResizeBarOverlap
-->
<layout_stack
@@ -160,7 +149,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap
clip="false"
default_tab_group="2"
follows="all"
- height="495"
+ height="465"
width="313"
layout="topleft"
orientation="vertical"
@@ -170,7 +159,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap
left="5">
<layout_panel
layout="topleft"
- height="220"
+ height="187"
label="IM Control Panel"
min_height="100"
name="outfit_wearables_panel"
@@ -178,128 +167,89 @@ It is calculated as border_size + 2*UIResizeBarOverlap
auto_resize="true"
user_resize="true">
- <!-- List containing items from the COF and Base outfit -->
- <panel
- background_visible="false"
- class="cof_wearables"
- filename="panel_cof_wearables.xml"
- follows="left|top|right|bottom"
- height="193"
- layout="topleft"
- left="1"
- name="cof_wearables_list"
- top="0"
- width="311" />
-
- <!-- Button bar -->
- <panel
- background_visible="true"
- bevel_style="none"
- follows="bottom|left|right"
- height="27"
- label="bottom_panel"
- layout="topleft"
- left="0"
- name="edit_panel"
- top="193"
- width="313">
- <button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Left_Over"
- image_overlay="OptionsMenu_Off"
- image_selected="Toolbar_Left_Selected"
- image_unselected="Toolbar_Left_Off"
- layout="topleft"
- left="0"
- name="gear_menu_btn"
- top="1"
- width="31" />
- <icon
- follows="bottom|left|right"
- height="25"
- image_name="Toolbar_Right_Off"
- layout="topleft"
- left_pad="1"
- name="dummy_right_icon"
- width="281" />
- </panel>
- </layout_panel>
-
-
- <layout_panel
- background_visible="true"
- bg_alpha_color="DkGray2"
- auto_resize="true"
- default_tab_group="3"
- height="211"
- min_height="210"
- name="add_wearables_panel"
- width="313"
- tab_group="2"
- user_resize="true"
- visible="false">
- <icon
- follows="left|top|right"
- height="10"
- image_name="Dragbar"
- left="0"
- top_pad="-9"
- width="313" />
- <text
- follows="top|left|right"
- font="SansSerifBold"
- height="13"
- layout="topleft"
- left="5"
- name="add_to_outfit_label"
- text_color="LtGray"
- top="4"
- value="Add to Outfit:"
- use_ellipses="true"
- width="150" />
- <button
- follows="top|right"
- height="20"
- image_overlay="Search_Icon"
- is_toggle="true"
- layout="topleft"
- left_pad="5"
- name="filter_button"
- top_delta="0"
- width="20" />
- <combo_box
- follows="top|left|right"
- height="20"
- layout="topleft"
- right="-5"
- name="filter_wearables_combobox"
- top_delta="0"
- width="110"/>
-
<layout_stack
animate="true"
+ border_size="0"
follows="all"
- height="155"
+ height="185"
width="313"
layout="topleft"
name="filter_panels"
- top_pad="5"
+ top="0"
left="0">
<layout_panel
- auto_resize="false"
+ auto_resize="true"
+ background_visible="true"
+ bg_alpha_color="DkGray2"
layout="topleft"
- follows="left|top|right"
+ height="154"
+ label="add_button_and_combobox"
+ name="add_button_and_combobox"
+ width="311"
+ user_resize="false"
+ visible="true">
+
+ <!-- List containing items from the COF and Base outfit -->
+ <panel
+ background_visible="false"
+ class="cof_wearables"
+ filename="panel_cof_wearables.xml"
+ follows="all"
+ height="129"
+ layout="topleft"
+ left="1"
+ name="cof_wearables_list"
+ top="0"
+ width="311" />
+
+ <button
+ follows="left|bottom"
+ height="22"
+ is_toggle="true"
+ label="Add More..."
+ layout="topleft"
+ left="2"
+ name="show_add_wearables_btn"
+ top_pad="2"
+ width="125" />
+
+ <combo_box
+ follows="left|right|bottom"
+ height="22"
+ layout="topleft"
+ left_pad="5"
+ name="filter_wearables_combobox"
+ top_delta="0"
+ visible="false"
+ width="152"/>
+
+ <button
+ follows="bottom|right"
+ height="22"
+ image_overlay="Search_Icon"
+ is_toggle="true"
+ layout="topleft"
+ name="filter_button"
+ right="-5"
+ top_delta="0"
+ visible="false"
+ width="20" />
+ </layout_panel>
+
+ <layout_panel
+ auto_resize="false"
+ background_visible="true"
+ bg_alpha_color="DkGray2"
height="30"
- label="IM Control Panel"
name="filter_panel"
width="311"
- user_resize="false"
- visible="false">
+ visible="false"
+ user_resize="false">
+
<filter_editor
background_image="TextField_Search_Off"
enabled="true"
- follows="left|top|right"
+ follows="left|right|top"
font="SansSerif"
label="Filter"
layout="topleft"
@@ -310,132 +260,189 @@ It is calculated as border_size + 2*UIResizeBarOverlap
text_color="black"
text_pad_left="25"
visible="true"/>
- </layout_panel>
- <layout_panel
- auto_resize="true"
- background_visible="true"
- bg_alpha_color="0.107 0.107 0.107 1"
- height="145"
- min_width="130"
- name="inventory_panel"
- width="311"
- user_resize="true">
- <inventory_panel
- allow_multi_select="true"
- background_visible="false"
- border="false"
- follows="left|top|right|bottom"
- height="140"
- layout="topleft"
- left="0"
- mouse_opaque="false"
- name="inventory_items"
- top_pad="5"
- width="310"
- visible="false"/>
- <panel
- name="filtered_wearables_panel"
- background_opaque="true"
- background_visible="false"
- layout="topleft"
- follows="left|top|right|bottom"
- border="false"
- height="140"
- left="0"
- mouse_opaque="false"
- width="311"
- top_delta="0"
- visible="true">
- <wearable_items_list
- color="0.107 0.107 0.107 1"
- name="filtered_wearables_list"
- allow_select="true"
- layout="topleft"
- follows="all"
- multi_select="true"
- width="310"
- height="140"
- left="0"
- top="0"/>
- </panel>
+
</layout_panel>
</layout_stack>
+ </layout_panel>
+
+ <layout_panel
+ background_visible="true"
+ bg_alpha_color="DkGray2"
+ auto_resize="true"
+ default_tab_group="3"
+ height="211"
+ min_height="210"
+ name="add_wearables_panel"
+ width="313"
+ tab_group="2"
+ user_resize="true"
+ visible="false">
+
+ <!-- this icon represent dragbar between layout panels.
+ This is a workaround implemented in EXT-7255 becouse of an issue with layout stack (EXT-7471) -->
+ <icon
+ follows="left|top|right"
+ height="10"
+ image_name="Dragbar"
+ left="0"
+ top_pad="-9"
+ width="313" />
+
+ <inventory_panel
+ allow_multi_select="true"
+ background_visible="false"
+ border="false"
+ follows="left|top|right|bottom"
+ height="210"
+ layout="topleft"
+ left="0"
+ mouse_opaque="false"
+ name="inventory_items"
+ top_pad="5"
+ width="310"
+ visible="false"/>
<panel
- background_visible="true"
- bevel_style="none"
- follows="left|right|bottom"
- height="27"
- label="add_wearables_button_bar"
+ name="filtered_wearables_panel"
+ background_opaque="true"
+ background_visible="false"
layout="topleft"
+ follows="left|top|right|bottom"
+ border="false"
+ height="210"
left="0"
- name="add_wearables_button_bar"
- top_pad="0"
- width="313">
- <button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Left_Over"
- image_overlay="OptionsMenu_Off"
- image_selected="Toolbar_Left_Selected"
- image_unselected="Toolbar_Left_Off"
+ mouse_opaque="false"
+ width="311"
+ top_delta="0"
+ visible="true">
+ <wearable_items_list
+ color="0.107 0.107 0.107 1"
+ name="filtered_wearables_list"
+ allow_select="true"
layout="topleft"
+ follows="all"
+ multi_select="true"
+ width="310"
+ height="210"
left="0"
- name="wearables_gear_menu_btn"
- top="1"
- width="31" />
- <button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Middle_Over"
- image_overlay="Hierarchy_View_Disabled"
- image_selected="Toolbar_Middle_Selected"
- image_unselected="Toolbar_Middle_Off"
- is_toggle="true"
- layout="topleft"
- left_pad="1"
- name="folder_view_btn"
- top="1"
- width="31" />
- <button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Middle_Over"
- image_overlay="List_View_On"
- image_selected="Toolbar_Middle_Selected"
- image_unselected="Toolbar_Middle_Off"
- is_toggle="true"
- layout="topleft"
- left_pad="1"
- name="list_view_btn"
- top="1"
- width="31" />
- <button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Middle_Over"
- image_overlay="AddItem_Off"
- image_selected="Toolbar_Middle_Selected"
- image_unselected="Toolbar_Middle_Off"
- label=""
- layout="topleft"
- left_pad="1"
- name="add_to_outfit_btn"
- top="1"
- width="31" />
- <icon
- follows="bottom|left|right"
- height="25"
- image_name="Toolbar_Right_Off"
- layout="topleft"
- left_pad="1"
- name="dummy_right_icon"
- width="184" >
- </icon>
+ top="0"/>
</panel>
+
</layout_panel>
</layout_stack>
+
+ <!-- BUTTON BAR -->
+ <panel
+ background_visible="true"
+ bevel_style="none"
+ follows="bottom|left|right"
+ height="27"
+ label="bottom_panel"
+ layout="topleft"
+ left="5"
+ name="no_add_wearables_button_bar"
+ top_pad="0"
+ width="313">
+ <button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Left_Over"
+ image_overlay="OptionsMenu_Off"
+ image_selected="Toolbar_Left_Selected"
+ image_unselected="Toolbar_Left_Off"
+ layout="topleft"
+ left="0"
+ name="gear_menu_btn"
+ top="1"
+ width="31" />
+ <icon
+ follows="bottom|left|right"
+ height="25"
+ image_name="Toolbar_Right_Off"
+ layout="topleft"
+ left_pad="1"
+ name="dummy_right_icon"
+ width="281" />
+ </panel>
+
+
+ <!-- BUTTON BAR - WEARABLES ADDING MODE -->
+ <panel
+ background_visible="true"
+ bevel_style="none"
+ follows="left|right|bottom"
+ height="27"
+ label="add_wearables_button_bar"
+ layout="topleft"
+ left="5"
+ name="add_wearables_button_bar"
+ top_delta="0"
+ visible="false"
+ width="313">
+ <button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Left_Over"
+ image_overlay="OptionsMenu_Off"
+ image_selected="Toolbar_Left_Selected"
+ image_unselected="Toolbar_Left_Off"
+ layout="topleft"
+ left="0"
+ name="wearables_gear_menu_btn"
+ top="1"
+ width="31" />
+ <button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="Hierarchy_View_Disabled"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ is_toggle="true"
+ layout="topleft"
+ left_pad="1"
+ name="folder_view_btn"
+ top="1"
+ width="31" />
+ <button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="List_View_On"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ is_toggle="true"
+ layout="topleft"
+ left_pad="1"
+ name="list_view_btn"
+ top="1"
+ width="31" />
+ <button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="AddItem_Off"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ label=""
+ layout="topleft"
+ left_pad="1"
+ name="add_to_outfit_btn"
+ top="1"
+ width="31" />
+ <icon
+ follows="bottom|left|right"
+ height="25"
+ image_name="Toolbar_Right_Off"
+ layout="topleft"
+ left_pad="1"
+ name="dummy_right_icon"
+ width="184" >
+ </icon>
+ </panel>
+
+ <!-- SAVE AND REVERT BUTTONS -->
<panel
follows="left|right|bottom"
height="30"
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
index 9e59651bd1..13e1f5ba5c 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
@@ -93,17 +93,30 @@
left_pad="1"
name="trash_btn"
tool_tip="Remove selected item"
- width="31"/>
- <button
- follows="bottom|left"
- height="23"
- label="Save Outfit"
- layout="topleft"
- name="make_outfit_btn"
- tool_tip="Save appearance as an outfit"
+ width="31"/>
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Save As"
+ left="0"
+ layout="topleft"
+ name="save_btn"
top_pad="6"
- left="0"
- width="153" />
+ width="155" />
+ <button
+ follows="bottom|left"
+ height="23"
+ name="save_flyout_btn"
+ label=""
+ layout="topleft"
+ left_pad="-20"
+ tab_stop="false"
+ image_selected="SegmentedBtn_Right_Selected_Press"
+ image_unselected="SegmentedBtn_Right_Off"
+ image_pressed="SegmentedBtn_Right_Press"
+ image_pressed_selected="SegmentedBtn_Right_Selected_Press"
+ image_overlay="Arrow_Small_Up"
+ width="20"/>
<button
follows="bottom|left|right"
height="23"
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 ecf5516390..49e1d16f6a 100644
--- a/indra/newview/skins/default/xui/en/panel_pick_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_pick_info.xml
@@ -12,14 +12,16 @@
width="333">
<button
follows="top|right"
- height="23"
- image_overlay="BackArrow_Off"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
layout="topleft"
name="back_btn"
- left="12"
+ left="7"
tab_stop="false"
top="2"
- width="23" />
+ width="30" />
<text
follows="top|left|right"
font="SansSerifHugeBold"
diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml
index 9725e9952a..57ac79686d 100644
--- a/indra/newview/skins/default/xui/en/panel_place_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml
@@ -140,15 +140,17 @@
value="Parcel_DamageNo_Dark" />
<button
follows="top|right"
- height="23"
- image_overlay="BackArrow_Off"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
layout="topleft"
- left="11"
+ left="7"
name="back_btn"
tool_tip="Back"
tab_stop="false"
top="4"
- width="23" />
+ width="30" />
<text
follows="top|left|right"
font="SansSerifHugeBold"
@@ -318,6 +320,7 @@
value="unknown"
width="268" />
<accordion
+ fit_parent="true"
follows="all"
height="223"
layout="topleft"
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 40a644657a..31d8ea27d9 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -98,7 +98,7 @@ Automatic position for:
control_name="SidebarCameraMovement"
follows="left|top"
height="16"
- initial_value="1"
+ initial_value="true"
label="Sidebar"
layout="topleft"
name="appearance_sidebar_positioning"
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 9eaabbe77b..1c68d59993 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
@@ -352,7 +352,6 @@
text_readonly_color="LabelDisabledColor"
bg_writeable_color="LtGray"
use_ellipses="false"
- hover="false"
commit_on_focus_lost = "true"
follows="left|top|right"
height="60"
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 5a96ba2dd2..cc5ba334d6 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml
@@ -18,14 +18,16 @@
</string>
<button
follows="top|right"
- height="23"
- image_overlay="BackArrow_Off"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
layout="topleft"
name="back"
- left="12"
+ left="9"
tab_stop="false"
top="2"
- width="23" />
+ width="30" />
<text_editor
h_pad="0"
v_pad="0"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
index b840fdd31b..c816fd1479 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml
@@ -40,14 +40,16 @@
width="18" />
<button
follows="top|right"
- height="23"
- image_overlay="BackArrow_Off"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
layout="topleft"
- left="14"
+ left="12"
name="back_btn"
tab_stop="false"
top="2"
- width="23" />
+ width="30" />
<text
follows="top|left|right"
font="SansSerifHugeBold"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index d46783e058..faa1ae4e8b 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -58,14 +58,16 @@
</panel.string>
<button
follows="top|right"
- height="23"
- image_overlay="BackArrow_Off"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
layout="topleft"
- left="10"
+ left="8"
name="back_btn"
tab_stop="false"
top="0"
- width="23" />
+ width="30" />
<text
follows="top|left|right"
font="SansSerifHuge"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index e57b30185d..ed6484302f 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -48,12 +48,10 @@
<string name="LoginDownloadingClothing">Downloading clothing...</string>
<string name="InvalidCertificate">The server returned an invalid or corrupt certificate. Please contact the Grid administrator.</string>
<string name="CertInvalidHostname">An invalid hostname was used to access the server, please check your SLURL or Grid hostname.</string>
- <string name="CertExpired">The certificate returned by the Grid appears to be expired. Please check your system clock, or contact your Grid administr\
-ator.</string>
+ <string name="CertExpired">The certificate returned by the Grid appears to be expired. Please check your system clock, or contact your Grid administrator.</string>
<string name="CertKeyUsage">The certificate returned by the server could not be used for SSL. Please contact your Grid administrator.</string>
<string name="CertBasicConstraints">Too many certificates were in the servers Certificate chain. Please contact your Grid administrator.</string>
- <string name="CertInvalidSignature">The certificate signature returned by the Grid server could not be verified. Please contact your Grid administrat
-or.</string>
+ <string name="CertInvalidSignature">The certificate signature returned by the Grid server could not be verified. Please contact your Grid administrator.</string>
<string name="LoginFailedNoNetwork">Network Error: Could not establish connection, please check your network connection.</string>
<string name="LoginFailed">Login failed.</string>
@@ -123,7 +121,7 @@ or.</string>
<!-- ButtonToolTips, llfloater.cpp -->
<string name="BUTTON_CLOSE_DARWIN">Close (&#8984;W)</string>
<string name="BUTTON_CLOSE_WIN">Close (Ctrl+W)</string>
- <string name="BUTTON_CLOSE_CHROME">Close</string>>
+ <string name="BUTTON_CLOSE_CHROME">Close</string>
<string name="BUTTON_RESTORE">Restore</string>
<string name="BUTTON_MINIMIZE">Minimize</string>
<string name="BUTTON_TEAR_OFF">Tear Off</string>
@@ -320,6 +318,10 @@ or.</string>
<!-- For use when we do not have land type back from the server -->
<string name="land_type_unknown">(unknown)</string>
+ <!-- For land type back from the simulator -->
+ <string name="Estate / Full Region">Estate / Full Region</string>
+ <string name="Mainland / Full Region">Mainland / Full Region</string>
+
<!-- File load/save dialogs -->
<string name="all_files">All Files</string>
<string name="sound_files">Sounds</string>
@@ -1828,6 +1830,7 @@ Clears (deletes) the media and all params from the given face.
<!-- Wearable List-->
<string name="NewWearable">New [WEARABLE_ITEM]</string>
+ <string name="CreateNewWearable">Create [WEARABLE_TYPE]</string>
<!-- LLGroupNotify -->
<!-- used in the construction of a Group Notice blue dialog box, buttons, tooltip etc. Seems to be no longer utilized by code in Viewer 2.0 -->
@@ -3082,10 +3085,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
</string>
<string name="unread_chat_single">
[SOURCES] has said something new
- </string>"
+ </string>
<string name="unread_chat_multiple">
[SOURCES] have said something new
- </string>"
+ </string>
<string name="session_initialization_timed_out_error">
The session initialization is timed out
</string>
@@ -3156,10 +3159,10 @@ Abuse Report</string>
<string name="Male - Stick tougue out">Male - Stick tougue out</string>
<string name="Male - Wow">Male - Wow</string>
- <string name="FeMale - Excuse me">FeMale - Excuse me</string>
- <string name="FeMale - Get lost">FeMale - Get lost</string>
- <string name="FeMale - Blow kiss">FeMale - Blow kiss</string>
- <string name="FeMale - Boo">FeMale - Boo</string>
+ <string name="Female - Excuse me">Female - Excuse me</string>
+ <string name="Female - Get lost">Female - Get lost</string>
+ <string name="Female - Blow kiss">Female - Blow kiss</string>
+ <string name="Female - Boo">Female - Boo</string>
<string name="Female - Bored">Female - Bored</string>
<string name="Female - Hey">Female - Hey</string>
<string name="Female - Laugh">Female - Laugh</string>
@@ -3176,11 +3179,28 @@ Abuse Report</string>
<!-- language specific white-space characters, delimiters, spacers, item separation symbols -->
<string name="sentences_separator" value=" "></string>
+ <string name="words_separator">, </string>
<string name="server_is_down">
Despite our best efforts, something unexpected has gone wrong.
- Please check secondlife.com/status to see if there is a known problem with the service.
+ Please check secondlife.com/status to see if there is a known problem with the service.
+ If you continue to experience problems, please check your network and firewall setup.
</string>
+ <!-- overriding datetime formating.
+ leave emtpy in for current localization this is not needed
+ list of values should be separated with ':'
+ example:
+ <string name="dateTimeWeekdaysShortNames">
+ Son:Mon:Tue:Wed:Thu:Fri:Sat
+ </string>
+ -->
+ <string name="dateTimeWeekdaysNames"></string>
+ <string name="dateTimeWeekdaysShortNames"></string>
+ <string name="dateTimeMonthNames"></string>
+ <string name="dateTimeMonthShortNames"></string>
+ <string name="dateTimeDayFormat"></string>
+ <string name="dateTimeAM"></string>
+ <string name="dateTimePM"></string>
</strings>
diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml
index c4f0fe5208..2d0a1728d5 100644
--- a/indra/newview/skins/default/xui/en/widgets/button.xml
+++ b/indra/newview/skins/default/xui/en/widgets/button.xml
@@ -2,6 +2,7 @@
<!-- Additional attributes:
image_pressed
image_pressed_selected
+ image_flash
-->
<button image_unselected="PushButton_Off"
image_selected="PushButton_Selected"
diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
index 8d6b0c1cfe..c37ead0be2 100644
--- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml
+++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
@@ -11,6 +11,12 @@ label_pad_left - padding to the left of tab button labels
tab_height="21"
label_pad_bottom="2"
label_pad_left="4">
+ <!--
+ Possible additional attributes for tabs:
+ tab_bottom_image_flash
+ tab_left_image_flash
+ tab_top_image_flash
+ -->
<first_tab tab_top_image_unselected="TabTop_Left_Off"
tab_top_image_selected="TabTop_Left_Selected"
tab_bottom_image_unselected="Toolbar_Left_Off"
diff --git a/indra/newview/skins/default/xui/en/widgets/text.xml b/indra/newview/skins/default/xui/en/widgets/text.xml
index 998ec5b170..3006df22b8 100644
--- a/indra/newview/skins/default/xui/en/widgets/text.xml
+++ b/indra/newview/skins/default/xui/en/widgets/text.xml
@@ -6,7 +6,6 @@
font_shadow="none"
tab_stop="false"
halign="left"
- hover_color="LabelSelectedColor"
h_pad="0"
allow_scroll="false"
text_readonly_color="LabelDisabledColor"
@@ -14,7 +13,6 @@
use_ellipses="false"
bg_visible="false"
border_visible="false"
- hover="false"
sound_flags="0"
text_color="LabelTextColor"
v_pad="0"
diff --git a/indra/newview/skins/default/xui/es/floater_world_map.xml b/indra/newview/skins/default/xui/es/floater_world_map.xml
index c3a13980de..deda5b86c8 100644
--- a/indra/newview/skins/default/xui/es/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/es/floater_world_map.xml
@@ -35,7 +35,7 @@
<text name="pg_label">
General
</text>
- <check_box initial_value="verdadero" name="event_mature_chk"/>
+ <check_box name="event_mature_chk"/>
<text name="mature_label">
Moderado
</text>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml
index c3a23c74c4..6e6d0be81f 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml
@@ -13,7 +13,7 @@
</text>
<check_box label="Construir/Editar" name="edit_camera_movement" tool_tip="Usar el posicionamiento automático de la cámara al entrar en o salir del modo de edición"/>
<check_box label="Apariencia" name="appearance_camera_movement" tool_tip="Usar el posicionamiento automático de la cámara mientras se está editando"/>
- <check_box initial_value="1" label="Barra lateral" name="appearance_sidebar_positioning" tool_tip="Usar el posicionamiento automático de la cámara para la barra lateral"/>
+ <check_box label="Barra lateral" name="appearance_sidebar_positioning" tool_tip="Usar el posicionamiento automático de la cámara para la barra lateral"/>
<check_box label="Verme en vista subjetiva" name="first_person_avatar_visible"/>
<check_box label="Las teclas del cursor siempre para moverme" name="arrow_keys_move_avatar_check"/>
<check_box label="Correr siempre: atajo de teclado" name="tap_tap_hold_to_run"/>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_setup.xml b/indra/newview/skins/default/xui/es/panel_preferences_setup.xml
index fe9736f758..88f5ba42b5 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_setup.xml
@@ -37,10 +37,10 @@
<radio_item label="Usar mi navegador (IE, Firefox, Safari)" name="external" tool_tip="Usa tu navegador por defecto para ayuda, enlaces web, etc. No es aconsejable si estás a pantalla completa." value="1"/>
<radio_item label="Usar el navegador incorporado" name="internal" tool_tip="Usa el navegador incorporado para ayuda, enlaces web, etc. Este navegador se abre en una nueva ventana dentro de [APP_NAME]." value=""/>
</radio_group>
- <check_box initial_value="verdadero" label="Activar plugins" name="browser_plugins_enabled"/>
- <check_box initial_value="verdadero" label="Aceptar las &apos;cookies&apos;" name="cookies_enabled"/>
- <check_box initial_value="verdadero" label="Activar Javascript" name="browser_javascript_enabled"/>
- <check_box initial_value="false" label="Activar web proxy" name="web_proxy_enabled"/>
+ <check_box label="Activar plugins" name="browser_plugins_enabled"/>
+ <check_box label="Aceptar las &apos;cookies&apos;" name="cookies_enabled"/>
+ <check_box label="Activar Javascript" name="browser_javascript_enabled"/>
+ <check_box label="Activar web proxy" name="web_proxy_enabled"/>
<text name="Proxy location">
Localización del proxy:
</text>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
index 1e8b0c736c..2d3c76d215 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Sonidos" name="Preference Media panel">
<slider label="Volumen general" name="System Volume"/>
- <check_box initial_value="true" label="Silenciar cuando minimice" name="mute_when_minimized"/>
+ <check_box label="Silenciar cuando minimice" name="mute_when_minimized"/>
<slider label="Botones" name="UI Volume"/>
<slider label="Ambiental" name="Wind Volume"/>
<slider label="Efectos de sonido" name="SFX Volume"/>
@@ -11,8 +11,8 @@
<check_box label="Activada" name="enable_media"/>
<slider label="Chat de voz" name="Voice Volume"/>
<check_box label="Activado" name="enable_voice_check"/>
- <check_box label="Permitir la ejecución automática de los media" name="media_auto_play_btn" tool_tip="Marcar esto para permitir la ejecución automática de los media" value="Sí"/>
- <check_box label="Ejecutar para otros avatares los media anexados" name="media_show_on_others_btn" tool_tip="Al desmarcar esto se esconderán los media anexados a otros avatares cercanos" value="Sí"/>
+ <check_box label="Permitir la ejecución automática de los media" name="media_auto_play_btn" tool_tip="Marcar esto para permitir la ejecución automática de los media"/>
+ <check_box label="Ejecutar para otros avatares los media anexados" name="media_show_on_others_btn" tool_tip="Al desmarcar esto se esconderán los media anexados a otros avatares cercanos"/>
<text name="voice_chat_settings">
Configuración del chat de voz
</text>
diff --git a/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml b/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml
index 7133f8754c..1d164ac661 100644
--- a/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/fr/floater_preview_gesture.xml
@@ -31,10 +31,10 @@
Description :
</text>
<text name="trigger_label">
- Déclencheur :
+ Déclench. :
</text>
<text name="replace_text" tool_tip="Remplacer les raccourcis avec ces mots. Par exemple, remplacer le mot-clé « salut » par « bonjour » fera dire « je venais dire bonjour » au lieu de « je venais dire salut » dans le chat, et déclenchera le geste.">
- Remplacer par :
+ Rempl. par :
</text>
<line_editor left="310" name="replace_editor" tool_tip="Remplacer les raccourcis avec ces mots. Par exemple, remplacer le mot-clé « salut » par « bonjour » fera dire « je venais dire bonjour » au lieu de « je venais dire salut » dans le chat, et déclenchera le geste" width="120"/>
<text name="key_label">
@@ -50,20 +50,20 @@
<text name="steps_label">
Étapes :
</text>
- <button label="Vers le haut" name="up_btn"/>
- <button label="Vers le bas" name="down_btn"/>
+ <button label="Haut" name="up_btn"/>
+ <button label="Bas" name="down_btn"/>
<button label="Supprimer" name="delete_btn"/>
<radio_group name="animation_trigger_type">
<radio_item label="Lancer" name="start"/>
<radio_item label="Arrêter" name="stop"/>
</radio_group>
<check_box label="jusqu&apos;à la fin des animations" name="wait_anim_check"/>
- <check_box label="temps en secondes" name="wait_time_check"/>
+ <check_box label="temps (sec)" name="wait_time_check"/>
<line_editor left_delta="130" name="wait_time_editor"/>
<text name="help_label">
Toutes les étapes ont lieu en même temps si vous n&apos;ajoutez pas d&apos;étapes d&apos;attente.
</text>
- <check_box label="Actifs" name="active_check" tool_tip="Les gestes actifs peuvent être déclenchés en saisissant leur raccourci dans le chat ou en appuyant sur les raccourcis. Les gestes deviennent généralement inactifs lorsqu&apos;il y a un conflit entre les raccourcis."/>
+ <check_box label="Actif" name="active_check" tool_tip="Les gestes actifs peuvent être déclenchés en saisissant leur raccourci dans le chat ou en appuyant sur les raccourcis. Les gestes deviennent généralement inactifs lorsqu&apos;il y a un conflit entre les raccourcis."/>
<button label="Prévisualiser" name="preview_btn" width="86"/>
<button label="Enregistrer" left_delta="96" name="save_btn" width="86"/>
</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_tools.xml b/indra/newview/skins/default/xui/fr/floater_tools.xml
index c9b8c42dfb..26d097d549 100644
--- a/indra/newview/skins/default/xui/fr/floater_tools.xml
+++ b/indra/newview/skins/default/xui/fr/floater_tools.xml
@@ -37,7 +37,7 @@
Référence
</floater.string>
<floater.string name="grid_attachment_text">
- Pièce-jointe
+ Pièce jointe
</floater.string>
<button label="" label_selected="" name="button focus" tool_tip="Mise au point"/>
<button label="" label_selected="" name="button move" tool_tip="Déplacer"/>
diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml
index 4c4c01f34a..bb1c4242ee 100644
--- a/indra/newview/skins/default/xui/fr/notifications.xml
+++ b/indra/newview/skins/default/xui/fr/notifications.xml
@@ -1831,7 +1831,7 @@ Linden Lab
Les composantes requises suivantes ne se trouvent pas dans [FLOATER]:
[COMPONENTS]
</notification>
- <notification label="Remplacer la pièce-jointe existante" name="ReplaceAttachment">
+ <notification label="Remplacer la pièce jointe existante" name="ReplaceAttachment">
Vous avez déjà un objet sur cette partie du corps.
Voulez-vous le remplacer par l&apos;objet sélectionné ?
<form name="form">
diff --git a/indra/newview/skins/default/xui/fr/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/fr/panel_bodyparts_list_button_bar.xml
index afd9001df0..5e7442b877 100644
--- a/indra/newview/skins/default/xui/fr/panel_bodyparts_list_button_bar.xml
+++ b/indra/newview/skins/default/xui/fr/panel_bodyparts_list_button_bar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="clothing_list_button_bar_panel">
- <button label="Permuter" name="switch_btn"/>
+ <button label="Changer" name="switch_btn"/>
<button label="Acheter &gt;" name="bodyparts_shop_btn"/>
</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_clothing_list_button_bar.xml b/indra/newview/skins/default/xui/fr/panel_clothing_list_button_bar.xml
index 24cb92dde7..0b58a4e40b 100644
--- a/indra/newview/skins/default/xui/fr/panel_clothing_list_button_bar.xml
+++ b/indra/newview/skins/default/xui/fr/panel_clothing_list_button_bar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="clothing_list_button_bar_panel">
- <button label="Ajouter +" name="add_btn"/>
+ <button label="Ajout +" name="add_btn"/>
<button label="Acheter &gt;" name="clothing_shop_btn"/>
</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_edit_pick.xml b/indra/newview/skins/default/xui/fr/panel_edit_pick.xml
index 0bbcbe833f..5872b01fb0 100644
--- a/indra/newview/skins/default/xui/fr/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/fr/panel_edit_pick.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Modifier la préférence" name="panel_edit_pick">
+<panel label="Modifier le favori" name="panel_edit_pick">
<panel.string name="location_notice">
(mise à jour après enregistrement)
</panel.string>
<text name="title">
- Modifier la préférence
+ Modifier le favori
</text>
<scroll_container name="profile_scroll">
<panel name="scroll_content_panel">
diff --git a/indra/newview/skins/default/xui/fr/panel_group_control_panel.xml b/indra/newview/skins/default/xui/fr/panel_group_control_panel.xml
index 69403939aa..3e66b3c72a 100644
--- a/indra/newview/skins/default/xui/fr/panel_group_control_panel.xml
+++ b/indra/newview/skins/default/xui/fr/panel_group_control_panel.xml
@@ -11,7 +11,7 @@
<button label="Quitter l&apos;appel" name="end_call_btn"/>
</layout_panel>
<layout_panel name="voice_ctrls_btn_panel">
- <button label="Ouvrir les contrôles vocaux" name="voice_ctrls_btn"/>
+ <button label="Ouvrir contrôles vocaux" name="voice_ctrls_btn"/>
</layout_panel>
</layout_stack>
</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_group_notices.xml b/indra/newview/skins/default/xui/fr/panel_group_notices.xml
index bcb6abcac6..5ea7ba192b 100644
--- a/indra/newview/skins/default/xui/fr/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/fr/panel_group_notices.xml
@@ -36,14 +36,14 @@ Vous pouvez désactiver la réception des notices dans l&apos;onglet Général.
</text>
<text_editor name="create_message"/>
<text name="lbl5">
- Pièce-jointe :
+ Pièce jointe :
</text>
<line_editor name="create_inventory_name"/>
<text name="string">
Faire glisser l&apos;objet et le déposer ici pour le joindre :
</text>
<button label="Inventaire" name="open_inventory" tool_tip="Ouvrir l&apos;inventaire"/>
- <button label="Supprimer" label_selected="Supprimer pièce-jointe" name="remove_attachment" tool_tip="Supprimer la pièce jointe de votre notification"/>
+ <button label="Supprimer" label_selected="Supprimer pièce jointe" name="remove_attachment" tool_tip="Supprimer la pièce jointe de votre notification"/>
<button label="Envoyer" label_selected="Envoyer" left="200" name="send_notice" width="100"/>
<group_drop_target name="drop_target" tool_tip="Faites glisser un objet de l&apos;inventaire jusqu&apos;à cette case pour l&apos;envoyer avec la notice. Vous devez avoir l&apos;autorisation de copier et transférer l&apos;objet pour pouvoir le joindre."/>
</panel>
@@ -61,6 +61,6 @@ Vous pouvez désactiver la réception des notices dans l&apos;onglet Général.
Message :
</text>
<line_editor left="128" name="view_inventory_name" width="256"/>
- <button label="Ouvrir la pièce jointe" label_selected="Ouvrir pièce-jointe" name="open_attachment" width="118"/>
+ <button label="Ouvrir pièce jointe" label_selected="Ouvrir pièce jointe" name="open_attachment" width="118"/>
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_notes.xml b/indra/newview/skins/default/xui/fr/panel_notes.xml
index f4e4f8a4ab..1609b6c9d3 100644
--- a/indra/newview/skins/default/xui/fr/panel_notes.xml
+++ b/indra/newview/skins/default/xui/fr/panel_notes.xml
@@ -17,7 +17,7 @@
<button label="IM" name="im" width="30" tool_tip="Ouvrir une session IM"/>
<button label="Appeler" name="call" width="60" tool_tip="Appeler ce résident"/>
<button label="Carte" name="show_on_map_btn" tool_tip="Afficher le résident sur la carte"/>
- <button label="Téléporter" name="teleport" tool_tip="Proposez une téléportation"/>
+ <button label="Téléporter" name="teleport" tool_tip="Proposer une téléportation"/>
</layout_panel>
</layout_stack>
</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_people.xml b/indra/newview/skins/default/xui/fr/panel_people.xml
index 186ca51772..f7eb803d4a 100644
--- a/indra/newview/skins/default/xui/fr/panel_people.xml
+++ b/indra/newview/skins/default/xui/fr/panel_people.xml
@@ -56,7 +56,7 @@ Pour rechercher des résidents avec qui passer du temps, utilisez [secondlife://
<button label="IM" name="im_btn" tool_tip="Ouvrir une session IM"/>
<button label="Appeler" name="call_btn" tool_tip="Appeler ce résident"/>
<button label="Partager" name="share_btn" tool_tip="Partager un article d&apos;inventaire"/>
- <button label="Téléporter" name="teleport_btn" tool_tip="Proposez une téléportation"/>
+ <button label="Téléporter" name="teleport_btn" tool_tip="Proposer une téléportation"/>
<button label="Profil" name="group_info_btn" tool_tip="Voir le profil du groupe"/>
<button label="Chat" name="chat_btn" tool_tip="Ouvrir une session de chat"/>
<button label="Appel" name="group_call_btn" tool_tip="Appeler ce groupe"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml
index 2a7691ea0a..6b8e68bd98 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml
@@ -11,9 +11,9 @@
<text name="heading2">
Positionnement automatique pour :
</text>
- <check_box label="Construire/Éditer" name="edit_camera_movement" tool_tip="Utilisez le positionnement automatique de la caméra quand vous accédez au mode de modification et quand vous le quittez"/>
+ <check_box label="Construire/Modifier" name="edit_camera_movement" tool_tip="Utilisez le positionnement automatique de la caméra quand vous accédez au mode de modification et quand vous le quittez"/>
<check_box label="Apparence" name="appearance_camera_movement" tool_tip="Utiliser le positionnement automatique de la caméra quand je suis en mode Édition"/>
- <check_box initial_value="1" label="Panneau latéral" name="appearance_sidebar_positioning" tool_tip="Positionnement auto de la caméra pour le panneau latéral"/>
+ <check_box label="Panneau latéral" name="appearance_sidebar_positioning" tool_tip="Positionnement auto de la caméra pour le panneau latéral"/>
<check_box label="Afficher en vue subjective" name="first_person_avatar_visible"/>
<check_box label="Les touches de direction me font toujours me déplacer" name="arrow_keys_move_avatar_check"/>
<check_box label="Appuyer deux fois et maintenir enfoncé pour courir" name="tap_tap_hold_to_run"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml
index 4c055a2b8d..c9676c898b 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml
@@ -11,8 +11,8 @@
<check_box label="Activé" name="enable_media"/>
<slider label="Chat vocal" name="Voice Volume"/>
<check_box label="Activé" name="enable_voice_check"/>
- <check_box label="Autoriser la lecture automatique du média" name="media_auto_play_btn" tool_tip="Cochez pour autoriser la lecture automatique du média" value="vrai"/>
- <check_box label="Jouer le média aux autres avatars" name="media_show_on_others_btn" tool_tip="Décochez pour masquer le média aux autres avatars près de vous" value="vrai"/>
+ <check_box label="Autoriser la lecture automatique du média" name="media_auto_play_btn" tool_tip="Cochez pour autoriser la lecture automatique du média"/>
+ <check_box label="Jouer le média aux autres avatars" name="media_show_on_others_btn" tool_tip="Décochez pour masquer le média aux autres avatars près de vous"/>
<text name="voice_chat_settings">
Paramètres du chat vocal
</text>
diff --git a/indra/newview/skins/default/xui/fr/panel_profile.xml b/indra/newview/skins/default/xui/fr/panel_profile.xml
index f801aee312..f1c12c9fee 100644
--- a/indra/newview/skins/default/xui/fr/panel_profile.xml
+++ b/indra/newview/skins/default/xui/fr/panel_profile.xml
@@ -45,7 +45,7 @@
<button label="IM" name="im" tool_tip="Ouvrir une session IM"/>
<button label="Appeler" name="call" tool_tip="Appeler ce résident"/>
<button label="Carte" name="show_on_map_btn" tool_tip="Afficher le résident sur la carte"/>
- <button label="Téléporter" name="teleport" tool_tip="Proposez une téléportation"/>
+ <button label="Téléporter" name="teleport" tool_tip="Proposer une téléportation"/>
<button label="▼" name="overflow_btn" tool_tip="Payer ou partager l&apos;inventaire avec le résident"/>
</layout_panel>
<layout_panel name="profile_me_buttons_panel">
diff --git a/indra/newview/skins/default/xui/fr/panel_region_estate.xml b/indra/newview/skins/default/xui/fr/panel_region_estate.xml
index 2c12547d61..fb650ff646 100644
--- a/indra/newview/skins/default/xui/fr/panel_region_estate.xml
+++ b/indra/newview/skins/default/xui/fr/panel_region_estate.xml
@@ -73,6 +73,6 @@ domaine.
<button label="?" name="ban_resident_help"/>
<button label="Ajouter..." name="add_banned_avatar_btn"/>
<button label="Supprimer..." name="remove_banned_avatar_btn"/>
- <button label="Envoyer un message au domaine..." name="message_estate_btn"/>
- <button label="Éjecter un résident du domaine..." name="kick_user_from_estate_btn"/>
+ <button label="Message au domaine..." name="message_estate_btn"/>
+ <button label="Éjecter du domaine..." name="kick_user_from_estate_btn"/>
</panel>
diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml
index 742f024d0d..15d5847c58 100644
--- a/indra/newview/skins/default/xui/fr/strings.xml
+++ b/indra/newview/skins/default/xui/fr/strings.xml
@@ -919,7 +919,7 @@
Consultez les notices précédentes ou choisissez de ne plus recevoir ces messages ici.
</string>
<string name="GroupNotifyOpenAttachment">
- Ouvrir la pièce jointe
+ Ouvrir pièce jointe
</string>
<string name="GroupNotifySaveAttachment">
Enregistrer la pièce jointe
diff --git a/indra/newview/skins/default/xui/it/floater_world_map.xml b/indra/newview/skins/default/xui/it/floater_world_map.xml
index 31d7a8df9e..b07daac6fb 100644
--- a/indra/newview/skins/default/xui/it/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/it/floater_world_map.xml
@@ -35,7 +35,7 @@
<text name="pg_label">
Generale
</text>
- <check_box initial_value="vero" name="event_mature_chk"/>
+ <check_box name="event_mature_chk"/>
<text name="mature_label">
Moderato
</text>
diff --git a/indra/newview/skins/default/xui/it/panel_preferences_setup.xml b/indra/newview/skins/default/xui/it/panel_preferences_setup.xml
index cedf93beed..29618485c2 100644
--- a/indra/newview/skins/default/xui/it/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/it/panel_preferences_setup.xml
@@ -37,10 +37,10 @@
<radio_item label="Usa il mio browser (IE, Firefox, Safari)" name="external" tool_tip="Utilizza il browser Web predefinito di sistema per l&apos;aiuto, per i link Web e così via. Sconsigliato durante l&apos;esecuzione a tutto schermo." value="1"/>
<radio_item label="Utilizza il browser Web integrato" name="internal" tool_tip="Utilizza il browser Web integrato per l&apos;aiuto, per i link Web e così via. Questo browser si apre in una nuova finestra in [APP_NAME]." value=""/>
</radio_group>
- <check_box initial_value="vero" label="Abilita plugin" name="browser_plugins_enabled"/>
- <check_box initial_value="vero" label="Accetta cookie" name="cookies_enabled"/>
- <check_box initial_value="vero" label="Abilita Javascript" name="browser_javascript_enabled"/>
- <check_box initial_value="false" label="Abilita proxy Web" name="web_proxy_enabled"/>
+ <check_box label="Abilita plugin" name="browser_plugins_enabled"/>
+ <check_box label="Accetta cookie" name="cookies_enabled"/>
+ <check_box label="Abilita Javascript" name="browser_javascript_enabled"/>
+ <check_box label="Abilita proxy Web" name="web_proxy_enabled"/>
<text name="Proxy location">
Ubicazione proxy:
</text>
diff --git a/indra/newview/skins/default/xui/it/panel_preferences_sound.xml b/indra/newview/skins/default/xui/it/panel_preferences_sound.xml
index 6936f24a8a..9f8a13fedc 100644
--- a/indra/newview/skins/default/xui/it/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/it/panel_preferences_sound.xml
@@ -11,8 +11,8 @@
<check_box label="Abilitato" name="enable_media"/>
<slider label="Chat vocale" name="Voice Volume"/>
<check_box label="Abilitato" name="enable_voice_check"/>
- <check_box label="Consenti riproduzione multimediale automatica" name="media_auto_play_btn" tool_tip="Seleziona qui per consentire la riproduzione multimediale automatica" value="vero"/>
- <check_box label="Riproduci media in uso da altri avatar" name="media_show_on_others_btn" tool_tip="Deseleziona qui per nascondere i media in uso dagli altri avatar nei dintorni" value="vero"/>
+ <check_box label="Consenti riproduzione multimediale automatica" name="media_auto_play_btn" tool_tip="Seleziona qui per consentire la riproduzione multimediale automatica"/>
+ <check_box label="Riproduci media in uso da altri avatar" name="media_show_on_others_btn" tool_tip="Deseleziona qui per nascondere i media in uso dagli altri avatar nei dintorni"/>
<text name="voice_chat_settings">
Impostazioni Chat vocale
</text>
diff --git a/indra/newview/skins/default/xui/ja/floater_avatar_textures.xml b/indra/newview/skins/default/xui/ja/floater_avatar_textures.xml
index 17ba39588e..5c23b77498 100644
--- a/indra/newview/skins/default/xui/ja/floater_avatar_textures.xml
+++ b/indra/newview/skins/default/xui/ja/floater_avatar_textures.xml
@@ -13,7 +13,7 @@
合成
テクスチャ
</text>
- <button label="テクスチャ ID 一覧をコンソールに書き込む" label_selected="ダンプ" name="Dump"/>
+ <button label="ID をコンソールにダンプ" label_selected="ダンプ" name="Dump"/>
<panel name="scroll_content_panel">
<texture_picker label="髪" name="hair-baked"/>
<texture_picker label="髪" name="hair_grain"/>
diff --git a/indra/newview/skins/default/xui/ja/floater_god_tools.xml b/indra/newview/skins/default/xui/ja/floater_god_tools.xml
index ffea9474b0..9e5d473db7 100644
--- a/indra/newview/skins/default/xui/ja/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/ja/floater_god_tools.xml
@@ -14,7 +14,7 @@
<check_box label="可視" name="check visible" tool_tip="この設定により、この地域をゴッド・モード以外でも可視にします。"/>
<check_box label="ダメージ" name="check damage" tool_tip="この設定により、この地域内でダメージを有効化します。"/>
<check_box label="トラフィック・トラッキングをブロック" name="block dwell" tool_tip="この設定により、この地域内のトラフィック計算をオフにします。"/>
- <check_box label="土地整備をブロック" name="block terraform" tool_tip="この設定により、この地域内での土地整備を禁止"/>
+ <check_box label="地形編集をブロック" name="block terraform" tool_tip="この設定により、この地域内での土地整備を禁止"/>
<check_box label="サンドボックス" name="is sandbox" tool_tip="これがサンドボックス地域でも切り替え"/>
<button label="地形を構築する" label_selected="地形を構築する" name="Bake Terrain" tool_tip="現在の地形をデフォルトとして保存します。"/>
<button label="地形を元に戻す" label_selected="地形を元に戻す" name="Revert Terrain" tool_tip="現在の地形をデフォルトに置換します。"/>
diff --git a/indra/newview/skins/default/xui/ja/floater_moveview.xml b/indra/newview/skins/default/xui/ja/floater_moveview.xml
index 6a9d427830..57ab32f486 100644
--- a/indra/newview/skins/default/xui/ja/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/ja/floater_moveview.xml
@@ -7,10 +7,10 @@
後ろに歩く(下矢印か S を押す)
</string>
<string name="walk_left_tooltip">
- 左に歩く(Shift + 左矢印か A を押す)
+ 左に水平移動(Shift + 左矢印か A を押す)
</string>
<string name="walk_right_tooltip">
- 右に歩く(Shift + 右矢印か D を押す)
+ 右に水平移動(Shift + 右矢印か D を押す)
</string>
<string name="run_forward_tooltip">
前に走る(上矢印か W を押す)
@@ -19,10 +19,10 @@
後ろに走る(下矢印か S を押す)
</string>
<string name="run_left_tooltip">
- 左を向く(Shift + 左矢印か A を押す)
+ 左に水平移動(Shift + 左矢印か A を押す)
</string>
<string name="run_right_tooltip">
- 右に走る(Shift + 右矢印か D を押す)
+ 右に水平移動(Shift + 右矢印か D を押す)
</string>
<string name="fly_forward_tooltip">
前に飛ぶ(上矢印か W を押す)
@@ -31,10 +31,10 @@
後ろに飛ぶ(下矢印か S を押す)
</string>
<string name="fly_left_tooltip">
- 左に移動(Shift + 左矢印か A を押す)
+ 左に水平移動(Shift + 左矢印か A を押す)
</string>
<string name="fly_right_tooltip">
- 右を向く(Shift + 右矢印か D を押す)
+ 右に水平移動(Shift + 右矢印か D を押す)
</string>
<string name="fly_up_tooltip">
上に移動(E を押す)
diff --git a/indra/newview/skins/default/xui/ja/menu_avatar_self.xml b/indra/newview/skins/default/xui/ja/menu_avatar_self.xml
index 83d3ec567e..6899a819b8 100644
--- a/indra/newview/skins/default/xui/ja/menu_avatar_self.xml
+++ b/indra/newview/skins/default/xui/ja/menu_avatar_self.xml
@@ -21,8 +21,8 @@
<menu_item_call label="すべて取り外す" name="Detach All"/>
</context_menu>
<menu_item_call label="アウトフィットを変更" name="Chenge Outfit"/>
- <menu_item_call label="アウトフィットの編集" name="Edit Outfit"/>
- <menu_item_call label="シェイプの編集" name="Edit My Shape"/>
+ <menu_item_call label="アウトフィットを編集" name="Edit Outfit"/>
+ <menu_item_call label="シェイプを編集" name="Edit My Shape"/>
<menu_item_call label="フレンド" name="Friends..."/>
<menu_item_call label="グループ" name="Groups..."/>
<menu_item_call label="プロフィール" name="Profile..."/>
diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml
index 5d162eb80f..1ac7677b07 100644
--- a/indra/newview/skins/default/xui/ja/notifications.xml
+++ b/indra/newview/skins/default/xui/ja/notifications.xml
@@ -639,7 +639,7 @@ L$ が不足しているのでこのグループに参加することができ
次のファイルのエンコードができません: [FILE]
</notification>
<notification name="CorruptedProtectedDataStore">
- あなたの保護されたデータを読みとることが出来ないためリセットされます。
+ 保護されているデータを読みとることが出来ないためリセットされます。
ネットワーク設定を変更すると起こることがあります。
<usetemplate name="okbutton" yestext="OK"/>
</notification>
diff --git a/indra/newview/skins/default/xui/ja/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/ja/panel_bodyparts_list_button_bar.xml
index 517fdeb25e..42d8a21660 100644
--- a/indra/newview/skins/default/xui/ja/panel_bodyparts_list_button_bar.xml
+++ b/indra/newview/skins/default/xui/ja/panel_bodyparts_list_button_bar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="clothing_list_button_bar_panel">
- <button label="入れ替える" name="switch_btn"/>
- <button label="ショッピング &gt;" name="bodyparts_shop_btn"/>
+ <button label="交換" name="switch_btn"/>
+ <button label="買い物 &gt;" name="bodyparts_shop_btn"/>
</panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_clothing_list_button_bar.xml b/indra/newview/skins/default/xui/ja/panel_clothing_list_button_bar.xml
index 834884fa4a..2159f17fec 100644
--- a/indra/newview/skins/default/xui/ja/panel_clothing_list_button_bar.xml
+++ b/indra/newview/skins/default/xui/ja/panel_clothing_list_button_bar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="clothing_list_button_bar_panel">
<button label="追加 +" name="add_btn"/>
- <button label="ショッピング &gt;" name="clothing_shop_btn"/>
+ <button label="買い物 &gt;" name="clothing_shop_btn"/>
</panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_edit_shape.xml b/indra/newview/skins/default/xui/ja/panel_edit_shape.xml
index 5aed830d80..5d3bc79e2f 100644
--- a/indra/newview/skins/default/xui/ja/panel_edit_shape.xml
+++ b/indra/newview/skins/default/xui/ja/panel_edit_shape.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_shape_panel">
<text name="avatar_height">
- 高さ [HEIGHT] メートル
+ 身長 [HEIGHT] メートル
</text>
<panel label="シャツ" name="accordion_panel">
<accordion name="wearable_accordion">
diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml
index 94ee5c6ff4..732a5df75f 100644
--- a/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml
@@ -13,7 +13,7 @@
</text>
<check_box label="制作・編集" name="edit_camera_movement" tool_tip="編集モードのオン・オフの切り替えに、自動カメラポジションを使います"/>
<check_box label="容姿" name="appearance_camera_movement" tool_tip="編集モードに入ったときに、自動カメラポジションを使います"/>
- <check_box initial_value="1" label="サイドバー" name="appearance_sidebar_positioning" tool_tip="サイドバーの切り替え時に自動カメラポジションを使います"/>
+ <check_box label="サイドバー" name="appearance_sidebar_positioning" tool_tip="サイドバーの切り替え時に自動カメラポジションを使います"/>
<check_box label="一人称視点で表示する" name="first_person_avatar_visible"/>
<check_box label="常にキー操作で動くようにする" name="arrow_keys_move_avatar_check"/>
<check_box label="上矢印キー2度押し+長押しで走る" name="tap_tap_hold_to_run"/>
diff --git a/indra/newview/skins/default/xui/ja/panel_region_general.xml b/indra/newview/skins/default/xui/ja/panel_region_general.xml
index b72fac1a7c..54ec24773f 100644
--- a/indra/newview/skins/default/xui/ja/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/ja/panel_region_general.xml
@@ -18,7 +18,7 @@
<text left_delta="70" name="region_type">
不明
</text>
- <check_box label="土地整備をブロック" name="block_terraform_check"/>
+ <check_box label="地形編集をブロック" name="block_terraform_check"/>
<check_box label="飛行をブロック" name="block_fly_check"/>
<check_box label="ダメージを許可" name="allow_damage_check"/>
<check_box label="プッシュを制限" name="restrict_pushobject"/>
diff --git a/indra/newview/skins/default/xui/ja/panel_region_texture.xml b/indra/newview/skins/default/xui/ja/panel_region_texture.xml
index 14fc0b4c22..9e442ce091 100644
--- a/indra/newview/skins/default/xui/ja/panel_region_texture.xml
+++ b/indra/newview/skins/default/xui/ja/panel_region_texture.xml
@@ -22,7 +22,7 @@
4(高)
</text>
<text name="height_text_lbl5">
- テクスチャ標高範囲
+ 地形テクスチャの隆起範囲
</text>
<text name="height_text_lbl6">
北西
@@ -45,7 +45,7 @@
<spinner label="高" name="height_range_spin_2"/>
<spinner label="高" name="height_range_spin_3"/>
<text name="height_text_lbl10">
- 数値は上のテクスチャのブレンド範囲を示します。
+ 数値は上のテクスチャが調和する範囲を示します。
</text>
<text name="height_text_lbl11">
計測単位はメートルで、「低」の値は、1番のテクスチャの高さの
diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml
index c0bb14afba..dfc12bc1cb 100644
--- a/indra/newview/skins/default/xui/ja/strings.xml
+++ b/indra/newview/skins/default/xui/ja/strings.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!-- This file contains strings that used to be hardcoded in the source.
It is only for those strings which do not belong in a floater.
For example, the strings used in avatar chat bubbles, and strings
@@ -3762,4 +3762,22 @@ www.secondlife.com から最新バージョンをダウンロードしてくだ
<string name="texture_load_dimensions_error">
[WIDTH]*[HEIGHT] 以上の画像は読み込めません
</string>
+ <!-- overriding datetime formating. leave emtpy in for current localization this is not needed -->
+ <string name="dateTimeWeekdaysNames">
+ Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday
+ </string>
+ <string name="dateTimeWeekdaysShortNames">
+ Son:Mon:Tue:Wed:Thu:Fri:Sat
+ </string>
+ <string name="dateTimeMonthNames">
+ January:February:March:April:May:June:July:August:September:October:November:December
+ </string>
+ <string name="dateTimeMonthNames">
+ Jan:Feb:Mar:Apr:May:Jun:Jul:Aug:Sep:Oct:Nov:Dec
+ </string>
+ <string name="dateTimeDayFormat">
+ [MDAY] D
+ </string>
+ <string name="dateTimeAM">AM</string>
+ <string name="dateTimePM">PM</string>
</strings>
diff --git a/indra/newview/skins/default/xui/pl/floater_about_land.xml b/indra/newview/skins/default/xui/pl/floater_about_land.xml
index e4908deb07..163868f200 100644
--- a/indra/newview/skins/default/xui/pl/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/pl/floater_about_land.xml
@@ -196,13 +196,13 @@ Idź do Świat &gt; O Posiadłości albo wybierz inną posiadłość żeby pokaz
<text name="resellable_lbl">
Odsprzedaj:
</text>
- <text left="115" name="resellable_clause" width="338">
+ <text left="115" name="resellable_clause">
Posiadłość zakupiona w tym Regionie nie może być odsprzedana.
</text>
<text name="changeable_lbl">
Podziel:
</text>
- <text left="115" name="changeable_clause" width="338">
+ <text left="115" name="changeable_clause">
Posiadłość zakupiona w tym Regionie nie może być
łączona/dzielona.
</text>
diff --git a/indra/newview/skins/default/xui/pl/floater_world_map.xml b/indra/newview/skins/default/xui/pl/floater_world_map.xml
index 95010e0b91..05287ad42a 100644
--- a/indra/newview/skins/default/xui/pl/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/pl/floater_world_map.xml
@@ -35,7 +35,7 @@
<text name="pg_label">
Ogólne
</text>
- <check_box initial_value="prawda" name="event_mature_chk"/>
+ <check_box name="event_mature_chk"/>
<text name="mature_label">
Moderuj
</text>
diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_setup.xml b/indra/newview/skins/default/xui/pl/panel_preferences_setup.xml
index f74f4f2333..98fdffeb50 100644
--- a/indra/newview/skins/default/xui/pl/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/pl/panel_preferences_setup.xml
@@ -38,10 +38,10 @@
<radio_item label="Użyj zewnętrznej przeglądarki (IE, Firefox, Safari)" name="external" tool_tip="Używaj zewnętrznej przeglądarki. Nie jest to rekomendowane w trybie pełnoekranowym." value="1"/>
<radio_item label="Używaj wbudowanej przeglądarki." name="internal" tool_tip="Używaj wbudowanej przeglądarki. Ta przeglądarka otworzy nowe okno w [APP_NAME]." value=""/>
</radio_group>
- <check_box initial_value="prawda" label="Zezwalaj na wtyczki" name="browser_plugins_enabled"/>
- <check_box initial_value="prawda" label="Akceptuj ciasteczka z Internetu" name="cookies_enabled"/>
- <check_box initial_value="prawda" label="Zezwalaj na Javascript" name="browser_javascript_enabled"/>
- <check_box initial_value="false" label="Używaj Serwera Proxy" name="web_proxy_enabled"/>
+ <check_box label="Zezwalaj na wtyczki" name="browser_plugins_enabled"/>
+ <check_box label="Akceptuj ciasteczka z Internetu" name="cookies_enabled"/>
+ <check_box label="Zezwalaj na Javascript" name="browser_javascript_enabled"/>
+ <check_box label="Używaj Serwera Proxy" name="web_proxy_enabled"/>
<text name="Proxy location">
Lokalizacja Proxy:
</text>
diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml
index 04372208d6..6ab5be77d8 100644
--- a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Dźwięki" name="Preference Media panel">
<slider label="Główny" name="System Volume"/>
- <check_box initial_value="true" label="Wycisz podczas minimalizacji" name="mute_when_minimized"/>
+ <check_box label="Wycisz podczas minimalizacji" name="mute_when_minimized"/>
<slider label="Interfejs" name="UI Volume"/>
<slider label="Otoczenie" name="Wind Volume"/>
<slider label="Efekty dźwiękowe" name="SFX Volume"/>
@@ -11,8 +11,8 @@
<check_box label="Odtwarzaj media" name="enable_media"/>
<slider label="Komunikacja Głosowa" name="Voice Volume"/>
<check_box label="Pozwól na rozmowy głosowe" name="enable_voice_check"/>
- <check_box label="Automatycznie odtwarzaj media" name="media_auto_play_btn" tool_tip="Zaznacz tę funkcję by uruchomić automatyczne uruchamianie mediów" value="prawda"/>
- <check_box label="Uruchom media załączone do innych awatarów" name="media_show_on_others_btn" tool_tip="Odznacz tę funkcję by ukryć media załączone to awatarów w publiżu" value="prawda"/>
+ <check_box label="Automatycznie odtwarzaj media" name="media_auto_play_btn" tool_tip="Zaznacz tę funkcję by uruchomić automatyczne uruchamianie mediów"/>
+ <check_box label="Uruchom media załączone do innych awatarów" name="media_show_on_others_btn" tool_tip="Odznacz tę funkcję by ukryć media załączone to awatarów w publiżu"/>
<text name="voice_chat_settings">
Ustawienia Komunikacji Głosowej
</text>
diff --git a/indra/newview/skins/default/xui/pt/floater_world_map.xml b/indra/newview/skins/default/xui/pt/floater_world_map.xml
index efd90dfaa4..65e48b4bfd 100644
--- a/indra/newview/skins/default/xui/pt/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/pt/floater_world_map.xml
@@ -39,7 +39,7 @@
<text name="pg_label">
Público geral
</text>
- <check_box initial_value="verdadeiro" label="Mature" name="event_mature_chk"/>
+ <check_box label="Mature" name="event_mature_chk"/>
<text name="mature_label">
Moderado
</text>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_setup.xml b/indra/newview/skins/default/xui/pt/panel_preferences_setup.xml
index f03063d05b..5266f646b7 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_setup.xml
@@ -37,9 +37,9 @@
<radio_item label="Usar meu navegador (IE, Firefox, Safari)" name="external" tool_tip="Use o navegador incluso para consultar a ajuda, abrir links da web, etc. Uso em tela inteira não recomendado." value="1"/>
<radio_item label="Usar navegador incluso" name="internal" tool_tip="Use este navegador para consultar a ajuda, abrir links da web, etc. As janelas abrem dentro do [APP_NAME]." value=""/>
</radio_group>
- <check_box initial_value="verdadeiro" label="Habilitar plugins" name="browser_plugins_enabled"/>
- <check_box initial_value="verdadeiro" label="Aceitar cookies" name="cookies_enabled"/>
- <check_box initial_value="verdadeiro" label="Habilitar Javascript" name="browser_javascript_enabled"/>
+ <check_box initial_value="true" label="Habilitar plugins" name="browser_plugins_enabled"/>
+ <check_box initial_value="true" label="Aceitar cookies" name="cookies_enabled"/>
+ <check_box initial_value="true" label="Habilitar Javascript" name="browser_javascript_enabled"/>
<check_box initial_value="false" label="Ativar web proxy" name="web_proxy_enabled"/>
<text name="Proxy location">
Localização do proxy:
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml b/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml
index 5dbd3d4904..43c970841a 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml
@@ -11,8 +11,8 @@
<check_box label="Ativado" name="enable_media"/>
<slider label="Bate-papo de voz" name="Voice Volume"/>
<check_box label="Ativado" name="enable_voice_check"/>
- <check_box label="Autorizar auto-play de mídias" name="media_auto_play_btn" tool_tip="Marque esta opção para auto-executar mídias, se elas quiserem" value="verdadeiro"/>
- <check_box label="Tocar mídia anexada em outros avatares" name="media_show_on_others_btn" tool_tip="Desmarque esta opção para ocultar mídias anexadas em avatares por perto" value="verdadeiro"/>
+ <check_box label="Autorizar auto-play de mídias" name="media_auto_play_btn" tool_tip="Marque esta opção para auto-executar mídias, se elas quiserem"/>
+ <check_box label="Tocar mídia anexada em outros avatares" name="media_show_on_others_btn" tool_tip="Desmarque esta opção para ocultar mídias anexadas em avatares por perto"/>
<text name="voice_chat_settings">
Configuração de bate-papo de voz
</text>
diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp
index fd680b24f0..fa9fff3ac9 100644
--- a/indra/newview/tests/llsechandler_basic_test.cpp
+++ b/indra/newview/tests/llsechandler_basic_test.cpp
@@ -54,7 +54,7 @@
#include <openssl/asn1.h>
#include <openssl/rand.h>
#include <openssl/err.h>
-
+#include "../llmachineid.h"
#define ensure_throws(str, exc_type, cert, func, ...) \
try \
@@ -115,6 +115,15 @@ void LLCredential::authenticatorType(std::string &idType)
LLControlGroup gSavedSettings("test");
unsigned char gMACAddress[MAC_ADDRESS_BYTES] = {77,21,46,31,89,2};
+
+S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len)
+{
+ memcpy(unique_id, gMACAddress, len);
+ return 1;
+}
+S32 LLMachineID::init() { return 1; }
+
+
// -------------------------------------------------------------------------------------------
// TUT
// -------------------------------------------------------------------------------------------
@@ -129,6 +138,7 @@ namespace tut
sechandler_basic_test()
{
+ LLMachineID::init();
OpenSSL_add_all_algorithms();
OpenSSL_add_all_ciphers();
OpenSSL_add_all_digests();
@@ -328,7 +338,8 @@ namespace tut
ensure_equals("Der Format is correct", memcmp(buffer, mDerFormat.c_str(), mDerFormat.length()), 0);
- LLSD llsd_cert = test_cert->getLLSD();
+ LLSD llsd_cert;
+ test_cert->getLLSD(llsd_cert);
std::ostringstream llsd_value;
llsd_value << LLSDOStreamer<LLSDNotationFormatter>(llsd_cert) << std::endl;
std::string llsd_cert_str = llsd_value.str();
@@ -376,8 +387,6 @@ namespace tut
void sechandler_basic_test_object::test<2>()
{
- unsigned char MACAddress[MAC_ADDRESS_BYTES];
- LLUUID::getNodeID(MACAddress);
std::string protected_data = "sUSh3wj77NG9oAMyt3XIhaej3KLZhLZWFZvI6rIGmwUUOmmelrRg0NI9rkOj8ZDpTPxpwToaBT5u"
"GQhakdaGLJznr9bHr4/6HIC1bouKj4n2rs4TL6j2WSjto114QdlNfLsE8cbbE+ghww58g8SeyLQO"
@@ -390,7 +399,9 @@ namespace tut
LLXORCipher cipher(gMACAddress, MAC_ADDRESS_BYTES);
cipher.decrypt(&binary_data[0], 16);
- LLXORCipher cipher2(MACAddress, MAC_ADDRESS_BYTES);
+ unsigned char unique_id[MAC_ADDRESS_BYTES];
+ LLMachineID::getUniqueID(unique_id, sizeof(unique_id));
+ LLXORCipher cipher2(unique_id, sizeof(unique_id));
cipher2.encrypt(&binary_data[0], 16);
std::ofstream temp_file("sechandler_settings.tmp", std::ofstream::binary);
temp_file.write((const char *)&binary_data[0], binary_data.size());
@@ -571,11 +582,11 @@ namespace tut
int length = apr_base64_decode_len(hashed_password.c_str());
std::vector<char> decoded_password(length);
apr_base64_decode(&decoded_password[0], hashed_password.c_str());
- unsigned char MACAddress[MAC_ADDRESS_BYTES];
- LLUUID::getNodeID(MACAddress);
LLXORCipher cipher(gMACAddress, MAC_ADDRESS_BYTES);
cipher.decrypt((U8*)&decoded_password[0], length);
- LLXORCipher cipher2(MACAddress, MAC_ADDRESS_BYTES);
+ unsigned char unique_id[MAC_ADDRESS_BYTES];
+ LLMachineID::getUniqueID(unique_id, sizeof(unique_id));
+ LLXORCipher cipher2(unique_id, sizeof(unique_id));
cipher2.encrypt((U8*)&decoded_password[0], length);
llofstream password_file("test_password.dat", std::ofstream::binary);
password_file.write(&decoded_password[0], length);
@@ -950,31 +961,38 @@ namespace tut
test_chain->add(new LLBasicCertificate(mX509IntermediateCert));
- test_chain->validate(0, test_store, validation_params);
+ test_store->validate(0, test_chain, validation_params);
// add the root certificate to the chain and revalidate
test_chain->add(new LLBasicCertificate(mX509RootCert));
- test_chain->validate(0, test_store, validation_params);
+ test_store->validate(0, test_chain, validation_params);
// add the child cert at the head of the chain, and revalidate (3 deep chain)
test_chain->insert(test_chain->begin(), new LLBasicCertificate(mX509ChildCert));
- test_chain->validate(0, test_store, validation_params);
+ test_store->validate(0, test_chain, validation_params);
// basic failure cases
test_chain = new LLBasicCertificateChain(NULL);
- //validate with only the child cert
+ //validate with only the child cert in chain, but child cert was previously
+ // trusted
test_chain->add(new LLBasicCertificate(mX509ChildCert));
+
+ // validate without the trust flag.
+ test_store->validate(VALIDATION_POLICY_TRUSTED, test_chain, validation_params);
+
+ // Validate with child cert but no parent, and no parent in CA store
+ test_store = new LLBasicCertificateStore("mycertstore.pem");
ensure_throws("no CA, with only a child cert",
LLCertValidationTrustException,
(*test_chain)[0],
- test_chain->validate,
+ test_store->validate,
VALIDATION_POLICY_TRUSTED,
- test_store,
+ test_chain,
validation_params);
// validate without the trust flag.
- test_chain->validate(0, test_store, validation_params);
+ test_store->validate(0, test_chain, validation_params);
// clear out the store
test_store = new LLBasicCertificateStore("mycertstore.pem");
@@ -983,18 +1001,19 @@ namespace tut
ensure_throws("no CA, with child and intermediate certs",
LLCertValidationTrustException,
(*test_chain)[1],
- test_chain->validate,
+ test_store->validate,
VALIDATION_POLICY_TRUSTED,
- test_store,
+ test_chain,
validation_params);
// validate without the trust flag
- test_chain->validate(0, test_store, validation_params);
+ test_store->validate(0, test_chain, validation_params);
// Test time validity
- LLSD child_info = (*test_chain)[0]->getLLSD();
+ LLSD child_info;
+ ((*test_chain)[0])->getLLSD(child_info);
validation_params = LLSD::emptyMap();
validation_params[CERT_VALIDATION_DATE] = LLDate(child_info[CERT_VALID_FROM].asDate().secondsSinceEpoch() + 1.0);
- test_chain->validate(VALIDATION_POLICY_TIME, test_store, validation_params);
+ test_store->validate(VALIDATION_POLICY_TIME, test_chain, validation_params);
validation_params = LLSD::emptyMap();
validation_params[CERT_VALIDATION_DATE] = child_info[CERT_VALID_FROM].asDate();
@@ -1005,9 +1024,9 @@ namespace tut
ensure_throws("Child cert not yet valid" ,
LLCertValidationExpirationException,
(*test_chain)[0],
- test_chain->validate,
+ test_store->validate,
VALIDATION_POLICY_TIME,
- test_store,
+ test_chain,
validation_params);
validation_params = LLSD::emptyMap();
validation_params[CERT_VALIDATION_DATE] = LLDate(child_info[CERT_VALID_TO].asDate().secondsSinceEpoch() + 1.0);
@@ -1016,9 +1035,9 @@ namespace tut
ensure_throws("Child cert expired",
LLCertValidationExpirationException,
(*test_chain)[0],
- test_chain->validate,
+ test_store->validate,
VALIDATION_POLICY_TIME,
- test_store,
+ test_chain,
validation_params);
// test SSL KU
@@ -1026,17 +1045,18 @@ namespace tut
test_chain = new LLBasicCertificateChain(NULL);
test_chain->add(new LLBasicCertificate(mX509ChildCert));
test_chain->add(new LLBasicCertificate(mX509IntermediateCert));
- test_chain->validate(VALIDATION_POLICY_SSL_KU, test_store, validation_params);
+ test_store->validate(VALIDATION_POLICY_SSL_KU, test_chain, validation_params);
test_chain = new LLBasicCertificateChain(NULL);
test_chain->add(new LLBasicCertificate(mX509TestCert));
+ test_store = new LLBasicCertificateStore("mycertstore.pem");
ensure_throws("Cert doesn't have ku",
LLCertKeyUsageValidationException,
(*test_chain)[0],
- test_chain->validate,
+ test_store->validate,
VALIDATION_POLICY_SSL_KU,
- test_store,
+ test_chain,
validation_params);
// test sha1RSA validation
@@ -1044,7 +1064,7 @@ namespace tut
test_chain->add(new LLBasicCertificate(mSha1RSATestCert));
test_chain->add(new LLBasicCertificate(mSha1RSATestCA));
- test_chain->validate(0, test_store, validation_params);
+ test_store->validate(0, test_chain, validation_params);
}
};
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index d819b44564..5fba5eb69c 100644
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -148,7 +148,8 @@ namespace tut
known_grids[std::string("util.agni.lindenlab.com")], std::string("Agni"));
ensure_equals("None exists", known_grids[""], "None");
- LLSD grid = LLGridManager::getInstance()->getGridInfo("util.agni.lindenlab.com");
+ LLSD grid;
+ LLGridManager::getInstance()->getGridInfo("util.agni.lindenlab.com", grid);
ensure("Grid info for agni is a map", grid.isMap());
ensure_equals("name is correct for agni",
grid[GRID_VALUE].asString(), std::string("util.agni.lindenlab.com"));
@@ -190,7 +191,8 @@ namespace tut
// assure Agni doesn't get overwritten
- LLSD grid = LLGridManager::getInstance()->getGridInfo("util.agni.lindenlab.com");
+ LLSD grid;
+ LLGridManager::getInstance()->getGridInfo("util.agni.lindenlab.com", grid);
ensure_equals("Agni grid label was not modified by grid file",
grid[GRID_LABEL_VALUE].asString(), std::string("Agni"));
@@ -215,7 +217,7 @@ namespace tut
ensure_equals("Grid file adds to name<->label map",
known_grids["grid1"], std::string("mylabel"));
- grid = LLGridManager::getInstance()->getGridInfo("grid1");
+ LLGridManager::getInstance()->getGridInfo("grid1", grid);
ensure_equals("grid file grid name is set",
grid[GRID_VALUE].asString(), std::string("grid1"));
ensure_equals("grid file label is set",
@@ -244,35 +246,20 @@ namespace tut
template<> template<>
void viewerNetworkTestObject::test<3>()
{
- gCmdLineLoginURI = "https://my.login.uri/cgi-bin/login.cgi";
-
+ // USE --grid command line
+ // initialize with a known grid
+ LLSD grid;
+ gCmdLineGridChoice = "Aditi";
LLGridManager::getInstance()->initialize("grid_test.xml");
// with single login uri specified.
std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids();
- ensure_equals("adding a command line grid increases known grid size",
- known_grids.size(), 24);
- ensure_equals("Command line grid is added to the list of grids",
- known_grids["my.login.uri"], std::string("my.login.uri"));
- LLSD grid = LLGridManager::getInstance()->getGridInfo("my.login.uri");
- ensure_equals("Command line grid name is set",
- grid[GRID_VALUE].asString(), std::string("my.login.uri"));
- ensure_equals("Command line grid label is set",
- grid[GRID_LABEL_VALUE].asString(), std::string("my.login.uri"));
- ensure("Command line grid login uri is an array",
- grid[GRID_LOGIN_URI_VALUE].isArray());
- ensure_equals("Command line grid login uri is set",
- grid[GRID_LOGIN_URI_VALUE][0].asString(),
- std::string("https://my.login.uri/cgi-bin/login.cgi"));
- ensure_equals("Command line grid helper uri is set",
- grid[GRID_HELPER_URI_VALUE].asString(),
- std::string("https://my.login.uri/helpers/"));
- ensure_equals("Command line grid login page is set",
- grid[GRID_LOGIN_PAGE_VALUE].asString(),
- std::string("http://my.login.uri/app/login/"));
- ensure("Command line grid favorite is set",
- !grid.has(GRID_IS_FAVORITE_VALUE));
- ensure("Command line grid isn't a system grid",
- !grid.has(GRID_IS_SYSTEM_GRID_VALUE));
+ ensure_equals("Using a known grid via command line doesn't increase number of known grids",
+ known_grids.size(), 23);
+ ensure_equals("getGridLabel", LLGridManager::getInstance()->getGridLabel(), std::string("Aditi"));
+ // initialize with a known grid in lowercase
+ gCmdLineGridChoice = "agni";
+ LLGridManager::getInstance()->initialize("grid_test.xml");
+ ensure_equals("getGridLabel", LLGridManager::getInstance()->getGridLabel(), std::string("Agni"));
// now try a command line with a custom grid identifier
gCmdLineGridChoice = "mycustomgridchoice";
@@ -282,7 +269,7 @@ namespace tut
known_grids.size(), 24);
ensure_equals("Custom Command line grid is added to the list of grids",
known_grids["mycustomgridchoice"], std::string("mycustomgridchoice"));
- grid = LLGridManager::getInstance()->getGridInfo("mycustomgridchoice");
+ LLGridManager::getInstance()->getGridInfo("mycustomgridchoice", grid);
ensure_equals("Custom Command line grid name is set",
grid[GRID_VALUE].asString(), std::string("mycustomgridchoice"));
ensure_equals("Custom Command line grid label is set",
@@ -291,26 +278,165 @@ namespace tut
grid[GRID_LOGIN_URI_VALUE].isArray());
ensure_equals("Custom Command line grid login uri is set",
grid[GRID_LOGIN_URI_VALUE][0].asString(),
+ std::string("https://mycustomgridchoice/cgi-bin/login.cgi"));
+ ensure_equals("Custom Command line grid helper uri is set",
+ grid[GRID_HELPER_URI_VALUE].asString(),
+ std::string("https://mycustomgridchoice/helpers/"));
+ ensure_equals("Custom Command line grid login page is set",
+ grid[GRID_LOGIN_PAGE_VALUE].asString(),
+ std::string("http://mycustomgridchoice/app/login/"));
+ }
+
+ // validate override of login uri with cmd line
+ template<> template<>
+ void viewerNetworkTestObject::test<4>()
+ {
+ // Override with loginuri
+ // override known grid
+ LLSD grid;
+ gCmdLineGridChoice = "Aditi";
+ gCmdLineLoginURI = "https://my.login.uri/cgi-bin/login.cgi";
+ LLGridManager::getInstance()->initialize("grid_test.xml");
+ std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids();
+ ensure_equals("Override known grid login uri: No grids are added",
+ known_grids.size(), 23);
+ LLGridManager::getInstance()->getGridInfo(grid);
+ ensure("Override known grid login uri: login uri is an array",
+ grid[GRID_LOGIN_URI_VALUE].isArray());
+ ensure_equals("Override known grid login uri: Command line grid login uri is set",
+ grid[GRID_LOGIN_URI_VALUE][0].asString(),
std::string("https://my.login.uri/cgi-bin/login.cgi"));
+ ensure_equals("Override known grid login uri: helper uri is not changed",
+ grid[GRID_HELPER_URI_VALUE].asString(),
+ std::string("http://aditi-secondlife.webdev.lindenlab.com/helpers/"));
+ ensure_equals("Override known grid login uri: login page is not set",
+ grid[GRID_LOGIN_PAGE_VALUE].asString(),
+ std::string("http://secondlife.com/app/login/"));
- // add a helperuri
- gCmdLineHelperURI = "myhelperuri";
- LLGridManager::getInstance()->initialize("grid_test.xml");
- grid = LLGridManager::getInstance()->getGridInfo("mycustomgridchoice");
- ensure_equals("Validate command line helper uri",
- grid[GRID_HELPER_URI_VALUE].asString(), std::string("myhelperuri"));
+ // Override with loginuri
+ // override custom grid
+ gCmdLineGridChoice = "mycustomgridchoice";
+ gCmdLineLoginURI = "https://my.login.uri/cgi-bin/login.cgi";
+ LLGridManager::getInstance()->initialize("grid_test.xml");
+ known_grids = LLGridManager::getInstance()->getKnownGrids();
+ LLGridManager::getInstance()->getGridInfo(grid);
+ ensure_equals("Override custom grid login uri: Grid is added",
+ known_grids.size(), 24);
+ ensure("Override custom grid login uri: login uri is an array",
+ grid[GRID_LOGIN_URI_VALUE].isArray());
+ ensure_equals("Override custom grid login uri: login uri is set",
+ grid[GRID_LOGIN_URI_VALUE][0].asString(),
+ std::string("https://my.login.uri/cgi-bin/login.cgi"));
+ ensure_equals("Override custom grid login uri: Helper uri is not set",
+ grid[GRID_HELPER_URI_VALUE].asString(),
+ std::string("https://mycustomgridchoice/helpers/"));
+ ensure_equals("Override custom grid login uri: Login page is not set",
+ grid[GRID_LOGIN_PAGE_VALUE].asString(),
+ std::string("http://mycustomgridchoice/app/login/"));
+ }
+
+ // validate override of helper uri with cmd line
+ template<> template<>
+ void viewerNetworkTestObject::test<5>()
+ {
+ // Override with helperuri
+ // override known grid
+ LLSD grid;
+ gCmdLineGridChoice = "Aditi";
+ gCmdLineLoginURI = "";
+ gCmdLineHelperURI = "https://my.helper.uri/mycustomhelpers";
+ LLGridManager::getInstance()->initialize("grid_test.xml");
+ std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids();
+ ensure_equals("Override known grid helper uri: No grids are added",
+ known_grids.size(), 23);
+ LLGridManager::getInstance()->getGridInfo(grid);
+ ensure("Override known known helper uri: login uri is an array",
+ grid[GRID_LOGIN_URI_VALUE].isArray());
+ ensure_equals("Override known grid helper uri: login uri is not changed",
+ grid[GRID_LOGIN_URI_VALUE][0].asString(),
+ std::string("https://login.aditi.lindenlab.com/cgi-bin/login.cgi"));
+ ensure_equals("Override known grid helper uri: helper uri is changed",
+ grid[GRID_HELPER_URI_VALUE].asString(),
+ std::string("https://my.helper.uri/mycustomhelpers"));
+ ensure_equals("Override known grid helper uri: login page is not changed",
+ grid[GRID_LOGIN_PAGE_VALUE].asString(),
+ std::string("http://secondlife.com/app/login/"));
+
+ // Override with helperuri
+ // override custom grid
+ gCmdLineGridChoice = "mycustomgridchoice";
+ gCmdLineHelperURI = "https://my.helper.uri/mycustomhelpers";
+ LLGridManager::getInstance()->initialize("grid_test.xml");
+ known_grids = LLGridManager::getInstance()->getKnownGrids();
+ ensure_equals("Override custom grid helper uri: grids is added",
+ known_grids.size(), 24);
+ LLGridManager::getInstance()->getGridInfo(grid);
+ ensure("Override custom helper uri: login uri is an array",
+ grid[GRID_LOGIN_URI_VALUE].isArray());
+ ensure_equals("Override custom grid helper uri: login uri is not changed",
+ grid[GRID_LOGIN_URI_VALUE][0].asString(),
+ std::string("https://mycustomgridchoice/cgi-bin/login.cgi"));
+ ensure_equals("Override custom grid helper uri: helper uri is changed",
+ grid[GRID_HELPER_URI_VALUE].asString(),
+ std::string("https://my.helper.uri/mycustomhelpers"));
+ ensure_equals("Override custom grid helper uri: login page is not changed",
+ grid[GRID_LOGIN_PAGE_VALUE].asString(),
+ std::string("http://mycustomgridchoice/app/login/"));
+ }
+
+ // validate overriding of login page via cmd line
+ template<> template<>
+ void viewerNetworkTestObject::test<6>()
+ {
+ // Override with login page
+ // override known grid
+ LLSD grid;
+ gCmdLineGridChoice = "Aditi";
+ gCmdLineHelperURI = "";
+ gLoginPage = "myloginpage";
+ LLGridManager::getInstance()->initialize("grid_test.xml");
+ std::map<std::string, std::string> known_grids = LLGridManager::getInstance()->getKnownGrids();
+ ensure_equals("Override known grid login page: No grids are added",
+ known_grids.size(), 23);
+ LLGridManager::getInstance()->getGridInfo(grid);
+ ensure("Override known grid login page: Command line grid login uri is an array",
+ grid[GRID_LOGIN_URI_VALUE].isArray());
+ ensure_equals("Override known grid login page: login uri is not changed",
+ grid[GRID_LOGIN_URI_VALUE][0].asString(),
+ std::string("https://login.aditi.lindenlab.com/cgi-bin/login.cgi"));
+ ensure_equals("Override known grid login page: helper uri is not changed",
+ grid[GRID_HELPER_URI_VALUE].asString(),
+ std::string("http://aditi-secondlife.webdev.lindenlab.com/helpers/"));
+ ensure_equals("Override known grid login page: login page is changed",
+ grid[GRID_LOGIN_PAGE_VALUE].asString(),
+ std::string("myloginpage"));
- // add a login page
+ // Override with login page
+ // override custom grid
+ gCmdLineGridChoice = "mycustomgridchoice";
gLoginPage = "myloginpage";
- LLGridManager::getInstance()->initialize("grid_test.xml");
- grid = LLGridManager::getInstance()->getGridInfo("mycustomgridchoice");
- ensure_equals("Validate command line helper uri",
- grid[GRID_LOGIN_PAGE_VALUE].asString(), std::string("myloginpage"));
+ LLGridManager::getInstance()->initialize("grid_test.xml");
+ known_grids = LLGridManager::getInstance()->getKnownGrids();
+ ensure_equals("Override custom grid login page: grids are added",
+ known_grids.size(), 24);
+ LLGridManager::getInstance()->getGridInfo(grid);
+ ensure("Override custom grid login page: Command line grid login uri is an array",
+ grid[GRID_LOGIN_URI_VALUE].isArray());
+ ensure_equals("Override custom grid login page: login uri is not changed",
+ grid[GRID_LOGIN_URI_VALUE][0].asString(),
+ std::string("https://mycustomgridchoice/cgi-bin/login.cgi"));
+ ensure_equals("Override custom grid login page: helper uri is not changed",
+ grid[GRID_HELPER_URI_VALUE].asString(),
+ std::string("https://mycustomgridchoice/helpers/"));
+ ensure_equals("Override custom grid login page: login page is changed",
+ grid[GRID_LOGIN_PAGE_VALUE].asString(),
+ std::string("myloginpage"));
+
}
// validate grid selection
template<> template<>
- void viewerNetworkTestObject::test<4>()
+ void viewerNetworkTestObject::test<7>()
{
LLSD loginURI = LLSD::emptyArray();
LLSD grid = LLSD::emptyMap();
@@ -340,20 +466,20 @@ namespace tut
ensure("Is myaddedgrid a production grid", !LLGridManager::getInstance()->isInProductionGrid());
LLGridManager::getInstance()->setFavorite();
- grid = LLGridManager::getInstance()->getGridInfo("myaddedgrid");
+ LLGridManager::getInstance()->getGridInfo("myaddedgrid", grid);
ensure("setting favorite", grid.has(GRID_IS_FAVORITE_VALUE));
}
// name based grid population
template<> template<>
- void viewerNetworkTestObject::test<5>()
+ void viewerNetworkTestObject::test<8>()
{
LLGridManager::getInstance()->initialize("grid_test.xml");
LLSD grid = LLSD::emptyMap();
// adding a grid with simply a name will populate the values.
grid[GRID_VALUE] = "myaddedgrid";
LLGridManager::getInstance()->addGrid(grid);
- grid = LLGridManager::getInstance()->getGridInfo("myaddedgrid");
+ LLGridManager::getInstance()->getGridInfo("myaddedgrid", grid);
ensure_equals("name based grid has name value",
grid[GRID_VALUE].asString(),
@@ -386,7 +512,7 @@ namespace tut
// persistence of the grid list with an empty gridfile.
template<> template<>
- void viewerNetworkTestObject::test<6>()
+ void viewerNetworkTestObject::test<9>()
{
// try with initial grid list without a grid file,
// without setting the grid to a saveable favorite.
@@ -420,7 +546,7 @@ namespace tut
// persistence of the grid file with existing gridfile
template<> template<>
- void viewerNetworkTestObject::test<7>()
+ void viewerNetworkTestObject::test<10>()
{
llofstream gridfile("grid_test.xml");
diff --git a/install.xml b/install.xml
index 1265963fb1..ccebe2fe50 100644
--- a/install.xml
+++ b/install.xml
@@ -1386,23 +1386,23 @@ anguage Infrstructure (CLI) international standard</string>
<key>darwin</key>
<map>
<key>md5sum</key>
- <string>4d29351a842fafe617de65a8183da160</string>
+ <string>aa144917d0e33453d3c2cc2c05c6c47c</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8744-darwin-20100519.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8821-darwin-20100529.tar.bz2</uri>
</map>
<key>linux</key>
<map>
<key>md5sum</key>
- <string>7541138c439b1c0312610d18968f27d2</string>
+ <string>98f7945755f3ee8e52f685a3eff4d7be</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8744-linux-20100519.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8821-linux-20100529.tar.bz2</uri>
</map>
<key>windows</key>
<map>
<key>md5sum</key>
- <string>5d2b049ca5239da2dcebde91f7f25a43</string>
+ <string>e8fdd46cb026c2ec72c4489eb3bf39c1</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8744-windows-20100519.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8821-windows-20100529.tar.bz2</uri>
</map>
</map>
</map>