summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llflatlistview.cpp5
-rw-r--r--indra/llui/llflatlistview.h2
-rw-r--r--indra/llui/llview.cpp11
-rw-r--r--indra/llui/llview.h11
-rw-r--r--indra/newview/llchiclet.cpp63
-rw-r--r--indra/newview/llchiclet.h47
-rw-r--r--indra/newview/llfloateravatarpicker.cpp53
-rw-r--r--indra/newview/llfloateravatarpicker.h9
-rw-r--r--indra/newview/llimview.cpp24
-rw-r--r--indra/newview/llimview.h12
-rw-r--r--indra/newview/llpanelme.cpp6
-rw-r--r--indra/newview/llpanelme.h2
-rw-r--r--indra/newview/llpanelpeople.cpp26
-rw-r--r--indra/newview/llpanelpeople.h3
-rw-r--r--indra/newview/llpanelpicks.cpp7
-rw-r--r--indra/newview/llpanelprofile.cpp6
-rw-r--r--indra/newview/llpanelprofile.h2
-rw-r--r--indra/newview/llpanelteleporthistory.cpp7
-rw-r--r--indra/newview/llsyswellwindow.cpp19
-rw-r--r--indra/newview/llsyswellwindow.h16
-rw-r--r--indra/newview/skins/default/xui/en/floater_sys_well.xml9
21 files changed, 276 insertions, 64 deletions
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index d4c3cfb7b6..831ac66d06 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -932,7 +932,7 @@ void LLFlatListView::onFocusLost()
}
//virtual
-void LLFlatListView::notify(const LLSD& info)
+S32 LLFlatListView::notify(const LLSD& info)
{
if(info.has("action"))
{
@@ -941,13 +941,16 @@ void LLFlatListView::notify(const LLSD& info)
{
setFocus(true);
selectFirstItem();
+ return 1;
}
else if(str_action == "select_last")
{
setFocus(true);
selectLastItem();
+ return 1;
}
}
+ return 0;
}
//EOF
diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h
index 9e1e0f90fc..ba824ff2df 100644
--- a/indra/llui/llflatlistview.h
+++ b/indra/llui/llflatlistview.h
@@ -283,7 +283,7 @@ public:
void selectFirstItem ();
void selectLastItem ();
- virtual void notify(const LLSD& info) ;
+ virtual S32 notify(const LLSD& info) ;
protected:
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 23e4131e6d..d8ebe15dc0 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -2848,18 +2848,21 @@ LLView::default_widget_map_t& LLView::getDefaultWidgetMap() const
return *mDefaultWidgets;
}
-void LLView::notifyParent(const LLSD& info)
+S32 LLView::notifyParent(const LLSD& info)
{
LLView* parent = getParent();
if(parent)
- parent->notifyParent(info);
+ return parent->notifyParent(info);
+ return 0;
}
-void LLView::notifyChildren(const LLSD& info)
+bool LLView::notifyChildren(const LLSD& info)
{
+ bool ret = false;
for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
{
- (*child_it)->notifyChildren(info);
+ ret |= (*child_it)->notifyChildren(info);
}
+ return ret;
}
// convenient accessor for draw context
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index c611e4c85f..f8460f5361 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -511,10 +511,15 @@ public:
virtual void handleReshape(const LLRect& rect, bool by_user);
virtual void dirtyRect();
- virtual void notifyParent(const LLSD& info);
- virtual void notifyChildren(const LLSD& info);
+ //send custom notification to LLView parent
+ virtual S32 notifyParent(const LLSD& info);
- virtual void notify(const LLSD& info) {};
+ //send custom notification to all view childrend
+ // return true if _any_ children return true. otherwise false.
+ virtual bool notifyChildren(const LLSD& info);
+
+ //send custom notification to current view
+ virtual S32 notify(const LLSD& info) { return 0;};
static const LLViewDrawContext& getDrawContext();
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 5fad030e5b..6b9e616e47 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -55,7 +55,7 @@
#include "lltransientfloatermgr.h"
static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel");
-static LLDefaultChildRegistry::Register<LLSysWellChiclet> t2_0("chiclet_im_well");
+static LLDefaultChildRegistry::Register<LLIMWellChiclet> t2_0("chiclet_im_well");
static LLDefaultChildRegistry::Register<LLNotificationChiclet> t2("chiclet_notification");
static LLDefaultChildRegistry::Register<LLIMP2PChiclet> t3("chiclet_im_p2p");
static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t4("chiclet_im_group");
@@ -92,7 +92,6 @@ LLSysWellChiclet::LLSysWellChiclet(const Params& p)
: LLChiclet(p)
, mButton(NULL)
, mCounter(0)
-, mUreadSystemNotifications(0)
{
LLButton::Params button_params = p.button;
mButton = LLUICtrlFactory::create<LLButton>(button_params);
@@ -104,17 +103,6 @@ LLSysWellChiclet::~LLSysWellChiclet()
}
-void LLSysWellChiclet::connectCounterUpdatersToSignal(std::string notification_type)
-{
- LLNotificationsUI::LLNotificationManager* manager = LLNotificationsUI::LLNotificationManager::getInstance();
- LLNotificationsUI::LLEventHandler* n_handler = manager->getHandlerForNotification(notification_type);
- if(n_handler)
- {
- n_handler->setNewNotificationCallback(boost::bind(&LLNotificationChiclet::incUreadSystemNotifications, this));
- n_handler->setDelNotification(boost::bind(&LLNotificationChiclet::decUreadSystemNotifications, this));
- }
-}
-
void LLSysWellChiclet::setCounter(S32 counter)
{
std::string s_count;
@@ -138,8 +126,36 @@ void LLSysWellChiclet::setToggleState(BOOL toggled) {
mButton->setToggleState(toggled);
}
+
+/************************************************************************/
+/* LLIMWellChiclet implementation */
+/************************************************************************/
+LLIMWellChiclet::LLIMWellChiclet(const Params& p)
+: LLSysWellChiclet(p)
+{
+ LLIMModel::instance().addNewMsgCallback(boost::bind(&LLIMWellChiclet::messageCountChanged, this, _1));
+ LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(&LLIMWellChiclet::messageCountChanged, this, _1));
+
+ LLIMMgr::getInstance()->addSessionObserver(this);
+}
+
+LLIMWellChiclet::~LLIMWellChiclet()
+{
+ LLIMMgr::getInstance()->removeSessionObserver(this);
+}
+
+void LLIMWellChiclet::messageCountChanged(const LLSD& session_data)
+{
+ S32 total_unread = LLIMMgr::instance().getNumberOfUnreadParticipantMessages();
+ setCounter(total_unread);
+}
+
+/************************************************************************/
+/* LLNotificationChiclet implementation */
+/************************************************************************/
LLNotificationChiclet::LLNotificationChiclet(const Params& p)
: LLSysWellChiclet(p)
+, mUreadSystemNotifications(0)
{
// connect counter handlers to the signals
connectCounterUpdatersToSignal("notify");
@@ -147,6 +163,16 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p)
connectCounterUpdatersToSignal("offer");
}
+void LLNotificationChiclet::connectCounterUpdatersToSignal(const std::string& notification_type)
+{
+ LLNotificationsUI::LLNotificationManager* manager = LLNotificationsUI::LLNotificationManager::getInstance();
+ LLNotificationsUI::LLEventHandler* n_handler = manager->getHandlerForNotification(notification_type);
+ if(n_handler)
+ {
+ n_handler->setNewNotificationCallback(boost::bind(&LLNotificationChiclet::incUreadSystemNotifications, this));
+ n_handler->setDelNotification(boost::bind(&LLNotificationChiclet::decUreadSystemNotifications, this));
+ }
+}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
@@ -886,16 +912,7 @@ LLChicletPanel::~LLChicletPanel()
void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){
LLUUID session_id = data["session_id"].asUUID();
- LLUUID from_id = data["from_id"].asUUID();
- const std::string from = data["from"].asString();
- S32 unread = data["num_unread"].asInteger();
-
- // if new message came
- if(unread != 0)
- {
- //we do not show balloon (indicator of new messages) for system messages and our own messages
- if (from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from) return;
- }
+ S32 unread = data["participant_unread"].asInteger();
LLIMFloater* im_floater = LLIMFloater::findInstance(session_id);
if (im_floater && im_floater->getVisible())
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 7e2d1ea411..609ce16713 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -39,6 +39,7 @@
#include "lltextbox.h"
#include "lloutputmonitorctrl.h"
#include "llgroupmgr.h"
+#include "llimview.h"
class LLVoiceControlPanel;
class LLMenuGL;
@@ -770,31 +771,63 @@ public:
/*virtual*/ ~LLSysWellChiclet();
- // methods for updating a number of unread System notifications
- void incUreadSystemNotifications() { setCounter(++mUreadSystemNotifications); }
- void decUreadSystemNotifications() { setCounter(--mUreadSystemNotifications); }
void setToggleState(BOOL toggled);
protected:
- // connect counter updaters to the corresponding signals
- void connectCounterUpdatersToSignal(std::string notification_type);
LLSysWellChiclet(const Params& p);
friend class LLUICtrlFactory;
- S32 mUreadSystemNotifications;
-
protected:
LLButton* mButton;
S32 mCounter;
};
+/**
+ * Class represented a chiclet for IM Well Icon.
+ *
+ * It displays a count of unread messages from other participants in all IM sessions.
+ */
+class LLIMWellChiclet : public LLSysWellChiclet, LLIMSessionObserver
+{
+ friend class LLUICtrlFactory;
+public:
+ virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}
+ virtual void sessionRemoved(const LLUUID& session_id) { messageCountChanged(LLSD()); }
+ virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) {}
+
+ ~LLIMWellChiclet();
+protected:
+ LLIMWellChiclet(const Params& p);
+
+ /**
+ * Handles changes in a session (message was added, messages were read, etc.)
+ *
+ * It get total count of unread messages from a LLIMMgr in all opened sessions and display it.
+ *
+ * @param[in] session_data contains session related data, is not used now
+ * ["session_id"] - id of an appropriate session
+ * ["participant_unread"] - count of unread messages from "real" participants.
+ *
+ * @see LLIMMgr::getNumberOfUnreadParticipantMessages()
+ */
+ void messageCountChanged(const LLSD& session_data);
+};
+
class LLNotificationChiclet : public LLSysWellChiclet
{
friend class LLUICtrlFactory;
protected:
LLNotificationChiclet(const Params& p);
+ // connect counter updaters to the corresponding signals
+ void connectCounterUpdatersToSignal(const std::string& notification_type);
+
+ // methods for updating a number of unread System notifications
+ void incUreadSystemNotifications() { setCounter(++mUreadSystemNotifications); }
+ void decUreadSystemNotifications() { setCounter(--mUreadSystemNotifications); }
+
+ S32 mUreadSystemNotifications;
};
/**
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 07bb6f832b..6e3d5499a2 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -140,9 +140,14 @@ BOOL LLFloaterAvatarPicker::postBuild()
return TRUE;
}
+void LLFloaterAvatarPicker::setOkBtnEnableCb(validate_callback_t cb)
+{
+ mOkButtonValidateSignal.connect(cb);
+}
+
void LLFloaterAvatarPicker::onTabChanged()
{
- childSetEnabled("ok_btn", visibleItemsSelected());
+ childSetEnabled("ok_btn", isSelectBtnEnabled());
}
// Destroys the object
@@ -175,6 +180,10 @@ void LLFloaterAvatarPicker::onBtnSelect(void* userdata)
{
LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;
+ // If select btn not enabled then do not callback
+ if (!self || !self->isSelectBtnEnabled())
+ return;
+
if(self->mCallback)
{
std::string acvtive_panel_name;
@@ -244,7 +253,7 @@ void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata)
LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;
if (self)
{
- self->childSetEnabled("ok_btn", self->visibleItemsSelected());
+ self->childSetEnabled("ok_btn", self->isSelectBtnEnabled());
}
}
@@ -477,3 +486,43 @@ BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask)
return LLFloater::handleKeyHere(key, mask);
}
+
+bool LLFloaterAvatarPicker::isSelectBtnEnabled()
+{
+ bool ret_val = visibleItemsSelected();
+
+ if ( ret_val && mOkButtonValidateSignal.num_slots() )
+ {
+ std::string acvtive_panel_name;
+ LLScrollListCtrl* list = NULL;
+ LLPanel* active_panel = childGetVisibleTab("ResidentChooserTabs");
+
+ if(active_panel)
+ {
+ acvtive_panel_name = active_panel->getName();
+ }
+
+ if(acvtive_panel_name == "SearchPanel")
+ {
+ list = getChild<LLScrollListCtrl>("SearchResults");
+ }
+ else if(acvtive_panel_name == "NearMePanel")
+ {
+ list = getChild<LLScrollListCtrl>("NearMe");
+ }
+ else if (acvtive_panel_name == "FriendsPanel")
+ {
+ list = getChild<LLScrollListCtrl>("Friends");
+ }
+
+ if(list)
+ {
+ std::vector<LLUUID> avatar_ids;
+ std::vector<std::string> avatar_names;
+ getSelectedAvatarData(list, avatar_names, avatar_ids);
+ return mOkButtonValidateSignal(avatar_ids);
+ }
+ }
+
+ return ret_val;
+}
diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h
index b8ace985d9..13e491834e 100644
--- a/indra/newview/llfloateravatarpicker.h
+++ b/indra/newview/llfloateravatarpicker.h
@@ -40,6 +40,9 @@
class LLFloaterAvatarPicker : public LLFloater
{
public:
+ typedef boost::signals2::signal<bool(const std::vector<LLUUID>&), boost_boolean_combiner> validate_signal_t;
+ typedef validate_signal_t::slot_type validate_callback_t;
+
// Call this to select an avatar.
// The callback function will be called with an avatar name and UUID.
typedef void(*callback_t)(const std::vector<std::string>&, const std::vector<LLUUID>&, void*);
@@ -53,6 +56,8 @@ public:
virtual BOOL postBuild();
+ void setOkBtnEnableCb(validate_callback_t cb);
+
static void processAvatarPickerReply(class LLMessageSystem* msg, void**);
private:
@@ -65,7 +70,8 @@ private:
static void onBtnClose(void* userdata);
static void onList(class LLUICtrl* ctrl, void* userdata);
void onTabChanged();
-
+ bool isSelectBtnEnabled();
+
void populateNearMe();
void populateFriend();
BOOL visibleItemsSelected() const; // Returns true if any items in the current tab are selected.
@@ -83,6 +89,7 @@ private:
void (*mCallback)(const std::vector<std::string>& name, const std::vector<LLUUID>& id, void* userdata);
void* mCallbackUserdata;
+ validate_signal_t mOkButtonValidateSignal;
};
#endif
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index f1efc11b07..6c4af0522f 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -148,6 +148,7 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
: mSessionID(session_id),
mName(name),
mType(type),
+ mParticipantUnreadMessageCount(0),
mNumUnread(0),
mOtherParticipantID(other_participant_id),
mInitialTargetIDs(ids),
@@ -496,10 +497,12 @@ void LLIMModel::getMessages(const LLUUID& session_id, std::list<LLSD>& messages,
}
session->mNumUnread = 0;
+ session->mParticipantUnreadMessageCount = 0;
LLSD arg;
arg["session_id"] = session_id;
arg["num_unread"] = 0;
+ arg["participant_unread"] = session->mParticipantUnreadMessageCount;
mNoUnreadMsgsSignal(arg);
}
@@ -576,10 +579,18 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co
session->mNumUnread++;
+ //update count of unread messages from real participant
+ if (!(from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from))
+ {
+ ++(session->mParticipantUnreadMessageCount);
+ }
+
+
// notify listeners
LLSD arg;
arg["session_id"] = session_id;
arg["num_unread"] = session->mNumUnread;
+ arg["participant_unread"] = session->mParticipantUnreadMessageCount;
arg["message"] = utf8_text;
arg["from"] = from;
arg["from_id"] = from_id;
@@ -1895,6 +1906,19 @@ S32 LLIMMgr::getNumberOfUnreadIM()
return num;
}
+S32 LLIMMgr::getNumberOfUnreadParticipantMessages()
+{
+ std::map<LLUUID, LLIMModel::LLIMSession*>::iterator it;
+
+ S32 num = 0;
+ for(it = LLIMModel::getInstance()->mId2SessionMap.begin(); it != LLIMModel::getInstance()->mId2SessionMap.end(); ++it)
+ {
+ num += (*it).second->mParticipantUnreadMessageCount;
+ }
+
+ return num;
+}
+
void LLIMMgr::clearNewIMNotification()
{
mIMReceived = FALSE;
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 4561d760d4..c002434a18 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -86,7 +86,10 @@ public:
// connection to voice channel state change signal
boost::signals2::connection mVoiceChannelStateChangeConnection;
- //does NOT include system messages
+ //does NOT include system messages and agent's messages
+ S32 mParticipantUnreadMessageCount;
+
+ // does include all incoming messages
S32 mNumUnread;
std::list<LLSD> mMsgs;
@@ -330,9 +333,14 @@ public:
// IM received that you haven't seen yet
BOOL getIMReceived() const;
- // Calc number of unread IMs
+ // Calc number of all unread IMs
S32 getNumberOfUnreadIM();
+ /**
+ * Calculates number of unread IMs from real participants in all stored sessions
+ */
+ S32 getNumberOfUnreadParticipantMessages();
+
// This method is used to go through all active sessions and
// disable all of them. This method is usally called when you are
// forced to log out or similar situations where you do not have a
diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp
index 046118cf75..4e21268a8a 100644
--- a/indra/newview/llpanelme.cpp
+++ b/indra/newview/llpanelme.cpp
@@ -71,7 +71,7 @@ void LLPanelMe::onOpen(const LLSD& key)
LLPanelProfile::onOpen(key);
}
-void LLPanelMe::notifyChildren(const LLSD& info)
+bool LLPanelMe::notifyChildren(const LLSD& info)
{
if (info.has("task-panel-action") && info["task-panel-action"].asString() == "handle-tri-state")
{
@@ -104,10 +104,10 @@ void LLPanelMe::notifyChildren(const LLSD& info)
if (on_default_view)
LLSideTray::getInstance()->collapseSideBar();
- return; // this notification is only supposed to be handled by task panels
+ return true; // this notification is only supposed to be handled by task panels
}
- LLPanel::notifyChildren(info);
+ return LLPanel::notifyChildren(info);
}
void LLPanelMe::buildEditPanel()
diff --git a/indra/newview/llpanelme.h b/indra/newview/llpanelme.h
index 17d367132e..1325192bbf 100644
--- a/indra/newview/llpanelme.h
+++ b/indra/newview/llpanelme.h
@@ -54,7 +54,7 @@ public:
LLPanelMe();
/*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void notifyChildren(const LLSD& info);
+ /*virtual*/ bool notifyChildren(const LLSD& info);
/*virtual*/ BOOL postBuild();
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 1743df52fc..1e4682701e 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -1003,10 +1003,28 @@ void LLPanelPeople::onAddFriendButtonClicked()
}
}
+bool LLPanelPeople::isItemsFreeOfFriends(const std::vector<LLUUID>& uuids)
+{
+ const LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
+ for ( std::vector<LLUUID>::const_iterator
+ id = uuids.begin(),
+ id_end = uuids.end();
+ id != id_end; ++id )
+ {
+ if (av_tracker.isBuddy (*id))
+ {
+ return false;
+ }
+ }
+ return true;
+}
+
void LLPanelPeople::onAddFriendWizButtonClicked()
{
// Show add friend wizard.
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(onAvatarPicked, NULL, FALSE, TRUE);
+ // Need to disable 'ok' button when friend occurs in selection
+ if (picker) picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1));
LLFloater* root_floater = gFloaterView->getParentFloater(this);
if (root_floater)
{
@@ -1284,7 +1302,7 @@ void LLPanelPeople::onOpen(const LLSD& key)
reSelectedCurrentTab();
}
-void LLPanelPeople::notifyChildren(const LLSD& info)
+bool LLPanelPeople::notifyChildren(const LLSD& info)
{
if (info.has("task-panel-action") && info["task-panel-action"].asString() == "handle-tri-state")
{
@@ -1292,7 +1310,7 @@ void LLPanelPeople::notifyChildren(const LLSD& info)
if (!container)
{
llwarns << "Cannot find People panel container" << llendl;
- return;
+ return true;
}
if (container->getCurrentPanelIndex() > 0)
@@ -1303,10 +1321,10 @@ void LLPanelPeople::notifyChildren(const LLSD& info)
else
LLSideTray::getInstance()->collapseSideBar();
- return; // this notification is only supposed to be handled by task panels
+ return true; // this notification is only supposed to be handled by task panels
}
- LLPanel::notifyChildren(info);
+ return LLPanel::notifyChildren(info);
}
void LLPanelPeople::showAccordion(const std::string name, bool show)
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index 5ac5bcc1d7..a9cc6d0ccb 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -51,7 +51,7 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void notifyChildren(const LLSD& info);
+ /*virtual*/ bool notifyChildren(const LLSD& info);
// internals
class Updater;
@@ -72,6 +72,7 @@ private:
void updateRecentList();
bool isFriendOnline(const LLUUID& id);
+ bool isItemsFreeOfFriends(const std::vector<LLUUID>& uuids);
void updateButtons();
std::string getActiveTabName() const;
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index cc6e88a9d2..59a68bc12d 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -161,6 +161,9 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
std::string name, second_name;
gCacheName->getName(getAvatarId(),name,second_name);
childSetTextArg("pick_title", "[NAME]",name);
+
+ // Save selection, to be able to edit same item after saving changes. See EXT-3023.
+ LLUUID selected_id = mPicksList->getSelectedValue()[PICK_ID];
mPicksList->clear();
@@ -186,6 +189,10 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
mPicksList->addItem(picture, pick_value);
+ // Restore selection by item id.
+ if ( pick_id == selected_id )
+ mPicksList->selectItemByValue(pick_value);
+
picture->setDoubleClickCallback(boost::bind(&LLPanelPicks::onDoubleClickPickItem, this, _1));
picture->setRightMouseUpCallback(boost::bind(&LLPanelPicks::onRightMouseUpItem, this, _1, _2, _3, _4));
picture->setMouseUpCallback(boost::bind(&LLPanelPicks::updateButtons, this));
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 1830d00f68..3274820174 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -220,15 +220,15 @@ void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
panel->setRect(new_rect);
}
-void LLPanelProfile::notifyParent(const LLSD& info)
+S32 LLPanelProfile::notifyParent(const LLSD& info)
{
std::string action = info["action"];
// lets update Picks list after Pick was saved
if("save_new_pick" == action)
{
onOpen(info);
- return;
+ return 1;
}
- LLPanel::notifyParent(info);
+ return LLPanel::notifyParent(info);
}
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index 067beb248b..bcf4bdd0ec 100644
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -55,7 +55,7 @@ public:
virtual void openPanel(LLPanel* panel, const LLSD& params);
- void notifyParent(const LLSD& info);
+ S32 notifyParent(const LLSD& info);
protected:
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index b3e8588efc..43f80f6d6a 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -319,11 +319,8 @@ void LLTeleportHistoryPanel::draw()
// virtual
void LLTeleportHistoryPanel::onSearchEdit(const std::string& string)
{
- if (sFilterSubString != string)
- {
- sFilterSubString = string;
- showTeleportHistory();
- }
+ sFilterSubString = string;
+ showTeleportHistory();
}
// virtual
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index c288301923..e5a4b456a0 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -47,6 +47,7 @@
static std::string NOTIFICATION_WELL_ANCHOR_NAME = "notification_well_panel";
+static std::string IM_WELL_ANCHOR_NAME = "im_well_panel";
//---------------------------------------------------------------------------------
LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLDockableFloater(NULL, key),
@@ -156,7 +157,7 @@ void LLSysWellWindow::setVisible(BOOL visible)
if (NULL == getDockControl() && getDockTongue().notNull())
{
setDockControl(new LLDockControl(
- LLBottomTray::getInstance()->getChild<LLView>(NOTIFICATION_WELL_ANCHOR_NAME), this,
+ LLBottomTray::getInstance()->getChild<LLView>(getAnchorViewName()), this,
getDockTongue(), LLDockControl::TOP, boost::bind(&LLSysWellWindow::getAllowedRect, this, _1)));
}
}
@@ -373,6 +374,15 @@ LLNotificationWellWindow* LLNotificationWellWindow::getInstance(const LLSD& key
return LLFloaterReg::getTypedInstance<LLNotificationWellWindow>("notification_well_window", key);
}
+// virtual
+BOOL LLNotificationWellWindow::postBuild()
+{
+ BOOL rv = LLSysWellWindow::postBuild();
+ setTitle(getString("title_notification_well_window"));
+ return rv;
+}
+
+// virtual
void LLNotificationWellWindow::setVisible(BOOL visible)
{
if (visible)
@@ -501,6 +511,13 @@ LLIMWellWindow* LLIMWellWindow::getInstance(const LLSD& key /*= LLSD()*/)
return LLFloaterReg::getTypedInstance<LLIMWellWindow>("im_well_window", key);
}
+BOOL LLIMWellWindow::postBuild()
+{
+ BOOL rv = LLSysWellWindow::postBuild();
+ setTitle(getString("title_im_well_window"));
+ return rv;
+}
+
//virtual
void LLIMWellWindow::sessionAdded(const LLUUID& session_id,
const std::string& name, const LLUUID& other_participant_id)
diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h
index 21391cebea..d2c494bfe8 100644
--- a/indra/newview/llsyswellwindow.h
+++ b/indra/newview/llsyswellwindow.h
@@ -47,6 +47,10 @@ class LLFlatListView;
class LLChiclet;
class LLIMChiclet;
+extern std::string NOTIFICATION_WELL_ANCHOR_NAME;
+extern std::string IM_WELL_ANCHOR_NAME;
+
+
class LLSysWellWindow : public LLDockableFloater
{
public:
@@ -92,7 +96,7 @@ protected:
void handleItemRemoved(EItemType removed_item_type);
bool anotherTypeExists(EItemType item_type) ;
-
+ virtual const std::string& getAnchorViewName() = 0;
void reshapeWindow();
@@ -125,16 +129,21 @@ public:
static void initClass() { getInstance(); }
+ /*virtual*/ BOOL postBuild();
/*virtual*/ void setVisible(BOOL visible);
// Operating with items
void addItem(LLSysWellItem::Params p);
+protected:
+ /*virtual*/ const std::string& getAnchorViewName() { return NOTIFICATION_WELL_ANCHOR_NAME; }
+
private:
// init Window's channel
void initChannel();
void clearScreenChannels();
+
void onStoreToast(LLPanel* info_panel, LLUUID id);
// connect counter and list updaters to the corresponding signals
@@ -160,11 +169,16 @@ public:
static LLIMWellWindow* getInstance(const LLSD& key = LLSD());
static void initClass() { getInstance(); }
+ /*virtual*/ BOOL postBuild();
+
// LLIMSessionObserver observe triggers
/*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
/*virtual*/ void sessionRemoved(const LLUUID& session_id);
/*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
+protected:
+ /*virtual*/ const std::string& getAnchorViewName() { return IM_WELL_ANCHOR_NAME; }
+
private:
LLChiclet * findIMChiclet(const LLUUID& sessionId);
void addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId);
diff --git a/indra/newview/skins/default/xui/en/floater_sys_well.xml b/indra/newview/skins/default/xui/en/floater_sys_well.xml
index 4e9388c2b2..3fc57372de 100644
--- a/indra/newview/skins/default/xui/en/floater_sys_well.xml
+++ b/indra/newview/skins/default/xui/en/floater_sys_well.xml
@@ -21,6 +21,15 @@
save_visibility="true"
single_instance="true"
>
+ <string
+ name="title_im_well_window">
+ IM SESSIONS
+ </string>
+ <string
+ name="title_notification_well_window">
+ NOTIFICATIONS
+ </string>
+
<flat_list_view
color="FloaterDefaultBackgroundColor"
follows="all"