summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/menu.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index e49ff60f5ec4..e5acc2eca589 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -3240,16 +3240,24 @@ ImplMenuDelData::~ImplMenuDelData()
namespace vcl { namespace MenuInvalidator {
static VclEventListeners2* pMenuInvalidateListeners = NULL;
- VclEventListeners2* GetMenuInvalidateListeners()
+ void AddMenuInvalidateListener(const Link<>& rLink)
{
if(!pMenuInvalidateListeners)
pMenuInvalidateListeners = new VclEventListeners2();
- return pMenuInvalidateListeners;
+ pMenuInvalidateListeners->addListener(rLink);
+ }
+ void CallMenuInvalidateListeners(VclSimpleEvent* pEvent)
+ {
+ if(pMenuInvalidateListeners)
+ pMenuInvalidateListeners->callListeners(pEvent);
}
void Invalidated()
{
- VclSimpleEvent aEvent(0);
- GetMenuInvalidateListeners()->callListeners(&aEvent);
+ if(pMenuInvalidateListeners)
+ {
+ VclSimpleEvent aEvent(0);
+ pMenuInvalidateListeners->callListeners(&aEvent);
+ }
};
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */