diff options
author | McCabe Maxsted | 2010-07-15 02:02:57 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-07-15 02:11:25 -0700 |
commit | 145c9172381f8bef303a86689b52dadf6a05975a (patch) | |
tree | 392b2cd85309d65c6eea98efd3a65bf96238554a | |
parent | Fixed #368: showlookatinfo notification missing, friendship and calling card ... (diff) | |
download | meta-impy-145c9172381f8bef303a86689b52dadf6a05975a.zip meta-impy-145c9172381f8bef303a86689b52dadf6a05975a.tar.gz meta-impy-145c9172381f8bef303a86689b52dadf6a05975a.tar.bz2 meta-impy-145c9172381f8bef303a86689b52dadf6a05975a.tar.xz |
Fixed Bug #262: 'Help > Viewer Help' name does not match behavior (also fixed LLWeb::loadURL)
-rw-r--r-- | linden/indra/newview/hippoGridManager.cpp | 89 | ||||
-rw-r--r-- | linden/indra/newview/hippoGridManager.h | 65 | ||||
-rw-r--r-- | linden/indra/newview/llfloaterhtmlhelp.cpp | 27 | ||||
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/llweb.cpp | 4 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/menu_login.xml | 4 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | 2 |
7 files changed, 108 insertions, 85 deletions
diff --git a/linden/indra/newview/hippoGridManager.cpp b/linden/indra/newview/hippoGridManager.cpp index c9f2549..ccf63f5 100644 --- a/linden/indra/newview/hippoGridManager.cpp +++ b/linden/indra/newview/hippoGridManager.cpp | |||
@@ -23,7 +23,7 @@ | |||
23 | // ******************************************************************** | 23 | // ******************************************************************** |
24 | // Global Variables | 24 | // Global Variables |
25 | 25 | ||
26 | HippoGridManager *gHippoGridManager = 0; | 26 | HippoGridManager* gHippoGridManager = 0; |
27 | 27 | ||
28 | HippoGridInfo HippoGridInfo::FALLBACK_GRIDINFO(""); | 28 | HippoGridInfo HippoGridInfo::FALLBACK_GRIDINFO(""); |
29 | 29 | ||
@@ -39,9 +39,22 @@ HippoGridInfo HippoGridInfo::FALLBACK_GRIDINFO(""); | |||
39 | // ******************************************************************** | 39 | // ******************************************************************** |
40 | // Initialize | 40 | // Initialize |
41 | 41 | ||
42 | HippoGridInfo::HippoGridInfo(const std::string &gridNick) : | 42 | HippoGridInfo::HippoGridInfo(const std::string& gridNick) : |
43 | mPlatform(PLATFORM_OTHER), | 43 | mPlatform(PLATFORM_OPENSIM), |
44 | mGridNick(gridNick), | 44 | mGridNick(gridNick), |
45 | mGridName(LLStringUtil::null), | ||
46 | mLoginUri(LLStringUtil::null), | ||
47 | mLoginPage(LLStringUtil::null), | ||
48 | mHelperUri(LLStringUtil::null), | ||
49 | mWebSite(LLStringUtil::null), | ||
50 | mSupportUrl(LLStringUtil::null), | ||
51 | mRegisterUrl(LLStringUtil::null), | ||
52 | mPasswordUrl(LLStringUtil::null), | ||
53 | mSearchUrl(LLStringUtil::null), | ||
54 | mFirstName(LLStringUtil::null), | ||
55 | mLastName(LLStringUtil::null), | ||
56 | mAvatarPassword(LLStringUtil::null), | ||
57 | mXmlState(XML_VOID), | ||
45 | mVoiceConnector("SLVoice"), | 58 | mVoiceConnector("SLVoice"), |
46 | mRenderCompat(true), | 59 | mRenderCompat(true), |
47 | mMaxAgentGroups(-1), | 60 | mMaxAgentGroups(-1), |
@@ -167,7 +180,7 @@ void HippoGridInfo::setPlatform(Platform platform) | |||
167 | } | 180 | } |
168 | 181 | ||
169 | 182 | ||
170 | void HippoGridInfo::setPlatform(const std::string &platform) | 183 | void HippoGridInfo::setPlatform(const std::string& platform) |
171 | { | 184 | { |
172 | std::string tmp = platform; | 185 | std::string tmp = platform; |
173 | for (unsigned i=0; i<platform.size(); i++) | 186 | for (unsigned i=0; i<platform.size(); i++) |
@@ -188,64 +201,64 @@ void HippoGridInfo::setPlatform(const std::string &platform) | |||
188 | } | 201 | } |
189 | } | 202 | } |
190 | 203 | ||
191 | void HippoGridInfo::setGridName(const std::string &gridName) | 204 | void HippoGridInfo::setGridName(const std::string& gridName) |
192 | { | 205 | { |
193 | mGridName = gridName; | 206 | mGridName = gridName; |
194 | } | 207 | } |
195 | 208 | ||
196 | void HippoGridInfo::setLoginUri(const std::string &loginUri) | 209 | void HippoGridInfo::setLoginUri(const std::string& loginUri) |
197 | { | 210 | { |
198 | std::string uri = loginUri; | 211 | std::string uri = loginUri; |
199 | mLoginUri = sanitizeUri(uri); | 212 | mLoginUri = sanitizeUri(uri); |
200 | } | 213 | } |
201 | 214 | ||
202 | void HippoGridInfo::setLoginPage(const std::string &loginPage) | 215 | void HippoGridInfo::setLoginPage(const std::string& loginPage) |
203 | { | 216 | { |
204 | mLoginPage = loginPage; | 217 | mLoginPage = loginPage; |
205 | } | 218 | } |
206 | 219 | ||
207 | void HippoGridInfo::setHelperUri(const std::string &helperUri) | 220 | void HippoGridInfo::setHelperUri(const std::string& helperUri) |
208 | { | 221 | { |
209 | std::string uri = helperUri; | 222 | std::string uri = helperUri; |
210 | mHelperUri = sanitizeUri(uri); | 223 | mHelperUri = sanitizeUri(uri); |
211 | } | 224 | } |
212 | 225 | ||
213 | void HippoGridInfo::setWebSite(const std::string &website) | 226 | void HippoGridInfo::setWebSite(const std::string& website) |
214 | { | 227 | { |
215 | mWebSite = website; | 228 | mWebSite = website; |
216 | } | 229 | } |
217 | 230 | ||
218 | void HippoGridInfo::setSupportUrl(const std::string &url) | 231 | void HippoGridInfo::setSupportUrl(const std::string& url) |
219 | { | 232 | { |
220 | mSupportUrl = url; | 233 | mSupportUrl = url; |
221 | } | 234 | } |
222 | 235 | ||
223 | void HippoGridInfo::setRegisterUrl(const std::string &url) | 236 | void HippoGridInfo::setRegisterUrl(const std::string& url) |
224 | { | 237 | { |
225 | mRegisterUrl = url; | 238 | mRegisterUrl = url; |
226 | } | 239 | } |
227 | 240 | ||
228 | void HippoGridInfo::setPasswordUrl(const std::string &url) | 241 | void HippoGridInfo::setPasswordUrl(const std::string& url) |
229 | { | 242 | { |
230 | mPasswordUrl = url; | 243 | mPasswordUrl = url; |
231 | } | 244 | } |
232 | 245 | ||
233 | void HippoGridInfo::setSearchUrl(const std::string &url) | 246 | void HippoGridInfo::setSearchUrl(const std::string& url) |
234 | { | 247 | { |
235 | mSearchUrl = url; | 248 | mSearchUrl = url; |
236 | } | 249 | } |
237 | 250 | ||
238 | void HippoGridInfo::setFirstName(const std::string &firstName) | 251 | void HippoGridInfo::setFirstName(const std::string& firstName) |
239 | { | 252 | { |
240 | mFirstName = firstName; | 253 | mFirstName = firstName; |
241 | } | 254 | } |
242 | 255 | ||
243 | void HippoGridInfo::setLastName(const std::string &lastName) | 256 | void HippoGridInfo::setLastName(const std::string& lastName) |
244 | { | 257 | { |
245 | mLastName = lastName; | 258 | mLastName = lastName; |
246 | } | 259 | } |
247 | 260 | ||
248 | void HippoGridInfo::setAvatarPassword(const std::string &avatarPassword) | 261 | void HippoGridInfo::setAvatarPassword(const std::string& avatarPassword) |
249 | { | 262 | { |
250 | mAvatarPassword = avatarPassword; | 263 | mAvatarPassword = avatarPassword; |
251 | } | 264 | } |
@@ -255,12 +268,12 @@ void HippoGridInfo::setRenderCompat(bool compat) | |||
255 | mRenderCompat = compat; | 268 | mRenderCompat = compat; |
256 | } | 269 | } |
257 | 270 | ||
258 | void HippoGridInfo::setCurrencySymbol(const std::string &sym) | 271 | void HippoGridInfo::setCurrencySymbol(const std::string& sym) |
259 | { | 272 | { |
260 | mCurrencySymbol = sym.substr(0, 3); | 273 | mCurrencySymbol = sym.substr(0, 3); |
261 | } | 274 | } |
262 | 275 | ||
263 | void HippoGridInfo::setRealCurrencySymbol(const std::string &sym) | 276 | void HippoGridInfo::setRealCurrencySymbol(const std::string& sym) |
264 | { | 277 | { |
265 | mRealCurrencySymbol = sym.substr(0, 3); | 278 | mRealCurrencySymbol = sym.substr(0, 3); |
266 | } | 279 | } |
@@ -348,9 +361,9 @@ std::string HippoGridInfo::getSearchUrl(SearchType ty, bool is_web) const | |||
348 | 361 | ||
349 | 362 | ||
350 | //static | 363 | //static |
351 | void HippoGridInfo::onXmlElementStart(void *userData, const XML_Char *name, const XML_Char **atts) | 364 | void HippoGridInfo::onXmlElementStart(void* userData, const XML_Char* name, const XML_Char** atts) |
352 | { | 365 | { |
353 | HippoGridInfo *self = (HippoGridInfo*)userData; | 366 | HippoGridInfo* self = (HippoGridInfo*)userData; |
354 | if (strcasecmp(name, "gridnick") == 0) | 367 | if (strcasecmp(name, "gridnick") == 0) |
355 | self->mXmlState = XML_GRIDNICK; | 368 | self->mXmlState = XML_GRIDNICK; |
356 | else if (strcasecmp(name, "gridname") == 0) | 369 | else if (strcasecmp(name, "gridname") == 0) |
@@ -376,16 +389,16 @@ void HippoGridInfo::onXmlElementStart(void *userData, const XML_Char *name, cons | |||
376 | } | 389 | } |
377 | 390 | ||
378 | //static | 391 | //static |
379 | void HippoGridInfo::onXmlElementEnd(void *userData, const XML_Char *name) | 392 | void HippoGridInfo::onXmlElementEnd(void* userData, const XML_Char* name) |
380 | { | 393 | { |
381 | HippoGridInfo *self = (HippoGridInfo*)userData; | 394 | HippoGridInfo* self = (HippoGridInfo*)userData; |
382 | self->mXmlState = XML_VOID; | 395 | self->mXmlState = XML_VOID; |
383 | } | 396 | } |
384 | 397 | ||
385 | //static | 398 | //static |
386 | void HippoGridInfo::onXmlCharacterData(void *userData, const XML_Char *s, int len) | 399 | void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int len) |
387 | { | 400 | { |
388 | HippoGridInfo *self = (HippoGridInfo*)userData; | 401 | HippoGridInfo* self = (HippoGridInfo*)userData; |
389 | switch (self->mXmlState) | 402 | switch (self->mXmlState) |
390 | { | 403 | { |
391 | case XML_GRIDNICK: | 404 | case XML_GRIDNICK: |
@@ -507,9 +520,9 @@ void HippoGridInfo::formatFee(std::string &fee, int cost, bool showFree) const | |||
507 | // Static Helpers | 520 | // Static Helpers |
508 | 521 | ||
509 | // static | 522 | // static |
510 | const char *HippoGridInfo::getPlatformString(Platform platform) | 523 | const char* HippoGridInfo::getPlatformString(Platform platform) |
511 | { | 524 | { |
512 | static const char *platformStrings[PLATFORM_LAST] = | 525 | static const char* platformStrings[PLATFORM_LAST] = |
513 | { | 526 | { |
514 | "Other", "OpenSim", "SecondLife" | 527 | "Other", "OpenSim", "SecondLife" |
515 | }; | 528 | }; |
@@ -625,7 +638,7 @@ void HippoGridManager::discardAndReload() | |||
625 | // ******************************************************************** | 638 | // ******************************************************************** |
626 | // Public Access | 639 | // Public Access |
627 | 640 | ||
628 | HippoGridInfo* HippoGridManager::getGrid(const std::string &grid) const | 641 | HippoGridInfo* HippoGridManager::getGrid(const std::string& grid) const |
629 | { | 642 | { |
630 | std::map<std::string, HippoGridInfo*>::const_iterator it; | 643 | std::map<std::string, HippoGridInfo*>::const_iterator it; |
631 | it = mGridInfo.find(grid); | 644 | it = mGridInfo.find(grid); |
@@ -648,7 +661,7 @@ HippoGridInfo* HippoGridManager::getConnectedGrid() const | |||
648 | 661 | ||
649 | HippoGridInfo* HippoGridManager::getCurrentGrid() const | 662 | HippoGridInfo* HippoGridManager::getCurrentGrid() const |
650 | { | 663 | { |
651 | HippoGridInfo *grid = getGrid(mCurrentGrid); | 664 | HippoGridInfo* grid = getGrid(mCurrentGrid); |
652 | if (grid) | 665 | if (grid) |
653 | { | 666 | { |
654 | return grid; | 667 | return grid; |
@@ -679,10 +692,10 @@ void HippoGridManager::setCurrentGridAsConnected() | |||
679 | } | 692 | } |
680 | 693 | ||
681 | 694 | ||
682 | void HippoGridManager::addGrid(HippoGridInfo *grid) | 695 | void HippoGridManager::addGrid(HippoGridInfo* grid) |
683 | { | 696 | { |
684 | if (!grid) return; | 697 | if (!grid) return; |
685 | const std::string &nick = grid->getGridNick(); | 698 | const std::string& nick = grid->getGridNick(); |
686 | if (nick == "") | 699 | if (nick == "") |
687 | { | 700 | { |
688 | llwarns << "Ignoring to try adding grid with empty nick." << llendl; | 701 | llwarns << "Ignoring to try adding grid with empty nick." << llendl; |
@@ -699,7 +712,7 @@ void HippoGridManager::addGrid(HippoGridInfo *grid) | |||
699 | } | 712 | } |
700 | 713 | ||
701 | 714 | ||
702 | void HippoGridManager::deleteGrid(const std::string &grid) | 715 | void HippoGridManager::deleteGrid(const std::string& grid) |
703 | { | 716 | { |
704 | GridIterator it = mGridInfo.find(grid); | 717 | GridIterator it = mGridInfo.find(grid); |
705 | if (it == mGridInfo.end()) { | 718 | if (it == mGridInfo.end()) { |
@@ -710,13 +723,13 @@ void HippoGridManager::deleteGrid(const std::string &grid) | |||
710 | llinfos << "Number of grids now: " << mGridInfo.size() << llendl; | 723 | llinfos << "Number of grids now: " << mGridInfo.size() << llendl; |
711 | if (mGridInfo.empty()) llinfos << "Grid info map is empty." << llendl; | 724 | if (mGridInfo.empty()) llinfos << "Grid info map is empty." << llendl; |
712 | if (grid == mDefaultGrid) | 725 | if (grid == mDefaultGrid) |
713 | setDefaultGrid(""); // sets first grid, if map not empty | 726 | setDefaultGrid(LLStringUtil::null); // sets first grid, if map not empty |
714 | if (grid == mCurrentGrid) | 727 | if (grid == mCurrentGrid) |
715 | mCurrentGrid = mDefaultGrid; | 728 | mCurrentGrid = mDefaultGrid; |
716 | } | 729 | } |
717 | 730 | ||
718 | 731 | ||
719 | void HippoGridManager::setDefaultGrid(const std::string &grid) | 732 | void HippoGridManager::setDefaultGrid(const std::string& grid) |
720 | { | 733 | { |
721 | GridIterator it = mGridInfo.find(grid); | 734 | GridIterator it = mGridInfo.find(grid); |
722 | if (it != mGridInfo.end()) | 735 | if (it != mGridInfo.end()) |
@@ -738,7 +751,7 @@ void HippoGridManager::setDefaultGrid(const std::string &grid) | |||
738 | } | 751 | } |
739 | 752 | ||
740 | 753 | ||
741 | void HippoGridManager::setCurrentGrid(const std::string &grid) | 754 | void HippoGridManager::setCurrentGrid(const std::string& grid) |
742 | { | 755 | { |
743 | GridIterator it = mGridInfo.find(grid); | 756 | GridIterator it = mGridInfo.find(grid); |
744 | if (it != mGridInfo.end()) | 757 | if (it != mGridInfo.end()) |
@@ -774,7 +787,7 @@ void HippoGridManager::loadFromFile() | |||
774 | } | 787 | } |
775 | 788 | ||
776 | 789 | ||
777 | void HippoGridManager::parseUrl(const char *url, bool mergeIfNewer) | 790 | void HippoGridManager::parseUrl(const char* url, bool mergeIfNewer) |
778 | { | 791 | { |
779 | llinfos << "Loading grid info from '" << url << "'." << llendl; | 792 | llinfos << "Loading grid info from '" << url << "'." << llendl; |
780 | 793 | ||
@@ -796,7 +809,7 @@ void HippoGridManager::parseUrl(const char *url, bool mergeIfNewer) | |||
796 | parseData(gridInfo, mergeIfNewer); | 809 | parseData(gridInfo, mergeIfNewer); |
797 | } | 810 | } |
798 | 811 | ||
799 | void HippoGridManager::parseFile(const std::string &fileName, bool mergeIfNewer) | 812 | void HippoGridManager::parseFile(const std::string& fileName, bool mergeIfNewer) |
800 | { | 813 | { |
801 | llifstream infile; | 814 | llifstream infile; |
802 | infile.open(fileName.c_str()); | 815 | infile.open(fileName.c_str()); |
@@ -853,7 +866,7 @@ void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer) | |||
853 | else if (gridMap.has("gridnick") && gridMap.has("loginuri")) | 866 | else if (gridMap.has("gridnick") && gridMap.has("loginuri")) |
854 | { | 867 | { |
855 | std::string gridnick = gridMap["gridnick"]; | 868 | std::string gridnick = gridMap["gridnick"]; |
856 | HippoGridInfo *grid; | 869 | HippoGridInfo* grid; |
857 | GridIterator it = mGridInfo.find(gridnick); | 870 | GridIterator it = mGridInfo.find(gridnick); |
858 | bool newGrid = (it == mGridInfo.end()); | 871 | bool newGrid = (it == mGridInfo.end()); |
859 | if (newGrid) | 872 | if (newGrid) |
@@ -900,7 +913,7 @@ void HippoGridManager::saveFile() | |||
900 | GridIterator it, end = mGridInfo.end(); | 913 | GridIterator it, end = mGridInfo.end(); |
901 | for (it = mGridInfo.begin(); it != end; ++it, i++) | 914 | for (it = mGridInfo.begin(); it != end; ++it, i++) |
902 | { | 915 | { |
903 | HippoGridInfo *grid = it->second; | 916 | HippoGridInfo* grid = it->second; |
904 | gridInfo[i]["gridnick"] = grid->getGridNick(); | 917 | gridInfo[i]["gridnick"] = grid->getGridNick(); |
905 | gridInfo[i]["platform"] = HippoGridInfo::getPlatformString(grid->getPlatform()); | 918 | gridInfo[i]["platform"] = HippoGridInfo::getPlatformString(grid->getPlatform()); |
906 | gridInfo[i]["gridname"] = grid->getGridName(); | 919 | gridInfo[i]["gridname"] = grid->getGridName(); |
diff --git a/linden/indra/newview/hippoGridManager.h b/linden/indra/newview/hippoGridManager.h index b304722..5ad6ca2 100644 --- a/linden/indra/newview/hippoGridManager.h +++ b/linden/indra/newview/hippoGridManager.h | |||
@@ -33,7 +33,7 @@ public: | |||
33 | SEARCH_ALL_TEMPLATE | 33 | SEARCH_ALL_TEMPLATE |
34 | }; | 34 | }; |
35 | 35 | ||
36 | explicit HippoGridInfo(const std::string &gridNick); | 36 | explicit HippoGridInfo(const std::string& gridNick); |
37 | 37 | ||
38 | Platform getPlatform(); | 38 | Platform getPlatform(); |
39 | bool isOpenSimulator() const; | 39 | bool isOpenSimulator() const; |
@@ -51,7 +51,7 @@ public: | |||
51 | const std::string& getFirstName() const; | 51 | const std::string& getFirstName() const; |
52 | const std::string& getLastName() const; | 52 | const std::string& getLastName() const; |
53 | const std::string& getAvatarPassword() const; | 53 | const std::string& getAvatarPassword() const; |
54 | const std::string &getVoiceConnector() const { return mVoiceConnector; } | 54 | const std::string& getVoiceConnector() const { return mVoiceConnector; } |
55 | std::string getSearchUrl(SearchType ty, bool is_web) const; | 55 | std::string getSearchUrl(SearchType ty, bool is_web) const; |
56 | bool isRenderCompat() const; | 56 | bool isRenderCompat() const; |
57 | int getMaxAgentGroups() const { return mMaxAgentGroups; } | 57 | int getMaxAgentGroups() const { return mMaxAgentGroups; } |
@@ -62,31 +62,31 @@ public: | |||
62 | std::string getGroupCreationFee() const; | 62 | std::string getGroupCreationFee() const; |
63 | std::string getDirectoryFee() const; | 63 | std::string getDirectoryFee() const; |
64 | 64 | ||
65 | void setPlatform (const std::string &platform); | 65 | void setPlatform (const std::string& platform); |
66 | void setPlatform (Platform platform); | 66 | void setPlatform (Platform platform); |
67 | void setGridName (const std::string &gridName); | 67 | void setGridName (const std::string& gridName); |
68 | void setLoginUri (const std::string &loginUri); | 68 | void setLoginUri (const std::string& loginUri); |
69 | void setLoginPage(const std::string &loginPage); | 69 | void setLoginPage(const std::string& loginPage); |
70 | void setHelperUri(const std::string &helperUri); | 70 | void setHelperUri(const std::string& helperUri); |
71 | void setWebSite (const std::string &website); | 71 | void setWebSite (const std::string& website); |
72 | void setSupportUrl(const std::string &url); | 72 | void setSupportUrl(const std::string& url); |
73 | void setRegisterUrl(const std::string &url); | 73 | void setRegisterUrl(const std::string& url); |
74 | void setPasswordUrl(const std::string &url); | 74 | void setPasswordUrl(const std::string& url); |
75 | void setSearchUrl(const std::string &url); | 75 | void setSearchUrl(const std::string& url); |
76 | void setRenderCompat(bool compat); | 76 | void setRenderCompat(bool compat); |
77 | void setMaxAgentGroups(int max) { mMaxAgentGroups = max; } | 77 | void setMaxAgentGroups(int max) { mMaxAgentGroups = max; } |
78 | void setFirstName(const std::string &firstName); | 78 | void setFirstName(const std::string& firstName); |
79 | void setLastName(const std::string &lastName); | 79 | void setLastName(const std::string& lastName); |
80 | void setAvatarPassword(const std::string &avatarPassword); | 80 | void setAvatarPassword(const std::string& avatarPassword); |
81 | void setVoiceConnector(const std::string &vc) { mVoiceConnector = vc; } | 81 | void setVoiceConnector(const std::string& vc) { mVoiceConnector = vc; } |
82 | 82 | ||
83 | void setCurrencySymbol(const std::string &sym); | 83 | void setCurrencySymbol(const std::string& sym); |
84 | void setRealCurrencySymbol(const std::string &sym); | 84 | void setRealCurrencySymbol(const std::string& sym); |
85 | void setDirectoryFee(int fee); | 85 | void setDirectoryFee(int fee); |
86 | 86 | ||
87 | bool retrieveGridInfo(); | 87 | bool retrieveGridInfo(); |
88 | 88 | ||
89 | static const char *getPlatformString(Platform platform); | 89 | static const char* getPlatformString(Platform platform); |
90 | static std::string sanitizeGridNick(std::string &gridnick); | 90 | static std::string sanitizeGridNick(std::string &gridnick); |
91 | 91 | ||
92 | static HippoGridInfo FALLBACK_GRIDINFO; | 92 | static HippoGridInfo FALLBACK_GRIDINFO; |
@@ -116,7 +116,8 @@ private: | |||
116 | int mDirectoryFee; | 116 | int mDirectoryFee; |
117 | 117 | ||
118 | // for parsing grid info XML | 118 | // for parsing grid info XML |
119 | enum XmlState { | 119 | enum XmlState |
120 | { | ||
120 | XML_VOID, XML_GRIDNICK, XML_PLATFORM, XML_GRIDNAME, | 121 | XML_VOID, XML_GRIDNICK, XML_PLATFORM, XML_GRIDNAME, |
121 | XML_LOGINURI, XML_LOGINPAGE, XML_HELPERURI, | 122 | XML_LOGINURI, XML_LOGINPAGE, XML_HELPERURI, |
122 | XML_WEBSITE, XML_SUPPORT, XML_REGISTER, XML_PASSWORD, XML_SEARCH | 123 | XML_WEBSITE, XML_SUPPORT, XML_REGISTER, XML_PASSWORD, XML_SEARCH |
@@ -126,9 +127,9 @@ private: | |||
126 | static std::string sanitizeUri(std::string &uri); | 127 | static std::string sanitizeUri(std::string &uri); |
127 | void formatFee(std::string &fee, int cost, bool showFree) const; | 128 | void formatFee(std::string &fee, int cost, bool showFree) const; |
128 | 129 | ||
129 | static void onXmlElementStart(void *userData, const XML_Char *name, const XML_Char **atts); | 130 | static void onXmlElementStart(void* userData, const XML_Char* name, const XML_Char** atts); |
130 | static void onXmlElementEnd(void *userData, const XML_Char *name); | 131 | static void onXmlElementEnd(void* userData, const XML_Char* name); |
131 | static void onXmlCharacterData(void *userData, const XML_Char *s, int len); | 132 | static void onXmlCharacterData(void* userData, const XML_Char* s, int len); |
132 | }; | 133 | }; |
133 | 134 | ||
134 | 135 | ||
@@ -142,18 +143,18 @@ public: | |||
142 | void saveFile(); | 143 | void saveFile(); |
143 | void discardAndReload(); | 144 | void discardAndReload(); |
144 | 145 | ||
145 | HippoGridInfo* getGrid(const std::string &grid) const; | 146 | HippoGridInfo* getGrid(const std::string& grid) const; |
146 | HippoGridInfo* getConnectedGrid() const; | 147 | HippoGridInfo* getConnectedGrid() const; |
147 | HippoGridInfo* getCurrentGrid() const; | 148 | HippoGridInfo* getCurrentGrid() const; |
148 | const std::string& getDefaultGridNick() const; | 149 | const std::string& getDefaultGridNick() const; |
149 | const std::string& getCurrentGridNick() const; | 150 | const std::string& getCurrentGridNick() const; |
150 | 151 | ||
151 | void setDefaultGrid(const std::string &grid); | 152 | void setDefaultGrid(const std::string& grid); |
152 | void setCurrentGrid(const std::string &grid); | 153 | void setCurrentGrid(const std::string& grid); |
153 | void setCurrentGridAsConnected(); | 154 | void setCurrentGridAsConnected(); |
154 | 155 | ||
155 | void addGrid(HippoGridInfo *grid); | 156 | void addGrid(HippoGridInfo* grid); |
156 | void deleteGrid(const std::string &grid); | 157 | void deleteGrid(const std::string& grid); |
157 | 158 | ||
158 | typedef std::map<std::string, HippoGridInfo*>::iterator GridIterator; | 159 | typedef std::map<std::string, HippoGridInfo*>::iterator GridIterator; |
159 | GridIterator beginGrid() { return mGridInfo.begin(); } | 160 | GridIterator beginGrid() { return mGridInfo.begin(); } |
@@ -163,18 +164,18 @@ private: | |||
163 | std::map<std::string, HippoGridInfo*> mGridInfo; | 164 | std::map<std::string, HippoGridInfo*> mGridInfo; |
164 | std::string mDefaultGrid; | 165 | std::string mDefaultGrid; |
165 | std::string mCurrentGrid; | 166 | std::string mCurrentGrid; |
166 | HippoGridInfo *mConnectedGrid; | 167 | HippoGridInfo* mConnectedGrid; |
167 | int mDefaultGridsVersion; | 168 | int mDefaultGridsVersion; |
168 | 169 | ||
169 | void cleanup(); | 170 | void cleanup(); |
170 | void loadFromFile(); | 171 | void loadFromFile(); |
171 | void parseFile(const std::string &fileName, bool mergeIfNewer); | 172 | void parseFile(const std::string& fileName, bool mergeIfNewer); |
172 | void parseUrl(const char *url, bool mergeIfNewer); | 173 | void parseUrl(const char* url, bool mergeIfNewer); |
173 | void parseData(LLSD &gridInfo, bool mergeIfNewer); | 174 | void parseData(LLSD &gridInfo, bool mergeIfNewer); |
174 | }; | 175 | }; |
175 | 176 | ||
176 | 177 | ||
177 | extern HippoGridManager *gHippoGridManager; | 178 | extern HippoGridManager* gHippoGridManager; |
178 | 179 | ||
179 | 180 | ||
180 | #endif | 181 | #endif |
diff --git a/linden/indra/newview/llfloaterhtmlhelp.cpp b/linden/indra/newview/llfloaterhtmlhelp.cpp index 5caf7b1..1777403 100644 --- a/linden/indra/newview/llfloaterhtmlhelp.cpp +++ b/linden/indra/newview/llfloaterhtmlhelp.cpp | |||
@@ -438,16 +438,22 @@ void LLFloaterHtmlHelp::show(std::string url, std::string title) | |||
438 | floater_html->setVisible(FALSE); | 438 | floater_html->setVisible(FALSE); |
439 | 439 | ||
440 | url = gHippoGridManager->getConnectedGrid()->getSupportUrl(); | 440 | url = gHippoGridManager->getConnectedGrid()->getSupportUrl(); |
441 | if (!url.empty()) { | 441 | if (!url.empty()) |
442 | if (gSavedSettings.getBOOL("UseExternalBrowser")) { | 442 | { |
443 | if (gSavedSettings.getBOOL("UseExternalBrowser")) | ||
444 | { | ||
443 | LLSD payload; | 445 | LLSD payload; |
444 | payload["url"] = url; | 446 | payload["url"] = url; |
445 | LLNotifications::instance().add("ClickOpenF1Help", LLSD(), payload, onClickF1HelpLoadURL); | 447 | LLNotifications::instance().add("ClickOpenF1Help", LLSD(), payload, onClickF1HelpLoadURL); |
446 | } else { | 448 | } |
449 | else | ||
450 | { | ||
447 | // don't wait, just do it | 451 | // don't wait, just do it |
448 | LLWeb::loadURL(url); | 452 | LLWeb::loadURLInternal(url); |
449 | } | 453 | } |
450 | } else { | 454 | } |
455 | else | ||
456 | { | ||
451 | LLNotifications::instance().add("NoSupportUrl"); | 457 | LLNotifications::instance().add("NoSupportUrl"); |
452 | } | 458 | } |
453 | } | 459 | } |
@@ -458,10 +464,13 @@ bool LLFloaterHtmlHelp::onClickF1HelpLoadURL(const LLSD& notification, const LLS | |||
458 | S32 option = LLNotification::getSelectedOption(notification, response); | 464 | S32 option = LLNotification::getSelectedOption(notification, response); |
459 | if (option == 0) | 465 | if (option == 0) |
460 | { | 466 | { |
461 | const std::string &url = notification["payload"]["url"].asString(); | 467 | const std::string& url = notification["payload"]["url"].asString(); |
462 | if (!url.empty()) { | 468 | if (!url.empty()) |
463 | LLWeb::loadURL(url); | 469 | { |
464 | } else { | 470 | LLWeb::loadURLExternal(url); |
471 | } | ||
472 | else | ||
473 | { | ||
465 | llwarns << "Support URL not available." << llendl; | 474 | llwarns << "Support URL not available." << llendl; |
466 | } | 475 | } |
467 | } | 476 | } |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index ac81b9c..baa19e7 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -3053,7 +3053,7 @@ bool login_alert_status(const LLSD& notification, const LLSD& response) | |||
3053 | break; | 3053 | break; |
3054 | case 1: { // Help | 3054 | case 1: { // Help |
3055 | const std::string &url = gHippoGridManager->getConnectedGrid()->getSupportUrl(); | 3055 | const std::string &url = gHippoGridManager->getConnectedGrid()->getSupportUrl(); |
3056 | if (!url.empty()) LLWeb::loadURL(url); | 3056 | if (!url.empty()) LLWeb::loadURLInternal(url); |
3057 | break; | 3057 | break; |
3058 | } | 3058 | } |
3059 | case 2: // Teleport | 3059 | case 2: // Teleport |
diff --git a/linden/indra/newview/llweb.cpp b/linden/indra/newview/llweb.cpp index 6425156..fb4b063 100644 --- a/linden/indra/newview/llweb.cpp +++ b/linden/indra/newview/llweb.cpp | |||
@@ -55,7 +55,7 @@ void LLWeb::loadURL(const std::string& url) | |||
55 | } | 55 | } |
56 | else | 56 | else |
57 | { | 57 | { |
58 | LLFloaterMediaBrowser::showInstance(url); | 58 | LLFloaterMediaBrowser::getInstance()->openMedia(url); |
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
@@ -71,7 +71,7 @@ void LLWeb::loadURLExternal(const std::string& url) | |||
71 | // static | 71 | // static |
72 | void LLWeb::loadURLInternal(const std::string& url) | 72 | void LLWeb::loadURLInternal(const std::string& url) |
73 | { | 73 | { |
74 | LLFloaterMediaBrowser::showInstance(url); | 74 | LLFloaterMediaBrowser::getInstance()->openMedia(url); |
75 | } | 75 | } |
76 | 76 | ||
77 | 77 | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_login.xml b/linden/indra/newview/skins/default/xui/en-us/menu_login.xml index f1a8a54..454774e 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_login.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_login.xml | |||
@@ -21,8 +21,8 @@ | |||
21 | <menu bottom="219" create_jump_keys="true" drop_shadow="true" enabled="true" | 21 | <menu bottom="219" create_jump_keys="true" drop_shadow="true" enabled="true" |
22 | height="317" label="Help" left="80" mouse_opaque="false" name="Help" | 22 | height="317" label="Help" left="80" mouse_opaque="false" name="Help" |
23 | opaque="true" tear_off="false" width="166"> | 23 | opaque="true" tear_off="false" width="166"> |
24 | <menu_item_call bottom="-29" enabled="true" height="19" label="Viewer Help" left="0" | 24 | <menu_item_call bottom="-29" enabled="true" height="19" label="Grid Help" left="0" |
25 | mouse_opaque="true" name="Viewer Help" shortcut="F1" width="166"> | 25 | mouse_opaque="true" name="Grid Help" shortcut="F1" width="166"> |
26 | <on_click function="ShowFloater" userdata="help f1" /> | 26 | <on_click function="ShowFloater" userdata="help f1" /> |
27 | </menu_item_call> | 27 | </menu_item_call> |
28 | <menu_item_call bottom="-48" enabled="true" height="19" label="About Imprudence" left="0" | 28 | <menu_item_call bottom="-48" enabled="true" height="19" label="About Imprudence" left="0" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index c969d3a..a02d033 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | |||
@@ -799,7 +799,7 @@ | |||
799 | 799 | ||
800 | <menu name="Help" create_jump_keys="true" label="Help" | 800 | <menu name="Help" create_jump_keys="true" label="Help" |
801 | opaque="true" tear_off="true"> | 801 | opaque="true" tear_off="true"> |
802 | <menu_item_call name="Viewer Help" label="Viewer Help" | 802 | <menu_item_call name="Grid Help" label="Grid Help" |
803 | shortcut="F1"> | 803 | shortcut="F1"> |
804 | <on_click function="ShowFloater" userdata="help f1" /> | 804 | <on_click function="ShowFloater" userdata="help f1" /> |
805 | </menu_item_call> | 805 | </menu_item_call> |