diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-11-24 18:08:55 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-11-24 20:21:46 +0200 |
commit | 3a58704459a8e60ecca337a247331ac55b7672d3 (patch) | |
tree | fadd73c759271a852e0cece5e0f37f7ef3a04341 /cui | |
parent | 4950c30e633ac2d1a12a9e4b086478ac7d4f790c (diff) |
Make whether to use OpenCL or not a global option
Add a toggle to the "General" page.
Change-Id: If35b1472032706b09a3bc3499c55cbd3ac2e13ac
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 10 | ||||
-rw-r--r-- | cui/source/options/optgdlg.hxx | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/optgeneralpage.ui | 41 |
3 files changed, 53 insertions, 0 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index e68743da2310..c449eb04b75a 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -209,6 +209,7 @@ OfaMiscTabPage::OfaMiscTabPage(vcl::Window* pParent, const SfxItemSet& rSet) get(m_pYearValueField, "year"); get(m_pToYearFT, "toyear"); get(m_pCollectUsageInfo, "collectusageinfo"); + get(m_pUseOpenCL, "useopencl"); if (m_pFileDlgCB->IsVisible() && SvtMiscOptions().IsUseSystemFileDialogReadOnly()) { @@ -301,6 +302,12 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet ) bModified = true; } + if (m_pUseOpenCL->IsValueChangedFromSaved()) + { + officecfg::Office::Common::Misc::UseOpenCL::set(m_pUseOpenCL->IsChecked(), batch); + bModified = true; + } + batch->commit(); return bModified; @@ -342,6 +349,9 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet ) m_pCollectUsageInfo->Check(officecfg::Office::Common::Misc::CollectUsageInformation::get()); m_pCollectUsageInfo->SaveValue(); + + m_pUseOpenCL->Check(officecfg::Office::Common::Misc::UseOpenCL::get()); + m_pUseOpenCL->SaveValue(); } diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index 33534573502d..a6a7dac8df83 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -57,6 +57,8 @@ private: CheckBox* m_pCollectUsageInfo; + CheckBox* m_pUseOpenCL; + DECL_LINK( TwoFigureHdl, NumericField* ); DECL_LINK( TwoFigureConfigHdl, NumericField* ); DECL_LINK(HelpCheckHdl_Impl, void *); diff --git a/cui/uiconfig/ui/optgeneralpage.ui b/cui/uiconfig/ui/optgeneralpage.ui index b1447c59cecd..d3e801593ff0 100644 --- a/cui/uiconfig/ui/optgeneralpage.ui +++ b/cui/uiconfig/ui/optgeneralpage.ui @@ -370,5 +370,46 @@ <property name="top_attach">5</property> </packing> </child> + <child> + <object class="GtkFrame" id="openclframe"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkCheckButton" id="useopencl"> + <property name="label" translatable="yes">Allow use of OpenCL</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">OpenCL</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">6</property> + </packing> + </child> </object> </interface> |