summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llbutton.cpp18
-rw-r--r--indra/newview/llfloaterimcontainer.cpp46
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp33
-rw-r--r--indra/newview/llimview.cpp16
-rw-r--r--indra/newview/skins/default/xui/en/floater_conversation_log.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml9
6 files changed, 82 insertions, 42 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 7ca9b869a8..a8149a9a1d 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -311,7 +311,7 @@ void LLButton::onCommit()
{
make_ui_sound("UISndClickRelease");
}
-
+
if (mIsToggle)
{
toggleState();
@@ -613,8 +613,6 @@ void LLButton::draw()
static LLCachedControl<bool> sEnableButtonFlashing(*LLUI::sSettingGroups["config"], "EnableButtonFlashing", true);
F32 alpha = mUseDrawContextAlpha ? getDrawContext().mAlpha : getCurrentTransparency();
- bool flash = mFlashing && sEnableButtonFlashing;
-
bool pressed_by_keyboard = FALSE;
if (hasFocus())
{
@@ -642,6 +640,17 @@ void LLButton::draw()
LLColor4 glow_color;
LLRender::eBlendType glow_type = LLRender::BT_ADD_WITH_ALPHA;
LLUIImage* imagep = NULL;
+
+ // Cancel sticking of color, if the button is pressed,
+ // or when a flashing of the previously selected button is ended
+ if (mFlashingTimer
+ && ((selected && !mFlashingTimer->isFlashingInProgress()) || pressed))
+ {
+ mFlashing = false;
+ }
+
+ bool flash = mFlashing && sEnableButtonFlashing;
+
if (pressed && mDisplayPressedState)
{
imagep = selected ? mImagePressedSelected : mImagePressed;
@@ -697,8 +706,7 @@ void LLButton::draw()
imagep = mImageDisabled;
}
- // Selected has a higher priority than flashing. If both are set, flashing is ignored.
- if (mFlashing && !selected)
+ if (mFlashing)
{
// if button should flash and we have icon for flashing, use it as image for button
if(flash && mImageFlash)
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 151d901708..f134dc2017 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -684,6 +684,7 @@ void LLFloaterIMContainer::collapseConversationsPane(bool collapse)
{
widget->setOpen(false);
}
+ widget->requestArrange();
}
}
}
@@ -1107,12 +1108,25 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)
uuid_vec_t uuids;
getParticipantUUIDs(uuids);
+ if ("conversation_log" == item)
+ {
+ return gSavedSettings.getBOOL("KeepConversationLogTranscripts");
+ }
- // If nothing is selected, everything needs to be disabled
+ //Enable Chat history item for ad-hoc and group conversations
+ if ("can_chat_history" == item)
+ {
+ if (getCurSelectedViewModelItem()->getType() != LLConversationItem::CONV_PARTICIPANT)
+ {
+ return isConversationLoggingAllowed();
+ }
+ }
+
+ // If nothing is selected(and selected item is not group chat), everything needs to be disabled
if (uuids.size() <= 0)
- {
- return false;
- }
+ {
+ return getCurSelectedViewModelItem()->getType() == LLConversationItem::CONV_SESSION_GROUP;
+ }
if("can_activate_group" == item)
{
@@ -1125,11 +1139,6 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata)
bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_vec_t& uuids)
{
- if ("conversation_log" == item)
- {
- return gSavedSettings.getBOOL("KeepConversationLogTranscripts");
- }
-
// Extract the single select info
bool is_single_select = (uuids.size() == 1);
const LLUUID& single_id = uuids.front();
@@ -1428,11 +1437,10 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
{
is_widget_selected = widget->isSelected();
new_selection = mConversationsRoot->getNextFromChild(widget);
- if(new_selection == NULL)
+ if (!new_selection)
{
new_selection = mConversationsRoot->getPreviousFromChild(widget);
}
-
widget->destroyView();
}
@@ -1444,14 +1452,20 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
if (change_focus)
{
setFocus(TRUE);
- if(new_selection != NULL)
+ if (new_selection)
{
if (mConversationsWidgets.size() == 1)
- new_selection = new_selection->getParentFolder();
- LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(new_selection->getViewModelItem());
- if(vmi != NULL)
{
- selectConversationPair(vmi->getUUID(), true);
+ // If only one widget is left, it has to be the Nearby Chat. Select it directly.
+ selectConversationPair(LLUUID(NULL), true);
+ }
+ else
+ {
+ LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(new_selection->getViewModelItem());
+ if (vmi)
+ {
+ selectConversationPair(vmi->getUUID(), true);
+ }
}
}
}
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index f5b657fa60..d4eb03f95d 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -82,6 +82,13 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
LLFloaterIMSessionTab::~LLFloaterIMSessionTab()
{
delete mRefreshTimer;
+
+ // Select Nearby Chat session
+ LLFloaterIMContainer* container = LLFloaterReg::findTypedInstance<LLFloaterIMContainer>("im_container");
+ if (container)
+ {
+ container->selectConversationPair(LLUUID(NULL), true);
+ }
}
//static
@@ -322,7 +329,7 @@ void LLFloaterIMSessionTab::onFocusReceived()
LLTransientDockableFloater::onFocusReceived();
- LLFloaterIMContainer* container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+ LLFloaterIMContainer* container = LLFloaterReg::findTypedInstance<LLFloaterIMContainer>("im_container");
if (container)
{
container->selectConversationPair(mSessionID, true);
@@ -606,8 +613,8 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar()
// prevent start conversation before its container
LLFloaterIMContainer::getInstance();
- bool is_torn_off = checkIfTornOff();
- if (!is_torn_off)
+ bool is_not_torn_off = !checkIfTornOff();
+ if (is_not_torn_off)
{
hideAllStandardButtons();
}
@@ -616,7 +623,7 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar()
// Participant list should be visible only in torn off floaters.
bool is_participant_list_visible =
- is_torn_off
+ !is_not_torn_off
&& gSavedSettings.getBOOL("IMShowControlPanel")
&& !mIsP2PChat;
@@ -624,22 +631,28 @@ void LLFloaterIMSessionTab::updateHeaderAndToolbar()
// Display collapse image (<<) if the floater is hosted
// or if it is torn off but has an open control panel.
- bool is_expanded = !is_torn_off || is_participant_list_visible;
+ bool is_expanded = is_not_torn_off || is_participant_list_visible;
mExpandCollapseBtn->setImageOverlay(getString(is_expanded ? "collapse_icon" : "expand_icon"));
+ mExpandCollapseBtn->setToolTip(
+ is_not_torn_off?
+ getString("expcol_button_not_tearoff_tooltip") :
+ (is_expanded?
+ getString("expcol_button_tearoff_and_expanded_tooltip") :
+ getString("expcol_button_tearoff_and_collapsed_tooltip")));
// toggle floater's drag handle and title visibility
if (mDragHandle)
{
- mDragHandle->setTitleVisible(is_torn_off);
+ mDragHandle->setTitleVisible(!is_not_torn_off);
}
// The button (>>) should be disabled for torn off P2P conversations.
- mExpandCollapseBtn->setEnabled(!is_torn_off || !mIsP2PChat);
+ mExpandCollapseBtn->setEnabled(is_not_torn_off || !mIsP2PChat);
- mTearOffBtn->setImageOverlay(getString(is_torn_off? "return_icon" : "tear_off_icon"));
- mTearOffBtn->setToolTip(getString(!is_torn_off? "tooltip_to_separate_window" : "tooltip_to_main_window"));
+ mTearOffBtn->setImageOverlay(getString(is_not_torn_off? "tear_off_icon" : "return_icon"));
+ mTearOffBtn->setToolTip(getString(is_not_torn_off? "tooltip_to_separate_window" : "tooltip_to_main_window"));
- mCloseBtn->setVisible(!is_torn_off && !mIsNearbyChat);
+ mCloseBtn->setVisible(is_not_torn_off && !mIsNearbyChat);
enableDisableCallBtn();
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index d736b81bb7..48cf7b3463 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -122,7 +122,7 @@ void on_new_message(const LLSD& msg)
LLUUID session_id = msg["session_id"].asUUID();
LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id);
- // determine action for this session
+ // determine action for this session
if (session_id.isNull())
{
@@ -148,13 +148,14 @@ void on_new_message(const LLSD& msg)
action = gSavedSettings.getString("NotificationGroupChatOptions");
}
- // do not show notification in "do not disturb" mode or it goes from agent
+ // do not show notification which goes from agent
if (gAgent.getID() == participant_id)
{
return;
}
// execution of the action
+
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
@@ -173,7 +174,7 @@ void on_new_message(const LLSD& msg)
if ("toast" == action)
{
- // Skip toasting if we have open window of IM with this session id
+ // Skip toasting and flashing if we have open window of IM with this session id
if (session_floater
&& session_floater->isInVisibleChain()
&& session_floater->hasFocus()
@@ -184,12 +185,6 @@ void on_new_message(const LLSD& msg)
return;
}
- // Skip toasting for system messages and for nearby chat
- if (participant_id.isNull())
- {
- return;
- }
-
//User is not focused on conversation containing the message
if(session_floater_not_focused)
{
@@ -201,7 +196,8 @@ void on_new_message(const LLSD& msg)
gToolBarView->flashCommand(LLCommandId("chat"), true);
//Show IM toasts (upper right toasts)
- if(session_id.notNull())
+ // Skip toasting for system messages and for nearby chat
+ if(session_id.notNull() && participant_id.notNull())
{
LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
}
diff --git a/indra/newview/skins/default/xui/en/floater_conversation_log.xml b/indra/newview/skins/default/xui/en/floater_conversation_log.xml
index cf61348a66..256e03c4d7 100644
--- a/indra/newview/skins/default/xui/en/floater_conversation_log.xml
+++ b/indra/newview/skins/default/xui/en/floater_conversation_log.xml
@@ -5,7 +5,7 @@
positioning="cascading"
height="200"
min_height="100"
- min_width="200"
+ min_width="230"
layout="topleft"
name="floater_conversation_log"
save_rect="true"
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 9e2132dc3b..8f0574177f 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -49,6 +49,15 @@
<floater.string
name="end_call_button_tooltip"
value="Close voice connection"/>
+ <floater.string
+ name="expcol_button_not_tearoff_tooltip"
+ value="Collapse this pane"/>
+ <floater.string
+ name="expcol_button_tearoff_and_expanded_tooltip"
+ value="Collapse participant list"/>
+ <floater.string
+ name="expcol_button_tearoff_and_collapsed_tooltip"
+ value="Expand participant list"/>
<view
follows="all"
layout="topleft"