systray: disable status actions - battery and connectivity - since they don't have any 'on-Click action' bound to them anyways
This commit is contained in:
parent
98077b86d6
commit
fc4a19dee0
1 changed files with 8 additions and 4 deletions
|
@ -27,14 +27,18 @@ DeviceIndicator::DeviceIndicator(DeviceDbusInterface* device)
|
||||||
auto battery = new BatteryAction(device);
|
auto battery = new BatteryAction(device);
|
||||||
addAction(battery);
|
addAction(battery);
|
||||||
setWhenAvailable(device->hasPlugin(QStringLiteral("kdeconnect_battery")),
|
setWhenAvailable(device->hasPlugin(QStringLiteral("kdeconnect_battery")),
|
||||||
[battery](bool available) { battery->setVisible(available); }
|
[battery](bool available) {
|
||||||
, this);
|
battery->setVisible(available);
|
||||||
|
battery->setDisabled(available);
|
||||||
|
}, this);
|
||||||
|
|
||||||
auto connectivity = new ConnectivityAction(device);
|
auto connectivity = new ConnectivityAction(device);
|
||||||
addAction(connectivity);
|
addAction(connectivity);
|
||||||
setWhenAvailable(device->hasPlugin(QStringLiteral("kdeconnect_connectivity_report")),
|
setWhenAvailable(device->hasPlugin(QStringLiteral("kdeconnect_connectivity_report")),
|
||||||
[connectivity](bool available) { connectivity->setVisible(available); }
|
[connectivity](bool available) {
|
||||||
, this);
|
connectivity->setVisible(available);
|
||||||
|
connectivity->setDisabled(available);
|
||||||
|
}, this);
|
||||||
|
|
||||||
// Browse device filesystem
|
// Browse device filesystem
|
||||||
auto browse = addAction(QIcon::fromTheme(QStringLiteral("document-open-folder")), i18n("Browse device"));
|
auto browse = addAction(QIcon::fromTheme(QStringLiteral("document-open-folder")), i18n("Browse device"));
|
||||||
|
|
Loading…
Reference in a new issue