[Libreoffice-commits] core.git: cui/source cui/uiconfig

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 20 17:20:47 UTC 2020


 cui/source/options/optgdlg.cxx |   40 ----------------------------------------
 cui/source/options/optgdlg.hxx |    2 --
 cui/uiconfig/ui/optviewpage.ui |   23 +++--------------------
 3 files changed, 3 insertions(+), 62 deletions(-)

New commits:
commit fea1d3a487faef85b2b7aa8a87075f81ea22af76
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Oct 16 12:22:38 2020 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Tue Oct 20 19:19:54 2020 +0200

    remove ui for 'forceskia' AKA 'ignore skia denylist' (tdf#137159)
    
    I originally copy&pasted this from the OpenGL code, but now that I
    think of it, having an easy checkbox to make LO use drivers that LO
    decides are faulty is a bad idea. There's still the expert
    configuration if somebody insists (and if they're not expert
    enough to find the expert setting then they better not mess with it),
    but this is asking for unnecessary trouble.
    This also solves the problem that the UI option is misleading. As
    the description in Common.xcs says, "This one forces the use of Skia
    even if the denylist would block the driver.", so the option is
    independent of the 'enable skia' option, but the UI didn't make it
    appear so.
    
    Change-Id: I74bf3574f16899405272dbb3aec54580a5e3f0bb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104425
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 0d427243f9a6..7301bd817144 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -107,7 +107,6 @@ class SkiaCfg
 {
 private:
     bool mbUseSkia;
-    bool mbForceSkia;
     bool mbForceSkiaRaster;
     bool mbModified;
 
@@ -116,11 +115,9 @@ public:
     ~SkiaCfg();
 
     bool useSkia() const;
-    bool forceSkia() const;
     bool forceSkiaRaster() const;
 
     void setUseSkia(bool bSkia);
-    void setForceSkia(bool bSkia);
     void setForceSkiaRaster(bool bSkia);
 
     void reset();
@@ -135,7 +132,6 @@ SkiaCfg::SkiaCfg():
 void SkiaCfg::reset()
 {
     mbUseSkia = officecfg::Office::Common::VCL::UseSkia::get();
-    mbForceSkia = officecfg::Office::Common::VCL::ForceSkia::get();
     mbForceSkiaRaster = officecfg::Office::Common::VCL::ForceSkiaRaster::get();
     mbModified = false;
 }
@@ -150,8 +146,6 @@ SkiaCfg::~SkiaCfg()
         std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
         if (!officecfg::Office::Common::VCL::UseSkia::isReadOnly())
             officecfg::Office::Common::VCL::UseSkia::set(mbUseSkia, batch);
-        if (!officecfg::Office::Common::VCL::ForceSkia::isReadOnly())
-            officecfg::Office::Common::VCL::ForceSkia::set(mbForceSkia, batch);
         if (!officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly())
             officecfg::Office::Common::VCL::ForceSkiaRaster::set(mbForceSkiaRaster, batch);
         batch->commit();
@@ -166,11 +160,6 @@ bool SkiaCfg::useSkia() const
     return mbUseSkia;
 }
 
-bool SkiaCfg::forceSkia() const
-{
-    return mbForceSkia;
-}
-
 bool SkiaCfg::forceSkiaRaster() const
 {
     return mbForceSkiaRaster;
@@ -185,15 +174,6 @@ void SkiaCfg::setUseSkia(bool bSkia)
     }
 }
 
-void SkiaCfg::setForceSkia(bool bSkia)
-{
-    if (mbForceSkia != bSkia)
-    {
-        mbForceSkia = bSkia;
-        mbModified = true;
-    }
-}
-
 void SkiaCfg::setForceSkiaRaster(bool bSkia)
 {
     if (mbForceSkiaRaster != bSkia)
@@ -693,7 +673,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p
     , m_xUseHardwareAccell(m_xBuilder->weld_check_button("useaccel"))
     , m_xUseAntiAliase(m_xBuilder->weld_check_button("useaa"))
     , m_xUseSkia(m_xBuilder->weld_check_button("useskia"))
-    , m_xForceSkia(m_xBuilder->weld_check_button("forceskia"))
     , m_xForceSkiaRaster(m_xBuilder->weld_check_button("forceskiaraster"))
     , m_xSkiaStatusEnabled(m_xBuilder->weld_label("skiaenabled"))
     , m_xSkiaStatusDisabled(m_xBuilder->weld_label("skiadisabled"))
@@ -704,7 +683,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p
     if (Application::GetToolkitName() == "gtk3")
     {
         m_xUseSkia->hide();
-        m_xForceSkia->hide();
         m_xForceSkiaRaster->hide();
         m_xSkiaStatusEnabled->hide();
         m_xSkiaStatusDisabled->hide();
@@ -716,7 +694,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p
     // For now Skia is used mainly on Windows, hide the controls everywhere else.
     // It can also be used on Linux, but only with the rarely used 'gen' backend.
     m_xUseSkia->hide();
-    m_xForceSkia->hide();
     m_xForceSkiaRaster->hide();
     m_xSkiaStatusEnabled->hide();
     m_xSkiaStatusDisabled->hide();
@@ -724,7 +701,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p
 
     m_xFontAntiAliasing->connect_toggled( LINK( this, OfaViewTabPage, OnAntialiasingToggled ) );
 
-    m_xForceSkia->connect_toggled(LINK(this, OfaViewTabPage, OnForceSkiaToggled));
     m_xForceSkiaRaster->connect_toggled(LINK(this, OfaViewTabPage, OnForceSkiaRasterToggled));
 
     // Set known icon themes
@@ -754,8 +730,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p
     // FIXME: should really add code to show a 'lock' icon here.
     if (officecfg::Office::Common::VCL::UseSkia::isReadOnly())
         m_xUseSkia->set_sensitive(false);
-    if (officecfg::Office::Common::VCL::ForceSkia::isReadOnly())
-        m_xForceSkia->set_sensitive(false);
     if (officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly())
         m_xForceSkiaRaster->set_sensitive(false);
 
@@ -785,15 +759,6 @@ IMPL_LINK_NOARG( OfaViewTabPage, OnAntialiasingToggled, weld::ToggleButton&, voi
     m_xAAPointLimit->set_sensitive(bAAEnabled);
 }
 
-IMPL_LINK_NOARG(OfaViewTabPage, OnForceSkiaToggled, weld::ToggleButton&, void)
-{
-    if (m_xForceSkia->get_active())
-    {
-        // Ignoring the Skia denylist implies that Skia is on.
-        m_xUseSkia->set_active(true);
-    }
-}
-
 IMPL_LINK_NOARG(OfaViewTabPage, OnForceSkiaRasterToggled, weld::ToggleButton&, void)
 {
     if (m_xForceSkiaRaster->get_active())
@@ -961,11 +926,9 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
     }
 
     if (m_xUseSkia->get_state_changed_from_saved() ||
-        m_xForceSkia->get_state_changed_from_saved() ||
         m_xForceSkiaRaster->get_state_changed_from_saved())
     {
         mpSkiaConfig->setUseSkia(m_xUseSkia->get_active());
-        mpSkiaConfig->setForceSkia(m_xForceSkia->get_active());
         mpSkiaConfig->setForceSkiaRaster(m_xForceSkiaRaster->get_active());
         bModified = true;
     }
@@ -998,7 +961,6 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
     }
 
     if (m_xUseSkia->get_state_changed_from_saved() ||
-        m_xForceSkia->get_state_changed_from_saved() ||
         m_xForceSkiaRaster->get_state_changed_from_saved())
     {
         SolarMutexGuard aGuard;
@@ -1109,7 +1071,6 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
         m_xUseAntiAliase->save_state();
     }
     m_xUseSkia->set_active(mpSkiaConfig->useSkia());
-    m_xForceSkia->set_active(mpSkiaConfig->forceSkia());
     m_xForceSkiaRaster->set_active(mpSkiaConfig->forceSkiaRaster());
 
     m_xFontAntiAliasing->save_state();
@@ -1117,7 +1078,6 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
     m_xFontShowCB->save_state();
 
     m_xUseSkia->save_state();
-    m_xForceSkia->save_state();
     m_xForceSkiaRaster->save_state();
 
     OnAntialiasingToggled(*m_xFontAntiAliasing);
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index ff3c7a80d776..90daae0c92f0 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -111,7 +111,6 @@ private:
     std::unique_ptr<weld::CheckButton> m_xUseHardwareAccell;
     std::unique_ptr<weld::CheckButton> m_xUseAntiAliase;
     std::unique_ptr<weld::CheckButton> m_xUseSkia;
-    std::unique_ptr<weld::CheckButton> m_xForceSkia;
     std::unique_ptr<weld::CheckButton> m_xForceSkiaRaster;
 
     std::unique_ptr<weld::Label> m_xSkiaStatusEnabled;
@@ -122,7 +121,6 @@ private:
     std::unique_ptr<weld::Button> m_xMoreIcons;
 
     DECL_LINK(OnAntialiasingToggled, weld::ToggleButton&, void);
-    DECL_LINK(OnForceSkiaToggled, weld::ToggleButton&, void);
     DECL_LINK(OnForceSkiaRasterToggled, weld::ToggleButton&, void);
     DECL_STATIC_LINK(OfaViewTabPage, OnMoreIconsClick, weld::Button&, void);
     void UpdateSkiaStatus();
diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index 44df6633b200..502a6e63be25 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -594,23 +594,6 @@
                         <property name="top-attach">2</property>
                       </packing>
                     </child>
-                    <child>
-                      <object class="GtkCheckButton" id="forceskia">
-                        <property name="label" translatable="yes" context="optviewpage|forceskia">Ignore Skia denylist</property>
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="receives-default">False</property>
-                        <property name="tooltip-text" translatable="yes" context="optviewpage|forceskia|tooltip_text">Requires restart. Enabling this may expose driver bugs</property>
-                        <property name="margin-left">12</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">3</property>
-                      </packing>
-                    </child>
                     <child>
                       <object class="GtkCheckButton" id="forceskiaraster">
                         <property name="label" translatable="yes" context="optviewpage|forceskiaraster">Force Skia software rendering</property>
@@ -625,7 +608,7 @@
                       </object>
                       <packing>
                         <property name="left-attach">0</property>
-                        <property name="top-attach">4</property>
+                        <property name="top-attach">3</property>
                       </packing>
                     </child>
                     <child>
@@ -637,7 +620,7 @@
                       </object>
                       <packing>
                         <property name="left-attach">0</property>
-                        <property name="top-attach">5</property>
+                        <property name="top-attach">4</property>
                       </packing>
                     </child>
                     <child>
@@ -649,7 +632,7 @@
                       </object>
                       <packing>
                         <property name="left-attach">0</property>
-                        <property name="top-attach">6</property>
+                        <property name="top-attach">5</property>
                       </packing>
                     </child>
                     <child>


More information about the Libreoffice-commits mailing list