From a9cef6070fdba0c0cab51f9f364cd31e1886e2c7 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Mon, 5 Oct 2020 15:34:40 -0600 Subject: [PATCH] [applets/devicenotifier] Be more selective about showing "Remove all" button This button only makes sense to show when using the "Removable devices" setting in the combobox. BUG: 427175 FIXED-IN: 5.20 --- .../package/contents/ui/FullRepresentation.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/applets/devicenotifier/package/contents/ui/FullRepresentation.qml b/applets/devicenotifier/package/contents/ui/FullRepresentation.qml index 11012c410..6d4ace353 100644 --- a/applets/devicenotifier/package/contents/ui/FullRepresentation.qml +++ b/applets/devicenotifier/package/contents/ui/FullRepresentation.qml @@ -49,6 +49,8 @@ PlasmaComponents3.Page { } PlasmaComponents3.ComboBox { + id: displayModeCombobox + Layout.preferredWidth: units.gridUnit * 11 model: [i18n("Removable devices"), i18n("Non-removable devices"), @@ -90,7 +92,8 @@ PlasmaComponents3.Page { PlasmaComponents3.ToolButton { id: unmountAll - visible: devicenotifier.mountedRemovables > 1; + visible: devicenotifier.mountedRemovables > 1 + && displayModeCombobox.currentIndex === 0 /* removables only */ icon.name: "media-eject" text: i18n("Remove All")