diff options
author | Muhammet Kara <muhammet.kara@pardus.org.tr> | 2017-08-25 15:57:30 +0300 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-09-07 11:24:52 +0200 |
commit | b9c55dcd7485ab36f0187abf5265321ba832d117 (patch) | |
tree | daafb3dfcadce7321c88a586d9638570d47ee620 /cui | |
parent | 6c8c51231e7415ecc20d1343211acf8382666613 (diff) |
Don't use PostUserEvent to show message box in Customize dialog
Otherwise, it causes (I think) some clean-up issues, and causes
the menu bar not to be refreshed on delete of a custom menu after
trying to add an already existing command to the custom menu,
and getting the warning message box. And clicking the non-existent
menu causes the whole application to crash because of the dangling
reference, I think. The exact error message on crash was an "out of
range" error of a vector."
And we don't need the D&D stuff any more. (At least for now.)
Change-Id: I74b8b414e28349065b7408e21e07245fc40f2c75
Reviewed-on: https://gerrit.libreoffice.org/41930
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfg.cxx | 14 | ||||
-rw-r--r-- | cui/source/inc/cfg.hxx | 1 |
2 files changed, 3 insertions, 12 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index f7c6d6ce0774..195517218184 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1658,9 +1658,9 @@ SvTreeListEntry* SvxConfigPage::AddFunction( if ( pCurEntry->GetCommand() == pNewEntryData->GetCommand() ) { - // asynchronous error message, because of MsgBoxes - PostUserEvent( - LINK( this, SvxConfigPage, AsyncInfoMsg ), nullptr, true ); + ScopedVclPtrInstance<MessageDialog>(this, + CuiResId( RID_SVXSTR_MNUCFG_ALREADY_INCLUDED ), + VclMessageType::Info)->Execute(); delete pNewEntryData; return nullptr; } @@ -1771,14 +1771,6 @@ SvTreeListEntry* SvxConfigPage::InsertEntryIntoUI( return pNewEntry; } -IMPL_LINK_NOARG( SvxConfigPage, AsyncInfoMsg, void*, void ) -{ - // Asynchronous msg because of D&D - ScopedVclPtrInstance<MessageDialog>(this, - CuiResId( RID_SVXSTR_MNUCFG_ALREADY_INCLUDED ), - VclMessageType::Info)->Execute(); -} - IMPL_LINK( SvxConfigPage, MoveHdl, Button *, pButton, void ) { MoveEntry(pButton == m_pMoveUpButton); diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index dda5a5fe44bc..239860943a7b 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -380,7 +380,6 @@ private: SaveInData* pCurrentSaveInData; DECL_LINK( SelectSaveInLocation, ListBox&, void ); - DECL_LINK( AsyncInfoMsg, void*, void ); DECL_LINK( SearchUpdateHdl, Edit&, void ); protected: |