ports/x11/plank/files/patch-docklets_Battery_BatteryDocklet.vala
Olivier Duchateau 814d442508 x11/plank: update to 0.11.114
ChangeLog: https://github.com/zquestz/plank-reloaded/releases/tag/0.11.114

 * Switch to Meson build system
 * Remove unneeded patch
 * Build battery docklet

PR:		285136
Reported by:	duchateau.olivier@gmail.com
Approved by:	daniel@shafer.cc (maintainer, timeout > 3 weeks)
2025-03-30 18:06:01 +02:00

17 lines
691 B
Vala

--- docklets/Battery/BatteryDocklet.vala.orig 2025-02-28 03:58:18 UTC
+++ docklets/Battery/BatteryDocklet.vala
@@ -35,9 +35,11 @@ namespace Docky {
public bool is_supported () { return true; }
public Plank.DockElement make_element (string launcher, GLib.File file) {
- return (BatteryUPowerDockItem.is_supported)
- ? (Plank.DockElement) new BatteryUPowerDockItem.with_dockitem_file (file)
- : (Plank.DockElement) new BatteryDockItem.with_dockitem_file (file);
+ if (BatteryUPowerDockItem.is_supported) {
+ return (Plank.DockElement) new BatteryUPowerDockItem.with_dockitem_file (file);
+ }
+
+ return null;
}
}
}