From cf3ded4491751231056b220525970e125d813e6a Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Thu, 18 Nov 2010 12:15:49 -0800 Subject: First draft of CHOP-106 downloaded update ready notification. Reviewed by mani. --- indra/newview/llappviewer.cpp | 14 ++++++++++++++ indra/newview/llmainlooprepeater.cpp | 4 ++-- indra/newview/skins/default/xui/en/notifications.xml | 8 ++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 76d518b610..0c6c77566f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2385,6 +2385,17 @@ bool LLAppViewer::initConfiguration() return true; // Config was successful. } +namespace { + // *TODO - decide if there's a better place for this function. + // do we need a file llupdaterui.cpp or something? -brad + bool notify_update(LLSD const & evt) + { + LLNotificationsUtil::add("DownloadBackground"); + // let others also handle this event by default + return false; + } +}; + void LLAppViewer::initUpdater() { // Initialize the updater service. @@ -2409,6 +2420,9 @@ void LLAppViewer::initUpdater() { mUpdater->startChecking(); } + + LLEventPump & updater_pump = LLEventPumps::instance().obtain(LLUpdaterService::pumpName()); + updater_pump.listen("notify_update", notify_update); } void LLAppViewer::checkForCrash(void) diff --git a/indra/newview/llmainlooprepeater.cpp b/indra/newview/llmainlooprepeater.cpp index ddc925a73b..5c020e6d98 100644 --- a/indra/newview/llmainlooprepeater.cpp +++ b/indra/newview/llmainlooprepeater.cpp @@ -48,9 +48,9 @@ void LLMainLoopRepeater::start(void) mQueue = new LLThreadSafeQueue(gAPRPoolp, 1024); mMainLoopConnection = LLEventPumps::instance(). - obtain("mainloop").listen("stupid name here", boost::bind(&LLMainLoopRepeater::onMainLoop, this, _1)); + obtain("mainloop").listen(LLEventPump::inventName(), boost::bind(&LLMainLoopRepeater::onMainLoop, this, _1)); mRepeaterConnection = LLEventPumps::instance(). - obtain("mainlooprepeater").listen("other stupid name here", boost::bind(&LLMainLoopRepeater::onMessage, this, _1)); + obtain("mainlooprepeater").listen(LLEventPump::inventName(), boost::bind(&LLMainLoopRepeater::onMessage, this, _1)); } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 1f747ab997..40d5f75de2 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2869,6 +2869,14 @@ Download to your Applications folder? yestext="Download"/> + +An updated version of [APP_NAME] has been downloaded. +It will be applied the next time you restart [APP_NAME] + +