//--------------------------------------------------------------------------------- void LLIMWellWindow::delIMRow(const LLUUID& sessionId) { //fix for EXT-3252 //without this line LLIMWellWindow receive onFocusLost //and hide itself. It was becaue somehow LLIMChicklet was in focus group for //LLIMWellWindow... //But I didn't find why this happen.. gFocusMgr.clearLastFocusForGroup(this); if (mMessageList->removeItemByValue(sessionId)) { mSysWellChiclet->updateWidget(isWindowEmpty()); } else { llwarns << "Unable to remove IM Row from the list, sessionID: " << sessionId << llendl; } // remove all toasts that belong to this session from a screen if(mChannel) mChannel->removeToastsBySessionID(sessionId); // hide chiclet window if there are no items left if(isWindowEmpty()) { setVisible(FALSE); } else { setFocus(true); } }
//--------------------------------------------------------------------------------- void LLSysWellWindow::setVisible(BOOL visible) { if (visible) { if (NULL == getDockControl() && getDockTongue().notNull()) { setDockControl(new LLDockControl( LLBottomTray::getInstance()->getChild<LLView>(getAnchorViewName()), this, getDockTongue(), LLDockControl::TOP, boost::bind(&LLSysWellWindow::getAllowedRect, this, _1))); } } // do not show empty window if (NULL == mMessageList || isWindowEmpty()) visible = FALSE; LLTransientDockableFloater::setVisible(visible); // update notification channel state if(mChannel) { mChannel->updateShowToastsState(); mChannel->redrawToasts(); } if (visible) { releaseNewMessagesState(); } }
//--------------------------------------------------------------------------------- void LLNotificationWellWindow::addItem(LLSysWellItem::Params p) { LLSD value = p.notification_id; // do not add clones if( mMessageList->getItemByValue(value)) return; LLSysWellItem* new_item = new LLSysWellItem(p); if (mMessageList->addItem(new_item, value, ADD_TOP)) { mSysWellChiclet->updateWidget(isWindowEmpty()); reshapeWindow(); new_item->setOnItemCloseCallback(boost::bind(&LLNotificationWellWindow::onItemClose, this, _1)); new_item->setOnItemClickCallback(boost::bind(&LLNotificationWellWindow::onItemClick, this, _1)); } else { llwarns << "Unable to add Notification into the list, notification ID: " << p.notification_id << ", title: " << p.title << llendl; new_item->die(); } }
// *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::setVisible(BOOL visible) { if (visible) { if (NULL == getDockControl() && getDockTongue().notNull()) { setDockControl(new LLDockControl( LLChicletBar::getInstance()->getChild<LLView>(getAnchorViewName()), this, getDockTongue(), LLDockControl::BOTTOM)); } } // do not show empty window if (NULL == mMessageList || isWindowEmpty()) visible = FALSE; LLTransientDockableFloater::setVisible(visible); // update notification channel state initChannel(); // make sure the channel still exists if(mChannel) { mChannel->updateShowToastsState(); mChannel->redrawToasts(); } if (visible) { releaseNewMessagesState(); } }
void LLSysWellWindow::setSysWellChiclet(LLSysWellChiclet* chiclet) { mSysWellChiclet = chiclet; if(NULL != mSysWellChiclet) { mSysWellChiclet->updateWidget(isWindowEmpty()); } }
void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id) { if (mMessageList->removeItemByValue(notification_id)) { mSysWellChiclet->updateWidget(isWindowEmpty()); } else { llwarns << "Unable to remove Object Row from the list, notificationID: " << notification_id << llendl; } reshapeWindow(); // hide chiclet window if there are no items left if(isWindowEmpty()) { setVisible(FALSE); } }
//--------------------------------------------------------------------------------- void LLSysWellWindow::removeItemByID(const LLUUID& id) { if(mMessageList->removeItemByValue(id)) { if (NULL != mSysWellChiclet) { mSysWellChiclet->updateWidget(isWindowEmpty()); } reshapeWindow(); } else { LL_WARNS() << "Unable to remove notification from the list, ID: " << id << LL_ENDL; } // hide chiclet window if there are no items left if(isWindowEmpty()) { setVisible(FALSE); } }
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()); }
void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id) { if (!mMessageList->removeItemByValue(notification_id)) { LL_WARNS() << "Unable to remove Object Row from the list, notificationID: " << notification_id << LL_ENDL; } reshapeWindow(); // hide chiclet window if there are no items left if(isWindowEmpty()) { setVisible(FALSE); } }
void LLIMWellWindow::addObjectRow(const LLUUID& notification_id, bool new_message/* = false*/) { if (mMessageList->getItemByValue(notification_id) == NULL) { ObjectRowPanel* item = new ObjectRowPanel(notification_id, new_message); if (mMessageList->addItem(item, notification_id)) { mSysWellChiclet->updateWidget(isWindowEmpty()); } else { llwarns << "Unable to add Object Row into the list, notificationID: " << notification_id << llendl; item->die(); } reshapeWindow(); } }
//--------------------------------------------------------------------------------- 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->addItem(item, sessionId)) { mSysWellChiclet->updateWidget(isWindowEmpty()); } else { llwarns << "Unable to add IM Row into the list, sessionID: " << sessionId << ", name: " << name << ", other participant ID: " << otherParticipantId << llendl; item->die(); } }
//--------------------------------------------------------------------------------- void LLSysWellWindow::removeItemByID(const LLUUID& id) { if(mMessageList->removeItemByValue(id)) { handleItemRemoved(IT_NOTIFICATION); reshapeWindow(); } else { llwarns << "Unable to remove notification from the list, ID: " << id << llendl; } // hide chiclet window if there are no items left if(isWindowEmpty()) { setVisible(FALSE); } }