From ca315cbe559b459de7e9554d79e27f0b738fbd8a Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Sat, 27 Mar 2010 18:55:36 +0100 Subject: fix bring help-f1 page under control of hippogridmanager --- linden/indra/llcommon/llsecondlifeurls.cpp | 45 +--------------------- linden/indra/llcommon/llsecondlifeurls.h | 34 +--------------- linden/indra/newview/llfloaterhtmlhelp.cpp | 36 +++++++++-------- linden/indra/newview/llstartup.cpp | 13 +++++-- linden/indra/newview/llviewermenu.cpp | 2 +- .../skins/default/xui/en-us/notifications.xml | 9 ++++- 6 files changed, 41 insertions(+), 98 deletions(-) diff --git a/linden/indra/llcommon/llsecondlifeurls.cpp b/linden/indra/llcommon/llsecondlifeurls.cpp index d7de8d8..1669f7b 100644 --- a/linden/indra/llcommon/llsecondlifeurls.cpp +++ b/linden/indra/llcommon/llsecondlifeurls.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2005&license=viewergpl$ * - * Copyright (c) 2005-2009, Linden Research, Inc. + * Copyright (c) 2005-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -33,56 +33,15 @@ #include "linden_common.h" #include "llsecondlifeurls.h" -const std::string CREATE_ACCOUNT_URL ( - "http://secondlife.com/registration/"); - -const std::string MANAGE_ACCOUNT ( - "http://secondlife.com/account/"); - const std::string AUCTION_URL ( "http://secondlife.com/auctions/auction-detail.php?id="); const std::string EVENTS_URL ( "http://secondlife.com/events/"); -const std::string TIER_UP_URL ( - "http://secondlife.com/app/landtier"); - -const std::string LAND_URL ( - "http://secondlife.com/app/landtier"); - -const std::string UPGRADE_TO_PREMIUM_URL ( - "http://secondlife.com/app/upgrade/"); - -const std::string DIRECTX_9_URL ( - "http://secondlife.com/support/"); - -const std::string AMD_AGP_URL ( - "http://secondlife.com/support/"); - -const std::string VIA_URL ( - "http://secondlife.com/support/"); - -const std::string SUPPORT_URL ( - "http://secondlife.com/support/"); - -const std::string INTEL_CHIPSET_URL ( - "http://secondlife.com/support/"); - -const std::string SIS_CHIPSET_URL ( - "http://secondlife.com/support/"); - -const std::string BLOGS_URL ( - "http://blog.secondlife.com/"); - const std::string BUY_CURRENCY_URL ( "http://secondlife.com/app/currency/"); -const std::string LSL_DOC_URL ( - "http://secondlife.com/app/lsldoc/"); - -const std::string SL_KB_URL ( - "http://secondlife.com/knowledgebase/"); const std::string RELEASE_NOTES_BASE_URL ( - "http://imprudenceviewer.org/wiki/Release_Notes/"); + "http://imprudenceviewer.org/wiki/Release_Notes/"); \ No newline at end of file diff --git a/linden/indra/llcommon/llsecondlifeurls.h b/linden/indra/llcommon/llsecondlifeurls.h index 9fd75c3..9c64b57 100644 --- a/linden/indra/llcommon/llsecondlifeurls.h +++ b/linden/indra/llcommon/llsecondlifeurls.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2004&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2004-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -33,46 +33,14 @@ #ifndef LL_LLSECONDLIFEURLS_H #define LL_LLSECONDLIFEURLS_H -// Account registration web page -extern const std::string CREATE_ACCOUNT_URL; - -// Manage Account -extern const std::string MANAGE_ACCOUNT; extern const std::string AUCTION_URL; extern const std::string EVENTS_URL; -// Tier up to a new land level. -extern const std::string TIER_UP_URL; - -// Tier up to a new land level. -extern const std::string LAND_URL; - -// Upgrade from basic membership to premium membership -extern const std::string UPGRADE_TO_PREMIUM_URL; - -// How to get DirectX 9 -extern const std::string DIRECTX_9_URL; - -// Out of date VIA chipset -extern const std::string VIA_URL; - -// Support URL -extern const std::string SUPPORT_URL; - -// Linden Blogs page -extern const std::string BLOGS_URL; - // Currency page extern const std::string BUY_CURRENCY_URL; -// LSL script wiki -extern const std::string LSL_DOC_URL; - -// SL KnowledgeBase page -extern const std::string SL_KB_URL; - // Release Notes Redirect URL for Server and Viewer extern const std::string RELEASE_NOTES_BASE_URL; diff --git a/linden/indra/newview/llfloaterhtmlhelp.cpp b/linden/indra/newview/llfloaterhtmlhelp.cpp index 2a22a40..ff69394 100644 --- a/linden/indra/newview/llfloaterhtmlhelp.cpp +++ b/linden/indra/newview/llfloaterhtmlhelp.cpp @@ -54,6 +54,7 @@ #include "llviewerparcelmedia.h" #include "llcombobox.h" +#include "hippoGridManager.h" LLFloaterMediaBrowser::LLFloaterMediaBrowser(const LLSD& media_data) { @@ -454,22 +455,18 @@ void LLFloaterHtmlHelp::show(std::string url, std::string title) LLFloaterHtml* floater_html = LLFloaterHtml::getInstance(); floater_html->setVisible(FALSE); - if (url.empty()) - { - url = floater_html->getSupportUrl(); - } - - if (gSavedSettings.getBOOL("UseExternalBrowser")) - { - LLSD payload; - payload["url"] = url; - - LLNotifications::instance().add("ClickOpenF1Help", LLSD(), payload, onClickF1HelpLoadURL); - } - else - { - // don't wait, just do it - LLWeb::loadURL(url); + url = gHippoGridManager->getConnectedGrid()->getSupportUrl(); + if (!url.empty()) { + if (gSavedSettings.getBOOL("UseExternalBrowser")) { + LLSD payload; + payload["url"] = url; + LLNotifications::instance().add("ClickOpenF1Help", LLSD(), payload, onClickF1HelpLoadURL); + } else { + // don't wait, just do it + LLWeb::loadURL(url); + } + } else { + LLNotifications::instance().add("NoSupportUrl"); } } @@ -479,7 +476,12 @@ bool LLFloaterHtmlHelp::onClickF1HelpLoadURL(const LLSD& notification, const LLS S32 option = LLNotification::getSelectedOption(notification, response); if (option == 0) { - LLWeb::loadURL(notification["payload"]["url"].asString()); + const std::string &url = notification["payload"]["url"].asString(); + if (!url.empty()) { + LLWeb::loadURL(url); + } else { + llwarns << "Support URL not available." << llendl; + } } return false; } diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index e7271b8..ef25fb8 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -2914,7 +2914,12 @@ bool first_run_dialog_callback(const LLSD& notification, const LLSD& response) if (0 == option) { LL_DEBUGS("AppInit") << "First run dialog cancelling" << LL_ENDL; - LLWeb::loadURL( CREATE_ACCOUNT_URL ); + const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterUrl(); + if (!url.empty()) { + LLWeb::loadURL(url); + } else { + llwarns << "Account creation URL is empty" << llendl; + } } LLPanelLogin::giveFocus(); @@ -2939,9 +2944,11 @@ bool login_alert_status(const LLSD& notification, const LLSD& response) { case 0: // OK break; - case 1: // Help - LLWeb::loadURL( SUPPORT_URL ); + case 1: { // Help + const std::string &url = gHippoGridManager->getConnectedGrid()->getSupportUrl(); + if (!url.empty()) LLWeb::loadURL(url); break; + } case 2: // Teleport // Restart the login process, starting at our home locaton LLURLSimString::setString(LLURLSimString::sLocationStringHome); diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 2e72a2a..41c3578 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -5865,7 +5865,7 @@ class LLShowFloater : public view_listener_t } else if (floater_name == "help f1") { - LLFloaterMediaBrowser::helpF1(); + gViewerHtmlHelp.show(); } else if (floater_name == "help tutorial") { diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml index efc45d0..b0deeef 100644 --- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml @@ -4130,7 +4130,7 @@ Add this Ability to '[ROLE_NAME]'? icon="alertmodal.tga" name="ClickOpenF1Help" type="alertmodal"> - Visit the [SECOND_LIFE] Support Website? (note: this is not an Imprudence Help site) +Visit the [GRID] Support Web site? +[GRID] has no link for support. + + + Are you sure you want to quit? -- cgit v1.1