--HG--
branch : product-engine
meow-7.2.2
Vadim Savchuk 2009-11-17 16:41:08 +02:00
commit 7b10039d45
4 changed files with 49 additions and 55 deletions

View File

@ -377,6 +377,15 @@ void LLIMFloater::setDocked(bool docked, bool pop_on_undock)
}
}
void LLIMFloater::setMinimized(BOOL minimize)
{
if(minimize && !isDocked())
{
setVisible(FALSE);
}
LLDockableFloater::setMinimized(minimize);
}
void LLIMFloater::setVisible(BOOL visible)
{
LLNotificationsUI::LLScreenChannel* channel = dynamic_cast<LLNotificationsUI::LLScreenChannel*>

View File

@ -63,7 +63,7 @@ public:
// LLFloater overrides
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void setDocked(bool docked, bool pop_on_undock = true);
// override LLFloater's minimization according to EXT-1216
/*virtual*/ void setMinimized(BOOL minimize);
// Make IM conversion visible and update the message history
static LLIMFloater* show(const LLUUID& session_id);

View File

@ -40,7 +40,7 @@
#include "lliconctrl.h"
#include "llinventoryfunctions.h"
#include "llnotify.h"
#include "lltextbox.h"
#include "llviewertexteditor.h"
#include "lluiconstants.h"
#include "llui.h"
@ -54,7 +54,7 @@
#include "llfloaterinventory.h"
#include "llinventorytype.h"
const S32 LLToastGroupNotifyPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 4;
const S32 LLToastGroupNotifyPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 7;
LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification)
: LLToastPanel(notification),
@ -84,11 +84,6 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification
//message body
const std::string& message = payload["message"].asString();
LLTextBox* pSubjectText = getChild<LLTextBox>("subject");
pSubjectText->setValue(subject);
LLTextBox* pDateTimeText = getChild<LLTextBox>("datetime");
std::string timeStr = "["+LLTrans::getString("UTCTimeWeek")+"],["
+LLTrans::getString("UTCTimeDay")+"] ["
+LLTrans::getString("UTCTimeMth")+"] ["
@ -102,20 +97,23 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification
LLSD substitution;
substitution["datetime"] = (S32) notice_date.secondsSinceEpoch();
LLStringUtil::format(timeStr, substitution);
pDateTimeText->setValue(timeStr);
LLTextBox* pMessageText = getChild<LLTextBox>("message");
LLViewerTextEditor* pMessageText = getChild<LLViewerTextEditor>("message");
pMessageText->clear();
//If message is empty let it be invisible and not take place at the panel
if(message.size() != 0)
{
pMessageText->setVisible(TRUE);
pMessageText->setValue(message);
}
else
{
pMessageText->setVisible(FALSE);
}
LLStyle::Params style;
LLFontGL* subject_font = LLFontGL::getFontByName(getString("subject_font"));
if (subject_font)
style.font = subject_font;
pMessageText->appendText(subject, FALSE, style);
LLFontGL* date_font = LLFontGL::getFontByName(getString("date_font"));
if (date_font)
style.font = date_font;
pMessageText->appendText(timeStr + "\n", TRUE, style);
style.font = pMessageText->getDefaultFont();
pMessageText->appendText(message, TRUE, style);
//attachment
BOOL hasInventory = payload["inventory_offer"].isDefined();

View File

@ -3,7 +3,7 @@
background_visible="true"
bevel_style="in"
bg_alpha_color="0 0 0 0"
height="135"
height="90"
label="instant_message"
layout="topleft"
left="0"
@ -12,7 +12,13 @@
width="305">
<string
name="message_max_lines_count"
value="4" />
value="7" />
<string
name="subject_font"
value="SANSSERIF_BIG" />
<string
name="date_font"
value="SANSSERIF" />
<panel
background_visible="true"
bevel_style="in"
@ -47,46 +53,27 @@
value="Sender Name / Group Name"
width="230" />
</panel>
<text
follows="top"
font="SansSerifBig"
height="20"
layout="topleft"
left="25"
name="subject"
text_color="GroupNotifyTextColor"
top="40"
use_ellipses="true"
value="subject"
width="270"
wrap="true" />
<text
follows="top"
font="SansSerif"
height="20"
layout="topleft"
left="25"
name="datetime"
text_color="GroupNotifyTextColor"
top="80"
use_ellipses="true"
value="datetime"
width="270"
wrap="true" />
<text
<text_editor
allow_html="true"
enabled="true"
follows="left|top|bottom|right"
height="0"
layout="topleft"
left="25"
max_length="2147483647"
name="message"
parse_highlights="true"
read_only="true"
text_color="GroupNotifyTextColor"
top="100"
top="40"
type="string"
use_ellipses="true"
value="message"
width="270"
wrap="true" />
width="270"
word_wrap="true" >
</text_editor>
<icon
bottom="122"
bottom="60"
follows="left|bottom|right"
height="15"
layout="topleft"
@ -95,7 +82,7 @@
name="attachment_icon"
width="15" />
<text
bottom="122"
bottom="60"
follows="left|bottom|right"
font="SansSerif"
height="15"
@ -107,7 +94,7 @@
use_ellipses="true"
width="250" />
<button
bottom="130"
bottom="85"
follows="bottom"
height="20"
label="OK"