Commit fc4a19de authored by Piyush Aggarwal's avatar Piyush Aggarwal 🎮
Browse files

systray: disable status actions - battery and connectivity - since they don't...

systray: disable status actions - battery and connectivity - since they don't have any 'on-Click action' bound to them anyways
parent 98077b86
......@@ -27,14 +27,18 @@ DeviceIndicator::DeviceIndicator(DeviceDbusInterface* device)
auto battery = new BatteryAction(device);
addAction(battery);
setWhenAvailable(device->hasPlugin(QStringLiteral("kdeconnect_battery")),
[battery](bool available) { battery->setVisible(available); }
, this);
[battery](bool available) {
battery->setVisible(available);
battery->setDisabled(available);
}, this);
auto connectivity = new ConnectivityAction(device);
addAction(connectivity);
setWhenAvailable(device->hasPlugin(QStringLiteral("kdeconnect_connectivity_report")),
[connectivity](bool available) { connectivity->setVisible(available); }
, this);
[connectivity](bool available) {
connectivity->setVisible(available);
connectivity->setDisabled(available);
}, this);
// Browse device filesystem
auto browse = addAction(QIcon::fromTheme(QStringLiteral("document-open-folder")), i18n("Browse device"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment