tdf#147469 remove mouse "Positioning" from options page
Change-Id: I929c62189e3e31358fe95c804457fcbcba85e4b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149149
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 8a30f35..b0bca10 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -537,7 +537,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p
, m_xForceSkiaRaster(m_xBuilder->weld_check_button("forceskiaraster"))
, m_xSkiaStatusEnabled(m_xBuilder->weld_label("skiaenabled"))
, m_xSkiaStatusDisabled(m_xBuilder->weld_label("skiadisabled"))
, m_xMousePosLB(m_xBuilder->weld_combo_box("mousepos"))
, m_xMouseMiddleLB(m_xBuilder->weld_combo_box("mousemiddle"))
, m_xMoreIcons(m_xBuilder->weld_button("btnMoreIcons"))
, m_xRunGPTests(m_xBuilder->weld_button("btn_rungptest"))
@@ -731,18 +730,6 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
bool bAppearanceChanged = false;
std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
// Mouse Snap Mode
SnapType eOldSnap = static_cast<SnapType>(officecfg::Office::Common::View::Dialog::MousePositioning::get());
SnapType eNewSnap = static_cast<SnapType>(m_xMousePosLB->get_active());
if(eNewSnap > SnapType::NONE)
eNewSnap = SnapType::NONE;
if ( eNewSnap != eOldSnap )
{
officecfg::Office::Common::View::Dialog::MousePositioning::set(static_cast<sal_Int16>(eNewSnap), batch);
bAppearanceChanged = true;
}
// Middle Mouse Button
MouseMiddleButtonAction eOldMiddleMouse = static_cast<MouseMiddleButtonAction>(officecfg::Office::Common::View::Dialog::MiddleMouseButton::get());
short eNewMiddleMouse = m_xMouseMiddleLB->get_active();
@@ -914,12 +901,7 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
m_xAppearanceStyleLB->set_active(officecfg::Office::Common::Misc::Appearance::get());
m_xAppearanceStyleLB->save_value();
// Mouse Snap
sal_Int16 nMouseSnap = officecfg::Office::Common::View::Dialog::MousePositioning::get();
m_xMousePosLB->set_active(static_cast<sal_Int32>(nMouseSnap));
m_xMousePosLB->save_value();
// Mouse Snap
// Middle Mouse Button
sal_Int16 nMiddleMouseButton = officecfg::Office::Common::View::Dialog::MiddleMouseButton::get();
m_xMouseMiddleLB->set_active(static_cast<short>(nMiddleMouseButton));
m_xMouseMiddleLB->save_value();
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 620c6ed..9b22c0b 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -105,7 +105,6 @@ private:
std::unique_ptr<weld::Label> m_xSkiaStatusEnabled;
std::unique_ptr<weld::Label> m_xSkiaStatusDisabled;
std::unique_ptr<weld::ComboBox> m_xMousePosLB;
std::unique_ptr<weld::ComboBox> m_xMouseMiddleLB;
std::unique_ptr<weld::Button> m_xMoreIcons;
std::unique_ptr<weld::Button> m_xRunGPTests;
diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index 93160ca..3865fe1 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -37,7 +37,7 @@
<property name="label-xalign">0</property>
<property name="shadow-type">none</property>
<child>
<!-- n-columns=2 n-rows=2 -->
<!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid" id="grid7">
<property name="visible">True</property>
<property name="can-focus">False</property>
@@ -47,20 +47,6 @@
<property name="row-spacing">3</property>
<property name="column-spacing">6</property>
<child>
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" context="optviewpage|label11">_Positioning:</property>
<property name="use-underline">True</property>
<property name="mnemonic-widget">mousepos</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="can-focus">False</property>
@@ -71,27 +57,6 @@
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="mousepos">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<items>
<item translatable="yes" context="optviewpage|mousepos">Default button</item>
<item translatable="yes" context="optviewpage|mousepos">Dialog center</item>
<item translatable="yes" context="optviewpage|mousepos">No automatic positioning</item>
</items>
<child internal-child="accessible">
<object class="AtkObject" id="mousepos-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip | mousepos">Specifies if and how the mouse pointer will be positioned in newly opened dialogs.</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
@@ -113,7 +78,7 @@
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
@@ -714,7 +679,6 @@
</object>
<object class="GtkSizeGroup" id="sizegroupLabel">
<widgets>
<widget name="label11"/>
<widget name="label12"/>
<widget name="label8"/>
<widget name="label9"/>
@@ -725,7 +689,6 @@
</object>
<object class="GtkSizeGroup" id="sizegroupWidget">
<widgets>
<widget name="mousepos"/>
<widget name="mousemiddle"/>
<widget name="notebookbariconsize"/>
<widget name="sidebariconsize"/>