diff options
author | Olivier Hallot <olivier.hallot@edx.srv.br> | 2014-12-22 14:31:25 -0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-12-22 17:43:53 +0000 |
commit | 3c40bd24c538cb2e5fddae7176002d8a970bbc41 (patch) | |
tree | 0753717193e15057fda3e0e1739edd708fdd9781 /cui/source | |
parent | ed60d4b378b6a813dcf8997c9bd374ca2d1e4a69 (diff) |
Enhance OpenCL options UI dialog
1) HIG-ification of blacklist and whitelist, using frames
2) handle Use OpenCL checkbox to enable/disable OpenCL blacklist and whitelist changes
Change-Id: Iae132d09d2dd0436fa1aa2a64e902ee5aed7cf47
Reviewed-on: https://gerrit.libreoffice.org/13602
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/options/optopencl.cxx | 18 | ||||
-rw-r--r-- | cui/source/options/optopencl.hxx | 5 |
2 files changed, 23 insertions, 0 deletions
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx index 179edf85718f..f283f908072a 100644 --- a/cui/source/options/optopencl.cxx +++ b/cui/source/options/optopencl.cxx @@ -42,14 +42,18 @@ SvxOpenCLTabPage::SvxOpenCLTabPage(vcl::Window* pParent, const SfxItemSet& rSet) { get(mpUseOpenCL, "useopencl"); get(mpBlackList, "blacklist"); + get(mpBlackListFrame,"blacklistframe"); get(mpBlackListEdit, "bledit"); get(mpBlackListAdd, "bladd"); get(mpBlackListDelete, "bldelete"); get(mpWhiteList, "whitelist"); + get(mpWhiteListFrame,"whitelistframe"); get(mpWhiteListEdit, "wledit"); get(mpWhiteListAdd, "wladd"); get(mpWhiteListDelete, "wldelete"); + mpUseOpenCL->SetClickHdl(LINK(this, SvxOpenCLTabPage, EnableOpenCLHdl)); + mpBlackListEdit->SetClickHdl(LINK(this, SvxOpenCLTabPage, BlackListEditHdl)); mpBlackListAdd->SetClickHdl(LINK(this, SvxOpenCLTabPage, BlackListAddHdl)); mpBlackListDelete->SetClickHdl(LINK(this, SvxOpenCLTabPage, BlackListDeleteHdl)); @@ -60,6 +64,7 @@ SvxOpenCLTabPage::SvxOpenCLTabPage(vcl::Window* pParent, const SfxItemSet& rSet) mpBlackList->set_height_request(4 * mpBlackList->GetTextHeight()); mpWhiteList->set_height_request(4 * mpWhiteList->GetTextHeight()); + } SvxOpenCLTabPage::~SvxOpenCLTabPage() @@ -273,6 +278,10 @@ long SvxOpenCLTabPage::DeleteHdl(ListBox* pListBox, OpenCLConfig::ImplMatcherSet return 0; } +void SvxOpenCLTabPage::EnableOpenCLHdl(VclFrame* pFrame, bool aEnable) +{ + pFrame->Enable(aEnable); +} IMPL_LINK_NOARG(SvxOpenCLTabPage, BlackListEditHdl) { @@ -304,4 +313,13 @@ IMPL_LINK_NOARG(SvxOpenCLTabPage, WhiteListDeleteHdl) return DeleteHdl(mpWhiteList, maConfig.maWhiteList); } +IMPL_LINK_NOARG(SvxOpenCLTabPage, EnableOpenCLHdl) +{ + EnableOpenCLHdl(mpBlackListFrame, mpUseOpenCL->IsChecked()); + EnableOpenCLHdl(mpWhiteListFrame, mpUseOpenCL->IsChecked()); + return 0; +} + + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx index 818eec45f739..662ac28a631a 100644 --- a/cui/source/options/optopencl.hxx +++ b/cui/source/options/optopencl.hxx @@ -33,11 +33,13 @@ private: CheckBox* mpUseOpenCL; + VclFrame* mpBlackListFrame; ListBox* mpBlackList; PushButton* mpBlackListEdit; PushButton* mpBlackListAdd; PushButton* mpBlackListDelete; + VclFrame* mpWhiteListFrame; ListBox* mpWhiteList; PushButton* mpWhiteListEdit; PushButton* mpWhiteListAdd; @@ -51,9 +53,12 @@ private: DECL_LINK(WhiteListAddHdl, void*); DECL_LINK(WhiteListDeleteHdl, void*); + DECL_LINK(EnableOpenCLHdl, void*); + long EditHdl(ListBox* pListBox, OpenCLConfig::ImplMatcherSet& rSet, const OString& rTag); long AddHdl(ListBox* pListBox, OpenCLConfig::ImplMatcherSet& rSet, const OString& rTag); long DeleteHdl(ListBox* pListBox, OpenCLConfig::ImplMatcherSet& rSet); + void EnableOpenCLHdl(VclFrame* pFrame, bool aEnable); public: SvxOpenCLTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); |