From ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 30 Apr 2009 13:04:20 -0500 Subject: Second Life viewer sources 1.23.0-RC --- linden/indra/llui/llmenugl.cpp | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'linden/indra/llui/llmenugl.cpp') diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp index 907777d..f2f2aae 100644 --- a/linden/indra/llui/llmenugl.cpp +++ b/linden/indra/llui/llmenugl.cpp @@ -17,7 +17,8 @@ * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -58,6 +59,8 @@ #include "llresmgr.h" #include "llui.h" +#include "lluitrans.h" + #include "llstl.h" #include "v2math.h" @@ -139,7 +142,7 @@ LLMenuItemGL::LLMenuItemGL( const std::string& name, const std::string& label, K mHighlight( FALSE ), mGotHover( FALSE ), mBriefItem( FALSE ), - mFont( LLFontGL::sSansSerif ), + mFont( LLFontGL::getFontSansSerif() ), mStyle(LLFontGL::NORMAL), mDrawTextDisabled( FALSE ) { @@ -266,24 +269,24 @@ void LLMenuItemGL::appendAcceleratorString( std::string& st ) const { if ( mAcceleratorMask & MASK_MAC_CONTROL ) { - st.append( "Ctrl-" ); + st.append( LLUITrans::getString("accel-mac-control") ); } else { - st.append( "Cmd-" ); // Symbol would be "\xE2\x8C\x98" + st.append( LLUITrans::getString("accel-mac-command") ); // Symbol would be "\xE2\x8C\x98" } } if( mAcceleratorMask & MASK_ALT ) - st.append( "Opt-" ); // Symbol would be "\xE2\x8C\xA5" + st.append( LLUITrans::getString("accel-mac-option") ); // Symbol would be "\xE2\x8C\xA5" if( mAcceleratorMask & MASK_SHIFT ) - st.append( "Shift-" ); // Symbol would be "\xE2\x8C\xA7" + st.append( LLUITrans::getString("accel-mac-shift") ); // Symbol would be "\xE2\x8C\xA7" #else if( mAcceleratorMask & MASK_CONTROL ) - st.append( "Ctrl-" ); + st.append( LLUITrans::getString("accel-win-control") ); if( mAcceleratorMask & MASK_ALT ) - st.append( "Alt-" ); + st.append( LLUITrans::getString("accel-win-alt") ); if( mAcceleratorMask & MASK_SHIFT ) - st.append( "Shift-" ); + st.append( LLUITrans::getString("accel-win-shift") ); #endif std::string keystr = LLKeyboard::stringFromKey( mAcceleratorKey ); @@ -2165,8 +2168,8 @@ void LLMenuGL::arrange( void ) U32 max_width = getTornOff() ? U32_MAX : menu_region_rect.getWidth(); U32 max_height = getTornOff() ? U32_MAX : menu_region_rect.getHeight(); // *FIX: create the item first and then ask for its dimensions? - S32 spillover_item_width = PLAIN_PAD_PIXELS + LLFontGL::sSansSerif->getWidth( std::string("More") ); - S32 spillover_item_height = llround(LLFontGL::sSansSerif->getLineHeight()) + MENU_ITEM_PADDING; + S32 spillover_item_width = PLAIN_PAD_PIXELS + LLFontGL::getFontSansSerif()->getWidth( std::string("More") ); + S32 spillover_item_height = llround(LLFontGL::getFontSansSerif()->getLineHeight()) + MENU_ITEM_PADDING; if (mHorizontalLayout) { @@ -3492,7 +3495,7 @@ void LLPieMenu::drawBackground(LLMenuItemGL* itemp, LLColor4& color) BOOL LLPieMenu::append(LLMenuItemGL *item) { item->setBriefItem(TRUE); - item->setFont( LLFontGL::sSansSerifSmall ); + item->setFont( LLFontGL::getFontSansSerifSmall() ); return LLMenuGL::append(item); } @@ -3500,7 +3503,7 @@ BOOL LLPieMenu::append(LLMenuItemGL *item) BOOL LLPieMenu::appendSeparator(const std::string &separator_name) { LLMenuItemGL* separator = new LLMenuItemBlankGL(); - separator->setFont( LLFontGL::sSansSerifSmall ); + separator->setFont( LLFontGL::getFontSansSerifSmall() ); return append( separator ); } @@ -3514,7 +3517,7 @@ BOOL LLPieMenu::appendPieMenu(LLPieMenu *menu) LLPieMenuBranch *item; item = new LLPieMenuBranch(menu->getName(), menu->getLabel(), menu); getParent()->addChild(item->getBranch()); - item->setFont( LLFontGL::sSansSerifSmall ); + item->setFont( LLFontGL::getFontSansSerifSmall() ); return append( item ); } -- cgit v1.1