summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2010-12-08 15:57:02 -0800
committerbrad kittenbrink <brad@lindenlab.com>2010-12-08 15:57:02 -0800
commitb2cdeb7755febed84c93ead3e8232e4885a494ec (patch)
treecbd424ec5705c8eb1ba5933824edefd61640f38d
parent99488e6db8730189170a36fa2c2e7621e666868d (diff)
parentd9fad868ed5fb53522dde44f084c299df0429d53 (diff)
Merge.
-rw-r--r--indra/newview/llappviewer.cpp28
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml4
2 files changed, 28 insertions, 4 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 3943ab0f30..b852b63cf8 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2394,14 +2394,38 @@ bool LLAppViewer::initConfiguration()
}
namespace {
- // *TODO - decide if there's a better place for this function.
+ // *TODO - decide if there's a better place for these functions.
// do we need a file llupdaterui.cpp or something? -brad
+
+ void apply_update_callback(LLSD const & notification, LLSD const & response)
+ {
+ lldebugs << "LLUpdate user response: " << response << llendl;
+ if(response["OK_okcancelbuttons"].asBoolean())
+ {
+ llinfos << "LLUpdate restarting viewer" << llendl;
+ static const bool install_if_ready = true;
+ // *HACK - this lets us launch the installer immediately for now
+ LLUpdaterService().startChecking(install_if_ready);
+ }
+ }
+
bool notify_update(LLSD const & evt)
{
+ std::string notification_name;
switch (evt["type"].asInteger())
{
case LLUpdaterService::DOWNLOAD_COMPLETE:
- LLNotificationsUtil::add("DownloadBackgroundDialog");
+ if(LLStartUp::getStartupState() < STATE_STARTED)
+ {
+ // CHOP-262 we need to use a different notification
+ // method prior to login.
+ notification_name = "DownloadBackgroundDialog";
+ }
+ else
+ {
+ notification_name = "DownloadBackgroundTip";
+ }
+ LLNotificationsUtil::add(notification_name, LLSD(), LLSD(), apply_update_callback);
break;
case LLUpdaterService::INSTALL_ERROR:
LLNotificationsUtil::add("FailedUpdateInstall");
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index e333c891a4..8c76231595 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -2901,9 +2901,9 @@ updater service to fetch and install the update?
</notification>
<notification
- icon="notifytip.tga"
+ icon="notify.tga"
name="DownloadBackgroundTip"
- type="notifytip">
+ type="notify">
An updated version of [APP_NAME] has been downloaded.
It will be applied the next time you restart [APP_NAME]
<usetemplate