diff options
author | Akshay Deep <akshaydeepiitr@gmail.com> | 2016-06-17 13:41:00 +0530 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-06-17 10:38:45 +0000 |
commit | 80cb33570557010547a08b5b1cd6bc0c1ee018fc (patch) | |
tree | bc31f2c8c935bf12b0dae74931d2eb017dc29bb0 /sfx2 | |
parent | be4dd3954a57518168647c18af298ecda0fb2428 (diff) |
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.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 20 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.hxx | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 730627ca1733..9c054d56f633 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 cfaf984975fa..4c80c9f5ba31 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(); |