Work on task EXT-3081 (Separate Message Well on Notifications Well and IM Well)

Initial commit
 -- added two floater classes derived from LLSysWellWindow to work with Notification Well & IM Well
 -- register two floaters in place of previous sys_well (but with the same xml file)
 -- replace using of LLSysWellWindow with LLNotificationWellWindow in the out code (except of in LLScreenChannel::updateShowToastsState)
 -- rename member variable in bottom tray used for Notification Well

--HG--
branch : product-engine
meow-7.2.2
Mike Antipov 2009-12-03 13:48:07 +02:00
parent 5fac7f1d35
commit 22303da8a6
8 changed files with 78 additions and 11 deletions

View File

@ -54,7 +54,7 @@ template class LLBottomTray* LLSingleton<class LLBottomTray>::getInstance();
LLBottomTray::LLBottomTray(const LLSD&)
: mChicletPanel(NULL),
mSysWell(NULL),
mNotificationWell(NULL),
mSpeakPanel(NULL),
mSpeakBtn(NULL),
mNearbyChatBar(NULL),
@ -68,11 +68,11 @@ LLBottomTray::LLBottomTray(const LLSD&)
LLUICtrlFactory::getInstance()->buildPanel(this,"panel_bottomtray.xml");
mChicletPanel = getChild<LLChicletPanel>("chiclet_list");
mSysWell = getChild<LLNotificationChiclet>("sys_well");
mNotificationWell = getChild<LLNotificationChiclet>("notification_well");
// init mSysWell
// init mNotificationWell
// set handler for a Click operation
mSysWell->setClickCallback(boost::bind(&LLSysWellWindow::onChicletClick, LLFloaterReg::getTypedInstance<LLSysWellWindow>("syswell_window")));
mNotificationWell->setClickCallback(boost::bind(&LLNotificationWellWindow::onChicletClick, LLNotificationWellWindow::getInstance()));
mChicletPanel->setChicletClickedCallback(boost::bind(&LLBottomTray::onChicletClick,this,_1));

View File

@ -66,7 +66,7 @@ public:
BOOL postBuild();
LLChicletPanel* getChicletPanel() {return mChicletPanel;}
LLNotificationChiclet* getSysWell() {return mSysWell;}
LLNotificationChiclet* getSysWell() {return mNotificationWell;}
LLNearbyChatBar* getNearbyChatBar() {return mNearbyChatBar;}
void onCommitGesture(LLUICtrl* ctrl);
@ -189,7 +189,7 @@ protected:
LLIMChiclet* createIMChiclet(const LLUUID& session_id);
LLChicletPanel* mChicletPanel;
LLNotificationChiclet* mSysWell;
LLNotificationChiclet* mNotificationWell;
LLPanel* mSpeakPanel;
LLSpeakButton* mSpeakBtn;
LLNearbyChatBar* mNearbyChatBar;

View File

@ -129,7 +129,7 @@ void LLChannelManager::onLoginCompleted()
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound);
mStartUpChannel->setMouseDownCallback(boost::bind(&LLSysWellWindow::onStartUpToastClick, LLFloaterReg::getTypedInstance<LLSysWellWindow>("syswell_window"), _2, _3, _4));
mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4));
mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this));
mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime"));

View File

@ -713,6 +713,8 @@ void LLScreenChannel::updateShowToastsState()
}
}
// *TODO: mantipov: what we have to do with derived classes: LLNotificationWellWindow & LLIMWelWindow?
// See EXT-3081 for details
// for Message Well floater showed in a docked state - adjust channel's height
if(dynamic_cast<LLSysWellWindow*>(floater))
{

View File

@ -33,6 +33,7 @@
#include "llviewerprecompiledheaders.h" // must be first include
#include "llflatlistview.h"
#include "llfloaterreg.h"
#include "llsyswellwindow.h"
@ -566,4 +567,44 @@ BOOL LLSysWellWindow::RowPanel::handleMouseDown(S32 x, S32 y, MASK mask)
return LLPanel::handleMouseDown(x, y, mask);
}
/************************************************************************/
/* LLNotificationWellWindow implementation */
/************************************************************************/
//////////////////////////////////////////////////////////////////////////
// PUBLIC METHODS
LLNotificationWellWindow::LLNotificationWellWindow(const LLSD& key)
: LLSysWellWindow(key)
{
}
// static
LLNotificationWellWindow* LLNotificationWellWindow::getInstance(const LLSD& key /*= LLSD()*/)
{
return LLFloaterReg::getTypedInstance<LLNotificationWellWindow>("notification_well_window", key);
}
/************************************************************************/
/* LLIMWellWindow implementation */
/************************************************************************/
//////////////////////////////////////////////////////////////////////////
// PUBLIC METHODS
LLIMWellWindow::LLIMWellWindow(const LLSD& key)
: LLSysWellWindow(key)
{
}
// static
LLIMWellWindow* LLIMWellWindow::getInstance(const LLSD& key /*= LLSD()*/)
{
return LLFloaterReg::getTypedInstance<LLIMWellWindow>("im_well_window", key);
}
// EOF

View File

@ -149,6 +149,30 @@ private:
};
};
/**
* Class intended to manage incoming notifications.
*
* It contains a list of notifications that have not been responded to.
*/
class LLNotificationWellWindow : public LLSysWellWindow
{
public:
LLNotificationWellWindow(const LLSD& key);
static LLNotificationWellWindow* getInstance(const LLSD& key = LLSD());
};
/**
* Class intended to manage incoming messages in IM chats.
*
* It contains a list list of all active IM sessions.
*/
class LLIMWellWindow : public LLSysWellWindow
{
public:
LLIMWellWindow(const LLSD& key);
static LLIMWellWindow* getInstance(const LLSD& key = LLSD());
};
#endif // LL_LLSYSWELLWINDOW_H

View File

@ -176,6 +176,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloater>);
LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloaterContainer>);
LLFloaterReg::add("im_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMWellWindow>);
LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIncomingCallDialog>);
LLFloaterReg::add("inventory", "floater_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInventory>);
LLFloaterReg::add("inspect", "floater_inspect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInspect>);
@ -195,11 +196,10 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("moveview", "floater_moveview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMove>);
LLFloaterReg::add("mute_object_by_name", "floater_mute_object.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGetBlockedObjectName>);
LLFloaterReg::add("mini_map", "floater_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMap>);
LLFloaterReg::add("syswell_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLSysWellWindow>);
LLFloaterReg::add("nearby_media", "floater_nearby_media.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNearbyMedia>);
LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>);
LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNotificationWellWindow>);
LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>);
LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutgoingCallDialog>);

View File

@ -319,7 +319,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
layout="topleft"
min_height="28"
top="0"
name="sys_well_panel"
name="notification_well_panel"
width="54"
min_width="54"
user_resize="false">
@ -328,7 +328,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
height="23"
layout="topleft"
left="0"
name="sys_well"
name="notification_well"
top="4"
width="54">
<button