diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-11 19:05:51 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-11 19:05:51 +0000 |
commit | 773e8eb8ea3acc75b0e8137412458f77effffb70 (patch) | |
tree | b3e5a3069ac0ef154f10971ae701940eab369fcc /indra | |
parent | 15ff4379e53eb5b3ed914c46c0051c3926de1ecb (diff) | |
parent | a97c4d3ad879b8e53696b9cab9c5ab7141c7fc6c (diff) |
merge from viewer2.
trivial xml conflict resolved.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llfolderview.cpp | 26 | ||||
-rw-r--r-- | indra/newview/llfolderview.h | 5 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 117 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llpanelmediasettingsgeneral.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llplacesinventorypanel.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 36 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_about_land.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 10 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_main_inventory.xml | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_people.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_privacy.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 2 |
15 files changed, 132 insertions, 94 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 0cceba6cb0..018e9a92a0 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -666,6 +666,11 @@ void LLAppearanceManager::filterWearableItems( if (!item->isWearableType()) continue; EWearableType type = item->getWearableType(); + if(type < 0 || type >= WT_COUNT) + { + LL_WARNS("Appearance") << "Invalid wearable type. Inventory type does not match wearable flag bitfield." << LL_ENDL; + continue; + } items_by_type[type].push_back(item); } diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 57c7ba8e27..8dbdfff635 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -195,7 +195,8 @@ LLFolderView::LLFolderView(const Params& p) mCallbackRegistrar(NULL), mParentPanel(p.parent_panel), mUseEllipses(false), - mDraggingOverItem(NULL) + mDraggingOverItem(NULL), + mStatusTextBox(NULL) { LLRect rect = p.rect; LLRect new_rect(rect.mLeft, rect.mBottom + getRect().getHeight(), rect.mLeft + getRect().getWidth(), rect.mBottom); @@ -231,6 +232,18 @@ LLFolderView::LLFolderView(const Params& p) mRenamer = LLUICtrlFactory::create<LLLineEditor> (params); addChild(mRenamer); + // Textbox + LLTextBox::Params text_p; + LLRect new_r(5, 13-50, 300, 0-50); + text_p.name(std::string(p.name)); + text_p.rect(new_r); + text_p.font(getLabelFontForStyle(mLabelStyle)); + text_p.visible(false); + text_p.allow_html(true); + mStatusTextBox = LLUICtrlFactory::create<LLTextBox> (text_p); + //addChild(mStatusTextBox); + + // make the popup menu available LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if (!menu) @@ -253,6 +266,7 @@ LLFolderView::~LLFolderView( void ) mScrollContainer = NULL; mRenameItem = NULL; mRenamer = NULL; + mStatusTextBox = NULL; if( gEditMenuHandler == this ) { @@ -874,7 +888,7 @@ void LLFolderView::draw() LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } - LLFontGL* font = getLabelFontForStyle(mLabelStyle); + //LLFontGL* font = getLabelFontForStyle(mLabelStyle); // if cursor has moved off of me during drag and drop // close all auto opened folders @@ -911,19 +925,23 @@ void LLFolderView::draw() || mFilter->getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS) { mStatusText.clear(); + mStatusTextBox->setVisible( FALSE ); } else { if (gInventory.backgroundFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration()) { mStatusText = LLTrans::getString("Searching"); - font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); + //font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } else { mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage()); - font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); + //font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } + mStatusTextBox->setValue(mStatusText); + mStatusTextBox->setVisible( TRUE ); + } LLFolderViewFolder::draw(); diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 56ebdfcf79..faf6a9cf23 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -62,6 +62,7 @@ class LLLineEditor; class LLMenuGL; class LLScrollContainer; class LLUICtrl; +class LLTextBox; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLFolderViewFunctor @@ -327,7 +328,7 @@ protected: LLUUID mSelectThisID; // if non null, select this item - LLPanel* mParentPanel; + LLPanel* mParentPanel; /** * Is used to determine if we need to cut text In LLFolderViewItem to avoid horizontal scroll. @@ -344,6 +345,8 @@ protected: public: static F32 sAutoOpenTime; + LLTextBox* mStatusTextBox; + }; bool sort_item_name(LLFolderViewItem* a, LLFolderViewItem* b); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 5a6c6ebbee..77e3012d26 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -256,12 +256,12 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES { case LLVoiceChannel::STATE_CALL_STARTED : message = other_avatar_name + " " + started_call; - LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); + LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; case LLVoiceChannel::STATE_CONNECTED : message = you + " " + joined_call; - LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); + LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; } @@ -272,11 +272,11 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES { case LLVoiceChannel::STATE_CALL_STARTED : message = you + " " + started_call; - LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); + LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; case LLVoiceChannel::STATE_CONNECTED : message = other_avatar_name + " " + joined_call; - LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); + LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; } @@ -291,7 +291,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES { case LLVoiceChannel::STATE_CONNECTED : message = you + " " + joined_call; - LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); + LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; } @@ -302,7 +302,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES { case LLVoiceChannel::STATE_CALL_STARTED : message = you + " " + started_call; - LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message); + LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; default: break; diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 90c611cb76..0c080cc6cb 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -195,6 +195,62 @@ void LLOpenFoldersWithSelection::doFolder(LLFolderViewFolder* folder) } } +static void assign_clothing_bodypart_icon(EInventoryIcon &idx, U32 attachment_point) +{ + const EWearableType wearable_type = EWearableType(LLInventoryItem::II_FLAGS_WEARABLES_MASK & attachment_point); + switch(wearable_type) + { + case WT_SHAPE: + idx = BODYPART_SHAPE_ICON_NAME; + break; + case WT_SKIN: + idx = BODYPART_SKIN_ICON_NAME; + break; + case WT_HAIR: + idx = BODYPART_HAIR_ICON_NAME; + break; + case WT_EYES: + idx = BODYPART_EYES_ICON_NAME; + break; + case WT_SHIRT: + idx = CLOTHING_SHIRT_ICON_NAME; + break; + case WT_PANTS: + idx = CLOTHING_PANTS_ICON_NAME; + break; + case WT_SHOES: + idx = CLOTHING_SHOES_ICON_NAME; + break; + case WT_SOCKS: + idx = CLOTHING_SOCKS_ICON_NAME; + break; + case WT_JACKET: + idx = CLOTHING_JACKET_ICON_NAME; + break; + case WT_GLOVES: + idx = CLOTHING_GLOVES_ICON_NAME; + break; + case WT_UNDERSHIRT: + idx = CLOTHING_UNDERSHIRT_ICON_NAME; + break; + case WT_UNDERPANTS: + idx = CLOTHING_UNDERPANTS_ICON_NAME; + break; + case WT_SKIRT: + idx = CLOTHING_SKIRT_ICON_NAME; + break; + case WT_ALPHA: + idx = CLOTHING_ALPHA_ICON_NAME; + break; + case WT_TATTOO: + idx = CLOTHING_TATTOO_ICON_NAME; + break; + default: + break; + } +} + + const std::string& get_item_icon_name(LLAssetType::EType asset_type, LLInventoryType::EType inventory_type, U32 attachment_point, @@ -249,62 +305,11 @@ const std::string& get_item_icon_name(LLAssetType::EType asset_type, break; case LLAssetType::AT_CLOTHING: idx = CLOTHING_ICON_NAME; - case LLAssetType::AT_BODYPART : - if(LLAssetType::AT_BODYPART == asset_type) - { - idx = BODYPART_ICON_NAME; - } - switch(LLInventoryItem::II_FLAGS_WEARABLES_MASK & attachment_point) - { - case WT_SHAPE: - idx = BODYPART_SHAPE_ICON_NAME; - break; - case WT_SKIN: - idx = BODYPART_SKIN_ICON_NAME; - break; - case WT_HAIR: - idx = BODYPART_HAIR_ICON_NAME; - break; - case WT_EYES: - idx = BODYPART_EYES_ICON_NAME; - break; - case WT_SHIRT: - idx = CLOTHING_SHIRT_ICON_NAME; - break; - case WT_PANTS: - idx = CLOTHING_PANTS_ICON_NAME; - break; - case WT_SHOES: - idx = CLOTHING_SHOES_ICON_NAME; - break; - case WT_SOCKS: - idx = CLOTHING_SOCKS_ICON_NAME; - break; - case WT_JACKET: - idx = CLOTHING_JACKET_ICON_NAME; - break; - case WT_GLOVES: - idx = CLOTHING_GLOVES_ICON_NAME; - break; - case WT_UNDERSHIRT: - idx = CLOTHING_UNDERSHIRT_ICON_NAME; - break; - case WT_UNDERPANTS: - idx = CLOTHING_UNDERPANTS_ICON_NAME; - break; - case WT_SKIRT: - idx = CLOTHING_SKIRT_ICON_NAME; - break; - case WT_ALPHA: - idx = CLOTHING_ALPHA_ICON_NAME; - break; - case WT_TATTOO: - idx = CLOTHING_TATTOO_ICON_NAME; - break; - default: - // no-op, go with choice above - break; - } + assign_clothing_bodypart_icon(idx, attachment_point); + break; + case LLAssetType::AT_BODYPART: + idx = BODYPART_ICON_NAME; + assign_clothing_bodypart_icon(idx, attachment_point); break; case LLAssetType::AT_NOTECARD: idx = NOTECARD_ICON_NAME; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 467255d1a7..ca9b942629 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -143,6 +143,7 @@ BOOL LLInventoryPanel::postBuild() addChild(mScroller); mScroller->addChild(mFolders); mFolders->setScrollContainer(mScroller); + mFolders->addChild(mFolders->mStatusTextBox); } // Set up the callbacks from the inventory we're viewing, and then build everything. diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index f601a8d51c..64a265219b 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -206,7 +206,7 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable) { LLPanelMediaSettingsGeneral *self =(LLPanelMediaSettingsGeneral *)userdata; self->mAutoLoop->clear(); - self->mAutoPlay->clear(); + self->mAutoPlay->setValue(LLSD(TRUE)); // set default value for auto play to true; self->mAutoScale->clear(); self->mAutoZoom ->clear(); self->mCurrentURL->clear(); diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp index 6c6eb7c719..f1e450a083 100644 --- a/indra/newview/llplacesinventorypanel.cpp +++ b/indra/newview/llplacesinventorypanel.cpp @@ -118,6 +118,7 @@ BOOL LLPlacesInventoryPanel::postBuild() mScroller->addChild(mFolders); mFolders->setScrollContainer(mScroller); + mFolders->addChild(mFolders->mStatusTextBox); // cut subitems diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d4ec33f282..967a951fd3 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5599,21 +5599,6 @@ void handle_buy_currency() LLFloaterBuyCurrency::buyCurrency(); } - - -class LLFloaterVisible : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - std::string floater_name = userdata.asString(); - bool new_value = false; - { - new_value = LLFloaterReg::instanceVisible(floater_name); - } - return new_value; - } -}; - class LLShowHelp : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -5644,6 +5629,25 @@ class LLShowSidetrayPanel : public view_listener_t } }; +class LLSidetrayPanelVisible : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + std::string panel_name = userdata.asString(); + // Toggle the panel + if (LLSideTray::getInstance()->isPanelActive(panel_name)) + { + return true; + } + else + { + return false; + } + + } +}; + + bool callback_show_url(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -8026,8 +8030,8 @@ void initialize_menus() enable.add("EnableEdit", boost::bind(&enable_object_edit)); enable.add("VisibleBuild", boost::bind(&enable_object_build)); - view_listener_t::addMenu(new LLFloaterVisible(), "FloaterVisible"); view_listener_t::addMenu(new LLShowSidetrayPanel(), "ShowSidetrayPanel"); + view_listener_t::addMenu(new LLSidetrayPanelVisible(), "SidetrayPanelVisible"); view_listener_t::addMenu(new LLSomethingSelected(), "SomethingSelected"); view_listener_t::addMenu(new LLSomethingSelectedNoHUD(), "SomethingSelectedNoHUD"); view_listener_t::addMenu(new LLEditableSelected(), "EditableSelected"); 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 44c9284b36..593bbe4b5e 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -369,7 +369,7 @@ Leyla Linden </text> layout="topleft" left_delta="0" name="Sell with landowners objects in parcel." - top_pad="-3" + top_pad="-2" width="186"> Objects included in sale </text> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index df6c7bd9cb..95ce6d6ff4 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -57,13 +57,13 @@ label="My Inventory" layout="topleft" name="Inventory" - shortcut="control|shift|I"> + shortcut="control|I"> <menu_item_check.on_check - function="Floater.Visible" - parameter="inventory" /> + function="SidetrayPanelVisible" + parameter="sidepanel_inventory" /> <menu_item_check.on_click - function="Floater.Toggle" - parameter="inventory" /> + function="ShowSidetrayPanel" + parameter="sidepanel_inventory" /> </menu_item_check> <menu_item_call label="Show Inventory in Side Tray" diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index af92bbb016..29c0f1fa4b 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -37,7 +37,7 @@ halign="center" top_pad="4" width="305"> <inventory_panel - border="false" + border="false" follows="all" height="295" label="MY INVENTORY" @@ -48,7 +48,7 @@ halign="center" top="16" width="290" /> <inventory_panel - border="false" + border="false" follows="all" height="295" label="RECENT" diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 31ea54cf40..446bf0dc6e 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -236,7 +236,7 @@ If you're looking for people to hang out with, [secondlife:///app/worldmap try t layout="topleft" left="0" name="group_list" - no_filtered_groups_msg="No groups" + no_filtered_groups_msg="[secondlife:///app/search/groups Try fine the group in search?]" no_groups_msg="[secondlife:///app/search/groups Try searching for some groups to join.]" top="0" width="313" /> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index f7e3ede93c..f78d90c434 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -17,6 +17,7 @@ follows="left|bottom" height="23" label="Clear History" + tool_tip="Clear login image, last location, teleport history, web, and texture cache" layout="topleft" left="30" name="clear_cache" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 07344c7a24..b9dd87e878 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -1805,7 +1805,7 @@ Clears (deletes) the media and all params from the given face. <string name="LeaveMouselook">Press ESC to return to World View</string> <!-- inventory --> - <string name="InventoryNoMatchingItems">No matching items found in inventory.</string> + <string name="InventoryNoMatchingItems">[secondlife:///app/search/groups No matching items found in inventory.Try "Search"?]</string> <string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string> <string name="InventoryNoTexture"> You do not have a copy of |