From f86d9d732d9b2aa711d321a8c9f4110b638560b4 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Thu, 13 Jul 2017 09:06:53 +0200 Subject: tdf#104883 Don't call InstallFontconfigResources if it's not available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to call it once because we have no other way to detect whether it's working or not. But if we receive an error the first time, we disable it from now on. Change-Id: I67dba8b65660ff7e05bdf2ddc18b565550901cd1 Reviewed-on: https://gerrit.libreoffice.org/39895 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- officecfg/registry/data/org/openoffice/Office/Common.xcu | 5 +++++ officecfg/registry/schema/org/openoffice/Office/Common.xcs | 11 +++++++++++ vcl/unx/generic/fontmanager/fontconfig.cxx | 9 +++++++++ 3 files changed, 25 insertions(+) diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu index e45beb406041..3469c49051f4 100644 --- a/officecfg/registry/data/org/openoffice/Office/Common.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu @@ -552,4 +552,9 @@ + + + true + + diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index 29573154da73..c0d4f00eff45 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -6719,5 +6719,16 @@ true + + + Contains settings related to PackageKit (Unix only). + + + + Specifies if missing font installation should be triggered. + + true + + diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index dd9d17b7ad28..c85b12fd100d 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -31,6 +31,7 @@ #include #include #include +#include using namespace psp; @@ -901,6 +902,9 @@ namespace #if ENABLE_DBUS IMPL_LINK_NOARG(PrintFontManager, autoInstallFontLangSupport, Timer *, void) { + if (!officecfg::Office::Common::PackageKit::EnableFontInstallation::get()) + return; + guint xid = get_xid_for_dbus(); if (!xid) @@ -945,6 +949,11 @@ IMPL_LINK_NOARG(PrintFontManager, autoInstallFontLangSupport, Timer *, void) /* check the error value */ if (error != nullptr) { + // Disable this method from now on. It's simply not available on some systems + // and leads to an error dialog being shown each tim theis is called tdf#104883 + std::shared_ptr batch( comphelper::ConfigurationChanges::create() ); + officecfg::Office::Common::PackageKit::EnableFontInstallation::set(false, batch); + batch->commit(); g_debug("InstallFontconfigResources problem : %s", error->message); g_error_free(error); } -- cgit v1.2.3