From 36e84baea4510369e1f947c46368d93995a1f9fb Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Wed, 12 May 2010 13:47:14 +0300 Subject: EXT-7204 FIXED added updating verbs and status (panel edit outfit) on base oufit changes --HG-- branch : product-engine --- indra/newview/llpaneloutfitedit.cpp | 72 +++++++++++++++++++--- indra/newview/llpaneloutfitedit.h | 4 +- indra/newview/llwearableitemslist.h | 23 +++++++ .../skins/default/xui/en/panel_outfit_edit.xml | 6 ++ 4 files changed, 95 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 43c2f01da5..008661221a 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -98,26 +98,75 @@ public: { if (!gInventory.isInventoryUsable()) return; - LLUUID cof = LLAppearanceMgr::getInstance()->getCOF(); - if (cof.isNull()) return; + bool panel_updated = checkCOF(); + + if (!panel_updated) + { + checkBaseOutfit(); + } + } + +protected: + + /** Get a version of an inventory category specified by its UUID */ + static S32 getCategoryVersion(const LLUUID& cat_id) + { + LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + if (!cat) return LLViewerInventoryCategory::VERSION_UNKNOWN; - LLViewerInventoryCategory* cat = gInventory.getCategory(cof); - if (!cat) return; + return cat->getVersion(); + } - S32 cof_version = cat->getVersion(); + bool checkCOF() + { + LLUUID cof = LLAppearanceMgr::getInstance()->getCOF(); + if (cof.isNull()) return false; - if (cof_version == mCOFLastVersion) return; + S32 cof_version = getCategoryVersion(cof); + if (cof_version == mCOFLastVersion) return false; + mCOFLastVersion = cof_version; mPanel->update(); + + return true; } -protected: + void checkBaseOutfit() + { + LLUUID baseoutfit_id = LLAppearanceMgr::getInstance()->getBaseOutfitUUID(); + + if (baseoutfit_id == mBaseOutfitId) + { + if (baseoutfit_id.isNull()) return; + + const S32 baseoutfit_ver = getCategoryVersion(baseoutfit_id); + + if (baseoutfit_ver == mBaseOutfitLastVersion) return; + } + else + { + mBaseOutfitId = baseoutfit_id; + if (baseoutfit_id.isNull()) return; + + mBaseOutfitLastVersion = getCategoryVersion(mBaseOutfitId); + } + + mPanel->updateVerbs(); + } + + + + LLPanelOutfitEdit *mPanel; //last version number of a COF category S32 mCOFLastVersion; + + LLUUID mBaseOutfitId; + + S32 mBaseOutfitLastVersion; }; @@ -159,6 +208,7 @@ BOOL LLPanelOutfitEdit::postBuild() mLookItemTypes[LIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK); mCurrentOutfitName = getChild("curr_outfit_name"); + mStatus = getChild("status"); childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL); childSetCommitCallback("list_view_btn", boost::bind(&LLPanelOutfitEdit::showFilteredWearablesPanel, this), NULL); @@ -479,11 +529,15 @@ void LLPanelOutfitEdit::updateVerbs() LLAppearanceMgr::getInstance()->updateIsDirty(); bool outfit_is_dirty = LLAppearanceMgr::getInstance()->isOutfitDirty(); - + bool has_baseoutfit = LLAppearanceMgr::getInstance()->getBaseOutfitUUID().notNull(); + childSetEnabled(SAVE_BTN, outfit_is_dirty); - childSetEnabled(REVERT_BTN, outfit_is_dirty); + childSetEnabled(REVERT_BTN, outfit_is_dirty && has_baseoutfit); mSaveMenu->setItemEnabled("save_outfit", outfit_is_dirty); + + mStatus->setText(outfit_is_dirty ? getString("unsaved_changes") : getString("now_editing")); + } // EOF diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index 3cdfed14b9..04c94e553f 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -102,12 +102,14 @@ public: void update(); + void updateVerbs(); + private: - void updateVerbs(); LLTextBox* mCurrentOutfitName; + LLTextBox* mStatus; LLInventoryPanel* mInventoryItemsPanel; LLFilterEditor* mSearchFilter; LLSaveFolderState* mSavedFolderState; diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 29532a15c1..40773ed4dd 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -124,6 +124,29 @@ protected: /*virtual*/ void init(); }; + +class LLPanelDeletableWearableListItem : public LLPanelWearableListItem +{ + LOG_CLASS(LLPanelDeletableWearableListItem); +public: + + static LLPanelDeletableWearableListItem* create(LLViewerInventoryItem* item); + + virtual ~LLPanelDeletableWearableListItem(); + + /*virtual*/ BOOL postBuild(); + + /** + * Make button visible during mouse over event. + */ + inline void setShowDeleteButton(bool show) { setShowWidget("btn_delete", show); } + +protected: + LLPanelDeletableWearableListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); +}; + /** * @class LLPanelDummyClothingListItem * 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 6a212306d6..3200951253 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -15,6 +15,12 @@ + + -- cgit v1.2.3 From 367b77eb1b87ba55fd4a94e9b2630a7d002d4399 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Wed, 12 May 2010 14:10:26 +0300 Subject: EXT-6783 FIXED Made notifications that are saved into notification well window be persisted and offer notifications non-persisted. reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/368/ --HG-- branch : product-engine --- indra/newview/llfloatersellland.cpp | 8 +- indra/newview/llnotificationstorage.cpp | 5 +- indra/newview/lltoastnotifypanel.cpp | 5 +- indra/newview/llviewermessage.cpp | 3 +- .../newview/skins/default/xui/en/notifications.xml | 93 +++++++++++++++++++++- 5 files changed, 102 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 980b456497..9dddbd998a 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -94,7 +94,6 @@ private: static void doSellLand(void *userdata); bool onConfirmSale(const LLSD& notification, const LLSD& response); static void doShowObjects(void *userdata); - static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response); void callbackAvatarPick(const std::vector& names, const uuid_vec_t& ids); @@ -102,6 +101,7 @@ public: virtual BOOL postBuild(); bool setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel); + static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response); }; // static @@ -423,11 +423,13 @@ void LLFloaterSellLandUI::doShowObjects(void *userdata) send_parcel_select_objects(parcel->getLocalID(), RT_SELL); + // we shouldn't pass callback functor since it is registered in LLFunctorRegistration LLNotificationsUtil::add("TransferObjectsHighlighted", - LLSD(), LLSD(), - &LLFloaterSellLandUI::callbackHighlightTransferable); + LLSD(), LLSD()); } +static LLNotificationFunctorRegistration tr("TransferObjectsHighlighted", &LLFloaterSellLandUI::callbackHighlightTransferable); + // static bool LLFloaterSellLandUI::callbackHighlightTransferable(const LLSD& notification, const LLSD& data) { diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp index 316ff4324c..20b40b4e1d 100644 --- a/indra/newview/llnotificationstorage.cpp +++ b/indra/newview/llnotificationstorage.cpp @@ -112,8 +112,8 @@ void LLPersistentNotificationStorage::saveNotifications() LLNotificationPtr notification = *it; // After a notification was placed in Persist channel, it can become - // responded, expired - in this case we are should not save it - if(notification->isRespondedTo() + // responded, expired or canceled - in this case we are should not save it + if(notification->isRespondedTo() || notification->isCancelled() || notification->isExpired()) { continue; @@ -208,7 +208,6 @@ LLNotificationResponderInterface* LLResponderRegistry::createResponder(const std build_map_t::const_iterator it = sBuildMap.find(notification_name); if(sBuildMap.end() == it) { - llwarns << "Responder for notification \'" << notification_name << "\' is not registered" << llendl; return NULL; } responder_constructor_t ctr = it->second; diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 089163929e..9275ca4f42 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -291,7 +291,10 @@ LLToastNotifyPanel::~LLToastNotifyPanel() { // let reusable notification be deleted mNotification->setReusable(false); - LLNotifications::getInstance()->cancel(mNotification); + if (!mNotification->isPersistent()) + { + LLNotifications::getInstance()->cancel(mNotification); + } } } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 71e50cacfd..742516f351 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2328,7 +2328,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; args["MESSAGE"] = message; - LLNotificationsUtil::add("JoinGroup", args, payload, join_group_response); + // we shouldn't pass callback functor since it is registered in LLFunctorRegistration + LLNotificationsUtil::add("JoinGroup", args, payload); } } break; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index cf7cec04de..f5e56c2f46 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1199,6 +1199,7 @@ Eject [AVATAR_NAME] from your land? You ejected [AVATAR_NAME] from group [GROUP_NAME] @@ -2441,6 +2442,7 @@ Please choose the male or female avatar. You can change your mind later. [NAME] has given you permission to edit their objects. @@ -2448,6 +2450,7 @@ Please choose the male or female avatar. You can change your mind later. Your privilege to modify [NAME]'s objects has been revoked @@ -4362,6 +4365,7 @@ Replaced missing clothing/body part with default. Topic: [SUBJECT], Message: [MESSAGE] @@ -4410,6 +4414,7 @@ Do you wish to proceed? You paid L$[AMOUNT] to upload. @@ -4697,6 +4702,7 @@ Please select at least one type of content to search (General, Moderate, or Adul [MESSAGE] @@ -4704,10 +4710,13 @@ Please select at least one type of content to search (General, Moderate, or Adul [MESSAGE] + All objects on this parcel that will transfer to the purchaser of this parcel are now highlighted. @@ -4750,6 +4760,7 @@ All objects on this parcel that will transfer to the purchaser of this parcel ar Deactivated gestures with same trigger: [NAMES] @@ -4758,6 +4769,7 @@ Deactivated gestures with same trigger: Apple's QuickTime software does not appear to be installed on your system. If you want to view streaming media on parcels that support it you should go to the [http://www.apple.com/quicktime QuickTime site] and install the QuickTime Player. @@ -4765,6 +4777,7 @@ If you want to view streaming media on parcels that support it you should go to No Media Plugin was found to handle the "[MIME_TYPE]" mime type. Media of this type will be unavailable. @@ -4784,6 +4797,7 @@ Please re-install the plugin or contact the vendor if you continue to experience The objects you own on the selected parcel of land have been returned back to your inventory. @@ -4791,6 +4805,7 @@ The objects you own on the selected parcel of land have been returned back to yo The objects on the selected parcel of land that is owned by [FIRST] [LAST] have been returned to his or her inventory. @@ -4798,6 +4813,7 @@ The objects on the selected parcel of land that is owned by [FIRST] [LAST] have The objects on the selected parcel of land owned by the Resident '[NAME]' have been returned to their owner. @@ -4805,6 +4821,7 @@ The objects on the selected parcel of land owned by the Resident '[NAME]&ap The objects on the selected parcel of land shared with the group [GROUPNAME] have been returned back to their owner's inventory. Transferable deeded objects have been returned to their previous owners. @@ -4814,6 +4831,7 @@ Non-transferable objects that are deeded to the group have been deleted. The objects on the selected parcel that are NOT owned by you have been returned to their owners. @@ -4821,6 +4839,7 @@ The objects on the selected parcel that are NOT owned by you have been returned Message from [NAME]: <nolink>[MSG]</nolink> @@ -4829,6 +4848,7 @@ Message from [NAME]: This land has damage enabled. You can be hurt here. If you die, you will be teleported to your home location. @@ -4838,6 +4858,7 @@ You can be hurt here. If you die, you will be teleported to your home location. This area has flying disabled. You can't fly here. @@ -4847,6 +4868,7 @@ You can't fly here. This area does not allow pushing. You can't push others here unless you own the land. @@ -4855,6 +4877,7 @@ This area does not allow pushing. You can't push others here unless you own This area has voice chat disabled. You won't be able to hear anyone talking. @@ -4863,6 +4886,7 @@ This area has voice chat disabled. You won't be able to hear anyone talking This area has building disabled. You can't build or rez objects here. @@ -4871,6 +4895,7 @@ This area has building disabled. You can't build or rez objects here. An administrator has temporarily stopped scripts in this region. @@ -4878,6 +4903,7 @@ An administrator has temporarily stopped scripts in this region. This region is not running any scripts. @@ -4885,6 +4911,7 @@ This region is not running any scripts. This land has outside scripts disabled. @@ -4894,6 +4921,7 @@ No scripts will work here except those belonging to the land owner. You can only claim public land in the Region you're in. @@ -4901,6 +4929,7 @@ You can only claim public land in the Region you're in. You aren't allowed in that Region due to your maturity Rating. You may need to validate your age and/or install the latest Viewer. @@ -4910,6 +4939,7 @@ Please go to the Knowledge Base for details on accessing areas with this maturit You are banned from the region. @@ -4917,6 +4947,7 @@ You are banned from the region. Your account cannot connect to this teen grid region. @@ -4924,6 +4955,7 @@ Your account cannot connect to this teen grid region. You do not have proper payment status to enter this region. @@ -4931,6 +4963,7 @@ You do not have proper payment status to enter this region. You must be age-verified to enter this region. @@ -4938,6 +4971,7 @@ You must be age-verified to enter this region. You must be age-verified to enter this parcel. @@ -4945,6 +4979,7 @@ You must be age-verified to enter this parcel. No destination region found. @@ -4952,6 +4987,7 @@ No destination region found. You are not allowed into the destination. @@ -4959,6 +4995,7 @@ You are not allowed into the destination. Cannot region cross into banned parcel. Try another way. @@ -4966,6 +5003,7 @@ Cannot region cross into banned parcel. Try another way. You have been redirected to a telehub. @@ -4973,6 +5011,7 @@ You have been redirected to a telehub. Could not teleport closer to destination. @@ -4980,6 +5019,7 @@ Could not teleport closer to destination. Teleport cancelled. @@ -4987,6 +5027,7 @@ Teleport cancelled. The region you are attempting to enter is currently full. Please try again in a few moments. @@ -4995,6 +5036,7 @@ Please try again in a few moments. General failure. @@ -5002,6 +5044,7 @@ General failure. Routed to wrong region. Please try again. @@ -5009,6 +5052,7 @@ Routed to wrong region. Please try again. No valid agent id. @@ -5016,6 +5060,7 @@ No valid agent id. No valid session id. @@ -5023,6 +5068,7 @@ No valid session id. No valid circuit code. @@ -5030,6 +5076,7 @@ No valid circuit code. No valid timestamp. @@ -5037,6 +5084,7 @@ No valid timestamp. Unable to create pending connection. @@ -5044,6 +5092,7 @@ Unable to create pending connection. Internal error attempting to connect agent usher. @@ -5051,6 +5100,7 @@ Internal error attempting to connect agent usher. Unable to find a good teleport destination in this region. @@ -5058,6 +5108,7 @@ Unable to find a good teleport destination in this region. Internal error attempting to activate region resolver. @@ -5065,6 +5116,7 @@ Internal error attempting to activate region resolver. A valid landing point could not be found. @@ -5072,6 +5124,7 @@ A valid landing point could not be found. No valid parcel could be found. @@ -5079,7 +5132,6 @@ No valid parcel could be found. An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJECTTYPE]: [ITEM_SLURL] @@ -5102,7 +5154,6 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [NAME_SLURL] has given you this [OBJECTTYPE]: [ITEM_SLURL] @@ -5125,6 +5176,7 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [NAME] @@ -5134,6 +5186,7 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [MESSAGE]
@@ -5155,7 +5208,6 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [NAME_SLURL] has offered to teleport you to their location: @@ -5183,6 +5235,7 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [MESSAGE] [URL] @@ -5201,7 +5254,6 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [NAME_SLURL] is offering friendship. @@ -5230,6 +5282,7 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [NAME] is offering friendship. @@ -5256,6 +5309,7 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [NAME] declined your friendship offer. @@ -5277,6 +5331,7 @@ Friendship offer declined. [FIRST] [LAST] is offering their calling card. This will add a bookmark in your inventory so you can quickly IM this Resident. @@ -5297,6 +5352,7 @@ This will add a bookmark in your inventory so you can quickly IM this Resident. name="RegionRestartMinutes" priority="high" sound="UISndAlert" + persist="true" type="notify"> This region will restart in [MINUTES] minutes. If you stay in this region you will be logged out. @@ -5307,6 +5363,7 @@ If you stay in this region you will be logged out. name="RegionRestartSeconds" priority="high" sound="UISndAlert" + persist="true" type="notify"> This region will restart in [SECONDS] seconds. If you stay in this region you will be logged out. @@ -5315,6 +5372,7 @@ If you stay in this region you will be logged out. Load web page [URL]? @@ -5336,6 +5394,7 @@ From object: [OBJECTNAME], owner: [NAME]? Failed to find [TYPE] in database. @@ -5343,6 +5402,7 @@ Failed to find [TYPE] in database. Failed to find [TYPE] named [DESC] in database. @@ -5350,6 +5410,7 @@ Failed to find [TYPE] named [DESC] in database. Failed to upload image to web. @@ -5357,6 +5418,7 @@ Failed to find [TYPE] named [DESC] in database. The item you are trying to wear uses a feature that your Viewer can't read. Please upgrade your version of [APP_NAME] to wear this item. @@ -5364,6 +5426,7 @@ The item you are trying to wear uses a feature that your Viewer can't read. '[OBJECTNAME]', an object owned by '[NAME]', would like to: @@ -5389,6 +5452,7 @@ Is this OK? icon="notify.tga" name="ScriptQuestionCaution" priority="high" + persist="true" type="notify"> An object named '[OBJECTNAME]', owned by '[NAME]' would like to: @@ -5416,6 +5480,7 @@ Grant this request? [FIRST] [LAST]'s '[TITLE]' [MESSAGE] @@ -5430,6 +5495,7 @@ Grant this request? [GROUPNAME]'s '[TITLE]' [MESSAGE] @@ -5445,6 +5511,7 @@ Grant this request? You just received L$[AMOUNT]. Your L$ balance is shown in the upper-right. @@ -5453,6 +5520,7 @@ Your L$ balance is shown in the upper-right. You just paid L$[AMOUNT]. Your L$ balance is shown in the upper-right. @@ -5462,6 +5530,7 @@ Your L$ balance is shown in the upper-right. Thank you for your payment! @@ -5474,6 +5543,7 @@ The status of your payment can be checked on your Transaction History page on yo You are sitting. Use your arrow keys (or AWSD) to look around. @@ -5483,6 +5553,7 @@ Click the 'Stand Up' button to stand. Click and drag the map to look around. Double-click to teleport. @@ -5492,6 +5563,7 @@ Use the controls on the right to find things and display different backgrounds. You have opened the Build Tools. Every object you see around you was created using these tools. @@ -5501,6 +5573,7 @@ You have opened the Build Tools. Every object you see around you was created usi Left-clicking interacts with special objects. If the mouse pointer changes to a hand, you can interact with the object. @@ -5510,6 +5583,7 @@ You have opened the Build Tools. Every object you see around you was created usi You can only teleport to certain areas in this region. The arrow points to your specific destination. Click the arrow to dismiss it. @@ -5519,6 +5593,7 @@ You can only teleport to certain areas in this region. The arrow points to your Your movement keys are now being handled by an object. Try the arrow keys or AWSD to see what they do. @@ -5530,6 +5605,7 @@ Press 'M' to do this. You are editing your Appearance. Use the arrow keys to look around. @@ -5539,6 +5615,7 @@ When you are done, press 'Save All'. This is your Inventory, which contains items you own. @@ -5551,6 +5628,7 @@ This is your Inventory, which contains items you own. This is a sandbox area, and is meant to help Residents learn how to build. @@ -5561,6 +5639,7 @@ Things you build here will be deleted after you leave, so don't forget to r This object is flexible. Flexis must be phantom and not physical. @@ -5568,6 +5647,7 @@ This object is flexible. Flexis must be phantom and not physical. You opened the Advanced menu. @@ -5580,6 +5660,7 @@ To toggle this menu, You are editing a Sculpted prim. Sculpties require a special texture to define their shape. @@ -5589,6 +5670,7 @@ You are editing a Sculpted prim. Sculpties require a special texture to define t You have begun playing media. Media can set to play automatically in the preferences window under Audio / Video. Note that this can be a security risk for media sites you do not trust. @@ -5629,6 +5711,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block [FIRST] [LAST] was sent an instant message and has been automatically unblocked. @@ -5636,6 +5719,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block [FIRST] [LAST] was given money and has been automatically unblocked. @@ -5643,6 +5727,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block [FIRST] [LAST] was offered inventory and has been automatically unblocked. -- cgit v1.2.3 From afb366ad7e9d667b7bf4e9a7f58f565182c7ee5b Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Wed, 12 May 2010 15:46:26 +0300 Subject: EXT-7206 ADDITIONAL COMMIT Added missing avatar sex icons. --HG-- branch : product-engine --- indra/newview/skins/default/textures/icons/Female.png | Bin 0 -> 309 bytes indra/newview/skins/default/textures/icons/Male.png | Bin 0 -> 302 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/Female.png create mode 100644 indra/newview/skins/default/textures/icons/Male.png (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/icons/Female.png b/indra/newview/skins/default/textures/icons/Female.png new file mode 100644 index 0000000000..67b5653a94 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Female.png differ diff --git a/indra/newview/skins/default/textures/icons/Male.png b/indra/newview/skins/default/textures/icons/Male.png new file mode 100644 index 0000000000..f3fad77fd0 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Male.png differ -- cgit v1.2.3 From 0815eb1ce49ddbf647b90b3353c046ab194ecc58 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Wed, 12 May 2010 17:01:32 +0300 Subject: EXT-7267 FIXED Corrected retrieving of object name. reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/376/ --HG-- branch : product-engine --- indra/newview/llscriptfloater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 11b6c0a3ae..b68fc3b002 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -482,7 +482,7 @@ std::string LLScriptFloaterManager::getObjectName(const LLUUID& notification_id) text = notification->getSubstitutions()["OBJECTNAME"].asString(); break; case LLScriptFloaterManager::OBJ_GIVE_INVENTORY: - text = notification->getSubstitutions()["NAME"].asString(); + text = notification->getSubstitutions()["OBJECTFROMNAME"].asString(); break; default: text = LLTrans::getString("object"); -- cgit v1.2.3 From 79332f4e3e1131fbab88b7b75cca7ab57c3c3e25 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 12 May 2010 17:15:46 +0300 Subject: EXT-7104 : WIP : Removed dummy icons between buttons may be hidden to simplify adding new buttons. * removed dummy icons * encreased width and minimal width of next to the left layout panels to icons' widths. * removed code processed dummy icons Reviewed by Vadim. --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 26 ++------- indra/newview/llbottomtray.h | 3 -- .../skins/default/xui/en/panel_bottomtray.xml | 63 +++------------------- 3 files changed, 12 insertions(+), 80 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 04a6c48b4f..774248ce4d 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -1122,11 +1122,6 @@ void LLBottomTray::initStateProcessedObjectMap() mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, mMovementPanel)); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, mCamPanel)); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, mSnapshotPanel)); - - mDummiesMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild("after_gesture_panel"))); - mDummiesMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild("after_movement_panel"))); - mDummiesMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild("after_cam_panel"))); - mDummiesMap.insert(std::make_pair(RS_BUTTON_SPEAK, getChild("after_speak_panel"))); } void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool visible) @@ -1140,12 +1135,6 @@ void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool vis } panel->setVisible(visible); - - if (mDummiesMap.count(shown_object_type)) - { - // Hide/show layout panel for dummy icon. - mDummiesMap[shown_object_type]->getParent()->setVisible(visible); - } } void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible, bool raise_notification) @@ -1168,20 +1157,13 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible return false; } - const S32 dummy_width = mDummiesMap.count(object_type) - ? mDummiesMap[object_type]->getParent()->getRect().getWidth() - : 0; - bool is_set = true; if (visible) { - // Assume that only chiclet panel can be auto-resized and - // don't take into account width of dummy widgets + // Assume that only chiclet panel can be auto-resized const S32 available_width = - mChicletPanel->getParent()->getRect().getWidth() - - mChicletPanel->getMinWidth() - - dummy_width; + mChicletPanel->getParent()->getRect().getWidth() - mChicletPanel->getMinWidth(); S32 preferred_width = mObjectDefaultWidthMap[object_type]; S32 current_width = cur_panel->getRect().getWidth(); @@ -1249,7 +1231,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible // Shrink buttons if needed if (is_set && decrease_width) { - processWidthDecreased( -result_width - dummy_width ); + processWidthDecreased( -result_width); } } else @@ -1264,7 +1246,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible // Extend other buttons if need if (delta_width) { - processWidthIncreased(delta_width + dummy_width); + processWidthIncreased(delta_width); } } return is_set; diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 8395b484cf..54258f74c1 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -205,9 +205,6 @@ private: typedef std::map state_object_width_map_t; state_object_width_map_t mObjectDefaultWidthMap; - typedef std::map dummies_map_t; - dummies_map_t mDummiesMap; - protected: LLBottomTray(const LLSD& key = LLSD()); diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index e412c491fd..3beacd49e1 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -59,9 +59,9 @@ height="28" layout="topleft" min_height="28" - width="105" + width="108" top_delta="0" - min_width="54" + min_width="57" name="speak_panel" user_resize="false"> - - + width="83" + min_width="52"> - + width="83"> - Date: Wed, 12 May 2010 17:38:07 +0300 Subject: EXT-7203 FIXED Re-enabled inventory search for wearables panel - Insert filter editor and inventory panels into layout_stack - restored filter functionality for a list view - added proper switching between flat list view and folder list view - made a little optimization: got rid of redundant findChild calls because of childSetVisible(..., childGetValue(...)); Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/362/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitedit.cpp | 49 +++++- indra/newview/llpaneloutfitedit.h | 16 +- .../skins/default/xui/en/panel_outfit_edit.xml | 192 ++++++++++----------- 3 files changed, 154 insertions(+), 103 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 008661221a..1c74c8f26a 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -210,7 +210,11 @@ BOOL LLPanelOutfitEdit::postBuild() mCurrentOutfitName = getChild("curr_outfit_name"); mStatus = getChild("status"); + mFolderViewBtn = getChild("folder_view_btn"); + mListViewBtn = getChild("list_view_btn"); + 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); mCOFWearables = getChild("cof_wearables_list"); @@ -267,8 +271,9 @@ BOOL LLPanelOutfitEdit::postBuild() save_registar.add("Outfit.SaveAsNew.Action", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true)); mSaveMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_save_outfit.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - mWearableListManager = new LLFilteredWearableListManager( - getChild("filtered_wearables_list"), ALL_ITEMS_MASK); + mWearableItemsPanel = getChild("filtered_wearables_panel"); + mWearableItemsList = getChild("filtered_wearables_list"); + mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, ALL_ITEMS_MASK); return TRUE; } @@ -289,12 +294,33 @@ void LLPanelOutfitEdit::toggleAddWearablesPanel() void LLPanelOutfitEdit::showWearablesFilter() { - childSetVisible("filter_combobox_panel", childGetValue("filter_button")); + bool filter_visible = childGetValue("filter_button"); + + childSetVisible("filter_panel", filter_visible); + + if(!filter_visible) + { + mSearchFilter->clear(); + onSearchEdit(LLStringUtil::null); + } } void LLPanelOutfitEdit::showFilteredWearablesPanel() { - childSetVisible("filtered_wearables_panel", !childIsVisible("filtered_wearables_panel")); + if(switchPanels(mInventoryItemsPanel, mWearableItemsPanel)) + { + mFolderViewBtn->setToggleState(FALSE); + } + mListViewBtn->setToggleState(TRUE); +} + +void LLPanelOutfitEdit::showFilteredFolderWearablesPanel() +{ + if(switchPanels(mWearableItemsPanel, mInventoryItemsPanel)) + { + mListViewBtn->setToggleState(FALSE); + } + mFolderViewBtn->setToggleState(TRUE); } void LLPanelOutfitEdit::saveOutfit(bool as_new) @@ -359,7 +385,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string) if (mSearchString == "") { mInventoryItemsPanel->setFilterSubString(LLStringUtil::null); - + mWearableItemsList->setFilterSubString(LLStringUtil::null); // re-open folders that were initially open mSavedFolderState->setApply(TRUE); mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); @@ -385,6 +411,8 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string) // set new filter string mInventoryItemsPanel->setFilterSubString(mSearchString); + mWearableItemsList->setFilterSubString(mSearchString); + } void LLPanelOutfitEdit::onAddToOutfitClicked(void) @@ -540,4 +568,15 @@ void LLPanelOutfitEdit::updateVerbs() } +bool LLPanelOutfitEdit::switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel) +{ + if(switch_from_panel && switch_to_panel && !switch_to_panel->getVisible()) + { + switch_from_panel->setVisible(FALSE); + switch_to_panel->setVisible(TRUE); + return true; + } + return false; +} + // EOF diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index 04c94e553f..cb8283fca3 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -42,6 +42,7 @@ #include "llremoteparcelrequest.h" #include "llinventory.h" +#include "llinventoryitemslist.h" #include "llinventorymodel.h" class LLButton; @@ -87,6 +88,7 @@ public: void toggleAddWearablesPanel(); void showWearablesFilter(); void showFilteredWearablesPanel(); + void showFilteredFolderWearablesPanel(); void saveOutfit(bool as_new = false); void showSaveMenu(); @@ -103,6 +105,14 @@ public: void update(); void updateVerbs(); + /** + * @brief Helper function. Shows one panel instead of another. + * If panels already switched does nothing and returns false. + * @param switch_from_panel panel to hide + * @param switch_to_panel panel to show + * @retun returns true if switching happened, false if not. + */ + bool switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel); private: @@ -115,9 +125,13 @@ private: LLSaveFolderState* mSavedFolderState; std::string mSearchString; LLButton* mEditWearableBtn; + LLButton* mFolderViewBtn; + LLButton* mListViewBtn; LLToggleableMenu* mSaveMenu; - LLFilteredWearableListManager* mWearableListManager; + LLFilteredWearableListManager* mWearableListManager; + LLInventoryItemsList* mWearableItemsList; + LLPanel* mWearableItemsPanel; LLCOFObserver* mCOFObserver; std::vector mLookItemTypes; 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 3200951253..7961664516 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -215,124 +215,120 @@ tab_group="2" user_resize="true" visible="false"> - - - + - + width="36"> + + + + width="189"> @@ -341,11 +336,11 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well height="28" layout="topleft" min_height="28" - top="0" - name="notification_well_panel" - width="37" min_width="37" - user_resize="false"> + name="notification_well_panel" + top="0" + user_resize="false" + width="37"> - - + label_color="Black" + left="0" + name="Unread" + tool_tip="Notifications" + width="34"> + + + -- cgit v1.2.3 From f1c775b7be55731475796b6b3b63eef1b2e290ef Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 12 May 2010 11:40:38 -0400 Subject: EXT-7319 : FIXED : INFRASTRUCTURE : LLInventoryBridge cleanup Superficial header file cleanup --- indra/newview/llinventorybridge.h | 168 +++++++++++++++----------------------- 1 file changed, 64 insertions(+), 104 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index d77062ba84..1c85dc8d7e 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -79,16 +79,15 @@ public: virtual void restoreItem() {} virtual void restoreToWorld() {} + //-------------------------------------------------------------------- // LLFolderViewEventListener functions + //-------------------------------------------------------------------- virtual const std::string& getName() const; virtual const std::string& getDisplayName() const; virtual PermissionMask getPermissionMask() const; virtual LLFolderType::EType getPreferredType() const; virtual time_t getCreationDate() const; - virtual LLFontGL::StyleFlags getLabelStyle() const - { - return LLFontGL::NORMAL; - } + virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } virtual void openItem() {} virtual void closeItem() {} @@ -120,11 +119,12 @@ public: void* cargo_data) { return FALSE; } virtual LLInventoryType::EType getInventoryType() const { return mInvType; } + //-------------------------------------------------------------------- // LLInvFVBridge functionality + //-------------------------------------------------------------------- virtual void clearDisplayName() {} - // Allow context menus to be customized for side panel. - bool isInOutfitsSidePanel() const; + bool isInOutfitsSidePanel() const; // allow context menus to be customized for side panel bool canShare(); @@ -147,7 +147,7 @@ protected: BOOL isLinkedObjectMissing() const; // Is this a linked obj whose baseobj is not in inventory? BOOL isAgentInventory() const; // false if lost or in the inventory library - BOOL isCOFFolder() const; // true if COF or descendent of. + BOOL isCOFFolder() const; // true if COF or descendent of virtual BOOL isItemPermissive() const; static void changeItemParent(LLInventoryModel* model, LLViewerInventoryItem* item, @@ -168,7 +168,7 @@ protected: }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInvFVBridge +// Class LLInvFVBridgeBuilder // // This class intended to build Folder View Bridge via LLInvFVBridge::createBridge. // It can be overridden with another way of creation necessary Inventory-Folder-View-Bridge. @@ -214,7 +214,7 @@ public: virtual BOOL hasChildren() const { return FALSE; } virtual BOOL isUpToDate() const { return TRUE; } - // override for LLInvFVBridge + // Override for LLInvFVBridge virtual void clearDisplayName() { mDisplayName.clear(); } LLViewerInventoryItem* getItem() const; @@ -232,8 +232,14 @@ protected: class LLFolderBridge : public LLInvFVBridge { - friend class LLInvFVBridge; public: + LLFolderBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLInvFVBridge(inventory, root, uuid), + mCallingCards(FALSE), + mWearables(FALSE), + mMenu(NULL) {} BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop); BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, @@ -278,18 +284,11 @@ public: LLViewerInventoryCategory* getCategory() const; protected: - LLFolderBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLInvFVBridge(inventory, root, uuid), - mCallingCards(FALSE), - mWearables(FALSE), - mMenu(NULL) {} - - // menu callbacks + //-------------------------------------------------------------------- + // Menu callbacks + //-------------------------------------------------------------------- static void pasteClipboard(void* user_data); static void createNewCategory(void* user_data); - static void createNewShirt(void* user_data); static void createNewPants(void* user_data); static void createNewShoes(void* user_data); @@ -310,10 +309,7 @@ protected: void modifyOutfit(BOOL append); void determineFolderType(); - /** - * Returns a copy of current menu items. - */ - menuentry_vec_t getMenuItems() { return mItems; } + menuentry_vec_t getMenuItems() { return mItems; } // returns a copy of current menu items public: static LLFolderBridge* sSelf; @@ -329,63 +325,57 @@ private: class LLTextureBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual void performAction(LLInventoryModel* model, std::string action); - -protected: LLTextureBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid, LLInventoryType::EType type) : LLItemBridge(inventory, root, uuid), - mInvType(type) - {} + mInvType(type) {} + virtual LLUIImagePtr getIcon() const; + virtual void openItem(); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual void performAction(LLInventoryModel* model, std::string action); + bool canSaveTexture(void); LLInventoryType::EType mInvType; }; class LLSoundBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLSoundBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} virtual void openItem(); virtual void previewItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); static void openSoundPreview(void*); - -protected: - LLSoundBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} }; class LLLandmarkBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLLandmarkBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + U32 flags = 0x00); virtual void performAction(LLInventoryModel* model, std::string action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual LLUIImagePtr getIcon() const; virtual void openItem(); - -protected: - LLLandmarkBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid, - U32 flags = 0x00); protected: BOOL mVisited; }; class LLCallingCardBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLCallingCardBridge(LLInventoryPanel* inventory, + LLFolderView* folder, + const LLUUID& uuid ); + ~LLCallingCardBridge(); virtual std::string getLabelSuffix() const; //virtual const std::string& getDisplayName() const; virtual LLUIImagePtr getIcon() const; @@ -396,72 +386,58 @@ public: EDragAndDropType cargo_type, void* cargo_data); void refreshFolderViewItem(); -protected: - LLCallingCardBridge(LLInventoryPanel* inventory, - LLFolderView* folder, - const LLUUID& uuid ); - ~LLCallingCardBridge(); protected: LLCallingCardObserver* mObserver; }; - class LLNotecardBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual void openItem(); -protected: LLNotecardBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid) : LLItemBridge(inventory, root, uuid) {} + virtual void openItem(); }; class LLGestureBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLGestureBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} // Only suffix for gesture items, not task items, because only // gestures in your inventory can be active. virtual LLFontGL::StyleFlags getLabelStyle() const; virtual std::string getLabelSuffix() const; - virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual BOOL removeItem(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - static void playGesture(const LLUUID& item_id); - -protected: - LLGestureBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) - : LLItemBridge(inventory, root, uuid) {} }; class LLAnimationBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual void performAction(LLInventoryModel* model, std::string action); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - - virtual void openItem(); - -protected: LLAnimationBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid) : LLItemBridge(inventory, root, uuid) {} + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); + virtual void openItem(); }; class LLObjectBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLObjectBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLInventoryType::EType type, + U32 flags); virtual LLUIImagePtr getIcon() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); @@ -469,14 +445,7 @@ public: virtual std::string getLabelSuffix() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual BOOL renameItem(const std::string& new_name); - LLInventoryObject* getObject() const; -protected: - LLObjectBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid, - LLInventoryType::EType type, - U32 flags); protected: static LLUUID sContextMenuItemID; // Only valid while the context menu is open. LLInventoryType::EType mInvType; @@ -486,20 +455,23 @@ protected: class LLLSLTextBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual void openItem(); -protected: LLLSLTextBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid ) : LLItemBridge(inventory, root, uuid) {} + virtual void openItem(); }; class LLWearableBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLWearableBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLAssetType::EType asset_type, + LLInventoryType::EType inv_type, + LLWearableType::EType wearable_type); virtual LLUIImagePtr getIcon() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); @@ -525,14 +497,6 @@ public: static void removeItemFromAvatar(LLViewerInventoryItem *item); static void removeAllClothesFromAvatar(); void removeFromAvatar(); - -protected: - LLWearableBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid, - LLAssetType::EType asset_type, - LLInventoryType::EType inv_type, - LLWearableType::EType wearable_type); protected: LLAssetType::EType mAssetType; LLInventoryType::EType mInvType; @@ -541,35 +505,31 @@ protected: class LLLinkItemBridge : public LLItemBridge { - friend class LLInvFVBridge; public: - virtual const std::string& getPrefix() { return sPrefix; } - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); -protected: LLLinkItemBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid) : LLItemBridge(inventory, root, uuid) {} + virtual const std::string& getPrefix() { return sPrefix; } + virtual void buildContextMenu(LLMenuGL& menu, U32 flags); protected: static std::string sPrefix; }; class LLLinkFolderBridge : public LLItemBridge { - friend class LLInvFVBridge; public: + LLLinkFolderBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} virtual const std::string& getPrefix() { return sPrefix; } virtual LLUIImagePtr getIcon() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual void performAction(LLInventoryModel* model, std::string action); virtual void gotoItem(); protected: - LLLinkFolderBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} const LLUUID &getFolderID() const; -protected: static std::string sPrefix; }; -- cgit v1.2.3 From dbaaebfe5b2847a258019cd82a2abe044e3d3140 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 12 May 2010 13:46:21 -0400 Subject: EXT-7319 : FIXED : INFRASTRUCTURE : LLInventoryBridge cleanup Const correctness, logic cleanup, took out subclasses redefining same variable as base class (!!!). --- indra/newview/llinventorybridge.cpp | 45 ++++++---------- indra/newview/llinventorybridge.h | 99 +++++++++++++--------------------- indra/newview/llinventoryfunctions.cpp | 21 +++----- indra/newview/llinventoryfunctions.h | 2 +- 4 files changed, 62 insertions(+), 105 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 64379f4ce7..973257b19c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -997,46 +997,36 @@ void LLInvFVBridge::purgeItem(LLInventoryModel *model, const LLUUID &uuid) } } -bool LLInvFVBridge::isInOutfitsSidePanel() const +BOOL LLInvFVBridge::isInOutfitsSidePanel() const { LLInventoryPanel *my_panel = dynamic_cast(mInventoryPanel.get()); LLPanelOutfitsInventory *outfit_panel = dynamic_cast(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); if (!outfit_panel) - return false; + return FALSE; return outfit_panel->isTabPanel(my_panel); } -bool LLInvFVBridge::canShare() +BOOL LLInvFVBridge::canShare() const { const LLInventoryModel* model = getInventoryModel(); - if(!model) - { - return false; - } + if (!model) return FALSE; - LLViewerInventoryItem *item = model->getItem(mUUID); + const LLViewerInventoryItem *item = model->getItem(mUUID); if (item) { - bool allowed = false; - allowed = LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item); - if (allowed && - !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) - { - allowed = false; - } - if (allowed && - !item->getPermissions().allowCopyBy(gAgent.getID())) - { - allowed = false; - } - return allowed; + if (!LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item)) + return FALSE; + if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + return FALSE; + if (!item->getPermissions().allowCopyBy(gAgent.getID())) + return FALSE; + return TRUE; } - LLViewerInventoryCategory* cat = model->getCategory(mUUID); - // All categories can be given. - return cat != NULL; + const LLViewerInventoryCategory* cat = model->getCategory(mUUID); + return (cat != NULL); } // +=================================================+ @@ -4095,12 +4085,11 @@ LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLInventoryType::EType type, U32 flags) : - LLItemBridge(inventory, root, uuid), - mInvType(type) + LLItemBridge(inventory, root, uuid) { mAttachPt = (flags & 0xff); // low bye of inventory flags - mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE; + mInvType = type; } LLUIImagePtr LLObjectBridge::getIcon() const @@ -4447,9 +4436,9 @@ LLWearableBridge::LLWearableBridge(LLInventoryPanel* inventory, LLWearableType::EType wearable_type) : LLItemBridge(inventory, root, uuid), mAssetType( asset_type ), - mInvType(inv_type), mWearableType(wearable_type) { + mInvType = inv_type; } // *NOTE: hack to get from avatar inventory to avatar diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 1c85dc8d7e..c5efefac7e 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -74,13 +74,19 @@ public: U32 flags = 0x00); virtual ~LLInvFVBridge() {} - virtual const LLUUID& getUUID() const { return mUUID; } + BOOL isInOutfitsSidePanel() const; // allow context menus to be customized for side panel + BOOL canShare() const; + //-------------------------------------------------------------------- + // LLInvFVBridge functionality + //-------------------------------------------------------------------- + virtual const LLUUID& getUUID() const { return mUUID; } + virtual void clearDisplayName() {} virtual void restoreItem() {} virtual void restoreToWorld() {} //-------------------------------------------------------------------- - // LLFolderViewEventListener functions + // Inherited LLFolderViewEventListener functions //-------------------------------------------------------------------- virtual const std::string& getName() const; virtual const std::string& getDisplayName() const; @@ -99,7 +105,6 @@ public: virtual BOOL isItemMovable() const; virtual BOOL isItemInTrash() const; virtual BOOL isLink() const; - //virtual BOOL removeItem() = 0; virtual void removeBatch(LLDynamicArray& batch); virtual void move(LLFolderViewEventListener* new_parent_bridge) {} @@ -119,15 +124,6 @@ public: void* cargo_data) { return FALSE; } virtual LLInventoryType::EType getInventoryType() const { return mInvType; } - //-------------------------------------------------------------------- - // LLInvFVBridge functionality - //-------------------------------------------------------------------- - virtual void clearDisplayName() {} - - bool isInOutfitsSidePanel() const; // allow context menus to be customized for side panel - - bool canShare(); - //-------------------------------------------------------------------- // Convenience functions for adding various common menu options. //-------------------------------------------------------------------- @@ -195,7 +191,6 @@ public: LLInvFVBridge(inventory, root, uuid) {} virtual void performAction(LLInventoryModel* model, std::string action); - virtual void selectItem(); virtual void restoreItem(); virtual void restoreToWorld(); @@ -214,20 +209,17 @@ public: virtual BOOL hasChildren() const { return FALSE; } virtual BOOL isUpToDate() const { return TRUE; } - // Override for LLInvFVBridge - virtual void clearDisplayName() { mDisplayName.clear(); } + /*virtual*/ void clearDisplayName() { mDisplayName.clear(); } LLViewerInventoryItem* getItem() const; - bool isAddAction(std::string action) const; bool isRemoveAction(std::string action) const; - protected: + BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response); virtual BOOL isItemPermissive() const; static void buildDisplayName(LLInventoryItem* item, std::string& name); - mutable std::string mDisplayName; - BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response); + mutable std::string mDisplayName; }; class LLFolderBridge : public LLInvFVBridge @@ -240,10 +232,9 @@ public: mCallingCards(FALSE), mWearables(FALSE), mMenu(NULL) {} - BOOL dragItemIntoFolder(LLInventoryItem* inv_item, - BOOL drop); - BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, - BOOL drop); + BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop); + BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop); + virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual void closeItem(); @@ -311,10 +302,15 @@ protected: menuentry_vec_t getMenuItems() { return mItems; } // returns a copy of current menu items + + //-------------------------------------------------------------------- + // Messy hacks for handling folder options + //-------------------------------------------------------------------- public: static LLFolderBridge* sSelf; static void staticFolderOptionsMenu(); void folderOptionsMenu(); + private: BOOL mCallingCards; BOOL mWearables; @@ -330,15 +326,15 @@ public: LLFolderView* root, const LLUUID& uuid, LLInventoryType::EType type) : - LLItemBridge(inventory, root, uuid), - mInvType(type) {} + LLItemBridge(inventory, root, uuid) + { + mInvType = type; + } virtual LLUIImagePtr getIcon() const; virtual void openItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual void performAction(LLInventoryModel* model, std::string action); - bool canSaveTexture(void); - LLInventoryType::EType mInvType; }; class LLSoundBridge : public LLItemBridge @@ -447,8 +443,7 @@ public: virtual BOOL renameItem(const std::string& new_name); LLInventoryObject* getObject() const; protected: - static LLUUID sContextMenuItemID; // Only valid while the context menu is open. - LLInventoryType::EType mInvType; + static LLUUID sContextMenuItemID; // Only valid while the context menu is open. U32 mAttachPt; BOOL mIsMultiObject; }; @@ -499,7 +494,6 @@ public: void removeFromAvatar(); protected: LLAssetType::EType mAssetType; - LLInventoryType::EType mInvType; LLWearableType::EType mWearableType; }; @@ -563,47 +557,33 @@ protected: LLInventoryModel* mModel; }; +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Recent Inventory Panel related classes +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -/************************************************************************/ -/* Recent Inventory Panel related classes */ -/************************************************************************/ -class LLRecentInventoryBridgeBuilder; -/** - * Overridden version of the Inventory-Folder-View-Bridge for Folders - */ +// Overridden version of the Inventory-Folder-View-Bridge for Folders class LLRecentItemsFolderBridge : public LLFolderBridge { - friend class LLRecentInventoryBridgeBuilder; - public: - /** - * Creates context menu for Folders related to Recent Inventory Panel. - * - * It uses base logic and than removes from visible items "New..." menu items. - */ - /*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags); - -protected: + // Creates context menu for Folders related to Recent Inventory Panel. + // Uses base logic and than removes from visible items "New..." menu items. LLRecentItemsFolderBridge(LLInventoryType::EType type, - LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : + LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : LLFolderBridge(inventory, root, uuid) { mInvType = type; } + /*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags); }; -/** - * Bridge builder to create Inventory-Folder-View-Bridge for Recent Inventory Panel - */ +// Bridge builder to create Inventory-Folder-View-Bridge for Recent Inventory Panel class LLRecentInventoryBridgeBuilder : public LLInventoryFVBridgeBuilder { - /** - * Overrides FolderBridge for Recent Inventory Panel. - * - * It use base functionality for bridges other than FolderBridge. - */ +public: + // Overrides FolderBridge for Recent Inventory Panel. + // It use base functionality for bridges other than FolderBridge. virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, @@ -611,11 +591,8 @@ class LLRecentInventoryBridgeBuilder : public LLInventoryFVBridgeBuilder LLFolderView* root, const LLUUID& uuid, U32 flags = 0x00) const; - }; - - void wear_inventory_item_on_avatar(LLInventoryItem* item); void rez_attachment(LLViewerInventoryItem* item, diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 35ad8b64da..f1520d34df 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -92,39 +92,30 @@ LLUUID LLInventoryState::sWearNewClothingTransactionID; ///---------------------------------------------------------------------------- // static -bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* item) +bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(const LLInventoryItem* item) { if (!item) return false; - bool allowed = false; - switch(item->getType()) { case LLAssetType::AT_CALLINGCARD: - // not allowed + return false; break; - case LLAssetType::AT_OBJECT: if (isAgentAvatarValid() && !gAgentAvatarp->isWearingAttachment(item->getUUID())) - { - allowed = true; - } + return true; break; - case LLAssetType::AT_BODYPART: case LLAssetType::AT_CLOTHING: if(!gAgentWearables.isWearingItem(item->getUUID())) - { - allowed = true; - } + return true; break; default: - allowed = true; + return true; break; } - - return allowed; + return false; } bool LLIsType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 1e2b4ff09c..02a5fc9224 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -58,7 +58,7 @@ public: virtual ~LLInventoryCollectFunctor(){}; virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) = 0; - static bool itemTransferCommonlyAllowed(LLInventoryItem* item); + static bool itemTransferCommonlyAllowed(const LLInventoryItem* item); }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3 From 491d0f1ae4b3557f36a9c1ba7d0033fdcb7d22e5 Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Wed, 12 May 2010 11:27:09 -0700 Subject: ND-46735 WIP IT linguistic --- indra/newview/skins/default/xui/it/floater_animation_preview.xml | 2 +- indra/newview/skins/default/xui/it/floater_tools.xml | 8 ++++---- indra/newview/skins/default/xui/it/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/it/panel_group_general.xml | 2 +- indra/newview/skins/default/xui/it/panel_region_general.xml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/it/floater_animation_preview.xml b/indra/newview/skins/default/xui/it/floater_animation_preview.xml index 5472e32544..77341cad63 100644 --- a/indra/newview/skins/default/xui/it/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/it/floater_animation_preview.xml @@ -153,7 +153,7 @@ La lunghezza massima è [MAX_LENGTH] secondi. - + diff --git a/indra/newview/skins/default/xui/it/floater_tools.xml b/indra/newview/skins/default/xui/it/floater_tools.xml index 1c611915dc..cd16246f0f 100644 --- a/indra/newview/skins/default/xui/it/floater_tools.xml +++ b/indra/newview/skins/default/xui/it/floater_tools.xml @@ -39,11 +39,11 @@ Accessorio -