sfx2/source/dialog/backingwindow.cxx | 20 ++++++++++++++++++++ sfx2/source/dialog/backingwindow.hxx | 2 ++ 2 files changed, 22 insertions(+)
New commits: commit 80cb33570557010547a08b5b1cd6bc0c1ee018fc Author: Akshay Deep <akshaydeepi...@gmail.com> Date: Fri Jun 17 13:41:00 2016 +0530 tdf#75369 Start Center: Non-installed applications aren't greyed out Change-Id: I52de5d7062bebe816e90ba39f559cd57dfc1067c Reviewed-on: https://gerrit.libreoffice.org/26406 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 730627c..9c054d5 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -26,6 +26,7 @@ #include <unotools/dynamicmenuoptions.hxx> #include <unotools/historyoptions.hxx> +#include <unotools/moduleoptions.hxx> #include <svtools/openfiledroptargetlistener.hxx> #include <svtools/colorcfg.hxx> #include <svtools/langhelp.hxx> @@ -280,6 +281,8 @@ void BackingWindow::initControls() setupButton( mpImpressAllButton ); setupButton( mpMathAllButton ); + checkInstalledModules(); + mpExtensionsButton->SetClickHdl(LINK(this, BackingWindow, ExtLinkClickHdl)); // setup nice colors @@ -358,6 +361,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 cfaf984..4c80c9f 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -111,6 +111,8 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer void initializeLocalView(); + void checkInstalledModules(); + public: explicit BackingWindow(vcl::Window* pParent); virtual ~BackingWindow(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits