summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lldockablefloater.h3
-rw-r--r--indra/llui/lldockcontrol.h3
-rw-r--r--indra/newview/app_settings/settings.xml13
-rw-r--r--indra/newview/llappviewer.cpp11
-rw-r--r--indra/newview/llchiclet.cpp20
-rw-r--r--indra/newview/llchiclet.h9
-rw-r--r--indra/newview/llimfloater.cpp2
-rw-r--r--indra/newview/llpanelgroup.cpp67
-rw-r--r--indra/newview/llpanelgroup.h8
-rw-r--r--indra/newview/llparticipantlist.cpp10
-rw-r--r--indra/newview/llscreenchannel.cpp79
-rw-r--r--indra/newview/llscreenchannel.h5
-rw-r--r--indra/newview/llsyswellwindow.cpp2
-rw-r--r--indra/newview/lltooldraganddrop.cpp3
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_notes.xml5
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile.xml6
17 files changed, 224 insertions, 32 deletions
diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h
index 46491d8a29..2c339f4a3f 100644
--- a/indra/llui/lldockablefloater.h
+++ b/indra/llui/lldockablefloater.h
@@ -83,6 +83,8 @@ public:
virtual void onDockHidden();
virtual void onDockShown();
+ LLDockControl* getDockControl();
+
private:
/**
* Provides unique of dockable floater.
@@ -92,7 +94,6 @@ private:
protected:
void setDockControl(LLDockControl* dockControl);
- LLDockControl* getDockControl();
const LLUIImagePtr& getDockTongue();
private:
diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h
index 30a45bedc7..550955c4c5 100644
--- a/indra/llui/lldockcontrol.h
+++ b/indra/llui/lldockcontrol.h
@@ -76,6 +76,9 @@ public:
// gets a rect that bounds possible positions for a dockable control (EXT-1111)
void getAllowedRect(LLRect& rect);
+ S32 getTongueWidth() { return mDockTongue->getWidth(); }
+ S32 getTongueHeight() { return mDockTongue->getHeight(); }
+
private:
virtual void moveDockable();
private:
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index ec28603d25..a647bc09f2 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5039,7 +5039,18 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>35</integer>
+ <integer>5</integer>
+ </map>
+ <key>NotificationChannelHeightRatio</key>
+ <map>
+ <key>Comment</key>
+ <string>Notification channel and World View ratio(0.0 - always show 1 notification, 1.0 - max ratio).</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.5</real>
</map>
<key>OverflowToastHeight</key>
<map>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 6bbc1eaa6a..9af25a90f1 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -79,6 +79,8 @@
#include "lllocationhistory.h"
#include "llfasttimerview.h"
#include "llvoicechannel.h"
+#include "llsidetray.h"
+
#include "llweb.h"
#include "llsecondlifeurls.h"
@@ -2855,6 +2857,8 @@ void LLAppViewer::requestQuit()
gFloaterView->closeAllChildren(true);
}
+ LLSideTray::getInstance()->notifyChildren(LLSD().with("request","quit"));
+
send_stats();
gLogoutTimer.reset();
@@ -3759,6 +3763,13 @@ void LLAppViewer::idleShutdown()
{
return;
}
+
+ if (LLSideTray::getInstance()->notifyChildren(LLSD().with("request","wait_quit")))
+ {
+ return;
+ }
+
+
// ProductEngine: Try moving this code to where we shut down sTextureCache in cleanup()
// *TODO: ugly
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 4b3b7a99d8..bd8effd93d 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -81,17 +81,18 @@ boost::signals2::signal<LLChiclet* (const LLUUID&),
LLSysWellChiclet::Params::Params()
: button("button")
, unread_notifications("unread_notifications")
+, max_displayed_count("max_displayed_count", 9)
{
button.name("button");
button.tab_stop(FALSE);
button.label(LLStringUtil::null);
-
}
LLSysWellChiclet::LLSysWellChiclet(const Params& p)
: LLChiclet(p)
, mButton(NULL)
, mCounter(0)
+, mMaxDisplayedCount(p.max_displayed_count)
{
LLButton::Params button_params = p.button;
mButton = LLUICtrlFactory::create<LLButton>(button_params);
@@ -108,12 +109,27 @@ void LLSysWellChiclet::setCounter(S32 counter)
std::string s_count;
if(counter != 0)
{
- s_count = llformat("%d", counter);
+ static std::string more_messages_exist("+");
+ std::string more_messages(counter > mMaxDisplayedCount ? more_messages_exist : "");
+ s_count = llformat("%d%s"
+ , llmin(counter, mMaxDisplayedCount)
+ , more_messages.c_str()
+ );
}
mButton->setLabel(s_count);
mCounter = counter;
+
+ /*
+ Emulate 4 states of button by background images, see detains in EXT-3147
+ xml attribute Description
+ image_unselected "Unlit" - there are no new messages
+ image_selected "Unlit" + "Selected" - there are no new messages and the Well is open
+ image_pressed "Lit" - there are new messages
+ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open
+ */
+ mButton->setForcePressedState(counter > 0);
}
boost::signals2::connection LLSysWellChiclet::setClickCallback(
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 609ce16713..598773757e 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -757,6 +757,14 @@ public:
Optional<LLChicletNotificationCounterCtrl::Params> unread_notifications;
+ /**
+ * Contains maximum displayed count of unread messages. Default value is 9.
+ *
+ * If count is less than "max_unread_count" will be displayed as is.
+ * Otherwise 9+ will be shown (for default value).
+ */
+ Optional<S32> max_displayed_count;
+
Params();
};
@@ -781,6 +789,7 @@ protected:
protected:
LLButton* mButton;
S32 mCounter;
+ S32 mMaxDisplayedCount;
};
/**
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 2bc07d0c27..40ae112e4b 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -415,6 +415,7 @@ void LLIMFloater::setDocked(bool docked, bool pop_on_undock)
if(channel)
{
channel->updateShowToastsState();
+ channel->redrawToasts();
}
}
@@ -439,6 +440,7 @@ void LLIMFloater::setVisible(BOOL visible)
if(channel)
{
channel->updateShowToastsState();
+ channel->redrawToasts();
}
if (visible && mChatHistory && mInputEditor)
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 2cb3967685..e0f159cfeb 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -90,6 +90,7 @@ LLPanelGroup::LLPanelGroup()
: LLPanel(),
LLGroupMgrObserver( LLUUID() ),
mAllowEdit( TRUE )
+ ,mShowingNotifyDialog(false)
{
// Set up the factory callbacks.
// Roles sub tabs
@@ -538,3 +539,69 @@ void LLPanelGroup::showNotice(const std::string& subject,
}
+bool LLPanelGroup::canClose()
+{
+ if(getVisible() == false)
+ return true;
+
+ bool need_save = false;
+ std::string mesg;
+ for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it)
+ if(need_save|=(*it)->needsApply(mesg))
+ break;
+ if(!need_save)
+ return false;
+ // If no message was provided, give a generic one.
+ if (mesg.empty())
+ {
+ mesg = mDefaultNeedsApplyMesg;
+ }
+ // Create a notify box, telling the user about the unapplied tab.
+ LLSD args;
+ args["NEEDS_APPLY_MESSAGE"] = mesg;
+ args["WANT_APPLY_MESSAGE"] = mWantApplyMesg;
+
+ LLNotificationsUtil::add("SaveChanges", args, LLSD(), boost::bind(&LLPanelGroup::handleNotifyCallback,this, _1, _2));
+
+ mShowingNotifyDialog = true;
+
+ return false;
+}
+
+bool LLPanelGroup::notifyChildren(const LLSD& info)
+{
+ if(info.has("request") && mID.isNull() )
+ {
+ std::string str_action = info["request"];
+
+ if (str_action == "quit" )
+ {
+ canClose();
+ return true;
+ }
+ if(str_action == "wait_quit")
+ return mShowingNotifyDialog;
+ }
+ return false;
+}
+bool LLPanelGroup::handleNotifyCallback(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ mShowingNotifyDialog = false;
+ switch (option)
+ {
+ case 0: // "Apply Changes"
+ apply();
+ break;
+ case 1: // "Ignore Changes"
+ break;
+ case 2: // "Cancel"
+ default:
+ // Do nothing. The user is canceling the action.
+ // If we were quitting, we didn't really mean it.
+ LLAppViewer::instance()->abortQuit();
+ break;
+ }
+ return false;
+}
+
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index 306e6575fc..f6aefdb676 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -89,7 +89,10 @@ public:
const std::string& inventory_name,
LLOfferInfo* inventory_offer);
-
+
+ bool notifyChildren (const LLSD& info);
+ bool handleNotifyCallback(const LLSD&, const LLSD&);
+
protected:
virtual void update(LLGroupChange gc);
@@ -107,6 +110,9 @@ protected:
protected:
bool apply(LLPanelGroupTab* tab);
+ bool canClose();
+
+ bool mShowingNotifyDialog;
LLTimer mRefreshTimer;
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 13f195a1be..0aed123191 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -278,6 +278,16 @@ void LLParticipantList::addAvatarIDExceptAgent(std::vector<LLUUID>& existing_lis
//
bool LLParticipantList::SpeakerAddListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
{
+ /**
+ * We need to filter speaking objects. These objects shouldn't appear in the list
+ * @c LLFloaterChat::addChat() in llviewermessage.cpp to get detailed call hierarchy
+ */
+ const LLUUID& speaker_id = event->getValue().asUUID();
+ LLPointer<LLSpeaker> speaker = mParent.mSpeakerMgr->findSpeaker(speaker_id);
+ if(speaker.isNull() || speaker->mType == LLSpeaker::SPEAKER_OBJECT)
+ {
+ return false;
+ }
return mParent.onAddItemEvent(event, userdata);
}
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 4f0c873c61..64f57f24f9 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -125,6 +125,8 @@ LLScreenChannelBase(id)
void LLScreenChannel::init(S32 channel_left, S32 channel_right)
{
LLScreenChannelBase::init(channel_left, channel_right);
+ LLRect world_rect = gViewerWindow->getWorldViewRectScaled();
+ updatePositionAndSize(world_rect, world_rect);
}
//--------------------------------------------------------------------------
@@ -136,7 +138,23 @@ LLScreenChannel::~LLScreenChannel()
//--------------------------------------------------------------------------
void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect)
{
- LLScreenChannelBase::updatePositionAndSize(old_world_rect, new_world_rect);
+ S32 right_delta = old_world_rect.mRight - new_world_rect.mRight;
+ LLRect this_rect = getRect();
+
+ this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio());
+ switch(mChannelAlignment)
+ {
+ case CA_LEFT :
+ break;
+ case CA_CENTRE :
+ this_rect.setCenterAndSize(new_world_rect.getWidth() / 2, new_world_rect.getHeight() / 2, this_rect.getWidth(), this_rect.getHeight());
+ break;
+ case CA_RIGHT :
+ this_rect.mLeft -= right_delta;
+ this_rect.mRight -= right_delta;
+ }
+ setRect(this_rect);
+ redrawToasts();
}
//--------------------------------------------------------------------------
@@ -169,6 +187,7 @@ void LLScreenChannel::addToast(const LLToast::Params& p)
if(show_toast)
{
mToastList.push_back(new_toast_elem);
+ updateShowToastsState();
redrawToasts();
}
else // store_toast
@@ -405,26 +424,27 @@ void LLScreenChannel::showToastsBottom()
{
if( it != mToastList.rend()-1)
{
- stop_showing_toasts = ((*it).toast->getRect().mTop + gSavedSettings.getS32("OverflowToastHeight") + gSavedSettings.getS32("ToastGap")) > getRect().mTop;
+ S32 toast_top = (*it).toast->getRect().mTop + gSavedSettings.getS32("ToastGap");
+ stop_showing_toasts = toast_top > getRect().mTop;
}
}
+ // at least one toast should be visible
+ if(it == mToastList.rbegin())
+ {
+ stop_showing_toasts = false;
+ }
+
if(stop_showing_toasts)
break;
if( !(*it).toast->getVisible() )
{
- if((*it).toast->isFirstLook())
- {
- (*it).toast->setVisible(TRUE);
- }
- else
- {
- // HACK
- // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts
- (*it).toast->setVisible(TRUE);
- gFloaterView->sendChildToBack((*it).toast);
- }
+ // HACK
+ // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts
+ (*it).toast->setVisible(TRUE);
+ // Show toast behind floaters. (EXT-3089)
+ gFloaterView->sendChildToBack((*it).toast);
}
}
@@ -566,6 +586,21 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
mStartUpToastPanel->setVisible(TRUE);
}
+// static --------------------------------------------------------------------------
+F32 LLScreenChannel::getHeightRatio()
+{
+ F32 ratio = gSavedSettings.getF32("NotificationChannelHeightRatio");
+ if(0.0f > ratio)
+ {
+ ratio = 0.0f;
+ }
+ else if(1.0f < ratio)
+ {
+ ratio = 1.0f;
+ }
+ return ratio;
+}
+
//--------------------------------------------------------------------------
void LLScreenChannel::updateStartUpString(S32 num)
{
@@ -727,7 +762,7 @@ void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter)
//--------------------------------------------------------------------------
void LLScreenChannel::updateShowToastsState()
{
- LLFloater* floater = LLDockableFloater::getInstanceHandle().get();
+ LLDockableFloater* floater = dynamic_cast<LLDockableFloater*>(LLDockableFloater::getInstanceHandle().get());
if(!floater)
{
@@ -735,27 +770,17 @@ void LLScreenChannel::updateShowToastsState()
return;
}
- // for IM floaters showed in a docked state - prohibit showing of ani toast
- if(dynamic_cast<LLIMFloater*>(floater)
- || dynamic_cast<LLScriptFloater*>(floater) )
- {
- setShowToasts(!(floater->getVisible() && floater->isDocked()));
- if (!getShowToasts())
- {
- removeAndStoreAllStorableToasts();
- }
- }
-
// *TODO: mantipov: what we have to do with derived classes: LLNotificationWellWindow & LLIMWelWindow?
// See EXT-3081 for details
// for Message Well floater showed in a docked state - adjust channel's height
- if(dynamic_cast<LLSysWellWindow*>(floater))
+ if(dynamic_cast<LLSysWellWindow*>(floater) || dynamic_cast<LLIMFloater*>(floater))
{
S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");;
LLRect this_rect = getRect();
if(floater->getVisible() && floater->isDocked())
{
- channel_bottom += (floater->getRect().getHeight() + gSavedSettings.getS32("ToastGap"));
+ channel_bottom += floater->getRect().getHeight();
+ channel_bottom += floater->getDockControl()->getTongueHeight();
}
if(channel_bottom != this_rect.mBottom)
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index 67f1c9bdc6..3b0ee2050c 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -265,6 +265,11 @@ private:
// create the StartUp Toast
void createStartUpToast(S32 notif_num, F32 timer);
+ /**
+ * Notification channel and World View ratio(0.0 - always show 1 notification, 1.0 - max ratio).
+ */
+ static F32 getHeightRatio();
+
// Channel's flags
static bool mWasStartUpToastShown;
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index bef7f5d6aa..28bdfbf271 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -170,6 +170,7 @@ void LLSysWellWindow::setVisible(BOOL visible)
if(mChannel)
{
mChannel->updateShowToastsState();
+ mChannel->redrawToasts();
}
}
@@ -188,6 +189,7 @@ void LLSysWellWindow::setDocked(bool docked, bool pop_on_undock)
if(mChannel)
{
mChannel->updateShowToastsState();
+ mChannel->redrawToasts();
}
}
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 2d0a14dc70..aa35f22930 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -772,6 +772,9 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop,
{
LLInventoryObject* cargo = locateInventory(item, cat);
+ // fix for EXT-3191
+ if (NULL == cargo) return;
+
EAcceptance item_acceptance = ACCEPT_NO;
handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE,
mCargoTypes[mCurItemIndex],
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index 7f847237ce..fc6f4966c4 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -331,6 +331,14 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
name="im_well"
top="4"
width="34">
+ <!--
+Emulate 4 states of button by background images, see detains in EXT-3147. The same should be for notification_well button
+xml attribute Description
+image_unselected "Unlit" - there are no new messages
+image_selected "Unlit" + "Selected" - there are no new messages and the Well is open
+image_pressed "Lit" - there are new messages
+image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open
+ -->
<button
auto_resize="true"
flash_color="EmphasisColor"
@@ -343,6 +351,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
left="0"
+ max_displayed_count="99"
name="Unread IM messages"
pad_left="0"
pad_right="0"
@@ -369,6 +378,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
height="23"
layout="topleft"
left="0"
+ max_displayed_count="99"
name="notification_well"
top="4"
width="34">
diff --git a/indra/newview/skins/default/xui/en/panel_notes.xml b/indra/newview/skins/default/xui/en/panel_notes.xml
index c02dabed2c..9e7c9477d4 100644
--- a/indra/newview/skins/default/xui/en/panel_notes.xml
+++ b/indra/newview/skins/default/xui/en/panel_notes.xml
@@ -120,6 +120,7 @@
left="0"
mouse_opaque="false"
name="add_friend"
+ tool_tip="Offer friendship to the resident"
top="5"
width="55" />
<button
@@ -128,6 +129,7 @@
label="IM"
layout="topleft"
name="im"
+ tool_tip="Open instant message session"
top="5"
left_pad="5"
width="40" />
@@ -137,6 +139,7 @@
label="Call"
layout="topleft"
name="call"
+ tool_tip="Call this resident"
left_pad="5"
top="5"
width="55" />
@@ -147,6 +150,7 @@
label="Map"
layout="topleft"
name="show_on_map_btn"
+ tool_tip="Show the resident on the map"
top="5"
left_pad="5"
width="50" />
@@ -156,6 +160,7 @@
label="Teleport"
layout="topleft"
name="teleport"
+ tool_tip="Offer teleport"
left_pad="5"
top="5"
width="90" />
diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml
index 6be203ef9c..638bc3cabd 100644
--- a/indra/newview/skins/default/xui/en/panel_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile.xml
@@ -286,6 +286,7 @@
left="0"
mouse_opaque="false"
name="add_friend"
+ tool_tip="Offer friendship to the resident"
top="5"
width="77" />
<button
@@ -294,6 +295,7 @@
label="IM"
layout="topleft"
name="im"
+ tool_tip="Open instant message session"
top="5"
left_pad="5"
width="33" />
@@ -303,6 +305,7 @@
label="Call"
layout="topleft"
name="call"
+ tool_tip="Call this resident"
left_pad="5"
top="5"
width="40" />
@@ -313,6 +316,7 @@
label="Map"
layout="topleft"
name="show_on_map_btn"
+ tool_tip="Show the resident on the map"
top="5"
left_pad="5"
width="44" />
@@ -322,6 +326,7 @@
label="Teleport"
layout="topleft"
name="teleport"
+ tool_tip="Offer teleport"
left_pad="5"
top="5"
width="67" />
@@ -331,6 +336,7 @@
label="▼"
layout="topleft"
name="overflow_btn"
+ tool_tip="Pay money to or share inventory with the resident"
right="-1"
top="5"
width="21" />