summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llconversationview.cpp25
-rwxr-xr-xindra/newview/llconversationview.h5
-rw-r--r--indra/newview/llfloaterimcontainer.cpp25
-rw-r--r--indra/newview/llfloaterimcontainer.h1
-rw-r--r--indra/newview/llimview.cpp13
-rw-r--r--indra/newview/skins/default/colors.xml9
6 files changed, 51 insertions, 27 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index c0a209f22d..e51efd48f5 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -81,7 +81,9 @@ LLConversationViewSession::LLConversationViewSession(const LLConversationViewSes
mSpeakingIndicator(NULL),
mVoiceClientObserver(NULL),
mCollapsedMode(false),
- mHasArrow(true)
+ mHasArrow(true),
+ mFlashStateOn(false),
+ mFlashStarted(false)
{
mFlashTimer = new LLFlashTimer();
}
@@ -101,7 +103,17 @@ LLConversationViewSession::~LLConversationViewSession()
void LLConversationViewSession::setFlashState(bool flash_state)
{
mFlashStateOn = flash_state;
- (flash_state ? mFlashTimer->startFlashing() : mFlashTimer->stopFlashing());
+ mFlashStarted = false;
+ mFlashTimer->stopFlashing();
+}
+
+void LLConversationViewSession::startFlashing()
+{
+ if (mFlashStateOn && !mFlashStarted)
+ {
+ mFlashStarted = true;
+ mFlashTimer->startFlashing();
+ }
}
bool LLConversationViewSession::isHighlightAllowed()
@@ -198,8 +210,11 @@ void LLConversationViewSession::draw()
drawOpenFolderArrow(default_params, sFgColor);
}
+ // Indicate that flash can start (moot operation if already started, done or not flashing)
+ startFlashing();
+
// draw highlight for selected items
- drawHighlight(show_context, true, sHighlightBgColor, sFocusOutlineColor, sMouseOverColor);
+ drawHighlight(show_context, true, sHighlightBgColor, sFlashBgColor, sFocusOutlineColor, sMouseOverColor);
// Draw children if root folder, or any other folder that is open. Do not draw children when animating to closed state or you get rendering overlap.
bool draw_children = getRoot() == static_cast<LLFolderViewFolder*>(this) || isOpen();
@@ -231,6 +246,7 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )
if(result && getRoot()->getCurSelectedItem() == this)
{
LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+ im_container->clearAllFlashStates();
im_container->selectConversationPair(session_id, false);
im_container->collapseMessagesPane(false);
}
@@ -427,6 +443,7 @@ void LLConversationViewParticipant::draw()
static LLUIColor sFgDisabledColor = LLUIColorTable::instance().getColor("MenuItemDisabledColor", DEFAULT_WHITE);
static LLUIColor sHighlightFgColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE);
static LLUIColor sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE);
+ static LLUIColor sFlashBgColor = LLUIColorTable::instance().getColor("MenuItemFlashBgColor", DEFAULT_WHITE);
static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE);
static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE);
@@ -450,7 +467,7 @@ void LLConversationViewParticipant::draw()
color = mIsSelected ? sHighlightFgColor : sFgColor;
}
- drawHighlight(show_context, mIsSelected, sHighlightBgColor, sFocusOutlineColor, sMouseOverColor);
+ drawHighlight(show_context, mIsSelected, sHighlightBgColor, sFlashBgColor, sFocusOutlineColor, sMouseOverColor);
drawLabel(font, text_left, y, color, right_x);
refresh();
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index 1e20fb8b7e..74443e1d88 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -58,6 +58,7 @@ protected:
/*virtual*/ bool isHighlightAllowed();
/*virtual*/ bool isHighlightActive();
+ /*virtual*/ bool isFlashing() { return mFlashStateOn; }
LLFloaterIMContainer* mContainer;
@@ -83,11 +84,12 @@ public:
virtual void refresh();
- void setFlashState(bool flash_state);
+ /*virtual*/ void setFlashState(bool flash_state);
private:
void onCurrentVoiceSessionChanged(const LLUUID& session_id);
+ void startFlashing();
LLPanel* mItemPanel;
LLPanel* mCallIconLayoutPanel;
@@ -95,6 +97,7 @@ private:
LLOutputMonitorCtrl* mSpeakingIndicator;
LLFlashTimer* mFlashTimer;
bool mFlashStateOn;
+ bool mFlashStarted;
bool mCollapsedMode;
bool mHasArrow;
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 390eec84f6..58ba186b57 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1229,6 +1229,20 @@ void LLFloaterIMContainer::showConversation(const LLUUID& session_id)
selectConversationPair(session_id, true);
}
+void LLFloaterIMContainer::clearAllFlashStates()
+{
+ llinfos << "Merov debug : clear all flash states" << llendl;
+ conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin();
+ for (;widget_it != mConversationsWidgets.end(); ++widget_it)
+ {
+ LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second);
+ if (widget)
+ {
+ widget->setFlashState(false);
+ }
+ }
+}
+
void LLFloaterIMContainer::selectConversation(const LLUUID& session_id)
{
selectConversationPair(session_id, true);
@@ -1240,17 +1254,6 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool
BOOL handled = TRUE;
LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id);
- // On selection, stop the flash state on all conversation widgets
- conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin();
- for (;widget_it != mConversationsWidgets.end(); ++widget_it)
- {
- LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second);
- if (widget)
- {
- widget->setFlashState(false);
- }
- }
-
/* widget processing */
if (select_widget)
{
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 5db1565cea..09a24c0105 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -69,6 +69,7 @@ public:
void showConversation(const LLUUID& session_id);
void selectConversation(const LLUUID& session_id);
BOOL selectConversationPair(const LLUUID& session_id, bool select_widget);
+ void clearAllFlashStates();
/*virtual*/ void tabClose();
void showStub(bool visible);
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 5b4d5466a1..65048e352e 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -155,7 +155,6 @@ void on_new_message(const LLSD& msg)
}
// execution of the action
-
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
@@ -174,13 +173,11 @@ void on_new_message(const LLSD& msg)
if ("toast" == action)
{
// Skip toasting if we have open window of IM with this session id
- if (
- session_floater
+ if (session_floater
&& session_floater->isInVisibleChain()
&& session_floater->hasFocus()
&& !session_floater->isMinimized()
- && !(session_floater->getHost()
- && session_floater->getHost()->isMinimized())
+ && !(session_floater->getHost() && session_floater->getHost()->isMinimized())
)
{
return;
@@ -222,10 +219,10 @@ void on_new_message(const LLSD& msg)
gToolBarView->flashCommand(LLCommandId("chat"), true);
}
//conversation floater is open but a different conversation is focused
- else
- {
+ //else
+ //{
im_box->flashConversationItemWidget(session_id, true);
- }
+ //}
}
}
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index afd8ee4ba1..0de217fc0d 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -11,9 +11,9 @@
<color
name="EmphasisColor_35"
value="0.38 0.694 0.573 0.35" />
- <color
- name="BeaconColor"
- value="1 .67 .2 1" />
+ <color
+ name="BeaconColor"
+ value="0.749 0.298 0 1" />
<color
name="White"
value="1 1 1 1" />
@@ -526,6 +526,9 @@
name="MenuItemHighlightBgColor"
reference="EmphasisColor_35" />
<color
+ name="MenuItemFlashBgColor"
+ reference="BeaconColor" />
+ <color
name="MenuItemHighlightFgColor"
reference="White" />
<color