From 6c8f447e529d4ea8ac70cc4ede4749f0b9f9bdaf Mon Sep 17 00:00:00 2001 From: "coyot@coyot-sager-PC" Date: Wed, 2 Nov 2016 18:05:32 +0100 Subject: SL-323: activate viewer menu and floater checks for updates via VMP --- indra/newview/llfloaterabout.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 1b85f645e8..171858e472 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -90,7 +90,7 @@ public: static LLSD getInfo(); void onClickCopyToClipboard(); void onClickUpdateCheck(); - void setUpdateListener(); + static void setUpdateListener(); private: void setSupportText(const std::string& server_release_notes_url); @@ -138,7 +138,7 @@ BOOL LLFloaterAbout::postBuild() boost::bind(&LLFloaterAbout::onClickCopyToClipboard, this)); getChild("update_btn")->setCommitCallback( - boost::bind(&LLFloaterAbout::setUpdateListener, this)); + boost::bind(&LLFloaterAbout::onClickUpdateCheck, this)); static const LLUIColor about_color = LLUIColorTable::instance().getColor("TextFgReadOnlyColor"); @@ -314,6 +314,11 @@ void LLFloaterAbout::onClickCopyToClipboard() support_widget->deselect(); } +void LLFloaterAbout::onClickUpdateCheck() +{ + setUpdateListener(); +} + void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url) { #if LL_WINDOWS @@ -401,17 +406,17 @@ void LLFloaterAbout::setUpdateListener() } } - if ( ! downloads) + if ( !downloads ) { LLNotificationsUtil::add("UpdateViewerUpToDate"); } else { - if ( ! done ) + if ( !done ) { LLNotificationsUtil::add("UpdateDownloadInProgress"); } - else if ( !next and !skip ) + else if ( (!next) && (!skip) ) { LLNotificationsUtil::add("UpdateDownloadComplete"); } @@ -429,6 +434,10 @@ void LLFloaterAboutUtil::registerFloater() { LLFloaterReg::add("sl_about", "floater_about.xml", &LLFloaterReg::build); +} +void LLFloaterAboutUtil::checkUpdatesAndNotify() +{ + LLFloaterAbout::setUpdateListener(); } -- cgit v1.2.3