From ff84a4e5662ee7058073af34ead9645d63562bb1 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Tue, 15 Oct 2019 15:27:16 +0200 Subject: [PATCH] [gmenu-dbusmenu-proxy] Don't create ~/.gtkrc-2.0 Summary: BUG: 412970 Test Plan: GTK-2.0 applications use breeze again. Global menu activation still works. Reviewers: broulik Reviewed By: broulik Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D24664 --- gmenu-dbusmenu-proxy/menuproxy.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gmenu-dbusmenu-proxy/menuproxy.cpp b/gmenu-dbusmenu-proxy/menuproxy.cpp index 24542f286..8c2d2bd91 100644 --- a/gmenu-dbusmenu-proxy/menuproxy.cpp +++ b/gmenu-dbusmenu-proxy/menuproxy.cpp @@ -98,7 +98,7 @@ MenuProxy::MenuProxy() enableGtkSettings(false); } - // kde-gtk-config just deletes and re-creates the gtkrc-2.0, watch this and add out config to it again + // kde-gtk-config just deletes and re-creates the gtkrc-2.0, watch this and add our config to it again m_writeGtk2SettingsTimer->setSingleShot(true); m_writeGtk2SettingsTimer->setInterval(1000); connect(m_writeGtk2SettingsTimer, &QTimer::timeout, this, &MenuProxy::writeGtk2Settings); @@ -178,9 +178,15 @@ QString MenuProxy::gtk3SettingsIniPath() void MenuProxy::writeGtk2Settings() { + QFile rcFile(gtkRc2Path()); + if (!rcFile.exists()) { + // Don't create it here, that would break writing default GTK-2.0 settings on first login, + // as the gtkbreeze kconf_update script only does so if it does not exist + return; + } + qCDebug(DBUSMENUPROXY) << "Writing gtkrc-2.0 to" << (m_enabled ? "enable" : "disable") << "global menu support"; - QFile rcFile(gtkRc2Path()); if (!rcFile.open(QIODevice::ReadWrite | QIODevice::Text)) { return; }