summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimfloater.cpp9
-rw-r--r--indra/newview/llimfloater.h2
-rw-r--r--indra/newview/lltoastgroupnotifypanel.cpp38
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_notify.xml57
4 files changed, 50 insertions, 56 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index c2c83191e0..890f587467 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -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*>
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index 065441b188..5b77d15fcb 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -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);
diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp
index f82573f46c..d1bdcb1354 100644
--- a/indra/newview/lltoastgroupnotifypanel.cpp
+++ b/indra/newview/lltoastgroupnotifypanel.cpp
@@ -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");
-
- //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);
- }
+ LLViewerTextEditor* pMessageText = getChild<LLViewerTextEditor>("message");
+ pMessageText->clear();
+
+ 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();
diff --git a/indra/newview/skins/default/xui/en/panel_group_notify.xml b/indra/newview/skins/default/xui/en/panel_group_notify.xml
index e699a77581..d22d58329c 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notify.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notify.xml
@@ -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"