diff options
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1d58daba2c..5598a589cc 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -86,6 +86,7 @@ #include "lltoolmgr.h" #include "lltoolpie.h" #include "lltoolselectland.h" +#include "lltrans.h" #include "llviewergenericmessage.h" #include "llviewerhelp.h" #include "llviewermenufile.h" // init_menu_file() @@ -435,7 +436,8 @@ void init_menus() gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT)); gMenuBarView->setBackgroundColor( color ); - gMenuHolder->addChild(gMenuBarView); + LLView* menu_bar_holder = gViewerWindow->getRootView()->getChildView("menu_bar_holder"); + menu_bar_holder->addChild(gMenuBarView); gViewerWindow->setMenuBackgroundColor(false, LLViewerLogin::getInstance()->isInProductionGrid()); @@ -470,9 +472,10 @@ void init_menus() gLoginMenuBarView = LLUICtrlFactory::getInstance()->createFromFile<LLMenuBarGL>("menu_login.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); gLoginMenuBarView->arrangeAndClear(); LLRect menuBarRect = gLoginMenuBarView->getRect(); - gLoginMenuBarView->setRect(LLRect(menuBarRect.mLeft, menuBarRect.mTop, gViewerWindow->getRootView()->getRect().getWidth() - menuBarRect.mLeft, menuBarRect.mBottom)); + menuBarRect.setLeftTopAndSize(0, menu_bar_holder->getRect().getHeight(), menuBarRect.getWidth(), menuBarRect.getHeight()); + gLoginMenuBarView->setRect(menuBarRect); gLoginMenuBarView->setBackgroundColor( color ); - gMenuHolder->addChild(gLoginMenuBarView); + menu_bar_holder->addChild(gLoginMenuBarView); // tooltips are on top of EVERYTHING, including menus gViewerWindow->getRootView()->sendChildToFront(gToolTipView); @@ -3273,7 +3276,9 @@ void handle_buy_object(LLSaleInfo sale_info) if (price > 0 && price > gStatusBar->getBalance()) { - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("this_object_costs"), price); + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", price); + LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("this_object_costs", args), price); return; } @@ -4403,8 +4408,10 @@ void handle_buy_or_take() } else { + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", total_price); LLFloaterBuyCurrency::buyCurrency( - "Buying this costs", total_price); + LLTrans::getString("BuyingCosts", args), total_price); } } else @@ -7047,7 +7054,7 @@ LLVOAvatar* find_avatar_from_object( const LLUUID& object_id ) void handle_disconnect_viewer(void *) { - LLAppViewer::instance()->forceDisconnect("Testing viewer disconnect"); + LLAppViewer::instance()->forceDisconnect(LLTrans::getString("TestingDisconnect")); } void force_error_breakpoint(void *) |