[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
wilder-5.22
Nate Graham 6 years ago
parent a892e8681d
commit a9cef6070f
  1. 5
      applets/devicenotifier/package/contents/ui/FullRepresentation.qml

@ -49,6 +49,8 @@ PlasmaComponents3.Page {
} }
PlasmaComponents3.ComboBox { PlasmaComponents3.ComboBox {
id: displayModeCombobox
Layout.preferredWidth: units.gridUnit * 11 Layout.preferredWidth: units.gridUnit * 11
model: [i18n("Removable devices"), model: [i18n("Removable devices"),
i18n("Non-removable devices"), i18n("Non-removable devices"),
@ -90,7 +92,8 @@ PlasmaComponents3.Page {
PlasmaComponents3.ToolButton { PlasmaComponents3.ToolButton {
id: unmountAll id: unmountAll
visible: devicenotifier.mountedRemovables > 1; visible: devicenotifier.mountedRemovables > 1
&& displayModeCombobox.currentIndex === 0 /* removables only */
icon.name: "media-eject" icon.name: "media-eject"
text: i18n("Remove All") text: i18n("Remove All")

Loading…
Cancel
Save