diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-10-16 10:53:52 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-10-16 10:58:06 +0200 |
commit | 9c9831f79cf0413c0cd947449bf8253fe09a224f (patch) | |
tree | 683aafe7eaa2991e5c792ada8e1f31edca6c7e23 /cui | |
parent | fe25090e992eefd0c43ca73b656632a650793b1a (diff) |
usage info: Checkbox to turn it on and off (Tools -> Options... -> General).
Change-Id: I67143e604314f5553026c369bbed3fdd683c39a6
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 14 | ||||
-rw-r--r-- | cui/source/options/optgdlg.hxx | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/optgeneralpage.ui | 57 |
3 files changed, 66 insertions, 7 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 79688ccd2bb3..ef1ae9661187 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -67,6 +67,7 @@ #include <unotools/saveopt.hxx> #include <unotools/searchopt.hxx> #include <sal/macros.h> +#include <officecfg/Office/Common.hxx> #include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/container/XNameAccess.hpp> @@ -206,6 +207,7 @@ OfaMiscTabPage::OfaMiscTabPage(vcl::Window* pParent, const SfxItemSet& rSet) get(m_pYearFrame, "yearframe"); get(m_pYearValueField, "year"); get(m_pToYearFT, "toyear"); + get(m_pCollectUsageInfo, "collectusageinfo"); if (m_pFileDlgCB->IsVisible() && SvtMiscOptions().IsUseSystemFileDialogReadOnly()) { @@ -246,6 +248,7 @@ SfxTabPage* OfaMiscTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAtt bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet ) { bool bModified = false; + boost::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); SvtHelpOptions aHelpOptions; if ( m_pToolTipsCB->IsValueChangedFromSaved() ) @@ -291,6 +294,14 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet ) rSet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, nNum ) ); } + if (m_pCollectUsageInfo->IsValueChangedFromSaved()) + { + officecfg::Office::Common::Misc::CollectUsageInformation::set(m_pCollectUsageInfo->IsChecked(), batch); + bModified = true; + } + + batch->commit(); + return bModified; } @@ -327,6 +338,9 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet ) { m_pYearFrame->Enable(false); } + + m_pCollectUsageInfo->Check(officecfg::Office::Common::Misc::CollectUsageInformation::get()); + m_pCollectUsageInfo->SaveValue(); } diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index f559a0c00a03..33534573502d 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -55,6 +55,8 @@ private: OUString m_aStrDateInfo; + CheckBox* m_pCollectUsageInfo; + 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 83bc11437255..943c36602cfb 100644 --- a/cui/uiconfig/ui/optgeneralpage.ui +++ b/cui/uiconfig/ui/optgeneralpage.ui @@ -1,6 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> <!-- interface-requires gtk+ 3.0 --> + <object class="GtkAdjustment" id="adjustment1"> + <property name="lower">1583</property> + <property name="upper">9857</property> + <property name="value">1930</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> <object class="GtkGrid" id="OptGeneralPage"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -351,12 +358,48 @@ <property name="height">1</property> </packing> </child> - </object> - <object class="GtkAdjustment" id="adjustment1"> - <property name="lower">1583</property> - <property name="upper">9857</property> - <property name="value">1930</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <child> + <object class="GtkFrame" id="privacyframe"> + <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="alignment6"> + <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="collectusageinfo"> + <property name="label" translatable="yes">Allow collecting usage information, and sending it to TDF servers</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="label7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Privacy</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">5</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> </object> </interface> |