From 68c1810b9ee1f895e3129ca1629bc6b47f3946aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 16 Feb 2023 15:54:07 +0100 Subject: hwmanager: Do not open a popup window when clicking on a notification, if automatic opening of popup windows is enabled. --- kcontrol/hwmanager/hwdevicetray.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'kcontrol') diff --git a/kcontrol/hwmanager/hwdevicetray.cpp b/kcontrol/hwmanager/hwdevicetray.cpp index d48738256..859c86fed 100644 --- a/kcontrol/hwmanager/hwdevicetray.cpp +++ b/kcontrol/hwmanager/hwdevicetray.cpp @@ -699,6 +699,13 @@ void HwDeviceSystemTray::deviceChanged(TDEGenericDevice* device) void HwDeviceSystemTray::devicePopupClicked(KPassivePopup* popup, TQPoint point, TQString uuid) { TDEGenericDevice *hwdevice; if (uuid.startsWith("ADD: ")) { + TDEConfig config("mediamanagerrc"); + config.setGroup("Global"); + if (config.readBoolEntry("NotificationPopupsEnabled", true)) + { + return; + } + uuid = uuid.right(uuid.length() - strlen("ADD: ")); if (uuid != "") { TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); -- cgit v1.2.1