Commits

alain_linden  committed 460aac6

inform user on failed install--needs proper user dialog ;-)

  • Participants
  • Parent commits 1a8fe27

Comments (0)

Files changed (4)

File indra/newview/llappviewer.cpp

     // 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
+		switch (evt["type"].asInteger())
+		{
+			case LLUpdaterService::DOWNLOAD_COMPLETE:
+				LLNotificationsUtil::add("DownloadBackground");
+				break;
+			case LLUpdaterService::INSTALL_ERROR:
+				LLNotificationsUtil::add("FailedUpdateInstall");
+				break;
+			default:
+				llinfos << "unhandled update event " << evt << llendl;
+				break;
+		}
+
+		// let others also handle this event by default
         return false;
     }
 };

File indra/newview/skins/default/xui/en/notifications.xml

   </notification>
 
   <notification
+   icon="alertmodal.tga"
+   name="FailedUpdateInstall"
+   type="alertmodal">
+Gadzooks, I failed to install the latest update.
+Get thee to the interwebs and install it thyself.
+    <usetemplate
+     name="okbutton"
+     yestext="OK"/>
+  </notification>
+  <notification
    icon="notifytip.tga"
    name="DownloadBackground"
    type="notifytip">

File indra/viewer_components/updater/llupdaterservice.cpp

 			llinfos << "found marker " << ll_install_failed_marker_path() << llendl;
 			llinfos << "last install attempt failed" << llendl;
 			LLFile::remove(ll_install_failed_marker_path());
+			
+			LLSD event;
+			event["type"] = LLSD(LLUpdaterService::INSTALL_ERROR);
+			LLEventPumps::instance().obtain(LLUpdaterService::pumpName()).post(event);
 		}
 		else
 		{

File indra/viewer_components/updater/llupdaterservice.h

 	enum UpdateEvent {
 		INVALID,
 		DOWNLOAD_COMPLETE,
-		DOWNLOAD_ERROR
+		DOWNLOAD_ERROR,
+		INSTALL_ERROR
 	};
 
 	LLUpdaterService();