implemented EXT-2323 “Get rid from obsolete notification widgets”;

--HG--
branch : product-engine
master
Alexei Arabadji 2009-12-11 14:26:27 +02:00
parent a60997a881
commit 4fc7b91a79
49 changed files with 37 additions and 94 deletions

View File

@ -26,7 +26,6 @@ include_directories(
)
set(llui_SOURCE_FILES
llalertdialog.cpp
llbutton.cpp
llcheckboxctrl.cpp
llclipboard.cpp
@ -112,7 +111,6 @@ set(llui_SOURCE_FILES
set(llui_HEADER_FILES
CMakeLists.txt
llalertdialog.h
llbutton.h
llcallbackmap.h
llcheckboxctrl.h

View File

@ -37,7 +37,6 @@
#define LLPANEL_CPP
#include "llpanel.h"
#include "llalertdialog.h"
#include "llfocusmgr.h"
#include "llfontgl.h"
#include "llrect.h"

View File

@ -227,7 +227,6 @@ set(viewer_SOURCE_FILES
llgroupactions.cpp
llgrouplist.cpp
llgroupmgr.cpp
llgroupnotify.cpp
llhomelocationresponder.cpp
llhudeffect.cpp
llhudeffectbeam.cpp
@ -298,7 +297,6 @@ set(viewer_SOURCE_FILES
llnotificationofferhandler.cpp
llnotificationscripthandler.cpp
llnotificationtiphandler.cpp
llnotify.cpp
lloutputmonitorctrl.cpp
lloverlaybar.cpp
llpanelavatar.cpp
@ -734,7 +732,6 @@ set(viewer_HEADER_FILES
llgroupactions.h
llgrouplist.h
llgroupmgr.h
llgroupnotify.h
llhomelocationresponder.h
llhudeffect.h
llhudeffectbeam.h
@ -800,7 +797,6 @@ set(viewer_HEADER_FILES
llnetmap.h
llnotificationhandler.h
llnotificationmanager.h
llnotify.h
lloutputmonitorctrl.h
lloverlaybar.h
llpanelavatar.h

View File

@ -41,7 +41,6 @@
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llviewerregion.h"
#include "llvoavatarself.h"
#include "llwearable.h"

View File

@ -39,7 +39,6 @@
#include "llfeaturemanager.h"
#include "lluictrlfactory.h"
#include "lltexteditor.h"
#include "llalertdialog.h"
#include "llerrorcontrol.h"
#include "llviewertexturelist.h"
#include "llgroupmgr.h"
@ -109,7 +108,6 @@
#include "apr_dso.h"
#include <boost/lexical_cast.hpp>
#include "llnotify.h"
#include "llviewerkeyboard.h"
#include "lllfsthread.h"
#include "llworkerthread.h"

View File

@ -39,7 +39,6 @@
#include "llcompilequeue.h"
#include "llfloaterbuycurrency.h"
#include "llfilepicker.h"
#include "llnotify.h"
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
#include "llpermissionsflags.h"

View File

@ -55,7 +55,6 @@
#include "llinventorymodel.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llresmgr.h"
#include "llimview.h"
#include "llviewercontrol.h"

View File

@ -228,3 +228,14 @@ void LLChannelManager::muteAllChannels(bool mute)
}
}
void LLChannelManager::killToastsFromChannel(const LLUUID& channel_id, const LLScreenChannel::Matcher& matcher)
{
LLScreenChannel
* screen_channel =
dynamic_cast<LLScreenChannel*> (findChannelByID(channel_id));
if (screen_channel != NULL)
{
screen_channel->killMatchedToasts(matcher);
}
}

View File

@ -109,6 +109,11 @@ public:
*/
void muteAllChannels(bool mute);
/**
* Kills matched toasts from specified toast screen channel.
*/
void killToastsFromChannel(const LLUUID& channel_id, const LLScreenChannel::Matcher& matcher);
private:
LLScreenChannel* createChannel(LLChannelManager::Params& p);

View File

@ -36,7 +36,6 @@
#include <list>
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llcallbacklist.h"
#include "llinventory.h"
#include "llviewerinventory.h"

View File

@ -37,7 +37,6 @@
#include "llnotificationsutil.h"
#include "message.h"
#include "llnotify.h"
#include "lleventinfo.h"
#include "llfloaterreg.h"
#include "llfloaterworldmap.h"

View File

@ -40,7 +40,6 @@
// viewer includes
#include "llagent.h" // for gAgent.inPrelude()
#include "llnotify.h"
#include "llviewercontrol.h"
#include "llui.h"
#include "llappviewer.h"

View File

@ -48,7 +48,6 @@
#include "llcombobox.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llsavedsettingsglue.h"
#include "llviewertexturelist.h"
#include "llviewerparcelmgr.h"

View File

@ -41,7 +41,6 @@
#include "llfloaterbuy.h"
#include "llagent.h" // for agent id
#include "llalertdialog.h"
#include "llinventorymodel.h" // for gInventory
#include "llfloaterreg.h"
#include "llfloaterinventory.h" // for get_item_icon

View File

@ -43,7 +43,6 @@
#include "llcachename.h"
#include "llagent.h" // for agent id
#include "llalertdialog.h"
#include "llcheckboxctrl.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h" // for gInventory

View File

@ -49,7 +49,6 @@
#include "lliconctrl.h"
#include "lllineeditor.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llparcel.h"
#include "llslurl.h"
#include "llstatusbar.h"

View File

@ -50,7 +50,6 @@
#include "llinventorymodel.h"
#include "llnamelistctrl.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llresmgr.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"

View File

@ -45,7 +45,6 @@
#include "message.h"
#include "llagent.h"
#include "llalertdialog.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
@ -69,7 +68,6 @@
#include "llviewerwindow.h"
#include "llworld.h"
#include "llfloateravatarpicker.h"
#include "llnotify.h"
#include "llxfermanager.h"
#include "llvlcomposition.h"
#include "llsurface.h"

View File

@ -37,7 +37,6 @@
// Viewer libs
#include "llviewercontrol.h"
#include "llmediactrl.h"
#include "llalertdialog.h"
// Linden libs
#include "llnotificationsutil.h"

View File

@ -55,7 +55,6 @@
#include "llavataractions.h"
#include "lllineeditor.h"
#include "llnamelistctrl.h"
#include "llnotify.h"
#include "llpanellandaudio.h"
#include "llpanellandmedia.h"
#include "llradiogroup.h"

View File

@ -44,7 +44,6 @@
#include "llnotificationsutil.h"
#include "lltextbox.h"
#include "llalertdialog.h"
#include "llinventorybridge.h"
#include "llfloaterinventory.h"
#include "llinventorymodel.h"

View File

@ -32,7 +32,6 @@
*/
#include "llviewerprecompiledheaders.h"
#include "llalertdialog.h"
#include "llcheckboxctrl.h"
#include "llfloaterperms.h"
#include "llviewercontrol.h"

View File

@ -46,7 +46,6 @@
#include "message.h"
#include "llagent.h"
#include "llalertdialog.h"
#include "llappviewer.h"
#include "llfloateravatarpicker.h"
#include "llbutton.h"
@ -62,7 +61,6 @@
#include "llfloaterwindlight.h"
#include "llinventorymodel.h"
#include "lllineeditor.h"
#include "llalertdialog.h"
#include "llnamelistctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"

View File

@ -39,7 +39,6 @@
#include "lllineeditor.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llparcel.h"
#include "llselectmgr.h"
#include "lltexturectrl.h"

View File

@ -52,7 +52,6 @@
#include "llagent.h"
#include "lldelayedgestureerror.h"
#include "llinventorymodel.h"
#include "llnotify.h"
#include "llviewermessage.h"
#include "llvoavatarself.h"
#include "llviewerstats.h"

View File

@ -66,7 +66,6 @@
#include "llimview.h" // for LLIMModel to get other avatar id in chat
#include "llkeyboard.h"
#include "lllineeditor.h"
#include "llnotify.h"
#include "llpanelimcontrolpanel.h"
#include "llrecentpeople.h"
#include "llresmgr.h"

View File

@ -72,7 +72,6 @@
#include "llviewerwindow.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llnearbychat.h"
#include "llviewerregion.h"
#include "llvoicechannel.h"

View File

@ -39,7 +39,6 @@
#include "llappviewer.h"
#include "llagent.h"
#include "llnotify.h"
#include "llvfile.h"
#include "llviewerstats.h"

View File

@ -49,7 +49,6 @@
#include "llfloaterchat.h"
#include "llfloaterworldmap.h"
#include "lllineeditor.h"
#include "llnotify.h"
#include "llstatusbar.h"
#include "llimview.h"
#include "lltextbox.h"

View File

@ -48,7 +48,6 @@
#include "message.h"
#include "llagent.h"
#include "llalertdialog.h"
#include "llavataractions.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"

View File

@ -44,7 +44,6 @@
#include "llnamelistctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llpanelgrouproles.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"

View File

@ -62,7 +62,6 @@
#include "llviewermenu.h" // for handle_preferences()
#include "llviewernetwork.h"
#include "llviewerwindow.h" // to link into child list
#include "llnotify.h"
#include "llurlsimstring.h"
#include "lluictrlfactory.h"
#include "llhttpclient.h"

View File

@ -59,7 +59,6 @@
#include "llinventorymodel.h"
#include "llkeyboard.h"
#include "lllineeditor.h"
#include "llnotify.h"
#include "llradiogroup.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"

View File

@ -44,7 +44,6 @@
#include "llinventorymodel.h"
#include "lllineeditor.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llresmgr.h"
#include "roles_constants.h"
#include "llscrollbar.h"

View File

@ -61,7 +61,6 @@
#include "llvfile.h"
#include "llagent.h"
#include "llnotify.h"
#include "llmenugl.h"
#include "roles_constants.h"
#include "llselectmgr.h"

View File

@ -121,7 +121,6 @@
#include "lllogininstance.h" // Host the login module.
#include "llpanellogin.h"
#include "llmutelist.h"
#include "llnotify.h"
#include "llpanelavatar.h"
#include "llavatarpropertiesprocessor.h"
#include "llpanelevent.h"

View File

@ -50,7 +50,6 @@
#include "llkeyboard.h"
#include "lllineeditor.h"
#include "llmenugl.h"
#include "llnotify.h"
#include "llimview.h"
#include "llsd.h"
#include "lltextbox.h"

View File

@ -30,10 +30,6 @@
* $/LicenseInfo$
*/
// *NOTE: this module is a copy-paste of llui/llalertdialog.h
// Can we re-implement this as a subclass of LLAlertDialog and
// avoid all this code duplication? It already caused EXT-2232.
#include "llviewerprecompiledheaders.h" // must be first include
#include "linden_common.h"
@ -60,7 +56,7 @@ const F32 DEFAULT_BUTTON_DELAY = 0.5f;
const S32 MSG_PAD = 8;
/*static*/ LLControlGroup* LLToastAlertPanel::sSettings = NULL;
/*static*/ LLAlertURLLoader* LLToastAlertPanel::sURLLoader;
/*static*/ LLToastAlertPanel::URLLoader* LLToastAlertPanel::sURLLoader;
//-----------------------------------------------------------------------------
// Private methods

View File

@ -30,10 +30,6 @@
* $/LicenseInfo$
*/
// *NOTE: this module is a copy-paste of llui/llalertdialog.h
// Can we re-implement this as a subclass of LLAlertDialog and
// avoid all this code duplication? It already caused EXT-2232.
#ifndef LL_TOASTALERTPANEL_H
#define LL_TOASTALERTPANEL_H
@ -41,11 +37,9 @@
#include "llfloater.h"
#include "llui.h"
#include "llnotificationptr.h"
#include "llalertdialog.h"
class LLButton;
class LLCheckBoxCtrl;
class LLAlertDialogTemplate;
class LLLineEditor;
/**
@ -62,7 +56,16 @@ class LLToastAlertPanel
public:
typedef bool (*display_callback_t)(S32 modal);
static void setURLLoader(LLAlertURLLoader* loader)
class URLLoader
{
public:
virtual void load(const std::string& url, bool force_open_externally = 0) = 0;
virtual ~URLLoader()
{
}
};
static void setURLLoader(URLLoader* loader)
{
sURLLoader = loader;
}
@ -95,7 +98,7 @@ private:
BOOL hasTitleBar() const;
private:
static LLAlertURLLoader* sURLLoader;
static URLLoader* sURLLoader;
static LLControlGroup* sSettings;
struct ButtonData

View File

@ -40,7 +40,6 @@
#include "lliconctrl.h"
#include "llinventoryfunctions.h"
#include "llnotifications.h"
#include "llnotify.h"
#include "llviewertexteditor.h"
#include "lluiconstants.h"

View File

@ -63,7 +63,6 @@
#include "llviewerjoystick.h"
#include "llviewerparcelmgr.h"
#include "llparcel.h"
#include "llnotify.h"
#include "lloverlaybar.h"
#include "llkeyboard.h"
#include "llerrorcontrol.h"
@ -517,14 +516,12 @@ bool toggle_show_snapshot_button(const LLSD& newvalue)
bool toggle_show_navigation_panel(const LLSD& newvalue)
{
LLRect floater_view_rect = gFloaterView->getRect();
LLRect notify_view_rect = gNotifyBoxView->getRect();
LLNavigationBar* navbar = LLNavigationBar::getInstance();
//if newvalue contains 0 => navbar should turn invisible, so floater_view_rect should get higher,
//and to do this pm=1, else if navbar becomes visible pm=-1 so floater_view_rect gets lower.
int pm=newvalue.asBoolean()?-1:1;
floater_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight());
notify_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight());
gFloaterView->setRect(floater_view_rect);
floater_view_rect = gFloaterView->getRect();
navbar->showNavigationPanel(newvalue.asBoolean());
@ -534,14 +531,12 @@ bool toggle_show_navigation_panel(const LLSD& newvalue)
bool toggle_show_favorites_panel(const LLSD& newvalue)
{
LLRect floater_view_rect = gFloaterView->getRect();
LLRect notify_view_rect = gNotifyBoxView->getRect();
LLNavigationBar* navbar = LLNavigationBar::getInstance();
//if newvalue contains 0 => favbar should turn invisible, so floater_view_rect should get higher,
//and to do this pm=1, else if favbar becomes visible pm=-1 so floater_view_rect gets lower.
int pm=newvalue.asBoolean()?-1:1;
floater_view_rect.mTop += pm*navbar->getDefFavBarHeight();
notify_view_rect.mTop += pm*navbar->getDefFavBarHeight();
gFloaterView->setRect(floater_view_rect);
navbar->showFavoritesPanel(newvalue.asBoolean());
return true;

View File

@ -43,7 +43,6 @@
#include "llviewercontrol.h"
#include "llconsole.h"
#include "llinventorymodel.h"
#include "llnotify.h"
#include "llgesturemgr.h"
#include "llinventorybridge.h"

View File

@ -59,7 +59,6 @@
#include "llnearbychat.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llpanelgrouplandmoney.h"
#include "llpanelplaces.h"
#include "llrecentpeople.h"
@ -973,16 +972,8 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
const LLUUID& blocked_id;
};
using namespace LLNotificationsUI;
LLChannelManager* channel_manager = LLChannelManager::getInstance();
LLScreenChannel
* screen_channel =
dynamic_cast<LLScreenChannel*> (channel_manager->findChannelByID(
LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
if (screen_channel != NULL)
{
screen_channel->killMatchedToasts(OfferMatcher(blocked_id));
}
LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID(
gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(blocked_id));
}
LLOfferInfo::LLOfferInfo(const LLSD& sd)
@ -4847,24 +4838,25 @@ bool script_question_cb(const LLSD& notification, const LLSD& response)
LLMuteList::getInstance()->add(LLMute(item_id, notification["payload"]["object_name"].asString(), LLMute::OBJECT));
// purge the message queue of any previously queued requests from the same source. DEV-4879
class OfferMatcher : public LLNotifyBoxView::Matcher
class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher
{
public:
OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {}
BOOL matches(const LLNotificationPtr notification) const
bool matches(const LLNotificationPtr notification) const
{
if (notification->getName() == "ScriptQuestionCaution"
|| notification->getName() == "ScriptQuestion")
{
return (notification->getPayload()["item_id"].asUUID() == blocked_id);
}
return FALSE;
return false;
}
private:
const LLUUID& blocked_id;
};
// should do this via the channel
gNotifyBoxView->purgeMessagesMatching(OfferMatcher(item_id));
LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID(
gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(item_id));
}
if (response["Details"])

View File

@ -54,7 +54,6 @@
#include "llfloatergroups.h"
#include "llfloatersellland.h"
#include "llfloatertools.h"
#include "llnotify.h"
#include "llparcelselection.h"
#include "llresmgr.h"
#include "llsdutil.h"

View File

@ -51,7 +51,6 @@
#include "llmenugl.h"
#include "llnotecard.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llpanelplaces.h"
#include "llpreview.h"
#include "llpreviewnotecard.h"

View File

@ -82,7 +82,6 @@
// newview includes
#include "llagent.h"
#include "llalertdialog.h"
#include "llbox.h"
#include "llconsole.h"
#include "llviewercontrol.h"
@ -129,7 +128,6 @@
#include "llmorphview.h"
#include "llmoveview.h"
#include "llnavigationbar.h"
#include "llnotify.h"
#include "lloverlaybar.h"
#include "llpreviewtexture.h"
#include "llprogressview.h"
@ -1450,7 +1448,6 @@ void LLViewerWindow::initBase()
gDebugView = getRootView()->getChild<LLDebugView>("DebugView");
gDebugView->init();
gNotifyBoxView = getRootView()->getChild<LLNotifyBoxView>("notify_container");
gToolTipView = getRootView()->getChild<LLToolTipView>("tooltip view");
// Add the progress bar view (startup view), which overrides everything
@ -1628,8 +1625,6 @@ void LLViewerWindow::shutdownViews()
gMorphView = NULL;
gHUDView = NULL;
gNotifyBoxView = NULL;
}
void LLViewerWindow::shutdownGL()
@ -1997,9 +1992,6 @@ void LLViewerWindow::draw()
#if LL_DEBUG
LLView::sIsDrawing = FALSE;
#endif
// UI post-draw Updates
gNotifyBoxView->updateNotifyBoxView();
}
// Takes a single keydown event, usually when UI is visible
@ -2595,7 +2587,6 @@ void LLViewerWindow::updateUI()
else if (dynamic_cast<LLUICtrl*>(viewp)
&& viewp != gMenuHolder
&& viewp != gFloaterView
&& viewp != gNotifyBoxView
&& viewp != gConsole)
{
if (dynamic_cast<LLFloater*>(viewp))

View File

@ -64,7 +64,6 @@
#include "llkeyframewalkmotion.h"
#include "llmutelist.h"
#include "llmoveview.h"
#include "llnotify.h"
#include "llquantize.h"
#include "llregionhandle.h"
#include "llresmgr.h"

View File

@ -41,7 +41,6 @@
#include "llviewerinventory.h"
#include "llviewerstats.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llinventorymodel.h"
#include "lltrans.h"

View File

@ -42,10 +42,9 @@
#include "llviewercontrol.h"
#include "llfloatermediabrowser.h"
#include "llfloaterreg.h"
#include "llalertdialog.h"
#include "lltoastalertpanel.h"
class URLLoader : public LLAlertURLLoader
class URLLoader : public LLToastAlertPanel::URLLoader
{
virtual void load(const std::string& url , bool force_open_externally)
{
@ -65,7 +64,6 @@ static URLLoader sAlertURLLoader;
// static
void LLWeb::initClass()
{
LLAlertDialog::setURLLoader(&sAlertURLLoader);
LLToastAlertPanel::setURLLoader(&sAlertURLLoader);
}