commit
6b8c4b6df1
|
|
@ -4886,7 +4886,7 @@
|
|||
<key>Value</key>
|
||||
<integer>10</integer>
|
||||
</map>
|
||||
<key>ToastOpaqueTime</key>
|
||||
<key>ToastFadingTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Number of seconds while a toast is fading </string>
|
||||
|
|
@ -4898,6 +4898,29 @@
|
|||
<integer>1</integer>
|
||||
</map>
|
||||
<key>StartUpToastLifeTime</key>
|
||||
<key>NearbyToastFadingTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Number of seconds while a nearby chat toast is fading </string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>3</integer>
|
||||
</map>
|
||||
<key>NearbyToastLifeTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Number of seconds while a nearby chat toast exists</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>23</integer>
|
||||
</map>
|
||||
<key>StartUpToastLifeTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Number of seconds while a StartUp toast exist</string>
|
||||
|
|
|
|||
|
|
@ -57,8 +57,6 @@ static LLDefaultChildRegistry::Register<LLIMP2PChiclet> t4("chiclet_im_p2p");
|
|||
static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t5("chiclet_im_group");
|
||||
|
||||
S32 LLNotificationChiclet::mUreadSystemNotifications = 0;
|
||||
S32 LLNotificationChiclet::mUreadIMNotifications = 0;
|
||||
|
||||
|
||||
boost::signals2::signal<LLChiclet* (const LLUUID&),
|
||||
LLIMChiclet::CollectChicletCombiner<std::list<LLChiclet*> > >
|
||||
|
|
@ -99,7 +97,6 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p)
|
|||
// connect counter handlers to the signals
|
||||
connectCounterUpdatersToSignal("notify");
|
||||
connectCounterUpdatersToSignal("groupnotify");
|
||||
connectCounterUpdatersToSignal("notifytoast");
|
||||
}
|
||||
|
||||
LLNotificationChiclet::~LLNotificationChiclet()
|
||||
|
|
@ -113,16 +110,8 @@ void LLNotificationChiclet::connectCounterUpdatersToSignal(std::string notificat
|
|||
LLNotificationsUI::LLEventHandler* n_handler = manager->getHandlerForNotification(notification_type);
|
||||
if(n_handler)
|
||||
{
|
||||
if(notification_type == "notifytoast")
|
||||
{
|
||||
n_handler->setNewNotificationCallback(boost::bind(&LLNotificationChiclet::updateUreadIMNotifications, this));
|
||||
n_handler->setDelNotification(boost::bind(&LLNotificationChiclet::updateUreadIMNotifications, this));
|
||||
}
|
||||
else
|
||||
{
|
||||
n_handler->setNewNotificationCallback(boost::bind(&LLNotificationChiclet::incUreadSystemNotifications, this));
|
||||
n_handler->setDelNotification(boost::bind(&LLNotificationChiclet::decUreadSystemNotifications, this));
|
||||
}
|
||||
n_handler->setNewNotificationCallback(boost::bind(&LLNotificationChiclet::incUreadSystemNotifications, this));
|
||||
n_handler->setDelNotification(boost::bind(&LLNotificationChiclet::decUreadSystemNotifications, this));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -147,12 +136,6 @@ void LLNotificationChiclet::setToggleState(BOOL toggled) {
|
|||
mButton->setToggleState(toggled);
|
||||
}
|
||||
|
||||
void LLNotificationChiclet::updateUreadIMNotifications()
|
||||
{
|
||||
mUreadIMNotifications = gIMMgr->getNumberOfUnreadIM();
|
||||
setCounter(mUreadSystemNotifications + mUreadIMNotifications);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -608,10 +608,9 @@ public:
|
|||
|
||||
/*virtual*/ ~ LLNotificationChiclet();
|
||||
|
||||
// methods for updating a number of unread System or IM notifications
|
||||
void incUreadSystemNotifications() { setCounter(++mUreadSystemNotifications + mUreadIMNotifications); }
|
||||
void decUreadSystemNotifications() { setCounter(--mUreadSystemNotifications + mUreadIMNotifications); }
|
||||
void updateUreadIMNotifications();
|
||||
// methods for updating a number of unread System notifications
|
||||
void incUreadSystemNotifications() { setCounter(++mUreadSystemNotifications); }
|
||||
void decUreadSystemNotifications() { setCounter(--mUreadSystemNotifications); }
|
||||
void setToggleState(BOOL toggled);
|
||||
|
||||
protected:
|
||||
|
|
@ -622,7 +621,6 @@ protected:
|
|||
friend class LLUICtrlFactory;
|
||||
|
||||
static S32 mUreadSystemNotifications;
|
||||
static S32 mUreadIMNotifications;
|
||||
|
||||
protected:
|
||||
LLButton* mButton;
|
||||
|
|
|
|||
|
|
@ -409,8 +409,6 @@ bool LLIMFloater::toggle(const LLUUID& session_id)
|
|||
{
|
||||
// ensure the list of messages is updated when floater is made visible
|
||||
show(session_id);
|
||||
// update number of unread notifications in the SysWell
|
||||
LLBottomTray::getInstance()->getSysWell()->updateUreadIMNotifications();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,6 +162,8 @@ bool LLNearbyChatScreenChannel::createPoolToast()
|
|||
|
||||
LLToast::Params p;
|
||||
p.panel = panel;
|
||||
p.lifetime_secs = gSavedSettings.getS32("NearbyToastLifeTime");
|
||||
p.fading_time_secs = gSavedSettings.getS32("NearbyToastFadingTime");
|
||||
|
||||
LLToast* toast = new LLToast(p);
|
||||
|
||||
|
|
@ -326,6 +328,12 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
|
|||
initChannel();
|
||||
}
|
||||
|
||||
//only messages from AGENTS
|
||||
if(CHAT_SOURCE_OBJECT == chat_msg.mSourceType)
|
||||
{
|
||||
return;//dn't show toast for messages from objects
|
||||
}
|
||||
|
||||
LLUUID id;
|
||||
id.generate();
|
||||
|
||||
|
|
|
|||
|
|
@ -131,6 +131,9 @@ void LLLandmarksPanel::onSearchEdit(const std::string& string)
|
|||
{
|
||||
LLAccordionCtrlTab* tab = *iter;
|
||||
tab->setVisible(true);
|
||||
|
||||
// expand accordion to see matched items in all ones. See EXT-2014.
|
||||
tab->changeOpenClose(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -883,7 +886,7 @@ bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType carg
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLLandmarksPanel::doIdle(void* landmarks_panel)
|
||||
{
|
||||
LLLandmarksPanel* panel = (LLLandmarksPanel* ) landmarks_panel;
|
||||
|
|
|
|||
|
|
@ -427,7 +427,6 @@ void LLSysWellWindow::sessionRemoved(const LLUUID& sessionId)
|
|||
{
|
||||
delIMRow(sessionId);
|
||||
reshapeWindow();
|
||||
LLBottomTray::getInstance()->getSysWell()->updateUreadIMNotifications();
|
||||
}
|
||||
|
||||
void LLSysWellWindow::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id)
|
||||
|
|
|
|||
|
|
@ -49,13 +49,15 @@ LLToast::Params::Params()
|
|||
enable_hide_btn("enable_hide_btn", true),
|
||||
force_show("force_show", false),
|
||||
force_store("force_store", false),
|
||||
fading_time_secs("fading_time_secs", gSavedSettings.getS32("ToastFadingTime")),
|
||||
lifetime_secs("lifetime_secs", gSavedSettings.getS32("NotificationToastLifeTime"))
|
||||
{};
|
||||
|
||||
LLToast::LLToast(const LLToast::Params& p)
|
||||
: LLModalDialog(LLSD(), p.is_modal),
|
||||
mPanel(p.panel),
|
||||
mToastLifetime(p.lifetime_secs),
|
||||
mToastLifetime(p.lifetime_secs),
|
||||
mToastFadingTime(p.fading_time_secs),
|
||||
mNotificationID(p.notif_id),
|
||||
mSessionID(p.session_id),
|
||||
mCanFade(p.can_fade),
|
||||
|
|
@ -127,7 +129,7 @@ bool LLToast::lifetimeHasExpired()
|
|||
if (mTimer.getStarted())
|
||||
{
|
||||
F32 elapsed_time = mTimer.getElapsedTimeF32();
|
||||
if ((mToastLifetime - elapsed_time) <= gSavedSettings.getS32("ToastOpaqueTime"))
|
||||
if ((mToastLifetime - elapsed_time) <= mToastFadingTime)
|
||||
{
|
||||
setBackgroundOpaque(FALSE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ public:
|
|||
Optional<LLUUID> notif_id, //notification ID
|
||||
session_id; //im session ID
|
||||
Optional<LLNotificationPtr> notification;
|
||||
Optional<F32> lifetime_secs;
|
||||
Optional<F32> lifetime_secs,
|
||||
fading_time_secs; // Number of seconds while a toast is fading
|
||||
Optional<toast_callback_t> on_delete_toast,
|
||||
on_mouse_enter;
|
||||
Optional<bool> can_fade,
|
||||
|
|
@ -157,6 +158,7 @@ private:
|
|||
// timer counts a lifetime of a toast
|
||||
LLTimer mTimer;
|
||||
F32 mToastLifetime; // in seconds
|
||||
F32 mToastFadingTime; // in seconds
|
||||
|
||||
LLPanel* mPanel;
|
||||
LLButton* mHideBtn;
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
name="instant_message"
|
||||
width="300"
|
||||
height="180"
|
||||
background_opaque="false"
|
||||
background_visible="true"
|
||||
background_opaque="true"
|
||||
background_visible="false"
|
||||
follows="left|top|right|bottom"
|
||||
bg_alpha_color="0.3 0.3 0.3 1.0">
|
||||
bg_alpha_color="0.3 0.3 0.3 0">
|
||||
<panel width="250" height="30" background_visible="true" background_opaque="false" bg_alpha_color="0.0 0.0 0.0 1.0" name="msg_caption">
|
||||
<avatar_icon
|
||||
top="25" left="10" width="20" height="20" follows="left|top"
|
||||
|
|
|
|||
Loading…
Reference in New Issue