sfx2/source/dialog/backingwindow.cxx | 20 ++++++++++++++++++++ sfx2/source/dialog/backingwindow.hxx | 2 ++ 2 files changed, 22 insertions(+)
New commits: commit a54559c7b7982dcdd8c4a0792d067cf7a2d6fbb4 Author: Akshay Deep <[email protected]> Date: Fri Jun 17 13:41:00 2016 +0530 tdf#75369 Start Center: Non-installed applications aren't greyed out Reviewed-on: https://gerrit.libreoffice.org/26406 Reviewed-by: Samuel Mehrbrodt <[email protected]> Tested-by: Samuel Mehrbrodt <[email protected]> (cherry picked from commit 80cb33570557010547a08b5b1cd6bc0c1ee018fc) Change-Id: I52de5d7062bebe816e90ba39f559cd57dfc1067c diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index e780edfb217a..a8b42531a43f 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -25,6 +25,7 @@ #include <vcl/virdev.hxx> #include <unotools/dynamicmenuoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <svtools/openfiledroptargetlistener.hxx> #include <svtools/colorcfg.hxx> #include <svtools/langhelp.hxx> @@ -303,6 +304,8 @@ void BackingWindow::initControls() setupButton( mpImpressAllButton ); setupButton( mpMathAllButton ); + checkInstalledModules(); + mpExtensionsButton->SetClickHdl(LINK(this, BackingWindow, ExtLinkClickHdl)); // setup nice colors @@ -381,6 +384,23 @@ void BackingWindow::setupButton( MenuButton* pButton ) pButton->SetSelectHdl(LINK(this, BackingWindow, MenuSelectHdl)); } +void BackingWindow::checkInstalledModules() +{ + SvtModuleOptions aModuleOpt; + + mpWriterAllButton->Enable( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::WRITER )); + + mpCalcAllButton->Enable( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::CALC ) ); + + mpImpressAllButton->Enable( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::IMPRESS ) ); + + mpDrawAllButton->Enable( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::DRAW ) ); + + mpMathAllButton->Enable(aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::MATH )); + + mpDBAllButton->Enable(aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::DATABASE )); +} + void BackingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) { Resize(); diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index 90b385b5dcfb..0e2d5a113ab5 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -116,6 +116,8 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer void initializeLocalView(); + void checkInstalledModules(); + public: explicit BackingWindow(vcl::Window* pParent); virtual ~BackingWindow(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
