meow-7.2.2
maximbproductengine 2013-01-04 21:20:09 +02:00
commit 39ff545bab
6 changed files with 82 additions and 42 deletions

View File

@ -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)

View File

@ -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);
}
}
}
}

View File

@ -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();

View File

@ -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));
}

View File

@ -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"

View File

@ -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"