aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/hippoGridManager.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-06-16 00:18:36 -0700
committerMcCabe Maxsted2010-07-03 15:20:05 -0700
commitb08845f2adc0590ec3616fc16ea35efc26f0d700 (patch)
treee45a91ab4085bcb529e865677053a54210f659df /linden/indra/newview/hippoGridManager.cpp
parentMade the login panel screen labels sentence-case (diff)
downloadmeta-impy-b08845f2adc0590ec3616fc16ea35efc26f0d700.zip
meta-impy-b08845f2adc0590ec3616fc16ea35efc26f0d700.tar.gz
meta-impy-b08845f2adc0590ec3616fc16ea35efc26f0d700.tar.bz2
meta-impy-b08845f2adc0590ec3616fc16ea35efc26f0d700.tar.xz
Updated hippo grid manager to include groups and voice info
Diffstat (limited to 'linden/indra/newview/hippoGridManager.cpp')
-rw-r--r--linden/indra/newview/hippoGridManager.cpp46
1 files changed, 26 insertions, 20 deletions
diff --git a/linden/indra/newview/hippoGridManager.cpp b/linden/indra/newview/hippoGridManager.cpp
index 10d115a..0160233 100644
--- a/linden/indra/newview/hippoGridManager.cpp
+++ b/linden/indra/newview/hippoGridManager.cpp
@@ -40,11 +40,14 @@ HippoGridInfo HippoGridInfo::FALLBACK_GRIDINFO("");
40// Initialize 40// Initialize
41 41
42HippoGridInfo::HippoGridInfo(const std::string &gridNick) : 42HippoGridInfo::HippoGridInfo(const std::string &gridNick) :
43 mPlatform(PLATFORM_OTHER), 43 mPlatform(PLATFORM_OTHER),
44 mRenderCompat(true), 44 mGridNick(gridNick),
45 mCurrencySymbol("OS$"), 45 mVoiceConnector("SLVoice"),
46 mRealCurrencySymbol("US$"), 46 mRenderCompat(true),
47 mDirectoryFee(30) 47 mMaxAgentGroups(-1),
48 mCurrencySymbol("OS$"),
49 mRealCurrencySymbol("US$"),
50 mDirectoryFee(30)
48{ 51{
49 std::string nick = gridNick; 52 std::string nick = gridNick;
50 mGridNick = sanitizeGridNick( nick ); 53 mGridNick = sanitizeGridNick( nick );
@@ -432,33 +435,36 @@ bool HippoGridInfo::retrieveGridInfo()
432 435
433std::string HippoGridInfo::getUploadFee() const 436std::string HippoGridInfo::getUploadFee() const
434{ 437{
435 std::string fee; 438 std::string fee;
436 formatFee(fee, LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(), true); 439 formatFee(fee, LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(), true);
437 return fee; 440 return fee;
438} 441}
439 442
440std::string HippoGridInfo::getGroupCreationFee() const 443std::string HippoGridInfo::getGroupCreationFee() const
441{ 444{
442 std::string fee; 445 std::string fee;
443 formatFee(fee, LLGlobalEconomy::Singleton::getInstance()->getPriceGroupCreate(), false); 446 formatFee(fee, LLGlobalEconomy::Singleton::getInstance()->getPriceGroupCreate(), false);
444 return fee; 447 return fee;
445} 448}
446 449
447std::string HippoGridInfo::getDirectoryFee() const 450std::string HippoGridInfo::getDirectoryFee() const
448{ 451{
449 std::string fee; 452 std::string fee;
450 formatFee(fee, mDirectoryFee, true); 453 formatFee(fee, mDirectoryFee, true);
451 if (fee != LLTrans::getString("hippo_label_free")) fee += "/" + LLTrans::getString("hippo_label_week"); 454 if (fee != LLTrans::getString("hippo_label_free")) fee += "/" + LLTrans::getString("hippo_label_week");
452 return fee; 455 return fee;
453} 456}
454 457
455void HippoGridInfo::formatFee(std::string &fee, int cost, bool showFree) const 458void HippoGridInfo::formatFee(std::string &fee, int cost, bool showFree) const
456{ 459{
457 if (showFree && (cost == 0)) { 460 if (showFree && (cost == 0))
458 fee = LLTrans::getString("hippo_label_free"); 461 {
459 } else { 462 fee = LLTrans::getString("hippo_label_free");
460 fee = llformat("%s%d", getCurrencySymbol().c_str(), cost); 463 }
461 } 464 else
465 {
466 fee = llformat("%s%d", getCurrencySymbol().c_str(), cost);
467 }
462} 468}
463 469
464 470
@@ -584,7 +590,7 @@ HippoGridInfo* HippoGridManager::getGrid(const std::string &grid) const
584 return it->second; 590 return it->second;
585 } else { 591 } else {
586 return 0; 592 return 0;
587 } 593 }
588} 594}
589 595
590 596