summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2019-07-31 23:54:29 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-08-06 08:23:30 +0200
commit5841be069cf9891669b385f62f2e7f8d8e877981 (patch)
tree196b883bcebea3b237cf3bc6df88092d4627d46a /cui
parentd6def5f44f2d1b6cae58c215faecb6c3242666a1 (diff)
tdf#107471 Add checkbox to enable/disable sending crash reports to TDF
Also hide it when compiled with --disable-breakpad i.e. most Linux distributions Change-Id: I5d392e22410614550aa9602d0c30b0b81ec22ea0 Reviewed-on: https://gerrit.libreoffice.org/76771 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optgdlg.cxx17
-rw-r--r--cui/source/options/optgdlg.hxx1
-rw-r--r--cui/uiconfig/ui/optgeneralpage.ui42
3 files changed, 52 insertions, 8 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 63ad892a2d27..4a2fc6962d4a 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -263,6 +263,7 @@ OfaMiscTabPage::OfaMiscTabPage(TabPageParent pParent, const SfxItemSet& rSet)
, m_xYearValueField(m_xBuilder->weld_spin_button("year"))
, m_xToYearFT(m_xBuilder->weld_label("toyear"))
, m_xCollectUsageInfo(m_xBuilder->weld_check_button("collectusageinfo"))
+ , m_xCrashReport(m_xBuilder->weld_check_button("crashreport"))
, m_xQuickStarterFrame(m_xBuilder->weld_widget("quickstarter"))
#if defined(UNX)
, m_xQuickLaunchCB(m_xBuilder->weld_check_button("systray"))
@@ -362,6 +363,14 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
bModified = true;
}
+#if HAVE_FEATURE_BREAKPAD
+ if (m_xCrashReport->get_state_changed_from_saved())
+ {
+ officecfg::Office::Common::Misc::CrashReport::set(m_xCrashReport->get_active(), batch);
+ bModified = true;
+ }
+#endif
+
batch->commit();
if( m_xQuickLaunchCB->get_state_changed_from_saved())
@@ -405,6 +414,14 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
m_xCollectUsageInfo->set_sensitive(!officecfg::Office::Common::Misc::CollectUsageInformation::isReadOnly());
m_xCollectUsageInfo->save_state();
+#if HAVE_FEATURE_BREAKPAD
+ m_xCrashReport->set_active(officecfg::Office::Common::Misc::CrashReport::get());
+ m_xCrashReport->set_sensitive(!officecfg::Office::Common::Misc::CrashReport::isReadOnly());
+ m_xCrashReport->save_state();
+#else
+ m_xCrashReport->hide();
+#endif
+
SfxItemState eState = rSet->GetItemState( SID_ATTR_QUICKLAUNCHER, false, &pItem );
if ( SfxItemState::SET == eState )
m_xQuickLaunchCB->set_active( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 2200a2913bec..319d0ac74627 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -56,6 +56,7 @@ private:
std::unique_ptr<weld::SpinButton> m_xYearValueField;
std::unique_ptr<weld::Label> m_xToYearFT;
std::unique_ptr<weld::CheckButton> m_xCollectUsageInfo;
+ std::unique_ptr<weld::CheckButton> m_xCrashReport;
std::unique_ptr<weld::Widget> m_xQuickStarterFrame;
std::unique_ptr<weld::CheckButton> m_xQuickLaunchCB;
diff --git a/cui/uiconfig/ui/optgeneralpage.ui b/cui/uiconfig/ui/optgeneralpage.ui
index 9a87396b2679..2e8d70a8e590 100644
--- a/cui/uiconfig/ui/optgeneralpage.ui
+++ b/cui/uiconfig/ui/optgeneralpage.ui
@@ -63,7 +63,6 @@
<object class="GtkCheckButton" id="cbShowTipOfTheDay">
<property name="label" translatable="yes" context="optgeneralpage|TipOfTheDayCheckbox">Show "Tip of the Day" dialog on start-up</property>
<property name="visible">True</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
@@ -328,14 +327,41 @@
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkCheckButton" id="collectusageinfo">
- <property name="label" translatable="yes" context="optgeneralpage|collectusageinfo">Collect usage data and send it to The Document Foundation</property>
+ <object class="GtkGrid">
<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>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkCheckButton" id="collectusageinfo">
+ <property name="label" translatable="yes" context="optgeneralpage|collectusageinfo">Collect usage data and send it to The Document Foundation</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="margin_top">1</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="crashreport">
+ <property name="label" translatable="yes" context="optgeneralpage|crashreport">Sen_d crash reports to The Document Foundation</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="halign">start</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
</object>
</child>
</object>