summaryrefslogtreecommitdiff
path: root/vcl/source/control/edit.cxx
diff options
context:
space:
mode:
authorChristian Dywan <christian.dywan@lanedo.com>2011-04-21 15:14:32 +0200
committerMichael Meeks <michael.meeks@novell.com>2011-04-28 10:59:58 +0100
commit129ac65d77c1c626c7bf2ce18a680fadc1cc8e3f (patch)
tree64bce63ce94b0c510da16a8ecc1d2b39a10d1f0e /vcl/source/control/edit.cxx
parentcfafcbc87caa2e463278484b3d298a97dcd92615 (diff)
Introduce HideDisabledMenuItems style setting
The STYLE_OPTION_HIDEDISABLED flag is removed. The setting is enabled for KDE and OSX.
Diffstat (limited to 'vcl/source/control/edit.cxx')
-rw-r--r--vcl/source/control/edit.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index a28c43346720..b8c0bacf105f 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2094,9 +2094,6 @@ void Edit::Command( const CommandEvent& rCEvt )
if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
{
PopupMenu* pPopup = Edit::CreatePopupMenu();
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if ( rStyleSettings.GetOptions() & STYLE_OPTION_HIDEDISABLED )
- pPopup->SetMenuFlags( MENU_FLAG_HIDEDISABLEDENTRIES );
if ( !maSelection.Len() )
{
@@ -2934,6 +2931,10 @@ PopupMenu* Edit::CreatePopupMenu()
PopupMenu* pPopup = new PopupMenu( ResId( SV_RESID_MENU_EDIT, *pResMgr ) );
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+ if ( rStyleSettings.GetHideDisabledMenuItems() )
+ pPopup->SetMenuFlags( MENU_FLAG_HIDEDISABLEDENTRIES );
+ else
+ pPopup->SetMenuFlags ( MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES );
if ( rStyleSettings.GetAcceleratorsInContextMenus() )
{
pPopup->SetAccelKey( SV_MENU_EDIT_UNDO, KeyCode( KEYFUNC_UNDO ) );