diff options
author | Jan Holesovsky <kendy@suse.cz> | 2012-05-25 12:18:13 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-05-25 12:19:24 +0200 |
commit | 1bab1e998762bf4a11614b5b0bd074873b88424c (patch) | |
tree | f25a873f90067542fc20bc09e6445415a05ea300 /framework | |
parent | Removed documentation from type rdbs (diff) | |
download | core-1bab1e998762bf4a11614b5b0bd074873b88424c.tar.gz core-1bab1e998762bf4a11614b5b0bd074873b88424c.zip |
language status bar control: Don't set radio buttons for some entries.
There are entries in the popup menu that are not supposed to be radio buttons,
like More... ;-)
Change-Id: Ic7986a668522901a244d35eda7e9cfbe0133f37e
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/langselectionstatusbarcontroller.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 902b2bd90b8c..5e67bebe19d4 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -224,8 +224,11 @@ throw (::com::sun::star::uno::RuntimeException) } } xPopupMenu->insertItem( MID_LANG_SEL_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_NONE ); - xPopupMenu->insertItem( MID_LANG_SEL_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_RESET ); - xPopupMenu->insertItem( MID_LANG_SEL_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_MORE ); + if ( aLanguageTable.GetString( LANGUAGE_NONE ) == m_aCurLang ) + xPopupMenu->checkItem( MID_LANG_SEL_NONE, sal_True ); + + xPopupMenu->insertItem( MID_LANG_SEL_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), 0, MID_LANG_SEL_RESET ); + xPopupMenu->insertItem( MID_LANG_SEL_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), 0, MID_LANG_SEL_MORE ); // add entries to submenu ('set language for paragraph') nItemId = static_cast< sal_Int16 >(MID_LANG_PARA_1); @@ -238,18 +241,18 @@ throw (::com::sun::star::uno::RuntimeException) { DBG_ASSERT( MID_LANG_PARA_1 <= nItemId && nItemId <= MID_LANG_PARA_9, "nItemId outside of expected range!" ); - subPopupMenu->insertItem( nItemId, rStr, css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + subPopupMenu->insertItem( nItemId, rStr, 0, nItemId ); aLangMap[nItemId] = rStr; ++nItemId; } } - subPopupMenu->insertItem( MID_LANG_PARA_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_NONE ); - subPopupMenu->insertItem( MID_LANG_PARA_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_RESET ); - subPopupMenu->insertItem( MID_LANG_PARA_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_MORE ); + subPopupMenu->insertItem( MID_LANG_PARA_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), 0, MID_LANG_PARA_NONE ); + subPopupMenu->insertItem( MID_LANG_PARA_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), 0, MID_LANG_PARA_RESET ); + subPopupMenu->insertItem( MID_LANG_PARA_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), 0, MID_LANG_PARA_MORE ); // add last two entries to main menu xPopupMenu->insertSeparator( MID_LANG_PARA_SEPERATOR ); - xPopupMenu->insertItem( MID_LANG_PARA_STRING, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_STRING ); + xPopupMenu->insertItem( MID_LANG_PARA_STRING, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), 0, MID_LANG_PARA_STRING ); xPopupMenu->setPopupMenu( MID_LANG_PARA_STRING, subPopupMenu ); |