diff options
Diffstat (limited to 'sfx2/source/sidebar/SidebarController.cxx')
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 5f1b6acc85ba..d831cee05977 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -19,6 +19,7 @@ #include "Deck.hxx" #include "DeckTitleBar.hxx" #include "Panel.hxx" +#include "PanelTitleBar.hxx" #include "SidebarPanel.hxx" #include "SidebarResource.hxx" #include "TabBar.hxx" @@ -578,11 +579,15 @@ void SidebarController::SwitchToDeck ( } if (aNewPanels[nWriteIndex] != NULL) { - // Depending on the context we have to apply the show menu functor. - aNewPanels[nWriteIndex]->SetShowMenuFunctor( - rPanelContexDescriptor.msMenuCommand.getLength()>0 - ? ::boost::bind(&SidebarController::ShowDetailMenu,this,rPanelContexDescriptor.msMenuCommand) - : ::boost::function<void(void)>() ); + // Depending on the context we have to change the command + // for the "more options" dialog. + PanelTitleBar* pTitleBar = aNewPanels[nWriteIndex]->GetTitleBar(); + if (pTitleBar != NULL) + { + pTitleBar->SetMoreOptionsCommand( + rPanelContexDescriptor.msMenuCommand, + mxFrame); + } ++nWriteIndex; } |