diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llnotificationhandlerutil.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llsyswellwindow.cpp | 103 | ||||
-rw-r--r-- | indra/newview/llsyswellwindow.h | 17 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 30 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 22 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_people.xml | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/pt/panel_people.xml | 10 |
8 files changed, 21 insertions, 174 deletions
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 3f551f6b32..95b946f307 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -114,8 +114,7 @@ void LLSysHandler::removeExclusiveNotifications(const LLNotificationPtr& notif) const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), REVOKED_MODIFY_RIGHTS("RevokedModifyRights"), OBJECT_GIVE_ITEM( - "ObjectGiveItem"), OBJECT_GIVE_ITEM_UNKNOWN_USER( - "ObjectGiveItemUnknownUser"), PAYMENT_RECIVED("PaymentRecived"), + "ObjectGiveItem"), PAYMENT_RECIVED("PaymentRecived"), ADD_FRIEND_WITH_MESSAGE("AddFriendWithMessage"), USER_GIVE_ITEM("UserGiveItem"), INVENTORY_ACCEPTED("InventoryAccepted"), @@ -327,8 +326,7 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi "SESSION_NAME") ? notification->getPayload()["SESSION_NAME"].asString() : name; // don't create IM p2p session with objects, it's necessary condition to log - if (notification->getName() != OBJECT_GIVE_ITEM && notification->getName() - != OBJECT_GIVE_ITEM_UNKNOWN_USER) + if (notification->getName() != OBJECT_GIVE_ITEM) { LLUUID from_id = notification->getPayload()["from_id"]; diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index cbb030836e..cb65756764 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -56,14 +56,11 @@ LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLTransientDockableFloater(N mChannel(NULL), mMessageList(NULL), mSysWellChiclet(NULL), - mSeparator(NULL), NOTIFICATION_WELL_ANCHOR_NAME("notification_well_panel"), IM_WELL_ANCHOR_NAME("im_well_panel"), mIsReshapedByUser(false) { - mTypedItemsCount[IT_NOTIFICATION] = 0; - mTypedItemsCount[IT_INSTANT_MESSAGE] = 0; setOverlapsScreenChannel(true); } @@ -75,18 +72,6 @@ BOOL LLSysWellWindow::postBuild() // get a corresponding channel initChannel(); - LLPanel::Params params; - mSeparator = LLUICtrlFactory::create<LLPanel>(params); - LLUICtrlFactory::instance().buildPanel(mSeparator, "panel_separator.xml"); - - LLRect rc = mSeparator->getRect(); - rc.setOriginAndSize(0, 0, mMessageList->getItemsRect().getWidth(), rc.getHeight()); - mSeparator->setRect(rc); - mSeparator->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP); - mSeparator->setVisible(FALSE); - - mMessageList->addItem(mSeparator); - // click on SysWell Window should clear "new message" state (and 'Lit' status). EXT-3147. // mouse up callback is not called in this case. setMouseDownCallback(boost::bind(&LLSysWellWindow::releaseNewMessagesState, this)); @@ -130,7 +115,7 @@ void LLSysWellWindow::removeItemByID(const LLUUID& id) { if(mMessageList->removeItemByValue(id)) { - handleItemRemoved(IT_NOTIFICATION); + mSysWellChiclet->updateWidget(isWindowEmpty()); reshapeWindow(); } else @@ -258,76 +243,7 @@ void LLSysWellWindow::releaseNewMessagesState() //--------------------------------------------------------------------------------- bool LLSysWellWindow::isWindowEmpty() { - // keep in mind, mSeparator is always in the list - return mMessageList->size() == 1; -} - -// *TODO: mantipov: probably is deprecated -void LLSysWellWindow::handleItemAdded(EItemType added_item_type) -{ - bool should_be_shown = ++mTypedItemsCount[added_item_type] == 1 && anotherTypeExists(added_item_type); - - if (should_be_shown && !mSeparator->getVisible()) - { - mSeparator->setVisible(TRUE); - - // refresh list to recalculate mSeparator position - mMessageList->reshape(mMessageList->getRect().getWidth(), mMessageList->getRect().getHeight()); - } - - //fix for EXT-3254 - //set limits for min_height. - S32 parent_list_delta_height = getRect().getHeight() - mMessageList->getRect().getHeight(); - - std::vector<LLPanel*> items; - mMessageList->getItems(items); - - if(items.size()>1)//first item is separator - { - S32 min_height; - S32 min_width; - getResizeLimits(&min_width,&min_height); - - min_height = items[1]->getRect().getHeight() + 2 * mMessageList->getBorderWidth() + parent_list_delta_height; - - setResizeLimits(min_width,min_height); - } - mSysWellChiclet->updateWidget(isWindowEmpty()); -} - -void LLSysWellWindow::handleItemRemoved(EItemType removed_item_type) -{ - bool should_be_hidden = --mTypedItemsCount[removed_item_type] == 0; - - if (should_be_hidden && mSeparator->getVisible()) - { - mSeparator->setVisible(FALSE); - - // refresh list to recalculate mSeparator position - mMessageList->reshape(mMessageList->getRect().getWidth(), mMessageList->getRect().getHeight()); - } - mSysWellChiclet->updateWidget(isWindowEmpty()); -} - -bool LLSysWellWindow::anotherTypeExists(EItemType item_type) -{ - bool exists = false; - switch(item_type) - { - case IT_INSTANT_MESSAGE: - if (mTypedItemsCount[IT_NOTIFICATION] > 0) - { - exists = true; - } - break; - case IT_NOTIFICATION: - if (mTypedItemsCount[IT_INSTANT_MESSAGE] > 0) - { - exists = true; - } - break; - } - return exists; + return mMessageList->size() == 0; } /************************************************************************/ @@ -559,8 +475,7 @@ void LLNotificationWellWindow::addItem(LLSysWellItem::Params p) LLSysWellItem* new_item = new LLSysWellItem(p); if (mMessageList->addItem(new_item, value, ADD_TOP)) { - handleItemAdded(IT_NOTIFICATION); - + mSysWellChiclet->updateWidget(isWindowEmpty()); reshapeWindow(); new_item->setOnItemCloseCallback(boost::bind(&LLNotificationWellWindow::onItemClose, this, _1)); @@ -755,9 +670,9 @@ void LLIMWellWindow::addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId) { RowPanel* item = new RowPanel(this, sessionId, chicletCounter, name, otherParticipantId); - if (mMessageList->insertItemAfter(mSeparator, item, sessionId)) + if (mMessageList->addItem(item, sessionId)) { - handleItemAdded(IT_INSTANT_MESSAGE); + mSysWellChiclet->updateWidget(isWindowEmpty()); } else { @@ -782,7 +697,7 @@ void LLIMWellWindow::delIMRow(const LLUUID& sessionId) if (mMessageList->removeItemByValue(sessionId)) { - handleItemRemoved(IT_INSTANT_MESSAGE); + mSysWellChiclet->updateWidget(isWindowEmpty()); } else { @@ -810,9 +725,9 @@ void LLIMWellWindow::addObjectRow(const LLUUID& notification_id, bool new_messag if (mMessageList->getItemByValue(notification_id) == NULL) { ObjectRowPanel* item = new ObjectRowPanel(notification_id, new_message); - if (mMessageList->insertItemAfter(mSeparator, item, notification_id)) + if (mMessageList->addItem(item, notification_id)) { - handleItemAdded(IT_INSTANT_MESSAGE); + mSysWellChiclet->updateWidget(isWindowEmpty()); } else { @@ -827,7 +742,7 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id) { if (mMessageList->removeItemByValue(notification_id)) { - handleItemRemoved(IT_INSTANT_MESSAGE); + mSysWellChiclet->updateWidget(isWindowEmpty()); } else { diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 296bdf7482..c8215c71ee 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -82,20 +82,12 @@ public: protected: - typedef enum{ - IT_NOTIFICATION, - IT_INSTANT_MESSAGE - }EItemType; - // gets a rect that bounds possible positions for the SysWellWindow on a screen (EXT-1111) void getAllowedRect(LLRect& rect); // init Window's channel virtual void initChannel(); - void handleItemAdded(EItemType added_item_type); - void handleItemRemoved(EItemType removed_item_type); - bool anotherTypeExists(EItemType item_type) ; const std::string NOTIFICATION_WELL_ANCHOR_NAME; const std::string IM_WELL_ANCHOR_NAME; @@ -113,15 +105,6 @@ protected: */ LLSysWellChiclet* mSysWellChiclet; - /** - * Special panel which is used as separator of Notifications & IM Rows. - * It is always presents in the list and shown when it is necessary. - * It should be taken into account when reshaping and checking list size - */ - LLPanel* mSeparator; - - typedef std::map<EItemType, S32> typed_items_count_t; - typed_items_count_t mTypedItemsCount; bool mIsReshapedByUser; }; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 5dd9623955..46adb0a46b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1237,7 +1237,6 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, bool matches(const LLNotificationPtr notification) const { if(notification->getName() == "ObjectGiveItem" - || notification->getName() == "ObjectGiveItemUnknownUser" || notification->getName() == "UserGiveItem") { return (notification->getPayload()["from_id"].asUUID() == blocked_id); @@ -1700,7 +1699,6 @@ void LLOfferInfo::initRespondFunctionMap() if(mRespondFunctions.empty()) { mRespondFunctions["ObjectGiveItem"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2); - mRespondFunctions["ObjectGiveItemUnknownUser"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2); mRespondFunctions["UserGiveItem"] = boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2); } } @@ -1771,30 +1769,6 @@ void inventory_offer_handler(LLOfferInfo* info) return; } - // Name cache callbacks don't store userdata, so can't save - // off the LLOfferInfo. Argh. - BOOL name_found = FALSE; - if (info->mFromGroup) - { - std::string group_name; - if (gCacheName->getGroupName(info->mFromID, group_name)) - { - args["FIRST"] = group_name; - args["LAST"] = ""; - name_found = TRUE; - } - } - else - { - std::string first_name, last_name; - if (gCacheName->getName(info->mFromID, first_name, last_name)) - { - args["FIRST"] = first_name; - args["LAST"] = last_name; - name_found = TRUE; - } - } - // If mObjectID is null then generate the object_id based on msg to prevent // multiple creation of chiclets for same object. LLUUID object_id = info->mObjectID; @@ -1823,9 +1797,9 @@ void inventory_offer_handler(LLOfferInfo* info) // Note: sets inventory_task_offer_callback as the callback p.substitutions(args).payload(payload).functor.responder(LLNotificationResponderPtr(info)); info->mPersist = true; - p.name = name_found ? "ObjectGiveItem" : "ObjectGiveItemUnknownUser"; + p.name = "ObjectGiveItem"; // Pop up inv offer chiclet and let the user accept (keep), or reject (and silently delete) the inventory. - LLNotifications::instance().add(p); + LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, info->mFromGroup == TRUE); } else // Agent -> Agent Inventory Offer { diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index eefcabdd39..e0d8926d4a 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -90,7 +90,6 @@ <menu_item_call.on_click function="World.SetAway" /> </menu_item_call> - <menu_item_separator/> <menu_item_call label="Busy" name="Set Busy"> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 4479a3dd4d..10914285dd 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5088,28 +5088,6 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC <notification icon="notify.tga" - name="ObjectGiveItemUnknownUser" - type="offer"> -An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you this [OBJECTTYPE]: -[ITEM_SLURL] - <form name="form"> - <button - index="0" - name="Keep" - text="Keep"/> - <button - index="1" - name="Discard" - text="Discard"/> - <button - index="2" - name="Mute" - text="Block"/> - </form> - </notification> - - <notification - icon="notify.tga" name="UserGiveItem" persist="true" type="offer"> diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 7e212c9383..b79ef1e287 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -464,7 +464,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M name="view_profile_btn" tool_tip="Show picture, groups, and other Residents information" top="0" - width="70" /> + width="67" /> <button follows="bottom|left" left_pad="3" @@ -473,7 +473,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M layout="topleft" name="im_btn" tool_tip="Open instant message session" - width="43" /> + width="40" /> <button follows="bottom|left" left_pad="3" @@ -491,7 +491,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M layout="topleft" name="share_btn" tool_tip="Share an inventory item" - width="62" /> + width="65" /> <button follows="bottom|left" left_pad="3" diff --git a/indra/newview/skins/default/xui/pt/panel_people.xml b/indra/newview/skins/default/xui/pt/panel_people.xml index 0b274d6faa..17f5b6cbac 100644 --- a/indra/newview/skins/default/xui/pt/panel_people.xml +++ b/indra/newview/skins/default/xui/pt/panel_people.xml @@ -52,11 +52,11 @@ Em busca de alguém para conversar? Procure no [secondlife:///app/worldmap Mapa- </panel> </tab_container> <panel name="button_bar"> - <button label="Perfil" name="view_profile_btn" tool_tip="Exibir fotografia, grupos e outras informações dos residentes"/> - <button label="MI" name="im_btn" tool_tip="Iniciar MI"/> - <button label="Chamada" name="call_btn" tool_tip="Ligar para este residente"/> - <button label="Compartilhar" name="share_btn"/> - <button label="Teletransporte" name="teleport_btn" tool_tip="Oferecer teletransporte"/> + <button label="Perfil" name="view_profile_btn" tool_tip="Exibir fotografia, grupos e outras informações dos residentes" width="50"/> + <button label="MI" name="im_btn" tool_tip="Iniciar MI" width="24"/> + <button label="Chamada" name="call_btn" tool_tip="Ligar para este residente" width="61"/> + <button label="Compartilhar" name="share_btn" width="82"/> + <button label="Teletransporte" name="teleport_btn" tool_tip="Oferecer teletransporte" width="86"/> <button label="Perfil do grupo" name="group_info_btn" tool_tip="Exibir informação de grupo"/> <button label="Bate-papo de grupo" name="chat_btn" tool_tip="Iniciar bate-papo"/> <button label="Ligar para o grupo" name="group_call_btn" tool_tip="Ligar para este grupo"/> |